@metamask-previews/design-system-react-native 0.39.1-preview.5cf8e82 → 0.42.1-preview.1d57b140

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 (197) hide show
  1. package/CHANGELOG.md +60 -1
  2. package/README.md +2 -2
  3. package/dist/components/AvatarFavicon/AvatarFavicon.cjs +1 -1
  4. package/dist/components/AvatarFavicon/AvatarFavicon.cjs.map +1 -1
  5. package/dist/components/AvatarFavicon/AvatarFavicon.d.cts.map +1 -1
  6. package/dist/components/AvatarFavicon/AvatarFavicon.d.mts.map +1 -1
  7. package/dist/components/AvatarFavicon/AvatarFavicon.mjs +1 -1
  8. package/dist/components/AvatarFavicon/AvatarFavicon.mjs.map +1 -1
  9. package/dist/components/AvatarNetwork/AvatarNetwork.cjs +1 -1
  10. package/dist/components/AvatarNetwork/AvatarNetwork.cjs.map +1 -1
  11. package/dist/components/AvatarNetwork/AvatarNetwork.d.cts.map +1 -1
  12. package/dist/components/AvatarNetwork/AvatarNetwork.d.mts.map +1 -1
  13. package/dist/components/AvatarNetwork/AvatarNetwork.mjs +1 -1
  14. package/dist/components/AvatarNetwork/AvatarNetwork.mjs.map +1 -1
  15. package/dist/components/AvatarToken/AvatarToken.cjs +1 -1
  16. package/dist/components/AvatarToken/AvatarToken.cjs.map +1 -1
  17. package/dist/components/AvatarToken/AvatarToken.d.cts.map +1 -1
  18. package/dist/components/AvatarToken/AvatarToken.d.mts.map +1 -1
  19. package/dist/components/AvatarToken/AvatarToken.mjs +1 -1
  20. package/dist/components/AvatarToken/AvatarToken.mjs.map +1 -1
  21. package/dist/components/BadgeWrapper/BadgeWrapper.cjs +31 -95
  22. package/dist/components/BadgeWrapper/BadgeWrapper.cjs.map +1 -1
  23. package/dist/components/BadgeWrapper/BadgeWrapper.d.cts.map +1 -1
  24. package/dist/components/BadgeWrapper/BadgeWrapper.d.mts.map +1 -1
  25. package/dist/components/BadgeWrapper/BadgeWrapper.mjs +29 -73
  26. package/dist/components/BadgeWrapper/BadgeWrapper.mjs.map +1 -1
  27. package/dist/components/BannerBase/BannerBase.cjs +88 -11
  28. package/dist/components/BannerBase/BannerBase.cjs.map +1 -1
  29. package/dist/components/BannerBase/BannerBase.d.cts.map +1 -1
  30. package/dist/components/BannerBase/BannerBase.d.mts.map +1 -1
  31. package/dist/components/BannerBase/BannerBase.mjs +66 -9
  32. package/dist/components/BannerBase/BannerBase.mjs.map +1 -1
  33. package/dist/components/ButtonBase/ButtonBase.cjs +1 -1
  34. package/dist/components/ButtonBase/ButtonBase.cjs.map +1 -1
  35. package/dist/components/ButtonBase/ButtonBase.mjs +1 -1
  36. package/dist/components/ButtonBase/ButtonBase.mjs.map +1 -1
  37. package/dist/components/Checkbox/Checkbox.cjs +2 -4
  38. package/dist/components/Checkbox/Checkbox.cjs.map +1 -1
  39. package/dist/components/Checkbox/Checkbox.d.cts.map +1 -1
  40. package/dist/components/Checkbox/Checkbox.d.mts.map +1 -1
  41. package/dist/components/Checkbox/Checkbox.mjs +2 -4
  42. package/dist/components/Checkbox/Checkbox.mjs.map +1 -1
  43. package/dist/components/Icon/assets/activity.svg +1 -1
  44. package/dist/components/Icon/assets/add-circle.svg +1 -1
  45. package/dist/components/Icon/assets/add.svg +1 -1
  46. package/dist/components/Icon/assets/after-hours.svg +1 -1
  47. package/dist/components/Icon/assets/ai.svg +1 -1
  48. package/dist/components/Icon/assets/arrow-2-down.svg +1 -1
  49. package/dist/components/Icon/assets/arrow-2-right.svg +1 -1
  50. package/dist/components/Icon/assets/arrow-2-up-right.svg +1 -1
  51. package/dist/components/Icon/assets/arrow-2-up.svg +1 -1
  52. package/dist/components/Icon/assets/arrow-down.svg +1 -1
  53. package/dist/components/Icon/assets/arrow-left.svg +1 -1
  54. package/dist/components/Icon/assets/arrow-right.svg +1 -1
  55. package/dist/components/Icon/assets/arrow-up.svg +1 -1
  56. package/dist/components/Icon/assets/attach-money.svg +1 -1
  57. package/dist/components/Icon/assets/backspace.svg +1 -1
  58. package/dist/components/Icon/assets/bank.svg +1 -1
  59. package/dist/components/Icon/assets/book.svg +1 -1
  60. package/dist/components/Icon/assets/bookmark.svg +1 -1
  61. package/dist/components/Icon/assets/calendar.svg +1 -1
  62. package/dist/components/Icon/assets/camera.svg +1 -1
  63. package/dist/components/Icon/assets/campaign.svg +1 -1
  64. package/dist/components/Icon/assets/candlestick.svg +1 -1
  65. package/dist/components/Icon/assets/card.svg +1 -1
  66. package/dist/components/Icon/assets/category.svg +1 -1
  67. package/dist/components/Icon/assets/chart.svg +1 -1
  68. package/dist/components/Icon/assets/check-bold.svg +1 -1
  69. package/dist/components/Icon/assets/check.svg +1 -1
  70. package/dist/components/Icon/assets/circle-x.svg +1 -1
  71. package/dist/components/Icon/assets/clock.svg +1 -1
  72. package/dist/components/Icon/assets/close.svg +1 -1
  73. package/dist/components/Icon/assets/code.svg +1 -1
  74. package/dist/components/Icon/assets/coin.svg +1 -1
  75. package/dist/components/Icon/assets/collapse.svg +1 -1
  76. package/dist/components/Icon/assets/confirmation.svg +1 -1
  77. package/dist/components/Icon/assets/connect.svg +1 -1
  78. package/dist/components/Icon/assets/copy.svg +1 -1
  79. package/dist/components/Icon/assets/customize.svg +1 -1
  80. package/dist/components/Icon/assets/danger.svg +1 -1
  81. package/dist/components/Icon/assets/data.svg +1 -1
  82. package/dist/components/Icon/assets/details.svg +1 -1
  83. package/dist/components/Icon/assets/diagram.svg +1 -1
  84. package/dist/components/Icon/assets/download.svg +1 -1
  85. package/dist/components/Icon/assets/edit.svg +1 -1
  86. package/dist/components/Icon/assets/error.svg +1 -1
  87. package/dist/components/Icon/assets/ethereum.svg +1 -1
  88. package/dist/components/Icon/assets/exchange.svg +1 -1
  89. package/dist/components/Icon/assets/expand.svg +1 -1
  90. package/dist/components/Icon/assets/explore.svg +1 -1
  91. package/dist/components/Icon/assets/export.svg +1 -1
  92. package/dist/components/Icon/assets/extension.svg +1 -1
  93. package/dist/components/Icon/assets/eye-slash.svg +1 -1
  94. package/dist/components/Icon/assets/eye.svg +1 -1
  95. package/dist/components/Icon/assets/face-id.svg +1 -1
  96. package/dist/components/Icon/assets/fingerprint.svg +1 -1
  97. package/dist/components/Icon/assets/fire.svg +1 -1
  98. package/dist/components/Icon/assets/flash-filled.svg +1 -1
  99. package/dist/components/Icon/assets/flash.svg +1 -1
  100. package/dist/components/Icon/assets/global.svg +1 -1
  101. package/dist/components/Icon/assets/hardware.svg +1 -1
  102. package/dist/components/Icon/assets/hierarchy.svg +1 -1
  103. package/dist/components/Icon/assets/image.svg +1 -1
  104. package/dist/components/Icon/assets/info.svg +1 -1
  105. package/dist/components/Icon/assets/loading.svg +1 -1
  106. package/dist/components/Icon/assets/lock.svg +1 -1
  107. package/dist/components/Icon/assets/logout.svg +1 -1
  108. package/dist/components/Icon/assets/mail.svg +1 -1
  109. package/dist/components/Icon/assets/menu.svg +1 -1
  110. package/dist/components/Icon/assets/merge.svg +1 -1
  111. package/dist/components/Icon/assets/minus-bold.svg +1 -1
  112. package/dist/components/Icon/assets/minus.svg +1 -1
  113. package/dist/components/Icon/assets/money-bag.svg +1 -1
  114. package/dist/components/Icon/assets/more-horizontal.svg +1 -1
  115. package/dist/components/Icon/assets/more-vertical.svg +1 -1
  116. package/dist/components/Icon/assets/musd.svg +1 -1
  117. package/dist/components/Icon/assets/notification.svg +1 -1
  118. package/dist/components/Icon/assets/people.svg +1 -1
  119. package/dist/components/Icon/assets/plant.svg +1 -1
  120. package/dist/components/Icon/assets/predictions.svg +1 -1
  121. package/dist/components/Icon/assets/qr-code.svg +1 -1
  122. package/dist/components/Icon/assets/question.svg +1 -1
  123. package/dist/components/Icon/assets/received.svg +1 -1
  124. package/dist/components/Icon/assets/refresh.svg +1 -1
  125. package/dist/components/Icon/assets/remove-minus.svg +1 -1
  126. package/dist/components/Icon/assets/rocket.svg +1 -1
  127. package/dist/components/Icon/assets/scan-barcode.svg +1 -1
  128. package/dist/components/Icon/assets/scan.svg +1 -1
  129. package/dist/components/Icon/assets/search.svg +1 -1
  130. package/dist/components/Icon/assets/security-search.svg +1 -1
  131. package/dist/components/Icon/assets/security-tick.svg +1 -1
  132. package/dist/components/Icon/assets/security.svg +1 -1
  133. package/dist/components/Icon/assets/send.svg +1 -1
  134. package/dist/components/Icon/assets/setting.svg +1 -1
  135. package/dist/components/Icon/assets/share.svg +1 -1
  136. package/dist/components/Icon/assets/shield-lock.svg +1 -1
  137. package/dist/components/Icon/assets/sms.svg +1 -1
  138. package/dist/components/Icon/assets/sparkle.svg +1 -1
  139. package/dist/components/Icon/assets/speed.svg +1 -1
  140. package/dist/components/Icon/assets/speedometer.svg +1 -1
  141. package/dist/components/Icon/assets/stake.svg +1 -1
  142. package/dist/components/Icon/assets/star-filled.svg +1 -1
  143. package/dist/components/Icon/assets/star.svg +1 -1
  144. package/dist/components/Icon/assets/swap-horizontal.svg +1 -1
  145. package/dist/components/Icon/assets/swap-vertical.svg +1 -3
  146. package/dist/components/Icon/assets/telegram.svg +1 -1
  147. package/dist/components/Icon/assets/thumb-down-filled.svg +1 -1
  148. package/dist/components/Icon/assets/thumb-down.svg +1 -1
  149. package/dist/components/Icon/assets/thumb-up-filled.svg +1 -1
  150. package/dist/components/Icon/assets/thumb-up.svg +1 -1
  151. package/dist/components/Icon/assets/tint.svg +1 -1
  152. package/dist/components/Icon/assets/trash.svg +1 -1
  153. package/dist/components/Icon/assets/trend-down.svg +1 -1
  154. package/dist/components/Icon/assets/trend-up.svg +1 -1
  155. package/dist/components/Icon/assets/trophy.svg +1 -1
  156. package/dist/components/Icon/assets/usb.svg +1 -1
  157. package/dist/components/Icon/assets/user-check.svg +1 -1
  158. package/dist/components/Icon/assets/user-circle-add.svg +1 -1
  159. package/dist/components/Icon/assets/user-circle.svg +1 -1
  160. package/dist/components/Icon/assets/verified-filled.svg +1 -1
  161. package/dist/components/Icon/assets/wallet.svg +1 -1
  162. package/dist/components/Icon/assets/warning.svg +1 -1
  163. package/dist/components/Icon/assets/wifi-off.svg +1 -1
  164. package/dist/components/Icon/assets/x.svg +1 -1
  165. package/dist/components/RadioButton/RadioButton.constants.cjs +1 -1
  166. package/dist/components/RadioButton/RadioButton.constants.cjs.map +1 -1
  167. package/dist/components/RadioButton/RadioButton.constants.mjs +1 -1
  168. package/dist/components/RadioButton/RadioButton.constants.mjs.map +1 -1
  169. package/dist/components/TextField/TextField.d.cts +1 -1
  170. package/dist/components/TextField/TextField.d.mts +1 -1
  171. package/dist/components/TextFieldSearch/TextFieldSearch.d.cts +1 -1
  172. package/dist/components/TextFieldSearch/TextFieldSearch.d.mts +1 -1
  173. package/dist/components/Toast/Toast.types.cjs.map +1 -1
  174. package/dist/components/Toast/Toast.types.d.cts +6 -0
  175. package/dist/components/Toast/Toast.types.d.cts.map +1 -1
  176. package/dist/components/Toast/Toast.types.d.mts +6 -0
  177. package/dist/components/Toast/Toast.types.d.mts.map +1 -1
  178. package/dist/components/Toast/Toast.types.mjs.map +1 -1
  179. package/dist/components/Toast/Toaster.cjs +9 -9
  180. package/dist/components/Toast/Toaster.cjs.map +1 -1
  181. package/dist/components/Toast/Toaster.d.cts.map +1 -1
  182. package/dist/components/Toast/Toaster.d.mts.map +1 -1
  183. package/dist/components/Toast/Toaster.mjs +9 -9
  184. package/dist/components/Toast/Toaster.mjs.map +1 -1
  185. package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.cjs +6 -3
  186. package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.cjs.map +1 -1
  187. package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.d.cts.map +1 -1
  188. package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.d.mts.map +1 -1
  189. package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.mjs +6 -3
  190. package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.mjs.map +1 -1
  191. package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.cjs.map +1 -1
  192. package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.d.cts +4 -3
  193. package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.d.cts.map +1 -1
  194. package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.d.mts +4 -3
  195. package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.d.mts.map +1 -1
  196. package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.mjs.map +1 -1
  197. package/package.json +9 -7
