@planningcenter/chat-react-native 3.42.2-qa-821.1 → 3.42.2-qa-staging.3

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 (637) hide show
  1. package/build/components/conversation/attachments/attachment_card.d.ts +3 -3
  2. package/build/components/conversation/attachments/attachment_card.d.ts.map +1 -1
  3. package/build/components/conversation/attachments/attachment_card.js +7 -3
  4. package/build/components/conversation/attachments/attachment_card.js.map +1 -1
  5. package/build/components/conversation/attachments/attachment_deleting_overlay.d.ts +2 -1
  6. package/build/components/conversation/attachments/attachment_deleting_overlay.d.ts.map +1 -1
  7. package/build/components/conversation/attachments/attachment_deleting_overlay.js +7 -12
  8. package/build/components/conversation/attachments/attachment_deleting_overlay.js.map +1 -1
  9. package/build/components/conversation/attachments/audio_attachment.d.ts +2 -1
  10. package/build/components/conversation/attachments/audio_attachment.d.ts.map +1 -1
  11. package/build/components/conversation/attachments/audio_attachment.js +23 -6
  12. package/build/components/conversation/attachments/audio_attachment.js.map +1 -1
  13. package/build/components/conversation/attachments/expanded_link.d.ts +2 -1
  14. package/build/components/conversation/attachments/expanded_link.d.ts.map +1 -1
  15. package/build/components/conversation/attachments/expanded_link.js +8 -2
  16. package/build/components/conversation/attachments/expanded_link.js.map +1 -1
  17. package/build/components/conversation/attachments/generic_file_attachment.d.ts +2 -1
  18. package/build/components/conversation/attachments/generic_file_attachment.d.ts.map +1 -1
  19. package/build/components/conversation/attachments/generic_file_attachment.js +12 -2
  20. package/build/components/conversation/attachments/generic_file_attachment.js.map +1 -1
  21. package/build/components/conversation/attachments/giphy_attachment.d.ts +2 -1
  22. package/build/components/conversation/attachments/giphy_attachment.d.ts.map +1 -1
  23. package/build/components/conversation/attachments/giphy_attachment.js +7 -2
  24. package/build/components/conversation/attachments/giphy_attachment.js.map +1 -1
  25. package/build/components/conversation/attachments/image_attachment.d.ts +2 -1
  26. package/build/components/conversation/attachments/image_attachment.d.ts.map +1 -1
  27. package/build/components/conversation/attachments/image_attachment.js +53 -16
  28. package/build/components/conversation/attachments/image_attachment.js.map +1 -1
  29. package/build/components/conversation/attachments/video_attachment.d.ts +2 -1
  30. package/build/components/conversation/attachments/video_attachment.d.ts.map +1 -1
  31. package/build/components/conversation/attachments/video_attachment.js +13 -3
  32. package/build/components/conversation/attachments/video_attachment.js.map +1 -1
  33. package/build/components/conversation/conversation_start_banner.d.ts +2 -1
  34. package/build/components/conversation/conversation_start_banner.d.ts.map +1 -1
  35. package/build/components/conversation/conversation_start_banner.js +14 -2
  36. package/build/components/conversation/conversation_start_banner.js.map +1 -1
  37. package/build/components/conversation/empty_conversation_blank_state.d.ts +1 -1
  38. package/build/components/conversation/empty_conversation_blank_state.d.ts.map +1 -1
  39. package/build/components/conversation/empty_conversation_blank_state.js +9 -2
  40. package/build/components/conversation/empty_conversation_blank_state.js.map +1 -1
  41. package/build/components/conversation/jump_to_bottom_button.d.ts +1 -1
  42. package/build/components/conversation/jump_to_bottom_button.d.ts.map +1 -1
  43. package/build/components/conversation/jump_to_bottom_button.js +10 -2
  44. package/build/components/conversation/jump_to_bottom_button.js.map +1 -1
  45. package/build/components/conversation/message.d.ts +2 -1
  46. package/build/components/conversation/message.d.ts.map +1 -1
  47. package/build/components/conversation/message.js +53 -2
  48. package/build/components/conversation/message.js.map +1 -1
  49. package/build/components/conversation/message_attachments.d.ts +2 -1
  50. package/build/components/conversation/message_attachments.d.ts.map +1 -1
  51. package/build/components/conversation/message_attachments.js +21 -17
  52. package/build/components/conversation/message_attachments.js.map +1 -1
  53. package/build/components/conversation/message_form/message_form_attachment_file.d.ts +2 -1
  54. package/build/components/conversation/message_form/message_form_attachment_file.d.ts.map +1 -1
  55. package/build/components/conversation/message_form/message_form_attachment_file.js +2 -2
  56. package/build/components/conversation/message_form/message_form_attachment_file.js.map +1 -1
  57. package/build/components/conversation/message_form/message_form_attachment_image.d.ts +2 -1
  58. package/build/components/conversation/message_form/message_form_attachment_image.d.ts.map +1 -1
  59. package/build/components/conversation/message_form/message_form_attachment_image.js +2 -2
  60. package/build/components/conversation/message_form/message_form_attachment_image.js.map +1 -1
  61. package/build/components/conversation/message_form/message_form_attachment_video.d.ts +2 -1
  62. package/build/components/conversation/message_form/message_form_attachment_video.d.ts.map +1 -1
  63. package/build/components/conversation/message_form/message_form_attachment_video.js +2 -2
  64. package/build/components/conversation/message_form/message_form_attachment_video.js.map +1 -1
  65. package/build/components/conversation/message_form.d.ts +6 -5
  66. package/build/components/conversation/message_form.d.ts.map +1 -1
  67. package/build/components/conversation/message_form.js +82 -20
  68. package/build/components/conversation/message_form.js.map +1 -1
  69. package/build/components/conversation/message_markdown.d.ts +2 -1
  70. package/build/components/conversation/message_markdown.d.ts.map +1 -1
  71. package/build/components/conversation/message_markdown.js +16 -8
  72. package/build/components/conversation/message_markdown.js.map +1 -1
  73. package/build/components/conversation/message_reaction.d.ts +2 -1
  74. package/build/components/conversation/message_reaction.d.ts.map +1 -1
  75. package/build/components/conversation/message_reaction.js +5 -3
  76. package/build/components/conversation/message_reaction.js.map +1 -1
  77. package/build/components/conversation/message_read_receipts.d.ts +2 -1
  78. package/build/components/conversation/message_read_receipts.d.ts.map +1 -1
  79. package/build/components/conversation/message_read_receipts.js +13 -3
  80. package/build/components/conversation/message_read_receipts.js.map +1 -1
  81. package/build/components/conversation/messages_disabled_banners.d.ts +3 -3
  82. package/build/components/conversation/messages_disabled_banners.d.ts.map +1 -1
  83. package/build/components/conversation/messages_disabled_banners.js +8 -5
  84. package/build/components/conversation/messages_disabled_banners.js.map +1 -1
  85. package/build/components/conversation/reply_connectors.d.ts +2 -2
  86. package/build/components/conversation/reply_connectors.d.ts.map +1 -1
  87. package/build/components/conversation/reply_connectors.js +50 -18
  88. package/build/components/conversation/reply_connectors.js.map +1 -1
  89. package/build/components/conversation/reply_shadow_message.d.ts +2 -1
  90. package/build/components/conversation/reply_shadow_message.d.ts.map +1 -1
  91. package/build/components/conversation/reply_shadow_message.js +46 -16
  92. package/build/components/conversation/reply_shadow_message.js.map +1 -1
  93. package/build/components/conversation/system_message.d.ts +2 -1
  94. package/build/components/conversation/system_message.d.ts.map +1 -1
  95. package/build/components/conversation/system_message.js +12 -3
  96. package/build/components/conversation/system_message.js.map +1 -1
  97. package/build/components/conversation/typing_indicator.d.ts +2 -1
  98. package/build/components/conversation/typing_indicator.d.ts.map +1 -1
  99. package/build/components/conversation/typing_indicator.js +13 -3
  100. package/build/components/conversation/typing_indicator.js.map +1 -1
  101. package/build/components/conversations/conversation_actions.d.ts +2 -2
  102. package/build/components/conversations/conversation_actions.d.ts.map +1 -1
  103. package/build/components/conversations/conversation_actions.js +10 -4
  104. package/build/components/conversations/conversation_actions.js.map +1 -1
  105. package/build/components/conversations/conversation_preview.d.ts +3 -2
  106. package/build/components/conversations/conversation_preview.d.ts.map +1 -1
  107. package/build/components/conversations/conversation_preview.js +76 -12
  108. package/build/components/conversations/conversation_preview.js.map +1 -1
  109. package/build/components/conversations/conversations.d.ts +1 -1
  110. package/build/components/conversations/conversations.d.ts.map +1 -1
  111. package/build/components/conversations/conversations.js +17 -16
  112. package/build/components/conversations/conversations.js.map +1 -1
  113. package/build/components/conversations/conversations_blank_state.d.ts +2 -1
  114. package/build/components/conversations/conversations_blank_state.d.ts.map +1 -1
  115. package/build/components/conversations/conversations_blank_state.js +12 -2
  116. package/build/components/conversations/conversations_blank_state.js.map +1 -1
  117. package/build/components/conversations/mute_indicator.d.ts +2 -1
  118. package/build/components/conversations/mute_indicator.d.ts.map +1 -1
  119. package/build/components/conversations/mute_indicator.js +2 -2
  120. package/build/components/conversations/mute_indicator.js.map +1 -1
  121. package/build/components/conversations/swipeable_toggle_button.d.ts +2 -1
  122. package/build/components/conversations/swipeable_toggle_button.d.ts.map +1 -1
  123. package/build/components/conversations/swipeable_toggle_button.js +10 -3
  124. package/build/components/conversations/swipeable_toggle_button.js.map +1 -1
  125. package/build/components/conversations/unread_count_badge.d.ts +4 -2
  126. package/build/components/conversations/unread_count_badge.d.ts.map +1 -1
  127. package/build/components/conversations/unread_count_badge.js +12 -7
  128. package/build/components/conversations/unread_count_badge.js.map +1 -1
  129. package/build/components/display/action_button.d.ts +1 -1
  130. package/build/components/display/action_button.d.ts.map +1 -1
  131. package/build/components/display/action_button.js +13 -3
  132. package/build/components/display/action_button.js.map +1 -1
  133. package/build/components/display/adult_requirement_notice.d.ts +2 -1
  134. package/build/components/display/adult_requirement_notice.d.ts.map +1 -1
  135. package/build/components/display/adult_requirement_notice.js +4 -2
  136. package/build/components/display/adult_requirement_notice.js.map +1 -1
  137. package/build/components/display/avatar.d.ts +2 -1
  138. package/build/components/display/avatar.d.ts.map +1 -1
  139. package/build/components/display/avatar.js +7 -2
  140. package/build/components/display/avatar.js.map +1 -1
  141. package/build/components/display/avatar_group.d.ts +2 -1
  142. package/build/components/display/avatar_group.d.ts.map +1 -1
  143. package/build/components/display/avatar_group.js +9 -2
  144. package/build/components/display/avatar_group.js.map +1 -1
  145. package/build/components/display/badge.d.ts +2 -1
  146. package/build/components/display/badge.d.ts.map +1 -1
  147. package/build/components/display/badge.js +37 -6
  148. package/build/components/display/badge.js.map +1 -1
  149. package/build/components/display/banner.d.ts +3 -3
  150. package/build/components/display/banner.d.ts.map +1 -1
  151. package/build/components/display/banner.js +11 -4
  152. package/build/components/display/banner.js.map +1 -1
  153. package/build/components/display/banner_collapsible.d.ts +2 -2
  154. package/build/components/display/banner_collapsible.d.ts.map +1 -1
  155. package/build/components/display/banner_collapsible.js +10 -2
  156. package/build/components/display/banner_collapsible.js.map +1 -1
  157. package/build/components/display/button.d.ts +2 -1
  158. package/build/components/display/button.d.ts.map +1 -1
  159. package/build/components/display/button.js +14 -3
  160. package/build/components/display/button.js.map +1 -1
  161. package/build/components/display/child_notice.d.ts +2 -1
  162. package/build/components/display/child_notice.d.ts.map +1 -1
  163. package/build/components/display/child_notice.js +15 -3
  164. package/build/components/display/child_notice.js.map +1 -1
  165. package/build/components/display/conversation_avatar.d.ts +2 -1
  166. package/build/components/display/conversation_avatar.d.ts.map +1 -1
  167. package/build/components/display/conversation_avatar.js +9 -5
  168. package/build/components/display/conversation_avatar.js.map +1 -1
  169. package/build/components/display/emoji_avatar.d.ts +2 -1
  170. package/build/components/display/emoji_avatar.d.ts.map +1 -1
  171. package/build/components/display/emoji_avatar.js +12 -2
  172. package/build/components/display/emoji_avatar.js.map +1 -1
  173. package/build/components/display/file_attachment_preview.d.ts +1 -1
  174. package/build/components/display/file_attachment_preview.d.ts.map +1 -1
  175. package/build/components/display/file_attachment_preview.js +17 -3
  176. package/build/components/display/file_attachment_preview.js.map +1 -1
  177. package/build/components/display/heading.d.ts +2 -1
  178. package/build/components/display/heading.d.ts.map +1 -1
  179. package/build/components/display/heading.js +4 -2
  180. package/build/components/display/heading.js.map +1 -1
  181. package/build/components/display/icon.d.ts +2 -1
  182. package/build/components/display/icon.d.ts.map +1 -1
  183. package/build/components/display/icon.js +4 -4
  184. package/build/components/display/icon.js.map +1 -1
  185. package/build/components/display/icon_avatar.d.ts +2 -1
  186. package/build/components/display/icon_avatar.d.ts.map +1 -1
  187. package/build/components/display/icon_avatar.js +12 -2
  188. package/build/components/display/icon_avatar.js.map +1 -1
  189. package/build/components/display/icon_button.d.ts +2 -1
  190. package/build/components/display/icon_button.d.ts.map +1 -1
  191. package/build/components/display/icon_button.js +5 -3
  192. package/build/components/display/icon_button.js.map +1 -1
  193. package/build/components/display/image.d.ts +2 -1
  194. package/build/components/display/image.d.ts.map +1 -1
  195. package/build/components/display/image.js +7 -3
  196. package/build/components/display/image.js.map +1 -1
  197. package/build/components/display/image_attachment_preview.d.ts +1 -1
  198. package/build/components/display/image_attachment_preview.d.ts.map +1 -1
  199. package/build/components/display/image_attachment_preview.js +7 -2
  200. package/build/components/display/image_attachment_preview.js.map +1 -1
  201. package/build/components/display/keyboard_view.d.ts +2 -1
  202. package/build/components/display/keyboard_view.d.ts.map +1 -1
  203. package/build/components/display/keyboard_view.js +9 -4
  204. package/build/components/display/keyboard_view.js.map +1 -1
  205. package/build/components/display/person.d.ts +2 -1
  206. package/build/components/display/person.d.ts.map +1 -1
  207. package/build/components/display/person.js +12 -2
  208. package/build/components/display/person.js.map +1 -1
  209. package/build/components/display/platform_modal_header_buttons.d.ts +3 -3
  210. package/build/components/display/platform_modal_header_buttons.d.ts.map +1 -1
  211. package/build/components/display/platform_modal_header_buttons.js +10 -5
  212. package/build/components/display/platform_modal_header_buttons.js.map +1 -1
  213. package/build/components/display/pressable_row.d.ts +1 -1
  214. package/build/components/display/pressable_row.d.ts.map +1 -1
  215. package/build/components/display/pressable_row.js +7 -2
  216. package/build/components/display/pressable_row.js.map +1 -1
  217. package/build/components/display/spinner.d.ts +2 -1
  218. package/build/components/display/spinner.d.ts.map +1 -1
  219. package/build/components/display/spinner.js +9 -3
  220. package/build/components/display/spinner.js.map +1 -1
  221. package/build/components/display/switch.d.ts +2 -1
  222. package/build/components/display/switch.d.ts.map +1 -1
  223. package/build/components/display/switch.js +2 -2
  224. package/build/components/display/switch.js.map +1 -1
  225. package/build/components/display/tabs.d.ts +1 -1
  226. package/build/components/display/tabs.d.ts.map +1 -1
  227. package/build/components/display/tabs.js +31 -21
  228. package/build/components/display/tabs.js.map +1 -1
  229. package/build/components/display/text.d.ts +2 -1
  230. package/build/components/display/text.d.ts.map +1 -1
  231. package/build/components/display/text.js +4 -2
  232. package/build/components/display/text.js.map +1 -1
  233. package/build/components/display/text_button.d.ts +2 -1
  234. package/build/components/display/text_button.d.ts.map +1 -1
  235. package/build/components/display/text_button.js +8 -3
  236. package/build/components/display/text_button.js.map +1 -1
  237. package/build/components/display/text_inline_button.d.ts +2 -1
  238. package/build/components/display/text_inline_button.d.ts.map +1 -1
  239. package/build/components/display/text_inline_button.js +5 -4
  240. package/build/components/display/text_inline_button.js.map +1 -1
  241. package/build/components/display/text_input.d.ts +1 -1
  242. package/build/components/display/text_input.d.ts.map +1 -1
  243. package/build/components/display/text_input.js +1 -2
  244. package/build/components/display/text_input.js.map +1 -1
  245. package/build/components/display/toggle_button.d.ts +2 -1
  246. package/build/components/display/toggle_button.d.ts.map +1 -1
  247. package/build/components/display/toggle_button.js +9 -3
  248. package/build/components/display/toggle_button.js.map +1 -1
  249. package/build/components/display/video_attachment_preview.d.ts +1 -1
  250. package/build/components/display/video_attachment_preview.d.ts.map +1 -1
  251. package/build/components/display/video_attachment_preview.js +20 -3
  252. package/build/components/display/video_attachment_preview.js.map +1 -1
  253. package/build/components/group_conversation_list.d.ts +1 -1
  254. package/build/components/group_conversation_list.d.ts.map +1 -1
  255. package/build/components/group_conversation_list.js +14 -4
  256. package/build/components/group_conversation_list.js.map +1 -1
  257. package/build/components/page/component_error_boundary.d.ts +2 -2
  258. package/build/components/page/component_error_boundary.d.ts.map +1 -1
  259. package/build/components/page/component_error_boundary.js +4 -2
  260. package/build/components/page/component_error_boundary.js.map +1 -1
  261. package/build/components/page/loading.d.ts +2 -1
  262. package/build/components/page/loading.d.ts.map +1 -1
  263. package/build/components/page/loading.js +4 -2
  264. package/build/components/page/loading.js.map +1 -1
  265. package/build/components/page/page_error_boundary.d.ts +2 -2
  266. package/build/components/page/page_error_boundary.d.ts.map +1 -1
  267. package/build/components/page/page_error_boundary.js +32 -11
  268. package/build/components/page/page_error_boundary.js.map +1 -1
  269. package/build/components/primitive/avatar_primitive.js +41 -14
  270. package/build/components/primitive/avatar_primitive.js.map +1 -1
  271. package/build/components/primitive/banner_primitive.js +18 -10
  272. package/build/components/primitive/banner_primitive.js.map +1 -1
  273. package/build/components/primitive/blank_state_primitive.js +12 -8
  274. package/build/components/primitive/blank_state_primitive.js.map +1 -1
  275. package/build/components/primitive/form_sheet.d.ts +1 -1
  276. package/build/components/primitive/form_sheet.d.ts.map +1 -1
  277. package/build/components/primitive/form_sheet.js +22 -9
  278. package/build/components/primitive/form_sheet.js.map +1 -1
  279. package/build/components/safe_area_modal.d.ts +1 -1
  280. package/build/components/safe_area_modal.d.ts.map +1 -1
  281. package/build/components/safe_area_modal.js +3 -2
  282. package/build/components/safe_area_modal.js.map +1 -1
  283. package/build/contexts/api_provider.d.ts +2 -1
  284. package/build/contexts/api_provider.d.ts.map +1 -1
  285. package/build/contexts/api_provider.js +5 -3
  286. package/build/contexts/api_provider.js.map +1 -1
  287. package/build/contexts/chat_context.d.ts +1 -1
  288. package/build/contexts/chat_context.d.ts.map +1 -1
  289. package/build/contexts/chat_context.js +1 -2
  290. package/build/contexts/chat_context.js.map +1 -1
  291. package/build/contexts/conversation_context.d.ts +2 -2
  292. package/build/contexts/conversation_context.d.ts.map +1 -1
  293. package/build/contexts/conversation_context.js +2 -3
  294. package/build/contexts/conversation_context.js.map +1 -1
  295. package/build/contexts/conversations_context.d.ts +2 -2
  296. package/build/contexts/conversations_context.d.ts.map +1 -1
  297. package/build/contexts/conversations_context.js +2 -3
  298. package/build/contexts/conversations_context.js.map +1 -1
  299. package/build/contexts/session_context.d.ts +1 -1
  300. package/build/contexts/session_context.d.ts.map +1 -1
  301. package/build/contexts/session_context.js +2 -3
  302. package/build/contexts/session_context.js.map +1 -1
  303. package/build/hooks/use_animated_message_background_color.d.ts +2 -2
  304. package/build/hooks/use_conversation.d.ts +1 -1
  305. package/build/hooks/use_conversation.d.ts.map +1 -1
  306. package/build/hooks/use_conversation.js +2 -0
  307. package/build/hooks/use_conversation.js.map +1 -1
  308. package/build/hooks/use_conversation_jolt_events.d.ts.map +1 -1
  309. package/build/hooks/use_conversation_jolt_events.js +4 -19
  310. package/build/hooks/use_conversation_jolt_events.js.map +1 -1
  311. package/build/hooks/use_conversation_membership.d.ts +1 -1
  312. package/build/hooks/use_conversation_membership.d.ts.map +1 -1
  313. package/build/hooks/use_conversation_messages.d.ts +0 -1
  314. package/build/hooks/use_conversation_messages.d.ts.map +1 -1
  315. package/build/hooks/use_conversation_messages.js +2 -2
  316. package/build/hooks/use_conversation_messages.js.map +1 -1
  317. package/build/hooks/use_conversations_actions.d.ts +36 -36
  318. package/build/hooks/use_conversations_actions.d.ts.map +1 -1
  319. package/build/hooks/use_conversations_actions.js +3 -1
  320. package/build/hooks/use_conversations_actions.js.map +1 -1
  321. package/build/hooks/use_mark_latest_message_read.d.ts.map +1 -1
  322. package/build/hooks/use_mark_latest_message_read.js +3 -4
  323. package/build/hooks/use_mark_latest_message_read.js.map +1 -1
  324. package/build/hooks/use_person_settings.d.ts +1 -1
  325. package/build/index.d.ts +1 -2
  326. package/build/index.d.ts.map +1 -1
  327. package/build/index.js.map +1 -1
  328. package/build/navigation/chat_access_gate.d.ts +2 -2
  329. package/build/navigation/chat_access_gate.d.ts.map +1 -1
  330. package/build/navigation/chat_access_gate.js +5 -6
  331. package/build/navigation/chat_access_gate.js.map +1 -1
  332. package/build/navigation/index.d.ts +36 -35
  333. package/build/navigation/index.d.ts.map +1 -1
  334. package/build/navigation/index.js +21 -19
  335. package/build/navigation/index.js.map +1 -1
  336. package/build/navigation/screenLayout.d.ts +2 -2
  337. package/build/navigation/screenLayout.d.ts.map +1 -1
  338. package/build/navigation/screenLayout.js +9 -3
  339. package/build/navigation/screenLayout.js.map +1 -1
  340. package/build/polyfills/events/EventTarget.d.ts +1 -1
  341. package/build/polyfills/events/EventTarget.d.ts.map +1 -1
  342. package/build/polyfills/events/EventTarget.js.map +1 -1
  343. package/build/screens/age_check/age_check_required_screen.d.ts +2 -1
  344. package/build/screens/age_check/age_check_required_screen.d.ts.map +1 -1
  345. package/build/screens/age_check/age_check_required_screen.js +46 -3
  346. package/build/screens/age_check/age_check_required_screen.js.map +1 -1
  347. package/build/screens/age_check/age_check_underage_screen.d.ts +2 -1
  348. package/build/screens/age_check/age_check_underage_screen.d.ts.map +1 -1
  349. package/build/screens/age_check/age_check_underage_screen.js +25 -2
  350. package/build/screens/age_check/age_check_underage_screen.js.map +1 -1
  351. package/build/screens/age_check/components/age_check_select_birthdate_modal.d.ts +2 -1
  352. package/build/screens/age_check/components/age_check_select_birthdate_modal.d.ts.map +1 -1
  353. package/build/screens/age_check/components/age_check_select_birthdate_modal.js +25 -6
  354. package/build/screens/age_check/components/age_check_select_birthdate_modal.js.map +1 -1
  355. package/build/screens/attachment_actions/attachment_actions_screen.d.ts +2 -1
  356. package/build/screens/attachment_actions/attachment_actions_screen.d.ts.map +1 -1
  357. package/build/screens/attachment_actions/attachment_actions_screen.js +5 -3
  358. package/build/screens/attachment_actions/attachment_actions_screen.js.map +1 -1
  359. package/build/screens/avatar_picker/avatar_picker_screen.d.ts +2 -1
  360. package/build/screens/avatar_picker/avatar_picker_screen.d.ts.map +1 -1
  361. package/build/screens/avatar_picker/avatar_picker_screen.js +36 -9
  362. package/build/screens/avatar_picker/avatar_picker_screen.js.map +1 -1
  363. package/build/screens/avatar_picker/avatar_preview.d.ts +1 -1
  364. package/build/screens/avatar_picker/avatar_preview.d.ts.map +1 -1
  365. package/build/screens/avatar_picker/avatar_preview.js +9 -5
  366. package/build/screens/avatar_picker/avatar_preview.js.map +1 -1
  367. package/build/screens/avatar_picker/color_picker.d.ts +2 -1
  368. package/build/screens/avatar_picker/color_picker.d.ts.map +1 -1
  369. package/build/screens/avatar_picker/color_picker.js +5 -4
  370. package/build/screens/avatar_picker/color_picker.js.map +1 -1
  371. package/build/screens/avatar_picker/emoji_tab.d.ts +2 -1
  372. package/build/screens/avatar_picker/emoji_tab.d.ts.map +1 -1
  373. package/build/screens/avatar_picker/emoji_tab.js +13 -12
  374. package/build/screens/avatar_picker/emoji_tab.js.map +1 -1
  375. package/build/screens/avatar_picker/icon_grid.d.ts +2 -1
  376. package/build/screens/avatar_picker/icon_grid.d.ts.map +1 -1
  377. package/build/screens/avatar_picker/icon_grid.js +5 -4
  378. package/build/screens/avatar_picker/icon_grid.js.map +1 -1
  379. package/build/screens/avatar_picker/upload_tab.d.ts +2 -1
  380. package/build/screens/avatar_picker/upload_tab.d.ts.map +1 -1
  381. package/build/screens/avatar_picker/upload_tab.js +4 -3
  382. package/build/screens/avatar_picker/upload_tab.js.map +1 -1
  383. package/build/screens/bug_report_screen.d.ts +2 -1
  384. package/build/screens/bug_report_screen.d.ts.map +1 -1
  385. package/build/screens/bug_report_screen.js +117 -11
  386. package/build/screens/bug_report_screen.js.map +1 -1
  387. package/build/screens/conversation/message_read_receipts_screen.d.ts +2 -1
  388. package/build/screens/conversation/message_read_receipts_screen.d.ts.map +1 -1
  389. package/build/screens/conversation/message_read_receipts_screen.js +20 -4
  390. package/build/screens/conversation/message_read_receipts_screen.js.map +1 -1
  391. package/build/screens/conversation_details_screen.d.ts +2 -1
  392. package/build/screens/conversation_details_screen.d.ts.map +1 -1
  393. package/build/screens/conversation_details_screen.js +106 -43
  394. package/build/screens/conversation_details_screen.js.map +1 -1
  395. package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts +1 -1
  396. package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts.map +1 -1
  397. package/build/screens/conversation_filter_recipients/components/checkbox_row.js +9 -3
  398. package/build/screens/conversation_filter_recipients/components/checkbox_row.js.map +1 -1
  399. package/build/screens/conversation_filter_recipients/components/header_row.d.ts +1 -1
  400. package/build/screens/conversation_filter_recipients/components/header_row.d.ts.map +1 -1
  401. package/build/screens/conversation_filter_recipients/components/header_row.js +12 -2
  402. package/build/screens/conversation_filter_recipients/components/header_row.js.map +1 -1
  403. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts +2 -1
  404. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts.map +1 -1
  405. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js +44 -20
  406. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js.map +1 -1
  407. package/build/screens/conversation_filters/components/conversation_filters.d.ts +2 -1
  408. package/build/screens/conversation_filters/components/conversation_filters.d.ts.map +1 -1
  409. package/build/screens/conversation_filters/components/conversation_filters.js +11 -10
  410. package/build/screens/conversation_filters/components/conversation_filters.js.map +1 -1
  411. package/build/screens/conversation_filters/components/rows.d.ts +6 -6
  412. package/build/screens/conversation_filters/components/rows.d.ts.map +1 -1
  413. package/build/screens/conversation_filters/components/rows.js +34 -7
  414. package/build/screens/conversation_filters/components/rows.js.map +1 -1
  415. package/build/screens/conversation_filters/context/conversation_filter_context.d.ts +1 -1
  416. package/build/screens/conversation_filters/context/conversation_filter_context.d.ts.map +1 -1
  417. package/build/screens/conversation_filters/context/conversation_filter_context.js +1 -2
  418. package/build/screens/conversation_filters/context/conversation_filter_context.js.map +1 -1
  419. package/build/screens/conversation_filters/group_filters.d.ts +2 -1
  420. package/build/screens/conversation_filters/group_filters.d.ts.map +1 -1
  421. package/build/screens/conversation_filters/group_filters.js +2 -2
  422. package/build/screens/conversation_filters/group_filters.js.map +1 -1
  423. package/build/screens/conversation_filters/team_filters.d.ts +2 -1
  424. package/build/screens/conversation_filters/team_filters.d.ts.map +1 -1
  425. package/build/screens/conversation_filters/team_filters.js +2 -2
  426. package/build/screens/conversation_filters/team_filters.js.map +1 -1
  427. package/build/screens/conversation_filters_screen.d.ts +2 -1
  428. package/build/screens/conversation_filters_screen.d.ts.map +1 -1
  429. package/build/screens/conversation_filters_screen.js +16 -4
  430. package/build/screens/conversation_filters_screen.js.map +1 -1
  431. package/build/screens/conversation_new/components/avatar_selection_row.d.ts +3 -2
  432. package/build/screens/conversation_new/components/avatar_selection_row.d.ts.map +1 -1
  433. package/build/screens/conversation_new/components/avatar_selection_row.js +16 -6
  434. package/build/screens/conversation_new/components/avatar_selection_row.js.map +1 -1
  435. package/build/screens/conversation_new/components/filter_by_plan.d.ts +4 -3
  436. package/build/screens/conversation_new/components/filter_by_plan.d.ts.map +1 -1
  437. package/build/screens/conversation_new/components/filter_by_plan.js +46 -22
  438. package/build/screens/conversation_new/components/filter_by_plan.js.map +1 -1
  439. package/build/screens/conversation_new/components/form_list.d.ts +3 -2
  440. package/build/screens/conversation_new/components/form_list.d.ts.map +1 -1
  441. package/build/screens/conversation_new/components/form_list.js +6 -4
  442. package/build/screens/conversation_new/components/form_list.js.map +1 -1
  443. package/build/screens/conversation_new/components/gender_filter_toggle.d.ts +2 -1
  444. package/build/screens/conversation_new/components/gender_filter_toggle.d.ts.map +1 -1
  445. package/build/screens/conversation_new/components/gender_filter_toggle.js +20 -4
  446. package/build/screens/conversation_new/components/gender_filter_toggle.js.map +1 -1
  447. package/build/screens/conversation_new/components/groups_form.d.ts +2 -1
  448. package/build/screens/conversation_new/components/groups_form.d.ts.map +1 -1
  449. package/build/screens/conversation_new/components/groups_form.js +30 -4
  450. package/build/screens/conversation_new/components/groups_form.js.map +1 -1
  451. package/build/screens/conversation_new/components/services_form.d.ts +2 -1
  452. package/build/screens/conversation_new/components/services_form.d.ts.map +1 -1
  453. package/build/screens/conversation_new/components/services_form.js +61 -27
  454. package/build/screens/conversation_new/components/services_form.js.map +1 -1
  455. package/build/screens/conversation_new/components/source_app_error_card.d.ts +1 -1
  456. package/build/screens/conversation_new/components/source_app_error_card.d.ts.map +1 -1
  457. package/build/screens/conversation_new/components/source_app_error_card.js +3 -2
  458. package/build/screens/conversation_new/components/source_app_error_card.js.map +1 -1
  459. package/build/screens/conversation_new/conversation_new_screen.d.ts +2 -1
  460. package/build/screens/conversation_new/conversation_new_screen.d.ts.map +1 -1
  461. package/build/screens/conversation_new/conversation_new_screen.js +4 -4
  462. package/build/screens/conversation_new/conversation_new_screen.js.map +1 -1
  463. package/build/screens/conversation_notification_level_select_screen.d.ts +2 -1
  464. package/build/screens/conversation_notification_level_select_screen.d.ts.map +1 -1
  465. package/build/screens/conversation_notification_level_select_screen.js +6 -4
  466. package/build/screens/conversation_notification_level_select_screen.js.map +1 -1
  467. package/build/screens/conversation_screen.d.ts +3 -2
  468. package/build/screens/conversation_screen.d.ts.map +1 -1
  469. package/build/screens/conversation_screen.js +66 -25
  470. package/build/screens/conversation_screen.js.map +1 -1
  471. package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts +1 -1
  472. package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts.map +1 -1
  473. package/build/screens/conversation_select_recipients/components/groups_recipient_row.js +1 -2
  474. package/build/screens/conversation_select_recipients/components/groups_recipient_row.js.map +1 -1
  475. package/build/screens/conversation_select_recipients/components/recipient_link_row.d.ts +2 -1
  476. package/build/screens/conversation_select_recipients/components/recipient_link_row.d.ts.map +1 -1
  477. package/build/screens/conversation_select_recipients/components/recipient_link_row.js +15 -2
  478. package/build/screens/conversation_select_recipients/components/recipient_link_row.js.map +1 -1
  479. package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts +2 -1
  480. package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts.map +1 -1
  481. package/build/screens/conversation_select_recipients/components/restricted_group_row.js +14 -2
  482. package/build/screens/conversation_select_recipients/components/restricted_group_row.js.map +1 -1
  483. package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts +1 -1
  484. package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts.map +1 -1
  485. package/build/screens/conversation_select_recipients/components/team_recipient_row.js +1 -2
  486. package/build/screens/conversation_select_recipients/components/team_recipient_row.js.map +1 -1
  487. package/build/screens/conversation_select_recipients/components/view_more_link_row.d.ts +1 -1
  488. package/build/screens/conversation_select_recipients/components/view_more_link_row.d.ts.map +1 -1
  489. package/build/screens/conversation_select_recipients/components/view_more_link_row.js +5 -2
  490. package/build/screens/conversation_select_recipients/components/view_more_link_row.js.map +1 -1
  491. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts +2 -1
  492. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts.map +1 -1
  493. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js +11 -4
  494. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js.map +1 -1
  495. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts +1 -1
  496. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts.map +1 -1
  497. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js +83 -11
  498. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js.map +1 -1
  499. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts +2 -1
  500. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts.map +1 -1
  501. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js +14 -7
  502. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js.map +1 -1
  503. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts +2 -1
  504. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts.map +1 -1
  505. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js +18 -15
  506. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js.map +1 -1
  507. package/build/screens/conversation_select_type_screen.d.ts +2 -1
  508. package/build/screens/conversation_select_type_screen.d.ts.map +1 -1
  509. package/build/screens/conversation_select_type_screen.js +10 -3
  510. package/build/screens/conversation_select_type_screen.js.map +1 -1
  511. package/build/screens/conversations/components/chat_group_badge.d.ts +2 -1
  512. package/build/screens/conversations/components/chat_group_badge.d.ts.map +1 -1
  513. package/build/screens/conversations/components/chat_group_badge.js +4 -3
  514. package/build/screens/conversations/components/chat_group_badge.js.map +1 -1
  515. package/build/screens/conversations/components/list_header_action_button.d.ts +2 -1
  516. package/build/screens/conversations/components/list_header_action_button.d.ts.map +1 -1
  517. package/build/screens/conversations/components/list_header_action_button.js +5 -3
  518. package/build/screens/conversations/components/list_header_action_button.js.map +1 -1
  519. package/build/screens/conversations/components/list_header_component.d.ts +2 -1
  520. package/build/screens/conversations/components/list_header_component.d.ts.map +1 -1
  521. package/build/screens/conversations/components/list_header_component.js +42 -19
  522. package/build/screens/conversations/components/list_header_component.js.map +1 -1
  523. package/build/screens/conversations/conversations_screen.d.ts +2 -1
  524. package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
  525. package/build/screens/conversations/conversations_screen.js +6 -2
  526. package/build/screens/conversations/conversations_screen.js.map +1 -1
  527. package/build/screens/design_system_screen.d.ts +2 -1
  528. package/build/screens/design_system_screen.d.ts.map +1 -1
  529. package/build/screens/design_system_screen.js +558 -35
  530. package/build/screens/design_system_screen.js.map +1 -1
  531. package/build/screens/get_help_screen.d.ts +1 -1
  532. package/build/screens/get_help_screen.d.ts.map +1 -1
  533. package/build/screens/get_help_screen.js +25 -4
  534. package/build/screens/get_help_screen.js.map +1 -1
  535. package/build/screens/group_notification_level_select_screen.d.ts +2 -1
  536. package/build/screens/group_notification_level_select_screen.d.ts.map +1 -1
  537. package/build/screens/group_notification_level_select_screen.js +4 -2
  538. package/build/screens/group_notification_level_select_screen.js.map +1 -1
  539. package/build/screens/group_notification_settings_screen.d.ts +2 -1
  540. package/build/screens/group_notification_settings_screen.d.ts.map +1 -1
  541. package/build/screens/group_notification_settings_screen.js +25 -3
  542. package/build/screens/group_notification_settings_screen.js.map +1 -1
  543. package/build/screens/message_actions_screen.d.ts +2 -1
  544. package/build/screens/message_actions_screen.d.ts.map +1 -1
  545. package/build/screens/message_actions_screen.js +28 -12
  546. package/build/screens/message_actions_screen.js.map +1 -1
  547. package/build/screens/message_report/components/message_preview.d.ts +2 -1
  548. package/build/screens/message_report/components/message_preview.d.ts.map +1 -1
  549. package/build/screens/message_report/components/message_preview.js +22 -2
  550. package/build/screens/message_report/components/message_preview.js.map +1 -1
  551. package/build/screens/message_report/components/report_reason_list.d.ts +2 -1
  552. package/build/screens/message_report/components/report_reason_list.d.ts.map +1 -1
  553. package/build/screens/message_report/components/report_reason_list.js +13 -4
  554. package/build/screens/message_report/components/report_reason_list.js.map +1 -1
  555. package/build/screens/message_report_screen.d.ts +2 -1
  556. package/build/screens/message_report_screen.d.ts.map +1 -1
  557. package/build/screens/message_report_screen.js +61 -9
  558. package/build/screens/message_report_screen.js.map +1 -1
  559. package/build/screens/not_found.d.ts +2 -1
  560. package/build/screens/not_found.d.ts.map +1 -1
  561. package/build/screens/not_found.js +5 -2
  562. package/build/screens/not_found.js.map +1 -1
  563. package/build/screens/notification_settings/hooks/groups.d.ts +1 -1
  564. package/build/screens/notification_settings/hooks/groups.d.ts.map +1 -1
  565. package/build/screens/notification_settings_screen.d.ts +2 -1
  566. package/build/screens/notification_settings_screen.d.ts.map +1 -1
  567. package/build/screens/notification_settings_screen.js +66 -28
  568. package/build/screens/notification_settings_screen.js.map +1 -1
  569. package/build/screens/preferred_app_selection_screen.d.ts +2 -1
  570. package/build/screens/preferred_app_selection_screen.d.ts.map +1 -1
  571. package/build/screens/preferred_app_selection_screen.js +21 -3
  572. package/build/screens/preferred_app_selection_screen.js.map +1 -1
  573. package/build/screens/reactions_screen.d.ts +2 -1
  574. package/build/screens/reactions_screen.d.ts.map +1 -1
  575. package/build/screens/reactions_screen.js +19 -7
  576. package/build/screens/reactions_screen.js.map +1 -1
  577. package/build/screens/send_giphy_screen.d.ts +2 -1
  578. package/build/screens/send_giphy_screen.d.ts.map +1 -1
  579. package/build/screens/send_giphy_screen.js +31 -5
  580. package/build/screens/send_giphy_screen.js.map +1 -1
  581. package/build/screens/settings_screen.d.ts +2 -1
  582. package/build/screens/settings_screen.d.ts.map +1 -1
  583. package/build/screens/settings_screen.js +26 -4
  584. package/build/screens/settings_screen.js.map +1 -1
  585. package/build/screens/system_message_people_screen.d.ts +2 -1
  586. package/build/screens/system_message_people_screen.d.ts.map +1 -1
  587. package/build/screens/system_message_people_screen.js +10 -4
  588. package/build/screens/system_message_people_screen.js.map +1 -1
  589. package/build/screens/team_conversation_screen.d.ts +1 -1
  590. package/build/screens/team_conversation_screen.d.ts.map +1 -1
  591. package/build/screens/team_conversation_screen.js +12 -4
  592. package/build/screens/team_conversation_screen.js.map +1 -1
  593. package/build/types/resources/conversation.d.ts +10 -1
  594. package/build/types/resources/conversation.d.ts.map +1 -1
  595. package/build/types/resources/conversation.js.map +1 -1
  596. package/build/utils/request/conversation.d.ts.map +1 -1
  597. package/build/utils/request/conversation.js +2 -0
  598. package/build/utils/request/conversation.js.map +1 -1
  599. package/build/utils/response_error.d.ts.map +1 -1
  600. package/build/utils/response_error.js +16 -6
  601. package/build/utils/response_error.js.map +1 -1
  602. package/build/utils/sha_256.js.map +1 -1
  603. package/build/utils/system_messages.d.ts +1 -1
  604. package/build/utils/system_messages.d.ts.map +1 -1
  605. package/build/utils/system_messages.js.map +1 -1
  606. package/build/utils/theme.d.ts +2 -2
  607. package/build/utils/theme.d.ts.map +1 -1
  608. package/build/utils/theme.js.map +1 -1
  609. package/package.json +12 -12
  610. package/src/__tests__/hooks/use_attachment_uploader.test.tsx +0 -1
  611. package/src/__tests__/hooks/use_font_scale.test.ts +3 -7
  612. package/src/__tests__/utils/native_adapters/configuration.ts +1 -1
  613. package/src/__tests__/utils/system_messages.ts +1 -1
  614. package/src/__tests__/utils/uri.ts +50 -8
  615. package/src/__utils__/handlers.ts +6 -5
  616. package/src/components/conversation/attachments/attachment_deleting_overlay.tsx +3 -10
  617. package/src/components/conversations/conversation_preview.tsx +58 -23
  618. package/src/components/conversations/unread_count_badge.tsx +13 -4
  619. package/src/components/page/__tests__/component_error_boundary.test.tsx +1 -1
  620. package/src/components/page/__tests__/error_boundary.test.tsx +2 -6
  621. package/src/components/page/__tests__/page_error_boundary.test.tsx +1 -1
  622. package/src/hooks/use_conversation.ts +2 -0
  623. package/src/hooks/use_conversation_jolt_events.ts +3 -19
  624. package/src/hooks/use_conversation_messages.ts +5 -6
  625. package/src/hooks/use_conversations_actions.ts +3 -1
  626. package/src/hooks/use_mark_latest_message_read.ts +3 -4
  627. package/src/index.tsx +1 -2
  628. package/src/polyfills/events/EventTarget.ts +1 -1
  629. package/src/screens/conversation_screen.tsx +2 -4
  630. package/src/screens/conversations/components/list_header_component.tsx +6 -6
  631. package/src/types/resources/conversation.ts +11 -1
  632. package/src/utils/__tests__/response_error.test.ts +7 -0
  633. package/src/utils/request/conversation.ts +2 -0
  634. package/src/utils/response_error.ts +18 -7
  635. package/src/utils/sha_256.ts +24 -24
  636. package/src/utils/system_messages.ts +1 -1
  637. package/src/utils/theme.ts +2 -3
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import type { SwitchProps } from 'react-native';
2
- export declare function Switch({ disabled, value, ...props }: SwitchProps): import("react/jsx-runtime").JSX.Element;
3
+ export declare function Switch({ disabled, value, ...props }: SwitchProps): React.JSX.Element;
3
4
  //# sourceMappingURL=switch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../src/components/display/switch.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAO/C,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,2CAwBhE"}
