@planningcenter/chat-react-native 3.30.0-rc.0 → 3.30.0-rc.2

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 (928) hide show
  1. package/build/components/conversation/attachments/attachment_card.js +3 -3
  2. package/build/components/conversation/attachments/attachment_card.js.map +1 -1
  3. package/build/components/conversation/attachments/attachment_deleting_overlay.js +2 -2
  4. package/build/components/conversation/attachments/attachment_deleting_overlay.js.map +1 -1
  5. package/build/components/conversation/attachments/audio_attachment.d.ts +1 -1
  6. package/build/components/conversation/attachments/audio_attachment.d.ts.map +1 -1
  7. package/build/components/conversation/attachments/audio_attachment.js +4 -4
  8. package/build/components/conversation/attachments/audio_attachment.js.map +1 -1
  9. package/build/components/conversation/attachments/expanded_link.d.ts +1 -1
  10. package/build/components/conversation/attachments/expanded_link.d.ts.map +1 -1
  11. package/build/components/conversation/attachments/expanded_link.js +4 -4
  12. package/build/components/conversation/attachments/expanded_link.js.map +1 -1
  13. package/build/components/conversation/attachments/generic_file_attachment.d.ts +1 -1
  14. package/build/components/conversation/attachments/generic_file_attachment.d.ts.map +1 -1
  15. package/build/components/conversation/attachments/generic_file_attachment.js +5 -5
  16. package/build/components/conversation/attachments/generic_file_attachment.js.map +1 -1
  17. package/build/components/conversation/attachments/giphy_attachment.d.ts +1 -1
  18. package/build/components/conversation/attachments/giphy_attachment.d.ts.map +1 -1
  19. package/build/components/conversation/attachments/giphy_attachment.js +5 -5
  20. package/build/components/conversation/attachments/giphy_attachment.js.map +1 -1
  21. package/build/components/conversation/attachments/image_attachment.d.ts +1 -1
  22. package/build/components/conversation/attachments/image_attachment.d.ts.map +1 -1
  23. package/build/components/conversation/attachments/image_attachment.js +8 -8
  24. package/build/components/conversation/attachments/image_attachment.js.map +1 -1
  25. package/build/components/conversation/attachments/video_attachment.d.ts +1 -1
  26. package/build/components/conversation/attachments/video_attachment.d.ts.map +1 -1
  27. package/build/components/conversation/attachments/video_attachment.js +6 -6
  28. package/build/components/conversation/attachments/video_attachment.js.map +1 -1
  29. package/build/components/conversation/empty_conversation_blank_state.js +1 -1
  30. package/build/components/conversation/empty_conversation_blank_state.js.map +1 -1
  31. package/build/components/conversation/jump_to_bottom_button.js +3 -3
  32. package/build/components/conversation/jump_to_bottom_button.js.map +1 -1
  33. package/build/components/conversation/message.d.ts +1 -1
  34. package/build/components/conversation/message.d.ts.map +1 -1
  35. package/build/components/conversation/message.js +14 -14
  36. package/build/components/conversation/message.js.map +1 -1
  37. package/build/components/conversation/message_attachments.d.ts +1 -1
  38. package/build/components/conversation/message_attachments.d.ts.map +1 -1
  39. package/build/components/conversation/message_attachments.js +4 -4
  40. package/build/components/conversation/message_attachments.js.map +1 -1
  41. package/build/components/conversation/message_form/message_form_attachment_image.d.ts +1 -1
  42. package/build/components/conversation/message_form/message_form_attachment_image.d.ts.map +1 -1
  43. package/build/components/conversation/message_form/message_form_attachment_image.js +1 -1
  44. package/build/components/conversation/message_form/message_form_attachment_image.js.map +1 -1
  45. package/build/components/conversation/message_form/message_form_attachment_video.d.ts +1 -1
  46. package/build/components/conversation/message_form/message_form_attachment_video.d.ts.map +1 -1
  47. package/build/components/conversation/message_form/message_form_attachment_video.js +1 -1
  48. package/build/components/conversation/message_form/message_form_attachment_video.js.map +1 -1
  49. package/build/components/conversation/message_form.d.ts +1 -1
  50. package/build/components/conversation/message_form.d.ts.map +1 -1
  51. package/build/components/conversation/message_form.js +13 -13
  52. package/build/components/conversation/message_form.js.map +1 -1
  53. package/build/components/conversation/message_markdown.js +3 -3
  54. package/build/components/conversation/message_markdown.js.map +1 -1
  55. package/build/components/conversation/message_reaction.d.ts +2 -2
  56. package/build/components/conversation/message_reaction.d.ts.map +1 -1
  57. package/build/components/conversation/message_reaction.js +6 -6
  58. package/build/components/conversation/message_reaction.js.map +1 -1
  59. package/build/components/conversation/message_read_receipts.d.ts +1 -1
  60. package/build/components/conversation/message_read_receipts.d.ts.map +1 -1
  61. package/build/components/conversation/message_read_receipts.js +2 -2
  62. package/build/components/conversation/message_read_receipts.js.map +1 -1
  63. package/build/components/conversation/messages_disabled_banners.js +2 -2
  64. package/build/components/conversation/messages_disabled_banners.js.map +1 -1
  65. package/build/components/conversation/reply_connectors.d.ts +1 -1
  66. package/build/components/conversation/reply_connectors.d.ts.map +1 -1
  67. package/build/components/conversation/reply_connectors.js +2 -2
  68. package/build/components/conversation/reply_connectors.js.map +1 -1
  69. package/build/components/conversation/reply_shadow_message.d.ts +1 -1
  70. package/build/components/conversation/reply_shadow_message.d.ts.map +1 -1
  71. package/build/components/conversation/reply_shadow_message.js +8 -8
  72. package/build/components/conversation/reply_shadow_message.js.map +1 -1
  73. package/build/components/conversation/typing_indicator.js +3 -3
  74. package/build/components/conversation/typing_indicator.js.map +1 -1
  75. package/build/components/conversations/conversation_actions.d.ts +1 -1
  76. package/build/components/conversations/conversation_actions.d.ts.map +1 -1
  77. package/build/components/conversations/conversation_actions.js +5 -5
  78. package/build/components/conversations/conversation_actions.js.map +1 -1
  79. package/build/components/conversations/conversation_preview.d.ts +1 -1
  80. package/build/components/conversations/conversation_preview.d.ts.map +1 -1
  81. package/build/components/conversations/conversation_preview.js +4 -4
  82. package/build/components/conversations/conversation_preview.js.map +1 -1
  83. package/build/components/conversations/conversations.js +5 -5
  84. package/build/components/conversations/conversations.js.map +1 -1
  85. package/build/components/conversations/mute_indicator.js +3 -3
  86. package/build/components/conversations/mute_indicator.js.map +1 -1
  87. package/build/components/conversations/swipeable_toggle_button.d.ts +1 -1
  88. package/build/components/conversations/swipeable_toggle_button.d.ts.map +1 -1
  89. package/build/components/conversations/swipeable_toggle_button.js +5 -5
  90. package/build/components/conversations/swipeable_toggle_button.js.map +1 -1
  91. package/build/components/conversations/unread_count_badge.js +3 -3
  92. package/build/components/conversations/unread_count_badge.js.map +1 -1
  93. package/build/components/display/action_button.d.ts.map +1 -1
  94. package/build/components/display/action_button.js +4 -4
  95. package/build/components/display/action_button.js.map +1 -1
  96. package/build/components/display/avatar.d.ts +1 -1
  97. package/build/components/display/avatar.d.ts.map +1 -1
  98. package/build/components/display/avatar.js +1 -1
  99. package/build/components/display/avatar.js.map +1 -1
  100. package/build/components/display/avatar_group.d.ts +1 -1
  101. package/build/components/display/avatar_group.d.ts.map +1 -1
  102. package/build/components/display/avatar_group.js +1 -1
  103. package/build/components/display/avatar_group.js.map +1 -1
  104. package/build/components/display/badge.d.ts.map +1 -1
  105. package/build/components/display/badge.js +3 -3
  106. package/build/components/display/badge.js.map +1 -1
  107. package/build/components/display/banner.d.ts +1 -1
  108. package/build/components/display/banner.d.ts.map +1 -1
  109. package/build/components/display/banner.js +1 -1
  110. package/build/components/display/banner.js.map +1 -1
  111. package/build/components/display/banner_collapsible.js +1 -1
  112. package/build/components/display/banner_collapsible.js.map +1 -1
  113. package/build/components/display/button.d.ts.map +1 -1
  114. package/build/components/display/button.js +3 -3
  115. package/build/components/display/button.js.map +1 -1
  116. package/build/components/display/child_notice.d.ts +1 -1
  117. package/build/components/display/child_notice.d.ts.map +1 -1
  118. package/build/components/display/child_notice.js +3 -3
  119. package/build/components/display/child_notice.js.map +1 -1
  120. package/build/components/display/heading.d.ts.map +1 -1
  121. package/build/components/display/heading.js +3 -3
  122. package/build/components/display/heading.js.map +1 -1
  123. package/build/components/display/icon.d.ts +4 -4
  124. package/build/components/display/icon.d.ts.map +1 -1
  125. package/build/components/display/icon.js +5 -5
  126. package/build/components/display/icon.js.map +1 -1
  127. package/build/components/display/icon_button.d.ts.map +1 -1
  128. package/build/components/display/icon_button.js +2 -2
  129. package/build/components/display/icon_button.js.map +1 -1
  130. package/build/components/display/image.js +1 -1
  131. package/build/components/display/image.js.map +1 -1
  132. package/build/components/display/image_attachment_preview.js +4 -4
  133. package/build/components/display/image_attachment_preview.js.map +1 -1
  134. package/build/components/display/keyboard_view.js +1 -1
  135. package/build/components/display/keyboard_view.js.map +1 -1
  136. package/build/components/display/person.d.ts +1 -1
  137. package/build/components/display/person.d.ts.map +1 -1
  138. package/build/components/display/person.js +2 -2
  139. package/build/components/display/person.js.map +1 -1
  140. package/build/components/display/platform_modal_header_buttons.d.ts +1 -1
  141. package/build/components/display/platform_modal_header_buttons.d.ts.map +1 -1
  142. package/build/components/display/platform_modal_header_buttons.js +3 -3
  143. package/build/components/display/platform_modal_header_buttons.js.map +1 -1
  144. package/build/components/display/pressable_row.d.ts.map +1 -1
  145. package/build/components/display/pressable_row.js +1 -1
  146. package/build/components/display/pressable_row.js.map +1 -1
  147. package/build/components/display/spinner.js +1 -1
  148. package/build/components/display/spinner.js.map +1 -1
  149. package/build/components/display/switch.js +1 -1
  150. package/build/components/display/switch.js.map +1 -1
  151. package/build/components/display/tabs.js +1 -1
  152. package/build/components/display/tabs.js.map +1 -1
  153. package/build/components/display/text.d.ts.map +1 -1
  154. package/build/components/display/text.js +2 -2
  155. package/build/components/display/text.js.map +1 -1
  156. package/build/components/display/text_button.d.ts.map +1 -1
  157. package/build/components/display/text_button.js +2 -2
  158. package/build/components/display/text_button.js.map +1 -1
  159. package/build/components/display/text_inline_button.d.ts.map +1 -1
  160. package/build/components/display/text_inline_button.js +3 -3
  161. package/build/components/display/text_inline_button.js.map +1 -1
  162. package/build/components/display/toggle_button.d.ts.map +1 -1
  163. package/build/components/display/toggle_button.js +5 -5
  164. package/build/components/display/toggle_button.js.map +1 -1
  165. package/build/components/display/utils/button_colors.js +1 -1
  166. package/build/components/display/utils/button_colors.js.map +1 -1
  167. package/build/components/display/utils/status_colors.js +1 -1
  168. package/build/components/display/utils/status_colors.js.map +1 -1
  169. package/build/components/display/video_attachment_preview.js +5 -5
  170. package/build/components/display/video_attachment_preview.js.map +1 -1
  171. package/build/components/group_conversation_list.d.ts +1 -1
  172. package/build/components/group_conversation_list.d.ts.map +1 -1
  173. package/build/components/group_conversation_list.js +2 -2
  174. package/build/components/group_conversation_list.js.map +1 -1
  175. package/build/components/page/error_boundary.d.ts +1 -1
  176. package/build/components/page/error_boundary.d.ts.map +1 -1
  177. package/build/components/page/error_boundary.js +2 -2
  178. package/build/components/page/error_boundary.js.map +1 -1
  179. package/build/components/page/loading.js +1 -1
  180. package/build/components/page/loading.js.map +1 -1
  181. package/build/components/primitive/avatar_primitive.d.ts +2 -2
  182. package/build/components/primitive/avatar_primitive.d.ts.map +1 -1
  183. package/build/components/primitive/avatar_primitive.js +5 -5
  184. package/build/components/primitive/avatar_primitive.js.map +1 -1
  185. package/build/components/primitive/banner_primitive.d.ts +2 -2
  186. package/build/components/primitive/banner_primitive.d.ts.map +1 -1
  187. package/build/components/primitive/banner_primitive.js +8 -8
  188. package/build/components/primitive/banner_primitive.js.map +1 -1
  189. package/build/components/primitive/blank_state_primitive.d.ts +1 -1
  190. package/build/components/primitive/blank_state_primitive.d.ts.map +1 -1
  191. package/build/components/primitive/blank_state_primitive.js +2 -2
  192. package/build/components/primitive/blank_state_primitive.js.map +1 -1
  193. package/build/components/primitive/form_sheet.d.ts +2 -2
  194. package/build/components/primitive/form_sheet.d.ts.map +1 -1
  195. package/build/components/primitive/form_sheet.js +3 -3
  196. package/build/components/primitive/form_sheet.js.map +1 -1
  197. package/build/components/safe_area_modal.js +1 -1
  198. package/build/components/safe_area_modal.js.map +1 -1
  199. package/build/contexts/api_provider.js +4 -4
  200. package/build/contexts/api_provider.js.map +1 -1
  201. package/build/contexts/chat_context.d.ts +6 -6
  202. package/build/contexts/chat_context.d.ts.map +1 -1
  203. package/build/contexts/chat_context.js +3 -3
  204. package/build/contexts/chat_context.js.map +1 -1
  205. package/build/contexts/conversations_context.d.ts +2 -2
  206. package/build/contexts/conversations_context.d.ts.map +1 -1
  207. package/build/contexts/conversations_context.js +1 -1
  208. package/build/contexts/conversations_context.js.map +1 -1
  209. package/build/contexts/session_context.d.ts +3 -3
  210. package/build/contexts/session_context.d.ts.map +1 -1
  211. package/build/contexts/session_context.js +6 -6
  212. package/build/contexts/session_context.js.map +1 -1
  213. package/build/hooks/groups/use_group_members_for_new_conversation.d.ts +7 -7
  214. package/build/hooks/groups/use_group_members_for_new_conversation.d.ts.map +1 -1
  215. package/build/hooks/groups/use_group_members_for_new_conversation.js +2 -2
  216. package/build/hooks/groups/use_group_members_for_new_conversation.js.map +1 -1
  217. package/build/hooks/groups/use_groups_conversation_create.d.ts +1 -1
  218. package/build/hooks/groups/use_groups_conversation_create.d.ts.map +1 -1
  219. package/build/hooks/groups/use_groups_conversation_create.js +2 -2
  220. package/build/hooks/groups/use_groups_conversation_create.js.map +1 -1
  221. package/build/hooks/services/use_find_or_create_services_conversation.d.ts +2 -2
  222. package/build/hooks/services/use_find_or_create_services_conversation.d.ts.map +1 -1
  223. package/build/hooks/services/use_find_or_create_services_conversation.js +3 -3
  224. package/build/hooks/services/use_find_or_create_services_conversation.js.map +1 -1
  225. package/build/hooks/services/use_services_team.d.ts +1 -1
  226. package/build/hooks/services/use_services_team.d.ts.map +1 -1
  227. package/build/hooks/services/use_services_team.js +1 -1
  228. package/build/hooks/services/use_services_team.js.map +1 -1
  229. package/build/hooks/services/use_team_members_for_new_conversation.d.ts +21 -21
  230. package/build/hooks/services/use_team_members_for_new_conversation.d.ts.map +1 -1
  231. package/build/hooks/services/use_team_members_for_new_conversation.js +1 -1
  232. package/build/hooks/services/use_team_members_for_new_conversation.js.map +1 -1
  233. package/build/hooks/services/use_team_plans.d.ts +1 -1
  234. package/build/hooks/services/use_team_plans.js +2 -2
  235. package/build/hooks/services/use_team_plans.js.map +1 -1
  236. package/build/hooks/use_api.d.ts +2 -2
  237. package/build/hooks/use_api.d.ts.map +1 -1
  238. package/build/hooks/use_api.js.map +1 -1
  239. package/build/hooks/use_api_client.d.ts +1 -1
  240. package/build/hooks/use_api_client.d.ts.map +1 -1
  241. package/build/hooks/use_api_client.js +3 -3
  242. package/build/hooks/use_api_client.js.map +1 -1
  243. package/build/hooks/use_async_storage.js +1 -1
  244. package/build/hooks/use_async_storage.js.map +1 -1
  245. package/build/hooks/use_attachment_uploader.d.ts +1 -1
  246. package/build/hooks/use_attachment_uploader.d.ts.map +1 -1
  247. package/build/hooks/use_attachment_uploader.js +1 -1
  248. package/build/hooks/use_attachment_uploader.js.map +1 -1
  249. package/build/hooks/use_broadcast_typing_status.js +1 -1
  250. package/build/hooks/use_broadcast_typing_status.js.map +1 -1
  251. package/build/hooks/use_chat_permissions.d.ts +21 -21
  252. package/build/hooks/use_chat_permissions.d.ts.map +1 -1
  253. package/build/hooks/use_chat_permissions.js.map +1 -1
  254. package/build/hooks/use_conversation.d.ts +5 -5
  255. package/build/hooks/use_conversation.d.ts.map +1 -1
  256. package/build/hooks/use_conversation.js +4 -3
  257. package/build/hooks/use_conversation.js.map +1 -1
  258. package/build/hooks/use_conversation_jolt_events.js +1 -1
  259. package/build/hooks/use_conversation_jolt_events.js.map +1 -1
  260. package/build/hooks/use_conversation_membership.d.ts +1 -1
  261. package/build/hooks/use_conversation_membership.d.ts.map +1 -1
  262. package/build/hooks/use_conversation_membership.js +2 -2
  263. package/build/hooks/use_conversation_membership.js.map +1 -1
  264. package/build/hooks/use_conversation_message.d.ts +1 -1
  265. package/build/hooks/use_conversation_message.d.ts.map +1 -1
  266. package/build/hooks/use_conversation_message.js +1 -1
  267. package/build/hooks/use_conversation_message.js.map +1 -1
  268. package/build/hooks/use_conversation_messages.d.ts +3 -3
  269. package/build/hooks/use_conversation_messages.d.ts.map +1 -1
  270. package/build/hooks/use_conversation_messages.js +1 -1
  271. package/build/hooks/use_conversation_messages.js.map +1 -1
  272. package/build/hooks/use_conversation_messages_jolt_events.js +8 -8
  273. package/build/hooks/use_conversation_messages_jolt_events.js.map +1 -1
  274. package/build/hooks/use_conversations.d.ts +2 -2
  275. package/build/hooks/use_conversations.d.ts.map +1 -1
  276. package/build/hooks/use_conversations.js +1 -1
  277. package/build/hooks/use_conversations.js.map +1 -1
  278. package/build/hooks/use_conversations_actions.d.ts +19 -19
  279. package/build/hooks/use_conversations_actions.d.ts.map +1 -1
  280. package/build/hooks/use_conversations_actions.js +1 -1
  281. package/build/hooks/use_conversations_actions.js.map +1 -1
  282. package/build/hooks/use_conversations_cache.d.ts +2 -2
  283. package/build/hooks/use_conversations_cache.d.ts.map +1 -1
  284. package/build/hooks/use_conversations_cache.js +2 -2
  285. package/build/hooks/use_conversations_cache.js.map +1 -1
  286. package/build/hooks/use_conversations_jolt_events.js +2 -2
  287. package/build/hooks/use_conversations_jolt_events.js.map +1 -1
  288. package/build/hooks/use_create_android_ripple_color.js +1 -1
  289. package/build/hooks/use_create_android_ripple_color.js.map +1 -1
  290. package/build/hooks/use_current_person.d.ts +1 -1
  291. package/build/hooks/use_current_person.d.ts.map +1 -1
  292. package/build/hooks/use_current_person.js.map +1 -1
  293. package/build/hooks/use_features.d.ts +2 -2
  294. package/build/hooks/use_features.d.ts.map +1 -1
  295. package/build/hooks/use_features.js +2 -2
  296. package/build/hooks/use_features.js.map +1 -1
  297. package/build/hooks/use_font_scale.js +1 -1
  298. package/build/hooks/use_font_scale.js.map +1 -1
  299. package/build/hooks/use_giphy.d.ts +1 -1
  300. package/build/hooks/use_giphy.d.ts.map +1 -1
  301. package/build/hooks/use_giphy.js +1 -1
  302. package/build/hooks/use_giphy.js.map +1 -1
  303. package/build/hooks/use_groups.d.ts +2 -2
  304. package/build/hooks/use_groups.d.ts.map +1 -1
  305. package/build/hooks/use_groups.js.map +1 -1
  306. package/build/hooks/use_groups_groups.d.ts +33 -33
  307. package/build/hooks/use_groups_groups.d.ts.map +1 -1
  308. package/build/hooks/use_groups_groups.js.map +1 -1
  309. package/build/hooks/use_interaction_ghost_color.js +1 -1
  310. package/build/hooks/use_interaction_ghost_color.js.map +1 -1
  311. package/build/hooks/use_jolt.js +2 -2
  312. package/build/hooks/use_jolt.js.map +1 -1
  313. package/build/hooks/use_live_relative_time.d.ts +1 -1
  314. package/build/hooks/use_live_relative_time.d.ts.map +1 -1
  315. package/build/hooks/use_live_relative_time.js +2 -2
  316. package/build/hooks/use_live_relative_time.js.map +1 -1
  317. package/build/hooks/use_mark_latest_message_read.d.ts +1 -1
  318. package/build/hooks/use_mark_latest_message_read.d.ts.map +1 -1
  319. package/build/hooks/use_mark_latest_message_read.js.map +1 -1
  320. package/build/hooks/use_message_create_or_update.d.ts +2 -2
  321. package/build/hooks/use_message_create_or_update.d.ts.map +1 -1
  322. package/build/hooks/use_message_create_or_update.js +7 -7
  323. package/build/hooks/use_message_create_or_update.js.map +1 -1
  324. package/build/hooks/use_message_draft.d.ts +1 -1
  325. package/build/hooks/use_message_draft.d.ts.map +1 -1
  326. package/build/hooks/use_message_draft.js +1 -1
  327. package/build/hooks/use_message_draft.js.map +1 -1
  328. package/build/hooks/use_message_reaction_toggle.d.ts +2 -2
  329. package/build/hooks/use_message_reaction_toggle.d.ts.map +1 -1
  330. package/build/hooks/use_message_reaction_toggle.js +2 -2
  331. package/build/hooks/use_message_reaction_toggle.js.map +1 -1
  332. package/build/hooks/use_my_gender.js.map +1 -1
  333. package/build/hooks/use_organization.d.ts +5 -5
  334. package/build/hooks/use_organization.d.ts.map +1 -1
  335. package/build/hooks/use_organization.js.map +1 -1
  336. package/build/hooks/use_people_person.d.ts +1 -1
  337. package/build/hooks/use_people_person.d.ts.map +1 -1
  338. package/build/hooks/use_people_person.js.map +1 -1
  339. package/build/hooks/use_product_analytics.d.ts +1 -1
  340. package/build/hooks/use_product_analytics.d.ts.map +1 -1
  341. package/build/hooks/use_product_analytics.js +3 -3
  342. package/build/hooks/use_product_analytics.js.map +1 -1
  343. package/build/hooks/use_qualified_by_age.js +1 -1
  344. package/build/hooks/use_qualified_by_age.js.map +1 -1
  345. package/build/hooks/use_read_receipts.d.ts +2 -2
  346. package/build/hooks/use_read_receipts.d.ts.map +1 -1
  347. package/build/hooks/use_read_receipts.js.map +1 -1
  348. package/build/hooks/use_report_message.d.ts +1 -1
  349. package/build/hooks/use_report_message.d.ts.map +1 -1
  350. package/build/hooks/use_report_message.js +1 -1
  351. package/build/hooks/use_report_message.js.map +1 -1
  352. package/build/hooks/use_storage.d.ts +1 -1
  353. package/build/hooks/use_storage.d.ts.map +1 -1
  354. package/build/hooks/use_storage.js.map +1 -1
  355. package/build/hooks/use_submit_age_check.d.ts +1 -1
  356. package/build/hooks/use_submit_age_check.d.ts.map +1 -1
  357. package/build/hooks/use_submit_age_check.js +2 -2
  358. package/build/hooks/use_submit_age_check.js.map +1 -1
  359. package/build/hooks/use_suspense_api.d.ts +5 -5
  360. package/build/hooks/use_suspense_api.d.ts.map +1 -1
  361. package/build/hooks/use_suspense_api.js +2 -2
  362. package/build/hooks/use_suspense_api.js.map +1 -1
  363. package/build/hooks/use_teams.d.ts +1 -1
  364. package/build/hooks/use_teams.d.ts.map +1 -1
  365. package/build/hooks/use_teams.js.map +1 -1
  366. package/build/hooks/use_theme.d.ts +1 -1
  367. package/build/hooks/use_theme.d.ts.map +1 -1
  368. package/build/hooks/use_theme.js +1 -1
  369. package/build/hooks/use_theme.js.map +1 -1
  370. package/build/hooks/use_typing_indicators.d.ts.map +1 -1
  371. package/build/hooks/use_typing_indicators.js +1 -1
  372. package/build/hooks/use_typing_indicators.js.map +1 -1
  373. package/build/hooks/use_typing_status_cache.d.ts +1 -1
  374. package/build/hooks/use_typing_status_cache.d.ts.map +1 -1
  375. package/build/hooks/use_typing_status_cache.js.map +1 -1
  376. package/build/hooks/use_upload_client.d.ts +1 -1
  377. package/build/hooks/use_upload_client.d.ts.map +1 -1
  378. package/build/hooks/use_upload_client.js +3 -3
  379. package/build/hooks/use_upload_client.js.map +1 -1
  380. package/build/navigation/chat_access_gate.js +7 -7
  381. package/build/navigation/chat_access_gate.js.map +1 -1
  382. package/build/navigation/index.d.ts +25 -25
  383. package/build/navigation/index.d.ts.map +1 -1
  384. package/build/navigation/index.js +28 -28
  385. package/build/navigation/index.js.map +1 -1
  386. package/build/navigation/screenLayout.js +2 -2
  387. package/build/navigation/screenLayout.js.map +1 -1
  388. package/build/polyfills/events/Event.js +1 -1
  389. package/build/polyfills/events/Event.js.map +1 -1
  390. package/build/polyfills/events/EventTarget.js +1 -1
  391. package/build/polyfills/events/EventTarget.js.map +1 -1
  392. package/build/polyfills/events/internals/EventInternals.d.ts +2 -2
  393. package/build/polyfills/events/internals/EventInternals.d.ts.map +1 -1
  394. package/build/polyfills/events/internals/EventInternals.js.map +1 -1
  395. package/build/polyfills/events/internals/EventTargetInternals.d.ts +2 -2
  396. package/build/polyfills/events/internals/EventTargetInternals.d.ts.map +1 -1
  397. package/build/polyfills/events/internals/EventTargetInternals.js.map +1 -1
  398. package/build/screens/age_check/age_check_required_screen.d.ts.map +1 -1
  399. package/build/screens/age_check/age_check_required_screen.js +9 -9
  400. package/build/screens/age_check/age_check_required_screen.js.map +1 -1
  401. package/build/screens/age_check/age_check_underage_screen.d.ts.map +1 -1
  402. package/build/screens/age_check/age_check_underage_screen.js +4 -4
  403. package/build/screens/age_check/age_check_underage_screen.js.map +1 -1
  404. package/build/screens/age_check/components/age_check_select_birthdate_modal.d.ts.map +1 -1
  405. package/build/screens/age_check/components/age_check_select_birthdate_modal.js +4 -4
  406. package/build/screens/age_check/components/age_check_select_birthdate_modal.js.map +1 -1
  407. package/build/screens/attachment_actions/attachment_actions_screen.js +1 -1
  408. package/build/screens/attachment_actions/attachment_actions_screen.js.map +1 -1
  409. package/build/screens/attachment_actions/hooks/useDeleteAttachment.js +4 -4
  410. package/build/screens/attachment_actions/hooks/useDeleteAttachment.js.map +1 -1
  411. package/build/screens/bug_report_screen.d.ts +1 -1
  412. package/build/screens/bug_report_screen.d.ts.map +1 -1
  413. package/build/screens/bug_report_screen.js +13 -13
  414. package/build/screens/bug_report_screen.js.map +1 -1
  415. package/build/screens/conversation/message_read_receipts_screen.js +5 -5
  416. package/build/screens/conversation/message_read_receipts_screen.js.map +1 -1
  417. package/build/screens/conversation_details_screen.d.ts.map +1 -1
  418. package/build/screens/conversation_details_screen.js +37 -9
  419. package/build/screens/conversation_details_screen.js.map +1 -1
  420. package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts +1 -1
  421. package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts.map +1 -1
  422. package/build/screens/conversation_filter_recipients/components/checkbox_row.js +4 -4
  423. package/build/screens/conversation_filter_recipients/components/checkbox_row.js.map +1 -1
  424. package/build/screens/conversation_filter_recipients/components/header_row.d.ts +1 -1
  425. package/build/screens/conversation_filter_recipients/components/header_row.d.ts.map +1 -1
  426. package/build/screens/conversation_filter_recipients/components/header_row.js +5 -5
  427. package/build/screens/conversation_filter_recipients/components/header_row.js.map +1 -1
  428. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts.map +1 -1
  429. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js +6 -6
  430. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js.map +1 -1
  431. package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.d.ts +1 -1
  432. package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.d.ts.map +1 -1
  433. package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.js +1 -1
  434. package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.js.map +1 -1
  435. package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.d.ts +22 -22
  436. package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.d.ts.map +1 -1
  437. package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.js +2 -2
  438. package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.js.map +1 -1
  439. package/build/screens/conversation_filter_recipients/types.d.ts +2 -2
  440. package/build/screens/conversation_filter_recipients/types.d.ts.map +1 -1
  441. package/build/screens/conversation_filter_recipients/types.js.map +1 -1
  442. package/build/screens/conversation_filters/components/conversation_filters.d.ts.map +1 -1
  443. package/build/screens/conversation_filters/components/conversation_filters.js +5 -5
  444. package/build/screens/conversation_filters/components/conversation_filters.js.map +1 -1
  445. package/build/screens/conversation_filters/components/rows.d.ts +4 -4
  446. package/build/screens/conversation_filters/components/rows.d.ts.map +1 -1
  447. package/build/screens/conversation_filters/components/rows.js +5 -5
  448. package/build/screens/conversation_filters/components/rows.js.map +1 -1
  449. package/build/screens/conversation_filters/context/conversation_filter_context.d.ts +1 -1
  450. package/build/screens/conversation_filters/context/conversation_filter_context.d.ts.map +1 -1
  451. package/build/screens/conversation_filters/context/conversation_filter_context.js +2 -2
  452. package/build/screens/conversation_filters/context/conversation_filter_context.js.map +1 -1
  453. package/build/screens/conversation_filters/group_filters.d.ts +1 -1
  454. package/build/screens/conversation_filters/group_filters.d.ts.map +1 -1
  455. package/build/screens/conversation_filters/group_filters.js +2 -2
  456. package/build/screens/conversation_filters/group_filters.js.map +1 -1
  457. package/build/screens/conversation_filters/hooks/filters.d.ts +54 -54
  458. package/build/screens/conversation_filters/hooks/filters.d.ts.map +1 -1
  459. package/build/screens/conversation_filters/hooks/filters.js +3 -3
  460. package/build/screens/conversation_filters/hooks/filters.js.map +1 -1
  461. package/build/screens/conversation_filters/screen_props.d.ts +1 -1
  462. package/build/screens/conversation_filters/screen_props.d.ts.map +1 -1
  463. package/build/screens/conversation_filters/screen_props.js.map +1 -1
  464. package/build/screens/conversation_filters/team_filters.d.ts.map +1 -1
  465. package/build/screens/conversation_filters/team_filters.js +1 -1
  466. package/build/screens/conversation_filters/team_filters.js.map +1 -1
  467. package/build/screens/conversation_filters_screen.js +2 -2
  468. package/build/screens/conversation_filters_screen.js.map +1 -1
  469. package/build/screens/conversation_new/components/filter_by_plan.d.ts.map +1 -1
  470. package/build/screens/conversation_new/components/filter_by_plan.js +8 -8
  471. package/build/screens/conversation_new/components/filter_by_plan.js.map +1 -1
  472. package/build/screens/conversation_new/components/form_list.d.ts +1 -1
  473. package/build/screens/conversation_new/components/form_list.d.ts.map +1 -1
  474. package/build/screens/conversation_new/components/form_list.js +2 -2
  475. package/build/screens/conversation_new/components/form_list.js.map +1 -1
  476. package/build/screens/conversation_new/components/gender_filter_toggle.js +3 -3
  477. package/build/screens/conversation_new/components/gender_filter_toggle.js.map +1 -1
  478. package/build/screens/conversation_new/components/groups_form.d.ts +1 -1
  479. package/build/screens/conversation_new/components/groups_form.d.ts.map +1 -1
  480. package/build/screens/conversation_new/components/groups_form.js +10 -10
  481. package/build/screens/conversation_new/components/groups_form.js.map +1 -1
  482. package/build/screens/conversation_new/components/services_form.d.ts +1 -1
  483. package/build/screens/conversation_new/components/services_form.d.ts.map +1 -1
  484. package/build/screens/conversation_new/components/services_form.js +10 -10
  485. package/build/screens/conversation_new/components/services_form.js.map +1 -1
  486. package/build/screens/conversation_new/components/source_app_error_card.js +1 -1
  487. package/build/screens/conversation_new/components/source_app_error_card.js.map +1 -1
  488. package/build/screens/conversation_new/conversation_new_screen.d.ts +3 -3
  489. package/build/screens/conversation_new/conversation_new_screen.d.ts.map +1 -1
  490. package/build/screens/conversation_new/conversation_new_screen.js.map +1 -1
  491. package/build/screens/conversation_notification_level_select_screen.js +5 -5
  492. package/build/screens/conversation_notification_level_select_screen.js.map +1 -1
  493. package/build/screens/conversation_screen.d.ts +3 -3
  494. package/build/screens/conversation_screen.d.ts.map +1 -1
  495. package/build/screens/conversation_screen.js +21 -21
  496. package/build/screens/conversation_screen.js.map +1 -1
  497. package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts +1 -1
  498. package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts.map +1 -1
  499. package/build/screens/conversation_select_recipients/components/groups_recipient_row.js +1 -1
  500. package/build/screens/conversation_select_recipients/components/groups_recipient_row.js.map +1 -1
  501. package/build/screens/conversation_select_recipients/components/recipient_link_row.js +3 -3
  502. package/build/screens/conversation_select_recipients/components/recipient_link_row.js.map +1 -1
  503. package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts +1 -1
  504. package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts.map +1 -1
  505. package/build/screens/conversation_select_recipients/components/restricted_group_row.js +3 -3
  506. package/build/screens/conversation_select_recipients/components/restricted_group_row.js.map +1 -1
  507. package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts +1 -1
  508. package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts.map +1 -1
  509. package/build/screens/conversation_select_recipients/components/team_recipient_row.js +1 -1
  510. package/build/screens/conversation_select_recipients/components/team_recipient_row.js.map +1 -1
  511. package/build/screens/conversation_select_recipients/components/view_more_link_row.js +1 -1
  512. package/build/screens/conversation_select_recipients/components/view_more_link_row.js.map +1 -1
  513. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts.map +1 -1
  514. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js +4 -4
  515. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js.map +1 -1
  516. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts.map +1 -1
  517. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js +2 -2
  518. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js.map +1 -1
  519. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts.map +1 -1
  520. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js +4 -4
  521. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js.map +1 -1
  522. package/build/screens/conversation_select_recipients/types/screen_props.d.ts +2 -2
  523. package/build/screens/conversation_select_recipients/types/screen_props.d.ts.map +1 -1
  524. package/build/screens/conversation_select_recipients/types/screen_props.js.map +1 -1
  525. package/build/screens/conversation_select_type_screen.d.ts +3 -3
  526. package/build/screens/conversation_select_type_screen.d.ts.map +1 -1
  527. package/build/screens/conversation_select_type_screen.js +3 -3
  528. package/build/screens/conversation_select_type_screen.js.map +1 -1
  529. package/build/screens/conversations/components/chat_group_badge.js +2 -2
  530. package/build/screens/conversations/components/chat_group_badge.js.map +1 -1
  531. package/build/screens/conversations/components/list_header_action_button.d.ts +1 -1
  532. package/build/screens/conversations/components/list_header_action_button.d.ts.map +1 -1
  533. package/build/screens/conversations/components/list_header_action_button.js +4 -4
  534. package/build/screens/conversations/components/list_header_action_button.js.map +1 -1
  535. package/build/screens/conversations/components/list_header_component.js +9 -9
  536. package/build/screens/conversations/components/list_header_component.js.map +1 -1
  537. package/build/screens/conversations/conversations_screen.d.ts +2 -2
  538. package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
  539. package/build/screens/conversations/conversations_screen.js +3 -3
  540. package/build/screens/conversations/conversations_screen.js.map +1 -1
  541. package/build/screens/design_system_screen.js +6 -6
  542. package/build/screens/design_system_screen.js.map +1 -1
  543. package/build/screens/get_help_screen.js +4 -4
  544. package/build/screens/get_help_screen.js.map +1 -1
  545. package/build/screens/group_notification_level_select_screen.js +3 -3
  546. package/build/screens/group_notification_level_select_screen.js.map +1 -1
  547. package/build/screens/group_notification_settings_screen.js +3 -3
  548. package/build/screens/group_notification_settings_screen.js.map +1 -1
  549. package/build/screens/message_actions_screen.js +10 -10
  550. package/build/screens/message_actions_screen.js.map +1 -1
  551. package/build/screens/message_report/components/message_preview.d.ts +1 -1
  552. package/build/screens/message_report/components/message_preview.d.ts.map +1 -1
  553. package/build/screens/message_report/components/message_preview.js +2 -2
  554. package/build/screens/message_report/components/message_preview.js.map +1 -1
  555. package/build/screens/message_report/components/report_reason_list.d.ts +1 -1
  556. package/build/screens/message_report/components/report_reason_list.d.ts.map +1 -1
  557. package/build/screens/message_report/components/report_reason_list.js +5 -5
  558. package/build/screens/message_report/components/report_reason_list.js.map +1 -1
  559. package/build/screens/message_report_screen.d.ts +2 -2
  560. package/build/screens/message_report_screen.d.ts.map +1 -1
  561. package/build/screens/message_report_screen.js +8 -8
  562. package/build/screens/message_report_screen.js.map +1 -1
  563. package/build/screens/not_found.d.ts.map +1 -1
  564. package/build/screens/not_found.js +1 -1
  565. package/build/screens/not_found.js.map +1 -1
  566. package/build/screens/notification_settings/hooks/groups.d.ts +7 -7
  567. package/build/screens/notification_settings/hooks/groups.d.ts.map +1 -1
  568. package/build/screens/notification_settings/hooks/groups.js +4 -4
  569. package/build/screens/notification_settings/hooks/groups.js.map +1 -1
  570. package/build/screens/notification_settings_screen.js +4 -4
  571. package/build/screens/notification_settings_screen.js.map +1 -1
  572. package/build/screens/preferred_app/hooks/use_chat_types.d.ts +5 -5
  573. package/build/screens/preferred_app/hooks/use_chat_types.d.ts.map +1 -1
  574. package/build/screens/preferred_app/hooks/use_chat_types.js +1 -1
  575. package/build/screens/preferred_app/hooks/use_chat_types.js.map +1 -1
  576. package/build/screens/preferred_app_selection_screen.d.ts.map +1 -1
  577. package/build/screens/preferred_app_selection_screen.js +7 -7
  578. package/build/screens/preferred_app_selection_screen.js.map +1 -1
  579. package/build/screens/reactions_screen.js +7 -7
  580. package/build/screens/reactions_screen.js.map +1 -1
  581. package/build/screens/send_giphy_screen.js +8 -8
  582. package/build/screens/send_giphy_screen.js.map +1 -1
  583. package/build/screens/team_conversation_screen.js +3 -3
  584. package/build/screens/team_conversation_screen.js.map +1 -1
  585. package/build/types/jolt_events/message_events.d.ts +1 -1
  586. package/build/types/jolt_events/message_events.d.ts.map +1 -1
  587. package/build/types/jolt_events/message_events.js.map +1 -1
  588. package/build/types/jolt_events/reaction_events.d.ts +1 -1
  589. package/build/types/jolt_events/reaction_events.d.ts.map +1 -1
  590. package/build/types/jolt_events/reaction_events.js.map +1 -1
  591. package/build/types/resources/app_grant.d.ts +1 -1
  592. package/build/types/resources/app_grant.d.ts.map +1 -1
  593. package/build/types/resources/app_grant.js.map +1 -1
  594. package/build/types/resources/conversation.d.ts +1 -0
  595. package/build/types/resources/conversation.d.ts.map +1 -1
  596. package/build/types/resources/conversation.js.map +1 -1
  597. package/build/types/resources/conversation_membership.d.ts +1 -1
  598. package/build/types/resources/conversation_membership.d.ts.map +1 -1
  599. package/build/types/resources/conversation_membership.js.map +1 -1
  600. package/build/types/resources/group_membership.d.ts +1 -1
  601. package/build/types/resources/group_membership.d.ts.map +1 -1
  602. package/build/types/resources/group_membership.js.map +1 -1
  603. package/build/types/resources/groups/groups_group_resource.d.ts +1 -1
  604. package/build/types/resources/groups/groups_group_resource.d.ts.map +1 -1
  605. package/build/types/resources/groups/groups_group_resource.js.map +1 -1
  606. package/build/types/resources/organization.d.ts +1 -1
  607. package/build/types/resources/organization.d.ts.map +1 -1
  608. package/build/types/resources/organization.js.map +1 -1
  609. package/build/types/resources/person.d.ts +1 -1
  610. package/build/types/resources/person.d.ts.map +1 -1
  611. package/build/types/resources/person.js.map +1 -1
  612. package/build/types/resources/services/chat_resource.d.ts +1 -1
  613. package/build/types/resources/services/chat_resource.d.ts.map +1 -1
  614. package/build/types/resources/services/chat_resource.js.map +1 -1
  615. package/build/types/resources/services/team_resource.d.ts +1 -1
  616. package/build/types/resources/services/team_resource.d.ts.map +1 -1
  617. package/build/types/resources/services/team_resource.js.map +1 -1
  618. package/build/utils/cache/messages_cache.d.ts +3 -3
  619. package/build/utils/cache/messages_cache.d.ts.map +1 -1
  620. package/build/utils/cache/messages_cache.js +4 -4
  621. package/build/utils/cache/messages_cache.js.map +1 -1
  622. package/build/utils/cache/optimistically_create_message.d.ts +2 -2
  623. package/build/utils/cache/optimistically_create_message.d.ts.map +1 -1
  624. package/build/utils/cache/optimistically_create_message.js +4 -4
  625. package/build/utils/cache/optimistically_create_message.js.map +1 -1
  626. package/build/utils/cache/optimistically_update_message.d.ts +1 -1
  627. package/build/utils/cache/optimistically_update_message.d.ts.map +1 -1
  628. package/build/utils/cache/optimistically_update_message.js +2 -2
  629. package/build/utils/cache/optimistically_update_message.js.map +1 -1
  630. package/build/utils/cache/page_mutations.d.ts +5 -5
  631. package/build/utils/cache/page_mutations.d.ts.map +1 -1
  632. package/build/utils/cache/page_mutations.js.map +1 -1
  633. package/build/utils/client/client.d.ts +1 -1
  634. package/build/utils/client/client.d.ts.map +1 -1
  635. package/build/utils/client/client.js.map +1 -1
  636. package/build/utils/client/transform_request_data.d.ts.map +1 -1
  637. package/build/utils/client/transform_request_data.js.map +1 -1
  638. package/build/utils/convert_attachments_for_create.d.ts +2 -2
  639. package/build/utils/convert_attachments_for_create.d.ts.map +1 -1
  640. package/build/utils/convert_attachments_for_create.js.map +1 -1
  641. package/build/utils/destructure_chat_group_graph_id.d.ts +2 -2
  642. package/build/utils/destructure_chat_group_graph_id.d.ts.map +1 -1
  643. package/build/utils/destructure_chat_group_graph_id.js.map +1 -1
  644. package/build/utils/jolt/transform_message_event_data_to_message_resource.d.ts +2 -2
  645. package/build/utils/jolt/transform_message_event_data_to_message_resource.d.ts.map +1 -1
  646. package/build/utils/jolt/transform_message_event_data_to_message_resource.js +1 -1
  647. package/build/utils/jolt/transform_message_event_data_to_message_resource.js.map +1 -1
  648. package/build/utils/jolt/transform_reaction_event_data_to_reaction_count_resource.d.ts +3 -3
  649. package/build/utils/jolt/transform_reaction_event_data_to_reaction_count_resource.d.ts.map +1 -1
  650. package/build/utils/jolt/transform_reaction_event_data_to_reaction_count_resource.js.map +1 -1
  651. package/build/utils/native_adapters/configuration.d.ts +3 -3
  652. package/build/utils/native_adapters/configuration.d.ts.map +1 -1
  653. package/build/utils/native_adapters/configuration.js +5 -5
  654. package/build/utils/native_adapters/configuration.js.map +1 -1
  655. package/build/utils/performance_tracking.d.ts +1 -1
  656. package/build/utils/performance_tracking.d.ts.map +1 -1
  657. package/build/utils/performance_tracking.js +1 -1
  658. package/build/utils/performance_tracking.js.map +1 -1
  659. package/build/utils/reaction_constants.d.ts +1 -1
  660. package/build/utils/reaction_constants.d.ts.map +1 -1
  661. package/build/utils/reaction_constants.js.map +1 -1
  662. package/build/utils/request/conversation.d.ts +2 -2
  663. package/build/utils/request/conversation.d.ts.map +1 -1
  664. package/build/utils/request/conversation.js.map +1 -1
  665. package/build/utils/request/get_features.d.ts +1 -1
  666. package/build/utils/request/get_features.d.ts.map +1 -1
  667. package/build/utils/request/get_features.js +1 -1
  668. package/build/utils/request/get_features.js.map +1 -1
  669. package/build/utils/request/get_message.d.ts +1 -1
  670. package/build/utils/request/get_message.d.ts.map +1 -1
  671. package/build/utils/request/get_message.js +1 -1
  672. package/build/utils/request/get_message.js.map +1 -1
  673. package/build/utils/request/get_messages.d.ts +1 -1
  674. package/build/utils/request/get_messages.d.ts.map +1 -1
  675. package/build/utils/request/get_messages.js +1 -1
  676. package/build/utils/request/get_messages.js.map +1 -1
  677. package/build/utils/response_error.d.ts +1 -1
  678. package/build/utils/response_error.d.ts.map +1 -1
  679. package/build/utils/response_error.js.map +1 -1
  680. package/build/utils/session.d.ts +1 -1
  681. package/build/utils/session.d.ts.map +1 -1
  682. package/build/utils/session.js.map +1 -1
  683. package/build/utils/session_manager.d.ts +1 -1
  684. package/build/utils/session_manager.d.ts.map +1 -1
  685. package/build/utils/session_manager.js.map +1 -1
  686. package/build/utils/styles.js +1 -1
  687. package/build/utils/styles.js.map +1 -1
  688. package/build/utils/theme.d.ts +1 -1
  689. package/build/utils/theme.d.ts.map +1 -1
  690. package/build/utils/theme.js +2 -2
  691. package/build/utils/theme.js.map +1 -1
  692. package/package.json +3 -2
  693. package/src/__tests__/contexts/session_context.tsx +7 -7
  694. package/src/__tests__/event-polyfill.test.ts +3 -4
  695. package/src/__tests__/hooks/useTheme.tsx +3 -3
  696. package/src/__tests__/hooks/use_async_storage.test.tsx +3 -3
  697. package/src/__tests__/hooks/use_conversation_messages.ts +2 -2
  698. package/src/__tests__/hooks/use_font_scale.test.ts +1 -1
  699. package/src/__tests__/utils/cache/page_mutations.ts +1 -1
  700. package/src/__tests__/utils/client.ts +5 -5
  701. package/src/__tests__/utils/native_adapters/configuration.ts +4 -4
  702. package/src/__tests__/utils/parse_simple_markdown.ts +1 -1
  703. package/src/__tests__/utils/pluralize.tsx +1 -1
  704. package/src/__tests__/utils/session.ts +2 -2
  705. package/src/__tests__/utils/uri.ts +1 -1
  706. package/src/__utils__/handlers.ts +1 -1
  707. package/src/components/conversation/attachments/attachment_card.tsx +3 -3
  708. package/src/components/conversation/attachments/attachment_deleting_overlay.tsx +2 -2
  709. package/src/components/conversation/attachments/audio_attachment.tsx +5 -5
  710. package/src/components/conversation/attachments/expanded_link.tsx +5 -5
  711. package/src/components/conversation/attachments/generic_file_attachment.tsx +6 -6
  712. package/src/components/conversation/attachments/giphy_attachment.tsx +6 -6
  713. package/src/components/conversation/attachments/image_attachment.tsx +9 -9
  714. package/src/components/conversation/attachments/video_attachment.tsx +7 -7
  715. package/src/components/conversation/empty_conversation_blank_state.tsx +1 -1
  716. package/src/components/conversation/jump_to_bottom_button.tsx +3 -3
  717. package/src/components/conversation/message.tsx +21 -21
  718. package/src/components/conversation/message_attachments.tsx +8 -8
  719. package/src/components/conversation/message_form/message_form_attachment_image.tsx +2 -2
  720. package/src/components/conversation/message_form/message_form_attachment_video.tsx +2 -2
  721. package/src/components/conversation/message_form.tsx +21 -23
  722. package/src/components/conversation/message_markdown.tsx +3 -3
  723. package/src/components/conversation/message_reaction.tsx +8 -8
  724. package/src/components/conversation/message_read_receipts.tsx +3 -3
  725. package/src/components/conversation/messages_disabled_banners.tsx +2 -2
  726. package/src/components/conversation/reply_connectors.tsx +3 -3
  727. package/src/components/conversation/reply_shadow_message.tsx +12 -12
  728. package/src/components/conversation/typing_indicator.tsx +3 -3
  729. package/src/components/conversations/conversation_actions.tsx +6 -9
  730. package/src/components/conversations/conversation_preview.tsx +5 -10
  731. package/src/components/conversations/conversations.tsx +6 -6
  732. package/src/components/conversations/mute_indicator.tsx +3 -3
  733. package/src/components/conversations/swipeable_toggle_button.tsx +5 -5
  734. package/src/components/conversations/unread_count_badge.tsx +3 -3
  735. package/src/components/display/action_button.tsx +5 -5
  736. package/src/components/display/avatar.tsx +2 -2
  737. package/src/components/display/avatar_group.tsx +2 -2
  738. package/src/components/display/badge.tsx +3 -3
  739. package/src/components/display/banner.tsx +2 -2
  740. package/src/components/display/banner_collapsible.tsx +1 -1
  741. package/src/components/display/button.tsx +3 -3
  742. package/src/components/display/child_notice.tsx +4 -4
  743. package/src/components/display/heading.tsx +3 -3
  744. package/src/components/display/icon.tsx +7 -8
  745. package/src/components/display/icon_button.tsx +2 -2
  746. package/src/components/display/image.tsx +1 -1
  747. package/src/components/display/image_attachment_preview.tsx +4 -4
  748. package/src/components/display/keyboard_view.tsx +1 -1
  749. package/src/components/display/person.tsx +3 -3
  750. package/src/components/display/platform_modal_header_buttons.tsx +4 -4
  751. package/src/components/display/pressable_row.tsx +1 -1
  752. package/src/components/display/spinner.tsx +1 -1
  753. package/src/components/display/switch.tsx +1 -1
  754. package/src/components/display/tabs.tsx +1 -1
  755. package/src/components/display/text.tsx +2 -2
  756. package/src/components/display/text_button.tsx +2 -2
  757. package/src/components/display/text_inline_button.tsx +3 -3
  758. package/src/components/display/toggle_button.tsx +5 -5
  759. package/src/components/display/utils/button_colors.ts +1 -1
  760. package/src/components/display/utils/status_colors.ts +1 -1
  761. package/src/components/display/video_attachment_preview.tsx +5 -5
  762. package/src/components/group_conversation_list.tsx +3 -3
  763. package/src/components/page/error_boundary.tsx +2 -2
  764. package/src/components/page/loading.tsx +1 -1
  765. package/src/components/primitive/avatar_primitive.tsx +5 -5
  766. package/src/components/primitive/banner_primitive.tsx +8 -8
  767. package/src/components/primitive/blank_state_primitive.tsx +2 -2
  768. package/src/components/primitive/form_sheet.tsx +4 -4
  769. package/src/components/safe_area_modal.tsx +1 -1
  770. package/src/contexts/api_provider.tsx +4 -4
  771. package/src/contexts/chat_context.tsx +7 -7
  772. package/src/contexts/conversations_context.tsx +4 -4
  773. package/src/contexts/session_context.tsx +9 -9
  774. package/src/hooks/groups/use_group_members_for_new_conversation.ts +4 -4
  775. package/src/hooks/groups/use_groups_conversation_create.ts +3 -3
  776. package/src/hooks/services/use_find_or_create_services_conversation.ts +4 -4
  777. package/src/hooks/services/use_services_team.ts +2 -2
  778. package/src/hooks/services/use_team_members_for_new_conversation.ts +2 -2
  779. package/src/hooks/services/use_team_plans.ts +3 -3
  780. package/src/hooks/use_api.ts +2 -2
  781. package/src/hooks/use_api_client.ts +3 -3
  782. package/src/hooks/use_async_storage.ts +1 -1
  783. package/src/hooks/use_attachment_uploader.ts +3 -3
  784. package/src/hooks/use_broadcast_typing_status.ts +1 -1
  785. package/src/hooks/use_chat_permissions.ts +1 -1
  786. package/src/hooks/use_conversation.ts +5 -4
  787. package/src/hooks/use_conversation_jolt_events.ts +3 -3
  788. package/src/hooks/use_conversation_membership.ts +3 -3
  789. package/src/hooks/use_conversation_message.ts +2 -2
  790. package/src/hooks/use_conversation_messages.ts +2 -2
  791. package/src/hooks/use_conversation_messages_jolt_events.ts +14 -14
  792. package/src/hooks/use_conversations.ts +2 -2
  793. package/src/hooks/use_conversations_actions.ts +2 -2
  794. package/src/hooks/use_conversations_cache.ts +5 -5
  795. package/src/hooks/use_conversations_jolt_events.ts +4 -4
  796. package/src/hooks/use_create_android_ripple_color.ts +1 -1
  797. package/src/hooks/use_current_person.ts +2 -2
  798. package/src/hooks/use_features.ts +4 -4
  799. package/src/hooks/use_font_scale.ts +1 -1
  800. package/src/hooks/use_giphy.ts +2 -2
  801. package/src/hooks/use_groups.ts +2 -2
  802. package/src/hooks/use_groups_groups.ts +1 -1
  803. package/src/hooks/use_interaction_ghost_color.ts +1 -1
  804. package/src/hooks/use_jolt.ts +3 -3
  805. package/src/hooks/use_live_relative_time.ts +2 -2
  806. package/src/hooks/use_mark_latest_message_read.ts +1 -1
  807. package/src/hooks/use_message_create_or_update.ts +10 -10
  808. package/src/hooks/use_message_draft.ts +2 -2
  809. package/src/hooks/use_message_reaction_toggle.ts +4 -4
  810. package/src/hooks/use_my_gender.ts +1 -1
  811. package/src/hooks/use_organization.ts +2 -2
  812. package/src/hooks/use_people_person.ts +1 -1
  813. package/src/hooks/use_product_analytics.ts +5 -5
  814. package/src/hooks/use_qualified_by_age.ts +1 -1
  815. package/src/hooks/use_read_receipts.ts +1 -1
  816. package/src/hooks/use_report_message.ts +2 -2
  817. package/src/hooks/use_storage.ts +1 -1
  818. package/src/hooks/use_submit_age_check.ts +3 -3
  819. package/src/hooks/use_suspense_api.ts +5 -5
  820. package/src/hooks/use_teams.ts +1 -1
  821. package/src/hooks/use_theme.tsx +2 -2
  822. package/src/hooks/use_typing_indicators.ts +2 -2
  823. package/src/hooks/use_typing_status_cache.ts +1 -1
  824. package/src/hooks/use_upload_client.ts +3 -3
  825. package/src/navigation/chat_access_gate.tsx +7 -7
  826. package/src/navigation/index.tsx +34 -37
  827. package/src/navigation/screenLayout.tsx +2 -2
  828. package/src/polyfills/events/Event.ts +1 -1
  829. package/src/polyfills/events/EventTarget.ts +1 -1
  830. package/src/polyfills/events/internals/EventInternals.ts +2 -2
  831. package/src/polyfills/events/internals/EventTargetInternals.ts +2 -2
  832. package/src/screens/age_check/age_check_required_screen.tsx +9 -9
  833. package/src/screens/age_check/age_check_underage_screen.tsx +4 -4
  834. package/src/screens/age_check/components/age_check_select_birthdate_modal.tsx +4 -4
  835. package/src/screens/attachment_actions/attachment_actions_screen.tsx +1 -1
  836. package/src/screens/attachment_actions/hooks/useDeleteAttachment.tsx +4 -4
  837. package/src/screens/bug_report_screen.tsx +18 -18
  838. package/src/screens/conversation/message_read_receipts_screen.tsx +6 -6
  839. package/src/screens/conversation_details_screen.tsx +47 -13
  840. package/src/screens/conversation_filter_recipients/components/checkbox_row.tsx +9 -5
  841. package/src/screens/conversation_filter_recipients/components/header_row.tsx +6 -6
  842. package/src/screens/conversation_filter_recipients/conversation_filter_recipients_screen.tsx +6 -6
  843. package/src/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.tsx +5 -1
  844. package/src/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.ts +6 -3
  845. package/src/screens/conversation_filter_recipients/types.tsx +2 -2
  846. package/src/screens/conversation_filters/components/conversation_filters.tsx +8 -5
  847. package/src/screens/conversation_filters/components/rows.tsx +9 -14
  848. package/src/screens/conversation_filters/context/conversation_filter_context.tsx +6 -3
  849. package/src/screens/conversation_filters/group_filters.tsx +4 -4
  850. package/src/screens/conversation_filters/hooks/filters.ts +5 -5
  851. package/src/screens/conversation_filters/screen_props.ts +1 -1
  852. package/src/screens/conversation_filters/team_filters.tsx +1 -1
  853. package/src/screens/conversation_filters_screen.tsx +2 -2
  854. package/src/screens/conversation_new/components/filter_by_plan.tsx +8 -8
  855. package/src/screens/conversation_new/components/form_list.tsx +3 -3
  856. package/src/screens/conversation_new/components/gender_filter_toggle.tsx +3 -3
  857. package/src/screens/conversation_new/components/groups_form.tsx +14 -14
  858. package/src/screens/conversation_new/components/services_form.tsx +12 -12
  859. package/src/screens/conversation_new/components/source_app_error_card.tsx +1 -1
  860. package/src/screens/conversation_new/conversation_new_screen.tsx +3 -3
  861. package/src/screens/conversation_notification_level_select_screen.tsx +6 -6
  862. package/src/screens/conversation_screen.tsx +23 -23
  863. package/src/screens/conversation_select_recipients/components/groups_recipient_row.tsx +2 -2
  864. package/src/screens/conversation_select_recipients/components/recipient_link_row.tsx +3 -3
  865. package/src/screens/conversation_select_recipients/components/restricted_group_row.tsx +4 -4
  866. package/src/screens/conversation_select_recipients/components/team_recipient_row.tsx +2 -2
  867. package/src/screens/conversation_select_recipients/components/view_more_link_row.tsx +1 -1
  868. package/src/screens/conversation_select_recipients/conversation_new_entry_screen.tsx +4 -4
  869. package/src/screens/conversation_select_recipients/conversation_select_group_recipients_screen.tsx +4 -4
  870. package/src/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.tsx +8 -5
  871. package/src/screens/conversation_select_recipients/types/screen_props.tsx +2 -2
  872. package/src/screens/conversation_select_type_screen.tsx +5 -5
  873. package/src/screens/conversations/components/chat_group_badge.tsx +4 -4
  874. package/src/screens/conversations/components/list_header_action_button.tsx +4 -4
  875. package/src/screens/conversations/components/list_header_component.tsx +10 -10
  876. package/src/screens/conversations/conversations_screen.tsx +5 -5
  877. package/src/screens/design_system_screen.tsx +6 -6
  878. package/src/screens/get_help_screen.tsx +5 -5
  879. package/src/screens/group_notification_level_select_screen.tsx +3 -3
  880. package/src/screens/group_notification_settings_screen.tsx +4 -4
  881. package/src/screens/message_actions_screen.tsx +12 -12
  882. package/src/screens/message_report/components/message_preview.tsx +3 -3
  883. package/src/screens/message_report/components/report_reason_list.tsx +5 -8
  884. package/src/screens/message_report_screen.tsx +15 -15
  885. package/src/screens/not_found.tsx +1 -1
  886. package/src/screens/notification_settings/hooks/groups.ts +6 -6
  887. package/src/screens/notification_settings_screen.tsx +4 -4
  888. package/src/screens/preferred_app/hooks/use_chat_types.ts +2 -2
  889. package/src/screens/preferred_app_selection_screen.tsx +7 -7
  890. package/src/screens/reactions_screen.tsx +9 -9
  891. package/src/screens/send_giphy_screen.tsx +8 -8
  892. package/src/screens/team_conversation_screen.tsx +3 -3
  893. package/src/types/jolt_events/message_events.ts +1 -1
  894. package/src/types/jolt_events/reaction_events.ts +1 -1
  895. package/src/types/resources/app_grant.ts +1 -1
  896. package/src/types/resources/conversation.ts +1 -0
  897. package/src/types/resources/conversation_membership.ts +1 -1
  898. package/src/types/resources/group_membership.ts +1 -1
  899. package/src/types/resources/groups/groups_group_resource.ts +1 -1
  900. package/src/types/resources/organization.ts +1 -1
  901. package/src/types/resources/person.ts +1 -1
  902. package/src/types/resources/services/chat_resource.ts +1 -1
  903. package/src/types/resources/services/team_resource.ts +1 -1
  904. package/src/utils/__tests__/convert_attachments_for_create.test.ts +3 -3
  905. package/src/utils/__tests__/session_manager.test.ts +3 -3
  906. package/src/utils/__tests__/sha_256.test.ts +1 -1
  907. package/src/utils/cache/messages_cache.ts +6 -6
  908. package/src/utils/cache/optimistically_create_message.ts +7 -7
  909. package/src/utils/cache/optimistically_update_message.ts +3 -3
  910. package/src/utils/cache/page_mutations.ts +1 -1
  911. package/src/utils/client/client.ts +1 -2
  912. package/src/utils/client/transform_request_data.ts +1 -1
  913. package/src/utils/convert_attachments_for_create.ts +2 -2
  914. package/src/utils/destructure_chat_group_graph_id.ts +2 -2
  915. package/src/utils/jolt/transform_message_event_data_to_message_resource.ts +4 -4
  916. package/src/utils/jolt/transform_reaction_event_data_to_reaction_count_resource.ts +3 -3
  917. package/src/utils/native_adapters/configuration.ts +5 -5
  918. package/src/utils/performance_tracking.ts +2 -2
  919. package/src/utils/reaction_constants.ts +1 -1
  920. package/src/utils/request/conversation.ts +2 -2
  921. package/src/utils/request/get_features.ts +1 -1
  922. package/src/utils/request/get_message.ts +1 -1
  923. package/src/utils/request/get_messages.ts +1 -1
  924. package/src/utils/response_error.ts +1 -1
  925. package/src/utils/session.ts +1 -1
  926. package/src/utils/session_manager.ts +1 -1
  927. package/src/utils/styles.ts +1 -1
  928. package/src/utils/theme.ts +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"platform_modal_header_buttons.d.ts","sourceRoot":"","sources":["../../../src/components/display/platform_modal_header_buttons.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAwB,MAAM,cAAc,CAAA;AAK/D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAA;AAEjF,UAAU,qBAAqB;IAC7B,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,eAAO,MAAM,gBAAgB,iCAI1B,qBAAqB,gCAavB,CAAA;AAED,UAAU,wBAAwB;IAChC,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,UAAU,CAAA;CACvB;AAED,eAAO,MAAM,mBAAmB,4CAK7B,wBAAwB,gCAoB1B,CAAA;AAED,UAAU,qBAAsB,SAAQ,2BAA2B;IACjE,UAAU,EAAE;QAAE,MAAM,EAAE,MAAM,IAAI,CAAC;QAAC,QAAQ,EAAE,MAAM,GAAG,CAAA;KAAE,CAAA;CACxD;AAED,eAAO,MAAM,gBAAgB,6BAA8B,qBAAqB,uCAS/E,CAAA"}