@@ -1 +1 @@
1
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m7 20-5-5 5-5 1.4 1.425-2.575 2.575h7.175v2h-7.175l2.575 2.575zm10-6-1.4-1.425 2.575-2.575h-7.175v-2h7.175l-2.575-2.575 1.4-1.425 5 5z"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M213.66,181.66l-32,32a8,8,0,0,1-11.32-11.32L188.69,184H48a8,8,0,0,1,0-16H188.69l-18.35-18.34a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,213.66,181.66Zm-139.32-64a8,8,0,0,0,11.32-11.32L67.31,88H208a8,8,0,0,0,0-16H67.31L85.66,53.66A8,8,0,0,0,74.34,42.34l-32,32a8,8,0,0,0,0,11.32Z"/></g></svg>
@@ -1,3 +1 @@
1
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M8 13V5.825L5.425 8.4L4 7L9 2L14 7L12.575 8.4L10 5.825V13H8ZM15 22L10 17L11.425 15.6L14 18.175V11H16V18.175L18.575 15.6L20 17L15 22Z" />
3
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M117.66,170.34a8,8,0,0,1,0,11.32l-32,32a8,8,0,0,1-11.32,0l-32-32a8,8,0,0,1,11.32-11.32L72,188.69V48a8,8,0,0,1,16,0V188.69l18.34-18.35A8,8,0,0,1,117.66,170.34Zm96-96-32-32a8,8,0,0,0-11.32,0l-32,32a8,8,0,0,0,11.32,11.32L168,67.31V208a8,8,0,0,0,16,0V67.31l18.34,18.35a8,8,0,0,0,11.32-11.32Z"/></g></svg>
@@ -1 +1 @@
1
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20.2949 3.81315C20.2949 3.81315 22.145 3.09173 21.9908 4.84377C21.9395 5.5652 21.4769 8.0902 21.1172 10.8213L19.8837 18.9117C19.8837 18.9117 19.781 20.0969 18.8559 20.303C17.9308 20.5091 16.5432 19.5816 16.2862 19.3754C16.0807 19.2209 12.4318 16.902 11.1469 15.7683C10.7872 15.4591 10.376 14.8407 11.1983 14.1193L16.5946 8.96625C17.2113 8.34787 17.828 6.90501 15.2584 8.65706L8.06338 13.5525C8.06338 13.5525 7.24109 14.0678 5.69933 13.604L2.35877 12.5734C2.35877 12.5734 1.12534 11.8004 3.23245 11.0274C8.37176 8.60549 14.6931 6.13201 20.2949 3.81315Z"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M228.88,26.19a9,9,0,0,0-9.16-1.57L17.06,103.93a14.22,14.22,0,0,0,2.43,27.21L72,141.45V200a15.92,15.92,0,0,0,10,14.83,15.91,15.91,0,0,0,17.51-3.73l25.32-26.26L165,220a15.88,15.88,0,0,0,10.51,4,16.3,16.3,0,0,0,5-.79,15.85,15.85,0,0,0,10.67-11.63L231.77,35A9,9,0,0,0,228.88,26.19Zm-61.14,36L78.15,126.35l-49.6-9.73ZM88,200V152.52l24.79,21.74Zm87.53,8L92.85,135.5l119-85.29Z"/></g></svg>
@@ -1 +1 @@
1
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m6 3h10v13l-7 7-1.25-1.25c-.11667-.1167-.2125-.275-.2875-.475s-.1125-.3917-.1125-.575v-.35l1.1-4.35h-5.45c-.53333 0-1-.2-1.4-.6s-.6-.8667-.6-1.4v-2c0-.1167.0125-.2417.0375-.375s.0625-.2583.1125-.375l3-7.05c.15-.33333.4-.61667.75-.85s.71667-.35 1.1-.35zm12 13v-13h4v13z"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M239.82,157l-12-96A24,24,0,0,0,204,40H32A16,16,0,0,0,16,56v88a16,16,0,0,0,16,16H75.06l37.78,75.58A8,8,0,0,0,120,240a40,40,0,0,0,40-40V184h56a24,24,0,0,0,23.82-27ZM72,144H32V56H72Z"/></g></svg>
@@ -1 +1 @@
1
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m6 3h11v13l-7 7-1.25-1.25c-.11667-.1167-.2125-.275-.2875-.475s-.1125-.3917-.1125-.575v-.35l1.1-4.35h-6.45c-.53333 0-1-.2-1.4-.6s-.6-.8667-.6-1.4v-2c0-.1167.01667-.2417.05-.375s.06667-.2583.1-.375l3-7.05c.15-.33333.4-.61667.75-.85s.71667-.35 1.1-.35zm9 2h-9l-3 7v2h9l-1.35 5.5 4.35-4.35zm2 11v-2h3v-9h-3v-2h5v13z"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M239.82,157l-12-96A24,24,0,0,0,204,40H32A16,16,0,0,0,16,56v88a16,16,0,0,0,16,16H75.06l37.78,75.58A8,8,0,0,0,120,240a40,40,0,0,0,40-40V184h56a24,24,0,0,0,23.82-27ZM72,144H32V56H72Zm150,21.29a7.88,7.88,0,0,1-6,2.71H152a8,8,0,0,0-8,8v24a24,24,0,0,1-19.29,23.54L88,150.11V56H204a8,8,0,0,1,7.94,7l12,96A7.87,7.87,0,0,1,222,165.29Z"/></g></svg>
@@ -1 +1 @@
1
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m18 21h-10v-13l7-7 1.25 1.25c.1167.11667.2125.275.2875.475s.1125.39167.1125.575v.35l-1.1 4.35h5.45c.5333 0 1 .2 1.4.6s.6.86667.6 1.4v2c0 .1167-.0125.2417-.0375.375s-.0625.2583-.1125.375l-3 7.05c-.15.3333-.4.6167-.75.85s-.7167.35-1.1.35zm-12-13v13h-4v-13z"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M234,80.12A24,24,0,0,0,216,72H160V56a40,40,0,0,0-40-40,8,8,0,0,0-7.16,4.42L75.06,96H32a16,16,0,0,0-16,16v88a16,16,0,0,0,16,16H204a24,24,0,0,0,23.82-21l12-96A24,24,0,0,0,234,80.12ZM32,112H72v88H32Z"/></g></svg>
@@ -1 +1 @@
1
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m18 21h-11v-13l7-7 1.25 1.25c.1167.11667.2125.275.2875.475s.1125.39167.1125.575v.35l-1.1 4.35h6.45c.5333 0 1 .2 1.4.6s.6.86667.6 1.4v2c0 .1167-.0167.2417-.05.375s-.0667.2583-.1.375l-3 7.05c-.15.3333-.4.6167-.75.85s-.7167.35-1.1.35zm-9-2h9l3-7v-2h-9l1.35-5.5-4.35 4.35zm-2-11v2h-3v9h3v2h-5v-13z"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M234,80.12A24,24,0,0,0,216,72H160V56a40,40,0,0,0-40-40,8,8,0,0,0-7.16,4.42L75.06,96H32a16,16,0,0,0-16,16v88a16,16,0,0,0,16,16H204a24,24,0,0,0,23.82-21l12-96A24,24,0,0,0,234,80.12ZM32,112H72v88H32ZM223.94,97l-12,96a8,8,0,0,1-7.94,7H88V105.89l36.71-73.43A24,24,0,0,1,144,56V80a8,8,0,0,0,8,8h64a8,8,0,0,1,7.94,9Z"/></g></svg>
@@ -1 +1 @@
1
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m12 21c-2.21667 0-4.10417-.7667-5.6625-2.3s-2.3375-3.4-2.3375-5.6c0-1.0833.20833-2.0958.625-3.0375.41667-.94167.99167-1.77917 1.725-2.5125l5.65-5.55 5.65 5.55c.7333.73333 1.3083 1.57083 1.725 2.5125.4167.9417.625 1.9542.625 3.0375 0 2.2-.7792 4.0667-2.3375 5.6s-3.4458 2.3-5.6625 2.3zm-5.95-7h11.85c.2-1.2.0875-2.225-.3375-3.075s-.8625-1.49167-1.3125-1.925l-4.25-4.2-4.25 4.2c-.45.43333-.89167 1.075-1.325 1.925s-.55833 1.875-.375 3.075z"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M174,47.75a254.19,254.19,0,0,0-41.45-38.3,8,8,0,0,0-9.18,0A254.19,254.19,0,0,0,82,47.75C54.51,79.32,40,112.6,40,144a88,88,0,0,0,176,0C216,112.6,201.49,79.32,174,47.75ZM128,216a72.08,72.08,0,0,1-72-72c0-57.23,55.47-105,72-118,16.53,13,72,60.75,72,118A72.08,72.08,0,0,1,128,216Zm55.89-62.66a57.6,57.6,0,0,1-46.56,46.55A8.75,8.75,0,0,1,136,200a8,8,0,0,1-1.32-15.89c16.57-2.79,30.63-16.85,33.44-33.45a8,8,0,0,1,15.78,2.68Z"/></g></svg>
@@ -1 +1 @@
1
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m7 21c-.55 0-1.02083-.1958-1.4125-.5875s-.5875-.8625-.5875-1.4125v-13h-1v-2h5v-1h6v1h5v2h-1v13c0 .55-.1958 1.0208-.5875 1.4125s-.8625.5875-1.4125.5875zm10-15h-10v13h10zm-8 11h2v-9h-2zm4 0h2v-9h-2z"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"/></g></svg>
@@ -1 +1 @@
1
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m16 18v-2h2.6l-5.2-5.15-4 4-7.4-7.45 1.4-1.4 6 6 4-4 6.6 6.6v-2.6h2v6z"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M240,128v64a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h44.69L136,107.31l-34.34,34.35a8,8,0,0,1-11.32,0l-72-72A8,8,0,0,1,29.66,58.34L96,124.69l34.34-34.35a8,8,0,0,1,11.32,0L224,172.69V128a8,8,0,0,1,16,0Z"/></g></svg>
@@ -1 +1 @@
1
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m3.4 18-1.4-1.4 7.4-7.45 4 4 5.2-5.15h-2.6v-2h6v6h-2v-2.6l-6.6 6.6-4-4z"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M240,56v64a8,8,0,0,1-16,0V75.31l-82.34,82.35a8,8,0,0,1-11.32,0L96,123.31,29.66,189.66a8,8,0,0,1-11.32-11.32l72-72a8,8,0,0,1,11.32,0L136,140.69,212.69,64H168a8,8,0,0,1,0-16h64A8,8,0,0,1,240,56Z"/></g></svg>
@@ -1 +1 @@
1
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m7 21v-2h4v-3.1c-.8167-.1833-1.54583-.5292-2.1875-1.0375s-1.1125-1.1458-1.4125-1.9125c-1.25-.15-2.29583-.6958-3.1375-1.6375s-1.2625-2.04583-1.2625-3.3125v-1c0-.55.19583-1.02083.5875-1.4125s.8625-.5875 1.4125-.5875h2v-2h10v2h2c.55 0 1.0208.19583 1.4125.5875s.5875.8625.5875 1.4125v1c0 1.26667-.4208 2.3708-1.2625 3.3125s-1.8875 1.4875-3.1375 1.6375c-.3.7667-.7708 1.4042-1.4125 1.9125s-1.3708.8542-2.1875 1.0375v3.1h4v2zm0-10.2v-3.8h-2v1c0 .63333.18333 1.20417.55 1.7125.36667.5083.85.8708 1.45 1.0875zm7.125 2.325c.5833-.5833.875-1.2917.875-2.125v-6h-6v6c0 .8333.29167 1.5417.875 2.125.5833.5833 1.2917.875 2.125.875s1.5417-.2917 2.125-.875zm2.875-2.325c.6-.2167 1.0833-.5792 1.45-1.0875.3667-.50833.55-1.07917.55-1.7125v-1h-2z"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M232,64H208V48a8,8,0,0,0-8-8H56a8,8,0,0,0-8,8V64H24A16,16,0,0,0,8,80V96a40,40,0,0,0,40,40h3.65A80.13,80.13,0,0,0,120,191.61V216H96a8,8,0,0,0,0,16h64a8,8,0,0,0,0-16H136V191.58c31.94-3.23,58.44-25.64,68.08-55.58H208a40,40,0,0,0,40-40V80A16,16,0,0,0,232,64ZM48,120A24,24,0,0,1,24,96V80H48v32q0,4,.39,8Zm144-8.9c0,35.52-29,64.64-64,64.9a64,64,0,0,1-64-64V56H192ZM232,96a24,24,0,0,1-24,24h-.5a81.81,81.81,0,0,0,.5-8.9V80h24Z"/></g></svg>
@@ -1 +1 @@
1
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m12 22c-.55 0-1.0208-.1958-1.4125-.5875s-.5875-.8625-.5875-1.4125c0-.35.0917-.675.275-.975s.425-.5417.725-.725v-2.3h-3c-.55 0-1.02083-.1958-1.4125-.5875s-.5875-.8625-.5875-1.4125v-2.3c-.3-.15-.54167-.375-.725-.675s-.275-.6417-.275-1.025c0-.55.19583-1.02083.5875-1.4125s.8625-.5875 1.4125-.5875 1.02083.19583 1.4125.5875.5875.8625.5875 1.4125c0 .3833-.09167.7167-.275 1s-.425.5167-.725.7v2.3h3v-8h-2l3-4 3 4h-2v8h3v-2h-1v-4h4v4h-1v2c0 .55-.1958 1.0208-.5875 1.4125s-.8625.5875-1.4125.5875h-3v2.3c.3167.1667.5625.4.7375.7s.2625.6333.2625 1c0 .55-.1958 1.0208-.5875 1.4125s-.8625.5875-1.4125.5875z"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M252.44,121.34l-48-32A8,8,0,0,0,192,96v24H72V72h33a32,32,0,1,0,0-16H72A16,16,0,0,0,56,72v48H8a8,8,0,0,0,0,16H56v48a16,16,0,0,0,16,16h32v8a16,16,0,0,0,16,16h32a16,16,0,0,0,16-16V176a16,16,0,0,0-16-16H120a16,16,0,0,0-16,16v8H72V136H192v24a8,8,0,0,0,12.44,6.66l48-32a8,8,0,0,0,0-13.32ZM136,48a16,16,0,1,1-16,16A16,16,0,0,1,136,48ZM120,176h32v32H120Zm88-30.95V111l25.58,17Z"/></g></svg>
@@ -1 +1 @@
1
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m17.55 12-3.55-3.55 1.425-1.4 2.125 2.125 4.25-4.25 1.4 1.425zm-8.55 0c-1.1 0-2.04167-.3917-2.825-1.175s-1.175-1.725-1.175-2.825.39167-2.04167 1.175-2.825 1.725-1.175 2.825-1.175 2.0417.39167 2.825 1.175 1.175 1.725 1.175 2.825-.3917 2.0417-1.175 2.825-1.725 1.175-2.825 1.175zm-8 8v-2.8c0-.5667.14583-1.0875.4375-1.5625s.67917-.8375 1.1625-1.0875c1.03333-.5167 2.08333-.9042 3.15-1.1625s2.15-.3875 3.25-.3875 2.1833.1292 3.25.3875 2.1167.6458 3.15 1.1625c.4833.25.8708.6125 1.1625 1.0875s.4375.9958.4375 1.5625v2.8zm2-2h12v-.8c0-.1833-.0458-.35-.1375-.5s-.2125-.2667-.3625-.35c-.9-.45-1.8083-.7875-2.725-1.0125s-1.84167-.3375-2.775-.3375-1.85833.1125-2.775.3375-1.825.5625-2.725 1.0125c-.15.0833-.27083.2-.3625.35s-.1375.3167-.1375.5zm6-8c.55 0 1.0208-.19583 1.4125-.5875s.5875-.8625.5875-1.4125-.1958-1.02083-.5875-1.4125-.8625-.5875-1.4125-.5875-1.02083.19583-1.4125.5875-.5875.8625-.5875 1.4125.19583 1.02083.5875 1.4125.8625.5875 1.4125.5875z"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M144,157.68a68,68,0,1,0-71.9,0c-20.65,6.76-39.23,19.39-54.17,37.17a8,8,0,0,0,12.25,10.3C50.25,181.19,77.91,168,108,168s57.75,13.19,77.87,37.15a8,8,0,0,0,12.25-10.3C183.18,177.07,164.6,164.44,144,157.68ZM56,100a52,52,0,1,1,52,52A52.06,52.06,0,0,1,56,100Zm197.66,33.66-32,32a8,8,0,0,1-11.32,0l-16-16a8,8,0,0,1,11.32-11.32L216,148.69l26.34-26.35a8,8,0,0,1,11.32,11.32Z"/></g></svg>
@@ -1 +1 @@
1
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m18 14v-3h-3v-2h3v-3h2v3h3v2h-3v3zm-9-2c-1.1 0-2.04167-.3917-2.825-1.175s-1.175-1.725-1.175-2.825.39167-2.04167 1.175-2.825 1.725-1.175 2.825-1.175 2.0417.39167 2.825 1.175 1.175 1.725 1.175 2.825-.3917 2.0417-1.175 2.825-1.725 1.175-2.825 1.175zm-8 8v-2.8c0-.5667.14583-1.0875.4375-1.5625s.67917-.8375 1.1625-1.0875c1.03333-.5167 2.08333-.9042 3.15-1.1625s2.15-.3875 3.25-.3875 2.1833.1292 3.25.3875 2.1167.6458 3.15 1.1625c.4833.25.8708.6125 1.1625 1.0875s.4375.9958.4375 1.5625v2.8zm2-2h12v-.8c0-.1833-.0458-.35-.1375-.5s-.2125-.2667-.3625-.35c-.9-.45-1.8083-.7875-2.725-1.0125s-1.84167-.3375-2.775-.3375-1.85833.1125-2.775.3375-1.825.5625-2.725 1.0125c-.15.0833-.27083.2-.3625.35s-.1375.3167-.1375.5zm6-8c.55 0 1.0208-.19583 1.4125-.5875s.5875-.8625.5875-1.4125-.1958-1.02083-.5875-1.4125-.8625-.5875-1.4125-.5875-1.02083.19583-1.4125.5875-.5875.8625-.5875 1.4125.19583 1.02083.5875 1.4125.8625.5875 1.4125.5875z"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M256,136a8,8,0,0,1-8,8H232v16a8,8,0,0,1-16,0V144H200a8,8,0,0,1,0-16h16V112a8,8,0,0,1,16,0v16h16A8,8,0,0,1,256,136Zm-57.87,58.85a8,8,0,0,1-12.26,10.3C165.75,181.19,138.09,168,108,168s-57.75,13.19-77.87,37.15a8,8,0,0,1-12.25-10.3c14.94-17.78,33.52-30.41,54.17-37.17a68,68,0,1,1,71.9,0C164.6,164.44,183.18,177.07,198.13,194.85ZM108,152a52,52,0,1,0-52-52A52.06,52.06,0,0,0,108,152Z"/></g></svg>
@@ -1 +1 @@
1
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m5.85 17.1c.85-.65 1.8-1.1625 2.85-1.5375s2.15-.5625 3.3-.5625 2.25.1875 3.3.5625 2 .8875 2.85 1.5375c.5833-.6833 1.0375-1.4583 1.3625-2.325s.4875-1.7917.4875-2.775c0-2.21667-.7792-4.10417-2.3375-5.6625s-3.4458-2.3375-5.6625-2.3375c-2.21667 0-4.10417.77917-5.6625 2.3375s-2.3375 3.44583-2.3375 5.6625c0 .9833.1625 1.9083.4875 2.775s.77917 1.6417 1.3625 2.325zm6.15-4.1c-.9833 0-1.8125-.3375-2.4875-1.0125s-1.0125-1.5042-1.0125-2.4875c0-.98333.3375-1.8125 1.0125-2.4875s1.5042-1.0125 2.4875-1.0125 1.8125.3375 2.4875 1.0125 1.0125 1.50417 1.0125 2.4875c0 .9833-.3375 1.8125-1.0125 2.4875s-1.5042 1.0125-2.4875 1.0125zm0 9c-1.3833 0-2.68333-.2625-3.9-.7875s-2.275-1.2375-3.175-2.1375-1.6125-1.9583-2.1375-3.175-.7875-2.5167-.7875-3.9.2625-2.68333.7875-3.9 1.2375-2.275 2.1375-3.175 1.95833-1.6125 3.175-2.1375 2.5167-.7875 3.9-.7875 2.6833.2625 3.9.7875 2.275 1.2375 3.175 2.1375 1.6125 1.95833 2.1375 3.175.7875 2.5167.7875 3.9-.2625 2.6833-.7875 3.9-1.2375 2.275-2.1375 3.175-1.9583 1.6125-3.175 2.1375-2.5167.7875-3.9.7875zm0-2c.8833 0 1.7167-.1292 2.5-.3875s1.5-.6292 2.15-1.1125c-.65-.4833-1.3667-.8542-2.15-1.1125s-1.6167-.3875-2.5-.3875-1.7167.1292-2.5.3875c-.78333.2583-1.5.6292-2.15 1.1125.65.4833 1.36667.8542 2.15 1.1125.7833.2583 1.6167.3875 2.5.3875zm0-9c.4333 0 .7917-.1417 1.075-.425s.425-.64167.425-1.075-.1417-.79167-.425-1.075-.6417-.425-1.075-.425-.7917.14167-1.075.425-.425.64167-.425 1.075.1417.7917.425 1.075.6417.425 1.075.425z"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24ZM74.08,197.5a64,64,0,0,1,107.84,0,87.83,87.83,0,0,1-107.84,0ZM96,120a32,32,0,1,1,32,32A32,32,0,0,1,96,120Zm97.76,66.41a79.66,79.66,0,0,0-36.06-28.75,48,48,0,1,0-59.4,0,79.66,79.66,0,0,0-36.06,28.75,88,88,0,1,1,131.52,0Z"/></g></svg>
@@ -1 +1 @@
1
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m8.6 22.5-1.9-3.2-3.6-.8.35-3.7-2.45-2.8 2.45-2.8-.35-3.7 3.6-.8 1.9-3.2 3.4 1.45 3.4-1.45 1.9 3.2 3.6.8-.35 3.7 2.45 2.8-2.45 2.8.35 3.7-3.6.8-1.9 3.2-3.4-1.45zm2.35-6.95 5.65-5.65-1.4-1.45-4.25 4.25-2.15-2.1-1.4 1.4z"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M225.86,102.82c-3.77-3.94-7.67-8-9.14-11.57-1.36-3.27-1.44-8.69-1.52-13.94-.15-9.76-.31-20.82-8-28.51s-18.75-7.85-28.51-8c-5.25-.08-10.67-.16-13.94-1.52-3.56-1.47-7.63-5.37-11.57-9.14C146.28,23.51,138.44,16,128,16s-18.27,7.51-25.18,14.14c-3.94,3.77-8,7.67-11.57,9.14C88,40.64,82.56,40.72,77.31,40.8c-9.76.15-20.82.31-28.51,8S41,67.55,40.8,77.31c-.08,5.25-.16,10.67-1.52,13.94-1.47,3.56-5.37,7.63-9.14,11.57C23.51,109.72,16,117.56,16,128s7.51,18.27,14.14,25.18c3.77,3.94,7.67,8,9.14,11.57,1.36,3.27,1.44,8.69,1.52,13.94.15,9.76.31,20.82,8,28.51s18.75,7.85,28.51,8c5.25.08,10.67.16,13.94,1.52,3.56,1.47,7.63,5.37,11.57,9.14C109.72,232.49,117.56,240,128,240s18.27-7.51,25.18-14.14c3.94-3.77,8-7.67,11.57-9.14,3.27-1.36,8.69-1.44,13.94-1.52,9.76-.15,20.82-.31,28.51-8s7.85-18.75,8-28.51c.08-5.25.16-10.67,1.52-13.94,1.47-3.56,5.37-7.63,9.14-11.57C232.49,146.28,240,138.44,240,128S232.49,109.73,225.86,102.82Zm-52.2,6.84-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"/></g></svg>
@@ -1 +1 @@
1
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m5 21c-.55 0-1.02083-.1958-1.4125-.5875s-.5875-.8625-.5875-1.4125v-14c0-.55.19583-1.02083.5875-1.4125s.8625-.5875 1.4125-.5875h14c.55 0 1.0208.19583 1.4125.5875s.5875.8625.5875 1.4125v2.5h-2v-2.5h-14v14h14v-2.5h2v2.5c0 .55-.1958 1.0208-.5875 1.4125s-.8625.5875-1.4125.5875zm8-4c-.55 0-1.0208-.1958-1.4125-.5875s-.5875-.8625-.5875-1.4125v-6c0-.55.1958-1.02083.5875-1.4125s.8625-.5875 1.4125-.5875h7c.55 0 1.0208.19583 1.4125.5875s.5875.8625.5875 1.4125v6c0 .55-.1958 1.0208-.5875 1.4125s-.8625.5875-1.4125.5875zm7-2v-6h-7v6zm-4-1.5c.4167 0 .7708-.1458 1.0625-.4375s.4375-.6458.4375-1.0625-.1458-.7708-.4375-1.0625-.6458-.4375-1.0625-.4375-.7708.1458-1.0625.4375-.4375.6458-.4375 1.0625.1458.7708.4375 1.0625.6458.4375 1.0625.4375z"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M216,64H56a8,8,0,0,1,0-16H192a8,8,0,0,0,0-16H56A24,24,0,0,0,32,56V184a24,24,0,0,0,24,24H216a16,16,0,0,0,16-16V80A16,16,0,0,0,216,64Zm0,128H56a8,8,0,0,1-8-8V78.63A23.84,23.84,0,0,0,56,80H216Zm-48-60a12,12,0,1,1,12,12A12,12,0,0,1,168,132Z"/></g></svg>
@@ -1 +1 @@
1
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m12 17c.2833 0 .5208-.0958.7125-.2875s.2875-.4292.2875-.7125-.0958-.5208-.2875-.7125-.4292-.2875-.7125-.2875-.5208.0958-.7125.2875-.2875.4292-.2875.7125.0958.5208.2875.7125.4292.2875.7125.2875zm-1-4h2v-6h-2zm1 9c-1.3833 0-2.68333-.2625-3.9-.7875s-2.275-1.2375-3.175-2.1375-1.6125-1.9583-2.1375-3.175-.7875-2.5167-.7875-3.9.2625-2.68333.7875-3.9 1.2375-2.275 2.1375-3.175 1.95833-1.6125 3.175-2.1375 2.5167-.7875 3.9-.7875 2.6833.2625 3.9.7875 2.275 1.2375 3.175 2.1375 1.6125 1.95833 2.1375 3.175.7875 2.5167.7875 3.9-.2625 2.6833-.7875 3.9-1.2375 2.275-2.1375 3.175-1.9583 1.6125-3.175 2.1375-2.5167.7875-3.9.7875zm0-2c2.2333 0 4.125-.775 5.675-2.325s2.325-3.4417 2.325-5.675c0-2.23333-.775-4.125-2.325-5.675s-3.4417-2.325-5.675-2.325c-2.23333 0-4.125.775-5.675 2.325s-2.325 3.44167-2.325 5.675c0 2.2333.775 4.125 2.325 5.675s3.44167 2.325 5.675 2.325z"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z"/></g></svg>
@@ -1 +1 @@
1
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><clipPath id="a"><path d="m0 0h24v24h-24z"/></clipPath><g clip-path="url(#a)"><path d="m19.75 22.6-9.4-9.4499c-.78333.1833-1.5125.4583-2.1875.8249-.675.3667-1.27917.825-1.8125 1.375l-2.1-2.15c.53333-.5333 1.10833-1 1.725-1.4s1.275-.75 1.975-1.05l-2.25-2.24995c-.68333.35-1.32083.7375-1.9125 1.1625-.59167.42495-1.15417.90415-1.6875 1.43745l-2.1-2.14995c.533333-.53333 1.0875-1.0125 1.6625-1.4375s1.1875-.82917 1.8375-1.2125l-2.1-2.1 1.4-1.4 18.4 18.40005zm-7.75-1.6c-.7 0-1.2917-.2458-1.775-.7374-.48333-.4917-.725-1.0792-.725-1.7625 0-.7001.24167-1.2917.725-1.7751.4833-.4833 1.075-.725 1.775-.725s1.2917.2417 1.775.725c.4833.4834.725 1.075.725 1.7751 0 .6833-.2417 1.2708-.725 1.7625-.4833.4916-1.075.7374-1.775.7374zm5.9-5.95-.725-.725-.725-.725-3.6-3.6c1.35.1334 2.6125.475 3.7875 1.025s2.2125 1.275 3.1125 2.175zm4-3.95c-1.2833-1.28328-2.7708-2.28745-4.4625-3.01245s-3.5042-1.0875-5.4375-1.0875c-.35 0-.6875.0125-1.0125.0375s-.6542.0625-.9875.1125l-2.55-2.55c.73333-.2 1.47917-.35 2.2375-.45.7583-.1 1.5292-.15 2.3125-.15 2.3667 0 4.575.44167 6.625 1.325s3.8417 2.09167 5.375 3.625z"/></g></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M213.92,210.62a8,8,0,1,1-11.84,10.76l-52-57.15a60,60,0,0,0-57.41,7.24,8,8,0,1,1-9.42-12.93A75.43,75.43,0,0,1,128,144c1.28,0,2.55,0,3.82.1L104.9,114.49A108,108,0,0,0,61,135.31,8,8,0,0,1,49.73,134,8,8,0,0,1,51,122.77a124.27,124.27,0,0,1,41.71-21.66L69.37,75.4a155.43,155.43,0,0,0-40.29,24A8,8,0,0,1,18.92,87,171.87,171.87,0,0,1,58,62.86L42.08,45.38A8,8,0,1,1,53.92,34.62ZM128,192a12,12,0,1,0,12,12A12,12,0,0,0,128,192ZM237.08,87A172.3,172.3,0,0,0,106,49.4a8,8,0,1,0,2,15.87A158.33,158.33,0,0,1,128,64a156.25,156.25,0,0,1,98.92,35.37A8,8,0,0,0,237.08,87ZM195,135.31a8,8,0,0,0,11.24-1.3,8,8,0,0,0-1.3-11.24,124.25,124.25,0,0,0-51.73-24.2A8,8,0,1,0,150,114.24,108.12,108.12,0,0,1,195,135.31Z"/></g></svg>
@@ -1 +1 @@
1
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m20.9959 20.8-7.036-10.2576.012.0096 6.344-7.35205h-2.12l-5.168 5.984-4.10399-5.984h-5.56l6.5688 9.57685-.0008-.0008-6.928 8.024h2.12l5.74559-6.6576 4.5664 6.6576zm-12.91199-16.00005 9.87199 14.40005h-1.68l-9.87999-14.40005z"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M214.75,211.71l-62.6-98.38,61.77-67.95a8,8,0,0,0-11.84-10.76L143.24,99.34,102.75,35.71A8,8,0,0,0,96,32H48a8,8,0,0,0-6.75,12.3l62.6,98.37-61.77,68a8,8,0,1,0,11.84,10.76l58.84-64.72,40.49,63.63A8,8,0,0,0,160,224h48a8,8,0,0,0,6.75-12.29ZM164.39,208,62.57,48h29L193.43,208Z"/></g></svg>
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SAMPLE_RADIOBUTTON_PROPS = void 0;
4
4
  // Sample props for stories and tests