1
+ {"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../src/components/display/switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAO/C,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,qBAwBhE"}
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import React from 'react';
2
2
  import { Platform, Switch as ReactNativeSwitch } from 'react-native';
3
3
  import { useTheme } from '../../hooks';
4
4
  // =================================
@@ -17,6 +17,6 @@ export function Switch({ disabled, value, ...props }) {
17
17
  },
18
18
  ios: undefined,
19
19
  });
20
- return (_jsx(ReactNativeSwitch, { ...props, thumbColor: platformThumbColor, trackColor: platformTrackColor, value: value, disabled: disabled }));
20
+ return (<ReactNativeSwitch {...props} thumbColor={platformThumbColor} trackColor={platformTrackColor} value={value} disabled={disabled}/>);
21
21
  }
22
22
  //# sourceMappingURL=switch.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"switch.js","sourceRoot":"","sources":["../../../src/components/display/switch.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAEpE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AAEpC,MAAM,UAAU,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,KAAK,EAAe;IAC/D,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAE7B,MAAM,kBAAkB,GAAG,QAAQ,CAAC,MAAM,CAAC;QACzC,OAAO,EAAE,KAAK,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC,CAAC,MAAM,CAAC,uBAAuB;QAC7F,GAAG,EAAE,SAAS;KACf,CAAC,CAAA;IACF,MAAM,kBAAkB,GAAG,QAAQ,CAAC,MAAM,CAAC;QACzC,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,CAAC,SAAS;YACvD,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,CAAC,MAAM,CAAC,mBAAmB;SAC1E;QACD,GAAG,EAAE,SAAS;KACf,CAAC,CAAA;IAEF,OAAO,CACL,KAAC,iBAAiB,OACZ,KAAK,EACT,UAAU,EAAE,kBAAkB,EAC9B,UAAU,EAAE,kBAAkB,EAC9B,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAA;AACH,CAAC","sourcesContent":["import React from 'react'\nimport { Platform, Switch as ReactNativeSwitch } from 'react-native'\nimport type { SwitchProps } from 'react-native'\nimport { useTheme } from '../../hooks'\n\n// =================================\n// ====== Component ================\n// =================================\n\nexport function Switch({ disabled, value, ...props }: SwitchProps) {\n const { colors } = useTheme()\n\n const platformThumbColor = Platform.select({\n android: value && !disabled ? colors.androidSwitchThumbColor : colors.fillColorNeutral050Base,\n ios: undefined,\n })\n const platformTrackColor = Platform.select({\n android: {\n true: disabled ? colors.fillColorNeutral060 : undefined,\n false: disabled ? colors.fillColorNeutral060 : colors.fillColorNeutral030,\n },\n ios: undefined,\n })\n\n return (\n <ReactNativeSwitch\n {...props}\n thumbColor={platformThumbColor}\n trackColor={platformTrackColor}\n value={value}\n disabled={disabled}\n />\n )\n}\n"]}
