@metamask/design-system-react-native 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (267) hide show
  1. package/CHANGELOG.md +33 -1
  2. package/dist/components/BannerBase/BannerBase.cjs +63 -0
  3. package/dist/components/BannerBase/BannerBase.cjs.map +1 -0
  4. package/dist/components/BannerBase/BannerBase.d.cts +4 -0
  5. package/dist/components/BannerBase/BannerBase.d.cts.map +1 -0
  6. package/dist/components/BannerBase/BannerBase.d.mts +4 -0
  7. package/dist/components/BannerBase/BannerBase.d.mts.map +1 -0
  8. package/dist/components/BannerBase/BannerBase.mjs +63 -0
  9. package/dist/components/BannerBase/BannerBase.mjs.map +1 -0
  10. package/dist/components/BannerBase/BannerBase.types.cjs +3 -0
  11. package/dist/components/BannerBase/BannerBase.types.cjs.map +1 -0
  12. package/dist/components/BannerBase/BannerBase.types.d.cts +53 -0
  13. package/dist/components/BannerBase/BannerBase.types.d.cts.map +1 -0
  14. package/dist/components/BannerBase/BannerBase.types.d.mts +53 -0
  15. package/dist/components/BannerBase/BannerBase.types.d.mts.map +1 -0
  16. package/dist/components/BannerBase/BannerBase.types.mjs +2 -0
  17. package/dist/components/BannerBase/BannerBase.types.mjs.map +1 -0
  18. package/dist/components/BannerBase/index.cjs +6 -0
  19. package/dist/components/BannerBase/index.cjs.map +1 -0
  20. package/dist/components/BannerBase/index.d.cts +3 -0
  21. package/dist/components/BannerBase/index.d.cts.map +1 -0
  22. package/dist/components/BannerBase/index.d.mts +3 -0
  23. package/dist/components/BannerBase/index.d.mts.map +1 -0
  24. package/dist/components/BannerBase/index.mjs +2 -0
  25. package/dist/components/BannerBase/index.mjs.map +1 -0
  26. package/dist/components/BottomSheet/BottomSheet.cjs +109 -0
  27. package/dist/components/BottomSheet/BottomSheet.cjs.map +1 -0
  28. package/dist/components/BottomSheet/BottomSheet.d.cts +16 -0
  29. package/dist/components/BottomSheet/BottomSheet.d.cts.map +1 -0
  30. package/dist/components/BottomSheet/BottomSheet.d.mts +16 -0
  31. package/dist/components/BottomSheet/BottomSheet.d.mts.map +1 -0
  32. package/dist/components/BottomSheet/BottomSheet.mjs +87 -0
  33. package/dist/components/BottomSheet/BottomSheet.mjs.map +1 -0
  34. package/dist/components/BottomSheet/BottomSheet.types.cjs +3 -0
  35. package/dist/components/BottomSheet/BottomSheet.types.cjs.map +1 -0
  36. package/dist/components/BottomSheet/BottomSheet.types.d.cts +28 -0
  37. package/dist/components/BottomSheet/BottomSheet.types.d.cts.map +1 -0
  38. package/dist/components/BottomSheet/BottomSheet.types.d.mts +28 -0
  39. package/dist/components/BottomSheet/BottomSheet.types.d.mts.map +1 -0
  40. package/dist/components/BottomSheet/BottomSheet.types.mjs +2 -0
  41. package/dist/components/BottomSheet/BottomSheet.types.mjs.map +1 -0
  42. package/dist/components/BottomSheet/index.cjs +6 -0
  43. package/dist/components/BottomSheet/index.cjs.map +1 -0
  44. package/dist/components/BottomSheet/index.d.cts +3 -0
  45. package/dist/components/BottomSheet/index.d.cts.map +1 -0
  46. package/dist/components/BottomSheet/index.d.mts +3 -0
  47. package/dist/components/BottomSheet/index.d.mts.map +1 -0
  48. package/dist/components/BottomSheet/index.mjs +2 -0
  49. package/dist/components/BottomSheet/index.mjs.map +1 -0
  50. package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs +207 -0
  51. package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs.map +1 -0
  52. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.cjs +18 -0
  53. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.cjs.map +1 -0
  54. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.d.cts +14 -0
  55. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.d.cts.map +1 -0
  56. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.d.mts +14 -0
  57. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.d.mts.map +1 -0
  58. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.mjs +15 -0
  59. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.mjs.map +1 -0
  60. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.cts +13 -0
  61. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.cts.map +1 -0
  62. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.mts +13 -0
  63. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.mts.map +1 -0
  64. package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs +190 -0
  65. package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs.map +1 -0
  66. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.cjs +3 -0
  67. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.cjs.map +1 -0
  68. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.cts +56 -0
  69. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.cts.map +1 -0
  70. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.mts +56 -0
  71. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.mts.map +1 -0
  72. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.mjs +2 -0
  73. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.mjs.map +1 -0
  74. package/dist/components/BottomSheetDialog/index.cjs +9 -0
  75. package/dist/components/BottomSheetDialog/index.cjs.map +1 -0
  76. package/dist/components/BottomSheetDialog/index.d.cts +3 -0
  77. package/dist/components/BottomSheetDialog/index.d.cts.map +1 -0
  78. package/dist/components/BottomSheetDialog/index.d.mts +3 -0
  79. package/dist/components/BottomSheetDialog/index.d.mts.map +1 -0
  80. package/dist/components/BottomSheetDialog/index.mjs +2 -0
  81. package/dist/components/BottomSheetDialog/index.mjs.map +1 -0
  82. package/dist/components/ButtonBase/ButtonBase.cjs +2 -9
  83. package/dist/components/ButtonBase/ButtonBase.cjs.map +1 -1
  84. package/dist/components/ButtonBase/ButtonBase.d.cts.map +1 -1
  85. package/dist/components/ButtonBase/ButtonBase.d.mts.map +1 -1
  86. package/dist/components/ButtonBase/ButtonBase.mjs +3 -10
  87. package/dist/components/ButtonBase/ButtonBase.mjs.map +1 -1
  88. package/dist/components/ButtonFilter/ButtonFilter.cjs +28 -0
  89. package/dist/components/ButtonFilter/ButtonFilter.cjs.map +1 -0
  90. package/dist/components/ButtonFilter/ButtonFilter.d.cts +4 -0
  91. package/dist/components/ButtonFilter/ButtonFilter.d.cts.map +1 -0
  92. package/dist/components/ButtonFilter/ButtonFilter.d.mts +4 -0
  93. package/dist/components/ButtonFilter/ButtonFilter.d.mts.map +1 -0
  94. package/dist/components/ButtonFilter/ButtonFilter.mjs +28 -0
  95. package/dist/components/ButtonFilter/ButtonFilter.mjs.map +1 -0
  96. package/dist/components/ButtonFilter/ButtonFilter.types.cjs +3 -0
  97. package/dist/components/ButtonFilter/ButtonFilter.types.cjs.map +1 -0
  98. package/dist/components/ButtonFilter/ButtonFilter.types.d.cts +9 -0
  99. package/dist/components/ButtonFilter/ButtonFilter.types.d.cts.map +1 -0
  100. package/dist/components/ButtonFilter/ButtonFilter.types.d.mts +9 -0
  101. package/dist/components/ButtonFilter/ButtonFilter.types.d.mts.map +1 -0
  102. package/dist/components/ButtonFilter/ButtonFilter.types.mjs +2 -0
  103. package/dist/components/ButtonFilter/ButtonFilter.types.mjs.map +1 -0
  104. package/dist/components/ButtonFilter/index.cjs +6 -0
  105. package/dist/components/ButtonFilter/index.cjs.map +1 -0
  106. package/dist/components/ButtonFilter/index.d.cts +3 -0
  107. package/dist/components/ButtonFilter/index.d.cts.map +1 -0
  108. package/dist/components/ButtonFilter/index.d.mts +3 -0
  109. package/dist/components/ButtonFilter/index.d.mts.map +1 -0
  110. package/dist/components/ButtonFilter/index.mjs +2 -0
  111. package/dist/components/ButtonFilter/index.mjs.map +1 -0
  112. package/dist/components/ButtonIcon/ButtonIcon.cjs +10 -4
  113. package/dist/components/ButtonIcon/ButtonIcon.cjs.map +1 -1
  114. package/dist/components/ButtonIcon/ButtonIcon.d.cts +1 -1
  115. package/dist/components/ButtonIcon/ButtonIcon.d.cts.map +1 -1
  116. package/dist/components/ButtonIcon/ButtonIcon.d.mts +1 -1
  117. package/dist/components/ButtonIcon/ButtonIcon.d.mts.map +1 -1
  118. package/dist/components/ButtonIcon/ButtonIcon.mjs +11 -5
  119. package/dist/components/ButtonIcon/ButtonIcon.mjs.map +1 -1
  120. package/dist/components/ButtonIcon/ButtonIcon.types.cjs.map +1 -1
  121. package/dist/components/ButtonIcon/ButtonIcon.types.d.cts +4 -11
  122. package/dist/components/ButtonIcon/ButtonIcon.types.d.cts.map +1 -1
  123. package/dist/components/ButtonIcon/ButtonIcon.types.d.mts +4 -11
  124. package/dist/components/ButtonIcon/ButtonIcon.types.d.mts.map +1 -1
  125. package/dist/components/ButtonIcon/ButtonIcon.types.mjs.map +1 -1
  126. package/dist/components/ButtonIcon/index.cjs +2 -1
  127. package/dist/components/ButtonIcon/index.cjs.map +1 -1
  128. package/dist/components/ButtonIcon/index.d.cts +1 -1
  129. package/dist/components/ButtonIcon/index.d.cts.map +1 -1
  130. package/dist/components/ButtonIcon/index.d.mts +1 -1
  131. package/dist/components/ButtonIcon/index.d.mts.map +1 -1
  132. package/dist/components/ButtonIcon/index.mjs +1 -1
  133. package/dist/components/ButtonIcon/index.mjs.map +1 -1
  134. package/dist/components/Icon/assets/ai.svg +1 -1
  135. package/dist/components/Input/Input.cjs +12 -2
  136. package/dist/components/Input/Input.cjs.map +1 -1
  137. package/dist/components/Input/Input.d.cts +2 -1
  138. package/dist/components/Input/Input.d.cts.map +1 -1
  139. package/dist/components/Input/Input.d.mts +2 -1
  140. package/dist/components/Input/Input.d.mts.map +1 -1
  141. package/dist/components/Input/Input.mjs +12 -2
  142. package/dist/components/Input/Input.mjs.map +1 -1
  143. package/dist/components/Input/Input.types.cjs.map +1 -1
  144. package/dist/components/Input/Input.types.d.cts +5 -1
  145. package/dist/components/Input/Input.types.d.cts.map +1 -1
  146. package/dist/components/Input/Input.types.d.mts +5 -1
  147. package/dist/components/Input/Input.types.d.mts.map +1 -1
  148. package/dist/components/Input/Input.types.mjs.map +1 -1
  149. package/dist/components/ListItem/ListItem.cjs +61 -0
  150. package/dist/components/ListItem/ListItem.cjs.map +1 -0
  151. package/dist/components/ListItem/ListItem.constants.cjs +14 -0
  152. package/dist/components/ListItem/ListItem.constants.cjs.map +1 -0
  153. package/dist/components/ListItem/ListItem.constants.d.cts +8 -0
  154. package/dist/components/ListItem/ListItem.constants.d.cts.map +1 -0
  155. package/dist/components/ListItem/ListItem.constants.d.mts +8 -0
  156. package/dist/components/ListItem/ListItem.constants.d.mts.map +1 -0
  157. package/dist/components/ListItem/ListItem.constants.mjs +11 -0
  158. package/dist/components/ListItem/ListItem.constants.mjs.map +1 -0
  159. package/dist/components/ListItem/ListItem.d.cts +4 -0
  160. package/dist/components/ListItem/ListItem.d.cts.map +1 -0
  161. package/dist/components/ListItem/ListItem.d.mts +4 -0
  162. package/dist/components/ListItem/ListItem.d.mts.map +1 -0
  163. package/dist/components/ListItem/ListItem.mjs +41 -0
  164. package/dist/components/ListItem/ListItem.mjs.map +1 -0
  165. package/dist/components/ListItem/ListItem.types.cjs +12 -0
  166. package/dist/components/ListItem/ListItem.types.cjs.map +1 -0
  167. package/dist/components/ListItem/ListItem.types.d.cts +60 -0
  168. package/dist/components/ListItem/ListItem.types.d.cts.map +1 -0
  169. package/dist/components/ListItem/ListItem.types.d.mts +60 -0
  170. package/dist/components/ListItem/ListItem.types.d.mts.map +1 -0
  171. package/dist/components/ListItem/ListItem.types.mjs +9 -0
  172. package/dist/components/ListItem/ListItem.types.mjs.map +1 -0
  173. package/dist/components/ListItem/index.cjs +8 -0
  174. package/dist/components/ListItem/index.cjs.map +1 -0
  175. package/dist/components/ListItem/index.d.cts +4 -0
  176. package/dist/components/ListItem/index.d.cts.map +1 -0
  177. package/dist/components/ListItem/index.d.mts +4 -0
  178. package/dist/components/ListItem/index.d.mts.map +1 -0
  179. package/dist/components/ListItem/index.mjs +3 -0
  180. package/dist/components/ListItem/index.mjs.map +1 -0
  181. package/dist/components/MainActionButton/MainActionButton.cjs +28 -0
  182. package/dist/components/MainActionButton/MainActionButton.cjs.map +1 -0
  183. package/dist/components/MainActionButton/MainActionButton.d.cts +4 -0
  184. package/dist/components/MainActionButton/MainActionButton.d.cts.map +1 -0
  185. package/dist/components/MainActionButton/MainActionButton.d.mts +4 -0
  186. package/dist/components/MainActionButton/MainActionButton.d.mts.map +1 -0
  187. package/dist/components/MainActionButton/MainActionButton.mjs +28 -0
  188. package/dist/components/MainActionButton/MainActionButton.mjs.map +1 -0
  189. package/dist/components/MainActionButton/MainActionButton.types.cjs +3 -0
  190. package/dist/components/MainActionButton/MainActionButton.types.cjs.map +1 -0
  191. package/dist/components/MainActionButton/MainActionButton.types.d.cts +41 -0
  192. package/dist/components/MainActionButton/MainActionButton.types.d.cts.map +1 -0
  193. package/dist/components/MainActionButton/MainActionButton.types.d.mts +41 -0
  194. package/dist/components/MainActionButton/MainActionButton.types.d.mts.map +1 -0
  195. package/dist/components/MainActionButton/MainActionButton.types.mjs +2 -0
  196. package/dist/components/MainActionButton/MainActionButton.types.mjs.map +1 -0
  197. package/dist/components/MainActionButton/index.cjs +6 -0
  198. package/dist/components/MainActionButton/index.cjs.map +1 -0
  199. package/dist/components/MainActionButton/index.d.cts +3 -0
  200. package/dist/components/MainActionButton/index.d.cts.map +1 -0
  201. package/dist/components/MainActionButton/index.d.mts +3 -0
  202. package/dist/components/MainActionButton/index.d.mts.map +1 -0
  203. package/dist/components/MainActionButton/index.mjs +2 -0
  204. package/dist/components/MainActionButton/index.mjs.map +1 -0
  205. package/dist/components/TabEmptyState/TabEmptyState.cjs +22 -0
  206. package/dist/components/TabEmptyState/TabEmptyState.cjs.map +1 -0
  207. package/dist/components/TabEmptyState/TabEmptyState.d.cts +4 -0
  208. package/dist/components/TabEmptyState/TabEmptyState.d.cts.map +1 -0
  209. package/dist/components/TabEmptyState/TabEmptyState.d.mts +4 -0
  210. package/dist/components/TabEmptyState/TabEmptyState.d.mts.map +1 -0
  211. package/dist/components/TabEmptyState/TabEmptyState.mjs +22 -0
  212. package/dist/components/TabEmptyState/TabEmptyState.mjs.map +1 -0
  213. package/dist/components/TabEmptyState/TabEmptyState.types.cjs +3 -0
  214. package/dist/components/TabEmptyState/TabEmptyState.types.cjs.map +1 -0
  215. package/dist/components/TabEmptyState/TabEmptyState.types.d.cts +45 -0
  216. package/dist/components/TabEmptyState/TabEmptyState.types.d.cts.map +1 -0
  217. package/dist/components/TabEmptyState/TabEmptyState.types.d.mts +45 -0
  218. package/dist/components/TabEmptyState/TabEmptyState.types.d.mts.map +1 -0
  219. package/dist/components/TabEmptyState/TabEmptyState.types.mjs +2 -0
  220. package/dist/components/TabEmptyState/TabEmptyState.types.mjs.map +1 -0
  221. package/dist/components/TabEmptyState/index.cjs +6 -0
  222. package/dist/components/TabEmptyState/index.cjs.map +1 -0
  223. package/dist/components/TabEmptyState/index.d.cts +3 -0
  224. package/dist/components/TabEmptyState/index.d.cts.map +1 -0
  225. package/dist/components/TabEmptyState/index.d.mts +3 -0
  226. package/dist/components/TabEmptyState/index.d.mts.map +1 -0
  227. package/dist/components/TabEmptyState/index.mjs +2 -0
  228. package/dist/components/TabEmptyState/index.mjs.map +1 -0
  229. package/dist/components/Toast/Toast.cjs +3 -2
  230. package/dist/components/Toast/Toast.cjs.map +1 -1
  231. package/dist/components/Toast/Toast.d.cts.map +1 -1
  232. package/dist/components/Toast/Toast.d.mts.map +1 -1
  233. package/dist/components/Toast/Toast.mjs +4 -3
  234. package/dist/components/Toast/Toast.mjs.map +1 -1
  235. package/dist/components/Toast/Toast.types.cjs +5 -5
  236. package/dist/components/Toast/Toast.types.cjs.map +1 -1
  237. package/dist/components/Toast/Toast.types.d.cts +5 -4
  238. package/dist/components/Toast/Toast.types.d.cts.map +1 -1
  239. package/dist/components/Toast/Toast.types.d.mts +5 -4
  240. package/dist/components/Toast/Toast.types.d.mts.map +1 -1
  241. package/dist/components/Toast/Toast.types.mjs +4 -4
  242. package/dist/components/Toast/Toast.types.mjs.map +1 -1
  243. package/dist/components/Toast/index.cjs +2 -2
  244. package/dist/components/Toast/index.cjs.map +1 -1
  245. package/dist/components/Toast/index.d.cts +1 -1
  246. package/dist/components/Toast/index.d.cts.map +1 -1
  247. package/dist/components/Toast/index.d.mts +1 -1
  248. package/dist/components/Toast/index.d.mts.map +1 -1
  249. package/dist/components/Toast/index.mjs +1 -1
  250. package/dist/components/Toast/index.mjs.map +1 -1
  251. package/dist/components/index.cjs +30 -2
  252. package/dist/components/index.cjs.map +1 -1
  253. package/dist/components/index.d.cts +24 -4
  254. package/dist/components/index.d.cts.map +1 -1
  255. package/dist/components/index.d.mts +24 -4
  256. package/dist/components/index.d.mts.map +1 -1
  257. package/dist/components/index.mjs +12 -2
  258. package/dist/components/index.mjs.map +1 -1
  259. package/dist/types/index.cjs +10 -1
  260. package/dist/types/index.cjs.map +1 -1
  261. package/dist/types/index.d.cts +8 -0
  262. package/dist/types/index.d.cts.map +1 -1
  263. package/dist/types/index.d.mts +8 -0
  264. package/dist/types/index.d.mts.map +1 -1
  265. package/dist/types/index.mjs +9 -0
  266. package/dist/types/index.mjs.map +1 -1
  267. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -7,6 +7,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.11.0]