5
5
  exports.SAMPLE_RADIOBUTTON_PROPS = {
6
- label: 'Sample RadioButton Label',
6
+ label: 'Sample radio button label',
7
7
  isChecked: false,
8
8
  isDisabled: false,
9
9
  isReadOnly: false,
@@ -1 +1 @@
1
- {"version":3,"file":"RadioButton.constants.cjs","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.constants.ts"],"names":[],"mappings":";;;AAEA,qCAAqC;AACxB,QAAA,wBAAwB,GAAqB;IACxD,KAAK,EAAE,0BAA0B;IACjC,SAAS,EAAE,KAAK;IAChB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,KAAK;CAChB,CAAC","sourcesContent":["import type { RadioButtonProps } from './RadioButton.types';\n\n// Sample props for stories and tests\nexport const SAMPLE_RADIOBUTTON_PROPS: RadioButtonProps = {\n label: 'Sample RadioButton Label',\n isChecked: false,\n isDisabled: false,\n isReadOnly: false,\n isDanger: false,\n};\n"]}
1
+ {"version":3,"file":"RadioButton.constants.cjs","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.constants.ts"],"names":[],"mappings":";;;AAEA,qCAAqC;AACxB,QAAA,wBAAwB,GAAqB;IACxD,KAAK,EAAE,2BAA2B;IAClC,SAAS,EAAE,KAAK;IAChB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,KAAK;CAChB,CAAC","sourcesContent":["import type { RadioButtonProps } from './RadioButton.types';\n\n// Sample props for stories and tests\nexport const SAMPLE_RADIOBUTTON_PROPS: RadioButtonProps = {\n label: 'Sample radio button label',\n isChecked: false,\n isDisabled: false,\n isReadOnly: false,\n isDanger: false,\n};\n"]}
@@ -1,6 +1,6 @@
1
1
  // Sample props for stories and tests