1
+ {"version":3,"file":"switch.js","sourceRoot":"","sources":["../../../src/components/display/switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAEpE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AAEpC,MAAM,UAAU,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,KAAK,EAAe;IAC/D,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAE7B,MAAM,kBAAkB,GAAG,QAAQ,CAAC,MAAM,CAAC;QACzC,OAAO,EAAE,KAAK,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC,CAAC,MAAM,CAAC,uBAAuB;QAC7F,GAAG,EAAE,SAAS;KACf,CAAC,CAAA;IACF,MAAM,kBAAkB,GAAG,QAAQ,CAAC,MAAM,CAAC;QACzC,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,CAAC,SAAS;YACvD,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,CAAC,MAAM,CAAC,mBAAmB;SAC1E;QACD,GAAG,EAAE,SAAS;KACf,CAAC,CAAA;IAEF,OAAO,CACL,CAAC,iBAAiB,CAChB,IAAI,KAAK,CAAC,CACV,UAAU,CAAC,CAAC,kBAAkB,CAAC,CAC/B,UAAU,CAAC,CAAC,kBAAkB,CAAC,CAC/B,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,QAAQ,CAAC,CAAC,QAAQ,CAAC,EACnB,CACH,CAAA;AACH,CAAC","sourcesContent":["import React from 'react'\nimport { Platform, Switch as ReactNativeSwitch } from 'react-native'\nimport type { SwitchProps } from 'react-native'\nimport { useTheme } from '../../hooks'\n\n// =================================\n// ====== Component ================\n// =================================\n\nexport function Switch({ disabled, value, ...props }: SwitchProps) {\n const { colors } = useTheme()\n\n const platformThumbColor = Platform.select({\n android: value && !disabled ? colors.androidSwitchThumbColor : colors.fillColorNeutral050Base,\n ios: undefined,\n })\n const platformTrackColor = Platform.select({\n android: {\n true: disabled ? colors.fillColorNeutral060 : undefined,\n false: disabled ? colors.fillColorNeutral060 : colors.fillColorNeutral030,\n },\n ios: undefined,\n })\n\n return (\n <ReactNativeSwitch\n {...props}\n thumbColor={platformThumbColor}\n trackColor={platformTrackColor}\n value={value}\n disabled={disabled}\n />\n )\n}\n"]}
@@ -12,6 +12,6 @@ interface TabsProps<ItemT> {
12
12
  style?: ViewStyle;
13
13
  contentContainerStyle?: ViewStyle;
14
14
  }
15
- export declare function Tabs<ItemT>({ activeTab, contentContainerStyle, data, keyExtractor, onTabPress, renderItem, style, }: TabsProps<ItemT>): import("react/jsx-runtime").JSX.Element;
15
+ export declare function Tabs<ItemT>({ activeTab, contentContainerStyle, data, keyExtractor, onTabPress, renderItem, style, }: TabsProps<ItemT>): React.JSX.Element;
16
16
  export {};
17
17
  //# sourceMappingURL=tabs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../src/components/display/tabs.tsx"],"names":[],"mappings":"AACA,OAAO,KAAsC,MAAM,OAAO,CAAA;AAC1D,OAAO,EAAsC,SAAS,EAAE,MAAM,cAAc,CAAA;AAO5E,UAAU,SAAS,CAAC,KAAK;IACvB,IAAI,EAAE,SAAS,CAAC,KAAK,CAAC,GAAG,I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SAAS,CAAA;IACjB,qBAAqB,CAAC,EAAE,SAAS,CAAA;CAClC;AAQD,wBAAgB,IAAI,CAAC,KAAK,EAAE,EAC1B,SAA+B,EAC/B,qBAAqB,EACrB,IAAI,EACJ,YAAkC,EAClC,UAAU,EACV,UAAU,EACV,KAAK,GACN,EAAE,SAAS,CAAC,KAAK,CAAC,qBA+ElB"}
@@ -1,6 +1,5 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
1
  import { PlatformPressable } from '@react-navigation/elements';
3
- import { useEffect, useRef, useState } from 'react';
2
+ import React, { useEffect, useRef, useState } from 'react';
4
3
  import { Animated, Easing, StyleSheet, View } from 'react-native';
5
4
  import { useTheme } from '../../hooks';
6
5
  const defaultKeyExtractor = (item, index) => {
@@ -37,25 +36,36 @@ export function Tabs({ activeTab = { id: '' }, contentContainerStyle, data, keyE
37
36
  useNativeDriver: true,
38
37
  }).start();
39
38
  }, [opacity, activeTabIndex]);