1
+ {"version":3,"file":"platform_modal_header_buttons.d.ts","sourceRoot":"","sources":["../../../src/components/display/platform_modal_header_buttons.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAA;AACjF,OAAO,EAAE,UAAU,EAAwB,MAAM,cAAc,CAAA;AAK/D,UAAU,qBAAqB;IAC7B,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,eAAO,MAAM,gBAAgB,iCAI1B,qBAAqB,gCAavB,CAAA;AAED,UAAU,wBAAwB;IAChC,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,UAAU,CAAA;CACvB;AAED,eAAO,MAAM,mBAAmB,4CAK7B,wBAAwB,gCAoB1B,CAAA;AAED,UAAU,qBAAsB,SAAQ,2BAA2B;IACjE,UAAU,EAAE;QAAE,MAAM,EAAE,MAAM,IAAI,CAAC;QAAC,QAAQ,EAAE,MAAM,GAAG,CAAA;KAAE,CAAA;CACxD;AAED,eAAO,MAAM,gBAAgB,6BAA8B,qBAAqB,uCAS/E,CAAA"}
@@ -1,8 +1,8 @@
1
- import { Platform, StyleSheet } from 'react-native';
2
- import { TextButton } from './text_button';
3
1
  import { HeaderButton } from '@react-navigation/elements';
2
+ import { Platform, StyleSheet } from 'react-native';
4
3
  import { Icon } from './icon';
5
- import { useTheme } from '../../hooks';
4
+ import { TextButton } from './text_button';
5
+ import { useTheme } from '@/hooks';
6
6
  export const HeaderTextButton = ({ onPress, title = 'Submit', ...props }) => {
7
7
  const styles = useStyles();
8
8
  return (<TextButton maxFontSizeMultiplier={1} onPress={onPress} textStyle={[styles.interactionColor, props.disabled && styles.disabledColor]} {...props}>
@@ -1 +1 @@
1
- {"version":3,"file":"platform_modal_header_buttons.js","sourceRoot":"","sources":["../../../src/components/display/platform_modal_header_buttons.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,QAAQ,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAC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AA,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,EACpD;MAAA,EAAE,YAAY,CAAC,CAChB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA;AAMD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAAE,UAAU,EAAE,GAAG,KAAK,EAAyB,EAAE,EAAE;IAClF,MAAM,KAAK,GAAG,UAAU,CAAC,QAAQ,EAAE,CAAA;IACnC,MAAM,aAAa,GAAG,KAAK,CAAC,KAAK,KAAK,CAAC,CAAA;IAEvC,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,OAAO,IAAI,CAAA;IACb,CAAC;IAED,OAAO,CAAC,gBAAgB,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,EAAG,CAAA;AACjF,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAE7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,gBAAgB,EAAE;YAChB,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC;gBACrB,GAAG,EAAE,MAAM,CAAC,6BAA6B;gBACzC,OAAO,EAAE,MAAM,CAAC,iCAAiC;aAClD,CAAC;SACH;QACD,mBAAmB,EAAE;YACnB,WAAW,EAAE,EAAE;SAChB;QACD,eAAe,EAAE;YACf,UAAU,EAAE,QAAQ;SACrB;QACD,aAAa,EAAE;YACb,KAAK,EAAE,MAAM,CAAC,wBAAwB;SACvC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { ColorValue, Platform, StyleSheet } from 'react-native'\nimport { TextButton } from './text_button'\nimport { HeaderButton } from '@react-navigation/elements'\nimport { Icon } from './icon'\nimport { useTheme } from '../../hooks'\nimport type { NativeStackHeaderRightProps } from '@react-navigation/native-stack'\n\ninterface HeaderTextButtonProps {\n onPress: () => void\n title?: string\n disabled?: boolean\n}\n\nexport const HeaderTextButton = ({\n onPress,\n title = 'Submit',\n ...props\n}: HeaderTextButtonProps) => {\n const styles = useStyles()\n\n return (\n <TextButton\n maxFontSizeMultiplier={1}\n onPress={onPress}\n textStyle={[styles.interactionColor, props.disabled && styles.disabledColor]}\n {...props}\n >\n {title}\n </TextButton>\n )\n}\n\ninterface HeaderDismissButtonProps {\n onPress: () => void\n title?: string\n tintColor?: ColorValue\n}\n\nexport const HeaderDismissButton = ({\n onPress,\n title = 'Cancel',\n tintColor,\n ...props\n}: HeaderDismissButtonProps) => {\n const styles = useStyles()\n\n return Platform.select({\n ios: (\n <TextButton\n maxFontSizeMultiplier={1}\n onPress={onPress}\n textStyle={[styles.interactionColor, styles.iosCancelButton]}\n {...props}\n >\n {title}\n </TextButton>\n ),\n default: (\n <HeaderButton onPress={onPress} style={[styles.androidCancelButton]} {...props}>\n <Icon name=\"general.x\" size={16} color={tintColor} />\n </HeaderButton>\n ),\n })\n}\n\ninterface HeaderDoneButtonProps extends NativeStackHeaderRightProps {\n navigation: { goBack: () => void; getState: () => any }\n}\n\nexport const HeaderDoneButton = ({ navigation, ...props }: HeaderDoneButtonProps) => {\n const state = navigation.getState()\n const isFirstScreen = state.index === 0\n\n if (!isFirstScreen) {\n return null\n }\n\n return <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Done\" />\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n interactionColor: {\n color: Platform.select({\n ios: colors.iOSModalHeaderButtonTextColor,\n android: colors.androidModalHeaderButtonTextColor,\n }),\n },\n androidCancelButton: {\n marginRight: 16,\n },\n iosCancelButton: {\n fontWeight: 'normal',\n },\n disabledColor: {\n color: colors.textColorDefaultDisabled,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"platform_modal_header_buttons.js","sourceRoot":"","sources":["../../../src/components/display/plat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,MAAM,CAAC,wBAAwB;SACvC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { HeaderButton } from '@react-navigation/elements'\nimport type { NativeStackHeaderRightProps } from '@react-navigation/native-stack'\nimport { ColorValue, Platform, StyleSheet } from 'react-native'\nimport { Icon } from './icon'\nimport { TextButton } from './text_button'\nimport { useTheme } from '@/hooks'\n\ninterface HeaderTextButtonProps {\n onPress: () => void\n title?: string\n disabled?: boolean\n}\n\nexport const HeaderTextButton = ({\n onPress,\n title = 'Submit',\n ...props\n}: HeaderTextButtonProps) => {\n const styles = useStyles()\n\n return (\n <TextButton\n maxFontSizeMultiplier={1}\n onPress={onPress}\n textStyle={[styles.interactionColor, props.disabled && styles.disabledColor]}\n {...props}\n >\n {title}\n </TextButton>\n )\n}\n\ninterface HeaderDismissButtonProps {\n onPress: () => void\n title?: string\n tintColor?: ColorValue\n}\n\nexport const HeaderDismissButton = ({\n onPress,\n title = 'Cancel',\n tintColor,\n ...props\n}: HeaderDismissButtonProps) => {\n const styles = useStyles()\n\n return Platform.select({\n ios: (\n <TextButton\n maxFontSizeMultiplier={1}\n onPress={onPress}\n textStyle={[styles.interactionColor, styles.iosCancelButton]}\n {...props}\n >\n {title}\n </TextButton>\n ),\n default: (\n <HeaderButton onPress={onPress} style={[styles.androidCancelButton]} {...props}>\n <Icon name=\"general.x\" size={16} color={tintColor} />\n </HeaderButton>\n ),\n })\n}\n\ninterface HeaderDoneButtonProps extends NativeStackHeaderRightProps {\n navigation: { goBack: () => void; getState: () => any }\n}\n\nexport const HeaderDoneButton = ({ navigation, ...props }: HeaderDoneButtonProps) => {\n const state = navigation.getState()\n const isFirstScreen = state.index === 0\n\n if (!isFirstScreen) {\n return null\n }\n\n return <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Done\" />\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n interactionColor: {\n color: Platform.select({\n ios: colors.iOSModalHeaderButtonTextColor,\n android: colors.androidModalHeaderButtonTextColor,\n }),\n },\n androidCancelButton: {\n marginRight: 16,\n },\n iosCancelButton: {\n fontWeight: 'normal',\n },\n disabledColor: {\n color: colors.textColorDefaultDisabled,\n },\n })\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"pressable_row.d.ts","sourceRoot":"","sources":["../../../src/components/display/pressable_row.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAA;AAE1D,OAAO,EAAQ,SAAS,EAAE,MAAM,QAAQ,CAAA;AAGxC,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,SAAS,CAAC,EAAE,GAAG,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAA;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,YAAY,kFAStB,iBAAiB,gCAsBnB,CAAA"}
1
+ {"version":3,"file":"pressable_row.d.ts","sourceRoot":"","sources":["../../../src/components/display/pressable_row.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,EAAQ,SAAS,EAAE,MAAM,QAAQ,CAAA;AAIxC,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,SAAS,CAAC,EAAE,GAAG,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAA;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,YAAY,kFAStB,iBAAiB,gCAsBnB,CAAA"}
@@ -1,8 +1,8 @@
1
1
  import { PlatformPressable } from '@react-navigation/elements';
2
2
  import { StyleSheet, View } from 'react-native';
3
- import { useTheme } from '../../hooks';
4
3
  import { Icon } from './icon';
5
4
  import { Text } from './text';
5
+ import { useTheme } from '@/hooks';
6
6
  export const PressableRow = ({ children, isActive, onPress, style, text, textStyle, iconPath, iconColor, }) => {
7
7
  const styles = useRowStyles({ isActive, iconColor });
8
8
  return (<PlatformPressable style={styles.container} onPress={onPress} accessibilityRole="radio" accessibilityState={{ selected: isActive }}>
@@ -1 +1 @@
1
- {"version":3,"file":"pressable_row.js","sourceRoot":"","sources":["../../../src/components/display/pressable_row.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAE9D,OAAO,EAAE,UAAU,EAAE,IAAI,EAAa,MAAM,cAAc,CAAA;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,IAAI,EAAa,MAAM,QAAQ,CAAA;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAY7B,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,KAAK,EACL,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,SAAS,GACS,EAAE,EAAE;IACtB,MAAM,MAAM,GAAG,YAAY,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAA;IAEpD,OAAO,CACL,CAAC,iBAAiB,CAChB,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CACxB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,iBAAiB,CAAC,OAAO,CACzB,kBAAkB,CAAC,CAAC,EAAE,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EAAE,EAAE;SAChB;QACD,cAAc,EAAE;YACd,IAAI,EAAE,CAAC;SACR;QACD,GAAG,EAAE,EAAE;QACP,QAAQ,EAAE;YACR,KAAK,EAAE,eAAe;YACtB,MAAM,EAAE,gBAAgB;YACxB,YAAY,EAAE,CAAC;SAChB;QACD,UAAU,EAAE;YACV,UAAU,EAAE,CAAC;SACd;QACD,YAAY,EAAE;YACZ,UAAU,EAAE,MAAM;YAClB,KAAK,EAAE,SAAS,IAAI,KAAK,CAAC,MAAM,CAAC,mBAAmB;YACpD,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SAC1B;QACD,QAAQ,EAAE;YACR,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,CAAC;SACd;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport { PropsWithChildren } from 'react'\nimport { StyleSheet, View, ViewStyle } from 'react-native'\nimport { useTheme } from '../../hooks'\nimport { Icon, IconProps } from './icon'\nimport { Text } from './text'\n\nexport interface PressableRowProps extends PropsWithChildren {\n isActive?: boolean\n onPress: () => void\n style?: ViewStyle\n textStyle?: any\n text: string\n iconPath?: IconProps['name']\n iconColor?: string\n}\n\nexport const PressableRow = ({\n children,\n isActive,\n onPress,\n style,\n text,\n textStyle,\n iconPath,\n iconColor,\n}: PressableRowProps) => {\n const styles = useRowStyles({ isActive, iconColor })\n\n return (\n <PlatformPressable\n style={styles.container}\n onPress={onPress}\n accessibilityRole=\"radio\"\n accessibilityState={{ selected: isActive }}\n >\n <View style={[styles.innerContainer, style]}>\n {children}\n <Text style={textStyle}>{text}</Text>\n <Icon\n name={iconPath || 'general.check'}\n size={16}\n style={styles.rowIconRight}\n accessibilityElementsHidden\n />\n </View>\n </PlatformPressable>\n )\n}\n\nconst ASPECT_RATIO = 16 / 9\nconst THUMBNAIL_WIDTH = 80\nconst THUMBNAIL_HEIGHT = THUMBNAIL_WIDTH / ASPECT_RATIO\n\nconst useRowStyles = ({\n isActive = false,\n iconColor,\n}: { isActive?: boolean; iconColor?: string } = {}) => {\n const theme = useTheme()\n return StyleSheet.create({\n container: {\n paddingLeft: 16,\n },\n innerContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 12,\n borderBottomWidth: 1,\n borderBottomColor: theme.colors.fillColorNeutral050Base,\n paddingVertical: 12,\n paddingRight: 16,\n },\n borderLessRow: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 12,\n paddingVertical: 12,\n paddingRight: 16,\n paddingLeft: 16,\n },\n viewMoreButton: {\n flex: 1,\n },\n row: {},\n rowImage: {\n width: THUMBNAIL_WIDTH,\n height: THUMBNAIL_HEIGHT,\n borderRadius: 4,\n },\n rowContent: {\n flexShrink: 1,\n },\n rowIconRight: {\n marginLeft: 'auto',\n color: iconColor || theme.colors.iconColorDefaultDim,\n opacity: isActive ? 1 : 0,\n },\n rowTitle: {\n fontSize: 16,\n flexShrink: 1,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"pressable_row.js","sourceRoot":"","sources":["../../../src/components/display/pressable_row.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAE9D,OAAO,EAAE,UAAU,EAAE,IAAI,EAAa,MAAM,cAAc,CAAA;AAC1D,OAAO,EAAE,IAAI,EAAa,MAAM,QAAQ,CAAA;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAYlC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,KAAK,EACL,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,SAAS,GACS,EAAE,EAAE;IACtB,MAAM,MAAM,GAAG,YAAY,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAA;IAEpD,OAAO,CACL,CA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;SACjB;QACD,aAAa,EAAE;YACb,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,EAAE;YACP,eAAe,EAAE,EAAE;YACnB,YAAY,EAAE,EAAE;YAChB,WAAW,EAAE,EAAE;SAChB;QACD,cAAc,EAAE;YACd,IAAI,EAAE,CAAC;SACR;QACD,GAAG,EAAE,EAAE;QACP,QAAQ,EAAE;YACR,KAAK,EAAE,eAAe;YACtB,MAAM,EAAE,gBAAgB;YACxB,YAAY,EAAE,CAAC;SAChB;QACD,UAAU,EAAE;YACV,UAAU,EAAE,CAAC;SACd;QACD,YAAY,EAAE;YACZ,UAAU,EAAE,MAAM;YAClB,KAAK,EAAE,SAAS,IAAI,KAAK,CAAC,MAAM,CAAC,mBAAmB;YACpD,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SAC1B;QACD,QAAQ,EAAE;YACR,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,CAAC;SACd;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport { PropsWithChildren } from 'react'\nimport { StyleSheet, View, ViewStyle } from 'react-native'\nimport { Icon, IconProps } from './icon'\nimport { Text } from './text'\nimport { useTheme } from '@/hooks'\n\nexport interface PressableRowProps extends PropsWithChildren {\n isActive?: boolean\n onPress: () => void\n style?: ViewStyle\n textStyle?: any\n text: string\n iconPath?: IconProps['name']\n iconColor?: string\n}\n\nexport const PressableRow = ({\n children,\n isActive,\n onPress,\n style,\n text,\n textStyle,\n iconPath,\n iconColor,\n}: PressableRowProps) => {\n const styles = useRowStyles({ isActive, iconColor })\n\n return (\n <PlatformPressable\n style={styles.container}\n onPress={onPress}\n accessibilityRole=\"radio\"\n accessibilityState={{ selected: isActive }}\n >\n <View style={[styles.innerContainer, style]}>\n {children}\n <Text style={textStyle}>{text}</Text>\n <Icon\n name={iconPath || 'general.check'}\n size={16}\n style={styles.rowIconRight}\n accessibilityElementsHidden\n />\n </View>\n </PlatformPressable>\n )\n}\n\nconst ASPECT_RATIO = 16 / 9\nconst THUMBNAIL_WIDTH = 80\nconst THUMBNAIL_HEIGHT = THUMBNAIL_WIDTH / ASPECT_RATIO\n\nconst useRowStyles = ({\n isActive = false,\n iconColor,\n}: { isActive?: boolean; iconColor?: string } = {}) => {\n const theme = useTheme()\n return StyleSheet.create({\n container: {\n paddingLeft: 16,\n },\n innerContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 12,\n borderBottomWidth: 1,\n borderBottomColor: theme.colors.fillColorNeutral050Base,\n paddingVertical: 12,\n paddingRight: 16,\n },\n borderLessRow: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 12,\n paddingVertical: 12,\n paddingRight: 16,\n paddingLeft: 16,\n },\n viewMoreButton: {\n flex: 1,\n },\n row: {},\n rowImage: {\n width: THUMBNAIL_WIDTH,\n height: THUMBNAIL_HEIGHT,\n borderRadius: 4,\n },\n rowContent: {\n flexShrink: 1,\n },\n rowIconRight: {\n marginLeft: 'auto',\n color: iconColor || theme.colors.iconColorDefaultDim,\n opacity: isActive ? 1 : 0,\n },\n rowTitle: {\n fontSize: 16,\n flexShrink: 1,\n },\n })\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  import React, { useEffect } from 'react';
2
2
  import { StyleSheet, View } from 'react-native';
3
3
  import Animated, { useSharedValue, useAnimatedStyle, withRepeat, withTiming, Easing, } from 'react-native-reanimated';
4
- import { useFontScale, useTheme } from '../../hooks';
4
+ import { useFontScale, useTheme } from '@/hooks';
5
5
  // =================================
6
6
  // ====== Constants ================
7
7
  // =================================
@@ -1 +1 @@
1
- {"version":3,"file":"spinner.js","sourceRoot":"","sources":["../../../src/components/display/spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,EAAa,UAAU,EAAE,IAAI,EAAa,MAAM,cA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P,KAAK,EAAE,YAAY,GAAG,CAAC;YACvB,MAAM,EAAE,YAAY,GAAG,CAAC;YACxB,QAAQ,EAAE,QAAQ;YAClB,MAAM,EAAE,GAAG;SACZ;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React, { useEffect } from 'react'\nimport { StyleProp, StyleSheet, View, ViewStyle } from 'react-native'\nimport Animated, {\n useSharedValue,\n useAnimatedStyle,\n withRepeat,\n withTiming,\n Easing,\n} from 'react-native-reanimated'\nimport { useFontScale, useTheme } from '../../hooks'\n\n// =================================\n// ====== Constants ================\n// =================================\n\nconst PREVENT_SCALING_DEFAULT = 1\n\n// =================================\n// ====== Component ================\n// =================================\n\ninterface SpinnerProps {\n /**\n * Size of the spinner in px\n * */\n size?: number\n /**\n * Specifies the maximum size spinner can scale to if the device's font-size is increased.\n */\n maxFontSizeMultiplier?: number\n /**\n * Specifies the minimum size spinner can scale to if the device's font-size is decreased.\n */\n minFontSizeMultiplier?: number\n /**\n * Style to apply to the spinner\n */\n style?: StyleProp<ViewStyle>\n}\n\nexport function Spinner({\n size = 20,\n maxFontSizeMultiplier = PREVENT_SCALING_DEFAULT,\n minFontSizeMultiplier = PREVENT_SCALING_DEFAULT,\n style,\n}: SpinnerProps) {\n const styles = useStyles({ maxFontSizeMultiplier, minFontSizeMultiplier, size })\n\n const rotation = useSharedValue(0)\n const animatedStyle = useAnimatedStyle(() => {\n return {\n transform: [{ rotate: `${rotation.value}deg` }],\n }\n })\n\n useEffect(() => {\n rotation.value = withRepeat(\n withTiming(360, {\n duration: 1000,\n easing: Easing.linear,\n }),\n -1 // loops animation infinitely\n )\n\n return () => {\n rotation.value = 0 // Reset rotation when Spinner unmounts\n }\n }, [rotation])\n\n return (\n <View style={style}>\n <Animated.View style={[styles.animatedContainer, animatedStyle]}>\n <View style={styles.clipping}>\n <View style={[styles.circle, styles.spinner]} />\n </View>\n <View style={[styles.circle, styles.track]} />\n </Animated.View>\n </View>\n )\n}\n\n// =================================\n// ====== Styles ===================\n// =================================\n\ninterface Styles {\n maxFontSizeMultiplier: number | undefined\n minFontSizeMultiplier: number | undefined\n size: number\n}\n\nconst useStyles = ({ maxFontSizeMultiplier, minFontSizeMultiplier, size }: Styles) => {\n const { colors } = useTheme()\n const fontScale = useFontScale({ maxFontSizeMultiplier, minFontSizeMultiplier })\n const scalableSize = size * fontScale\n\n return StyleSheet.create({\n animatedContainer: {\n width: scalableSize,\n height: scalableSize,\n borderRadius: scalableSize / 2,\n },\n circle: {\n width: scalableSize,\n height: scalableSize,\n borderRadius: scalableSize / 2,\n borderStyle: 'solid',\n borderWidth: 3,\n },\n spinner: {\n borderColor: colors.borderColorDefaultDarkest,\n },\n track: {\n borderColor: colors.fillColorNeutral050Base,\n },\n clipping: {\n position: 'absolute',\n top: 0,\n left: 0,\n width: scalableSize / 2,\n height: scalableSize / 2,\n overflow: 'hidden',\n zIndex: 200,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"spinner.js","sourceRoot":"","sources":["../../../src/components/display/spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,EAAa,UAAU,EAAE,IAAI,EAAa,MAAM,cAAc,CAAA;AACrE,OAAO,QAAQ,EAAE,EACf,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,MAAM,GACP,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEhD,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AAEpC,MAAM,uBAAuB,GAAG,CAAC,CAAA;AAyBjC,MAAM,UAAU,OAAO,CAAC,EACtB,IAAI,GAAG,EAAE,EACT,qBAAqB,GAAG,uBAAuB,EAC/C,qBAAqB,GAAG,uBAAuB,EAC/C,KAAK,GACQ;IACb,MAAM,MAAM,GAAG,SAAS,CAAC,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,IAAI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AE,qBAAqB,EAAE,qBAAqB,EAAE,IAAI,EAAU,EAAE,EAAE;IACnF,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAC7B,MAAM,SAAS,GAAG,YAAY,CAAC,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,CAAC,CAAA;IAChF,MAAM,YAAY,GAAG,IAAI,GAAG,SAAS,CAAA;IAErC,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,iBAAiB,EAAE;YACjB,KAAK,EAAE,YAAY;YACnB,MAAM,EAAE,YAAY;YACpB,YAAY,EAAE,YAAY,GAAG,CAAC;SAC/B;QACD,MAAM,EAAE;YACN,KAAK,EAAE,YAAY;YACnB,MAAM,EAAE,YAAY;YACpB,YAAY,EAAE,YAAY,GAAG,CAAC;YAC9B,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,CAAC;SACf;QACD,OAAO,EAAE;YACP,WAAW,EAAE,MAAM,CAAC,yBAAyB;SAC9C;QACD,KAAK,EAAE;YACL,WAAW,EAAE,MAAM,CAAC,uBAAuB;SAC5C;QACD,QAAQ,EAAE;YACR,QAAQ,EAAE,UAAU;YACpB,GAAG,EAAE,CAAC;YACN,IAAI,EAAE,CAAC;YACP,KAAK,EAAE,YAAY,GAAG,CAAC;YACvB,MAAM,EAAE,YAAY,GAAG,CAAC;YACxB,QAAQ,EAAE,QAAQ;YAClB,MAAM,EAAE,GAAG;SACZ;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React, { useEffect } from 'react'\nimport { StyleProp, StyleSheet, View, ViewStyle } from 'react-native'\nimport Animated, {\n useSharedValue,\n useAnimatedStyle,\n withRepeat,\n withTiming,\n Easing,\n} from 'react-native-reanimated'\nimport { useFontScale, useTheme } from '@/hooks'\n\n// =================================\n// ====== Constants ================\n// =================================\n\nconst PREVENT_SCALING_DEFAULT = 1\n\n// =================================\n// ====== Component ================\n// =================================\n\ninterface SpinnerProps {\n /**\n * Size of the spinner in px\n * */\n size?: number\n /**\n * Specifies the maximum size spinner can scale to if the device's font-size is increased.\n */\n maxFontSizeMultiplier?: number\n /**\n * Specifies the minimum size spinner can scale to if the device's font-size is decreased.\n */\n minFontSizeMultiplier?: number\n /**\n * Style to apply to the spinner\n */\n style?: StyleProp<ViewStyle>\n}\n\nexport function Spinner({\n size = 20,\n maxFontSizeMultiplier = PREVENT_SCALING_DEFAULT,\n minFontSizeMultiplier = PREVENT_SCALING_DEFAULT,\n style,\n}: SpinnerProps) {\n const styles = useStyles({ maxFontSizeMultiplier, minFontSizeMultiplier, size })\n\n const rotation = useSharedValue(0)\n const animatedStyle = useAnimatedStyle(() => {\n return {\n transform: [{ rotate: `${rotation.value}deg` }],\n }\n })\n\n useEffect(() => {\n rotation.value = withRepeat(\n withTiming(360, {\n duration: 1000,\n easing: Easing.linear,\n }),\n -1 // loops animation infinitely\n )\n\n return () => {\n rotation.value = 0 // Reset rotation when Spinner unmounts\n }\n }, [rotation])\n\n return (\n <View style={style}>\n <Animated.View style={[styles.animatedContainer, animatedStyle]}>\n <View style={styles.clipping}>\n <View style={[styles.circle, styles.spinner]} />\n </View>\n <View style={[styles.circle, styles.track]} />\n </Animated.View>\n </View>\n )\n}\n\n// =================================\n// ====== Styles ===================\n// =================================\n\ninterface Styles {\n maxFontSizeMultiplier: number | undefined\n minFontSizeMultiplier: number | undefined\n size: number\n}\n\nconst useStyles = ({ maxFontSizeMultiplier, minFontSizeMultiplier, size }: Styles) => {\n const { colors } = useTheme()\n const fontScale = useFontScale({ maxFontSizeMultiplier, minFontSizeMultiplier })\n const scalableSize = size * fontScale\n\n return StyleSheet.create({\n animatedContainer: {\n width: scalableSize,\n height: scalableSize,\n borderRadius: scalableSize / 2,\n },\n circle: {\n width: scalableSize,\n height: scalableSize,\n borderRadius: scalableSize / 2,\n borderStyle: 'solid',\n borderWidth: 3,\n },\n spinner: {\n borderColor: colors.borderColorDefaultDarkest,\n },\n track: {\n borderColor: colors.fillColorNeutral050Base,\n },\n clipping: {\n position: 'absolute',\n top: 0,\n left: 0,\n width: scalableSize / 2,\n height: scalableSize / 2,\n overflow: 'hidden',\n zIndex: 200,\n },\n })\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Platform, Switch as ReactNativeSwitch } from 'react-native';
3
- import { useTheme } from '../../hooks';
3
+ import { useTheme } from '@/hooks';
4
4
  // =================================
5
5
  // ====== Component ================
6
6
  // =================================
@@ -1 +1 @@
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"]}
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,SAAS,CAAA;AAElC,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"]}
@@ -1,7 +1,7 @@
1
1
  import { PlatformPressable } from '@react-navigation/elements';
2
2
  import React, { useEffect, useRef, useState } from 'react';
3
3
  import { Animated, Easing, StyleSheet, View } from 'react-native';
4
- import { useTheme } from '../../hooks';
4
+ import { useTheme } from '@/hooks';
5
5
  const defaultKeyExtractor = (item, index) => {
6
6
  if (typeof item === 'string')
7
7
  return item;
@@ -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,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,IAAI,EACJ,YAAY,GAAG,mBAAmB,EAClC,UAAU,EACV,UAAU,EACV,KAAK,GACY;IACjB,MAAM,CAAC,SAAS,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAwC,IAAI,GAAG,EAAE,CAAC,CAAA;IAChG,MAAM,aAAa,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IAC3C,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;IAC7C,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,OAAO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ACN;QAAA,CAAC,QAAQ,CAAC,IAAI,CACZ,KAAK,CAAC,CAAC;YACL,MAAM,CAAC,MAAM;YACb;gBACE,OAAO;gBACP,GAAG,EAAE,SAAS,GAAG,CAAC;gBAClB,KAAK,EAAE,aAAa,CAAC,cAAc,CAAC,EAAE,KAAK,IAAI,CAAC;gBAChD,SAAS,EAAE,CAAC,EAAE,UAAU,EAAE,iBAAiB,EAAE,CAAC;aAC/C;SACF,CAAC,EAEN;MAAA,EAAE,QAAQ,CAAC,IAAI,CACjB;IAAA,EAAE,IAAI,CAAC,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,SAAS,CAAA;AAgBlC,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,EAClC,UAAU,EACV,UAAU,EACV,KAAK,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AE,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 +1 @@
1
- {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../src/components/display/text.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EACV,SAAS,IAAI,oBAAoB,EACjC,SAAS,IAAI,oBAAoB,EACjC,SAAS,EACV,MAAM,cAAc,CAAA;AAUrB,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,EA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AAO,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,7 +1,7 @@
1
- import { useTheme } from '../../hooks';
2
1
  import React from 'react';
3
2
  import { StyleSheet, Text as ReactNativeText, Platform } from 'react-native';
4
- import { tokens } from '../../vendor/tapestry/tokens';
3
+ import { useTheme } from '@/hooks';
4
+ import { tokens } from '@/vendor/tapestry/tokens';
5
5
  const VARIANTS = {
6
6
  plain: 'plain',
7
7
  secondary: 'secondary',
@@ -1 +1 @@
1
- {"version":3,"file":"text.js","sourceRoot":"","sources":["../../../src/components/display/text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,IAAI,IAAI,eAAe,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAM5E,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;QAC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 '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 { 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,SAAS,CAAA;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AA0BjD,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,CAA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M,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 +1 @@
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
+ {"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;AAElD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAEvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAQlE,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,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import { Pressable, StyleSheet } from 'react-native';
3
- import { useTheme } from '../../hooks';
4
- import { platformFontWeightMedium } from '../../utils';
5
3
  import { Text } from './text';
6
4
  import { getColorKey, useButtonColorOptionMap } from './utils/button_colors';
5
+ import { useTheme } from '@/hooks';
6
+ import { platformFontWeightMedium } from '@/utils';
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
@@ -1 +1 @@
1
- {"version":3,"file":"text_button.js","sourceRoot":"","sources":["../../../src/components/display/text_button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEpD,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;AA0C5E,MAAM,UAAU,UAAU,CAAC,EACzB,oBAAoB,GAAG,KAAK,EAC5B,gBAAgB,GAAG,IAAI,EACvB,UAAU,GAAG,aAAa,EAC1B,QAAQ,GAAG,KAAK,EAChB,QAAQ,EACR,qBAAqB,EACrB,gB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M,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,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEpD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,OAAO,EAAE,WAAW,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAE5E,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAClC,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AAyClD,MAAM,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AAC;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 { Text } from './text'\nimport type { TextProps } from './text'\nimport { getColorKey, useButtonColorOptionMap } from './utils/button_colors'\nimport type { ButtonAppearanceUnion } from './utils/button_colors'\nimport { useTheme } from '@/hooks'\nimport { platformFontWeightMedium } from '@/utils'\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 +1 @@
1
- {"version":3,"file":"text_inline_button.d.ts","sourceRoot":"","sources":["../../../src/components/display/text_inline_button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAIvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAIvC,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
+ {"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;AAGvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAEvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAQlE,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,10 +1,10 @@
1
+ import colorFunction from 'color';
1
2
  import React, { useState } from 'react';
2
3
  import { Platform, StyleSheet } from 'react-native';
3
- import { useTheme } from '../../hooks';
4
4
  import { Text } from './text';
5
- import { platformFontWeightMedium } from '../../utils';
6
- import colorFunction from 'color';
7
5
  import { getColorKey, useButtonColorOptionMap } from './utils/button_colors';
6
+ import { useTheme } from '@/hooks';
7
+ import { platformFontWeightMedium } from '@/utils';
8
8
  export function TextInlineButton({ appearance = 'interaction', children, disabled = false, onPress, style, ...props }) {
9
9
  const styles = useStyles({ appearance, disabled });
10
10
  const [isPressed, setIsPressed] = useState(false);
@@ -1 +1 @@
1
- {"version":3,"file":"text_inline_button.js","sourceRoot":"","sources":["../../../src/components/display/text_inline_button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QA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AAY,CAAC,KAAK,CAAC,CAAC,CACtC,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC;AAED,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AAEpC,MAAM,SAAS,GAAG,CAAC,EACjB,UAAU,GAAG,aAAa,EAC1B,QAAQ,GAAG,KAAK,GACe,EAAE,EAAE;IACnC,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,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 React, { useState } from 'react'\nimport { Platform, StyleSheet } from 'react-native'\nimport { useTheme } from '../../hooks'\nimport { Text } from './text'\nimport type { TextProps } from './text'\nimport { platformFontWeightMedium } from '../../utils'\nimport colorFunction from 'color'\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,MAA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C,CAEV;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC;AAED,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AAEpC,MAAM,SAAS,GAAG,CAAC,EACjB,UAAU,GAAG,aAAa,EAC1B,QAAQ,GAAG,KAAK,GACe,EAAE,EAAE;IACnC,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,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 { Text } from './text'\nimport type { TextProps } from './text'\nimport { getColorKey, useButtonColorOptionMap } from './utils/button_colors'\nimport type { ButtonAppearanceUnion } from './utils/button_colors'\nimport { useTheme } from '@/hooks'\nimport { platformFontWeightMedium } from '@/utils'\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 +1 @@
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;AAazE,OAAO,EAAQ,UAAU,EAAE,MAAM,QAAQ,CAAA;AAWzC,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
+ {"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;AAuBzC,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,11 +1,11 @@
1
1
  import React from 'react';
2
2
  import { Pressable, StyleSheet } from 'react-native';
3
- import { Text } from './text';
4
- import { useTheme, useFontScale, useCreateAndroidRippleColor, useInteractionGhostBackgroundColor, } from '../../hooks';
5
- import { MAX_FONT_SIZE_MULTIPLIER_LANDMARK, platformFontWeightBold, platformPressedOpacityStyle, } from '../../utils';
6
3
  import { Icon } from './icon';
7
- import { tokens } from '../../vendor/tapestry/tokens';
8
- import { Haptic } from '../../utils/native_adapters/configuration';
4
+ import { Text } from './text';
5
+ import { useTheme, useFontScale, useCreateAndroidRippleColor, useInteractionGhostBackgroundColor, } from '@/hooks';
6
+ import { MAX_FONT_SIZE_MULTIPLIER_LANDMARK, platformFontWeightBold, platformPressedOpacityStyle, } from '@/utils';
7
+ import { Haptic } from '@/utils/native_adapters/configuration';
8
+ import { tokens } from '@/vendor/tapestry/tokens';
9
9
  export function ToggleButton({ active, accessibilityLabel, adjustsFontSizeToFit = false, allowFontScaling = true, iconNameLeft, iconNameRight, maxFontSizeMultiplier = MAX_FONT_SIZE_MULTIPLIER_LANDMARK, minimumFontScale, title, style, hapticFeedback = true, onPress, ...props }) {
10
10
  const hasTitle = Boolean(title);
11
11
  const styles = useStyles({ active, maxFontSizeMultiplier });
@@ -1 +1 @@
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,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,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,IAAI,EAAc,MAAM,QAAQ,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAA;AAiElE,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,QAAQ,GAAG,OAAO,CAAC,K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YAAY,EAAE,MAAM,CAAC,YAAY,GAAG,SAAS;YAC7C,WAAW,EAAE,CAAC;YACd,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,sBAAsB;YACxE,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,aAAa;YAC/D,iBAAiB,EAAE,EAAE,GAAG,SAAS;YACjC,aAAa,EAAE,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 { Text } from './text'\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 { Icon, IconString } from './icon'\nimport { tokens } from '../../vendor/tapestry/tokens'\nimport { Haptic } from '../../utils/native_adapters/configuration'\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,EAAE,IAAI,EAAc,MAAM,QAAQ,CAAA;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,2BAA2B,EAC3B,kCAAkC,GACnC,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,iCAAiC,EACjC,sBAAsB,EACtB,2BAA2B,GAC5B,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,MAAM,EAAE,MAAM,uCAAuC,CAAA;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AAiEjD,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,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,CAAA;IAC/B,MAAM,MAAM,GAAG,SAAS,CAAC,EAAE,MAAM,EAAE,qBAAqB,EAAE,CAAC,CAAA;IAC3D,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAC7B,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA,CAAC,+CAA+C;IAEhG,MAAM,eAAe,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,uBAAuB,CAAA;IACpF,MAAM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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 { Icon, IconString } from './icon'\nimport { Text } from './text'\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'\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,4 +1,4 @@
1
- import { useTheme } from '../../../hooks';
1
+ import { useTheme } from '@/hooks';
2
2
  // =================================
3
3
  // ====== Exports ==================
4
4
  // =================================
@@ -1 +1 @@
1
- {"version":3,"file":"button_colors.js","sourceRoot":"","sources":["../../../../src/components/display/utils/button_colors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAEzC,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AAEpC,OAAO,EAAE,WAAW,EAAE,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C,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,eAAe,CAAC;QACxD,QAAQ,EAAE;YACR,MAAM,CAAC,mCAAmC;YAC1C,MAAM,CAAC,mCAAmC;SAC3C;KACF,CAAA;AACH,CAAC;AAYD,SAAS,WAAW,CAA8D,EAChF,QAAQ,EACR,OAAO,EACP,UAAU,GACS;IACnB,IAAI,QAAQ,IAAI,OAAO;QAAE,OAAO,UAAU,CAAA;IAC1C,OAAO,UAAU,CAAA;AACnB,CAAC","sourcesContent":["import { useTheme } from '../../../hooks'\n\n// =================================\n// ====== Exports ==================\n// =================================\n\nexport { getColorKey, useButtonColorOptionMap, useGradientColorMap, useIconButtonColorOptionMap }\nexport type { ButtonAppearanceUnion, IconButtonAppearanceUnion }\n\n// =================================\n// ====== Constants ================\n// =================================\n\nconst BUTTON_APPEARANCES = {\n danger: 'danger',\n interaction: 'interaction',\n} as const\n\ntype ButtonAppearanceUnion = (typeof BUTTON_APPEARANCES)[keyof typeof BUTTON_APPEARANCES]\n\nconst ICON_BUTTON_APPEARANCES = {\n ...BUTTON_APPEARANCES,\n neutral: 'neutral',\n} as const\n\ntype IconButtonAppearanceUnion =\n (typeof ICON_BUTTON_APPEARANCES)[keyof typeof ICON_BUTTON_APPEARANCES]\n\nconst BUTTON_COLOR_OPTIONS = {\n ...BUTTON_APPEARANCES,\n disabled: 'disabled',\n} as const\n\ntype ButtonColorOptionUnion = (typeof BUTTON_COLOR_OPTIONS)[keyof typeof BUTTON_COLOR_OPTIONS]\n\nconst ICON_BUTTON_COLOR_OPTIONS = {\n ...BUTTON_COLOR_OPTIONS,\n ...ICON_BUTTON_APPEARANCES,\n} as const\n\ntype IconButtonColorOptionUnion =\n (typeof ICON_BUTTON_COLOR_OPTIONS)[keyof typeof ICON_BUTTON_COLOR_OPTIONS]\n\n// =================================\n// ====== Hooks ====================\n// =================================\n\ntype ButtonColorOptionMap = Record<ButtonColorOptionUnion, string>\nfunction useButtonColorOptionMap(): ButtonColorOptionMap {\n const { colors } = useTheme()\n\n return {\n interaction: colors.interaction,\n danger: colors.statusErrorFill,\n disabled: colors.textColorDefaultDisabled,\n }\n}\n\ntype IconButtonColorOptionMap = Record<IconButtonColorOptionUnion, string>\nfunction useIconButtonColorOptionMap(): IconButtonColorOptionMap {\n const { colors } = useTheme()\n\n return {\n danger: colors.statusErrorFill,\n disabled: colors.textColorDefaultDisabled,\n interaction: colors.interaction,\n neutral: colors.iconColorDefaultSecondary,\n }\n}\n\ntype GradientColorMap = Record<ButtonColorOptionUnion, [string, string]>\nfunction useGradientColorMap(): GradientColorMap {\n const { colors } = useTheme()\n\n const defaultColorStart = colors.buttonStart || colors.interaction\n const defaultColorEnd = colors.buttonEnd || colors.interaction\n\n return {\n interaction: [defaultColorStart, defaultColorEnd],\n danger: [colors.statusErrorFill, colors.statusErrorFill],\n disabled: [\n colors.fillColorButtonNeutralSolidDisabled,\n colors.fillColorButtonNeutralSolidDisabled,\n ],\n }\n}\n\n// =================================\n// ====== Functions ================\n// =================================\n\ninterface GetColorKeyArgs<T> {\n disabled: boolean | null\n loading?: boolean\n appearance: T\n}\n\nfunction getColorKey<T extends ButtonAppearanceUnion | IconButtonAppearanceUnion>({\n disabled,\n loading,\n appearance,\n}: GetColorKeyArgs<T>) {\n if (disabled || loading) return 'disabled'\n return appearance\n}\n"]}
1
+ {"version":3,"file":"button_colors.js","sourceRoot":"","sources":["../../../../src/components/display/utils/button_colors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAElC,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AAEpC,OAAO,EAAE,WAAW,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,CAAA;AAGjG,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AAEpC,MAAM,kBAAkB,GAAG;IACzB,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,aAAa;CAClB,CAAA;AAIV,MAAM,uBAAuB,GAAG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AU,GACS;IACnB,IAAI,QAAQ,IAAI,OAAO;QAAE,OAAO,UAAU,CAAA;IAC1C,OAAO,UAAU,CAAA;AACnB,CAAC","sourcesContent":["import { useTheme } from '@/hooks'\n\n// =================================\n// ====== Exports ==================\n// =================================\n\nexport { getColorKey, useButtonColorOptionMap, useGradientColorMap, useIconButtonColorOptionMap }\nexport type { ButtonAppearanceUnion, IconButtonAppearanceUnion }\n\n// =================================\n// ====== Constants ================\n// =================================\n\nconst BUTTON_APPEARANCES = {\n danger: 'danger',\n interaction: 'interaction',\n} as const\n\ntype ButtonAppearanceUnion = (typeof BUTTON_APPEARANCES)[keyof typeof BUTTON_APPEARANCES]\n\nconst ICON_BUTTON_APPEARANCES = {\n ...BUTTON_APPEARANCES,\n neutral: 'neutral',\n} as const\n\ntype IconButtonAppearanceUnion =\n (typeof ICON_BUTTON_APPEARANCES)[keyof typeof ICON_BUTTON_APPEARANCES]\n\nconst BUTTON_COLOR_OPTIONS = {\n ...BUTTON_APPEARANCES,\n disabled: 'disabled',\n} as const\n\ntype ButtonColorOptionUnion = (typeof BUTTON_COLOR_OPTIONS)[keyof typeof BUTTON_COLOR_OPTIONS]\n\nconst ICON_BUTTON_COLOR_OPTIONS = {\n ...BUTTON_COLOR_OPTIONS,\n ...ICON_BUTTON_APPEARANCES,\n} as const\n\ntype IconButtonColorOptionUnion =\n (typeof ICON_BUTTON_COLOR_OPTIONS)[keyof typeof ICON_BUTTON_COLOR_OPTIONS]\n\n// =================================\n// ====== Hooks ====================\n// =================================\n\ntype ButtonColorOptionMap = Record<ButtonColorOptionUnion, string>\nfunction useButtonColorOptionMap(): ButtonColorOptionMap {\n const { colors } = useTheme()\n\n return {\n interaction: colors.interaction,\n danger: colors.statusErrorFill,\n disabled: colors.textColorDefaultDisabled,\n }\n}\n\ntype IconButtonColorOptionMap = Record<IconButtonColorOptionUnion, string>\nfunction useIconButtonColorOptionMap(): IconButtonColorOptionMap {\n const { colors } = useTheme()\n\n return {\n danger: colors.statusErrorFill,\n disabled: colors.textColorDefaultDisabled,\n interaction: colors.interaction,\n neutral: colors.iconColorDefaultSecondary,\n }\n}\n\ntype GradientColorMap = Record<ButtonColorOptionUnion, [string, string]>\nfunction useGradientColorMap(): GradientColorMap {\n const { colors } = useTheme()\n\n const defaultColorStart = colors.buttonStart || colors.interaction\n const defaultColorEnd = colors.buttonEnd || colors.interaction\n\n return {\n interaction: [defaultColorStart, defaultColorEnd],\n danger: [colors.statusErrorFill, colors.statusErrorFill],\n disabled: [\n colors.fillColorButtonNeutralSolidDisabled,\n colors.fillColorButtonNeutralSolidDisabled,\n ],\n }\n}\n\n// =================================\n// ====== Functions ================\n// =================================\n\ninterface GetColorKeyArgs<T> {\n disabled: boolean | null\n loading?: boolean\n appearance: T\n}\n\nfunction getColorKey<T extends ButtonAppearanceUnion | IconButtonAppearanceUnion>({\n disabled,\n loading,\n appearance,\n}: GetColorKeyArgs<T>) {\n if (disabled || loading) return 'disabled'\n return appearance\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { useTheme } from '../../../hooks';
1
+ import { useTheme } from '@/hooks';
2
2
  // =================================
3
3
  // ====== Exports ==================
4
4
  // =================================
@@ -1 +1 @@
1
- {"version":3,"file":"status_colors.js","sourceRoot":"","sources":["../../../../src/components/display/utils/status_colors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAEzC,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AAEpC,OAAO,EAAE,2BAA2B,EAAE,CAAA;AAGtC,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AAEpC,MAAM,kBAAkB,GAAG;IACzB,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;CACV,CAAA;AAaV,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AAEpC,SAAS,2BAA2B;IAClC,MAAM,EACJ,MAAM,EAAE,EACN,6BAA6B,EAC7B,uBAAuB,EACvB,uBAAuB,EACvB,4BAA4B,EAC5B,sBAAsB,EACtB,sBAAsB,EACtB,+BAA+B,EAC/B,yBAAyB,EACzB,yBAAyB,EACzB,+BAA+B,EAC/B,yBAAyB,EACzB,yBAAyB,EACzB,+BAA+B,EAC/B,yBAAyB,EACzB,yBAAyB,GAC1B,GACF,GAAG,QAAQ,EAAE,CAAA;IAEd,OAAO;QACL,KAAK,EAAE;YACL,UAAU,EAAE,6BAA6B;YACzC,IAAI,EAAE,uBAAuB;YAC7B,IAAI,EAAE,uBAAuB;SAC9B;QACD,IAAI,EAAE;YACJ,UAAU,EAAE,4BAA4B;YACxC,IAAI,EAAE,sBAAsB;YAC5B,IAAI,EAAE,sBAAsB;SAC7B;QACD,OAAO,EAAE;YACP,UAAU,EAAE,+BAA+B;YAC3C,IAAI,EAAE,yBAAyB;YAC/B,IAAI,EAAE,yBAAyB;SAChC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,+BAA+B;YAC3C,IAAI,EAAE,yBAAyB;YAC/B,IAAI,EAAE,yBAAyB;SAChC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,+BAA+B;YAC3C,IAAI,EAAE,yBAAyB;YAC/B,IAAI,EAAE,yBAAyB;SAChC;KACF,CAAA;AACH,CAAC","sourcesContent":["import { useTheme } from '../../../hooks'\n\n// =================================\n// ====== Exports ==================\n// =================================\n\nexport { useStatusColorAppearanceMap }\nexport type { StatusAppearanceUnion }\n\n// =================================\n// ====== Constants ================\n// =================================\n\nconst STATUS_APPEARANCES = {\n error: 'error',\n info: 'info',\n neutral: 'neutral',\n success: 'success',\n warning: 'warning',\n} as const\n\ntype StatusAppearanceUnion = (typeof STATUS_APPEARANCES)[keyof typeof STATUS_APPEARANCES]\n\ntype StatusAppearanceColors = Record<\n StatusAppearanceUnion,\n {\n background: string\n text: string\n icon: string\n }\n>\n\n// =================================\n// ====== Hooks ====================\n// =================================\n\nfunction useStatusColorAppearanceMap(): StatusAppearanceColors {\n const {\n colors: {\n statusErrorComposedBackground,\n statusErrorComposedText,\n statusErrorComposedIcon,\n statusInfoComposedBackground,\n statusInfoComposedText,\n statusInfoComposedIcon,\n statusNeutralComposedBackground,\n statusNeutralComposedText,\n statusNeutralComposedIcon,\n statusSuccessComposedBackground,\n statusSuccessComposedText,\n statusSuccessComposedIcon,\n statusWarningComposedBackground,\n statusWarningComposedText,\n statusWarningComposedIcon,\n },\n } = useTheme()\n\n return {\n error: {\n background: statusErrorComposedBackground,\n text: statusErrorComposedText,\n icon: statusErrorComposedIcon,\n },\n info: {\n background: statusInfoComposedBackground,\n text: statusInfoComposedText,\n icon: statusInfoComposedIcon,\n },\n neutral: {\n background: statusNeutralComposedBackground,\n text: statusNeutralComposedText,\n icon: statusNeutralComposedIcon,\n },\n success: {\n background: statusSuccessComposedBackground,\n text: statusSuccessComposedText,\n icon: statusSuccessComposedIcon,\n },\n warning: {\n background: statusWarningComposedBackground,\n text: statusWarningComposedText,\n icon: statusWarningComposedIcon,\n },\n }\n}\n"]}
1
+ {"version":3,"file":"status_colors.js","sourceRoot":"","sources":["../../../../src/components/display/utils/status_colors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAElC,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AAEpC,OAAO,EAAE,2BAA2B,EAAE,CAAA;AAGtC,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AAEpC,MAAM,kBAAkB,GAAG;IACzB,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;CACV,CAAA;AAaV,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AAEpC,SAAS,2BAA2B;IAClC,MAAM,EACJ,MAAM,EAAE,EACN,6BAA6B,EAC7B,uBAAuB,EACvB,uBAAuB,EACvB,4BAA4B,EAC5B,sBAAsB,EACtB,sBAAsB,EACtB,+BAA+B,EAC/B,yBAAyB,EACzB,yBAAyB,EACzB,+BAA+B,EAC/B,yBAAyB,EACzB,yBAAyB,EACzB,+BAA+B,EAC/B,yBAAyB,EACzB,yBAAyB,GAC1B,GACF,GAAG,QAAQ,EAAE,CAAA;IAEd,OAAO;QACL,KAAK,EAAE;YACL,UAAU,EAAE,6BAA6B;YACzC,IAAI,EAAE,uBAAuB;YAC7B,IAAI,EAAE,uBAAuB;SAC9B;QACD,IAAI,EAAE;YACJ,UAAU,EAAE,4BAA4B;YACxC,IAAI,EAAE,sBAAsB;YAC5B,IAAI,EAAE,sBAAsB;SAC7B;QACD,OAAO,EAAE;YACP,UAAU,EAAE,+BAA+B;YAC3C,IAAI,EAAE,yBAAyB;YAC/B,IAAI,EAAE,yBAAyB;SAChC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,+BAA+B;YAC3C,IAAI,EAAE,yBAAyB;YAC/B,IAAI,EAAE,yBAAyB;SAChC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,+BAA+B;YAC3C,IAAI,EAAE,yBAAyB;YAC/B,IAAI,EAAE,yBAAyB;SAChC;KACF,CAAA;AACH,CAAC","sourcesContent":["import { useTheme } from '@/hooks'\n\n// =================================\n// ====== Exports ==================\n// =================================\n\nexport { useStatusColorAppearanceMap }\nexport type { StatusAppearanceUnion }\n\n// =================================\n// ====== Constants ================\n// =================================\n\nconst STATUS_APPEARANCES = {\n error: 'error',\n info: 'info',\n neutral: 'neutral',\n success: 'success',\n warning: 'warning',\n} as const\n\ntype StatusAppearanceUnion = (typeof STATUS_APPEARANCES)[keyof typeof STATUS_APPEARANCES]\n\ntype StatusAppearanceColors = Record<\n StatusAppearanceUnion,\n {\n background: string\n text: string\n icon: string\n }\n>\n\n// =================================\n// ====== Hooks ====================\n// =================================\n\nfunction useStatusColorAppearanceMap(): StatusAppearanceColors {\n const {\n colors: {\n statusErrorComposedBackground,\n statusErrorComposedText,\n statusErrorComposedIcon,\n statusInfoComposedBackground,\n statusInfoComposedText,\n statusInfoComposedIcon,\n statusNeutralComposedBackground,\n statusNeutralComposedText,\n statusNeutralComposedIcon,\n statusSuccessComposedBackground,\n statusSuccessComposedText,\n statusSuccessComposedIcon,\n statusWarningComposedBackground,\n statusWarningComposedText,\n statusWarningComposedIcon,\n },\n } = useTheme()\n\n return {\n error: {\n background: statusErrorComposedBackground,\n text: statusErrorComposedText,\n icon: statusErrorComposedIcon,\n },\n info: {\n background: statusInfoComposedBackground,\n text: statusInfoComposedText,\n icon: statusInfoComposedIcon,\n },\n neutral: {\n background: statusNeutralComposedBackground,\n text: statusNeutralComposedText,\n icon: statusNeutralComposedIcon,\n },\n success: {\n background: statusSuccessComposedBackground,\n text: statusSuccessComposedText,\n icon: statusSuccessComposedIcon,\n },\n warning: {\n background: statusWarningComposedBackground,\n text: statusWarningComposedText,\n icon: statusWarningComposedIcon,\n },\n }\n}\n"]}
@@ -1,11 +1,11 @@
1
1
  import { View, StyleSheet } from 'react-native';
2
- import { IconButton } from './icon_button';
3
- import { useTheme } from '../../hooks';
4
2
  import { Icon } from './icon';
5
- import { Text } from './text';
6
- import { platformFontWeightMedium } from '../../utils';
3
+ import { IconButton } from './icon_button';
7
4
  import { Spinner } from './spinner';
8
- import { tokens } from '../../vendor/tapestry/tokens';
5
+ import { Text } from './text';
6
+ import { useTheme } from '@/hooks';
7
+ import { platformFontWeightMedium } from '@/utils';
8
+ import { tokens } from '@/vendor/tapestry/tokens';
9
9
  export const VideoAttachmentPreview = ({ name, duration, onRemovePress, loading = false, error = false, hideRemoveButton = false, }) => {
10
10
  const styles = useStyles({ error });
11
11
  if (loading) {
@@ -1 +1 @@
1
- {"version":3,"file":"video_attachment_preview.js","sourceRoot":"","sources":["../../../src/components/display/video_attachment_preview.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,UAAU,EAAE,MAA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E;YACT,SAAS,EAAE,YAAY;SACxB;QACD,UAAU,EAAE;YACV,eAAe,EAAE,MAAM,CAAC,iBAAiB;YACzC,QAAQ,EAAE,UAAU;YACpB,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,CAAC;YACT,sBAAsB,EAAE,YAAY;YACpC,OAAO,EAAE,CAAC;SACX;QACD,SAAS,EAAE;YACT,KAAK,EAAE,MAAM,CAAC,oBAAoB;YAClC,SAAS,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC;YAC9B,QAAQ,EAAE,EAAE;SACb;QACD,OAAO,EAAE;YACP,gBAAgB,EAAE,MAAM;SACzB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { View, StyleSheet } from 'react-native'\nimport { IconButton } from './icon_button'\nimport { useTheme } from '../../hooks'\nimport { Icon } from './icon'\nimport { Text } from './text'\nimport { platformFontWeightMedium } from '../../utils'\nimport { Spinner } from './spinner'\nimport { tokens } from '../../vendor/tapestry/tokens'\n\ninterface VideoAttachmentPreviewProps {\n name: string\n duration?: string\n onRemovePress: () => void\n loading?: boolean\n error?: boolean\n hideRemoveButton?: boolean\n}\n\nexport const VideoAttachmentPreview = ({\n name,\n duration,\n onRemovePress,\n loading = false,\n error = false,\n hideRemoveButton = false,\n}: VideoAttachmentPreviewProps) => {\n const styles = useStyles({ error })\n\n if (loading) {\n return (\n <View style={styles.container}>\n <Spinner size={20} style={styles.spinner} />\n </View>\n )\n }\n\n return (\n <View style={styles.container}>\n <View style={styles.contentContainer}>\n <Icon name=\"general.outlinedVideoFile\" size={18} style={styles.fileIcon} />\n <View style={styles.textContainer}>\n <Text\n variant=\"tertiary\"\n numberOfLines={1}\n style={styles.nameText}\n accessibilityLabel={`Video attachment: ${name}`}\n >\n {name}\n </Text>\n {duration && (\n <Text\n variant=\"tertiary\"\n numberOfLines={1}\n style={styles.durationText}\n accessibilityLabel={`Duration: ${duration}`}\n >\n {duration}\n </Text>\n )}\n </View>\n </View>\n {!hideRemoveButton && (\n <IconButton\n name=\"general.x\"\n onPress={onRemovePress}\n size=\"xxs\"\n appearance=\"neutral\"\n style={styles.closeButton}\n accessibilityLabel=\"Remove video attachment\"\n />\n )}\n {error && (\n <View style={styles.errorBadge}>\n <Icon name=\"general.exclamationTriangle\" size={12} style={styles.errorIcon} />\n </View>\n )}\n </View>\n )\n}\n\nconst useStyles = ({ error }: Partial<VideoAttachmentPreviewProps>) => {\n const { colors } = useTheme()\n const borderRadius = 8\n\n return StyleSheet.create({\n container: {\n height: 60,\n minWidth: 150,\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n gap: 8,\n backgroundColor: colors.fillColorNeutral070,\n borderColor: error ? colors.statusErrorBorder : colors.borderColorDefaultBase,\n borderWidth: error ? 2 : 1,\n borderRadius,\n padding: 4,\n },\n contentContainer: {\n flexDirection: 'row',\n gap: 8,\n alignItems: 'center',\n flexShrink: 1,\n paddingHorizontal: 8,\n paddingVertical: 4,\n },\n textContainer: {\n flexShrink: 1,\n flexDirection: 'column',\n },\n fileIcon: {\n color: error ? colors.iconColorDefaultDisabled : colors.iconColorDefaultPrimary,\n },\n nameText: {\n color: error ? colors.textColorDefaultDisabled : colors.textColorDefaultPrimary,\n fontWeight: platformFontWeightMedium,\n flexShrink: 1,\n },\n durationText: {\n color: error ? colors.textColorDefaultDisabled : colors.textColorDefaultPrimary,\n },\n closeButton: {\n backgroundColor: colors.fillColorNeutral050Base,\n borderRadius: 16,\n height: 20,\n width: 20,\n alignSelf: 'flex-start',\n },\n errorBadge: {\n backgroundColor: colors.statusErrorBorder,\n position: 'absolute',\n bottom: 0,\n right: 0,\n zIndex: 2,\n borderStartStartRadius: borderRadius,\n padding: 4,\n },\n errorIcon: {\n color: tokens.colorNeutral100White,\n transform: [{ translateX: 1 }],\n fontSize: 10,\n },\n spinner: {\n marginHorizontal: 'auto',\n },\n })\n}\n"]}
1
+ {"version":3,"file":"video_attachment_preview.js","s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MAAM,CAAC,uBAAuB;SAChF;QACD,WAAW,EAAE;YACX,eAAe,EAAE,MAAM,CAAC,uBAAuB;YAC/C,YAAY,EAAE,EAAE;YAChB,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,EAAE;YACT,SAAS,EAAE,YAAY;SACxB;QACD,UAAU,EAAE;YACV,eAAe,EAAE,MAAM,CAAC,iBAAiB;YACzC,QAAQ,EAAE,UAAU;YACpB,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,CAAC;YACT,sBAAsB,EAAE,YAAY;YACpC,OAAO,EAAE,CAAC;SACX;QACD,SAAS,EAAE;YACT,KAAK,EAAE,MAAM,CAAC,oBAAoB;YAClC,SAAS,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC;YAC9B,QAAQ,EAAE,EAAE;SACb;QACD,OAAO,EAAE;YACP,gBAAgB,EAAE,MAAM;SACzB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { View, StyleSheet } from 'react-native'\nimport { Icon } from './icon'\nimport { IconButton } from './icon_button'\nimport { Spinner } from './spinner'\nimport { Text } from './text'\nimport { useTheme } from '@/hooks'\nimport { platformFontWeightMedium } from '@/utils'\nimport { tokens } from '@/vendor/tapestry/tokens'\n\ninterface VideoAttachmentPreviewProps {\n name: string\n duration?: string\n onRemovePress: () => void\n loading?: boolean\n error?: boolean\n hideRemoveButton?: boolean\n}\n\nexport const VideoAttachmentPreview = ({\n name,\n duration,\n onRemovePress,\n loading = false,\n error = false,\n hideRemoveButton = false,\n}: VideoAttachmentPreviewProps) => {\n const styles = useStyles({ error })\n\n if (loading) {\n return (\n <View style={styles.container}>\n <Spinner size={20} style={styles.spinner} />\n </View>\n )\n }\n\n return (\n <View style={styles.container}>\n <View style={styles.contentContainer}>\n <Icon name=\"general.outlinedVideoFile\" size={18} style={styles.fileIcon} />\n <View style={styles.textContainer}>\n <Text\n variant=\"tertiary\"\n numberOfLines={1}\n style={styles.nameText}\n accessibilityLabel={`Video attachment: ${name}`}\n >\n {name}\n </Text>\n {duration && (\n <Text\n variant=\"tertiary\"\n numberOfLines={1}\n style={styles.durationText}\n accessibilityLabel={`Duration: ${duration}`}\n >\n {duration}\n </Text>\n )}\n </View>\n </View>\n {!hideRemoveButton && (\n <IconButton\n name=\"general.x\"\n onPress={onRemovePress}\n size=\"xxs\"\n appearance=\"neutral\"\n style={styles.closeButton}\n accessibilityLabel=\"Remove video attachment\"\n />\n )}\n {error && (\n <View style={styles.errorBadge}>\n <Icon name=\"general.exclamationTriangle\" size={12} style={styles.errorIcon} />\n </View>\n )}\n </View>\n )\n}\n\nconst useStyles = ({ error }: Partial<VideoAttachmentPreviewProps>) => {\n const { colors } = useTheme()\n const borderRadius = 8\n\n return StyleSheet.create({\n container: {\n height: 60,\n minWidth: 150,\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n gap: 8,\n backgroundColor: colors.fillColorNeutral070,\n borderColor: error ? colors.statusErrorBorder : colors.borderColorDefaultBase,\n borderWidth: error ? 2 : 1,\n borderRadius,\n padding: 4,\n },\n contentContainer: {\n flexDirection: 'row',\n gap: 8,\n alignItems: 'center',\n flexShrink: 1,\n paddingHorizontal: 8,\n paddingVertical: 4,\n },\n textContainer: {\n flexShrink: 1,\n flexDirection: 'column',\n },\n fileIcon: {\n color: error ? colors.iconColorDefaultDisabled : colors.iconColorDefaultPrimary,\n },\n nameText: {\n color: error ? colors.textColorDefaultDisabled : colors.textColorDefaultPrimary,\n fontWeight: platformFontWeightMedium,\n flexShrink: 1,\n },\n durationText: {\n color: error ? colors.textColorDefaultDisabled : colors.textColorDefaultPrimary,\n },\n closeButton: {\n backgroundColor: colors.fillColorNeutral050Base,\n borderRadius: 16,\n height: 20,\n width: 20,\n alignSelf: 'flex-start',\n },\n errorBadge: {\n backgroundColor: colors.statusErrorBorder,\n position: 'absolute',\n bottom: 0,\n right: 0,\n zIndex: 2,\n borderStartStartRadius: borderRadius,\n padding: 4,\n },\n errorIcon: {\n color: tokens.colorNeutral100White,\n transform: [{ translateX: 1 }],\n fontSize: 10,\n },\n spinner: {\n marginHorizontal: 'auto',\n },\n })\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { ViewStyle } from 'react-native';
3
- import { ConversationRequestArgs } from '../utils/request/conversation';
3
+ import { ConversationRequestArgs } from '@/utils/request/conversation';
4
4
  interface GroupConversationsProps extends Partial<ConversationRequestArgs> {
5
5
  limit?: number;
6
6
  onConversationPress: (conversation: any) => void;