@metamask-previews/design-system-react-native 0.9.0-preview.694a8ed → 0.11.0-preview.645f8b0

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 (281) hide show
  1. package/CHANGELOG.md +51 -1
  2. package/dist/components/BannerAlert/BannerAlert.cjs +23 -0
  3. package/dist/components/BannerAlert/BannerAlert.cjs.map +1 -0
  4. package/dist/components/BannerAlert/BannerAlert.constants.cjs +30 -0
  5. package/dist/components/BannerAlert/BannerAlert.constants.cjs.map +1 -0
  6. package/dist/components/BannerAlert/BannerAlert.constants.d.cts +7 -0
  7. package/dist/components/BannerAlert/BannerAlert.constants.d.cts.map +1 -0
  8. package/dist/components/BannerAlert/BannerAlert.constants.d.mts +7 -0
  9. package/dist/components/BannerAlert/BannerAlert.constants.d.mts.map +1 -0
  10. package/dist/components/BannerAlert/BannerAlert.constants.mjs +27 -0
  11. package/dist/components/BannerAlert/BannerAlert.constants.mjs.map +1 -0
  12. package/dist/components/BannerAlert/BannerAlert.d.cts +4 -0
  13. package/dist/components/BannerAlert/BannerAlert.d.cts.map +1 -0
  14. package/dist/components/BannerAlert/BannerAlert.d.mts +4 -0
  15. package/dist/components/BannerAlert/BannerAlert.d.mts.map +1 -0
  16. package/dist/components/BannerAlert/BannerAlert.mjs +23 -0
  17. package/dist/components/BannerAlert/BannerAlert.mjs.map +1 -0
  18. package/dist/components/BannerAlert/BannerAlert.types.cjs +3 -0
  19. package/dist/components/BannerAlert/BannerAlert.types.cjs.map +1 -0
  20. package/dist/components/BannerAlert/BannerAlert.types.d.cts +10 -0
  21. package/dist/components/BannerAlert/BannerAlert.types.d.cts.map +1 -0
  22. package/dist/components/BannerAlert/BannerAlert.types.d.mts +10 -0
  23. package/dist/components/BannerAlert/BannerAlert.types.d.mts.map +1 -0
  24. package/dist/components/BannerAlert/BannerAlert.types.mjs +2 -0
  25. package/dist/components/BannerAlert/BannerAlert.types.mjs.map +1 -0
  26. package/dist/components/BannerAlert/index.cjs +8 -0
  27. package/dist/components/BannerAlert/index.cjs.map +1 -0
  28. package/dist/components/BannerAlert/index.d.cts +4 -0
  29. package/dist/components/BannerAlert/index.d.cts.map +1 -0
  30. package/dist/components/BannerAlert/index.d.mts +4 -0
  31. package/dist/components/BannerAlert/index.d.mts.map +1 -0
  32. package/dist/components/BannerAlert/index.mjs +3 -0
  33. package/dist/components/BannerAlert/index.mjs.map +1 -0
  34. package/dist/components/BannerBase/BannerBase.cjs +1 -1
  35. package/dist/components/BannerBase/BannerBase.cjs.map +1 -1
  36. package/dist/components/BannerBase/BannerBase.d.cts.map +1 -1
  37. package/dist/components/BannerBase/BannerBase.d.mts.map +1 -1
  38. package/dist/components/BannerBase/BannerBase.mjs +1 -1
  39. package/dist/components/BannerBase/BannerBase.mjs.map +1 -1
  40. package/dist/components/BottomSheet/BottomSheet.cjs +109 -0
  41. package/dist/components/BottomSheet/BottomSheet.cjs.map +1 -0
  42. package/dist/components/BottomSheet/BottomSheet.d.cts +16 -0
  43. package/dist/components/BottomSheet/BottomSheet.d.cts.map +1 -0
  44. package/dist/components/BottomSheet/BottomSheet.d.mts +16 -0
  45. package/dist/components/BottomSheet/BottomSheet.d.mts.map +1 -0
  46. package/dist/components/BottomSheet/BottomSheet.mjs +87 -0
  47. package/dist/components/BottomSheet/BottomSheet.mjs.map +1 -0
  48. package/dist/components/BottomSheet/BottomSheet.types.cjs +3 -0
  49. package/dist/components/BottomSheet/BottomSheet.types.cjs.map +1 -0
  50. package/dist/components/BottomSheet/BottomSheet.types.d.cts +28 -0
  51. package/dist/components/BottomSheet/BottomSheet.types.d.cts.map +1 -0
  52. package/dist/components/BottomSheet/BottomSheet.types.d.mts +28 -0
  53. package/dist/components/BottomSheet/BottomSheet.types.d.mts.map +1 -0
  54. package/dist/components/BottomSheet/BottomSheet.types.mjs +2 -0
  55. package/dist/components/BottomSheet/BottomSheet.types.mjs.map +1 -0
  56. package/dist/components/BottomSheet/index.cjs +6 -0
  57. package/dist/components/BottomSheet/index.cjs.map +1 -0
  58. package/dist/components/BottomSheet/index.d.cts +3 -0
  59. package/dist/components/BottomSheet/index.d.cts.map +1 -0
  60. package/dist/components/BottomSheet/index.d.mts +3 -0
  61. package/dist/components/BottomSheet/index.d.mts.map +1 -0
  62. package/dist/components/BottomSheet/index.mjs +2 -0
  63. package/dist/components/BottomSheet/index.mjs.map +1 -0
  64. package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs +207 -0
  65. package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs.map +1 -0
  66. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.cjs +18 -0
  67. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.cjs.map +1 -0
  68. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.d.cts +14 -0
  69. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.d.cts.map +1 -0
  70. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.d.mts +14 -0
  71. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.d.mts.map +1 -0
  72. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.mjs +15 -0
  73. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.mjs.map +1 -0
  74. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.cts +13 -0
  75. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.cts.map +1 -0
  76. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.mts +13 -0
  77. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.mts.map +1 -0
  78. package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs +190 -0
  79. package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs.map +1 -0
  80. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.cjs +3 -0
  81. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.cjs.map +1 -0
  82. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.cts +56 -0
  83. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.cts.map +1 -0
  84. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.mts +56 -0
  85. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.mts.map +1 -0
  86. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.mjs +2 -0
  87. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.mjs.map +1 -0
  88. package/dist/components/BottomSheetDialog/index.cjs +9 -0
  89. package/dist/components/BottomSheetDialog/index.cjs.map +1 -0
  90. package/dist/components/BottomSheetDialog/index.d.cts +3 -0
  91. package/dist/components/BottomSheetDialog/index.d.cts.map +1 -0
  92. package/dist/components/BottomSheetDialog/index.d.mts +3 -0
  93. package/dist/components/BottomSheetDialog/index.d.mts.map +1 -0
  94. package/dist/components/BottomSheetDialog/index.mjs +2 -0
  95. package/dist/components/BottomSheetDialog/index.mjs.map +1 -0
  96. package/dist/components/ButtonBase/ButtonBase.cjs +2 -9
  97. package/dist/components/ButtonBase/ButtonBase.cjs.map +1 -1
  98. package/dist/components/ButtonBase/ButtonBase.d.cts.map +1 -1
  99. package/dist/components/ButtonBase/ButtonBase.d.mts.map +1 -1
  100. package/dist/components/ButtonBase/ButtonBase.mjs +3 -10
  101. package/dist/components/ButtonBase/ButtonBase.mjs.map +1 -1
  102. package/dist/components/ButtonFilter/ButtonFilter.cjs +28 -0
  103. package/dist/components/ButtonFilter/ButtonFilter.cjs.map +1 -0
  104. package/dist/components/ButtonFilter/ButtonFilter.d.cts +4 -0
  105. package/dist/components/ButtonFilter/ButtonFilter.d.cts.map +1 -0
  106. package/dist/components/ButtonFilter/ButtonFilter.d.mts +4 -0
  107. package/dist/components/ButtonFilter/ButtonFilter.d.mts.map +1 -0
  108. package/dist/components/ButtonFilter/ButtonFilter.mjs +28 -0
  109. package/dist/components/ButtonFilter/ButtonFilter.mjs.map +1 -0
  110. package/dist/components/ButtonFilter/ButtonFilter.types.cjs +3 -0
  111. package/dist/components/ButtonFilter/ButtonFilter.types.cjs.map +1 -0
  112. package/dist/components/ButtonFilter/ButtonFilter.types.d.cts +9 -0
  113. package/dist/components/ButtonFilter/ButtonFilter.types.d.cts.map +1 -0
  114. package/dist/components/ButtonFilter/ButtonFilter.types.d.mts +9 -0
  115. package/dist/components/ButtonFilter/ButtonFilter.types.d.mts.map +1 -0
  116. package/dist/components/ButtonFilter/ButtonFilter.types.mjs +2 -0
  117. package/dist/components/ButtonFilter/ButtonFilter.types.mjs.map +1 -0
  118. package/dist/components/ButtonFilter/index.cjs +6 -0
  119. package/dist/components/ButtonFilter/index.cjs.map +1 -0
  120. package/dist/components/ButtonFilter/index.d.cts +3 -0
  121. package/dist/components/ButtonFilter/index.d.cts.map +1 -0
  122. package/dist/components/ButtonFilter/index.d.mts +3 -0
  123. package/dist/components/ButtonFilter/index.d.mts.map +1 -0
  124. package/dist/components/ButtonFilter/index.mjs +2 -0
  125. package/dist/components/ButtonFilter/index.mjs.map +1 -0
  126. package/dist/components/ButtonIcon/ButtonIcon.cjs +10 -4
  127. package/dist/components/ButtonIcon/ButtonIcon.cjs.map +1 -1
  128. package/dist/components/ButtonIcon/ButtonIcon.d.cts +1 -1
  129. package/dist/components/ButtonIcon/ButtonIcon.d.cts.map +1 -1
  130. package/dist/components/ButtonIcon/ButtonIcon.d.mts +1 -1
  131. package/dist/components/ButtonIcon/ButtonIcon.d.mts.map +1 -1
  132. package/dist/components/ButtonIcon/ButtonIcon.mjs +11 -5
  133. package/dist/components/ButtonIcon/ButtonIcon.mjs.map +1 -1
  134. package/dist/components/ButtonIcon/ButtonIcon.types.cjs.map +1 -1
  135. package/dist/components/ButtonIcon/ButtonIcon.types.d.cts +4 -11
  136. package/dist/components/ButtonIcon/ButtonIcon.types.d.cts.map +1 -1
  137. package/dist/components/ButtonIcon/ButtonIcon.types.d.mts +4 -11
  138. package/dist/components/ButtonIcon/ButtonIcon.types.d.mts.map +1 -1
  139. package/dist/components/ButtonIcon/ButtonIcon.types.mjs.map +1 -1
  140. package/dist/components/ButtonIcon/index.cjs +2 -1
  141. package/dist/components/ButtonIcon/index.cjs.map +1 -1
  142. package/dist/components/ButtonIcon/index.d.cts +1 -1
  143. package/dist/components/ButtonIcon/index.d.cts.map +1 -1
  144. package/dist/components/ButtonIcon/index.d.mts +1 -1
  145. package/dist/components/ButtonIcon/index.d.mts.map +1 -1
  146. package/dist/components/ButtonIcon/index.mjs +1 -1
  147. package/dist/components/ButtonIcon/index.mjs.map +1 -1
  148. package/dist/components/Icon/assets/ai.svg +1 -1
  149. package/dist/components/Input/Input.cjs +12 -2
  150. package/dist/components/Input/Input.cjs.map +1 -1
  151. package/dist/components/Input/Input.d.cts +2 -1
  152. package/dist/components/Input/Input.d.cts.map +1 -1
  153. package/dist/components/Input/Input.d.mts +2 -1
  154. package/dist/components/Input/Input.d.mts.map +1 -1
  155. package/dist/components/Input/Input.mjs +12 -2
  156. package/dist/components/Input/Input.mjs.map +1 -1
  157. package/dist/components/Input/Input.types.cjs.map +1 -1
  158. package/dist/components/Input/Input.types.d.cts +5 -1
  159. package/dist/components/Input/Input.types.d.cts.map +1 -1
  160. package/dist/components/Input/Input.types.d.mts +5 -1
  161. package/dist/components/Input/Input.types.d.mts.map +1 -1
  162. package/dist/components/Input/Input.types.mjs.map +1 -1
  163. package/dist/components/ListItem/ListItem.cjs +61 -0
  164. package/dist/components/ListItem/ListItem.cjs.map +1 -0
  165. package/dist/components/ListItem/ListItem.constants.cjs +14 -0
  166. package/dist/components/ListItem/ListItem.constants.cjs.map +1 -0
  167. package/dist/components/ListItem/ListItem.constants.d.cts +8 -0
  168. package/dist/components/ListItem/ListItem.constants.d.cts.map +1 -0
  169. package/dist/components/ListItem/ListItem.constants.d.mts +8 -0
  170. package/dist/components/ListItem/ListItem.constants.d.mts.map +1 -0
  171. package/dist/components/ListItem/ListItem.constants.mjs +11 -0
  172. package/dist/components/ListItem/ListItem.constants.mjs.map +1 -0
  173. package/dist/components/ListItem/ListItem.d.cts +4 -0
  174. package/dist/components/ListItem/ListItem.d.cts.map +1 -0
  175. package/dist/components/ListItem/ListItem.d.mts +4 -0
  176. package/dist/components/ListItem/ListItem.d.mts.map +1 -0
  177. package/dist/components/ListItem/ListItem.mjs +41 -0
  178. package/dist/components/ListItem/ListItem.mjs.map +1 -0
  179. package/dist/components/ListItem/ListItem.types.cjs +12 -0
  180. package/dist/components/ListItem/ListItem.types.cjs.map +1 -0
  181. package/dist/components/ListItem/ListItem.types.d.cts +60 -0
  182. package/dist/components/ListItem/ListItem.types.d.cts.map +1 -0
  183. package/dist/components/ListItem/ListItem.types.d.mts +60 -0
  184. package/dist/components/ListItem/ListItem.types.d.mts.map +1 -0
  185. package/dist/components/ListItem/ListItem.types.mjs +9 -0
  186. package/dist/components/ListItem/ListItem.types.mjs.map +1 -0
  187. package/dist/components/ListItem/index.cjs +8 -0
  188. package/dist/components/ListItem/index.cjs.map +1 -0
  189. package/dist/components/ListItem/index.d.cts +4 -0
  190. package/dist/components/ListItem/index.d.cts.map +1 -0
  191. package/dist/components/ListItem/index.d.mts +4 -0
  192. package/dist/components/ListItem/index.d.mts.map +1 -0
  193. package/dist/components/ListItem/index.mjs +3 -0
  194. package/dist/components/ListItem/index.mjs.map +1 -0
  195. package/dist/components/MainActionButton/MainActionButton.cjs +28 -0
  196. package/dist/components/MainActionButton/MainActionButton.cjs.map +1 -0
  197. package/dist/components/MainActionButton/MainActionButton.d.cts +4 -0
  198. package/dist/components/MainActionButton/MainActionButton.d.cts.map +1 -0
  199. package/dist/components/MainActionButton/MainActionButton.d.mts +4 -0
  200. package/dist/components/MainActionButton/MainActionButton.d.mts.map +1 -0
  201. package/dist/components/MainActionButton/MainActionButton.mjs +28 -0
  202. package/dist/components/MainActionButton/MainActionButton.mjs.map +1 -0
  203. package/dist/components/MainActionButton/MainActionButton.types.cjs +3 -0
  204. package/dist/components/MainActionButton/MainActionButton.types.cjs.map +1 -0
  205. package/dist/components/MainActionButton/MainActionButton.types.d.cts +41 -0
  206. package/dist/components/MainActionButton/MainActionButton.types.d.cts.map +1 -0
  207. package/dist/components/MainActionButton/MainActionButton.types.d.mts +41 -0
  208. package/dist/components/MainActionButton/MainActionButton.types.d.mts.map +1 -0
  209. package/dist/components/MainActionButton/MainActionButton.types.mjs +2 -0
  210. package/dist/components/MainActionButton/MainActionButton.types.mjs.map +1 -0
  211. package/dist/components/MainActionButton/index.cjs +6 -0
  212. package/dist/components/MainActionButton/index.cjs.map +1 -0
  213. package/dist/components/MainActionButton/index.d.cts +3 -0
  214. package/dist/components/MainActionButton/index.d.cts.map +1 -0
  215. package/dist/components/MainActionButton/index.d.mts +3 -0
  216. package/dist/components/MainActionButton/index.d.mts.map +1 -0
  217. package/dist/components/MainActionButton/index.mjs +2 -0
  218. package/dist/components/MainActionButton/index.mjs.map +1 -0
  219. package/dist/components/TabEmptyState/TabEmptyState.cjs +22 -0
  220. package/dist/components/TabEmptyState/TabEmptyState.cjs.map +1 -0
  221. package/dist/components/TabEmptyState/TabEmptyState.d.cts +4 -0
  222. package/dist/components/TabEmptyState/TabEmptyState.d.cts.map +1 -0
  223. package/dist/components/TabEmptyState/TabEmptyState.d.mts +4 -0
  224. package/dist/components/TabEmptyState/TabEmptyState.d.mts.map +1 -0
  225. package/dist/components/TabEmptyState/TabEmptyState.mjs +22 -0
  226. package/dist/components/TabEmptyState/TabEmptyState.mjs.map +1 -0
  227. package/dist/components/TabEmptyState/TabEmptyState.types.cjs +3 -0
  228. package/dist/components/TabEmptyState/TabEmptyState.types.cjs.map +1 -0
  229. package/dist/components/TabEmptyState/TabEmptyState.types.d.cts +45 -0
  230. package/dist/components/TabEmptyState/TabEmptyState.types.d.cts.map +1 -0
  231. package/dist/components/TabEmptyState/TabEmptyState.types.d.mts +45 -0
  232. package/dist/components/TabEmptyState/TabEmptyState.types.d.mts.map +1 -0
  233. package/dist/components/TabEmptyState/TabEmptyState.types.mjs +2 -0
  234. package/dist/components/TabEmptyState/TabEmptyState.types.mjs.map +1 -0
  235. package/dist/components/TabEmptyState/index.cjs +6 -0
  236. package/dist/components/TabEmptyState/index.cjs.map +1 -0
  237. package/dist/components/TabEmptyState/index.d.cts +3 -0
  238. package/dist/components/TabEmptyState/index.d.cts.map +1 -0
  239. package/dist/components/TabEmptyState/index.d.mts +3 -0
  240. package/dist/components/TabEmptyState/index.d.mts.map +1 -0
  241. package/dist/components/TabEmptyState/index.mjs +2 -0
  242. package/dist/components/TabEmptyState/index.mjs.map +1 -0
  243. package/dist/components/Toast/Toast.cjs +3 -2
  244. package/dist/components/Toast/Toast.cjs.map +1 -1
  245. package/dist/components/Toast/Toast.d.cts.map +1 -1
  246. package/dist/components/Toast/Toast.d.mts.map +1 -1
  247. package/dist/components/Toast/Toast.mjs +4 -3
  248. package/dist/components/Toast/Toast.mjs.map +1 -1
  249. package/dist/components/Toast/Toast.types.cjs +5 -5
  250. package/dist/components/Toast/Toast.types.cjs.map +1 -1
  251. package/dist/components/Toast/Toast.types.d.cts +5 -4
  252. package/dist/components/Toast/Toast.types.d.cts.map +1 -1
  253. package/dist/components/Toast/Toast.types.d.mts +5 -4
  254. package/dist/components/Toast/Toast.types.d.mts.map +1 -1
  255. package/dist/components/Toast/Toast.types.mjs +4 -4
  256. package/dist/components/Toast/Toast.types.mjs.map +1 -1
  257. package/dist/components/Toast/index.cjs +2 -2
  258. package/dist/components/Toast/index.cjs.map +1 -1
  259. package/dist/components/Toast/index.d.cts +1 -1
  260. package/dist/components/Toast/index.d.cts.map +1 -1
  261. package/dist/components/Toast/index.d.mts +1 -1
  262. package/dist/components/Toast/index.d.mts.map +1 -1
  263. package/dist/components/Toast/index.mjs +1 -1
  264. package/dist/components/Toast/index.mjs.map +1 -1
  265. package/dist/components/index.cjs +31 -2
  266. package/dist/components/index.cjs.map +1 -1
  267. package/dist/components/index.d.cts +24 -4
  268. package/dist/components/index.d.cts.map +1 -1
  269. package/dist/components/index.d.mts +24 -4
  270. package/dist/components/index.d.mts.map +1 -1
  271. package/dist/components/index.mjs +12 -2
  272. package/dist/components/index.mjs.map +1 -1
  273. package/dist/types/index.cjs +10 -1
  274. package/dist/types/index.cjs.map +1 -1
  275. package/dist/types/index.d.cts +8 -0
  276. package/dist/types/index.d.cts.map +1 -1
  277. package/dist/types/index.d.mts +8 -0
  278. package/dist/types/index.d.mts.map +1 -1
  279. package/dist/types/index.mjs +9 -0
  280. package/dist/types/index.mjs.map +1 -1
  281. package/package.json +5 -4
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ import type { BottomSheetRef } from "./BottomSheet.types.cjs";
3
+ export declare const BottomSheet: React.ForwardRefExoticComponent<{
4
+ shouldNavigateBack?: boolean | undefined;
5
+ goBack: () => void;
6
+ keyboardAvoidingViewEnabled?: boolean | undefined;
7
+ } & {
8
+ children?: React.ReactNode;
9
+ isFullscreen?: boolean | undefined;
10
+ isInteractable?: boolean | undefined;
11
+ keyboardAvoidingViewEnabled?: boolean | undefined;
12
+ onClose?: ((hasPendingAction?: boolean | undefined) => void) | undefined;
13
+ onOpen?: ((hasPendingAction?: boolean | undefined) => void) | undefined;
14
+ twClassName?: string | undefined;
15
+ } & import("react-native").ViewProps & React.RefAttributes<BottomSheetRef>>;
16
+ //# sourceMappingURL=BottomSheet.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomSheet.d.cts","sourceRoot":"","sources":["../../../src/components/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":"AACA,OAAO,KAMN,cAAc;AAWf,OAAO,KAAK,EAGV,cAAc,EACf,gCAA4B;AAE7B,eAAO,MAAM,WAAW;;;;;;;;;;;;2EAuHvB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ import type { BottomSheetRef } from "./BottomSheet.types.mjs";
3
+ export declare const BottomSheet: React.ForwardRefExoticComponent<{
4
+ shouldNavigateBack?: boolean | undefined;
5
+ goBack: () => void;
6
+ keyboardAvoidingViewEnabled?: boolean | undefined;
7
+ } & {
8
+ children?: React.ReactNode;
9
+ isFullscreen?: boolean | undefined;
10
+ isInteractable?: boolean | undefined;
11
+ keyboardAvoidingViewEnabled?: boolean | undefined;
12
+ onClose?: ((hasPendingAction?: boolean | undefined) => void) | undefined;
13
+ onOpen?: ((hasPendingAction?: boolean | undefined) => void) | undefined;
14
+ twClassName?: string | undefined;
15
+ } & import("react-native").ViewProps & React.RefAttributes<BottomSheetRef>>;
16
+ //# sourceMappingURL=BottomSheet.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomSheet.d.mts","sourceRoot":"","sources":["../../../src/components/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":"AACA,OAAO,KAMN,cAAc;AAWf,OAAO,KAAK,EAGV,cAAc,EACf,gCAA4B;AAE7B,eAAO,MAAM,WAAW;;;;;;;;;;;;2EAuHvB,CAAC"}
@@ -0,0 +1,87 @@
1
+ function $importDefault(module) {
2
+ if (module?.__esModule) {
3
+ return module.default;
4
+ }
5
+ return module;
6
+ }
7
+ import { useTailwind } from "@metamask-previews/design-system-twrnc-preset";
8
+ import $React, { forwardRef, useCallback, useEffect, useImperativeHandle, useRef } from "react";
9
+ const React = $importDefault($React);
10
+ import { BackHandler, KeyboardAvoidingView, Platform } from "react-native/index.js";
11
+ import { useSafeAreaFrame, useSafeAreaInsets } from "react-native-safe-area-context";
12
+ import BottomSheetDialog from "../BottomSheetDialog/index.mjs";
13
+ import { BottomSheetOverlay } from "../BottomSheetOverlay/BottomSheetOverlay.mjs";
14
+ export const BottomSheet = forwardRef(({ children, onClose, onOpen, goBack, style, twClassName, isInteractable = true, shouldNavigateBack = true, isFullscreen = false, keyboardAvoidingViewEnabled = true, ...props }, ref) => {
15
+ const tw = useTailwind();
16
+ const { bottom: screenBottomPadding } = useSafeAreaInsets();
17
+ const { y: frameY } = useSafeAreaFrame();
18
+ const postCallback = useRef();
19
+ const bottomSheetDialogRef = useRef(null);
20
+ const didNavigateBackRef = useRef(false);
21
+ const closeRequestedRef = useRef(false);
22
+ const didRunPostCallbackRef = useRef(false);
23
+ const onOpenCB = useCallback(() => {
24
+ // Reset when the sheet is opened again.
25
+ didNavigateBackRef.current = false;
26
+ closeRequestedRef.current = false;
27
+ didRunPostCallbackRef.current = false;
28
+ onOpen?.(Boolean(postCallback.current));
29
+ const callback = postCallback.current;
30
+ postCallback.current = undefined;
31
+ callback?.();
32
+ }, [onOpen]);
33
+ const onCloseCB = useCallback(() => {
34
+ if (shouldNavigateBack && !didNavigateBackRef.current) {
35
+ didNavigateBackRef.current = true;
36
+ goBack();
37
+ }
38
+ const callback = postCallback.current;
39
+ const hasCallback = Boolean(callback);
40
+ onClose?.(hasCallback);
41
+ if (!didRunPostCallbackRef.current && hasCallback) {
42
+ didRunPostCallbackRef.current = true;
43
+ postCallback.current = undefined;
44
+ callback?.();
45
+ }
46
+ }, [goBack, onClose, shouldNavigateBack]);
47
+ // Dismiss the sheet when Android back button is pressed.
48
+ useEffect(() => {
49
+ const hardwareBackPress = () => {
50
+ if (isInteractable) {
51
+ bottomSheetDialogRef.current?.onCloseDialog();
52
+ }
53
+ return true;
54
+ };
55
+ BackHandler.addEventListener('hardwareBackPress', hardwareBackPress);
56
+ return () => {
57
+ BackHandler.removeEventListener('hardwareBackPress', hardwareBackPress);
58
+ };
59
+ }, [isInteractable]);
60
+ useImperativeHandle(ref, () => ({
61
+ onCloseBottomSheet: (callback) => {
62
+ if (closeRequestedRef.current) {
63
+ return;
64
+ }
65
+ closeRequestedRef.current = true;
66
+ postCallback.current = callback;
67
+ bottomSheetDialogRef.current?.onCloseDialog();
68
+ },
69
+ onOpenBottomSheet: (callback) => {
70
+ didNavigateBackRef.current = false;
71
+ closeRequestedRef.current = false;
72
+ didRunPostCallbackRef.current = false;
73
+ postCallback.current = callback;
74
+ bottomSheetDialogRef.current?.onOpenDialog();
75
+ },
76
+ }));
77
+ return (<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'padding' : undefined} keyboardVerticalOffset={Platform.OS === 'ios' ? -screenBottomPadding : frameY} style={[tw.style('absolute inset-0 justify-end'), style]} enabled={keyboardAvoidingViewEnabled} {...props}>
78
+ <BottomSheetOverlay onPress={isInteractable
79
+ ? () => bottomSheetDialogRef.current?.onCloseDialog()
80
+ : undefined}/>
81
+ <BottomSheetDialog isInteractable={isInteractable} onClose={onCloseCB} onOpen={onOpenCB} ref={bottomSheetDialogRef} isFullscreen={isFullscreen} twClassName={twClassName} keyboardAvoidingViewEnabled={keyboardAvoidingViewEnabled}>
82
+ {children}
83
+ </BottomSheetDialog>
84
+ </KeyboardAvoidingView>);
85
+ });
86
+ BottomSheet.displayName = 'BottomSheet';
87
+ //# sourceMappingURL=BottomSheet.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomSheet.mjs","sourceRoot":"","sources":["../../../src/components/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,QAAO,EACZ,UAAU,EACV,WAAW,EACX,SAAS,EACT,mBAAmB,EACnB,MAAM,EACP,cAAc;;AACf,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,QAAQ,EAAE,8BAAqB;AAC3E,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EAClB,uCAAuC;AAExC,OAAO,iBAAiB,uCAA6B;AAErD,OAAO,EAAE,kBAAkB,EAAE,qDAAiD;AAQ9E,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CACnC,CACE,EACE,QAAQ,EACR,OAAO,EACP,MAAM,EACN,MAAM,EACN,KAAK,EACL,WAAW,EACX,cAAc,GAAG,IAAI,EACrB,kBAAkB,GAAG,IAAI,EACzB,YAAY,GAAG,KAAK,EACpB,2BAA2B,GAAG,IAAI,EAClC,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,MAAM,EAAE,MAAM,EAAE,mBAAmB,EAAE,GAAG,iBAAiB,EAAE,CAAC;IAC5D,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,gBAAgB,EAAE,CAAC;IACz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C,CAAC,SAAS,CAAC,CACxD,sBAAsB,CAAC,CACrB,QAAQ,CAAC,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,MAAM,CACtD,CACD,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,8BAA8B,CAAC,EAAE,KAAK,CAAC,CAAC,CACzD,OAAO,CAAC,CAAC,2BAA2B,CAAC,CACrC,IAAI,KAAK,CAAC,CAEV;QAAA,CAAC,kBAAkB,CACjB,OAAO,CAAC,CACN,cAAc;YACZ,CAAC,CAAC,GAAG,EAAE,CAAC,oBAAoB,CAAC,OAAO,EAAE,aAAa,EAAE;YACrD,CAAC,CAAC,SAAS,CACd,EAEH;QAAA,CAAC,iBAAiB,CAChB,cAAc,CAAC,CAAC,cAAc,CAAC,CAC/B,OAAO,CAAC,CAAC,SAAS,CAAC,CACnB,MAAM,CAAC,CAAC,QAAQ,CAAC,CACjB,GAAG,CAAC,CAAC,oBAAoB,CAAC,CAC1B,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,2BAA2B,CAAC,CAAC,2BAA2B,CAAC,CAEzD;UAAA,CAAC,QAAQ,CACX;QAAA,EAAE,iBAAiB,CACrB;MAAA,EAAE,oBAAoB,CAAC,CACxB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, {\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useRef,\n} from 'react';\nimport { BackHandler, KeyboardAvoidingView, Platform } from 'react-native';\nimport {\n useSafeAreaFrame,\n useSafeAreaInsets,\n} from 'react-native-safe-area-context';\n\nimport BottomSheetDialog from '../BottomSheetDialog';\nimport type { BottomSheetDialogRef } from '../BottomSheetDialog';\nimport { BottomSheetOverlay } from '../BottomSheetOverlay/BottomSheetOverlay';\n\nimport type {\n BottomSheetPostCallback,\n BottomSheetProps,\n BottomSheetRef,\n} from './BottomSheet.types';\n\nexport const BottomSheet = forwardRef<BottomSheetRef, BottomSheetProps>(\n (\n {\n children,\n onClose,\n onOpen,\n goBack,\n style,\n twClassName,\n isInteractable = true,\n shouldNavigateBack = true,\n isFullscreen = false,\n keyboardAvoidingViewEnabled = true,\n ...props\n },\n ref,\n ) => {\n const tw = useTailwind();\n const { bottom: screenBottomPadding } = useSafeAreaInsets();\n const { y: frameY } = useSafeAreaFrame();\n const postCallback = useRef<BottomSheetPostCallback>();\n const bottomSheetDialogRef = useRef<BottomSheetDialogRef>(null);\n const didNavigateBackRef = useRef(false);\n const closeRequestedRef = useRef(false);\n const didRunPostCallbackRef = useRef(false);\n\n const onOpenCB = useCallback(() => {\n // Reset when the sheet is opened again.\n didNavigateBackRef.current = false;\n closeRequestedRef.current = false;\n didRunPostCallbackRef.current = false;\n\n onOpen?.(Boolean(postCallback.current));\n const callback = postCallback.current;\n postCallback.current = undefined;\n callback?.();\n }, [onOpen]);\n\n const onCloseCB = useCallback(() => {\n if (shouldNavigateBack && !didNavigateBackRef.current) {\n didNavigateBackRef.current = true;\n goBack();\n }\n\n const callback = postCallback.current;\n const hasCallback = Boolean(callback);\n\n onClose?.(hasCallback);\n\n if (!didRunPostCallbackRef.current && hasCallback) {\n didRunPostCallbackRef.current = true;\n postCallback.current = undefined;\n callback?.();\n }\n }, [goBack, onClose, shouldNavigateBack]);\n\n // Dismiss the sheet when Android back button is pressed.\n useEffect(() => {\n const hardwareBackPress = () => {\n if (isInteractable) {\n bottomSheetDialogRef.current?.onCloseDialog();\n }\n return true;\n };\n BackHandler.addEventListener('hardwareBackPress', hardwareBackPress);\n return () => {\n BackHandler.removeEventListener('hardwareBackPress', hardwareBackPress);\n };\n }, [isInteractable]);\n\n useImperativeHandle(ref, () => ({\n onCloseBottomSheet: (callback) => {\n if (closeRequestedRef.current) {\n return;\n }\n closeRequestedRef.current = true;\n postCallback.current = callback;\n bottomSheetDialogRef.current?.onCloseDialog();\n },\n onOpenBottomSheet: (callback) => {\n didNavigateBackRef.current = false;\n closeRequestedRef.current = false;\n didRunPostCallbackRef.current = false;\n postCallback.current = callback;\n bottomSheetDialogRef.current?.onOpenDialog();\n },\n }));\n\n return (\n <KeyboardAvoidingView\n behavior={Platform.OS === 'ios' ? 'padding' : undefined}\n keyboardVerticalOffset={\n Platform.OS === 'ios' ? -screenBottomPadding : frameY\n }\n style={[tw.style('absolute inset-0 justify-end'), style]}\n enabled={keyboardAvoidingViewEnabled}\n {...props}\n >\n <BottomSheetOverlay\n onPress={\n isInteractable\n ? () => bottomSheetDialogRef.current?.onCloseDialog()\n : undefined\n }\n />\n <BottomSheetDialog\n isInteractable={isInteractable}\n onClose={onCloseCB}\n onOpen={onOpenCB}\n ref={bottomSheetDialogRef}\n isFullscreen={isFullscreen}\n twClassName={twClassName}\n keyboardAvoidingViewEnabled={keyboardAvoidingViewEnabled}\n >\n {children}\n </BottomSheetDialog>\n </KeyboardAvoidingView>\n );\n },\n);\n\nBottomSheet.displayName = 'BottomSheet';\n"]}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=BottomSheet.types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomSheet.types.cjs","sourceRoot":"","sources":["../../../src/components/BottomSheet/BottomSheet.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BottomSheetDialogProps } from '../BottomSheetDialog/BottomSheetDialog.types';\n\n/**\n * BottomSheet component props.\n */\nexport type BottomSheetProps = {\n /**\n * Optional boolean that indicates if sheet is unmounted from the stack or not when closed.\n *\n * @default true\n */\n shouldNavigateBack?: boolean;\n\n /**\n * Callback invoked to navigate back when shouldNavigateBack is true and the sheet closes.\n */\n goBack: () => void;\n\n /**\n * Optional boolean that indicates if the KeyboardAvoidingView is enabled.\n *\n * @default true\n */\n keyboardAvoidingViewEnabled?: boolean;\n} & BottomSheetDialogProps;\n\nexport type BottomSheetPostCallback = () => void;\n\nexport type BottomSheetRef = {\n onOpenBottomSheet: (callback?: BottomSheetPostCallback) => void;\n onCloseBottomSheet: (callback?: BottomSheetPostCallback) => void;\n};\n"]}
@@ -0,0 +1,28 @@
1
+ import type { BottomSheetDialogProps } from "../BottomSheetDialog/BottomSheetDialog.types.cjs";
2
+ /**
3
+ * BottomSheet component props.
4
+ */
5
+ export type BottomSheetProps = {
6
+ /**
7
+ * Optional boolean that indicates if sheet is unmounted from the stack or not when closed.
8
+ *
9
+ * @default true
10
+ */
11
+ shouldNavigateBack?: boolean;
12
+ /**
13
+ * Callback invoked to navigate back when shouldNavigateBack is true and the sheet closes.
14
+ */
15
+ goBack: () => void;
16
+ /**
17
+ * Optional boolean that indicates if the KeyboardAvoidingView is enabled.
18
+ *
19
+ * @default true
20
+ */
21
+ keyboardAvoidingViewEnabled?: boolean;
22
+ } & BottomSheetDialogProps;
23
+ export type BottomSheetPostCallback = () => void;
24
+ export type BottomSheetRef = {
25
+ onOpenBottomSheet: (callback?: BottomSheetPostCallback) => void;
26
+ onCloseBottomSheet: (callback?: BottomSheetPostCallback) => void;
27
+ };
28
+ //# sourceMappingURL=BottomSheet.types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomSheet.types.d.cts","sourceRoot":"","sources":["../../../src/components/BottomSheet/BottomSheet.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,yDAAqD;AAE3F;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;OAEG;IACH,MAAM,EAAE,MAAM,IAAI,CAAC;IAEnB;;;;OAIG;IACH,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC,GAAG,sBAAsB,CAAC;AAE3B,MAAM,MAAM,uBAAuB,GAAG,MAAM,IAAI,CAAC;AAEjD,MAAM,MAAM,cAAc,GAAG;IAC3B,iBAAiB,EAAE,CAAC,QAAQ,CAAC,EAAE,uBAAuB,KAAK,IAAI,CAAC;IAChE,kBAAkB,EAAE,CAAC,QAAQ,CAAC,EAAE,uBAAuB,KAAK,IAAI,CAAC;CAClE,CAAC"}
@@ -0,0 +1,28 @@
1
+ import type { BottomSheetDialogProps } from "../BottomSheetDialog/BottomSheetDialog.types.mjs";
2
+ /**
3
+ * BottomSheet component props.
4
+ */
5
+ export type BottomSheetProps = {
6
+ /**
7
+ * Optional boolean that indicates if sheet is unmounted from the stack or not when closed.
8
+ *
9
+ * @default true
10
+ */
11
+ shouldNavigateBack?: boolean;
12
+ /**
13
+ * Callback invoked to navigate back when shouldNavigateBack is true and the sheet closes.
14
+ */
15
+ goBack: () => void;
16
+ /**
17
+ * Optional boolean that indicates if the KeyboardAvoidingView is enabled.
18
+ *
19
+ * @default true
20
+ */
21
+ keyboardAvoidingViewEnabled?: boolean;
22
+ } & BottomSheetDialogProps;
23
+ export type BottomSheetPostCallback = () => void;
24
+ export type BottomSheetRef = {
25
+ onOpenBottomSheet: (callback?: BottomSheetPostCallback) => void;
26
+ onCloseBottomSheet: (callback?: BottomSheetPostCallback) => void;
27
+ };
28
+ //# sourceMappingURL=BottomSheet.types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomSheet.types.d.mts","sourceRoot":"","sources":["../../../src/components/BottomSheet/BottomSheet.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,yDAAqD;AAE3F;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;OAEG;IACH,MAAM,EAAE,MAAM,IAAI,CAAC;IAEnB;;;;OAIG;IACH,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC,GAAG,sBAAsB,CAAC;AAE3B,MAAM,MAAM,uBAAuB,GAAG,MAAM,IAAI,CAAC;AAEjD,MAAM,MAAM,cAAc,GAAG;IAC3B,iBAAiB,EAAE,CAAC,QAAQ,CAAC,EAAE,uBAAuB,KAAK,IAAI,CAAC;IAChE,kBAAkB,EAAE,CAAC,QAAQ,CAAC,EAAE,uBAAuB,KAAK,IAAI,CAAC;CAClE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=BottomSheet.types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomSheet.types.mjs","sourceRoot":"","sources":["../../../src/components/BottomSheet/BottomSheet.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BottomSheetDialogProps } from '../BottomSheetDialog/BottomSheetDialog.types';\n\n/**\n * BottomSheet component props.\n */\nexport type BottomSheetProps = {\n /**\n * Optional boolean that indicates if sheet is unmounted from the stack or not when closed.\n *\n * @default true\n */\n shouldNavigateBack?: boolean;\n\n /**\n * Callback invoked to navigate back when shouldNavigateBack is true and the sheet closes.\n */\n goBack: () => void;\n\n /**\n * Optional boolean that indicates if the KeyboardAvoidingView is enabled.\n *\n * @default true\n */\n keyboardAvoidingViewEnabled?: boolean;\n} & BottomSheetDialogProps;\n\nexport type BottomSheetPostCallback = () => void;\n\nexport type BottomSheetRef = {\n onOpenBottomSheet: (callback?: BottomSheetPostCallback) => void;\n onCloseBottomSheet: (callback?: BottomSheetPostCallback) => void;\n};\n"]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BottomSheet = void 0;
4
+ var BottomSheet_1 = require("./BottomSheet.cjs");
5
+ Object.defineProperty(exports, "BottomSheet", { enumerable: true, get: function () { return BottomSheet_1.BottomSheet; } });
6
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/BottomSheet/index.ts"],"names":[],"mappings":";;;AAAA,iDAA4C;AAAnC,0GAAA,WAAW,OAAA","sourcesContent":["export { BottomSheet } from './BottomSheet';\nexport type {\n BottomSheetProps,\n BottomSheetRef,\n BottomSheetPostCallback,\n} from './BottomSheet.types';\n"]}
@@ -0,0 +1,3 @@
1
+ export { BottomSheet } from "./BottomSheet.cjs";
2
+ export type { BottomSheetProps, BottomSheetRef, BottomSheetPostCallback, } from "./BottomSheet.types.cjs";
3
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/BottomSheet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,0BAAsB;AAC5C,YAAY,EACV,gBAAgB,EAChB,cAAc,EACd,uBAAuB,GACxB,gCAA4B"}
@@ -0,0 +1,3 @@
1
+ export { BottomSheet } from "./BottomSheet.mjs";
2
+ export type { BottomSheetProps, BottomSheetRef, BottomSheetPostCallback, } from "./BottomSheet.types.mjs";
3
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/BottomSheet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,0BAAsB;AAC5C,YAAY,EACV,gBAAgB,EAChB,cAAc,EACd,uBAAuB,GACxB,gCAA4B"}
@@ -0,0 +1,2 @@
1
+ export { BottomSheet } from "./BottomSheet.mjs";
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/BottomSheet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,0BAAsB","sourcesContent":["export { BottomSheet } from './BottomSheet';\nexport type {\n BottomSheetProps,\n BottomSheetRef,\n BottomSheetPostCallback,\n} from './BottomSheet.types';\n"]}
@@ -0,0 +1,207 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ const design_system_twrnc_preset_1 = require("@metamask-previews/design-system-twrnc-preset");
27
+ const design_tokens_1 = require("@metamask-previews/design-tokens");
28
+ const lodash_1 = require("lodash");
29
+ const react_1 = __importStar(require("react"));
30
+ const react_native_1 = require("react-native/index.js");
31
+ const react_native_gesture_handler_1 = require("react-native-gesture-handler");
32
+ // eslint-disable-next-line import-x/default
33
+ const react_native_reanimated_1 = __importStar(require("react-native-reanimated"));
34
+ const react_native_safe_area_context_1 = require("react-native-safe-area-context");
35
+ // Internal dependencies.
36
+ const BottomSheetDialog_constants_1 = require("./BottomSheetDialog.constants.cjs");
37
+ const BottomSheetDialog = (0, react_1.forwardRef)(({ children, isFullscreen = false, isInteractable = true, keyboardAvoidingViewEnabled = true, onClose, onOpen, style, twClassName, ...props }, ref) => {
38
+ const tw = (0, design_system_twrnc_preset_1.useTailwind)();
39
+ const currentTheme = (0, design_system_twrnc_preset_1.useTheme)();
40
+ const shadowLg = currentTheme === design_system_twrnc_preset_1.Theme.Light
41
+ ? design_tokens_1.lightTheme.shadows.size.lg
42
+ : design_tokens_1.darkTheme.shadows.size.lg;
43
+ const { top: screenTopPadding, bottom: screenBottomPadding } = (0, react_native_safe_area_context_1.useSafeAreaInsets)();
44
+ const { y: frameY, height: screenHeight } = (0, react_native_safe_area_context_1.useSafeAreaFrame)();
45
+ const maxSheetHeight = screenHeight - screenTopPadding;
46
+ // X and Y values start on top left of the DIALOG
47
+ // currentYOffset will be used to animate the Y position of the Dialog
48
+ const currentYOffset = (0, react_native_reanimated_1.useSharedValue)(screenHeight);
49
+ const topOfDialogYValue = (0, react_native_reanimated_1.useSharedValue)(0);
50
+ const bottomOfDialogYValue = (0, react_native_reanimated_1.useSharedValue)(screenHeight);
51
+ const isMounted = (0, react_1.useRef)(false);
52
+ const onOpenCB = (0, react_1.useCallback)(() => {
53
+ onOpen?.();
54
+ }, [onOpen]);
55
+ const onCloseCB = (0, react_1.useCallback)(() => {
56
+ onClose?.();
57
+ }, [onClose]);
58
+ const onCloseDialog = (0, react_1.useCallback)((callback) => {
59
+ currentYOffset.value = (0, react_native_reanimated_1.withTiming)(bottomOfDialogYValue.value, { duration: BottomSheetDialog_constants_1.DEFAULT_BOTTOMSHEETDIALOG_DISPLAY_DURATION }, () => {
60
+ (0, react_native_reanimated_1.runOnJS)(onCloseCB)();
61
+ if (callback) {
62
+ (0, react_native_reanimated_1.runOnJS)(callback)();
63
+ }
64
+ });
65
+ // Ref values do not affect deps.
66
+ }, [onCloseCB]);
67
+ const gestureHandler = (0, react_native_reanimated_1.useAnimatedGestureHandler)({
68
+ onStart: (_, ctx) => {
69
+ // Starts tracking vertical position of gesture
70
+ ctx.startY = currentYOffset.value;
71
+ },
72
+ onActive: (event, ctx) => {
73
+ const { translationY } = event;
74
+ currentYOffset.value = ctx.startY + translationY;
75
+ // If gesture Y value goes above the bottom of Dialog Y value(bottom of dialog),
76
+ // which means the gesture is currently below the bottom of the dialog,
77
+ // sets it to bottom of Dialog Y value
78
+ if (currentYOffset.value >= bottomOfDialogYValue.value) {
79
+ currentYOffset.value = bottomOfDialogYValue.value;
80
+ }
81
+ // If gesture Y value goes below the top of Dialog Y value(top of dialog),
82
+ // which means the gesture is currently above the top of the dialog,
83
+ // sets it to top of Dialog Y value
84
+ if (currentYOffset.value <= topOfDialogYValue.value) {
85
+ currentYOffset.value = topOfDialogYValue.value;
86
+ }
87
+ },
88
+ onEnd: (event, ctx) => {
89
+ const { translationY, velocityY } = event;
90
+ // finalYOffset is used to animate the Y position of the Dialog after the gesture event
91
+ let finalYOffset;
92
+ // Measuring dismissing swipe action
93
+ const latestOffset = ctx.startY + translationY;
94
+ // Check if the swipe distance reach the dismiss offset threshold,
95
+ // which is currently 60% of sheet height
96
+ const hasReachedDismissOffset = latestOffset >
97
+ bottomOfDialogYValue.value *
98
+ BottomSheetDialog_constants_1.DEFAULT_BOTTOMSHEETDIALOG_DISMISSTHRESHOLD;
99
+ // Check if the gesture's vertical speed has reached the threshold to determine a swipe action
100
+ const hasReachedSwipeThreshold = Math.abs(velocityY) >
101
+ BottomSheetDialog_constants_1.DEFAULT_BOTTOMSHEETDIALOG_SWIPETHRESHOLD_DURATION;
102
+ const isQuickDismissing = velocityY > 0;
103
+ // If user is swiping
104
+ if (hasReachedSwipeThreshold) {
105
+ // Quick swipe takes priority
106
+ if (isQuickDismissing) {
107
+ finalYOffset = bottomOfDialogYValue.value;
108
+ }
109
+ else {
110
+ finalYOffset = topOfDialogYValue.value;
111
+ }
112
+ }
113
+ else if (hasReachedDismissOffset) {
114
+ finalYOffset = bottomOfDialogYValue.value;
115
+ }
116
+ else {
117
+ finalYOffset = topOfDialogYValue.value;
118
+ }
119
+ const isDismissed = finalYOffset === bottomOfDialogYValue.value;
120
+ if (isDismissed) {
121
+ (0, react_native_reanimated_1.runOnJS)(onCloseDialog)();
122
+ }
123
+ else {
124
+ // Only animate dialog to a certain Y position instead
125
+ currentYOffset.value = (0, react_native_reanimated_1.withTiming)(finalYOffset, {
126
+ duration: BottomSheetDialog_constants_1.DEFAULT_BOTTOMSHEETDIALOG_DISPLAY_DURATION,
127
+ });
128
+ }
129
+ },
130
+ });
131
+ // Animate in sheet on initial render.
132
+ const onOpenDialog = (callback) => {
133
+ // Starts setting the Y position of the dialog to the bottom of the dialog
134
+ currentYOffset.value = bottomOfDialogYValue.value;
135
+ // Animate the Y position to the top of the dialog, then call onOpenCB
136
+ currentYOffset.value = (0, react_native_reanimated_1.withTiming)(topOfDialogYValue.value, {
137
+ duration: BottomSheetDialog_constants_1.DEFAULT_BOTTOMSHEETDIALOG_DISPLAY_DURATION,
138
+ }, () => {
139
+ (0, react_native_reanimated_1.runOnJS)(onOpenCB)();
140
+ if (callback) {
141
+ (0, react_native_reanimated_1.runOnJS)(callback)();
142
+ }
143
+ });
144
+ };
145
+ const onDebouncedCloseDialog = (0, react_1.useMemo)(
146
+ // Prevent hide from being called multiple times. Potentially caused by taps in quick succession.
147
+ () => (0, lodash_1.debounce)(onCloseDialog, 2000, { leading: true }), [onCloseDialog]);
148
+ (0, react_1.useEffect)(() =>
149
+ // Automatically handles animation when content changes
150
+ // Disable for now since network switches causes the screen to hang with this on.
151
+ // LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
152
+ onDebouncedCloseDialog.cancel(), [children, onDebouncedCloseDialog]);
153
+ const updateSheetHeight = (e) => {
154
+ const { height } = e.nativeEvent.layout;
155
+ bottomOfDialogYValue.value = height;
156
+ if (!isMounted.current) {
157
+ isMounted.current = true;
158
+ onOpenDialog();
159
+ }
160
+ };
161
+ const animatedSheetStyle = (0, react_native_reanimated_1.useAnimatedStyle)(() => ({
162
+ transform: [
163
+ {
164
+ translateY: currentYOffset.value,
165
+ },
166
+ ],
167
+ }));
168
+ const sheetStyle = (0, react_1.useMemo)(() => [
169
+ tw.style('bg-default rounded-t-3xl overflow-hidden border border-muted', twClassName),
170
+ {
171
+ maxHeight: maxSheetHeight,
172
+ paddingBottom: react_native_1.Platform.select({
173
+ ios: screenBottomPadding,
174
+ macos: screenBottomPadding,
175
+ default: screenBottomPadding + 16,
176
+ }),
177
+ ...(isFullscreen && { height: maxSheetHeight }),
178
+ ...shadowLg,
179
+ },
180
+ style,
181
+ ], [
182
+ tw,
183
+ maxSheetHeight,
184
+ screenBottomPadding,
185
+ isFullscreen,
186
+ shadowLg,
187
+ style,
188
+ twClassName,
189
+ ]);
190
+ const combinedSheetStyle = (0, react_1.useMemo)(() => [...sheetStyle, animatedSheetStyle], [sheetStyle]);
191
+ (0, react_1.useImperativeHandle)(ref, () => ({
192
+ onOpenDialog,
193
+ onCloseDialog,
194
+ }));
195
+ return (<react_native_1.KeyboardAvoidingView style={tw.style('absolute bottom-0 inset-x-0')} behavior={react_native_1.Platform.OS === 'ios' ? 'padding' : undefined} keyboardVerticalOffset={react_native_1.Platform.OS === 'ios' ? -screenBottomPadding : frameY} enabled={keyboardAvoidingViewEnabled} {...props}>
196
+ <react_native_gesture_handler_1.PanGestureHandler enabled={isInteractable} onGestureEvent={gestureHandler}>
197
+ <react_native_reanimated_1.default.View onLayout={updateSheetHeight} style={combinedSheetStyle}>
198
+ {isInteractable && (<react_native_1.View style={tw.style('self-stretch items-center p-1')}>
199
+ <react_native_1.View style={tw.style('h-1 w-10 rounded-sm bg-border-muted')}/>
200
+ </react_native_1.View>)}
201
+ {children}
202
+ </react_native_reanimated_1.default.View>
203
+ </react_native_gesture_handler_1.PanGestureHandler>
204
+ </react_native_1.KeyboardAvoidingView>);
205
+ });
206
+ exports.default = BottomSheetDialog;
207
+ //# sourceMappingURL=BottomSheetDialog.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomSheetDialog.cjs","sourceRoot":"","sources":["../../../src/components/BottomSheetDialog/BottomSheetDialog.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8FAIuD;AACvD,oEAAyE;AACzE,mCAAkC;AAClC,+CAOe;AACf,wDAKsB;AACtB,+EAGsC;AACtC,4CAA4C;AAC5C,mFAMiC;AACjC,mFAGwC;AAExC,yBAAyB;AACzB,mFAIuC;A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AC,iBAAiB,CAAC,CAC5B,KAAK,CAAC,CAAC,kBAAkB,CAAC,CAE1B;YAAA,CAAC,cAAc,IAAI,CACjB,CAAC,mBAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC,CACrD;gBAAA,CAAC,mBAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,qCAAqC,CAAC,CAAC,EAC/D;cAAA,EAAE,mBAAI,CAAC,CACR,CACD;YAAA,CAAC,QAAQ,CACX;UAAA,EAAE,iCAAQ,CAAC,IAAI,CACjB;QAAA,EAAE,gDAAiB,CACrB;MAAA,EAAE,mCAAoB,CAAC,CACxB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,kBAAe,iBAAiB,CAAC","sourcesContent":["import {\n Theme,\n useTailwind,\n useTheme,\n} from '@metamask-previews/design-system-twrnc-preset';\nimport { lightTheme, darkTheme } from '@metamask-previews/design-tokens';\nimport { debounce } from 'lodash';\nimport React, {\n forwardRef,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useImperativeHandle,\n} from 'react';\nimport {\n LayoutChangeEvent,\n View,\n Platform,\n KeyboardAvoidingView,\n} from 'react-native';\nimport {\n PanGestureHandler,\n PanGestureHandlerGestureEvent,\n} from 'react-native-gesture-handler';\n// eslint-disable-next-line import-x/default\nimport Animated, {\n runOnJS,\n useAnimatedGestureHandler,\n useAnimatedStyle,\n useSharedValue,\n withTiming,\n} from 'react-native-reanimated';\nimport {\n useSafeAreaFrame,\n useSafeAreaInsets,\n} from 'react-native-safe-area-context';\n\n// Internal dependencies.\nimport {\n DEFAULT_BOTTOMSHEETDIALOG_DISPLAY_DURATION,\n DEFAULT_BOTTOMSHEETDIALOG_DISMISSTHRESHOLD,\n DEFAULT_BOTTOMSHEETDIALOG_SWIPETHRESHOLD_DURATION,\n} from './BottomSheetDialog.constants';\nimport type {\n BottomSheetDialogRef,\n BottomSheetDialogProps,\n} from './BottomSheetDialog.types';\n\nconst BottomSheetDialog = forwardRef<\n BottomSheetDialogRef,\n BottomSheetDialogProps\n>(\n (\n {\n children,\n isFullscreen = false,\n isInteractable = true,\n keyboardAvoidingViewEnabled = true,\n onClose,\n onOpen,\n style,\n twClassName,\n ...props\n },\n ref,\n ) => {\n const tw = useTailwind();\n const currentTheme = useTheme();\n const shadowLg =\n currentTheme === Theme.Light\n ? lightTheme.shadows.size.lg\n : darkTheme.shadows.size.lg;\n\n const { top: screenTopPadding, bottom: screenBottomPadding } =\n useSafeAreaInsets();\n const { y: frameY, height: screenHeight } = useSafeAreaFrame();\n\n const maxSheetHeight = screenHeight - screenTopPadding;\n // X and Y values start on top left of the DIALOG\n // currentYOffset will be used to animate the Y position of the Dialog\n const currentYOffset = useSharedValue(screenHeight);\n const topOfDialogYValue = useSharedValue(0);\n const bottomOfDialogYValue = useSharedValue(screenHeight);\n const isMounted = useRef(false);\n\n const onOpenCB = useCallback(() => {\n onOpen?.();\n }, [onOpen]);\n const onCloseCB = useCallback(() => {\n onClose?.();\n }, [onClose]);\n\n const onCloseDialog = useCallback(\n (callback?: () => void) => {\n currentYOffset.value = withTiming(\n bottomOfDialogYValue.value,\n { duration: DEFAULT_BOTTOMSHEETDIALOG_DISPLAY_DURATION },\n () => {\n runOnJS(onCloseCB)();\n if (callback) {\n runOnJS(callback)();\n }\n },\n );\n // Ref values do not affect deps.\n },\n [onCloseCB],\n );\n\n const gestureHandler = useAnimatedGestureHandler<\n PanGestureHandlerGestureEvent,\n { startY: number }\n >({\n onStart: (_, ctx) => {\n // Starts tracking vertical position of gesture\n ctx.startY = currentYOffset.value;\n },\n onActive: (event, ctx) => {\n const { translationY } = event;\n currentYOffset.value = ctx.startY + translationY;\n // If gesture Y value goes above the bottom of Dialog Y value(bottom of dialog),\n // which means the gesture is currently below the bottom of the dialog,\n // sets it to bottom of Dialog Y value\n if (currentYOffset.value >= bottomOfDialogYValue.value) {\n currentYOffset.value = bottomOfDialogYValue.value;\n }\n // If gesture Y value goes below the top of Dialog Y value(top of dialog),\n // which means the gesture is currently above the top of the dialog,\n // sets it to top of Dialog Y value\n if (currentYOffset.value <= topOfDialogYValue.value) {\n currentYOffset.value = topOfDialogYValue.value;\n }\n },\n onEnd: (event, ctx) => {\n const { translationY, velocityY } = event;\n // finalYOffset is used to animate the Y position of the Dialog after the gesture event\n let finalYOffset: number;\n // Measuring dismissing swipe action\n const latestOffset = ctx.startY + translationY;\n // Check if the swipe distance reach the dismiss offset threshold,\n // which is currently 60% of sheet height\n const hasReachedDismissOffset =\n latestOffset >\n bottomOfDialogYValue.value *\n DEFAULT_BOTTOMSHEETDIALOG_DISMISSTHRESHOLD;\n // Check if the gesture's vertical speed has reached the threshold to determine a swipe action\n const hasReachedSwipeThreshold =\n Math.abs(velocityY) >\n DEFAULT_BOTTOMSHEETDIALOG_SWIPETHRESHOLD_DURATION;\n const isQuickDismissing = velocityY > 0;\n\n // If user is swiping\n if (hasReachedSwipeThreshold) {\n // Quick swipe takes priority\n if (isQuickDismissing) {\n finalYOffset = bottomOfDialogYValue.value;\n } else {\n finalYOffset = topOfDialogYValue.value;\n }\n } else if (hasReachedDismissOffset) {\n finalYOffset = bottomOfDialogYValue.value;\n } else {\n finalYOffset = topOfDialogYValue.value;\n }\n\n const isDismissed = finalYOffset === bottomOfDialogYValue.value;\n\n if (isDismissed) {\n runOnJS(onCloseDialog)();\n } else {\n // Only animate dialog to a certain Y position instead\n currentYOffset.value = withTiming(finalYOffset, {\n duration: DEFAULT_BOTTOMSHEETDIALOG_DISPLAY_DURATION,\n });\n }\n },\n });\n\n // Animate in sheet on initial render.\n const onOpenDialog = (callback?: () => void) => {\n // Starts setting the Y position of the dialog to the bottom of the dialog\n currentYOffset.value = bottomOfDialogYValue.value;\n // Animate the Y position to the top of the dialog, then call onOpenCB\n currentYOffset.value = withTiming(\n topOfDialogYValue.value,\n {\n duration: DEFAULT_BOTTOMSHEETDIALOG_DISPLAY_DURATION,\n },\n () => {\n runOnJS(onOpenCB)();\n if (callback) {\n runOnJS(callback)();\n }\n },\n );\n };\n\n const onDebouncedCloseDialog = useMemo(\n // Prevent hide from being called multiple times. Potentially caused by taps in quick succession.\n () => debounce(onCloseDialog, 2000, { leading: true }),\n [onCloseDialog],\n );\n\n useEffect(\n () =>\n // Automatically handles animation when content changes\n // Disable for now since network switches causes the screen to hang with this on.\n // LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);\n onDebouncedCloseDialog.cancel(),\n [children, onDebouncedCloseDialog],\n );\n\n const updateSheetHeight = (e: LayoutChangeEvent) => {\n const { height } = e.nativeEvent.layout;\n bottomOfDialogYValue.value = height;\n\n if (!isMounted.current) {\n isMounted.current = true;\n onOpenDialog();\n }\n };\n\n const animatedSheetStyle = useAnimatedStyle(() => ({\n transform: [\n {\n translateY: currentYOffset.value,\n },\n ],\n }));\n\n const sheetStyle = useMemo(\n () => [\n tw.style(\n 'bg-default rounded-t-3xl overflow-hidden border border-muted',\n twClassName,\n ),\n {\n maxHeight: maxSheetHeight,\n paddingBottom: Platform.select({\n ios: screenBottomPadding,\n macos: screenBottomPadding,\n default: screenBottomPadding + 16,\n }),\n ...(isFullscreen && { height: maxSheetHeight }),\n ...shadowLg,\n },\n style,\n ],\n\n [\n tw,\n maxSheetHeight,\n screenBottomPadding,\n isFullscreen,\n shadowLg,\n style,\n twClassName,\n ],\n );\n\n const combinedSheetStyle = useMemo(\n () => [...sheetStyle, animatedSheetStyle],\n\n [sheetStyle],\n );\n\n useImperativeHandle(ref, () => ({\n onOpenDialog,\n onCloseDialog,\n }));\n\n return (\n <KeyboardAvoidingView\n style={tw.style('absolute bottom-0 inset-x-0')}\n behavior={Platform.OS === 'ios' ? 'padding' : undefined}\n keyboardVerticalOffset={\n Platform.OS === 'ios' ? -screenBottomPadding : frameY\n }\n enabled={keyboardAvoidingViewEnabled}\n {...props}\n >\n <PanGestureHandler\n enabled={isInteractable}\n onGestureEvent={gestureHandler}\n >\n <Animated.View\n onLayout={updateSheetHeight}\n style={combinedSheetStyle}\n >\n {isInteractable && (\n <View style={tw.style('self-stretch items-center p-1')}>\n <View style={tw.style('h-1 w-10 rounded-sm bg-border-muted')} />\n </View>\n )}\n {children}\n </Animated.View>\n </PanGestureHandler>\n </KeyboardAvoidingView>\n );\n },\n);\n\nexport default BottomSheetDialog;\n"]}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DEFAULT_BOTTOMSHEETDIALOG_DISMISSTHRESHOLD = exports.DEFAULT_BOTTOMSHEETDIALOG_SWIPETHRESHOLD_DURATION = exports.DEFAULT_BOTTOMSHEETDIALOG_DISPLAY_DURATION = void 0;
4
+ const design_tokens_1 = require("@metamask-previews/design-tokens");
5
+ // Defaults
6
+ /**
7
+ * The animation duration used for initial render.
8
+ */
9
+ exports.DEFAULT_BOTTOMSHEETDIALOG_DISPLAY_DURATION = design_tokens_1.AnimationDuration.Fast;
10
+ /**
11
+ * This number represents the swipe speed to meet the velocity threshold.
12
+ */
13
+ exports.DEFAULT_BOTTOMSHEETDIALOG_SWIPETHRESHOLD_DURATION = design_tokens_1.AnimationDuration.Regularly;
14
+ /**
15
+ * This indicates that 60% of the sheet needs to be offscreen to meet the distance threshold.
16
+ */
17
+ exports.DEFAULT_BOTTOMSHEETDIALOG_DISMISSTHRESHOLD = 0.6;
18
+ //# sourceMappingURL=BottomSheetDialog.constants.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomSheetDialog.constants.cjs","sourceRoot":"","sources":["../../../src/components/BottomSheetDialog/BottomSheetDialog.constants.ts"],"names":[],"mappings":";;;AAAA,oEAAqE;AAErE,WAAW;AACX;;GAEG;AACU,QAAA,0CAA0C,GACrD,iCAAiB,CAAC,IAAI,CAAC;AACzB;;GAEG;AACU,QAAA,iDAAiD,GAC5D,iCAAiB,CAAC,SAAS,CAAC;AAC9B;;GAEG;AACU,QAAA,0CAA0C,GAAG,GAAG,CAAC","sourcesContent":["import { AnimationDuration } from '@metamask-previews/design-tokens';\n\n// Defaults\n/**\n * The animation duration used for initial render.\n */\nexport const DEFAULT_BOTTOMSHEETDIALOG_DISPLAY_DURATION =\n AnimationDuration.Fast;\n/**\n * This number represents the swipe speed to meet the velocity threshold.\n */\nexport const DEFAULT_BOTTOMSHEETDIALOG_SWIPETHRESHOLD_DURATION =\n AnimationDuration.Regularly;\n/**\n * This indicates that 60% of the sheet needs to be offscreen to meet the distance threshold.\n */\nexport const DEFAULT_BOTTOMSHEETDIALOG_DISMISSTHRESHOLD = 0.6;\n"]}
@@ -0,0 +1,14 @@
1
+ import { AnimationDuration } from "@metamask-previews/design-tokens";
2
+ /**
3
+ * The animation duration used for initial render.
4
+ */
5
+ export declare const DEFAULT_BOTTOMSHEETDIALOG_DISPLAY_DURATION = AnimationDuration.Fast;
6
+ /**
7
+ * This number represents the swipe speed to meet the velocity threshold.
8
+ */
9
+ export declare const DEFAULT_BOTTOMSHEETDIALOG_SWIPETHRESHOLD_DURATION = AnimationDuration.Regularly;
10
+ /**
11
+ * This indicates that 60% of the sheet needs to be offscreen to meet the distance threshold.
12
+ */
13
+ export declare const DEFAULT_BOTTOMSHEETDIALOG_DISMISSTHRESHOLD = 0.6;
14
+ //# sourceMappingURL=BottomSheetDialog.constants.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomSheetDialog.constants.d.cts","sourceRoot":"","sources":["../../../src/components/BottomSheetDialog/BottomSheetDialog.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,yCAAyC;AAGrE;;GAEG;AACH,eAAO,MAAM,0CAA0C,yBAC/B,CAAC;AACzB;;GAEG;AACH,eAAO,MAAM,iDAAiD,8BACjC,CAAC;AAC9B;;GAEG;AACH,eAAO,MAAM,0CAA0C,MAAM,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { AnimationDuration } from "@metamask-previews/design-tokens";
2
+ /**
3
+ * The animation duration used for initial render.
4
+ */
5
+ export declare const DEFAULT_BOTTOMSHEETDIALOG_DISPLAY_DURATION = AnimationDuration.Fast;
6
+ /**
7
+ * This number represents the swipe speed to meet the velocity threshold.
8
+ */
9
+ export declare const DEFAULT_BOTTOMSHEETDIALOG_SWIPETHRESHOLD_DURATION = AnimationDuration.Regularly;
10
+ /**
11
+ * This indicates that 60% of the sheet needs to be offscreen to meet the distance threshold.
12
+ */
13
+ export declare const DEFAULT_BOTTOMSHEETDIALOG_DISMISSTHRESHOLD = 0.6;
14
+ //# sourceMappingURL=BottomSheetDialog.constants.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomSheetDialog.constants.d.mts","sourceRoot":"","sources":["../../../src/components/BottomSheetDialog/BottomSheetDialog.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,yCAAyC;AAGrE;;GAEG;AACH,eAAO,MAAM,0CAA0C,yBAC/B,CAAC;AACzB;;GAEG;AACH,eAAO,MAAM,iDAAiD,8BACjC,CAAC;AAC9B;;GAEG;AACH,eAAO,MAAM,0CAA0C,MAAM,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { AnimationDuration } from "@metamask-previews/design-tokens";
2
+ // Defaults
3
+ /**
4
+ * The animation duration used for initial render.
5
+ */
6
+ export const DEFAULT_BOTTOMSHEETDIALOG_DISPLAY_DURATION = AnimationDuration.Fast;
7
+ /**
8
+ * This number represents the swipe speed to meet the velocity threshold.
9
+ */
10
+ export const DEFAULT_BOTTOMSHEETDIALOG_SWIPETHRESHOLD_DURATION = AnimationDuration.Regularly;
11
+ /**
12
+ * This indicates that 60% of the sheet needs to be offscreen to meet the distance threshold.
13
+ */
14
+ export const DEFAULT_BOTTOMSHEETDIALOG_DISMISSTHRESHOLD = 0.6;
15
+ //# sourceMappingURL=BottomSheetDialog.constants.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomSheetDialog.constants.mjs","sourceRoot":"","sources":["../../../src/components/BottomSheetDialog/BottomSheetDialog.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,yCAAyC;AAErE,WAAW;AACX;;GAEG;AACH,MAAM,CAAC,MAAM,0CAA0C,GACrD,iBAAiB,CAAC,IAAI,CAAC;AACzB;;GAEG;AACH,MAAM,CAAC,MAAM,iDAAiD,GAC5D,iBAAiB,CAAC,SAAS,CAAC;AAC9B;;GAEG;AACH,MAAM,CAAC,MAAM,0CAA0C,GAAG,GAAG,CAAC","sourcesContent":["import { AnimationDuration } from '@metamask-previews/design-tokens';\n\n// Defaults\n/**\n * The animation duration used for initial render.\n */\nexport const DEFAULT_BOTTOMSHEETDIALOG_DISPLAY_DURATION =\n AnimationDuration.Fast;\n/**\n * This number represents the swipe speed to meet the velocity threshold.\n */\nexport const DEFAULT_BOTTOMSHEETDIALOG_SWIPETHRESHOLD_DURATION =\n AnimationDuration.Regularly;\n/**\n * This indicates that 60% of the sheet needs to be offscreen to meet the distance threshold.\n */\nexport const DEFAULT_BOTTOMSHEETDIALOG_DISMISSTHRESHOLD = 0.6;\n"]}
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import type { BottomSheetDialogRef } from "./BottomSheetDialog.types.cjs";
3
+ declare const BottomSheetDialog: React.ForwardRefExoticComponent<{
4
+ children?: React.ReactNode;
5
+ isFullscreen?: boolean | undefined;
6
+ isInteractable?: boolean | undefined;
7
+ keyboardAvoidingViewEnabled?: boolean | undefined;
8
+ onClose?: ((hasPendingAction?: boolean | undefined) => void) | undefined;
9
+ onOpen?: ((hasPendingAction?: boolean | undefined) => void) | undefined;
10
+ twClassName?: string | undefined;
11
+ } & import("react-native").ViewProps & React.RefAttributes<BottomSheetDialogRef>>;
12
+ export default BottomSheetDialog;
13
+ //# sourceMappingURL=BottomSheetDialog.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomSheetDialog.d.cts","sourceRoot":"","sources":["../../../src/components/BottomSheetDialog/BottomSheetDialog.tsx"],"names":[],"mappings":"AAOA,OAAO,KAON,cAAc;AA8Bf,OAAO,KAAK,EACV,oBAAoB,EAErB,sCAAkC;AAEnC,QAAA,MAAM,iBAAiB;;;;;;;;iFA4PtB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}