40
- return (_jsx(View, { style: [styles.container, style], children: _jsxs(Animated.View, { style: [styles.contentContainer, contentContainerStyle], children: [_jsx(View, { style: styles.tabsContainer, onLayout: event => {
41
- const { height } = event.nativeEvent.layout;
42
- setTabHeight(height);
43
- }, children: dataArray.map((item, index) => {
44
- return (_jsx(PlatformPressable, { style: styles.tab, onPress: () => {
45
- onTabPress?.(item);
46
- }, children: _jsx(View, { onLayout: event => {
47
- const { width } = event.nativeEvent.layout;
48
- setTabDimensions(dimensions => dimensions.add({ index, width }));
49
- }, children: renderItem({ item, index }) }) }, index));
50
- }) }), _jsx(Animated.View, { style: [
51
- styles.cursor,
52
- {
53
- opacity,
54
- top: tabHeight - 5,
55
- width: tabDimensions[activeTabIndex]?.width || 0,
56
- transform: [{ translateX: tabCursorPosition }],
57
- },
58
- ] })] }) }));
39
+ return (<View style={[styles.container, style]}>
40
+ <Animated.View style={[styles.contentContainer, contentContainerStyle]}>
41
+ <View style={styles.tabsContainer} onLayout={event => {
42
+ const { height } = event.nativeEvent.layout;
43
+ setTabHeight(height);
44
+ }}>
45
+ {dataArray.map((item, index) => {
46
+ return (<PlatformPressable key={index} style={styles.tab} onPress={() => {
47
+ onTabPress?.(item);
48
+ }}>
49
+ <View onLayout={event => {
50
+ const { width } = event.nativeEvent.layout;
51
+ setTabDimensions(dimensions => dimensions.add({ index, width }));
52
+ }}>
53
+ {renderItem({ item, index })}
54
+ </View>
55
+ </PlatformPressable>);
56
+ })}
57
+ </View>
58
+ <Animated.View style={[
59
+ styles.cursor,
60
+ {
61
+ opacity,
62
+ top: tabHeight - 5,
63
+ width: tabDimensions[activeTabIndex]?.width || 0,
64
+ transform: [{ translateX: tabCursorPosition }],
65
+ },
66
+ ]}/>
67
+ </Animated.View>
68
+ </View>);
59
69
  }
60
70
  // =================================
61
71
  // ====== Styles ===================
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.js","sourceRoot":"","sources":["../../../src/components/display/tabs.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAc,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAa,MAAM,cAAc,CAAA;AAC5E,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAgBtC,MAAM,mBAAmB,GAAG,CAAC,IAAS,EAAE,KAAc,EAAE,EAAE;IACxD,IAAI,OAAO,IAAI,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAA;IAEzC,OAAO,IAAI,CAAC,EAAE,IAAI,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAA;AACxD,CAAC,CAAA;AAED,MAAM,UAAU,IAAI,CAAQ,EAC1B,SAAS,GAAG,EAAE,EAAE,EAAE,EAAE,EAAW,EAC/B,qBAAqB,EACrB,IAAI,EACJ,YAAY,GAAG,mBAAmB,E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A;gCAClE,CAAC,YAEA,UAAU,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,GACvB,IAbF,KAAK,CAcQ,CACrB,CAAA;oBACH,CAAC,CAAC,GACG,EACP,KAAC,QAAQ,CAAC,IAAI,IACZ,KAAK,EAAE;wBACL,MAAM,CAAC,MAAM;wBACb;4BACE,OAAO;4BACP,GAAG,EAAE,SAAS,GAAG,CAAC;4BAClB,KAAK,EAAE,aAAa,CAAC,cAAc,CAAC,EAAE,KAAK,IAAI,CAAC;4BAChD,SAAS,EAAE,CAAC,EAAE,UAAU,EAAE,iBAAiB,EAAE,CAAC;yBAC/C;qBACF,GACD,IACY,GACX,CACR,CAAA;AACH,CAAC;AAED,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AAEpC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAA;IACxB,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE;YACT,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,QAAQ;SACzB;QACD,gBAAgB,EAAE,EAAE;QACpB,MAAM,EAAE;YACN,iBAAiB,EAAE,CAAC;YACpB,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,WAAW;YAC3C,MAAM,EAAE,CAAC;YACT,IAAI,EAAE,CAAC;YACP,QAAQ,EAAE,UAAU;YACpB,MAAM,EAAE,CAAC;SACV;QACD,GAAG,EAAE,EAAE;QACP,aAAa,EAAE;YACb,IAAI,EAAE,CAAC;YACP,aAAa,EAAE,KAAK;YACpB,GAAG,EAAE,CAAC;SACP;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport React, { useEffect, useRef, useState } from 'react'\nimport { Animated, Easing, StyleSheet, View, ViewStyle } from 'react-native'\nimport { useTheme } from '../../hooks'\n\n// =================================\n// ====== Component ================\n// =================================\n\ninterface TabsProps<ItemT> {\n data: ArrayLike<ItemT> | null | undefined\n activeTab?: ItemT\n keyExtractor?: (_item: ItemT, _index?: number) => string\n onTabPress?: (_item: ItemT) => void\n renderItem: (_: { item: ItemT; index: number }) => React.ReactNode\n style?: ViewStyle\n contentContainerStyle?: ViewStyle\n}\n\nconst defaultKeyExtractor = (item: any, index?: number) => {\n if (typeof item === 'string') return item\n\n return item.id || index?.toString() || item.toString()\n}\n\nexport function Tabs<ItemT>({\n activeTab = { id: '' } as ItemT,\n contentContainerStyle,\n data,\n keyExtractor = defaultKeyExtractor,\n onTabPress,\n renderItem,\n style,\n}: TabsProps<ItemT>) {\n const [tabDimSet, setTabDimensions] = useState<Set<{ index: number; width: number }>>(new Set())\n const tabDimensions = Array.from(tabDimSet)\n const [tabHeight, setTabHeight] = useState(0)\n const styles = useStyles()\n const opacity = useRef(new Animated.Value(0)).current\n const tabCursorPosition = useRef(new Animated.Value(0)).current\n const dataArray = Array.from(data || [])\n const activeTabIndex = dataArray.findIndex(\n (item, index) => keyExtractor(item, index) === keyExtractor(activeTab)\n )\n const gap = 8\n const tabCursorSpacing = tabDimensions\n .slice(0, activeTabIndex)\n .reduce((acc, { width }) => acc + width + gap, 0)\n\n Animated.timing(tabCursorPosition, {\n toValue: tabCursorSpacing,\n easing: Easing.inOut(Easing.ease),\n duration: 100,\n useNativeDriver: true,\n }).start()\n\n useEffect(() => {\n if (activeTabIndex === -1) return\n\n Animated.timing(opacity, {\n toValue: 1,\n easing: Easing.inOut(Easing.ease),\n duration: 500,\n useNativeDriver: true,\n }).start()\n }, [opacity, activeTabIndex])\n\n return (\n <View style={[styles.container, style]}>\n <Animated.View style={[styles.contentContainer, contentContainerStyle]}>\n <View\n style={styles.tabsContainer}\n onLayout={event => {\n const { height } = event.nativeEvent.layout\n setTabHeight(height)\n }}\n >\n {dataArray.map((item, index) => {\n return (\n <PlatformPressable\n key={index}\n style={styles.tab}\n onPress={() => {\n onTabPress?.(item)\n }}\n >\n <View\n onLayout={event => {\n const { width } = event.nativeEvent.layout\n setTabDimensions(dimensions => dimensions.add({ index, width }))\n }}\n >\n {renderItem({ item, index })}\n </View>\n </PlatformPressable>\n )\n })}\n </View>\n <Animated.View\n style={[\n styles.cursor,\n {\n opacity,\n top: tabHeight - 5,\n width: tabDimensions[activeTabIndex]?.width || 0,\n transform: [{ translateX: tabCursorPosition }],\n },\n ]}\n />\n </Animated.View>\n </View>\n )\n}\n\n// =================================\n// ====== Styles ===================\n// =================================\n\nconst useStyles = () => {\n const theme = useTheme()\n return StyleSheet.create({\n container: {\n flexDirection: 'row',\n justifyContent: 'center',\n },\n contentContainer: {},\n cursor: {\n borderBottomWidth: 3,\n borderBottomColor: theme.colors.interaction,\n height: 5,\n flex: 1,\n position: 'absolute',\n zIndex: 5,\n },\n tab: {},\n tabsContainer: {\n flex: 1,\n flexDirection: 'row',\n gap: 8,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"tabs.js","sourceRoot":"","sources":["../../../src/components/display/tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAa,MAAM,cAAc,CAAA;AAC5E,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAgBtC,MAAM,mBAAmB,GAAG,CAAC,IAAS,EAAE,KAAc,EAAE,EAAE;IACxD,IAAI,OAAO,IAAI,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAA;IAEzC,OAAO,IAAI,CAAC,EAAE,IAAI,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAA;AACxD,CAAC,CAAA;AAED,MAAM,UAAU,IAAI,CAAQ,EAC1B,SAAS,GAAG,EAAE,EAAE,EAAE,EAAE,EAAW,EAC/B,qBAAqB,EACrB,I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AAE;YACb,IAAI,EAAE,CAAC;YACP,aAAa,EAAE,KAAK;YACpB,GAAG,EAAE,CAAC;SACP;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport React, { useEffect, useRef, useState } from 'react'\nimport { Animated, Easing, StyleSheet, View, ViewStyle } from 'react-native'\nimport { useTheme } from '../../hooks'\n\n// =================================\n// ====== Component ================\n// =================================\n\ninterface TabsProps<ItemT> {\n data: ArrayLike<ItemT> | null | undefined\n activeTab?: ItemT\n keyExtractor?: (_item: ItemT, _index?: number) => string\n onTabPress?: (_item: ItemT) => void\n renderItem: (_: { item: ItemT; index: number }) => React.ReactNode\n style?: ViewStyle\n contentContainerStyle?: ViewStyle\n}\n\nconst defaultKeyExtractor = (item: any, index?: number) => {\n if (typeof item === 'string') return item\n\n return item.id || index?.toString() || item.toString()\n}\n\nexport function Tabs<ItemT>({\n activeTab = { id: '' } as ItemT,\n contentContainerStyle,\n data,\n keyExtractor = defaultKeyExtractor,\n onTabPress,\n renderItem,\n style,\n}: TabsProps<ItemT>) {\n const [tabDimSet, setTabDimensions] = useState<Set<{ index: number; width: number }>>(new Set())\n const tabDimensions = Array.from(tabDimSet)\n const [tabHeight, setTabHeight] = useState(0)\n const styles = useStyles()\n const opacity = useRef(new Animated.Value(0)).current\n const tabCursorPosition = useRef(new Animated.Value(0)).current\n const dataArray = Array.from(data || [])\n const activeTabIndex = dataArray.findIndex(\n (item, index) => keyExtractor(item, index) === keyExtractor(activeTab)\n )\n const gap = 8\n const tabCursorSpacing = tabDimensions\n .slice(0, activeTabIndex)\n .reduce((acc, { width }) => acc + width + gap, 0)\n\n Animated.timing(tabCursorPosition, {\n toValue: tabCursorSpacing,\n easing: Easing.inOut(Easing.ease),\n duration: 100,\n useNativeDriver: true,\n }).start()\n\n useEffect(() => {\n if (activeTabIndex === -1) return\n\n Animated.timing(opacity, {\n toValue: 1,\n easing: Easing.inOut(Easing.ease),\n duration: 500,\n useNativeDriver: true,\n }).start()\n }, [opacity, activeTabIndex])\n\n return (\n <View style={[styles.container, style]}>\n <Animated.View style={[styles.contentContainer, contentContainerStyle]}>\n <View\n style={styles.tabsContainer}\n onLayout={event => {\n const { height } = event.nativeEvent.layout\n setTabHeight(height)\n }}\n >\n {dataArray.map((item, index) => {\n return (\n <PlatformPressable\n key={index}\n style={styles.tab}\n onPress={() => {\n onTabPress?.(item)\n }}\n >\n <View\n onLayout={event => {\n const { width } = event.nativeEvent.layout\n setTabDimensions(dimensions => dimensions.add({ index, width }))\n }}\n >\n {renderItem({ item, index })}\n </View>\n </PlatformPressable>\n )\n })}\n </View>\n <Animated.View\n style={[\n styles.cursor,\n {\n opacity,\n top: tabHeight - 5,\n width: tabDimensions[activeTabIndex]?.width || 0,\n transform: [{ translateX: tabCursorPosition }],\n },\n ]}\n />\n </Animated.View>\n </View>\n )\n}\n\n// =================================\n// ====== Styles ===================\n// =================================\n\nconst useStyles = () => {\n const theme = useTheme()\n return StyleSheet.create({\n container: {\n flexDirection: 'row',\n justifyContent: 'center',\n },\n contentContainer: {},\n cursor: {\n borderBottomWidth: 3,\n borderBottomColor: theme.colors.interaction,\n height: 5,\n flex: 1,\n position: 'absolute',\n zIndex: 5,\n },\n tab: {},\n tabsContainer: {\n flex: 1,\n flexDirection: 'row',\n gap: 8,\n },\n })\n}\n"]}
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import type { TextStyle as ReactNativeTextStyle, TextProps as ReactNativeTextProps, StyleProp } from 'react-native';
2
3
  type BorderKeys = 'borderWidth' | 'borderBottomWidth' | 'borderLeftWidth' | 'borderRightWidth' | 'borderTopWidth' | 'borderColor' | 'borderBottomColor' | 'borderLeftColor' | 'borderRightColor' | 'borderTopColor' | 'borderStyle';