2
2
  export const SAMPLE_RADIOBUTTON_PROPS = {
3
- label: 'Sample RadioButton Label',
3
+ label: 'Sample radio button label',
4
4
  isChecked: false,
5
5
  isDisabled: false,
6
6
  isReadOnly: false,
@@ -1 +1 @@
1
- {"version":3,"file":"RadioButton.constants.mjs","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.constants.ts"],"names":[],"mappings":"AAEA,qCAAqC;AACrC,MAAM,CAAC,MAAM,wBAAwB,GAAqB;IACxD,KAAK,EAAE,0BAA0B;IACjC,SAAS,EAAE,KAAK;IAChB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,KAAK;CAChB,CAAC","sourcesContent":["import type { RadioButtonProps } from './RadioButton.types';\n\n// Sample props for stories and tests\nexport const SAMPLE_RADIOBUTTON_PROPS: RadioButtonProps = {\n label: 'Sample RadioButton Label',\n isChecked: false,\n isDisabled: false,\n isReadOnly: false,\n isDanger: false,\n};\n"]}
1
+ {"version":3,"file":"RadioButton.constants.mjs","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.constants.ts"],"names":[],"mappings":"AAEA,qCAAqC;AACrC,MAAM,CAAC,MAAM,wBAAwB,GAAqB;IACxD,KAAK,EAAE,2BAA2B;IAClC,SAAS,EAAE,KAAK;IAChB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,KAAK;CAChB,CAAC","sourcesContent":["import type { RadioButtonProps } from './RadioButton.types';\n\n// Sample props for stories and tests\nexport const SAMPLE_RADIOBUTTON_PROPS: RadioButtonProps = {\n label: 'Sample radio button label',\n isChecked: false,\n isDisabled: false,\n isReadOnly: false,\n isDanger: false,\n};\n"]}
@@ -169,5 +169,5 @@ export declare const TextField: import("react").ForwardRefExoticComponent<Omit<i
169
169
  twClassName?: string | undefined;
170
170
  style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
171
171
  testID?: string | undefined;
172
- } & Omit<import("../Box/index.cjs").BoxProps, "children" | "style" | "testID" | "onBlur" | "onFocus" | "accessible" | "twClassName" | "startAccessory" | "endAccessory" | "isDisabled" | "value" | "autoFocus" | "onChangeText" | "placeholder" | "isReadOnly" | "isError" | "inputElement" | "inputProps" | "inputRef"> & import("react").RefAttributes<View>>;
172
+ } & Omit<import("../Box/index.cjs").BoxProps, "children" | "style" | "testID" | "onBlur" | "onFocus" | "accessible" | "twClassName" | "startAccessory" | "endAccessory" | "isDisabled" | "placeholder" | "value" | "autoFocus" | "onChangeText" | "isReadOnly" | "isError" | "inputElement" | "inputProps" | "inputRef"> & import("react").RefAttributes<View>>;
173
173
  //# sourceMappingURL=TextField.d.cts.map
@@ -169,5 +169,5 @@ export declare const TextField: import("react").ForwardRefExoticComponent<Omit<i
169
169
  twClassName?: string | undefined;
170
170
  style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
171
171
  testID?: string | undefined;
172
- } & Omit<import("../Box/index.mjs").BoxProps, "children" | "style" | "testID" | "onBlur" | "onFocus" | "accessible" | "twClassName" | "startAccessory" | "endAccessory" | "isDisabled" | "value" | "autoFocus" | "onChangeText" | "placeholder" | "isReadOnly" | "isError" | "inputElement" | "inputProps" | "inputRef"> & import("react").RefAttributes<View>>;
172
+ } & Omit<import("../Box/index.mjs").BoxProps, "children" | "style" | "testID" | "onBlur" | "onFocus" | "accessible" | "twClassName" | "startAccessory" | "endAccessory" | "isDisabled" | "placeholder" | "value" | "autoFocus" | "onChangeText" | "isReadOnly" | "isError" | "inputElement" | "inputProps" | "inputRef"> & import("react").RefAttributes<View>>;
173
173
  //# sourceMappingURL=TextField.d.mts.map
@@ -170,7 +170,7 @@ export declare const TextFieldSearch: React.ForwardRefExoticComponent<Omit<impor
170
170
  twClassName?: string | undefined;
171
171
  style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
172
172
  testID?: string | undefined;
173
- } & Omit<import("../index.cjs").BoxProps, "children" | "style" | "testID" | "onBlur" | "onFocus" | "accessible" | "twClassName" | "startAccessory" | "endAccessory" | "isDisabled" | "value" | "autoFocus" | "onChangeText" | "placeholder" | "isReadOnly" | "isError" | "inputElement" | "inputProps" | "inputRef"> & {
173
+ } & Omit<import("../index.cjs").BoxProps, "children" | "style" | "testID" | "onBlur" | "onFocus" | "accessible" | "twClassName" | "startAccessory" | "endAccessory" | "isDisabled" | "placeholder" | "value" | "autoFocus" | "onChangeText" | "isReadOnly" | "isError" | "inputElement" | "inputProps" | "inputRef"> & {
174
174
  clearButtonProps?: Partial<import("../ButtonIcon/index.cjs").ButtonIconProps> | undefined;
175
175
  onPressClearButton: () => void;
176
176
  } & React.RefAttributes<View>>;
@@ -170,7 +170,7 @@ export declare const TextFieldSearch: React.ForwardRefExoticComponent<Omit<impor
170
170
  twClassName?: string | undefined;
171
171
  style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
172
172
  testID?: string | undefined;