11
+
12
+ ### Added
13
+
14
+ - Added `ButtonFilter` component for filter button functionality ([#964](https://github.com/MetaMask/metamask-design-system/pull/964))
15
+ - Added `BottomSheet` component for modal bottom sheet interactions ([#963](https://github.com/MetaMask/metamask-design-system/pull/963))
16
+ - Added `MainActionButton` component for primary call-to-action buttons ([#952](https://github.com/MetaMask/metamask-design-system/pull/952))
17
+ - Added `BannerBase` component for creating custom banner notifications ([#955](https://github.com/MetaMask/metamask-design-system/pull/955))
18
+ - Added `ListItem` component for standardized list rows ([#958](https://github.com/MetaMask/metamask-design-system/pull/958))
19
+ - Added `TabEmptyState` component for empty tab state displays ([#949](https://github.com/MetaMask/metamask-design-system/pull/949))
20
+ - Added `BottomSheetDialog` component for bottom sheet dialog interactions ([#905](https://github.com/MetaMask/metamask-design-system/pull/905))
21
+
22
+ ### Changed
23
+
24
+ - **BREAKING:** Updated `ButtonIcon` API to use `variant` prop instead of `isInverse` and `isFloating` boolean props ([#948](https://github.com/MetaMask/metamask-design-system/pull/948))
25
+ - Removed `isInverse` and `isFloating` props
26
+ - Added `variant` prop with three options: `ButtonIconVariant.Default` (default), `ButtonIconVariant.Filled` (new muted background with rounded corners), and `ButtonIconVariant.Floating` (replaces `isFloating` behavior)
27
+ - Migration: Replace `isFloating={true}` with `variant={ButtonIconVariant.Floating}`, and use `variant={ButtonIconVariant.Default}` for standard transparent background
28
+ - See [Migration Guide](./MIGRATION.md#from-version-0100-to-0110) for complete migration instructions
29
+ - **BREAKING:** `Input` component now requires `value` prop and is controlled-only ([#960](https://github.com/MetaMask/metamask-design-system/pull/960))
30
+ - Removed `defaultValue` prop - all Input instances must now pass a `value` prop and manage state via `onChange`
31
+ - This change affects all components using `Input` directly, including `TextField`
32
+ - Migration: Convert uncontrolled inputs to controlled by adding state management with `value` and `onChange` props
33
+ - See [Migration Guide](./MIGRATION.md#from-version-0100-to-0110) for complete migration instructions
34
+ - Updated `Ai` icon to filled version for visual consistency ([#970](https://github.com/MetaMask/metamask-design-system/pull/970))
35
+
36
+ ### Fixed
37
+
38
+ - Fixed iOS placeholder alignment issue in `Input` component without affecting typed text rendering ([#960](https://github.com/MetaMask/metamask-design-system/pull/960))
39
+ - Fixed missing component exports in package entry point ([#967](https://github.com/MetaMask/metamask-design-system/pull/967))
40
+
10
41
  ## [0.10.0]
11
42
 
12
43
  ### Added
@@ -204,7 +235,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
204
235
  - Full TypeScript support with type definitions and enums
205
236
  - React Native integration with TWRNC preset support
206
237
 
207
- [Unreleased]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.10.0...HEAD
238
+ [Unreleased]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.11.0...HEAD
239
+ [0.11.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.10.0...@metamask/design-system-react-native@0.11.0
208
240
  [0.10.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.9.0...@metamask/design-system-react-native@0.10.0
209
241
  [0.9.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.8.0...@metamask/design-system-react-native@0.9.0
210
242
  [0.8.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.7.0...@metamask/design-system-react-native@0.8.0
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.BannerBase = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const types_1 = require("../../types/index.cjs");
9
+ const Box_1 = require("../Box/index.cjs");
10
+ const Button_1 = require("../Button/index.cjs");
11
+ const ButtonIcon_1 = require("../ButtonIcon/index.cjs");
12
+ const Text_1 = require("../Text/index.cjs");
13
+ const isTextContent = (content) => typeof content === 'string' || typeof content === 'number';
14
+ const hasContent = (content) => content !== null && content !== undefined;
15
+ const BannerBase = ({ title, titleProps, description, descriptionProps, children, childrenWrapperProps, actionButtonLabel, actionButtonOnPress, actionButtonProps, startAccessory, onClose, closeButtonProps, twClassName, ...props }) => {
16
+ const resolvedActionButtonProps = actionButtonProps ?? {};
17
+ const { accessibilityLabel: closeButtonAccessibilityLabel = 'Close banner', onPress: closeButtonPropsOnPress, twClassName: closeButtonTwClassName, ...resolvedCloseButtonProps } = closeButtonProps ?? {};
18
+ const shouldShowCloseButton = Boolean(onClose || closeButtonProps);
19
+ const shouldShowActionButton = Boolean(actionButtonOnPress);
20
+ const handleClosePress = onClose || closeButtonPropsOnPress
21
+ ? (event) => {
22
+ if (onClose) {
23
+ onClose();
24
+ return;
25
+ }
26
+ closeButtonPropsOnPress?.(event);
27
+ }
28
+ : undefined;
29
+ const mergedCloseButtonTwClassName = closeButtonTwClassName
30
+ ? `ml-3 ${closeButtonTwClassName}`
31
+ : 'ml-3';
32
+ return (<Box_1.Box flexDirection={types_1.BoxFlexDirection.Row} alignItems={types_1.BoxAlignItems.Start} gap={2} backgroundColor={types_1.BoxBackgroundColor.BackgroundDefault} padding={3} twClassName={twClassName ? `rounded-sm ${twClassName}` : 'rounded-sm'} {...props}>
33
+ {startAccessory}
34
+
35
+ <Box_1.Box twClassName="flex-1">
36
+ {hasContent(title) &&
37
+ (isTextContent(title) ? (<Text_1.Text variant={types_1.TextVariant.BodyMd} fontWeight={types_1.FontWeight.Medium} {...titleProps}>
38
+ {title}
39
+ </Text_1.Text>) : (title))}
40
+
41
+ {hasContent(description) && (<Box_1.Box twClassName={hasContent(title) ? 'mt-1' : undefined}>
42
+ {isTextContent(description) ? (<Text_1.Text variant={types_1.TextVariant.BodySm} {...descriptionProps}>
43
+ {description}
44
+ </Text_1.Text>) : (description)}
45
+ </Box_1.Box>)}
46
+
47
+ {hasContent(children) &&
48
+ (isTextContent(children) ? (<Text_1.Text variant={types_1.TextVariant.BodyMd} {...childrenWrapperProps}>
49
+ {children}
50
+ </Text_1.Text>) : (children))}
51
+
52
+ {shouldShowActionButton && (<Box_1.Box twClassName="mt-4">
53
+ <Button_1.Button size={types_1.ButtonSize.Md} onPress={actionButtonOnPress} {...resolvedActionButtonProps}>
54
+ {actionButtonLabel}
55
+ </Button_1.Button>
56
+ </Box_1.Box>)}
57
+ </Box_1.Box>
58
+
59
+ {shouldShowCloseButton && (<ButtonIcon_1.ButtonIcon twClassName={mergedCloseButtonTwClassName} iconName={types_1.IconName.Close} size={types_1.ButtonIconSize.Sm} accessibilityLabel={closeButtonAccessibilityLabel} onPress={handleClosePress} {...resolvedCloseButtonProps}/>)}
60
+ </Box_1.Box>);
61
+ };
62
+ exports.BannerBase = BannerBase;
63
+ //# sourceMappingURL=BannerBase.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerBase.cjs","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAG1B,iDASqB;AACrB,0CAA6B;AAC7B,gDAAmC;AACnC,wDAA2C;AAC3C,4CAA+B;AAI/B,MAAM,aAAa,GAAG,CAAC,OAAwB,EAA8B,EAAE,CAC7E,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,OAAO,KAAK,QAAQ,CAAC;AAE7D,MAAM,UAAU,GAAG,CAAC,OAAwB,EAAE,EAAE,CAC9C,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,SAAS,CAAC;AAErC,MAAM,UAAU,GAA8B,CAAC,EACpD,KAAK,EACL,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,OAAO,EACP,gBAAgB,EAChB,WAAW,EACX,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,yBAAyB,GAAG,iBAAiB,IAAI,EAAE,CAAC;IAE1D,MAAM,EACJ,kBAAkB,EAAE,6BAA6B,GAAG,cAAc,EAClE,OAAO,EAAE,uBAAuB,EAChC,WAAW,EAAE,sBAAsB,EACnC,GAAG,wBAAwB,EAC5B,GAAG,gBAAgB,IAAI,EAAE,CAAC;IAE3B,MAAM,qBAAqB,GAAG,OAAO,CAAC,OAAO,IAAI,gBAAgB,CAAC,CAAC;IACnE,MAAM,sBAAsB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAE5D,MAAM,gBAAgB,GACpB,OAAO,IAAI,uBAAuB;QAChC,CAAC,CAAC,CAAC,K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AC,CACP,CAAC;AACJ,CAAC,CAAC;AAnHW,QAAA,UAAU,cAmHrB","sourcesContent":["import React from 'react';\nimport { GestureResponderEvent } from 'react-native';\n\nimport {\n BoxAlignItems,\n BoxBackgroundColor,\n ButtonIconSize,\n ButtonSize,\n FontWeight,\n BoxFlexDirection,\n IconName,\n TextVariant,\n} from '../../types';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { ButtonIcon } from '../ButtonIcon';\nimport { Text } from '../Text';\n\nimport type { BannerBaseProps } from './BannerBase.types';\n\nconst isTextContent = (content: React.ReactNode): content is string | number =>\n typeof content === 'string' || typeof content === 'number';\n\nconst hasContent = (content: React.ReactNode) =>\n content !== null && content !== undefined;\n\nexport const BannerBase: React.FC<BannerBaseProps> = ({\n title,\n titleProps,\n description,\n descriptionProps,\n children,\n childrenWrapperProps,\n actionButtonLabel,\n actionButtonOnPress,\n actionButtonProps,\n startAccessory,\n onClose,\n closeButtonProps,\n twClassName,\n ...props\n}) => {\n const resolvedActionButtonProps = actionButtonProps ?? {};\n\n const {\n accessibilityLabel: closeButtonAccessibilityLabel = 'Close banner',\n onPress: closeButtonPropsOnPress,\n twClassName: closeButtonTwClassName,\n ...resolvedCloseButtonProps\n } = closeButtonProps ?? {};\n\n const shouldShowCloseButton = Boolean(onClose || closeButtonProps);\n const shouldShowActionButton = Boolean(actionButtonOnPress);\n\n const handleClosePress =\n onClose || closeButtonPropsOnPress\n ? (event: GestureResponderEvent) => {\n if (onClose) {\n onClose();\n return;\n }\n closeButtonPropsOnPress?.(event);\n }\n : undefined;\n\n const mergedCloseButtonTwClassName = closeButtonTwClassName\n ? `ml-3 ${closeButtonTwClassName}`\n : 'ml-3';\n\n return (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Start}\n gap={2}\n backgroundColor={BoxBackgroundColor.BackgroundDefault}\n padding={3}\n twClassName={twClassName ? `rounded-sm ${twClassName}` : 'rounded-sm'}\n {...props}\n >\n {startAccessory}\n\n <Box twClassName=\"flex-1\">\n {hasContent(title) &&\n (isTextContent(title) ? (\n <Text\n variant={TextVariant.BodyMd}\n fontWeight={FontWeight.Medium}\n {...titleProps}\n >\n {title}\n </Text>\n ) : (\n title\n ))}\n\n {hasContent(description) && (\n <Box twClassName={hasContent(title) ? 'mt-1' : undefined}>\n {isTextContent(description) ? (\n <Text variant={TextVariant.BodySm} {...descriptionProps}>\n {description}\n </Text>\n ) : (\n description\n )}\n </Box>\n )}\n\n {hasContent(children) &&\n (isTextContent(children) ? (\n <Text variant={TextVariant.BodyMd} {...childrenWrapperProps}>\n {children}\n </Text>\n ) : (\n children\n ))}\n\n {shouldShowActionButton && (\n <Box twClassName=\"mt-4\">\n <Button\n size={ButtonSize.Md}\n onPress={actionButtonOnPress}\n {...resolvedActionButtonProps}\n >\n {actionButtonLabel}\n </Button>\n </Box>\n )}\n </Box>\n\n {shouldShowCloseButton && (\n <ButtonIcon\n twClassName={mergedCloseButtonTwClassName}\n iconName={IconName.Close}\n size={ButtonIconSize.Sm}\n accessibilityLabel={closeButtonAccessibilityLabel}\n onPress={handleClosePress}\n {...resolvedCloseButtonProps}\n />\n )}\n </Box>\n );\n};\n"]}
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import type { BannerBaseProps } from "./BannerBase.types.cjs";
3
+ export declare const BannerBase: React.FC<BannerBaseProps>;
4
+ //# sourceMappingURL=BannerBase.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerBase.d.cts","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc;AAkB1B,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAQ1D,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAmHhD,CAAC"}
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import type { BannerBaseProps } from "./BannerBase.types.mjs";
3
+ export declare const BannerBase: React.FC<BannerBaseProps>;
4
+ //# sourceMappingURL=BannerBase.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerBase.d.mts","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc;AAkB1B,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAQ1D,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAmHhD,CAAC"}
@@ -0,0 +1,63 @@
1
+ function $importDefault(module) {
2
+ if (module?.__esModule) {
3
+ return module.default;
4
+ }
5
+ return module;
6
+ }
7
+ import $React from "react";
8
+ const React = $importDefault($React);
9
+ import { BoxAlignItems, BoxBackgroundColor, ButtonIconSize, ButtonSize, FontWeight, BoxFlexDirection, IconName, TextVariant } from "../../types/index.mjs";
10
+ import { Box } from "../Box/index.mjs";
11
+ import { Button } from "../Button/index.mjs";
12
+ import { ButtonIcon } from "../ButtonIcon/index.mjs";
13
+ import { Text } from "../Text/index.mjs";
14
+ const isTextContent = (content) => typeof content === 'string' || typeof content === 'number';
15
+ const hasContent = (content) => content !== null && content !== undefined;
16
+ export const BannerBase = ({ title, titleProps, description, descriptionProps, children, childrenWrapperProps, actionButtonLabel, actionButtonOnPress, actionButtonProps, startAccessory, onClose, closeButtonProps, twClassName, ...props }) => {
17
+ const resolvedActionButtonProps = actionButtonProps ?? {};
18
+ const { accessibilityLabel: closeButtonAccessibilityLabel = 'Close banner', onPress: closeButtonPropsOnPress, twClassName: closeButtonTwClassName, ...resolvedCloseButtonProps } = closeButtonProps ?? {};
19
+ const shouldShowCloseButton = Boolean(onClose || closeButtonProps);
20
+ const shouldShowActionButton = Boolean(actionButtonOnPress);
21
+ const handleClosePress = onClose || closeButtonPropsOnPress
22
+ ? (event) => {
23
+ if (onClose) {
24
+ onClose();
25
+ return;
26
+ }
27
+ closeButtonPropsOnPress?.(event);
28
+ }
29
+ : undefined;
30
+ const mergedCloseButtonTwClassName = closeButtonTwClassName
31
+ ? `ml-3 ${closeButtonTwClassName}`
32
+ : 'ml-3';
33
+ return (<Box flexDirection={BoxFlexDirection.Row} alignItems={BoxAlignItems.Start} gap={2} backgroundColor={BoxBackgroundColor.BackgroundDefault} padding={3} twClassName={twClassName ? `rounded-sm ${twClassName}` : 'rounded-sm'} {...props}>
34
+ {startAccessory}
35
+
36
+ <Box twClassName="flex-1">
37
+ {hasContent(title) &&
38
+ (isTextContent(title) ? (<Text variant={TextVariant.BodyMd} fontWeight={FontWeight.Medium} {...titleProps}>
39
+ {title}
40
+ </Text>) : (title))}
41
+
42
+ {hasContent(description) && (<Box twClassName={hasContent(title) ? 'mt-1' : undefined}>
43
+ {isTextContent(description) ? (<Text variant={TextVariant.BodySm} {...descriptionProps}>
44
+ {description}
45
+ </Text>) : (description)}
46
+ </Box>)}
47
+
48
+ {hasContent(children) &&
49
+ (isTextContent(children) ? (<Text variant={TextVariant.BodyMd} {...childrenWrapperProps}>
50
+ {children}
51
+ </Text>) : (children))}
52
+
53
+ {shouldShowActionButton && (<Box twClassName="mt-4">
54
+ <Button size={ButtonSize.Md} onPress={actionButtonOnPress} {...resolvedActionButtonProps}>
55
+ {actionButtonLabel}
56
+ </Button>
57
+ </Box>)}
58
+ </Box>
59
+
60
+ {shouldShowCloseButton && (<ButtonIcon twClassName={mergedCloseButtonTwClassName} iconName={IconName.Close} size={ButtonIconSize.Sm} accessibilityLabel={closeButtonAccessibilityLabel} onPress={handleClosePress} {...resolvedCloseButtonProps}/>)}
61
+ </Box>);
62
+ };
63
+ //# sourceMappingURL=BannerBase.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerBase.mjs","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,MAAK,cAAc;;AAG1B,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,QAAQ,EACR,WAAW,EACZ,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;cAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,CACF,WAAW,CACZ,CACH;UAAA,EAAE,GAAG,CAAC,CACP,CAED;;QAAA,CAAC,UAAU,CAAC,QAAQ,CAAC;YACnB,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CACzB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,IAAI,oBAAoB,CAAC,CAC1D;cAAA,CAAC,QAAQ,CACX;YAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,CACF,QAAQ,CACT,CAAC,CAEJ;;QAAA,CAAC,sBAAsB,IAAI,CACzB,CAAC,GAAG,CAAC,WAAW,CAAC,MAAM,CACrB;YAAA,CAAC,MAAM,CACL,IAAI,CAAC,CAAC,UAAU,CAAC,EAAE,CAAC,CACpB,OAAO,CAAC,CAAC,mBAAmB,CAAC,CAC7B,IAAI,yBAAyB,CAAC,CAE9B;cAAA,CAAC,iBAAiB,CACpB;YAAA,EAAE,MAAM,CACV;UAAA,EAAE,GAAG,CAAC,CACP,CACH;MAAA,EAAE,GAAG,CAEL;;MAAA,CAAC,qBAAqB,IAAI,CACxB,CAAC,UAAU,CACT,WAAW,CAAC,CAAC,4BAA4B,CAAC,CAC1C,QAAQ,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CACzB,IAAI,CAAC,CAAC,cAAc,CAAC,EAAE,CAAC,CACxB,kBAAkB,CAAC,CAAC,6BAA6B,CAAC,CAClD,OAAO,CAAC,CAAC,gBAAgB,CAAC,CAC1B,IAAI,wBAAwB,CAAC,EAC7B,CACH,CACH;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { GestureResponderEvent } from 'react-native';\n\nimport {\n BoxAlignItems,\n BoxBackgroundColor,\n ButtonIconSize,\n ButtonSize,\n FontWeight,\n BoxFlexDirection,\n IconName,\n TextVariant,\n} from '../../types';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { ButtonIcon } from '../ButtonIcon';\nimport { Text } from '../Text';\n\nimport type { BannerBaseProps } from './BannerBase.types';\n\nconst isTextContent = (content: React.ReactNode): content is string | number =>\n typeof content === 'string' || typeof content === 'number';\n\nconst hasContent = (content: React.ReactNode) =>\n content !== null && content !== undefined;\n\nexport const BannerBase: React.FC<BannerBaseProps> = ({\n title,\n titleProps,\n description,\n descriptionProps,\n children,\n childrenWrapperProps,\n actionButtonLabel,\n actionButtonOnPress,\n actionButtonProps,\n startAccessory,\n onClose,\n closeButtonProps,\n twClassName,\n ...props\n}) => {\n const resolvedActionButtonProps = actionButtonProps ?? {};\n\n const {\n accessibilityLabel: closeButtonAccessibilityLabel = 'Close banner',\n onPress: closeButtonPropsOnPress,\n twClassName: closeButtonTwClassName,\n ...resolvedCloseButtonProps\n } = closeButtonProps ?? {};\n\n const shouldShowCloseButton = Boolean(onClose || closeButtonProps);\n const shouldShowActionButton = Boolean(actionButtonOnPress);\n\n const handleClosePress =\n onClose || closeButtonPropsOnPress\n ? (event: GestureResponderEvent) => {\n if (onClose) {\n onClose();\n return;\n }\n closeButtonPropsOnPress?.(event);\n }\n : undefined;\n\n const mergedCloseButtonTwClassName = closeButtonTwClassName\n ? `ml-3 ${closeButtonTwClassName}`\n : 'ml-3';\n\n return (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Start}\n gap={2}\n backgroundColor={BoxBackgroundColor.BackgroundDefault}\n padding={3}\n twClassName={twClassName ? `rounded-sm ${twClassName}` : 'rounded-sm'}\n {...props}\n >\n {startAccessory}\n\n <Box twClassName=\"flex-1\">\n {hasContent(title) &&\n (isTextContent(title) ? (\n <Text\n variant={TextVariant.BodyMd}\n fontWeight={FontWeight.Medium}\n {...titleProps}\n >\n {title}\n </Text>\n ) : (\n title\n ))}\n\n {hasContent(description) && (\n <Box twClassName={hasContent(title) ? 'mt-1' : undefined}>\n {isTextContent(description) ? (\n <Text variant={TextVariant.BodySm} {...descriptionProps}>\n {description}\n </Text>\n ) : (\n description\n )}\n </Box>\n )}\n\n {hasContent(children) &&\n (isTextContent(children) ? (\n <Text variant={TextVariant.BodyMd} {...childrenWrapperProps}>\n {children}\n </Text>\n ) : (\n children\n ))}\n\n {shouldShowActionButton && (\n <Box twClassName=\"mt-4\">\n <Button\n size={ButtonSize.Md}\n onPress={actionButtonOnPress}\n {...resolvedActionButtonProps}\n >\n {actionButtonLabel}\n </Button>\n </Box>\n )}\n </Box>\n\n {shouldShowCloseButton && (\n <ButtonIcon\n twClassName={mergedCloseButtonTwClassName}\n iconName={IconName.Close}\n size={ButtonIconSize.Sm}\n accessibilityLabel={closeButtonAccessibilityLabel}\n onPress={handleClosePress}\n {...resolvedCloseButtonProps}\n />\n )}\n </Box>\n );\n};\n"]}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=BannerBase.types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerBase.types.cjs","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BannerBasePropsShared } from '@metamask/design-system-shared';\nimport type { GestureResponderEvent } from 'react-native';\n\nimport type { BoxProps } from '../Box';\nimport type { ButtonProps } from '../Button';\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport type { TextProps } from '../Text';\n\ntype BannerBaseActionButtonProps = Omit<\n Partial<ButtonProps>,\n 'children' | 'onPress' | 'variant'\n>;\n\ntype BannerBaseCloseButtonProps = Omit<\n Partial<ButtonIconProps>,\n 'iconName' | 'onPress'\n> & {\n /**\n * Optional press handler for the close button.\n */\n onPress?: (event: GestureResponderEvent) => void;\n};\n\ntype BannerBasePropsBase = BannerBasePropsShared &\n Omit<BoxProps, 'children'> & {\n /**\n * Optional props for the title `Text` when title is a string.\n */\n titleProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props for the description `Text` when description is a string.\n */\n descriptionProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props for the children wrapper `Text` when children is a string.\n */\n childrenWrapperProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional callback for the close button.\n * If provided, a close button is shown.\n */\n onClose?: () => void;\n /**\n * Optional props for the close `ButtonIcon`.\n * Providing this also shows a close button.\n */\n closeButtonProps?: BannerBaseCloseButtonProps;\n };\n\ntype BannerBaseActionPropsWithHandler = {\n actionButtonOnPress: (event: GestureResponderEvent) => void;\n actionButtonLabel: string;\n actionButtonProps?: BannerBaseActionButtonProps;\n};\n\ntype BannerBaseActionPropsWithoutHandler = {\n actionButtonOnPress?: undefined;\n actionButtonLabel?: string;\n actionButtonProps?: BannerBaseActionButtonProps;\n};\n\n/**\n * BannerBase component props.\n */\nexport type BannerBaseProps = BannerBasePropsBase &\n (BannerBaseActionPropsWithHandler | BannerBaseActionPropsWithoutHandler);\n"]}
@@ -0,0 +1,53 @@
1
+ import type { BannerBasePropsShared } from "@metamask/design-system-shared";
2
+ import type { GestureResponderEvent } from "react-native/index.js";
3
+ import type { BoxProps } from "../Box/index.cjs";
4
+ import type { ButtonProps } from "../Button/index.cjs";
5
+ import type { ButtonIconProps } from "../ButtonIcon/index.cjs";
6
+ import type { TextProps } from "../Text/index.cjs";
7
+ type BannerBaseActionButtonProps = Omit<Partial<ButtonProps>, 'children' | 'onPress' | 'variant'>;
8
+ type BannerBaseCloseButtonProps = Omit<Partial<ButtonIconProps>, 'iconName' | 'onPress'> & {
9
+ /**
10
+ * Optional press handler for the close button.
11
+ */
12
+ onPress?: (event: GestureResponderEvent) => void;
13
+ };
14
+ type BannerBasePropsBase = BannerBasePropsShared & Omit<BoxProps, 'children'> & {
15
+ /**
16
+ * Optional props for the title `Text` when title is a string.
17
+ */
18
+ titleProps?: Omit<Partial<TextProps>, 'children'>;
19
+ /**
20
+ * Optional props for the description `Text` when description is a string.
21
+ */
22
+ descriptionProps?: Omit<Partial<TextProps>, 'children'>;
23
+ /**
24
+ * Optional props for the children wrapper `Text` when children is a string.
25
+ */
26
+ childrenWrapperProps?: Omit<Partial<TextProps>, 'children'>;
27
+ /**
28
+ * Optional callback for the close button.
29
+ * If provided, a close button is shown.
30
+ */
31
+ onClose?: () => void;
32
+ /**
33
+ * Optional props for the close `ButtonIcon`.
34
+ * Providing this also shows a close button.
35
+ */
36
+ closeButtonProps?: BannerBaseCloseButtonProps;
37
+ };
38
+ type BannerBaseActionPropsWithHandler = {
39
+ actionButtonOnPress: (event: GestureResponderEvent) => void;
40
+ actionButtonLabel: string;
41
+ actionButtonProps?: BannerBaseActionButtonProps;
42
+ };
43
+ type BannerBaseActionPropsWithoutHandler = {
44
+ actionButtonOnPress?: undefined;
45
+ actionButtonLabel?: string;
46
+ actionButtonProps?: BannerBaseActionButtonProps;
47
+ };
48
+ /**
49
+ * BannerBase component props.
50
+ */
51
+ export type BannerBaseProps = BannerBasePropsBase & (BannerBaseActionPropsWithHandler | BannerBaseActionPropsWithoutHandler);
52
+ export {};
53
+ //# sourceMappingURL=BannerBase.types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerBase.types.d.cts","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,uCAAuC;AAC5E,OAAO,KAAK,EAAE,qBAAqB,EAAE,8BAAqB;AAE1D,OAAO,KAAK,EAAE,QAAQ,EAAE,yBAAe;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,4BAAkB;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC,KAAK,2BAA2B,GAAG,IAAI,CACrC,OAAO,CAAC,WAAW,CAAC,EACpB,UAAU,GAAG,SAAS,GAAG,SAAS,CACnC,CAAC;AAEF,KAAK,0BAA0B,GAAG,IAAI,CACpC,OAAO,CAAC,eAAe,CAAC,EACxB,UAAU,GAAG,SAAS,CACvB,GAAG;IACF;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;CAClD,CAAC;AAEF,KAAK,mBAAmB,GAAG,qBAAqB,GAC9C,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,GAAG;IAC3B;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IAClD;;OAEG;IACH,gBAAgB,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IACxD;;OAEG;IACH,oBAAoB,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IAC5D;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,0BAA0B,CAAC;CAC/C,CAAC;AAEJ,KAAK,gCAAgC,GAAG;IACtC,mBAAmB,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAC5D,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,2BAA2B,CAAC;CACjD,CAAC;AAEF,KAAK,mCAAmC,GAAG;IACzC,mBAAmB,CAAC,EAAE,SAAS,CAAC;IAChC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,2BAA2B,CAAC;CACjD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,mBAAmB,GAC/C,CAAC,gCAAgC,GAAG,mCAAmC,CAAC,CAAC"}
@@ -0,0 +1,53 @@
1
+ import type { BannerBasePropsShared } from "@metamask/design-system-shared";
2
+ import type { GestureResponderEvent } from "react-native/index.js";
3
+ import type { BoxProps } from "../Box/index.mjs";
4
+ import type { ButtonProps } from "../Button/index.mjs";
5
+ import type { ButtonIconProps } from "../ButtonIcon/index.mjs";
6
+ import type { TextProps } from "../Text/index.mjs";
7
+ type BannerBaseActionButtonProps = Omit<Partial<ButtonProps>, 'children' | 'onPress' | 'variant'>;
8
+ type BannerBaseCloseButtonProps = Omit<Partial<ButtonIconProps>, 'iconName' | 'onPress'> & {
9
+ /**
10
+ * Optional press handler for the close button.
11
+ */
12
+ onPress?: (event: GestureResponderEvent) => void;
13
+ };
14
+ type BannerBasePropsBase = BannerBasePropsShared & Omit<BoxProps, 'children'> & {
15
+ /**
16
+ * Optional props for the title `Text` when title is a string.
17
+ */
18
+ titleProps?: Omit<Partial<TextProps>, 'children'>;
19
+ /**
20
+ * Optional props for the description `Text` when description is a string.
21
+ */
22
+ descriptionProps?: Omit<Partial<TextProps>, 'children'>;
23
+ /**
24
+ * Optional props for the children wrapper `Text` when children is a string.
25
+ */
26
+ childrenWrapperProps?: Omit<Partial<TextProps>, 'children'>;
27
+ /**
28
+ * Optional callback for the close button.
29
+ * If provided, a close button is shown.
30
+ */
31
+ onClose?: () => void;
32
+ /**
33
+ * Optional props for the close `ButtonIcon`.
34
+ * Providing this also shows a close button.
35
+ */
36
+ closeButtonProps?: BannerBaseCloseButtonProps;
37
+ };
38
+ type BannerBaseActionPropsWithHandler = {
39
+ actionButtonOnPress: (event: GestureResponderEvent) => void;
40
+ actionButtonLabel: string;
41
+ actionButtonProps?: BannerBaseActionButtonProps;
42
+ };
43
+ type BannerBaseActionPropsWithoutHandler = {
44
+ actionButtonOnPress?: undefined;
45
+ actionButtonLabel?: string;
46
+ actionButtonProps?: BannerBaseActionButtonProps;
47
+ };
48
+ /**
49
+ * BannerBase component props.
50
+ */
51
+ export type BannerBaseProps = BannerBasePropsBase & (BannerBaseActionPropsWithHandler | BannerBaseActionPropsWithoutHandler);
52
+ export {};
53
+ //# sourceMappingURL=BannerBase.types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerBase.types.d.mts","sourceRoot":"","s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AiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,2BAA2B,CAAC;CACjD,CAAC;AAEF,KAAK,mCAAmC,GAAG;IACzC,mBAAmB,CAAC,EAAE,SAAS,CAAC;IAChC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,2BAA2B,CAAC;CACjD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,mBAAmB,GAC/C,CAAC,gCAAgC,GAAG,mCAAmC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=BannerBase.types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerBase.types.mjs","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BannerBasePropsShared } from '@metamask/design-system-shared';\nimport type { GestureResponderEvent } from 'react-native';\n\nimport type { BoxProps } from '../Box';\nimport type { ButtonProps } from '../Button';\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport type { TextProps } from '../Text';\n\ntype BannerBaseActionButtonProps = Omit<\n Partial<ButtonProps>,\n 'children' | 'onPress' | 'variant'\n>;\n\ntype BannerBaseCloseButtonProps = Omit<\n Partial<ButtonIconProps>,\n 'iconName' | 'onPress'\n> & {\n /**\n * Optional press handler for the close button.\n */\n onPress?: (event: GestureResponderEvent) => void;\n};\n\ntype BannerBasePropsBase = BannerBasePropsShared &\n Omit<BoxProps, 'children'> & {\n /**\n * Optional props for the title `Text` when title is a string.\n */\n titleProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props for the description `Text` when description is a string.\n */\n descriptionProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props for the children wrapper `Text` when children is a string.\n */\n childrenWrapperProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional callback for the close button.\n * If provided, a close button is shown.\n */\n onClose?: () => void;\n /**\n * Optional props for the close `ButtonIcon`.\n * Providing this also shows a close button.\n */\n closeButtonProps?: BannerBaseCloseButtonProps;\n };\n\ntype BannerBaseActionPropsWithHandler = {\n actionButtonOnPress: (event: GestureResponderEvent) => void;\n actionButtonLabel: string;\n actionButtonProps?: BannerBaseActionButtonProps;\n};\n\ntype BannerBaseActionPropsWithoutHandler = {\n actionButtonOnPress?: undefined;\n actionButtonLabel?: string;\n actionButtonProps?: BannerBaseActionButtonProps;\n};\n\n/**\n * BannerBase component props.\n */\nexport type BannerBaseProps = BannerBasePropsBase &\n (BannerBaseActionPropsWithHandler | BannerBaseActionPropsWithoutHandler);\n"]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BannerBase = void 0;
4
+ var BannerBase_1 = require("./BannerBase.cjs");
5
+ Object.defineProperty(exports, "BannerBase", { enumerable: true, get: function () { return BannerBase_1.BannerBase; } });
6
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/BannerBase/index.ts"],"names":[],"mappings":";;;AAAA,+CAA0C;AAAjC,wGAAA,UAAU,OAAA","sourcesContent":["export { BannerBase } from './BannerBase';\nexport type { BannerBaseProps } from './BannerBase.types';\n"]}
@@ -0,0 +1,3 @@
1
+ export { BannerBase } from "./BannerBase.cjs";
2
+ export type { BannerBaseProps } from "./BannerBase.types.cjs";
3
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/BannerBase/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,yBAAqB;AAC1C,YAAY,EAAE,eAAe,EAAE,+BAA2B"}
@@ -0,0 +1,3 @@
1
+ export { BannerBase } from "./BannerBase.mjs";
2
+ export type { BannerBaseProps } from "./BannerBase.types.mjs";
3
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/BannerBase/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,yBAAqB;AAC1C,YAAY,EAAE,eAAe,EAAE,+BAA2B"}
@@ -0,0 +1,2 @@
1
+ export { BannerBase } from "./BannerBase.mjs";
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/BannerBase/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,yBAAqB","sourcesContent":["export { BannerBase } from './BannerBase';\nexport type { BannerBaseProps } from './BannerBase.types';\n"]}
@@ -0,0 +1,109 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.BottomSheet = void 0;
30
+ const design_system_twrnc_preset_1 = require("@metamask/design-system-twrnc-preset");
31
+ const react_1 = __importStar(require("react"));
32
+ const react_native_1 = require("react-native/index.js");
33
+ const react_native_safe_area_context_1 = require("react-native-safe-area-context");
34
+ const BottomSheetDialog_1 = __importDefault(require("../BottomSheetDialog/index.cjs"));
35
+ const BottomSheetOverlay_1 = require("../BottomSheetOverlay/BottomSheetOverlay.cjs");
36
+ exports.BottomSheet = (0, react_1.forwardRef)(({ children, onClose, onOpen, goBack, style, twClassName, isInteractable = true, shouldNavigateBack = true, isFullscreen = false, keyboardAvoidingViewEnabled = true, ...props }, ref) => {
37
+ const tw = (0, design_system_twrnc_preset_1.useTailwind)();
38
+ const { bottom: screenBottomPadding } = (0, react_native_safe_area_context_1.useSafeAreaInsets)();
39
+ const { y: frameY } = (0, react_native_safe_area_context_1.useSafeAreaFrame)();
40
+ const postCallback = (0, react_1.useRef)();
41
+ const bottomSheetDialogRef = (0, react_1.useRef)(null);
42
+ const didNavigateBackRef = (0, react_1.useRef)(false);
43
+ const closeRequestedRef = (0, react_1.useRef)(false);
44
+ const didRunPostCallbackRef = (0, react_1.useRef)(false);
45
+ const onOpenCB = (0, react_1.useCallback)(() => {
46
+ // Reset when the sheet is opened again.
47
+ didNavigateBackRef.current = false;
48
+ closeRequestedRef.current = false;
49
+ didRunPostCallbackRef.current = false;
50
+ onOpen?.(Boolean(postCallback.current));
51
+ const callback = postCallback.current;
52
+ postCallback.current = undefined;
53
+ callback?.();
54
+ }, [onOpen]);
55
+ const onCloseCB = (0, react_1.useCallback)(() => {
56
+ if (shouldNavigateBack && !didNavigateBackRef.current) {
57
+ didNavigateBackRef.current = true;
58
+ goBack();
59
+ }
60
+ const callback = postCallback.current;
61
+ const hasCallback = Boolean(callback);
62
+ onClose?.(hasCallback);
63
+ if (!didRunPostCallbackRef.current && hasCallback) {
64
+ didRunPostCallbackRef.current = true;
65
+ postCallback.current = undefined;
66
+ callback?.();
67
+ }
68
+ }, [goBack, onClose, shouldNavigateBack]);
69
+ // Dismiss the sheet when Android back button is pressed.
70
+ (0, react_1.useEffect)(() => {
71
+ const hardwareBackPress = () => {
72
+ if (isInteractable) {
73
+ bottomSheetDialogRef.current?.onCloseDialog();
74
+ }
75
+ return true;
76
+ };
77
+ react_native_1.BackHandler.addEventListener('hardwareBackPress', hardwareBackPress);
78
+ return () => {
79
+ react_native_1.BackHandler.removeEventListener('hardwareBackPress', hardwareBackPress);
80
+ };
81
+ }, [isInteractable]);
82
+ (0, react_1.useImperativeHandle)(ref, () => ({
83
+ onCloseBottomSheet: (callback) => {
84
+ if (closeRequestedRef.current) {
85
+ return;
86
+ }
87
+ closeRequestedRef.current = true;
88
+ postCallback.current = callback;
89
+ bottomSheetDialogRef.current?.onCloseDialog();
90
+ },
91
+ onOpenBottomSheet: (callback) => {
92
+ didNavigateBackRef.current = false;
93
+ closeRequestedRef.current = false;
94
+ didRunPostCallbackRef.current = false;
95
+ postCallback.current = callback;
96
+ bottomSheetDialogRef.current?.onOpenDialog();
97
+ },
98
+ }));
99
+ return (<react_native_1.KeyboardAvoidingView behavior={react_native_1.Platform.OS === 'ios' ? 'padding' : undefined} keyboardVerticalOffset={react_native_1.Platform.OS === 'ios' ? -screenBottomPadding : frameY} style={[tw.style('absolute inset-0 justify-end'), style]} enabled={keyboardAvoidingViewEnabled} {...props}>
100
+ <BottomSheetOverlay_1.BottomSheetOverlay onPress={isInteractable
101
+ ? () => bottomSheetDialogRef.current?.onCloseDialog()
102
+ : undefined}/>
103
+ <BottomSheetDialog_1.default isInteractable={isInteractable} onClose={onCloseCB} onOpen={onOpenCB} ref={bottomSheetDialogRef} isFullscreen={isFullscreen} twClassName={twClassName} keyboardAvoidingViewEnabled={keyboardAvoidingViewEnabled}>
104
+ {children}
105
+ </BottomSheetDialog_1.default>
106
+ </react_native_1.KeyboardAvoidingView>);
107
+ });
108
+ exports.BottomSheet.displayName = 'BottomSheet';
109
+ //# sourceMappingURL=BottomSheet.cjs.map
@@ -0,0 +1 @@
1
+ {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C,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,2BAAiB,CACrB;MAAA,EAAE,mCAAoB,CAAC,CACxB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,mBAAW,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["import { useTailwind } from '@metamask/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,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"}