3
4
  export type TextStyle = Omit<ReactNativeTextStyle, BorderKeys> & {
@@ -20,6 +21,6 @@ export interface TextProps extends Omit<ReactNativeTextProps, 'style'> {
20
21
  */
21
22
  style?: StyleProp<TextStyle>;
22
23
  }
23
- export declare function Text({ style, variant, children, ...props }: TextProps): import("react/jsx-runtime").JSX.Element;
24
+ export declare function Text({ style, variant, children, ...props }: TextProps): React.JSX.Element;
24
25
  export {};
25
26
  //# sourceMappingURL=text.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../src/components/display/text.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,SAAS,IAAI,oBAAoB,EACjC,SAAS,IAAI,oBAAoB,EACjC,SAAS,EACV,MAAM,cAAc,CAAA;AAWrB,KAAK,UAAU,GACX,aAAa,GACb,mBAAmB,GACnB,iBAAiB,GACjB,kBAAkB,GAClB,gBAAgB,GAChB,aAAa,GACb,mBAAmB,GACnB,iBAAiB,GACjB,kBAAkB,GAClB,gBAAgB,GAChB,aAAa,CAAA;AAEjB,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,oBAAoB,EAAE,UAAU,CAAC,GAAG;KAC9D,CAAC,IAAI,UAAU,CAAC,CAAC,EAAE,KAAK;CAC1B,CAAA;AAED,QAAA,MAAM,QAAQ;;;;;CAKJ,CAAA;AAEV,KAAK,YAAY,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,OAAO,QAAQ,CAAC,CAAA;AAO5D,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC;IACpE;;OAEG;IACH,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAC7B;AAED,wBAAgB,IAAI,CAAC,EAAE,KAAK,EAAE,OAAiB,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,2CAc/E"}
1
+ {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../src/components/display/text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EACV,SAAS,IAAI,oBAAoB,EACjC,SAAS,IAAI,oBAAoB,EACjC,SAAS,EACV,MAAM,cAAc,CAAA;AAWrB,KAAK,UAAU,GACX,aAAa,GACb,mBAAmB,GACnB,iBAAiB,GACjB,kBAAkB,GAClB,gBAAgB,GAChB,aAAa,GACb,mBAAmB,GACnB,iBAAiB,GACjB,kBAAkB,GAClB,gBAAgB,GAChB,aAAa,CAAA;AAEjB,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,oBAAoB,EAAE,UAAU,CAAC,GAAG;KAC9D,CAAC,IAAI,UAAU,CAAC,CAAC,EAAE,KAAK;CAC1B,CAAA;AAED,QAAA,MAAM,QAAQ;;;;;CAKJ,CAAA;AAEV,KAAK,YAAY,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,OAAO,QAAQ,CAAC,CAAA;AAO5D,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC;IACpE;;OAEG;IACH,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAC7B;AAED,wBAAgB,IAAI,CAAC,EAAE,KAAK,EAAE,OAAiB,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,qBAc/E"}
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import React from 'react';
2
2
  import { StyleSheet, Text as ReactNativeText, Platform } from 'react-native';
3
3
  import { useTheme } from '../../hooks';
4
4
  import { tokens } from '../../vendor/tapestry/tokens';
@@ -16,7 +16,9 @@ export function Text({ style, variant = 'plain', children, ...props }) {
16
16
  [VARIANTS.tertiary]: styles.tertiary,
17
17
  [VARIANTS.footnote]: styles.footnote,
18
18
  };
19
- return (_jsx(ReactNativeText, { style: [styles.base, variantStyleMap[variant], style], ...props, children: children }));
19
+ return (<ReactNativeText style={[styles.base, variantStyleMap[variant], style]} {...props}>
20
+ {children}
21
+ </ReactNativeText>);
20
22
  }
21
23
  // =================================
22
24
  // ====== Styles ===================
@@ -1 +1 @@
1
- {"version":3,"file":"text.js","sourceRoot":"","sources":["../../../src/components/display/text.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,IAAI,IAAI,eAAe,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAM5E,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AA0BrD,MAAM,QAAQ,GAAG;IACf,KAAK,EAAE,OAAO;IACd,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;CACZ,CAAA;AAoBV,MAAM,UAAU,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAa;IAC9E,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,eAAe,GAAkB;QACrC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,KAAK;QAC9B,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC,SAAS;QACtC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ;QACpC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ;KACrC,CAAA;IAED,OAAO,CACL,KAAC,eAAe,IAAC,KAAK,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,KAAM,KAAK,YAC9E,QAAQ,GACO,CACnB,CAAA;AACH,CAAC;AAED,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AAEpC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAC7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,IAAI,EAAE;YACJ,GAAG,QAAQ,CAAC,MAAM,CAAC;gBACjB,OAAO,EAAE;oBACP,UAAU,EAAE,QAAQ,EAAE,wQAAwQ;iBAC/R;gBACD,OAAO,EAAE,IAAI,EAAE,2KAA2K;aAC3L,CAAC;SACH;QACD,KAAK,EAAE;YACL,KAAK,EAAE,MAAM,CAAC,uBAAuB;YACrC,QAAQ,EAAE,MAAM,CAAC,UAAU;SAC5B;QACD,iEAAiE;QACjE,4DAA4D;QAC5D,gGAAgG;QAChG,SAAS,EAAE;YACT,KAAK,EAAE,MAAM,CAAC,uBAAuB;YACrC,QAAQ,EAAE,MAAM,CAAC,UAAU;SAC5B;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,MAAM,CAAC,yBAAyB;YACvC,QAAQ,EAAE,MAAM,CAAC,UAAU;SAC5B;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,MAAM,CAAC,yBAAyB;YACvC,QAAQ,EAAE,MAAM,CAAC,UAAU;SAC5B;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { StyleSheet, Text as ReactNativeText, Platform } from 'react-native'\nimport type {\n TextStyle as ReactNativeTextStyle,\n TextProps as ReactNativeTextProps,\n StyleProp,\n} from 'react-native'\nimport { useTheme } from '../../hooks'\nimport { tokens } from '../../vendor/tapestry/tokens'\n\n// =================================\n// ====== Constants ================\n// =================================\n\n// TextStyle extends ViewStyle, which includes border properties.\n// CCA has issues with borders on Text on iOS. (https://github.com/planningcenter/chat-mobile/pull/177)\n// Our pattern is to apply boarders to a parent View instead.\ntype BorderKeys =\n | 'borderWidth'\n | 'borderBottomWidth'\n | 'borderLeftWidth'\n | 'borderRightWidth'\n | 'borderTopWidth'\n | 'borderColor'\n | 'borderBottomColor'\n | 'borderLeftColor'\n | 'borderRightColor'\n | 'borderTopColor'\n | 'borderStyle'\n\nexport type TextStyle = Omit<ReactNativeTextStyle, BorderKeys> & {\n [K in BorderKeys]?: never\n}\n\nconst VARIANTS = {\n plain: 'plain',\n secondary: 'secondary',\n tertiary: 'tertiary',\n footnote: 'footnote',\n} as const\n\ntype VariantUnion = (typeof VARIANTS)[keyof typeof VARIANTS]\ntype VariantStyles = Record<VariantUnion, TextStyle>\n\n// =================================\n// ====== Component ================\n// =================================\n\nexport interface TextProps extends Omit<ReactNativeTextProps, 'style'> {\n /**\n * Changes the styles and size of the text.\n */\n variant?: VariantUnion\n /**\n * Text styles (border and background properties are not allowed)\n */\n style?: StyleProp<TextStyle>\n}\n\nexport function Text({ style, variant = 'plain', children, ...props }: TextProps) {\n const styles = useStyles()\n const variantStyleMap: VariantStyles = {\n [VARIANTS.plain]: styles.plain,\n [VARIANTS.secondary]: styles.secondary,\n [VARIANTS.tertiary]: styles.tertiary,\n [VARIANTS.footnote]: styles.footnote,\n }\n\n return (\n <ReactNativeText style={[styles.base, variantStyleMap[variant], style]} {...props}>\n {children}\n </ReactNativeText>\n )\n}\n\n// =================================\n// ====== Styles ===================\n// =================================\n\nconst useStyles = () => {\n const { colors } = useTheme()\n return StyleSheet.create({\n base: {\n ...Platform.select({\n android: {\n fontFamily: 'normal', // This forces the text to be normal weight when the \"Bold font\" accessibility setting is enabled. While this is not ideal, it fixes a bug where the text without a hard coded fontWeight gets cut off on Android. https://github.com/facebook/react-native/issues/15114\n },\n default: null, // iOS needs to specify its own font family otherwise the italic style won't work. (Used in message_markdown.tsx) It's \"Bold font\" accessibility setting works as expected.\n }),\n },\n plain: {\n color: colors.textColorDefaultPrimary,\n fontSize: tokens.fontSizeMd,\n },\n // This is a dupe of the plain variant to support the legacy API.\n // Once we move to the new Doxy font scale we can remove it.\n // See: https://www.figma.com/design/ZR0ZP6FdbOBOK3fUSpRr0Q/CC-Redux-2025?node-id=156-1069&m=dev\n secondary: {\n color: colors.textColorDefaultPrimary,\n fontSize: tokens.fontSizeMd,\n },\n tertiary: {\n color: colors.textColorDefaultSecondary,\n fontSize: tokens.fontSizeSm,\n },\n footnote: {\n color: colors.textColorDefaultSecondary,\n fontSize: tokens.fontSizeXs,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"text.js","sourceRoot":"","sources":["../../../src/components/display/text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,IAAI,IAAI,eAAe,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAM5E,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AA0BrD,MAAM,QAAQ,GAAG;IACf,KAAK,EAAE,OAAO;IACd,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;CACZ,CAAA;AAoBV,MAAM,UAAU,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAa;IAC9E,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,eAAe,GAAkB;QACrC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,KAAK;QAC9B,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC,SAAS;QACtC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ;QACpC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ;KACrC,CAAA;IAED,OAAO,CACL,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAChF;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,eAAe,CAAC,CACnB,CAAA;AACH,CAAC;AAED,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AAEpC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAC7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,IAAI,EAAE;YACJ,GAAG,QAAQ,CAAC,MAAM,CAAC;gBACjB,OAAO,EAAE;oBACP,UAAU,EAAE,QAAQ,EAAE,wQAAwQ;iBAC/R;gBACD,OAAO,EAAE,IAAI,EAAE,2KAA2K;aAC3L,CAAC;SACH;QACD,KAAK,EAAE;YACL,KAAK,EAAE,MAAM,CAAC,uBAAuB;YACrC,QAAQ,EAAE,MAAM,CAAC,UAAU;SAC5B;QACD,iEAAiE;QACjE,4DAA4D;QAC5D,gGAAgG;QAChG,SAAS,EAAE;YACT,KAAK,EAAE,MAAM,CAAC,uBAAuB;YACrC,QAAQ,EAAE,MAAM,CAAC,UAAU;SAC5B;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,MAAM,CAAC,yBAAyB;YACvC,QAAQ,EAAE,MAAM,CAAC,UAAU;SAC5B;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,MAAM,CAAC,yBAAyB;YACvC,QAAQ,EAAE,MAAM,CAAC,UAAU;SAC5B;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { StyleSheet, Text as ReactNativeText, Platform } from 'react-native'\nimport type {\n TextStyle as ReactNativeTextStyle,\n TextProps as ReactNativeTextProps,\n StyleProp,\n} from 'react-native'\nimport { useTheme } from '../../hooks'\nimport { tokens } from '../../vendor/tapestry/tokens'\n\n// =================================\n// ====== Constants ================\n// =================================\n\n// TextStyle extends ViewStyle, which includes border properties.\n// CCA has issues with borders on Text on iOS. (https://github.com/planningcenter/chat-mobile/pull/177)\n// Our pattern is to apply boarders to a parent View instead.\ntype BorderKeys =\n | 'borderWidth'\n | 'borderBottomWidth'\n | 'borderLeftWidth'\n | 'borderRightWidth'\n | 'borderTopWidth'\n | 'borderColor'\n | 'borderBottomColor'\n | 'borderLeftColor'\n | 'borderRightColor'\n | 'borderTopColor'\n | 'borderStyle'\n\nexport type TextStyle = Omit<ReactNativeTextStyle, BorderKeys> & {\n [K in BorderKeys]?: never\n}\n\nconst VARIANTS = {\n plain: 'plain',\n secondary: 'secondary',\n tertiary: 'tertiary',\n footnote: 'footnote',\n} as const\n\ntype VariantUnion = (typeof VARIANTS)[keyof typeof VARIANTS]\ntype VariantStyles = Record<VariantUnion, TextStyle>\n\n// =================================\n// ====== Component ================\n// =================================\n\nexport interface TextProps extends Omit<ReactNativeTextProps, 'style'> {\n /**\n * Changes the styles and size of the text.\n */\n variant?: VariantUnion\n /**\n * Text styles (border and background properties are not allowed)\n */\n style?: StyleProp<TextStyle>\n}\n\nexport function Text({ style, variant = 'plain', children, ...props }: TextProps) {\n const styles = useStyles()\n const variantStyleMap: VariantStyles = {\n [VARIANTS.plain]: styles.plain,\n [VARIANTS.secondary]: styles.secondary,\n [VARIANTS.tertiary]: styles.tertiary,\n [VARIANTS.footnote]: styles.footnote,\n }\n\n return (\n <ReactNativeText style={[styles.base, variantStyleMap[variant], style]} {...props}>\n {children}\n </ReactNativeText>\n )\n}\n\n// =================================\n// ====== Styles ===================\n// =================================\n\nconst useStyles = () => {\n const { colors } = useTheme()\n return StyleSheet.create({\n base: {\n ...Platform.select({\n android: {\n fontFamily: 'normal', // This forces the text to be normal weight when the \"Bold font\" accessibility setting is enabled. While this is not ideal, it fixes a bug where the text without a hard coded fontWeight gets cut off on Android. https://github.com/facebook/react-native/issues/15114\n },\n default: null, // iOS needs to specify its own font family otherwise the italic style won't work. (Used in message_markdown.tsx) It's \"Bold font\" accessibility setting works as expected.\n }),\n },\n plain: {\n color: colors.textColorDefaultPrimary,\n fontSize: tokens.fontSizeMd,\n },\n // This is a dupe of the plain variant to support the legacy API.\n // Once we move to the new Doxy font scale we can remove it.\n // See: https://www.figma.com/design/ZR0ZP6FdbOBOK3fUSpRr0Q/CC-Redux-2025?node-id=156-1069&m=dev\n secondary: {\n color: colors.textColorDefaultPrimary,\n fontSize: tokens.fontSizeMd,\n },\n tertiary: {\n color: colors.textColorDefaultSecondary,\n fontSize: tokens.fontSizeSm,\n },\n footnote: {\n color: colors.textColorDefaultSecondary,\n fontSize: tokens.fontSizeXs,\n },\n })\n}\n"]}
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import type { PressableProps } from 'react-native';
2
3
  import type { TextProps } from './text';
3
4
  import type { ButtonAppearanceUnion } from './utils/button_colors';
@@ -35,5 +36,5 @@ export interface TextButtonProps extends PressableProps {
35
36
  */
36
37
  textStyle?: TextProps['style'];
37
38
  }
38
- export declare function TextButton({ adjustsFontSizeToFit, allowFontScaling, appearance, disabled, children, maxFontSizeMultiplier, minimumFontScale, variant, style, textStyle, ...props }: TextButtonProps): import("react/jsx-runtime").JSX.Element;
39
+ export declare function TextButton({ adjustsFontSizeToFit, allowFontScaling, appearance, disabled, children, maxFontSizeMultiplier, minimumFontScale, variant, style, textStyle, ...props }: TextButtonProps): React.JSX.Element;
39
40
  //# sourceMappingURL=text_button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"text_button.d.ts","sourceRoot":"","sources":["../../../src/components/display/text_button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAIlD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAEvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAMlE,MAAM,WAAW,eAAgB,SAAQ,cAAc;IACrD;;OAEG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B;;OAEG;IACH,UAAU,CAAC,EAAE,qBAAqB,CAAA;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,CAAA;IAChC;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IAC9B;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAA;CAC/B;AAED,wBAAgB,UAAU,CAAC,EACzB,oBAA4B,EAC5B,gBAAuB,EACvB,UAA0B,EAC1B,QAAgB,EAChB,QAAQ,EACR,qBAAqB,EACrB,gBAAgB,EAChB,OAAiB,EACjB,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,eAAe,2CA4BjB"}
1
+ {"version":3,"file":"text_button.d.ts","sourceRoot":"","sources":["../../../src/components/display/text_button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAIlD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAEvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAMlE,MAAM,WAAW,eAAgB,SAAQ,cAAc;IACrD;;OAEG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B;;OAEG;IACH,UAAU,CAAC,EAAE,qBAAqB,CAAA;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,CAAA;IAChC;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IAC9B;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAA;CAC/B;AAED,wBAAgB,UAAU,CAAC,EACzB,oBAA4B,EAC5B,gBAAuB,EACvB,UAA0B,EAC1B,QAAgB,EAChB,QAAQ,EACR,qBAAqB,EACrB,gBAAgB,EAChB,OAAiB,EACjB,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,eAAe,qBA4BjB"}
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import React from 'react';
2
2
  import { Pressable, StyleSheet } from 'react-native';
3
3
  import { useTheme } from '../../hooks';
4
4
  import { platformFontWeightMedium } from '../../utils';
@@ -7,10 +7,15 @@ import { getColorKey, useButtonColorOptionMap } from './utils/button_colors';
7
7
  export function TextButton({ adjustsFontSizeToFit = false, allowFontScaling = true, appearance = 'interaction', disabled = false, children, maxFontSizeMultiplier, minimumFontScale, variant = 'plain', style, textStyle, ...props }) {
8
8
  const styles = useStyles({ appearance, disabled });
9
9
  const overrideStyles = StyleSheet.flatten(style); // Ensures the pressed styles still get applied
10
- return (_jsx(Pressable, { accessibilityRole: "button", disabled: disabled, style: ({ pressed }) => ({
10
+ return (<Pressable accessibilityRole="button" disabled={disabled} style={({ pressed }) => ({
11
11
  ...(pressed ? styles.pressed : null),
12
12
  ...overrideStyles,
13
- }), hitSlop: 10, ...props, children: _jsx(Text, { adjustsFontSizeToFit: adjustsFontSizeToFit, allowFontScaling: allowFontScaling, maxFontSizeMultiplier: maxFontSizeMultiplier, minimumFontScale: minimumFontScale, numberOfLines: 1, style: [styles.text, disabled && styles.disabled, textStyle], variant: variant, children: children }) }));
13
+ })} // Android & iOS intentionally get the same pressed style
14
+ hitSlop={10} {...props}>
15
+ <Text adjustsFontSizeToFit={adjustsFontSizeToFit} allowFontScaling={allowFontScaling} maxFontSizeMultiplier={maxFontSizeMultiplier} minimumFontScale={minimumFontScale} numberOfLines={1} style={[styles.text, disabled && styles.disabled, textStyle]} variant={variant}>
16
+ {children}
17
+ </Text>
18
+ </Pressable>);
14
19
  }
15
20
  // =================================
16
21
  // ====== Styles ===================
@@ -1 +1 @@
1
- {"version":3,"file":"text_button.js","sour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AI,EAAE,QAAQ,IAAI,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,EAC5D,OAAO,EAAE,OAAO,YAEf,QAAQ,GACJ,GACG,CACb,CAAA;AACH,CAAC;AAED,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AAEpC,MAAM,SAAS,GAAG,CAAC,EAAE,UAAU,GAAG,aAAa,EAAE,QAAQ,GAAG,KAAK,EAA4B,EAAE,EAAE;IAC/F,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAC7B,MAAM,QAAQ,GAAG,WAAW,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,CAAA;IACtD,MAAM,cAAc,GAAG,uBAAuB,EAAE,CAAA;IAEhD,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,IAAI,EAAE;YACJ,UAAU,EAAE,wBAAwB;YACpC,KAAK,EAAE,cAAc,CAAC,QAAQ,CAAC;SAChC;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,MAAM,CAAC,wBAAwB;SACvC;QACD,OAAO,EAAE;YACP,OAAO,EAAE,GAAG;SACb;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { Pressable, StyleSheet } from 'react-native'\nimport type { PressableProps } from 'react-native'\nimport { useTheme } from '../../hooks'\nimport { platformFontWeightMedium } from '../../utils'\nimport { Text } from './text'\nimport type { TextProps } from './text'\nimport { getColorKey, useButtonColorOptionMap } from './utils/button_colors'\nimport type { ButtonAppearanceUnion } from './utils/button_colors'\n\n// =================================\n// ====== Component ================\n// =================================\n\nexport interface TextButtonProps extends PressableProps {\n /**\n * Specifies whether fonts should be scaled down automatically to fit given style constraints.\n */\n adjustsFontSizeToFit?: boolean\n /**\n * Specifies whether fonts should scale to respect the device's text size accessibility settings. The default is true.\n */\n allowFontScaling?: boolean\n /**\n * Updates the button's colors\n */\n appearance?: ButtonAppearanceUnion\n /**\n * Renders text within a `Text`\n */\n children?: TextProps['children']\n /**\n * Specifies the maximum size a font can reach when allowFontScaling is enabled.\n */\n maxFontSizeMultiplier?: number\n /**\n * Specifies smallest possible scale a font can reach when adjustsFontSizeToFit is enabled. (values 0.01-1.0).\n */\n minimumFontScale?: number\n /**\n * Changes the styles and size of the text.\n */\n variant?: TextProps['variant']\n /**\n * Changes the styles and size of the text.\n */\n textStyle?: TextProps['style']\n}\n\nexport function TextButton({\n adjustsFontSizeToFit = false,\n allowFontScaling = true,\n appearance = 'interaction',\n disabled = false,\n children,\n maxFontSizeMultiplier,\n minimumFontScale,\n variant = 'plain',\n style,\n textStyle,\n ...props\n}: TextButtonProps) {\n const styles = useStyles({ appearance, disabled })\n const overrideStyles = StyleSheet.flatten(style) // Ensures the pressed styles still get applied\n\n return (\n <Pressable\n accessibilityRole=\"button\"\n disabled={disabled}\n style={({ pressed }) => ({\n ...(pressed ? styles.pressed : null),\n ...overrideStyles,\n })} // Android & iOS intentionally get the same pressed style\n hitSlop={10}\n {...props}\n >\n <Text\n adjustsFontSizeToFit={adjustsFontSizeToFit}\n allowFontScaling={allowFontScaling}\n maxFontSizeMultiplier={maxFontSizeMultiplier}\n minimumFontScale={minimumFontScale}\n numberOfLines={1}\n style={[styles.text, disabled && styles.disabled, textStyle]}\n variant={variant}\n >\n {children}\n </Text>\n </Pressable>\n )\n}\n\n// =================================\n// ====== Styles ===================\n// =================================\n\nconst useStyles = ({ appearance = 'interaction', disabled = false }: Partial<TextButtonProps>) => {\n const { colors } = useTheme()\n const colorKey = getColorKey({ disabled, appearance })\n const colorOptionMap = useButtonColorOptionMap()\n\n return StyleSheet.create({\n text: {\n fontWeight: platformFontWeightMedium,\n color: colorOptionMap[colorKey],\n },\n disabled: {\n color: colors.textColorDefaultDisabled,\n },\n pressed: {\n opacity: 0.5,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"text_button.js","sourceRoot":"","sources":["../../../src/components/display/text_button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,O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AAC,CACnC,aAAa,CAAC,CAAC,CAAC,CAAC,CACjB,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,IAAI,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAC7D,OAAO,CAAC,CAAC,OAAO,CAAC,CAEjB;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,SAAS,CAAC,CACb,CAAA;AACH,CAAC;AAED,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AAEpC,MAAM,SAAS,GAAG,CAAC,EAAE,UAAU,GAAG,aAAa,EAAE,QAAQ,GAAG,KAAK,EAA4B,EAAE,EAAE;IAC/F,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAC7B,MAAM,QAAQ,GAAG,WAAW,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,CAAA;IACtD,MAAM,cAAc,GAAG,uBAAuB,EAAE,CAAA;IAEhD,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,IAAI,EAAE;YACJ,UAAU,EAAE,wBAAwB;YACpC,KAAK,EAAE,cAAc,CAAC,QAAQ,CAAC;SAChC;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,MAAM,CAAC,wBAAwB;SACvC;QACD,OAAO,EAAE;YACP,OAAO,EAAE,GAAG;SACb;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { Pressable, StyleSheet } from 'react-native'\nimport type { PressableProps } from 'react-native'\nimport { useTheme } from '../../hooks'\nimport { platformFontWeightMedium } from '../../utils'\nimport { Text } from './text'\nimport type { TextProps } from './text'\nimport { getColorKey, useButtonColorOptionMap } from './utils/button_colors'\nimport type { ButtonAppearanceUnion } from './utils/button_colors'\n\n// =================================\n// ====== Component ================\n// =================================\n\nexport interface TextButtonProps extends PressableProps {\n /**\n * Specifies whether fonts should be scaled down automatically to fit given style constraints.\n */\n adjustsFontSizeToFit?: boolean\n /**\n * Specifies whether fonts should scale to respect the device's text size accessibility settings. The default is true.\n */\n allowFontScaling?: boolean\n /**\n * Updates the button's colors\n */\n appearance?: ButtonAppearanceUnion\n /**\n * Renders text within a `Text`\n */\n children?: TextProps['children']\n /**\n * Specifies the maximum size a font can reach when allowFontScaling is enabled.\n */\n maxFontSizeMultiplier?: number\n /**\n * Specifies smallest possible scale a font can reach when adjustsFontSizeToFit is enabled. (values 0.01-1.0).\n */\n minimumFontScale?: number\n /**\n * Changes the styles and size of the text.\n */\n variant?: TextProps['variant']\n /**\n * Changes the styles and size of the text.\n */\n textStyle?: TextProps['style']\n}\n\nexport function TextButton({\n adjustsFontSizeToFit = false,\n allowFontScaling = true,\n appearance = 'interaction',\n disabled = false,\n children,\n maxFontSizeMultiplier,\n minimumFontScale,\n variant = 'plain',\n style,\n textStyle,\n ...props\n}: TextButtonProps) {\n const styles = useStyles({ appearance, disabled })\n const overrideStyles = StyleSheet.flatten(style) // Ensures the pressed styles still get applied\n\n return (\n <Pressable\n accessibilityRole=\"button\"\n disabled={disabled}\n style={({ pressed }) => ({\n ...(pressed ? styles.pressed : null),\n ...overrideStyles,\n })} // Android & iOS intentionally get the same pressed style\n hitSlop={10}\n {...props}\n >\n <Text\n adjustsFontSizeToFit={adjustsFontSizeToFit}\n allowFontScaling={allowFontScaling}\n maxFontSizeMultiplier={maxFontSizeMultiplier}\n minimumFontScale={minimumFontScale}\n numberOfLines={1}\n style={[styles.text, disabled && styles.disabled, textStyle]}\n variant={variant}\n >\n {children}\n </Text>\n </Pressable>\n )\n}\n\n// =================================\n// ====== Styles ===================\n// =================================\n\nconst useStyles = ({ appearance = 'interaction', disabled = false }: Partial<TextButtonProps>) => {\n const { colors } = useTheme()\n const colorKey = getColorKey({ disabled, appearance })\n const colorOptionMap = useButtonColorOptionMap()\n\n return StyleSheet.create({\n text: {\n fontWeight: platformFontWeightMedium,\n color: colorOptionMap[colorKey],\n },\n disabled: {\n color: colors.textColorDefaultDisabled,\n },\n pressed: {\n opacity: 0.5,\n },\n })\n}\n"]}
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import type { TextProps } from './text';
2
3
  import type { ButtonAppearanceUnion } from './utils/button_colors';
3
4
  interface TextInlineButtonProps extends TextProps {
@@ -6,6 +7,6 @@ interface TextInlineButtonProps extends TextProps {
6
7
  */
7
8
  appearance?: ButtonAppearanceUnion;
8
9
  }
9
- export declare function TextInlineButton({ appearance, children, disabled, onPress, style, ...props }: TextInlineButtonProps): import("react/jsx-runtime").JSX.Element;
10
+ export declare function TextInlineButton({ appearance, children, disabled, onPress, style, ...props }: TextInlineButtonProps): React.JSX.Element;
10
11
  export {};
11
12
  //# sourceMappingURL=text_inline_button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"text_inline_button.d.ts","sourceRoot":"","sources":["../../../src/components/display/text_inline_button.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAEvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAMlE,UAAU,qBAAsB,SAAQ,SAAS;IAC/C;;OAEG;IACH,UAAU,CAAC,EAAE,qBAAqB,CAAA;CACnC;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,UAA0B,EAC1B,QAAQ,EACR,QAAgB,EAChB,OAAO,EACP,KAAK,EACL,GAAG,KAAK,EACT,EAAE,qBAAqB,2CA4BvB"}
1
+ {"version":3,"file":"text_inline_button.d.ts","sourceRoot":"","sources":["../../../src/components/display/text_inline_button.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAKvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAEvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAMlE,UAAU,qBAAsB,SAAQ,SAAS;IAC/C;;OAEG;IACH,UAAU,CAAC,EAAE,qBAAqB,CAAA;CACnC;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,UAA0B,EAC1B,QAAQ,EACR,QAAgB,EAChB,OAAO,EACP,KAAK,EACL,GAAG,KAAK,EACT,EAAE,qBAAqB,qBA4BvB"}
@@ -1,6 +1,5 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  import colorFunction from 'color';
3
- import { useState } from 'react';
2
+ import React, { useState } from 'react';
4
3
  import { Platform, StyleSheet } from 'react-native';
5
4
  import { useTheme } from '../../hooks';
6
5
  import { platformFontWeightMedium } from '../../utils';
@@ -13,13 +12,15 @@ export function TextInlineButton({ appearance = 'interaction', children, disable
13
12
  ios: null,
14
13
  android: styles.pressedAndroid,
15
14
  });
16
- return (_jsx(Text, { accessibilityRole: "button", numberOfLines: 1, style: [
15
+ return (<Text accessibilityRole="button" numberOfLines={1} style={[
17
16
  styles.text,
18
17
  styles.underline,
19
18
  disabled && styles.disabled,
20
19
  isPressed && platformPressedStyle,
21
20
  style,
22
- ], onPress: !disabled ? onPress : undefined, onPressIn: () => setIsPressed(true), onPressOut: () => setIsPressed(false), ...props, children: children }));
21
+ ]} onPress={!disabled ? onPress : undefined} onPressIn={() => setIsPressed(true)} onPressOut={() => setIsPressed(false)} {...props}>
22
+ {children}
23
+ </Text>);
23
24
  }
24
25
  // =================================
25
26
  // ====== Styles ===================
@@ -1 +1 @@
1
- {"version":3,"file":"text_inline_button.js","sourceRoot":"","sources":["../../../src/components/display/text_inline_button.tsx"],"names":[],"mappings":";AAAA,OAAO,aAAa,MAAM,OAAO,CAAA;AACjC,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,OAAO,EAAE,WA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;IACtD,MAAM,cAAc,GAAG,uBAAuB,EAAE,CAAA;IAEhD,wEAAwE;IACxE,wFAAwF;IACxF,sEAAsE;IACtE,MAAM,YAAY,GAAG,aAAa,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAA;IAEhF,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,IAAI,EAAE;YACJ,UAAU,EAAE,wBAAwB;YACpC,KAAK,EAAE,cAAc,CAAC,QAAQ,CAAC;SAChC;QACD,SAAS,EAAE;YACT,kBAAkB,EAAE,WAAW;YAC/B,mBAAmB,EAAE,cAAc,CAAC,QAAQ,CAAC;YAC7C,mBAAmB,EAAE,OAAO;SAC7B;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,MAAM,CAAC,wBAAwB;SACvC;QACD,cAAc,EAAE;YACd,KAAK,EAAE,YAAY;SACpB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import colorFunction from 'color'\nimport React, { useState } from 'react'\nimport { Platform, StyleSheet } from 'react-native'\nimport { useTheme } from '../../hooks'\nimport { platformFontWeightMedium } from '../../utils'\nimport { Text } from './text'\nimport type { TextProps } from './text'\nimport { getColorKey, useButtonColorOptionMap } from './utils/button_colors'\nimport type { ButtonAppearanceUnion } from './utils/button_colors'\n\n// =================================\n// ====== Component ================\n// =================================\n\ninterface TextInlineButtonProps extends TextProps {\n /**\n * Updates the button's colors\n */\n appearance?: ButtonAppearanceUnion\n}\n\nexport function TextInlineButton({\n appearance = 'interaction',\n children,\n disabled = false,\n onPress,\n style,\n ...props\n}: TextInlineButtonProps) {\n const styles = useStyles({ appearance, disabled })\n const [isPressed, setIsPressed] = useState(false)\n\n const platformPressedStyle = Platform.select({\n ios: null,\n android: styles.pressedAndroid,\n })\n\n return (\n <Text\n accessibilityRole=\"button\"\n numberOfLines={1}\n style={[\n styles.text,\n styles.underline,\n disabled && styles.disabled,\n isPressed && platformPressedStyle,\n style,\n ]}\n onPress={!disabled ? onPress : undefined}\n onPressIn={() => setIsPressed(true)}\n onPressOut={() => setIsPressed(false)}\n {...props}\n >\n {children}\n </Text>\n )\n}\n\n// =================================\n// ====== Styles ===================\n// =================================\n\nconst useStyles = ({\n appearance = 'interaction',\n disabled = false,\n}: Partial<TextInlineButtonProps>) => {\n const { colors } = useTheme()\n const colorKey = getColorKey({ disabled, appearance })\n const colorOptionMap = useButtonColorOptionMap()\n\n // Android doesn't show a \"pressed\" state and so we need to simulate it.\n // Lowering the Text's opacity doesn't work as it inherits it's parent's Text's opacity.\n // We can simulate the effect by changing the color's opacity instead.\n const pressedColor = colorFunction(colorOptionMap[colorKey]).alpha(0.5).string()\n\n return StyleSheet.create({\n text: {\n fontWeight: platformFontWeightMedium,\n color: colorOptionMap[colorKey],\n },\n underline: {\n textDecorationLine: 'underline',\n textDecorationColor: colorOptionMap[colorKey],\n textDecorationStyle: 'solid',\n },\n disabled: {\n color: colors.textColorDefaultDisabled,\n },\n pressedAndroid: {\n color: pressedColor,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"text_inline_button.js","sourceRoot":"","sources":["../../../src/components/display/text_inline_button.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,OAAO,CAAA;AACjC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,OAAO,EAAE,WAAW,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAc5E,MAAM,UAAU,gBAAgB,CAAC,EAC/B,UAAU,GAAG,aAAa,EAC1B,QAAQ,EACR,QAAQ,GAAG,KAAK,EAChB,OAAO,EACP,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D,wEAAwE;IACxE,wFAAwF;IACxF,sEAAsE;IACtE,MAAM,YAAY,GAAG,aAAa,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAA;IAEhF,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,IAAI,EAAE;YACJ,UAAU,EAAE,wBAAwB;YACpC,KAAK,EAAE,cAAc,CAAC,QAAQ,CAAC;SAChC;QACD,SAAS,EAAE;YACT,kBAAkB,EAAE,WAAW;YAC/B,mBAAmB,EAAE,cAAc,CAAC,QAAQ,CAAC;YAC7C,mBAAmB,EAAE,OAAO;SAC7B;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,MAAM,CAAC,wBAAwB;SACvC;QACD,cAAc,EAAE;YACd,KAAK,EAAE,YAAY;SACpB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import colorFunction from 'color'\nimport React, { useState } from 'react'\nimport { Platform, StyleSheet } from 'react-native'\nimport { useTheme } from '../../hooks'\nimport { platformFontWeightMedium } from '../../utils'\nimport { Text } from './text'\nimport type { TextProps } from './text'\nimport { getColorKey, useButtonColorOptionMap } from './utils/button_colors'\nimport type { ButtonAppearanceUnion } from './utils/button_colors'\n\n// =================================\n// ====== Component ================\n// =================================\n\ninterface TextInlineButtonProps extends TextProps {\n /**\n * Updates the button's colors\n */\n appearance?: ButtonAppearanceUnion\n}\n\nexport function TextInlineButton({\n appearance = 'interaction',\n children,\n disabled = false,\n onPress,\n style,\n ...props\n}: TextInlineButtonProps) {\n const styles = useStyles({ appearance, disabled })\n const [isPressed, setIsPressed] = useState(false)\n\n const platformPressedStyle = Platform.select({\n ios: null,\n android: styles.pressedAndroid,\n })\n\n return (\n <Text\n accessibilityRole=\"button\"\n numberOfLines={1}\n style={[\n styles.text,\n styles.underline,\n disabled && styles.disabled,\n isPressed && platformPressedStyle,\n style,\n ]}\n onPress={!disabled ? onPress : undefined}\n onPressIn={() => setIsPressed(true)}\n onPressOut={() => setIsPressed(false)}\n {...props}\n >\n {children}\n </Text>\n )\n}\n\n// =================================\n// ====== Styles ===================\n// =================================\n\nconst useStyles = ({\n appearance = 'interaction',\n disabled = false,\n}: Partial<TextInlineButtonProps>) => {\n const { colors } = useTheme()\n const colorKey = getColorKey({ disabled, appearance })\n const colorOptionMap = useButtonColorOptionMap()\n\n // Android doesn't show a \"pressed\" state and so we need to simulate it.\n // Lowering the Text's opacity doesn't work as it inherits it's parent's Text's opacity.\n // We can simulate the effect by changing the color's opacity instead.\n const pressedColor = colorFunction(colorOptionMap[colorKey]).alpha(0.5).string()\n\n return StyleSheet.create({\n text: {\n fontWeight: platformFontWeightMedium,\n color: colorOptionMap[colorKey],\n },\n underline: {\n textDecorationLine: 'underline',\n textDecorationColor: colorOptionMap[colorKey],\n textDecorationStyle: 'solid',\n },\n disabled: {\n color: colors.textColorDefaultDisabled,\n },\n pressedAndroid: {\n color: pressedColor,\n },\n })\n}\n"]}
@@ -3,6 +3,6 @@ import { TextInputProps, TextInput } from 'react-native';
3
3
  interface AutoFocusAwareTextInputProps extends TextInputProps {
4
4
  inputRef?: RefObject<TextInput | null>;
5
5
  }
6
- export declare const AutoFocusAwareTextInput: (props: AutoFocusAwareTextInputProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const AutoFocusAwareTextInput: (props: AutoFocusAwareTextInputProps) => import("react").JSX.Element;
7
7
  export {};
8
8
  //# sourceMappingURL=text_input.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"text_input.d.ts","sourceRoot":"","sources":["../../../src/components/display/text_input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAqB,MAAM,OAAO,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAGxD,UAAU,4BAA6B,SAAQ,cAAc;IAC3D,QAAQ,CAAC,EAAE,SAAS,CAAC,SAAS,GAAG,IAAI,CAAC,CAAA;CACvC;AAED,eAAO,MAAM,uBAAuB,GAAI,OAAO,4BAA4B,4CAe1E,CAAA"}
1
+ {"version":3,"file":"text_input.d.ts","sourceRoot":"","sources":["../../../src/components/display/text_input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAqB,MAAM,OAAO,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAGxD,UAAU,4BAA6B,SAAQ,cAAc;IAC3D,QAAQ,CAAC,EAAE,SAAS,CAAC,SAAS,GAAG,IAAI,CAAC,CAAA;CACvC;AAED,eAAO,MAAM,uBAAuB,GAAI,OAAO,4BAA4B,gCAe1E,CAAA"}
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  import { useEffect, useRef } from 'react';
3
2
  import { TextInput } from 'react-native';
4
3
  import { useKeyboardViewReady } from './keyboard_view';
@@ -13,6 +12,6 @@ export const AutoFocusAwareTextInput = (props) => {
13
12
  return;
14
13
  ref?.current?.focus();
15
14
  }, [ref, autoFocus, keyboardViewReady]);
16
- return _jsx(TextInput, { ref: ref, ...props, autoFocus: false });
15
+ return <TextInput ref={ref} {...props} autoFocus={false}/>;
17
16
  };
18
17
  //# sourceMappingURL=text_input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"text_input.js","sourceRoot":"","sources":["../../../src/components/display/text_input.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAa,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AACpD,OAAO,EAAkB,SAAS,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAMtD,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,KAAmC,EAAE,EAAE;IAC7E,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAA;IAC1B,MAAM,UAAU,GAAG,MAAM,CAAY,IAAI,CAAC,CAAA;IAC1C,MAAM,GAAG,GAAG,QAAQ,IAAI,UAAU,CAAA;IAClC,MAAM,iBAAiB,GAAG,oBAAoB,EAAE,CAAA;IAEhD,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAA;IAEjC,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,SAAS,IAAI,CAAC,iBAAiB;YAAE,OAAM;QAE5C,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,CAAA;IACvB,CAAC,EAAE,CAAC,GAAG,EAAE,SAAS,EAAE,iBAAiB,CAAC,CAAC,CAAA;IAEvC,OAAO,KAAC,SAAS,IAAC,GAAG,EAAE,GAAG,KAAM,KAAK,EAAE,SAAS,EAAE,KAAK,GAAI,CAAA;AAC7D,CAAC,CAAA","sourcesContent":["import { RefObject, useEffect, useRef } from 'react'\nimport { TextInputProps, TextInput } from 'react-native'\nimport { useKeyboardViewReady } from './keyboard_view'\n\ninterface AutoFocusAwareTextInputProps extends TextInputProps {\n inputRef?: RefObject<TextInput | null>\n}\n\nexport const AutoFocusAwareTextInput = (props: AutoFocusAwareTextInputProps) => {\n const { inputRef } = props\n const defaultRef = useRef<TextInput>(null)\n const ref = inputRef || defaultRef\n const keyboardViewReady = useKeyboardViewReady()\n\n const autoFocus = props.autoFocus\n\n useEffect(() => {\n if (!autoFocus || !keyboardViewReady) return\n\n ref?.current?.focus()\n }, [ref, autoFocus, keyboardViewReady])\n\n return <TextInput ref={ref} {...props} autoFocus={false} />\n}\n"]}
1
+ {"version":3,"file":"text_input.js","sourceRoot":"","sources":["../../../src/components/display/text_input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AACpD,OAAO,EAAkB,SAAS,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAMtD,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,KAAmC,EAAE,EAAE;IAC7E,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAA;IAC1B,MAAM,UAAU,GAAG,MAAM,CAAY,IAAI,CAAC,CAAA;IAC1C,MAAM,GAAG,GAAG,QAAQ,IAAI,UAAU,CAAA;IAClC,MAAM,iBAAiB,GAAG,oBAAoB,EAAE,CAAA;IAEhD,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAA;IAEjC,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,SAAS,IAAI,CAAC,iBAAiB;YAAE,OAAM;QAE5C,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,CAAA;IACvB,CAAC,EAAE,CAAC,GAAG,EAAE,SAAS,EAAE,iBAAiB,CAAC,CAAC,CAAA;IAEvC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,EAAG,CAAA;AAC7D,CAAC,CAAA","sourcesContent":["import { RefObject, useEffect, useRef } from 'react'\nimport { TextInputProps, TextInput } from 'react-native'\nimport { useKeyboardViewReady } from './keyboard_view'\n\ninterface AutoFocusAwareTextInputProps extends TextInputProps {\n inputRef?: RefObject<TextInput | null>\n}\n\nexport const AutoFocusAwareTextInput = (props: AutoFocusAwareTextInputProps) => {\n const { inputRef } = props\n const defaultRef = useRef<TextInput>(null)\n const ref = inputRef || defaultRef\n const keyboardViewReady = useKeyboardViewReady()\n\n const autoFocus = props.autoFocus\n\n useEffect(() => {\n if (!autoFocus || !keyboardViewReady) return\n\n ref?.current?.focus()\n }, [ref, autoFocus, keyboardViewReady])\n\n return <TextInput ref={ref} {...props} autoFocus={false} />\n}\n"]}
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import type { PressableProps } from 'react-native';
2
3
  import { IconString } from './icon';
3
4
  type RestrictedPressableProps = Omit<PressableProps, 'onLongPress'>;
@@ -50,6 +51,6 @@ export interface ToggleButtonProps extends RestrictedPressableProps {
50
51
  */
51
52
  hapticFeedback?: boolean;
52
53
  }
53
- export declare function ToggleButton({ active, accessibilityLabel, adjustsFontSizeToFit, allowFontScaling, iconNameLeft, iconNameRight, maxFontSizeMultiplier, minimumFontScale, title, style, hapticFeedback, onPress, ...props }: ToggleButtonProps): import("react/jsx-runtime").JSX.Element;
54
+ export declare function ToggleButton({ active, accessibilityLabel, adjustsFontSizeToFit, allowFontScaling, iconNameLeft, iconNameRight, maxFontSizeMultiplier, minimumFontScale, title, style, hapticFeedback, onPress, ...props }: ToggleButtonProps): React.JSX.Element;
54
55
  export {};
55
56
  //# sourceMappingURL=toggle_button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toggle_button.d.ts","sourceRoot":"","sources":["../../../src/components/display/toggle_button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAyB,MAAM,cAAc,CAAA;AAczE,OAAO,EAAQ,UAAU,EAAE,MAAM,QAAQ,CAAA;AAUzC,KAAK,wBAAwB,GAAG,IAAI,CAAC,cAAc,EAAE,aAAa,CAAC,CAAA;AAMnE,MAAM,WAAW,iBAAkB,SAAQ,wBAAwB;IACjE;;OAEG;IACH,MAAM,EAAE,OAAO,CAAA;IACf;;;;OAIG;IACH,kBAAkB,EAAE,MAAM,CAAA;IAC1B;;OAEG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B;;OAEG;IACH,YAAY,CAAC,EAAE,UAAU,CAAA;IACzB;;OAEG;IACH,aAAa,CAAC,EAAE,UAAU,CAAA;IAC1B;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAA;IAC/B;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;AAED,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,kBAAkB,EAClB,oBAA4B,EAC5B,gBAAuB,EACvB,YAAY,EACZ,aAAa,EACb,qBAAyD,EACzD,gBAAgB,EAChB,KAAK,EACL,KAAK,EACL,cAAqB,EACrB,OAAO,EACP,GAAG,KAAK,EACT,EAAE,iBAAiB,2CA4DnB"}
1
+ {"version":3,"file":"toggle_button.d.ts","sourceRoot":"","sources":["../../../src/components/display/toggle_button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,cAAc,EAAyB,MAAM,cAAc,CAAA;AAczE,OAAO,EAAQ,UAAU,EAAE,MAAM,QAAQ,CAAA;AAUzC,KAAK,wBAAwB,GAAG,IAAI,CAAC,cAAc,EAAE,aAAa,CAAC,CAAA;AAMnE,MAAM,WAAW,iBAAkB,SAAQ,wBAAwB;IACjE;;OAEG;IACH,MAAM,EAAE,OAAO,CAAA;IACf;;;;OAIG;IACH,kBAAkB,EAAE,MAAM,CAAA;IAC1B;;OAEG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B;;OAEG;IACH,YAAY,CAAC,EAAE,UAAU,CAAA;IACzB;;OAEG;IACH,aAAa,CAAC,EAAE,UAAU,CAAA;IAC1B;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAA;IAC/B;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;AAED,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,kBAAkB,EAClB,oBAA4B,EAC5B,gBAAuB,EACvB,YAAY,EACZ,aAAa,EACb,qBAAyD,EACzD,gBAAgB,EAChB,KAAK,EACL,KAAK,EACL,cAAqB,EACrB,OAAO,EACP,GAAG,KAAK,EACT,EAAE,iBAAiB,qBA4DnB"}
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import React from 'react';
2
2
  import { Pressable, StyleSheet } from 'react-native';
3
3
  import { useTheme, useFontScale, useCreateAndroidRippleColor, useInteractionGhostBackgroundColor, } from '../../hooks';
4
4
  import { MAX_FONT_SIZE_MULTIPLIER_LANDMARK, platformFontWeightBold, platformPressedOpacityStyle, } from '../../utils';
@@ -18,11 +18,17 @@ export function ToggleButton({ active, accessibilityLabel, adjustsFontSizeToFit
18
18
  Haptic.impactLight();
19
19
  onPress?.(event);
20
20
  };
21
- return (_jsxs(Pressable, { style: ({ pressed }) => ({
21
+ return (<Pressable style={({ pressed }) => ({
22
22
  ...styles.pressable,
23
23
  ...(pressed ? platformPressedOpacityStyle : null),
24
24
  ...overrideStyles,
25
- }), accessibilityRole: "togglebutton", accessibilityLabel: accessibilityLabel, accessibilityState: { checked: active }, android_ripple: { color: androidRippleColor, borderless: false, foreground: true }, onPress: handlePress, accessibilityShowsLargeContentViewer: true, accessibilityLargeContentTitle: accessibilityLabel, ...props, children: [iconNameLeft && (_jsx(Icon, { name: iconNameLeft, style: styles.icon, maxFontSizeMultiplier: maxFontSizeMultiplier })), hasTitle && (_jsx(Text, { allowFontScaling: allowFontScaling, minimumFontScale: minimumFontScale, maxFontSizeMultiplier: maxFontSizeMultiplier, adjustsFontSizeToFit: adjustsFontSizeToFit, numberOfLines: 1, style: styles.text, variant: "tertiary", children: title })), iconNameRight && (_jsx(Icon, { name: iconNameRight, style: styles.icon, maxFontSizeMultiplier: maxFontSizeMultiplier }))] }));
25
+ })} accessibilityRole="togglebutton" accessibilityLabel={accessibilityLabel} accessibilityState={{ checked: active }} android_ripple={{ color: androidRippleColor, borderless: false, foreground: true }} onPress={handlePress} accessibilityShowsLargeContentViewer accessibilityLargeContentTitle={accessibilityLabel} {...props}>
26
+ {iconNameLeft && (<Icon name={iconNameLeft} style={styles.icon} maxFontSizeMultiplier={maxFontSizeMultiplier}/>)}
27
+ {hasTitle && (<Text allowFontScaling={allowFontScaling} minimumFontScale={minimumFontScale} maxFontSizeMultiplier={maxFontSizeMultiplier} adjustsFontSizeToFit={adjustsFontSizeToFit} numberOfLines={1} style={styles.text} variant="tertiary">
28
+ {title}
29
+ </Text>)}
30
+ {iconNameRight && (<Icon name={iconNameRight} style={styles.icon} maxFontSizeMultiplier={maxFontSizeMultiplier}/>)}
31
+ </Pressable>);
26
32
  }
27
33
  // =================================
28
34
  // ====== Styles ===================
@@ -1 +1 @@
1
- {"version":3,"file":"toggle_button.js","sourceRoot":"","sources":["../../../src/components/display/toggle_button.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEpD,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,2BAA2B,EAC3B,kCAAkC,GACnC,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,iCAAiC,EACjC,sBAAsB,EACtB,2BAA2B,GAC5B,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAA;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AACrD,OAAO,EAAE,IAAI,EAAc,MAAM,QAAQ,CAAA;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAiE7B,MAAM,UAAU,YAAY,CAAC,EAC3B,MAAM,EACN,kBAAkB,EAClB,oBAAoB,GAAG,KAAK,EAC5B,gBAAgB,GAAG,IAAI,EACvB,YAAY,EACZ,aAAa,EACb,qBAAqB,GAAG,iCAAiC,EACzD,gBAAgB,EAChB,KAAK,EACL,KAAK,EACL,cAAc,GAAG,IAAI,EACrB,OAAO,EACP,GAAG,KAAK,EACU;IAClB,MAAM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,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,cAAc,EAAE,QAAQ;YACxB,MAAM,EAAE,EAAE,GAAG,SAAS;YACtB,GAAG,EAAE,CAAC,GAAG,SAAS;YAClB,QAAQ,EAAE,QAAQ;SACnB;QACD,IAAI,EAAE;YACJ,SAAS,EAAE,QAAQ;YACnB,iBAAiB,EAAE,QAAQ;YAC3B,kBAAkB,EAAE,KAAK;YACzB,UAAU,EAAE,sBAAsB;YAClC,KAAK;SACN;QACD,IAAI,EAAE;YACJ,QAAQ,EAAE,MAAM,CAAC,UAAU,GAAG,SAAS;YACvC,KAAK;SACN;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { Pressable, StyleSheet } from 'react-native'\nimport type { PressableProps, GestureResponderEvent } from 'react-native'\nimport {\n useTheme,\n useFontScale,\n useCreateAndroidRippleColor,\n useInteractionGhostBackgroundColor,\n} from '../../hooks'\nimport {\n MAX_FONT_SIZE_MULTIPLIER_LANDMARK,\n platformFontWeightBold,\n platformPressedOpacityStyle,\n} from '../../utils'\nimport { Haptic } from '../../utils/native_adapters/configuration'\nimport { tokens } from '../../vendor/tapestry/tokens'\nimport { Icon, IconString } from './icon'\nimport { Text } from './text'\n\n// =================================\n// ====== Constants ================\n// =================================\n\n// We are omitting `onLongPress` because we are instead supporting `accessibilityShowsLargeContentViewer`.\n// This is triggered by an `onLongPress` event when an iOS device is in Apple's accessible font scale range.\n// Triggering this prop will display an almost full screen iOS a11y button.\ntype RestrictedPressableProps = Omit<PressableProps, 'onLongPress'>\n\n// =================================\n// ====== Component ================\n// =================================\n\nexport interface ToggleButtonProps extends RestrictedPressableProps {\n /**\n * Whether the toggle button is active/checked\n */\n active: boolean\n /**\n * Required accessibility label for screen readers.\n * When title is provided, this provides additional context.\n * When title is omitted (icon-only mode), this is the primary label.\n */\n accessibilityLabel: string\n /**\n * Specifies whether fonts should be scaled down automatically to fit given style constraints.\n */\n adjustsFontSizeToFit?: boolean\n /**\n * Specifies whether fonts should scale to respect the device's text size accessibility settings. The default is true.\n */\n allowFontScaling?: boolean\n /**\n * Generates an icon to the left of the button text\n */\n iconNameLeft?: IconString\n /**\n * Generates an icon to the right of the button text\n */\n iconNameRight?: IconString\n /**\n * Specifies the maximum size a font can reach when allowFontScaling is enabled.\n */\n maxFontSizeMultiplier?: number\n /**\n * Specifies smallest possible scale a font can reach when adjustsFontSizeToFit is enabled. (values 0.01-1.0).\n */\n minimumFontScale?: number\n /**\n * Renders as text within the button.\n * When omitted, button displays in icon-only mode.\n */\n title?: string\n /**\n * Pressable container styles\n */\n style?: PressableProps['style']\n /**\n * Specifies whether haptic feedback should be enabled.\n */\n hapticFeedback?: boolean\n}\n\nexport function ToggleButton({\n active,\n accessibilityLabel,\n adjustsFontSizeToFit = false,\n allowFontScaling = true,\n iconNameLeft,\n iconNameRight,\n maxFontSizeMultiplier = MAX_FONT_SIZE_MULTIPLIER_LANDMARK,\n minimumFontScale,\n title,\n style,\n hapticFeedback = true,\n onPress,\n ...props\n}: ToggleButtonProps) {\n const hasTitle = Boolean(title)\n const styles = useStyles({ active, maxFontSizeMultiplier })\n const { colors } = useTheme()\n const overrideStyles = StyleSheet.flatten(style) // Ensures the pressed styles still get applied\n\n const baseRippleColor = active ? colors.interaction : colors.fillColorNeutral050Base\n const androidRippleColor = useCreateAndroidRippleColor({ color: baseRippleColor })\n\n const handlePress = (event: GestureResponderEvent) => {\n if (hapticFeedback) Haptic.impactLight()\n\n onPress?.(event)\n }\n\n return (\n <Pressable\n style={({ pressed }) => ({\n ...styles.pressable,\n ...(pressed ? platformPressedOpacityStyle : null),\n ...overrideStyles,\n })}\n accessibilityRole=\"togglebutton\"\n accessibilityLabel={accessibilityLabel}\n accessibilityState={{ checked: active }}\n android_ripple={{ color: androidRippleColor, borderless: false, foreground: true }}\n onPress={handlePress}\n accessibilityShowsLargeContentViewer\n accessibilityLargeContentTitle={accessibilityLabel}\n {...props}\n >\n {iconNameLeft && (\n <Icon\n name={iconNameLeft}\n style={styles.icon}\n maxFontSizeMultiplier={maxFontSizeMultiplier}\n />\n )}\n {hasTitle && (\n <Text\n allowFontScaling={allowFontScaling}\n minimumFontScale={minimumFontScale}\n maxFontSizeMultiplier={maxFontSizeMultiplier}\n adjustsFontSizeToFit={adjustsFontSizeToFit}\n numberOfLines={1}\n style={styles.text}\n variant=\"tertiary\"\n >\n {title}\n </Text>\n )}\n {iconNameRight && (\n <Icon\n name={iconNameRight}\n style={styles.icon}\n maxFontSizeMultiplier={maxFontSizeMultiplier}\n />\n )}\n </Pressable>\n )\n}\n\n// =================================\n// ====== Styles ===================\n// =================================\n\nconst useStyles = ({ active, maxFontSizeMultiplier }: Partial<ToggleButtonProps>) => {\n const { colors, button } = useTheme()\n const fontScale = useFontScale({ maxFontSizeMultiplier })\n\n const activeBackgroundColor = useInteractionGhostBackgroundColor()\n\n const color = active ? colors.interaction : colors.textColorDefaultSecondary\n\n return StyleSheet.create({\n pressable: {\n borderRadius: button.borderRadius * fontScale,\n borderWidth: 1,\n borderColor: active ? colors.interaction : colors.borderColorDefaultBase,\n backgroundColor: active ? activeBackgroundColor : 'transparent',\n paddingHorizontal: 16 * fontScale,\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n height: 32 * fontScale,\n gap: 6 * fontScale,\n overflow: 'hidden',\n },\n text: {\n textAlign: 'center',\n textAlignVertical: 'center',\n includeFontPadding: false,\n fontWeight: platformFontWeightBold,\n color,\n },\n icon: {\n fontSize: tokens.fontSizeSm * fontScale,\n color,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"toggle_button.js","sourceRoot":"","sources":["../../../src/components/display/toggle_button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEpD,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,2BAA2B,EAC3B,kCAAkC,GACnC,MAAM,aAAa,CAAA;AAC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,SAAS;YACvC,KAAK;SACN;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { Pressable, StyleSheet } from 'react-native'\nimport type { PressableProps, GestureResponderEvent } from 'react-native'\nimport {\n useTheme,\n useFontScale,\n useCreateAndroidRippleColor,\n useInteractionGhostBackgroundColor,\n} from '../../hooks'\nimport {\n MAX_FONT_SIZE_MULTIPLIER_LANDMARK,\n platformFontWeightBold,\n platformPressedOpacityStyle,\n} from '../../utils'\nimport { Haptic } from '../../utils/native_adapters/configuration'\nimport { tokens } from '../../vendor/tapestry/tokens'\nimport { Icon, IconString } from './icon'\nimport { Text } from './text'\n\n// =================================\n// ====== Constants ================\n// =================================\n\n// We are omitting `onLongPress` because we are instead supporting `accessibilityShowsLargeContentViewer`.\n// This is triggered by an `onLongPress` event when an iOS device is in Apple's accessible font scale range.\n// Triggering this prop will display an almost full screen iOS a11y button.\ntype RestrictedPressableProps = Omit<PressableProps, 'onLongPress'>\n\n// =================================\n// ====== Component ================\n// =================================\n\nexport interface ToggleButtonProps extends RestrictedPressableProps {\n /**\n * Whether the toggle button is active/checked\n */\n active: boolean\n /**\n * Required accessibility label for screen readers.\n * When title is provided, this provides additional context.\n * When title is omitted (icon-only mode), this is the primary label.\n */\n accessibilityLabel: string\n /**\n * Specifies whether fonts should be scaled down automatically to fit given style constraints.\n */\n adjustsFontSizeToFit?: boolean\n /**\n * Specifies whether fonts should scale to respect the device's text size accessibility settings. The default is true.\n */\n allowFontScaling?: boolean\n /**\n * Generates an icon to the left of the button text\n */\n iconNameLeft?: IconString\n /**\n * Generates an icon to the right of the button text\n */\n iconNameRight?: IconString\n /**\n * Specifies the maximum size a font can reach when allowFontScaling is enabled.\n */\n maxFontSizeMultiplier?: number\n /**\n * Specifies smallest possible scale a font can reach when adjustsFontSizeToFit is enabled. (values 0.01-1.0).\n */\n minimumFontScale?: number\n /**\n * Renders as text within the button.\n * When omitted, button displays in icon-only mode.\n */\n title?: string\n /**\n * Pressable container styles\n */\n style?: PressableProps['style']\n /**\n * Specifies whether haptic feedback should be enabled.\n */\n hapticFeedback?: boolean\n}\n\nexport function ToggleButton({\n active,\n accessibilityLabel,\n adjustsFontSizeToFit = false,\n allowFontScaling = true,\n iconNameLeft,\n iconNameRight,\n maxFontSizeMultiplier = MAX_FONT_SIZE_MULTIPLIER_LANDMARK,\n minimumFontScale,\n title,\n style,\n hapticFeedback = true,\n onPress,\n ...props\n}: ToggleButtonProps) {\n const hasTitle = Boolean(title)\n const styles = useStyles({ active, maxFontSizeMultiplier })\n const { colors } = useTheme()\n const overrideStyles = StyleSheet.flatten(style) // Ensures the pressed styles still get applied\n\n const baseRippleColor = active ? colors.interaction : colors.fillColorNeutral050Base\n const androidRippleColor = useCreateAndroidRippleColor({ color: baseRippleColor })\n\n const handlePress = (event: GestureResponderEvent) => {\n if (hapticFeedback) Haptic.impactLight()\n\n onPress?.(event)\n }\n\n return (\n <Pressable\n style={({ pressed }) => ({\n ...styles.pressable,\n ...(pressed ? platformPressedOpacityStyle : null),\n ...overrideStyles,\n })}\n accessibilityRole=\"togglebutton\"\n accessibilityLabel={accessibilityLabel}\n accessibilityState={{ checked: active }}\n android_ripple={{ color: androidRippleColor, borderless: false, foreground: true }}\n onPress={handlePress}\n accessibilityShowsLargeContentViewer\n accessibilityLargeContentTitle={accessibilityLabel}\n {...props}\n >\n {iconNameLeft && (\n <Icon\n name={iconNameLeft}\n style={styles.icon}\n maxFontSizeMultiplier={maxFontSizeMultiplier}\n />\n )}\n {hasTitle && (\n <Text\n allowFontScaling={allowFontScaling}\n minimumFontScale={minimumFontScale}\n maxFontSizeMultiplier={maxFontSizeMultiplier}\n adjustsFontSizeToFit={adjustsFontSizeToFit}\n numberOfLines={1}\n style={styles.text}\n variant=\"tertiary\"\n >\n {title}\n </Text>\n )}\n {iconNameRight && (\n <Icon\n name={iconNameRight}\n style={styles.icon}\n maxFontSizeMultiplier={maxFontSizeMultiplier}\n />\n )}\n </Pressable>\n )\n}\n\n// =================================\n// ====== Styles ===================\n// =================================\n\nconst useStyles = ({ active, maxFontSizeMultiplier }: Partial<ToggleButtonProps>) => {\n const { colors, button } = useTheme()\n const fontScale = useFontScale({ maxFontSizeMultiplier })\n\n const activeBackgroundColor = useInteractionGhostBackgroundColor()\n\n const color = active ? colors.interaction : colors.textColorDefaultSecondary\n\n return StyleSheet.create({\n pressable: {\n borderRadius: button.borderRadius * fontScale,\n borderWidth: 1,\n borderColor: active ? colors.interaction : colors.borderColorDefaultBase,\n backgroundColor: active ? activeBackgroundColor : 'transparent',\n paddingHorizontal: 16 * fontScale,\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n height: 32 * fontScale,\n gap: 6 * fontScale,\n overflow: 'hidden',\n },\n text: {\n textAlign: 'center',\n textAlignVertical: 'center',\n includeFontPadding: false,\n fontWeight: platformFontWeightBold,\n color,\n },\n icon: {\n fontSize: tokens.fontSizeSm * fontScale,\n color,\n },\n })\n}\n"]}
@@ -6,6 +6,6 @@ interface VideoAttachmentPreviewProps {
6
6
  error?: boolean;
7
7
  hideRemoveButton?: boolean;
8
8
  }
9
- export declare const VideoAttachmentPreview: ({ name, duration, onRemovePress, loading, error, hideRemoveButton, }: VideoAttachmentPreviewProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const VideoAttachmentPreview: ({ name, duration, onRemovePress, loading, error, hideRemoveButton, }: VideoAttachmentPreviewProps) => import("react").JSX.Element;
10
10
  export {};
11
11
  //# sourceMappingURL=video_attachment_preview.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"video_attachment_preview.d.ts","sourceRoot":"","sources":["../../../src/components/display/video_attachment_preview.tsx"],"names":[],"mappings":"AASA,UAAU,2BAA2B;IACnC,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,MAAM,IAAI,CAAA;IACzB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED,eAAO,MAAM,sBAAsB,GAAI,sEAOpC,2BAA2B,4CAqD7B,CAAA"}
1
+ {"version":3,"file":"video_attachment_preview.d.ts","sourceRoot":"","sources":["../../../src/components/display/video_attachment_preview.tsx"],"names":[],"mappings":"AASA,UAAU,2BAA2B;IACnC,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,MAAM,IAAI,CAAA;IACzB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED,eAAO,MAAM,sBAAsB,GAAI,sEAOpC,2BAA2B,gCAqD7B,CAAA"}