173
- } & Omit<import("../index.mjs").BoxProps, "children" | "style" | "testID" | "onBlur" | "onFocus" | "accessible" | "twClassName" | "startAccessory" | "endAccessory" | "isDisabled" | "value" | "autoFocus" | "onChangeText" | "placeholder" | "isReadOnly" | "isError" | "inputElement" | "inputProps" | "inputRef"> & {
173
+ } & Omit<import("../index.mjs").BoxProps, "children" | "style" | "testID" | "onBlur" | "onFocus" | "accessible" | "twClassName" | "startAccessory" | "endAccessory" | "isDisabled" | "placeholder" | "value" | "autoFocus" | "onChangeText" | "isReadOnly" | "isError" | "inputElement" | "inputProps" | "inputRef"> & {
174
174
  clearButtonProps?: Partial<import("../ButtonIcon/index.mjs").ButtonIconProps> | undefined;
175
175
  onPressClearButton: () => void;
176
176
  } & React.RefAttributes<View>>;
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.types.cjs","sourceRoot":"","sources":["../../../src/components/Toast/Toast.types.ts"],"names":[],"mappings":";;;AACA,kFAAwE;AAM/D,8FANA,oCAAa,OAMA","sourcesContent":["import type { ToastPropsShared } from '@metamask-previews/design-system-shared';\nimport { ToastSeverity } from '@metamask-previews/design-system-shared';\nimport type { ViewProps } from 'react-native';\n\nimport type { BannerBaseProps } from '../BannerBase';\nimport type { IconProps } from '../Icon/Icon.types';\n\nexport { ToastSeverity };\nexport type { ToastPropsShared };\n\n/**\n * Optional props for the leading severity `Icon`.\n */\nexport type ToastIconProps = Omit<IconProps, 'name' | 'size' | 'color'>;\n\n/**\n * Shared toast props aligned with BannerBase, plus optional severity/icon props.\n */\nexport type ToastSharedProps = Omit<BannerBaseProps, 'closeButtonProps'> & {\n closeButtonProps?: Omit<\n NonNullable<BannerBaseProps['closeButtonProps']>,\n 'onPress'\n >;\n severity?: ToastSeverity;\n iconAlertProps?: ToastIconProps;\n};\n\n/**\n * Toast options used by the imperative `toast(...)` API.\n */\nexport type ToastOptions = ToastSharedProps & {\n hasNoTimeout?: boolean;\n topOffset?: number;\n};\n\n/**\n * Toaster component reference.\n */\nexport type ToasterRef = {\n showToast: (toastOptions: ToastOptions) => void;\n closeToast: () => void;\n};\n\n/**\n * Toast component props intended for direct rendering of a single toast surface.\n */\nexport type ToastProps = ToastSharedProps;\n\n/**\n * Toaster component props.\n * Extends ViewProps to inherit standard React Native props such as testID and accessibilityLabel.\n */\nexport type ToasterProps = {\n /**\n * Optional Tailwind CSS classes for the toast container.\n */\n twClassName?: string;\n} & Omit<ViewProps, 'style'>;\n"]}
1
+ {"version":3,"file":"Toast.types.cjs","sourceRoot":"","sources":["../../../src/components/Toast/Toast.types.ts"],"names":[],"mappings":";;;AACA,kFAAwE;AAM/D,8FANA,oCAAa,OAMA","sourcesContent":["import type { ToastPropsShared } from '@metamask-previews/design-system-shared';\nimport { ToastSeverity } from '@metamask-previews/design-system-shared';\nimport type { ViewProps } from 'react-native';\n\nimport type { BannerBaseProps } from '../BannerBase';\nimport type { IconProps } from '../Icon/Icon.types';\n\nexport { ToastSeverity };\nexport type { ToastPropsShared };\n\n/**\n * Optional props for the leading severity `Icon`.\n */\nexport type ToastIconProps = Omit<IconProps, 'name' | 'size' | 'color'>;\n\n/**\n * Shared toast props aligned with BannerBase, plus optional severity/icon props.\n */\nexport type ToastSharedProps = Omit<BannerBaseProps, 'closeButtonProps'> & {\n closeButtonProps?: Omit<\n NonNullable<BannerBaseProps['closeButtonProps']>,\n 'onPress'\n >;\n severity?: ToastSeverity;\n iconAlertProps?: ToastIconProps;\n};\n\n/**\n * Toast options used by the imperative `toast(...)` API.\n */\nexport type ToastOptions = ToastSharedProps & {\n hasNoTimeout?: boolean;\n topOffset?: number;\n /**\n * When `false`, hides the close button on the imperative toast.\n * Swipe-to-dismiss, auto-dismiss, and `toast.dismiss()` still work.\n * Defaults to `true`.\n */\n showCloseButton?: boolean;\n};\n\n/**\n * Toaster component reference.\n */\nexport type ToasterRef = {\n showToast: (toastOptions: ToastOptions) => void;\n closeToast: () => void;\n};\n\n/**\n * Toast component props intended for direct rendering of a single toast surface.\n */\nexport type ToastProps = ToastSharedProps;\n\n/**\n * Toaster component props.\n * Extends ViewProps to inherit standard React Native props such as testID and accessibilityLabel.\n */\nexport type ToasterProps = {\n /**\n * Optional Tailwind CSS classes for the toast container.\n */\n twClassName?: string;\n} & Omit<ViewProps, 'style'>;\n"]}
@@ -23,6 +23,12 @@ export type ToastSharedProps = Omit<BannerBaseProps, 'closeButtonProps'> & {
23
23
  export type ToastOptions = ToastSharedProps & {
24
24
  hasNoTimeout?: boolean;
25
25
  topOffset?: number;
26
+ /**
27
+ * When `false`, hides the close button on the imperative toast.
28
+ * Swipe-to-dismiss, auto-dismiss, and `toast.dismiss()` still work.
29
+ * Defaults to `true`.
30
+ */
31
+ showCloseButton?: boolean;
26
32
  };
27
33
  /**
28
34
  * Toaster component reference.
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.types.d.cts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gDAAgD;AAChF,OAAO,EAAE,aAAa,EAAE,gDAAgD;AACxE,OAAO,KAAK,EAAE,SAAS,EAAE,qBAAqB;AAE9C,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA2B;AAEpD,OAAO,EAAE,aAAa,EAAE,CAAC;AACzB,YAAY,EAAE,gBAAgB,EAAE,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;AAExE;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG;IACzE,gBAAgB,CAAC,EAAE,IAAI,CACrB,WAAW,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC,EAChD,SAAS,CACV,CAAC;IACF,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,YAAY,G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EF;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,gBAAgB,GAAG;IAC5C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,SAAS,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,gBAAgB,CAAC;AAE1C;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC"}
@@ -23,6 +23,12 @@ export type ToastSharedProps = Omit<BannerBaseProps, 'closeButtonProps'> & {
23
23
  export type ToastOptions = ToastSharedProps & {
24
24
  hasNoTimeout?: boolean;
25
25
  topOffset?: number;
26
+ /**
27
+ * When `false`, hides the close button on the imperative toast.
28
+ * Swipe-to-dismiss, auto-dismiss, and `toast.dismiss()` still work.
29
+ * Defaults to `true`.
30
+ */
31
+ showCloseButton?: boolean;
26
32
  };
27
33
  /**
28
34
  * Toaster component reference.
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.types.d.mts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gDAAgD;AAChF,OAAO,EAAE,aAAa,EAAE,gDAAgD;AACxE,OAAO,KAAK,EAAE,SAAS,EAAE,qBAAqB;AAE9C,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA2B;AAEpD,OAAO,EAAE,aAAa,EAAE,CAAC;AACzB,YAAY,EAAE,gBAAgB,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E,CAAC;AACzB,YAAY,EAAE,gBAAgB,EAAE,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;AAExE;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG;IACzE,gBAAgB,CAAC,EAAE,IAAI,CACrB,WAAW,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC,EAChD,SAAS,CACV,CAAC;IACF,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,gBAAgB,GAAG;IAC5C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,SAAS,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,gBAAgB,CAAC;AAE1C;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.types.mjs","sourceRoot":"","sources":["../../../src/components/Toast/Toast.types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,gDAAgD;AAMxE,OAAO,EAAE,aAAa,EAAE,CAAC","sourcesContent":["import type { ToastPropsShared } from '@metamask-previews/design-system-shared';\nimport { ToastSeverity } from '@metamask-previews/design-system-shared';\nimport type { ViewProps } from 'react-native';\n\nimport type { BannerBaseProps } from '../BannerBase';\nimport type { IconProps } from '../Icon/Icon.types';\n\nexport { ToastSeverity };\nexport type { ToastPropsShared };\n\n/**\n * Optional props for the leading severity `Icon`.\n */\nexport type ToastIconProps = Omit<IconProps, 'name' | 'size' | 'color'>;\n\n/**\n * Shared toast props aligned with BannerBase, plus optional severity/icon props.\n */\nexport type ToastSharedProps = Omit<BannerBaseProps, 'closeButtonProps'> & {\n closeButtonProps?: Omit<\n NonNullable<BannerBaseProps['closeButtonProps']>,\n 'onPress'\n >;\n severity?: ToastSeverity;\n iconAlertProps?: ToastIconProps;\n};\n\n/**\n * Toast options used by the imperative `toast(...)` API.\n */\nexport type ToastOptions = ToastSharedProps & {\n hasNoTimeout?: boolean;\n topOffset?: number;\n};\n\n/**\n * Toaster component reference.\n */\nexport type ToasterRef = {\n showToast: (toastOptions: ToastOptions) => void;\n closeToast: () => void;\n};\n\n/**\n * Toast component props intended for direct rendering of a single toast surface.\n */\nexport type ToastProps = ToastSharedProps;\n\n/**\n * Toaster component props.\n * Extends ViewProps to inherit standard React Native props such as testID and accessibilityLabel.\n */\nexport type ToasterProps = {\n /**\n * Optional Tailwind CSS classes for the toast container.\n */\n twClassName?: string;\n} & Omit<ViewProps, 'style'>;\n"]}
1
+ {"version":3,"file":"Toast.types.mjs","sourceRoot":"","sources":["../../../src/components/Toast/Toast.types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,gDAAgD;AAMxE,OAAO,EAAE,aAAa,EAAE,CAAC","sourcesContent":["import type { ToastPropsShared } from '@metamask-previews/design-system-shared';\nimport { ToastSeverity } from '@metamask-previews/design-system-shared';\nimport type { ViewProps } from 'react-native';\n\nimport type { BannerBaseProps } from '../BannerBase';\nimport type { IconProps } from '../Icon/Icon.types';\n\nexport { ToastSeverity };\nexport type { ToastPropsShared };\n\n/**\n * Optional props for the leading severity `Icon`.\n */\nexport type ToastIconProps = Omit<IconProps, 'name' | 'size' | 'color'>;\n\n/**\n * Shared toast props aligned with BannerBase, plus optional severity/icon props.\n */\nexport type ToastSharedProps = Omit<BannerBaseProps, 'closeButtonProps'> & {\n closeButtonProps?: Omit<\n NonNullable<BannerBaseProps['closeButtonProps']>,\n 'onPress'\n >;\n severity?: ToastSeverity;\n iconAlertProps?: ToastIconProps;\n};\n\n/**\n * Toast options used by the imperative `toast(...)` API.\n */\nexport type ToastOptions = ToastSharedProps & {\n hasNoTimeout?: boolean;\n topOffset?: number;\n /**\n * When `false`, hides the close button on the imperative toast.\n * Swipe-to-dismiss, auto-dismiss, and `toast.dismiss()` still work.\n * Defaults to `true`.\n */\n showCloseButton?: boolean;\n};\n\n/**\n * Toaster component reference.\n */\nexport type ToasterRef = {\n showToast: (toastOptions: ToastOptions) => void;\n closeToast: () => void;\n};\n\n/**\n * Toast component props intended for direct rendering of a single toast surface.\n */\nexport type ToastProps = ToastSharedProps;\n\n/**\n * Toaster component props.\n * Extends ViewProps to inherit standard React Native props such as testID and accessibilityLabel.\n */\nexport type ToasterProps = {\n /**\n * Optional Tailwind CSS classes for the toast container.\n */\n twClassName?: string;\n} & Omit<ViewProps, 'style'>;\n"]}
@@ -44,7 +44,7 @@ const assertRegisteredRef = (method) => {
44
44
  }
45
45
  return registeredRef.current;
46
46
  };
47
- const getToastProps = ({ hasNoTimeout: _hasNoTimeout, onClose: _onClose, topOffset: _topOffset, twClassName: _twClassName, ...toastProps }) => toastProps;
47
+ const getToastProps = ({ hasNoTimeout: _hasNoTimeout, onClose: _onClose, topOffset: _topOffset, twClassName: _twClassName, showCloseButton: _showCloseButton, ...toastProps }) => toastProps;
48
48
  const getHiddenTranslateY = (height, offset) => -(height + offset);
49
49
  const ToasterComponent = (0, react_1.forwardRef)(({ twClassName, ...props }, ref) => {
50
50
  const tw = (0, design_system_twrnc_preset_1.useTailwind)();
@@ -286,12 +286,18 @@ const ToasterComponent = (0, react_1.forwardRef)(({ twClassName, ...props }, ref
286
286
  if (!toastOptions) {
287
287
  return null;
288
288
  }
289
- const { onClose: toastOnClose, twClassName: toastTwClassName } = toastOptions;
289
+ const { onClose: toastOnClose, showCloseButton = true, twClassName: toastTwClassName, } = toastOptions;
290
290
  const toastProps = getToastProps(toastOptions);
291
291
  const { actionButtonLabel, actionButtonOnPress, ...restToastProps } = toastProps;
292
292
  const toastTwClassNames = [twClassName, toastTwClassName]
293
293
  .filter(Boolean)
294
294
  .join(' ');
295
+ const handleClose = showCloseButton
296
+ ? () => {
297
+ closeToast();
298
+ toastOnClose?.();
299
+ }
300
+ : undefined;
295
301
  const onAnimatedViewLayout = (e) => {
296
302
  const { height } = e.nativeEvent.layout;
297
303
  const nextHiddenTranslateY = getHiddenTranslateY(height, topOffset);
@@ -317,13 +323,7 @@ const ToasterComponent = (0, react_1.forwardRef)(({ twClassName, ...props }, ref
317
323
  };
318
324
  return (<react_native_gesture_handler_1.GestureDetector gesture={swipeGesture}>
319
325
  <react_native_reanimated_1.default.View onLayout={onAnimatedViewLayout} style={baseStyle} {...props}>
320
- {actionButtonLabel && actionButtonOnPress ? (<Toast_1.Toast {...toastProps} actionButtonLabel={actionButtonLabel} actionButtonOnPress={actionButtonOnPress} onClose={() => {
321
- closeToast();
322
- toastOnClose?.();
323
- }} twClassName={toastTwClassNames}/>) : (<Toast_1.Toast {...restToastProps} onClose={() => {
324
- closeToast();
325
- toastOnClose?.();
326
- }} twClassName={toastTwClassNames}/>)}
326
+ {actionButtonLabel && actionButtonOnPress ? (<Toast_1.Toast {...toastProps} actionButtonLabel={actionButtonLabel} actionButtonOnPress={actionButtonOnPress} onClose={handleClose} twClassName={toastTwClassNames}/>) : (<Toast_1.Toast {...restToastProps} onClose={handleClose} twClassName={toastTwClassNames}/>)}
327
327
  </react_native_reanimated_1.default.View>
328
328
  </react_native_gesture_handler_1.GestureDetector>);
329
329
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Toaster.cjs","sourceRoot":"","sources":["../../../src/components/Toast/Toaster.tsx"],"names":[],"mappings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B,CAAC,CAAC,mBAAmB,CAAC,CACzC,OAAO,CAAC,CAAC,GAAG,EAAE;gBACZ,UAAU,EAAE,CAAC;gBACb,YAAY,EAAE,EAAE,CAAC;YACnB,CAAC,CAAC,CACF,WAAW,CAAC,CAAC,iBAAiB,CAAC,EAC/B,CACH,CAAC,CAAC,CAAC,CACF,CAAC,aAAK,CACJ,IAAI,cAAc,CAAC,CACnB,OAAO,CAAC,CAAC,GAAG,EAAE;gBACZ,UAAU,EAAE,CAAC;gBACb,YAAY,EAAE,EAAE,CAAC;YACnB,CAAC,CAAC,CACF,WAAW,CAAC,CAAC,iBAAiB,CAAC,EAC/B,CACH,CACH;QAAA,EAAE,iCAAQ,CAAC,IAAI,CACjB;MAAA,EAAE,8CAAe,CAAC,CACnB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,WAAW,GAAG,SAAS,CAAC;AAM5B,QAAA,OAAO,GAAG,gBAAgB,CAAC;AAE3B,QAAA,KAAK,GAAG,CAAC,CAAC,OAAqB,EAAE,EAAE;IAC9C,mBAAmB,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;AAClD,CAAC,CAAkB,CAAC;AAEpB,aAAK,CAAC,OAAO,GAAG,GAAG,EAAE;IACnB,mBAAmB,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;AAC9C,CAAC,CAAC","sourcesContent":["// Third party dependencies.\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, {\n forwardRef,\n useImperativeHandle,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport type { RefObject } from 'react';\nimport { Dimensions } from 'react-native';\nimport type { LayoutChangeEvent, StyleProp, ViewStyle } from 'react-native';\nimport { Gesture, GestureDetector } from 'react-native-gesture-handler';\nimport Animated, {\n cancelAnimation,\n useAnimatedStyle,\n useSharedValue,\n withSpring,\n} from 'react-native-reanimated';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport { scheduleOnRN } from 'react-native-worklets';\n\n// Internal dependencies.\nimport { Toast } from './Toast';\nimport {\n TOAST_DISMISS_DISTANCE_THRESHOLD,\n TOAST_DISMISS_MIN_DISTANCE,\n TOAST_DISMISS_VELOCITY_THRESHOLD,\n TOAST_SPRING_CONFIG,\n TOAST_SWIPE_ACTIVE_OFFSET_Y,\n TOAST_SWIPE_FAIL_OFFSET_X,\n TOAST_TOP_PADDING,\n TOAST_VISIBILITY_DURATION,\n} from './Toast.constants';\nimport type {\n ToastOptions,\n ToastProps,\n ToasterProps,\n ToasterRef,\n} from './Toast.types';\n\nconst screenHeight = Dimensions.get('window').height;\n\nlet registeredRef: RefObject<ToasterRef | null> | null = null;\n\nconst assertRegisteredRef = (method: 'dismiss' | 'toast'): ToasterRef => {\n if (!registeredRef?.current) {\n const invocation = method === 'toast' ? 'toast()' : `toast.${method}()`;\n throw new Error(\n `${invocation} called before <Toaster /> mounted. Render <Toaster /> once at the root of your app.`,\n );\n }\n return registeredRef.current;\n};\n\nconst getToastProps = ({\n hasNoTimeout: _hasNoTimeout,\n onClose: _onClose,\n topOffset: _topOffset,\n twClassName: _twClassName,\n ...toastProps\n}: ToastOptions): Omit<ToastProps, 'twClassName'> => toastProps;\n\nconst getHiddenTranslateY = (height: number, offset: number) =>\n -(height + offset);\n\nconst ToasterComponent = forwardRef<ToasterRef, ToasterProps>(\n ({ twClassName, ...props }, ref) => {\n const tw = useTailwind();\n const [toastOptions, setToastOptions] = useState<ToastOptions | undefined>(\n undefined,\n );\n const replacementTimerRef = useRef<ReturnType<typeof setTimeout> | null>(\n null,\n );\n const autoDismissTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(\n null,\n );\n const animationStartedRef = useRef(false);\n const visibleAtRef = useRef<number | null>(null);\n const hasNoTimeoutRef = useRef(false);\n // Invalidates queued spring-back resumes after replace/dismiss. A completed\n // spring cannot be cancelled, so scheduleOnRN(resume) can still run later.\n const toastGenerationRef = useRef(0);\n const { top: topInset } = useSafeAreaInsets();\n const toastHeight = useSharedValue(screenHeight);\n const hiddenTranslateY = useSharedValue(-screenHeight);\n const visibleTranslateY = useSharedValue(0);\n const gestureStartY = useSharedValue(0);\n const translateYProgress = useSharedValue(-screenHeight);\n const isDismissing = useSharedValue(false);\n // True after onStart until onEnd/onFinalize recovers. Used so a failed pan\n // (e.g. failOffsetX after activation) still springs back and resumes dismiss.\n const isSwipeActive = useSharedValue(false);\n const toastGeneration = useSharedValue(0);\n const topOffset = toastOptions?.topOffset ?? 0;\n hasNoTimeoutRef.current = Boolean(toastOptions?.hasNoTimeout);\n const animatedStyle = useAnimatedStyle(() => ({\n transform: [{ translateY: translateYProgress.value + topOffset }],\n }));\n const baseStyle = useMemo(\n () =>\n [\n tw.style('absolute left-4 right-4 top-0'),\n animatedStyle,\n ] as StyleProp<ViewStyle>,\n [tw, animatedStyle],\n );\n const innerRef = useRef<ToasterRef | null>(null);\n\n const clearScheduledAutoDismiss = () => {\n if (autoDismissTimeoutRef.current !== null) {\n clearTimeout(autoDismissTimeoutRef.current);\n autoDismissTimeoutRef.current = null;\n }\n };\n\n const bumpToastGeneration = () => {\n toastGenerationRef.current += 1;\n toastGeneration.value = toastGenerationRef.current;\n };\n\n const resetState = () => {\n animationStartedRef.current = false;\n visibleAtRef.current = null;\n isDismissing.value = false;\n isSwipeActive.value = false;\n clearScheduledAutoDismiss();\n setToastOptions(undefined);\n };\n\n const startDismissAnimation = () => {\n bumpToastGeneration();\n clearScheduledAutoDismiss();\n isDismissing.value = true;\n visibleAtRef.current = null;\n translateYProgress.value = withSpring(\n hiddenTranslateY.value,\n TOAST_SPRING_CONFIG,\n (finished) => {\n if (finished) {\n scheduleOnRN(resetState);\n }\n },\n );\n };\n\n const scheduleAutoDismiss = (delayMs: number) => {\n clearScheduledAutoDismiss();\n autoDismissTimeoutRef.current = setTimeout(() => {\n autoDismissTimeoutRef.current = null;\n startDismissAnimation();\n }, delayMs);\n };\n\n const beginAutoDismiss = () => {\n visibleAtRef.current = Date.now();\n scheduleAutoDismiss(TOAST_VISIBILITY_DURATION);\n };\n\n const resumeAutoDismissAfterSwipe = () => {\n if (hasNoTimeoutRef.current || isDismissing.value) {\n return;\n }\n\n // Entrance was interrupted before auto-dismiss started — start a full timer.\n if (visibleAtRef.current === null) {\n beginAutoDismiss();\n return;\n }\n\n const elapsed = Date.now() - visibleAtRef.current;\n if (elapsed >= TOAST_VISIBILITY_DURATION) {\n startDismissAnimation();\n return;\n }\n\n scheduleAutoDismiss(TOAST_VISIBILITY_DURATION - elapsed);\n };\n\n const showToast = (options: ToastOptions) => {\n bumpToastGeneration();\n let timeoutDuration = 0;\n const normalizedOptions = {\n hasNoTimeout: false,\n ...options,\n };\n if (toastOptions) {\n // Always clear any pending auto-dismiss from the previous toast, including\n // when the replacement is persistent (hasNoTimeout). Otherwise the old\n // timer can fire and dismiss the new toast.\n clearScheduledAutoDismiss();\n cancelAnimation(translateYProgress);\n timeoutDuration = 100;\n animationStartedRef.current = false;\n visibleAtRef.current = null;\n isDismissing.value = false;\n isSwipeActive.value = false;\n setToastOptions(undefined);\n }\n if (replacementTimerRef.current !== null) {\n clearTimeout(replacementTimerRef.current);\n }\n replacementTimerRef.current = setTimeout(() => {\n replacementTimerRef.current = null;\n setToastOptions(normalizedOptions);\n }, timeoutDuration);\n };\n\n const closeToast = () => {\n if (replacementTimerRef.current !== null) {\n clearTimeout(replacementTimerRef.current);\n replacementTimerRef.current = null;\n }\n startDismissAnimation();\n };\n\n const closeToastRef = useRef(closeToast);\n const resumeAutoDismissAfterSwipeRef = useRef(resumeAutoDismissAfterSwipe);\n const clearScheduledAutoDismissRef = useRef(clearScheduledAutoDismiss);\n closeToastRef.current = closeToast;\n resumeAutoDismissAfterSwipeRef.current = resumeAutoDismissAfterSwipe;\n clearScheduledAutoDismissRef.current = clearScheduledAutoDismiss;\n\n const dismissToastFromSwipe = () => {\n closeToastRef.current();\n };\n\n const resumeAutoDismissFromSwipe = (generation: number) => {\n // Ignore resumes from a toast that was replaced or dismissed after the\n // spring-back started (completed springs cannot be cancelled).\n if (generation !== toastGenerationRef.current) {\n return;\n }\n resumeAutoDismissAfterSwipeRef.current();\n };\n\n const clearScheduledAutoDismissFromSwipe = () => {\n clearScheduledAutoDismissRef.current();\n };\n\n const swipeGesture = useMemo(() => {\n // These gesture callbacks need explicit 'worklet' directives because this\n // package ships a pre-built dist compiled by ts-bridge (tsc), which emits the\n // gesture chain as a namespaced call (react_native_gesture_handler_1.Gesture).\n // The consumer's Reanimated/Worklets Babel plugin does run over dist, but its\n // gesture auto-detection doesn't recognize that compiled namespaced form.\n const springBackAfterSwipe = () => {\n 'worklet';\n\n const generationAtSpringStart = toastGeneration.value;\n translateYProgress.value = withSpring(\n visibleTranslateY.value,\n TOAST_SPRING_CONFIG,\n (finished) => {\n // A new pan cancels this spring via cancelAnimation; only resume\n // auto-dismiss when the spring-back completed naturally.\n if (finished) {\n scheduleOnRN(resumeAutoDismissFromSwipe, generationAtSpringStart);\n }\n },\n );\n };\n\n return Gesture.Pan()\n .activeOffsetY(TOAST_SWIPE_ACTIVE_OFFSET_Y)\n .failOffsetX([-TOAST_SWIPE_FAIL_OFFSET_X, TOAST_SWIPE_FAIL_OFFSET_X])\n .onStart(() => {\n 'worklet';\n\n // Don't interrupt an in-progress dismiss animation.\n if (isDismissing.value) {\n return;\n }\n isSwipeActive.value = true;\n scheduleOnRN(clearScheduledAutoDismissFromSwipe);\n cancelAnimation(translateYProgress);\n gestureStartY.value = translateYProgress.value;\n })\n .onUpdate((event) => {\n 'worklet';\n\n if (isDismissing.value || !isSwipeActive.value) {\n return;\n }\n const nextTranslateY = gestureStartY.value + event.translationY;\n // Toast sits at the top; only allow dragging upward (more negative).\n translateYProgress.value = Math.min(\n nextTranslateY,\n visibleTranslateY.value,\n );\n })\n .onEnd((event) => {\n 'worklet';\n\n if (!isSwipeActive.value) {\n return;\n }\n isSwipeActive.value = false;\n\n if (isDismissing.value) {\n return;\n }\n const { translationY, velocityY } = event;\n const dismissDistance = Math.max(\n toastHeight.value * TOAST_DISMISS_DISTANCE_THRESHOLD,\n TOAST_DISMISS_MIN_DISTANCE,\n );\n const hasReachedDismissOffset = translationY <= -dismissDistance;\n const hasReachedSwipeThreshold =\n Math.abs(velocityY) > TOAST_DISMISS_VELOCITY_THRESHOLD;\n const isQuickDismissing = velocityY < 0;\n\n const shouldDismiss =\n hasReachedDismissOffset ||\n (hasReachedSwipeThreshold && isQuickDismissing);\n\n if (shouldDismiss) {\n scheduleOnRN(dismissToastFromSwipe);\n return;\n }\n\n springBackAfterSwipe();\n })\n .onFinalize(() => {\n 'worklet';\n\n // onEnd is skipped when the pan fails/cancels after activation\n // (e.g. horizontal travel past failOffsetX). Recover position and\n // auto-dismiss so the toast is not left stuck mid-offset.\n if (!isSwipeActive.value) {\n return;\n }\n // Clear before the dismiss check — same order as onEnd — so a pan\n // cancelled mid-dismiss cannot leave isSwipeActive stuck true for a\n // later toast (resetState alone is not enough if finalize races it).\n isSwipeActive.value = false;\n\n if (isDismissing.value) {\n return;\n }\n springBackAfterSwipe();\n });\n // Shared values and swipe JS wrappers are stable for the component lifetime.\n }, []);\n\n innerRef.current = {\n closeToast,\n showToast,\n };\n\n useImperativeHandle(ref, () => innerRef.current as ToasterRef);\n\n useLayoutEffect(() => {\n registeredRef = innerRef;\n return () => {\n if (registeredRef === innerRef) {\n registeredRef = null;\n }\n };\n }, []);\n\n if (!toastOptions) {\n return null;\n }\n\n const { onClose: toastOnClose, twClassName: toastTwClassName } =\n toastOptions;\n const toastProps = getToastProps(toastOptions);\n const { actionButtonLabel, actionButtonOnPress, ...restToastProps } =\n toastProps;\n const toastTwClassNames = [twClassName, toastTwClassName]\n .filter(Boolean)\n .join(' ');\n\n const onAnimatedViewLayout = (e: LayoutChangeEvent) => {\n const { height } = e.nativeEvent.layout;\n const nextHiddenTranslateY = getHiddenTranslateY(height, topOffset);\n const nextVisibleTranslateY = topInset + TOAST_TOP_PADDING;\n\n hiddenTranslateY.value = nextHiddenTranslateY;\n visibleTranslateY.value = nextVisibleTranslateY;\n toastHeight.value = height;\n\n if (animationStartedRef.current) {\n return;\n }\n\n animationStartedRef.current = true;\n translateYProgress.value = nextHiddenTranslateY;\n\n if (toastOptions.hasNoTimeout) {\n translateYProgress.value = withSpring(\n nextVisibleTranslateY,\n TOAST_SPRING_CONFIG,\n );\n } else {\n translateYProgress.value = withSpring(\n nextVisibleTranslateY,\n TOAST_SPRING_CONFIG,\n (finished) => {\n if (finished) {\n scheduleOnRN(beginAutoDismiss);\n }\n },\n );\n }\n };\n\n return (\n <GestureDetector gesture={swipeGesture}>\n <Animated.View\n onLayout={onAnimatedViewLayout}\n style={baseStyle}\n {...props}\n >\n {actionButtonLabel && actionButtonOnPress ? (\n <Toast\n {...toastProps}\n actionButtonLabel={actionButtonLabel}\n actionButtonOnPress={actionButtonOnPress}\n onClose={() => {\n closeToast();\n toastOnClose?.();\n }}\n twClassName={toastTwClassNames}\n />\n ) : (\n <Toast\n {...restToastProps}\n onClose={() => {\n closeToast();\n toastOnClose?.();\n }}\n twClassName={toastTwClassNames}\n />\n )}\n </Animated.View>\n </GestureDetector>\n );\n },\n);\n\nToasterComponent.displayName = 'Toaster';\n\ntype ToastFunction = ((options: ToastOptions) => void) & {\n dismiss: () => void;\n};\n\nexport const Toaster = ToasterComponent;\n\nexport const toast = ((options: ToastOptions) => {\n assertRegisteredRef('toast').showToast(options);\n}) as ToastFunction;\n\ntoast.dismiss = () => {\n assertRegisteredRef('dismiss').closeToast();\n};\n"]}
1
+ {"version":3,"file":"Toaster.cjs","sourceRoot":"","sources":["../../../src/components/Toast/Toaster.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4BAA4B;AAC5B,8FAA4E;AAC5E,+CAOe;AAEf,+CAA0C;AAE1C,+EAAwE;AACxE,mFAKiC;AACjC,mFAAmE;AACnE,iEAAqD;AAErD,yBAAyB;AACzB,uCAAgC;AAChC,2DAS2B;AAQ3B,MAAM,YAAY,GA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,mBAAmB,CAAC,CACzC,OAAO,CAAC,CAAC,WAAW,CAAC,CACrB,WAAW,CAAC,CAAC,iBAAiB,CAAC,EAC/B,CACH,CAAC,CAAC,CAAC,CACF,CAAC,aAAK,CACJ,IAAI,cAAc,CAAC,CACnB,OAAO,CAAC,CAAC,WAAW,CAAC,CACrB,WAAW,CAAC,CAAC,iBAAiB,CAAC,EAC/B,CACH,CACH;QAAA,EAAE,iCAAQ,CAAC,IAAI,CACjB;MAAA,EAAE,8CAAe,CAAC,CACnB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,WAAW,GAAG,SAAS,CAAC;AAM5B,QAAA,OAAO,GAAG,gBAAgB,CAAC;AAE3B,QAAA,KAAK,GAAG,CAAC,CAAC,OAAqB,EAAE,EAAE;IAC9C,mBAAmB,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;AAClD,CAAC,CAAkB,CAAC;AAEpB,aAAK,CAAC,OAAO,GAAG,GAAG,EAAE;IACnB,mBAAmB,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;AAC9C,CAAC,CAAC","sourcesContent":["// Third party dependencies.\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, {\n forwardRef,\n useImperativeHandle,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport type { RefObject } from 'react';\nimport { Dimensions } from 'react-native';\nimport type { LayoutChangeEvent, StyleProp, ViewStyle } from 'react-native';\nimport { Gesture, GestureDetector } from 'react-native-gesture-handler';\nimport Animated, {\n cancelAnimation,\n useAnimatedStyle,\n useSharedValue,\n withSpring,\n} from 'react-native-reanimated';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport { scheduleOnRN } from 'react-native-worklets';\n\n// Internal dependencies.\nimport { Toast } from './Toast';\nimport {\n TOAST_DISMISS_DISTANCE_THRESHOLD,\n TOAST_DISMISS_MIN_DISTANCE,\n TOAST_DISMISS_VELOCITY_THRESHOLD,\n TOAST_SPRING_CONFIG,\n TOAST_SWIPE_ACTIVE_OFFSET_Y,\n TOAST_SWIPE_FAIL_OFFSET_X,\n TOAST_TOP_PADDING,\n TOAST_VISIBILITY_DURATION,\n} from './Toast.constants';\nimport type {\n ToastOptions,\n ToastProps,\n ToasterProps,\n ToasterRef,\n} from './Toast.types';\n\nconst screenHeight = Dimensions.get('window').height;\n\nlet registeredRef: RefObject<ToasterRef | null> | null = null;\n\nconst assertRegisteredRef = (method: 'dismiss' | 'toast'): ToasterRef => {\n if (!registeredRef?.current) {\n const invocation = method === 'toast' ? 'toast()' : `toast.${method}()`;\n throw new Error(\n `${invocation} called before <Toaster /> mounted. Render <Toaster /> once at the root of your app.`,\n );\n }\n return registeredRef.current;\n};\n\nconst getToastProps = ({\n hasNoTimeout: _hasNoTimeout,\n onClose: _onClose,\n topOffset: _topOffset,\n twClassName: _twClassName,\n showCloseButton: _showCloseButton,\n ...toastProps\n}: ToastOptions): Omit<ToastProps, 'twClassName'> => toastProps;\n\nconst getHiddenTranslateY = (height: number, offset: number) =>\n -(height + offset);\n\nconst ToasterComponent = forwardRef<ToasterRef, ToasterProps>(\n ({ twClassName, ...props }, ref) => {\n const tw = useTailwind();\n const [toastOptions, setToastOptions] = useState<ToastOptions | undefined>(\n undefined,\n );\n const replacementTimerRef = useRef<ReturnType<typeof setTimeout> | null>(\n null,\n );\n const autoDismissTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(\n null,\n );\n const animationStartedRef = useRef(false);\n const visibleAtRef = useRef<number | null>(null);\n const hasNoTimeoutRef = useRef(false);\n // Invalidates queued spring-back resumes after replace/dismiss. A completed\n // spring cannot be cancelled, so scheduleOnRN(resume) can still run later.\n const toastGenerationRef = useRef(0);\n const { top: topInset } = useSafeAreaInsets();\n const toastHeight = useSharedValue(screenHeight);\n const hiddenTranslateY = useSharedValue(-screenHeight);\n const visibleTranslateY = useSharedValue(0);\n const gestureStartY = useSharedValue(0);\n const translateYProgress = useSharedValue(-screenHeight);\n const isDismissing = useSharedValue(false);\n // True after onStart until onEnd/onFinalize recovers. Used so a failed pan\n // (e.g. failOffsetX after activation) still springs back and resumes dismiss.\n const isSwipeActive = useSharedValue(false);\n const toastGeneration = useSharedValue(0);\n const topOffset = toastOptions?.topOffset ?? 0;\n hasNoTimeoutRef.current = Boolean(toastOptions?.hasNoTimeout);\n const animatedStyle = useAnimatedStyle(() => ({\n transform: [{ translateY: translateYProgress.value + topOffset }],\n }));\n const baseStyle = useMemo(\n () =>\n [\n tw.style('absolute left-4 right-4 top-0'),\n animatedStyle,\n ] as StyleProp<ViewStyle>,\n [tw, animatedStyle],\n );\n const innerRef = useRef<ToasterRef | null>(null);\n\n const clearScheduledAutoDismiss = () => {\n if (autoDismissTimeoutRef.current !== null) {\n clearTimeout(autoDismissTimeoutRef.current);\n autoDismissTimeoutRef.current = null;\n }\n };\n\n const bumpToastGeneration = () => {\n toastGenerationRef.current += 1;\n toastGeneration.value = toastGenerationRef.current;\n };\n\n const resetState = () => {\n animationStartedRef.current = false;\n visibleAtRef.current = null;\n isDismissing.value = false;\n isSwipeActive.value = false;\n clearScheduledAutoDismiss();\n setToastOptions(undefined);\n };\n\n const startDismissAnimation = () => {\n bumpToastGeneration();\n clearScheduledAutoDismiss();\n isDismissing.value = true;\n visibleAtRef.current = null;\n translateYProgress.value = withSpring(\n hiddenTranslateY.value,\n TOAST_SPRING_CONFIG,\n (finished) => {\n if (finished) {\n scheduleOnRN(resetState);\n }\n },\n );\n };\n\n const scheduleAutoDismiss = (delayMs: number) => {\n clearScheduledAutoDismiss();\n autoDismissTimeoutRef.current = setTimeout(() => {\n autoDismissTimeoutRef.current = null;\n startDismissAnimation();\n }, delayMs);\n };\n\n const beginAutoDismiss = () => {\n visibleAtRef.current = Date.now();\n scheduleAutoDismiss(TOAST_VISIBILITY_DURATION);\n };\n\n const resumeAutoDismissAfterSwipe = () => {\n if (hasNoTimeoutRef.current || isDismissing.value) {\n return;\n }\n\n // Entrance was interrupted before auto-dismiss started — start a full timer.\n if (visibleAtRef.current === null) {\n beginAutoDismiss();\n return;\n }\n\n const elapsed = Date.now() - visibleAtRef.current;\n if (elapsed >= TOAST_VISIBILITY_DURATION) {\n startDismissAnimation();\n return;\n }\n\n scheduleAutoDismiss(TOAST_VISIBILITY_DURATION - elapsed);\n };\n\n const showToast = (options: ToastOptions) => {\n bumpToastGeneration();\n let timeoutDuration = 0;\n const normalizedOptions = {\n hasNoTimeout: false,\n ...options,\n };\n if (toastOptions) {\n // Always clear any pending auto-dismiss from the previous toast, including\n // when the replacement is persistent (hasNoTimeout). Otherwise the old\n // timer can fire and dismiss the new toast.\n clearScheduledAutoDismiss();\n cancelAnimation(translateYProgress);\n timeoutDuration = 100;\n animationStartedRef.current = false;\n visibleAtRef.current = null;\n isDismissing.value = false;\n isSwipeActive.value = false;\n setToastOptions(undefined);\n }\n if (replacementTimerRef.current !== null) {\n clearTimeout(replacementTimerRef.current);\n }\n replacementTimerRef.current = setTimeout(() => {\n replacementTimerRef.current = null;\n setToastOptions(normalizedOptions);\n }, timeoutDuration);\n };\n\n const closeToast = () => {\n if (replacementTimerRef.current !== null) {\n clearTimeout(replacementTimerRef.current);\n replacementTimerRef.current = null;\n }\n startDismissAnimation();\n };\n\n const closeToastRef = useRef(closeToast);\n const resumeAutoDismissAfterSwipeRef = useRef(resumeAutoDismissAfterSwipe);\n const clearScheduledAutoDismissRef = useRef(clearScheduledAutoDismiss);\n closeToastRef.current = closeToast;\n resumeAutoDismissAfterSwipeRef.current = resumeAutoDismissAfterSwipe;\n clearScheduledAutoDismissRef.current = clearScheduledAutoDismiss;\n\n const dismissToastFromSwipe = () => {\n closeToastRef.current();\n };\n\n const resumeAutoDismissFromSwipe = (generation: number) => {\n // Ignore resumes from a toast that was replaced or dismissed after the\n // spring-back started (completed springs cannot be cancelled).\n if (generation !== toastGenerationRef.current) {\n return;\n }\n resumeAutoDismissAfterSwipeRef.current();\n };\n\n const clearScheduledAutoDismissFromSwipe = () => {\n clearScheduledAutoDismissRef.current();\n };\n\n const swipeGesture = useMemo(() => {\n // These gesture callbacks need explicit 'worklet' directives because this\n // package ships a pre-built dist compiled by ts-bridge (tsc), which emits the\n // gesture chain as a namespaced call (react_native_gesture_handler_1.Gesture).\n // The consumer's Reanimated/Worklets Babel plugin does run over dist, but its\n // gesture auto-detection doesn't recognize that compiled namespaced form.\n const springBackAfterSwipe = () => {\n 'worklet';\n\n const generationAtSpringStart = toastGeneration.value;\n translateYProgress.value = withSpring(\n visibleTranslateY.value,\n TOAST_SPRING_CONFIG,\n (finished) => {\n // A new pan cancels this spring via cancelAnimation; only resume\n // auto-dismiss when the spring-back completed naturally.\n if (finished) {\n scheduleOnRN(resumeAutoDismissFromSwipe, generationAtSpringStart);\n }\n },\n );\n };\n\n return Gesture.Pan()\n .activeOffsetY(TOAST_SWIPE_ACTIVE_OFFSET_Y)\n .failOffsetX([-TOAST_SWIPE_FAIL_OFFSET_X, TOAST_SWIPE_FAIL_OFFSET_X])\n .onStart(() => {\n 'worklet';\n\n // Don't interrupt an in-progress dismiss animation.\n if (isDismissing.value) {\n return;\n }\n isSwipeActive.value = true;\n scheduleOnRN(clearScheduledAutoDismissFromSwipe);\n cancelAnimation(translateYProgress);\n gestureStartY.value = translateYProgress.value;\n })\n .onUpdate((event) => {\n 'worklet';\n\n if (isDismissing.value || !isSwipeActive.value) {\n return;\n }\n const nextTranslateY = gestureStartY.value + event.translationY;\n // Toast sits at the top; only allow dragging upward (more negative).\n translateYProgress.value = Math.min(\n nextTranslateY,\n visibleTranslateY.value,\n );\n })\n .onEnd((event) => {\n 'worklet';\n\n if (!isSwipeActive.value) {\n return;\n }\n isSwipeActive.value = false;\n\n if (isDismissing.value) {\n return;\n }\n const { translationY, velocityY } = event;\n const dismissDistance = Math.max(\n toastHeight.value * TOAST_DISMISS_DISTANCE_THRESHOLD,\n TOAST_DISMISS_MIN_DISTANCE,\n );\n const hasReachedDismissOffset = translationY <= -dismissDistance;\n const hasReachedSwipeThreshold =\n Math.abs(velocityY) > TOAST_DISMISS_VELOCITY_THRESHOLD;\n const isQuickDismissing = velocityY < 0;\n\n const shouldDismiss =\n hasReachedDismissOffset ||\n (hasReachedSwipeThreshold && isQuickDismissing);\n\n if (shouldDismiss) {\n scheduleOnRN(dismissToastFromSwipe);\n return;\n }\n\n springBackAfterSwipe();\n })\n .onFinalize(() => {\n 'worklet';\n\n // onEnd is skipped when the pan fails/cancels after activation\n // (e.g. horizontal travel past failOffsetX). Recover position and\n // auto-dismiss so the toast is not left stuck mid-offset.\n if (!isSwipeActive.value) {\n return;\n }\n // Clear before the dismiss check — same order as onEnd — so a pan\n // cancelled mid-dismiss cannot leave isSwipeActive stuck true for a\n // later toast (resetState alone is not enough if finalize races it).\n isSwipeActive.value = false;\n\n if (isDismissing.value) {\n return;\n }\n springBackAfterSwipe();\n });\n // Shared values and swipe JS wrappers are stable for the component lifetime.\n }, []);\n\n innerRef.current = {\n closeToast,\n showToast,\n };\n\n useImperativeHandle(ref, () => innerRef.current as ToasterRef);\n\n useLayoutEffect(() => {\n registeredRef = innerRef;\n return () => {\n if (registeredRef === innerRef) {\n registeredRef = null;\n }\n };\n }, []);\n\n if (!toastOptions) {\n return null;\n }\n\n const {\n onClose: toastOnClose,\n showCloseButton = true,\n twClassName: toastTwClassName,\n } = toastOptions;\n const toastProps = getToastProps(toastOptions);\n const { actionButtonLabel, actionButtonOnPress, ...restToastProps } =\n toastProps;\n const toastTwClassNames = [twClassName, toastTwClassName]\n .filter(Boolean)\n .join(' ');\n const handleClose = showCloseButton\n ? () => {\n closeToast();\n toastOnClose?.();\n }\n : undefined;\n\n const onAnimatedViewLayout = (e: LayoutChangeEvent) => {\n const { height } = e.nativeEvent.layout;\n const nextHiddenTranslateY = getHiddenTranslateY(height, topOffset);\n const nextVisibleTranslateY = topInset + TOAST_TOP_PADDING;\n\n hiddenTranslateY.value = nextHiddenTranslateY;\n visibleTranslateY.value = nextVisibleTranslateY;\n toastHeight.value = height;\n\n if (animationStartedRef.current) {\n return;\n }\n\n animationStartedRef.current = true;\n translateYProgress.value = nextHiddenTranslateY;\n\n if (toastOptions.hasNoTimeout) {\n translateYProgress.value = withSpring(\n nextVisibleTranslateY,\n TOAST_SPRING_CONFIG,\n );\n } else {\n translateYProgress.value = withSpring(\n nextVisibleTranslateY,\n TOAST_SPRING_CONFIG,\n (finished) => {\n if (finished) {\n scheduleOnRN(beginAutoDismiss);\n }\n },\n );\n }\n };\n\n return (\n <GestureDetector gesture={swipeGesture}>\n <Animated.View\n onLayout={onAnimatedViewLayout}\n style={baseStyle}\n {...props}\n >\n {actionButtonLabel && actionButtonOnPress ? (\n <Toast\n {...toastProps}\n actionButtonLabel={actionButtonLabel}\n actionButtonOnPress={actionButtonOnPress}\n onClose={handleClose}\n twClassName={toastTwClassNames}\n />\n ) : (\n <Toast\n {...restToastProps}\n onClose={handleClose}\n twClassName={toastTwClassNames}\n />\n )}\n </Animated.View>\n </GestureDetector>\n );\n },\n);\n\nToasterComponent.displayName = 'Toaster';\n\ntype ToastFunction = ((options: ToastOptions) => void) & {\n dismiss: () => void;\n};\n\nexport const Toaster = ToasterComponent;\n\nexport const toast = ((options: ToastOptions) => {\n assertRegisteredRef('toast').showToast(options);\n}) as ToastFunction;\n\ntoast.dismiss = () => {\n assertRegisteredRef('dismiss').closeToast();\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Toaster.d.cts","sourceRoot":"","sources":["../../../src/components/Toast/Toaster.tsx"],"names":[],"mappings":"AAEA,OAAO,KAON,cAAc;AA0Bf,OAAO,KAAK,EACV,YAAY,EAGZ,UAAU,EACX,0BAAsB;AAsZvB,KAAK,aAAa,GAAG,CAAC,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC,GAAG;IACvD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,OAAO;;sFAAmB,CAAC;AAExC,eAAO,MAAM,KAAK,eAEC,CAAC"}
1
+ {"version":3,"file":"Toaster.d.cts","sourceRoot":"","sources":["../../../src/components/Toast/Toaster.tsx"],"names":[],"mappings":"AAEA,OAAO,KAON,cAAc;AA0Bf,OAAO,KAAK,EACV,YAAY,EAGZ,UAAU,EACX,0BAAsB;AA0ZvB,KAAK,aAAa,GAAG,CAAC,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC,GAAG;IACvD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,OAAO;;sFAAmB,CAAC;AAExC,eAAO,MAAM,KAAK,eAEC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Toaster.d.mts","sourceRoot":"","sources":["../../../src/components/Toast/Toaster.tsx"],"names":[],"mappings":"AAEA,OAAO,KAON,cAAc;AA0Bf,OAAO,KAAK,EACV,YAAY,EAGZ,UAAU,EACX,0BAAsB;AAsZvB,KAAK,aAAa,GAAG,CAAC,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC,GAAG;IACvD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,OAAO;;sFAAmB,CAAC;AAExC,eAAO,MAAM,KAAK,eAEC,CAAC"}
1
+ {"version":3,"file":"Toaster.d.mts","sourceRoot":"","sources":["../../../src/components/Toast/Toaster.tsx"],"names":[],"mappings":"AAEA,OAAO,KAON,cAAc;AA0Bf,OAAO,KAAK,EACV,YAAY,EAGZ,UAAU,EACX,0BAAsB;AA0ZvB,KAAK,aAAa,GAAG,CAAC,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC,GAAG;IACvD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,OAAO;;sFAAmB,CAAC;AAExC,eAAO,MAAM,KAAK,eAEC,CAAC"}
@@ -25,7 +25,7 @@ const assertRegisteredRef = (method) => {
25
25
  }
26
26
  return registeredRef.current;
27
27
  };
28
- const getToastProps = ({ hasNoTimeout: _hasNoTimeout, onClose: _onClose, topOffset: _topOffset, twClassName: _twClassName, ...toastProps }) => toastProps;
28
+ const getToastProps = ({ hasNoTimeout: _hasNoTimeout, onClose: _onClose, topOffset: _topOffset, twClassName: _twClassName, showCloseButton: _showCloseButton, ...toastProps }) => toastProps;
29
29
  const getHiddenTranslateY = (height, offset) => -(height + offset);
30
30
  const ToasterComponent = forwardRef(({ twClassName, ...props }, ref) => {
31
31
  const tw = useTailwind();
@@ -267,12 +267,18 @@ const ToasterComponent = forwardRef(({ twClassName, ...props }, ref) => {
267
267
  if (!toastOptions) {
268
268
  return null;
269
269
  }
270
- const { onClose: toastOnClose, twClassName: toastTwClassName } = toastOptions;
270
+ const { onClose: toastOnClose, showCloseButton = true, twClassName: toastTwClassName, } = toastOptions;
271
271
  const toastProps = getToastProps(toastOptions);
272
272
  const { actionButtonLabel, actionButtonOnPress, ...restToastProps } = toastProps;
273
273
  const toastTwClassNames = [twClassName, toastTwClassName]
274
274
  .filter(Boolean)
275
275
  .join(' ');
276
+ const handleClose = showCloseButton
277
+ ? () => {
278
+ closeToast();
279
+ toastOnClose?.();
280
+ }
281
+ : undefined;
276
282
  const onAnimatedViewLayout = (e) => {
277
283
  const { height } = e.nativeEvent.layout;
278
284
  const nextHiddenTranslateY = getHiddenTranslateY(height, topOffset);
@@ -298,13 +304,7 @@ const ToasterComponent = forwardRef(({ twClassName, ...props }, ref) => {
298
304
  };
299
305
  return (<GestureDetector gesture={swipeGesture}>
300
306
  <Animated.View onLayout={onAnimatedViewLayout} style={baseStyle} {...props}>
301
- {actionButtonLabel && actionButtonOnPress ? (<Toast {...toastProps} actionButtonLabel={actionButtonLabel} actionButtonOnPress={actionButtonOnPress} onClose={() => {
302
- closeToast();
303
- toastOnClose?.();
304
- }} twClassName={toastTwClassNames}/>) : (<Toast {...restToastProps} onClose={() => {
305
- closeToast();
306
- toastOnClose?.();
307
- }} twClassName={toastTwClassNames}/>)}
307
+ {actionButtonLabel && actionButtonOnPress ? (<Toast {...toastProps} actionButtonLabel={actionButtonLabel} actionButtonOnPress={actionButtonOnPress} onClose={handleClose} twClassName={toastTwClassNames}/>) : (<Toast {...restToastProps} onClose={handleClose} twClassName={toastTwClassNames}/>)}
308
308
  </Animated.View>
309
309
  </GestureDetector>);
310
310
  });