@btndprojects/loam-ui-native 0.2.1 → 0.3.1

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 (365) hide show
  1. package/dist/accordion/index.js +4 -2
  2. package/dist/adaptive/index.js +12 -2
  3. package/dist/address-block/index.js +23 -0
  4. package/dist/alert/index.js +5 -2
  5. package/dist/analyzer/index.js +13 -5
  6. package/dist/announcement/index.js +15 -5
  7. package/dist/appearance-picker/index.js +15 -0
  8. package/dist/audio-player/index.js +26 -2
  9. package/dist/avatar/index.js +2 -2
  10. package/dist/avatar-group/index.js +5 -3
  11. package/dist/badge/index.js +6 -3
  12. package/dist/banner/index.js +3 -2
  13. package/dist/board/index.js +13 -6
  14. package/dist/button/index.js +6 -3
  15. package/dist/camera-permission/index.js +19 -11
  16. package/dist/capture-result/index.js +26 -16
  17. package/dist/card/index.js +7 -3
  18. package/dist/card-form/index.js +15 -9
  19. package/dist/carousel/index.js +3 -1
  20. package/dist/chart/index.js +15 -5
  21. package/dist/charts/index.js +18 -5
  22. package/dist/chat/index.js +35 -10
  23. package/dist/checkbox/index.js +6 -4
  24. package/dist/checklist/index.js +16 -7
  25. package/dist/checkout/index.js +25 -12
  26. package/dist/chip/index.js +7 -4
  27. package/dist/chunk-2BZD3NAP.js +1110 -0
  28. package/dist/chunk-2YKVID2V.js +35 -0
  29. package/dist/{chunk-H7DWSL4O.js → chunk-36DA3IPO.js} +115 -27
  30. package/dist/chunk-3A56MIAN.js +599 -0
  31. package/dist/{chunk-AEB7KCHQ.js → chunk-3SCKCWF5.js} +39 -28
  32. package/dist/chunk-3TZNDHKO.js +187 -0
  33. package/dist/chunk-43K3BLXV.js +9 -0
  34. package/dist/chunk-46ZJIQ2Z.js +208 -0
  35. package/dist/{chunk-PMMTGBBS.js → chunk-4CZMQDQL.js} +75 -22
  36. package/dist/chunk-4QCR3K2J.js +1 -0
  37. package/dist/{chunk-E2E3I5W2.js → chunk-5DTKORLI.js} +54 -45
  38. package/dist/{chunk-5VFZRGVD.js → chunk-5J4WFXFA.js} +32 -15
  39. package/dist/{chunk-JBMLWFSJ.js → chunk-5KJ7TEQ6.js} +83 -48
  40. package/dist/chunk-5NU33TXK.js +529 -0
  41. package/dist/chunk-6KSUS7DF.js +690 -0
  42. package/dist/{chunk-3WEZCGHX.js → chunk-6RV6UW2J.js} +140 -56
  43. package/dist/chunk-6RZM7RP2.js +520 -0
  44. package/dist/{chunk-JJLPBRVZ.js → chunk-75BDCC7K.js} +2 -0
  45. package/dist/{chunk-U5NLHYV6.js → chunk-7CGJBQUA.js} +333 -22
  46. package/dist/{chunk-I4FHVKEC.js → chunk-7IVF6JLJ.js} +16 -5
  47. package/dist/chunk-7IWCGXYA.js +143 -0
  48. package/dist/chunk-7LM4ASFH.js +172 -0
  49. package/dist/chunk-7MCEJFWV.js +341 -0
  50. package/dist/{chunk-2SY63FCH.js → chunk-7NGMUVNU.js} +66 -30
  51. package/dist/chunk-7PBSIXT7.js +355 -0
  52. package/dist/chunk-7QOYGENL.js +443 -0
  53. package/dist/{chunk-TDMG26JI.js → chunk-A7SWYDE5.js} +40 -9
  54. package/dist/chunk-ADHPJALR.js +3051 -0
  55. package/dist/{chunk-ZLTO5VQI.js → chunk-ALJYZLNQ.js} +131 -61
  56. package/dist/{chunk-GDKVKNR2.js → chunk-AQ5FIG74.js} +110 -30
  57. package/dist/chunk-B2MMZZQB.js +426 -0
  58. package/dist/{chunk-QYPE5JX3.js → chunk-B7JZ3N5G.js} +142 -105
  59. package/dist/{chunk-QHTVYA65.js → chunk-BL37SW6G.js} +388 -102
  60. package/dist/chunk-BTRMA7GC.js +21 -0
  61. package/dist/{chunk-FUMHAAF3.js → chunk-C7IUWIUZ.js} +243 -92
  62. package/dist/chunk-CA3DUVYD.js +10 -0
  63. package/dist/{chunk-FYWNRX4F.js → chunk-CBCJSO2B.js} +143 -13
  64. package/dist/chunk-CHPX4MFI.js +239 -0
  65. package/dist/chunk-CLGAMIOT.js +648 -0
  66. package/dist/chunk-CUE7VML6.js +1141 -0
  67. package/dist/{chunk-D5N5QWI7.js → chunk-CVU6S2E5.js} +497 -235
  68. package/dist/{chunk-U23FYWME.js → chunk-CXPQMA6Z.js} +101 -34
  69. package/dist/{chunk-36EC2T6P.js → chunk-D2LN4I7I.js} +1 -1
  70. package/dist/{chunk-TLCIR6RG.js → chunk-D34LNBO5.js} +411 -155
  71. package/dist/{chunk-FV6HMP7W.js → chunk-D4BCQICM.js} +207 -65
  72. package/dist/chunk-EABKIIA4.js +1 -0
  73. package/dist/chunk-EICSYRAG.js +341 -0
  74. package/dist/chunk-EMWAJMAS.js +83 -0
  75. package/dist/chunk-EOLZWRV6.js +149 -0
  76. package/dist/chunk-EOQVTGB6.js +350 -0
  77. package/dist/{chunk-ZVATDZOM.js → chunk-ESGUHNB2.js} +106 -28
  78. package/dist/{chunk-46MMSDGL.js → chunk-F2KNBPKY.js} +104 -73
  79. package/dist/{chunk-KQZ3GLHR.js → chunk-G7H3NX3G.js} +40 -17
  80. package/dist/{chunk-3QMEOFW5.js → chunk-GM7YIPB7.js} +421 -207
  81. package/dist/{chunk-QHAITQIF.js → chunk-GVQQG435.js} +256 -86
  82. package/dist/chunk-HE43OMEL.js +1056 -0
  83. package/dist/{chunk-XIDTBCBA.js → chunk-HHOMFQ7R.js} +1049 -207
  84. package/dist/chunk-HNAKS4Z3.js +207 -0
  85. package/dist/chunk-HP6ST2OW.js +352 -0
  86. package/dist/chunk-HW3OWDTU.js +1 -0
  87. package/dist/{chunk-QP3KMOVF.js → chunk-HZDB44K4.js} +24 -14
  88. package/dist/chunk-I6CUP2LW.js +1155 -0
  89. package/dist/chunk-ICV4Y2WY.js +27 -0
  90. package/dist/chunk-IHSIENOE.js +3950 -0
  91. package/dist/{chunk-T5LTPKX6.js → chunk-IMMALLRU.js} +53 -25
  92. package/dist/{chunk-C4GTDLRC.js → chunk-JA6TK7H2.js} +154 -67
  93. package/dist/{chunk-EVOIGUBI.js → chunk-JAVZ5JPV.js} +43 -13
  94. package/dist/{chunk-CPTOADB2.js → chunk-JCMTP3E4.js} +527 -201
  95. package/dist/{chunk-OJQUBQWA.js → chunk-JCXFFK64.js} +73 -16
  96. package/dist/{chunk-V2OEB75Z.js → chunk-JWCVBFDU.js} +75 -35
  97. package/dist/chunk-JXRTD5RI.js +414 -0
  98. package/dist/chunk-JYIUZUIQ.js +1567 -0
  99. package/dist/chunk-K3TK3GIV.js +219 -0
  100. package/dist/chunk-KEVZIHM2.js +1511 -0
  101. package/dist/{chunk-VAOAKWUK.js → chunk-KHZDNQQD.js} +42 -8
  102. package/dist/chunk-KL4GDV4V.js +131 -0
  103. package/dist/{chunk-Q6NKEPRE.js → chunk-KNILMM4H.js} +73 -28
  104. package/dist/chunk-KRBUZV45.js +25 -0
  105. package/dist/{chunk-7BUIKDD6.js → chunk-KXLDK6HB.js} +91 -30
  106. package/dist/chunk-KZ3X7TSL.js +196 -0
  107. package/dist/{chunk-5UTRIXQ6.js → chunk-L2WMOA2V.js} +187 -43
  108. package/dist/chunk-L4D5LHCH.js +109 -0
  109. package/dist/{chunk-W63AJTM7.js → chunk-LAUJPLDB.js} +236 -71
  110. package/dist/{chunk-TN2ZNJUI.js → chunk-LGNTP5XA.js} +47 -13
  111. package/dist/chunk-LUZFCCSD.js +271 -0
  112. package/dist/{chunk-XTORZWRF.js → chunk-LXJCP4PL.js} +111 -30
  113. package/dist/chunk-MCOZJWPU.js +731 -0
  114. package/dist/{chunk-SATMR6SG.js → chunk-MG4SKWLL.js} +780 -142
  115. package/dist/{chunk-JUYWSSKW.js → chunk-MPEPTSER.js} +95 -16
  116. package/dist/chunk-MWPJ4YGP.js +1 -0
  117. package/dist/{chunk-LUMVGO2K.js → chunk-N7AX4OA4.js} +80 -29
  118. package/dist/chunk-NHSLM6SE.js +523 -0
  119. package/dist/{chunk-IT6FUXXG.js → chunk-NNJLVA7M.js} +43 -11
  120. package/dist/{chunk-TQVAIKFD.js → chunk-NZG75DGA.js} +102 -62
  121. package/dist/chunk-O76QXRBV.js +431 -0
  122. package/dist/chunk-OANH27AK.js +223 -0
  123. package/dist/chunk-OCHPK5YV.js +609 -0
  124. package/dist/chunk-OMHVEVX4.js +436 -0
  125. package/dist/{chunk-SWS5JQIF.js → chunk-ONKQUJWD.js} +187 -60
  126. package/dist/chunk-OVTK7A6T.js +615 -0
  127. package/dist/{chunk-UXGIW7OK.js → chunk-PCEFCOLN.js} +5 -1
  128. package/dist/{chunk-QIKT7LIB.js → chunk-PFLNFIVB.js} +91 -23
  129. package/dist/chunk-PHSZY37H.js +300 -0
  130. package/dist/chunk-PJLTKDVY.js +18 -0
  131. package/dist/{chunk-SHHY5OMK.js → chunk-PK7BN3MI.js} +83 -15
  132. package/dist/{chunk-YXOAPXMU.js → chunk-PWFRDRGS.js} +101 -14
  133. package/dist/{chunk-TY4MTKQJ.js → chunk-PYPMD46W.js} +332 -66
  134. package/dist/chunk-Q6CCHDI7.js +331 -0
  135. package/dist/chunk-QFA5WS2A.js +750 -0
  136. package/dist/chunk-QJMMM4RC.js +124 -0
  137. package/dist/chunk-QYWEVAM6.js +407 -0
  138. package/dist/chunk-R5T4VZ7Z.js +126 -0
  139. package/dist/chunk-R77HFLZD.js +1 -0
  140. package/dist/{chunk-LMPHCVJJ.js → chunk-RAESDNU5.js} +162 -68
  141. package/dist/chunk-RBYQUXNL.js +1 -0
  142. package/dist/chunk-RCM3DT5E.js +1 -0
  143. package/dist/chunk-RGNY56L7.js +282 -0
  144. package/dist/chunk-RIK6UX2K.js +344 -0
  145. package/dist/{chunk-5LAAAXFP.js → chunk-RJA3RXO3.js} +63 -54
  146. package/dist/chunk-RJYRJ3LD.js +1 -0
  147. package/dist/chunk-RMA3NOY4.js +599 -0
  148. package/dist/{chunk-VDPK5CY4.js → chunk-RSWKKAHK.js} +143 -61
  149. package/dist/{chunk-B7N4ASYE.js → chunk-RVOIIX3V.js} +17 -45
  150. package/dist/chunk-SA2RRBGT.js +1077 -0
  151. package/dist/{chunk-7OVVSVEZ.js → chunk-SG3J4R45.js} +440 -169
  152. package/dist/chunk-SPUK7JD4.js +238 -0
  153. package/dist/chunk-SWXV2K5N.js +434 -0
  154. package/dist/chunk-SYJEPXP6.js +1303 -0
  155. package/dist/{chunk-LKFC4CS7.js → chunk-SZLI34TA.js} +18 -9
  156. package/dist/{chunk-NBEF4EPJ.js → chunk-T77WJA74.js} +131 -16
  157. package/dist/chunk-TDWWVJA4.js +630 -0
  158. package/dist/chunk-TFHI5XDR.js +610 -0
  159. package/dist/chunk-TH4PW2WU.js +17 -0
  160. package/dist/chunk-TTQ24HQX.js +12 -0
  161. package/dist/chunk-TUACVJNG.js +12 -0
  162. package/dist/{chunk-F5B3UINI.js → chunk-TUL5RUIA.js} +171 -62
  163. package/dist/{chunk-C6APNDVA.js → chunk-TYOSA7JG.js} +63 -34
  164. package/dist/chunk-TYQTMMEV.js +1 -0
  165. package/dist/{chunk-DW3L54DQ.js → chunk-TZO6YDS7.js} +53 -12
  166. package/dist/{chunk-67IZZ2MJ.js → chunk-U3ETF22F.js} +75 -30
  167. package/dist/{chunk-EDCBJV7J.js → chunk-U6BYHD2N.js} +87 -31
  168. package/dist/{chunk-ENP3BMZU.js → chunk-UF6EJXPQ.js} +16 -1
  169. package/dist/{chunk-IPUNJMAQ.js → chunk-UNNQIPGK.js} +304 -68
  170. package/dist/chunk-UQVO6AJV.js +171 -0
  171. package/dist/{chunk-FZGAAOKS.js → chunk-VFDQAAIW.js} +138 -32
  172. package/dist/chunk-VIUE3VQT.js +1 -0
  173. package/dist/{chunk-5RENVKBQ.js → chunk-VJLSSSGC.js} +126 -30
  174. package/dist/chunk-VLMT6KYT.js +350 -0
  175. package/dist/chunk-VMHGBUGS.js +35 -0
  176. package/dist/{chunk-4IZXHVFJ.js → chunk-VQKPBYW6.js} +228 -172
  177. package/dist/{chunk-G6UESEVN.js → chunk-VSSTWLC5.js} +49 -11
  178. package/dist/{chunk-TRGFFU6A.js → chunk-VZYYZRPN.js} +866 -330
  179. package/dist/{chunk-JLC6PM5S.js → chunk-WAIJCD2V.js} +128 -54
  180. package/dist/chunk-WFMQ3WKM.js +378 -0
  181. package/dist/chunk-WJ2KDRMY.js +66 -0
  182. package/dist/chunk-WKFZJO54.js +437 -0
  183. package/dist/{chunk-QEYFDRHR.js → chunk-WVVD3XOV.js} +146 -84
  184. package/dist/chunk-XAIWMSLB.js +1 -0
  185. package/dist/chunk-XBXUBBJZ.js +98 -0
  186. package/dist/chunk-XCU7MYBJ.js +1 -0
  187. package/dist/chunk-XHE4PGCI.js +717 -0
  188. package/dist/chunk-XRSJ32M3.js +331 -0
  189. package/dist/chunk-XTCVOEAW.js +1 -0
  190. package/dist/chunk-XWGXVQF6.js +58 -0
  191. package/dist/{chunk-MKSNFG7H.js → chunk-Y3XKKO5K.js} +191 -109
  192. package/dist/chunk-Y4QNMBLO.js +533 -0
  193. package/dist/chunk-Y5H4CTKO.js +1 -0
  194. package/dist/chunk-YBQIN75A.js +403 -0
  195. package/dist/{chunk-PNF3NKB5.js → chunk-YJ5PXOX3.js} +28 -11
  196. package/dist/{chunk-M656FYNH.js → chunk-YLRSRUPS.js} +63 -49
  197. package/dist/chunk-YM6MPJ4A.js +1 -0
  198. package/dist/chunk-YV7KZENV.js +200 -0
  199. package/dist/chunk-Z7I4ZSO6.js +316 -0
  200. package/dist/{chunk-EY4DD67D.js → chunk-ZIRMWD2B.js} +199 -126
  201. package/dist/chunk-ZPMG3FWU.js +75 -0
  202. package/dist/{chunk-QRUMA22E.js → chunk-ZTXMK2G7.js} +92 -43
  203. package/dist/{chunk-2OLKPG4E.js → chunk-ZVJCWXAL.js} +189 -87
  204. package/dist/{chunk-YAAHPATV.js → chunk-ZYQ23DPT.js} +49 -34
  205. package/dist/coachmark/index.js +7 -3
  206. package/dist/code-block/index.js +4 -3
  207. package/dist/color-field/index.js +12 -4
  208. package/dist/color-picker/index.js +23 -0
  209. package/dist/commerce/index.js +27 -16
  210. package/dist/confirm/index.js +31 -0
  211. package/dist/connection-card/index.js +34 -0
  212. package/dist/connectivity/index.js +3 -2
  213. package/dist/context-menu/index.js +10 -2
  214. package/dist/copy-button/index.js +3 -2
  215. package/dist/data-grid/index.js +30 -17
  216. package/dist/date-range-picker/index.js +19 -9
  217. package/dist/description-list/index.js +4 -1
  218. package/dist/device-frame/index.js +30 -0
  219. package/dist/dialog/index.js +8 -2
  220. package/dist/divider/index.js +2 -0
  221. package/dist/empty-state/index.js +13 -2
  222. package/dist/error-summary/index.js +7 -2
  223. package/dist/fab/index.js +4 -2
  224. package/dist/file-manager/index.js +33 -17
  225. package/dist/file-upload/index.js +12 -6
  226. package/dist/filter-bar/index.js +10 -6
  227. package/dist/flow-run/index.js +19 -12
  228. package/dist/form/index.js +30 -3
  229. package/dist/gallery/index.js +5 -2
  230. package/dist/hold-to-confirm/index.js +4 -2
  231. package/dist/hover-card/index.js +18 -0
  232. package/dist/icon-tile/index.js +10 -0
  233. package/dist/image/index.js +9 -0
  234. package/dist/index.d.ts +29826 -17941
  235. package/dist/index.js +197 -141
  236. package/dist/infinite-list/index.js +4 -2
  237. package/dist/inline-edit/index.js +5 -4
  238. package/dist/input/index.js +4 -3
  239. package/dist/interactions/index.js +4 -1
  240. package/dist/invoice/index.js +18 -9
  241. package/dist/job-row/index.js +22 -0
  242. package/dist/json-inspector/index.js +20 -0
  243. package/dist/kbd/index.js +2 -2
  244. package/dist/keyboard/index.js +7 -2
  245. package/dist/level-meter/index.js +9 -0
  246. package/dist/list-row/index.js +11 -3
  247. package/dist/log-viewer/index.js +9 -2
  248. package/dist/map-view/index.js +13 -2
  249. package/dist/markdown/index.js +8 -5
  250. package/dist/metric/index.js +6 -3
  251. package/dist/metric-strip/index.js +12 -0
  252. package/dist/money/index.js +11 -4
  253. package/dist/nav-drawer/index.js +6 -2
  254. package/dist/nav-header/index.js +10 -4
  255. package/dist/navigation/index.js +29 -2
  256. package/dist/notification-center/index.js +24 -10
  257. package/dist/number-roll/index.js +3 -1
  258. package/dist/onboarding-pager/index.js +22 -0
  259. package/dist/one-handed/index.js +2 -2
  260. package/dist/os-surfaces/index.js +6 -3
  261. package/dist/otp/index.js +5 -4
  262. package/dist/page-header/index.js +2 -1
  263. package/dist/pagination/index.js +4 -2
  264. package/dist/payment-method/index.js +17 -11
  265. package/dist/payment-status/index.js +22 -14
  266. package/dist/permission/index.js +18 -2
  267. package/dist/picker/index.js +17 -6
  268. package/dist/progress/index.js +7 -2
  269. package/dist/provenance/index.js +16 -0
  270. package/dist/pull-to-refresh/index.js +2 -2
  271. package/dist/qr-code/index.js +16 -0
  272. package/dist/query-builder/index.js +30 -0
  273. package/dist/radio-group/index.js +6 -4
  274. package/dist/rating/index.js +7 -2
  275. package/dist/receivables/index.js +31 -18
  276. package/dist/recording-indicator/index.js +21 -0
  277. package/dist/refund/index.js +24 -15
  278. package/dist/repeatable-rows/index.js +19 -0
  279. package/dist/save-status/index.js +5 -3
  280. package/dist/screen/index.js +3 -0
  281. package/dist/scroll-area/index.js +1 -1
  282. package/dist/search-field/index.js +8 -3
  283. package/dist/secret-field/index.js +19 -0
  284. package/dist/section-header/index.js +4 -0
  285. package/dist/segmented-control/index.js +2 -2
  286. package/dist/sheet/index.js +9 -3
  287. package/dist/shortcuts-sheet/index.js +2 -0
  288. package/dist/sign-in-screen/index.js +25 -0
  289. package/dist/skeleton/index.js +3 -1
  290. package/dist/slider/index.js +2 -1
  291. package/dist/sortable/index.js +4 -3
  292. package/dist/spinner/index.js +2 -1
  293. package/dist/split-button/index.js +17 -5
  294. package/dist/spotlight/index.js +7 -1
  295. package/dist/stack/index.js +2 -0
  296. package/dist/stage-timeline/index.js +6 -3
  297. package/dist/status-dot/index.js +6 -2
  298. package/dist/stepper/index.js +7 -3
  299. package/dist/streaming-text/index.js +2 -1
  300. package/dist/survey/index.js +24 -14
  301. package/dist/switch/index.js +6 -2
  302. package/dist/system-state/index.js +12 -4
  303. package/dist/tab-bar/index.js +10 -2
  304. package/dist/tabs/index.js +10 -2
  305. package/dist/tags-input/index.js +8 -5
  306. package/dist/text/index.js +4 -0
  307. package/dist/textarea/index.js +5 -4
  308. package/dist/thinking/index.js +4 -1
  309. package/dist/tile-rail/index.js +10 -0
  310. package/dist/time-field/index.js +15 -7
  311. package/dist/time-range-control/index.js +26 -12
  312. package/dist/timeline/index.js +2 -2
  313. package/dist/toast/index.js +4 -2
  314. package/dist/toolbar/index.js +3 -2
  315. package/dist/tour/index.js +12 -10
  316. package/dist/transcript/index.js +28 -0
  317. package/dist/truncation-notice/index.js +2 -2
  318. package/dist/update-notice/index.js +15 -8
  319. package/dist/video-player/index.js +26 -2
  320. package/dist/viewfinder/index.js +12 -4
  321. package/dist/widget/index.js +11 -4
  322. package/dist/wizard/index.js +7 -4
  323. package/package.json +13 -13
  324. package/dist/chunk-2PKYGLQ6.js +0 -268
  325. package/dist/chunk-2SWKL3AJ.js +0 -466
  326. package/dist/chunk-2TXERVVA.js +0 -1081
  327. package/dist/chunk-3DUWIYV5.js +0 -437
  328. package/dist/chunk-3NMD74ZU.js +0 -4
  329. package/dist/chunk-4DS5ZWVC.js +0 -83
  330. package/dist/chunk-6YAQBXB3.js +0 -93
  331. package/dist/chunk-74FLKD24.js +0 -237
  332. package/dist/chunk-CMTVNF3D.js +0 -104
  333. package/dist/chunk-DN7MNQIP.js +0 -799
  334. package/dist/chunk-DVGBZ3TX.js +0 -455
  335. package/dist/chunk-F3H33DQX.js +0 -300
  336. package/dist/chunk-FAJI7BSC.js +0 -443
  337. package/dist/chunk-G3AFC24V.js +0 -60
  338. package/dist/chunk-HJLPZA4X.js +0 -369
  339. package/dist/chunk-HYEOQWT7.js +0 -647
  340. package/dist/chunk-IDM7JJMO.js +0 -110
  341. package/dist/chunk-IVKMZ7BB.js +0 -326
  342. package/dist/chunk-IXKWIFWZ.js +0 -334
  343. package/dist/chunk-JV5YOTOB.js +0 -164
  344. package/dist/chunk-KFJGFLMW.js +0 -158
  345. package/dist/chunk-LQP4KEXZ.js +0 -214
  346. package/dist/chunk-NTQ2F3AU.js +0 -257
  347. package/dist/chunk-O5V4TG3V.js +0 -329
  348. package/dist/chunk-OWAMM2DK.js +0 -280
  349. package/dist/chunk-PID3NJB7.js +0 -405
  350. package/dist/chunk-QDZGFXQD.js +0 -176
  351. package/dist/chunk-QPWDDJJ4.js +0 -385
  352. package/dist/chunk-ROCUG24E.js +0 -416
  353. package/dist/chunk-RU3ZPNL6.js +0 -1986
  354. package/dist/chunk-RXSCIO6W.js +0 -153
  355. package/dist/chunk-SKWO3SZF.js +0 -2284
  356. package/dist/chunk-UQGBTPXH.js +0 -218
  357. package/dist/chunk-UYGDJWMN.js +0 -273
  358. package/dist/chunk-W74TXYFB.js +0 -107
  359. package/dist/chunk-WRDSPUE7.js +0 -417
  360. package/dist/chunk-XBZGDDMR.js +0 -105
  361. package/dist/chunk-XN4KG3P4.js +0 -1040
  362. package/dist/chunk-XQXMLMH3.js +0 -211
  363. package/dist/chunk-ZECZOOSB.js +0 -245
  364. /package/dist/{chunk-VFCUIDRT.js → chunk-3BKLBYPK.js} +0 -0
  365. /package/dist/{chunk-GEIGMWNF.js → chunk-QNZII37O.js} +0 -0
@@ -1,1040 +0,0 @@
1
- import { RadioGroup, RadioGroupItem } from './chunk-SHHY5OMK.js';
2
- import { SegmentedControl } from './chunk-TQVAIKFD.js';
3
- import { Amount, PriceRow } from './chunk-QHAITQIF.js';
4
- import { Chip } from './chunk-2SY63FCH.js';
5
- import { usePayLabels } from './chunk-GEIGMWNF.js';
6
- import { Checkbox } from './chunk-Q6NKEPRE.js';
7
- import { TextField } from './chunk-7BUIKDD6.js';
8
- import { Badge } from './chunk-TN2ZNJUI.js';
9
- import { Alert } from './chunk-QDZGFXQD.js';
10
- import { NAMED_ROLE, announce } from './chunk-W23G6JLF.js';
11
- import { Button } from './chunk-E2E3I5W2.js';
12
- import { useLabels, useLoamLocale } from './chunk-APCWFOZW.js';
13
- import { Icon } from './chunk-UXGIW7OK.js';
14
- import { useResolvedMotion, springConfig } from './chunk-J64KGCGX.js';
15
- import * as React2 from 'react';
16
- import { View, Text, Animated, AccessibilityInfo } from 'react-native';
17
- import { createStyleSheet, useLoamTheme, useStyles } from '@btndprojects/loam-theme-native';
18
- import { arrivalText, refundRemaining, money, refundLedger, refundReasons, parseAmount, clampRefund, REFUND_FRACTIONS, refundFraction, evidenceTone, evidenceLabel, disputeWorthDefending, DISPUTE_ACCEPT_THRESHOLD_MINOR } from '@btndprojects/loam-pay';
19
- import { jsx, jsxs } from 'react/jsx-runtime';
20
-
21
- // src/refund/refund-labels.ts
22
- var DEFAULT_LABELS = {
23
- issuedTitle: "Refund issued",
24
- refundAnother: "Refund another charge",
25
- title: "Refund",
26
- notify: "Email the customer",
27
- irreversible: "A refund cannot be undone. Check the amount before you issue it.",
28
- modeAria: "Refund amount mode",
29
- modeFull: "Full",
30
- modePartial: "Partial",
31
- fullBalance: "Refunding the full remaining balance",
32
- commit: (amount) => `Refund ${amount}`,
33
- states: {
34
- requested: "Requested",
35
- processing: "Processing",
36
- sent: "Sent",
37
- arrived: "Arrived",
38
- failed: "Failed"
39
- },
40
- of: "of",
41
- stillRefundable: "still refundable",
42
- ledgerCaption: (currency) => `Refund ledger \xB7 ${currency}`,
43
- reason: "Reason",
44
- amount: "Refund amount",
45
- upTo: (max) => `Up to ${max}.`,
46
- capped: (max) => `That is more than the ${max} left, so it was capped.`,
47
- percent: (percent) => `${percent}%`,
48
- fractionAria: (percent, amount) => `Refund ${percent}% \u2014 ${amount}`,
49
- amountMode: "Amount mode",
50
- fullRefund: "Full refund",
51
- partialRefund: "Partial refund",
52
- refunding: "Refunding",
53
- notStated: "Not stated",
54
- customerEmail: "Customer email",
55
- notifyYes: (label) => `${label} \u2014 yes`,
56
- notifyNo: (label) => `${label} \u2014 no`,
57
- announceIssued: (title, amount) => `${title}. ${amount}`,
58
- disputeTitle: "Chargeback",
59
- disputeDescription: "The amount and the network fee have already left the account. Submitting evidence asks the network to reverse the first of those; the fee is not refundable either way, and the network decides \u2014 not us.",
60
- submitEvidence: "Submit evidence",
61
- acceptDispute: "Accept the dispute",
62
- evidence: "Evidence",
63
- attach: "Attach",
64
- days: (n) => `${n} ${n === 1 ? "day" : "days"}`,
65
- toRespond: (due) => `to respond \xB7 evidence due ${due}`,
66
- disputed: "Disputed",
67
- networkFee: "Network fee",
68
- reasonNetwork: (reason, network) => `${reason} \xB7 ${network}`,
69
- opened: "Opened",
70
- guidance: (worth, threshold, complete) => `${worth ? `Above ${threshold} this is usually worth defending \u2014 the amount at stake exceeds the staff time a response costs.` : `Below ${threshold} the staff time spent defending this usually exceeds the amount at stake. Accepting is a legitimate answer, not a loss.`}${complete ? "" : " Some evidence is still missing; submitting now sends what is attached."}`
71
- };
72
- var REFUND_STATE = {
73
- requested: { variant: "neutral" },
74
- processing: { variant: "info" },
75
- sent: { variant: "info" },
76
- arrived: { variant: "good" },
77
- failed: { variant: "danger" }
78
- };
79
- function RefundStatus({
80
- state,
81
- label,
82
- labels: labelsProp
83
- }) {
84
- const labels = useLabels("refund", DEFAULT_LABELS, labelsProp);
85
- const meta = REFUND_STATE[state];
86
- return /* @__PURE__ */ jsx(Badge, { variant: meta.variant, size: "sm", dot: true, children: label ?? labels.states[state] });
87
- }
88
- function RefundArrivalNote({
89
- method,
90
- window: text,
91
- inline = false,
92
- labels: labelsProp,
93
- style
94
- }) {
95
- const pay = usePayLabels(labelsProp);
96
- const theme = useLoamTheme("refund");
97
- const { styles } = useStyles(sheet);
98
- const body = text ?? arrivalText(method, pay);
99
- return /* @__PURE__ */ jsxs(View, { style: [inline ? styles.arrivalInline : styles.arrivalBlock, style], children: [
100
- /* @__PURE__ */ jsx(
101
- Icon,
102
- {
103
- name: "clock",
104
- size: theme.icon.sm,
105
- color: inline ? theme.color.text3 : theme.color.infoOnSoft
106
- }
107
- ),
108
- /* @__PURE__ */ jsx(Text, { style: inline ? styles.arrivalInlineBody : styles.arrivalBlockBody, children: body })
109
- ] });
110
- }
111
- function RefundRemainingNote({
112
- charge,
113
- currency,
114
- label: labelProp,
115
- locale: localeProp,
116
- labels: labelsProp,
117
- style
118
- }) {
119
- const labels = useLabels("refund", DEFAULT_LABELS, labelsProp);
120
- const providerLocale = useLoamLocale();
121
- const locale = localeProp ?? providerLocale;
122
- const label = labelProp ?? labels.stillRefundable;
123
- const { styles } = useStyles(sheet);
124
- const code = currency ?? charge.currency ?? "USD";
125
- return /* @__PURE__ */ jsxs(
126
- View,
127
- {
128
- accessible: true,
129
- accessibilityRole: NAMED_ROLE,
130
- accessibilityLabel: `${money(refundRemaining(charge), code, { locale })} ${labels.of} ${money(charge.amountMinor, code, { locale })} ${label}`,
131
- style: [styles.remaining, style],
132
- children: [
133
- /* @__PURE__ */ jsx(
134
- Amount,
135
- {
136
- minor: refundRemaining(charge),
137
- currency: code,
138
- size: "sm",
139
- weight: "bold",
140
- locale
141
- }
142
- ),
143
- /* @__PURE__ */ jsx(Text, { style: styles.remainingWord, children: labels.of }),
144
- /* @__PURE__ */ jsx(Amount, { minor: charge.amountMinor, currency: code, size: "sm", locale }),
145
- /* @__PURE__ */ jsx(Text, { style: styles.remainingWord, children: label })
146
- ]
147
- }
148
- );
149
- }
150
- function RefundLedger({
151
- charge,
152
- next = 0,
153
- currency,
154
- caption,
155
- locale: localeProp,
156
- labels: labelsProp,
157
- style
158
- }) {
159
- const labels = useLabels("refund", DEFAULT_LABELS, labelsProp);
160
- const pay = usePayLabels(labelsProp);
161
- const providerLocale = useLoamLocale();
162
- const locale = localeProp ?? providerLocale;
163
- const { styles } = useStyles(sheet);
164
- const code = currency ?? charge.currency ?? "USD";
165
- const rows = refundLedger(charge, next, pay);
166
- return /* @__PURE__ */ jsxs(View, { style: [styles.ledger, style], children: [
167
- /* @__PURE__ */ jsx(Text, { style: styles.overline, children: caption ?? labels.ledgerCaption(code) }),
168
- rows.map((row) => /* @__PURE__ */ jsx(
169
- PriceRow,
170
- {
171
- label: row.label,
172
- minor: row.amountMinor,
173
- currency: code,
174
- tone: row.tone === "good" ? "good" : void 0,
175
- strong: row.strong,
176
- rule: row.strong,
177
- noSymbol: true,
178
- locale
179
- },
180
- row.label
181
- ))
182
- ] });
183
- }
184
- function RefundReasonList({
185
- value,
186
- onChange,
187
- reasons,
188
- label,
189
- showNotes = true,
190
- labels: labelsProp
191
- }) {
192
- const labels = useLabels("refund", DEFAULT_LABELS, labelsProp);
193
- const pay = usePayLabels(labelsProp);
194
- const list = reasons ?? refundReasons(pay);
195
- const { styles } = useStyles(sheet);
196
- return /* @__PURE__ */ jsx(
197
- RadioGroup,
198
- {
199
- label: label ?? labels.reason,
200
- value: value ?? void 0,
201
- onValueChange: (next) => onChange(next),
202
- children: list.map(([id, text, note]) => /* @__PURE__ */ jsxs(View, { style: styles.reasonRow, children: [
203
- /* @__PURE__ */ jsx(RadioGroupItem, { value: id, label: text, accessibilityLabel: `${text}. ${note}` }),
204
- showNotes ? /* @__PURE__ */ jsx(Text, { style: styles.reasonNote, children: note }) : null
205
- ] }, id))
206
- }
207
- );
208
- }
209
- function RefundAmountField({
210
- valueMinor,
211
- onChangeMinor,
212
- remaining,
213
- currency,
214
- label,
215
- hint,
216
- error,
217
- fractions = REFUND_FRACTIONS,
218
- disabled = false,
219
- locale: localeProp,
220
- labels: labelsProp,
221
- style
222
- }) {
223
- const labels = useLabels("refund", DEFAULT_LABELS, labelsProp);
224
- const providerLocale = useLoamLocale();
225
- const locale = localeProp ?? providerLocale;
226
- const { styles } = useStyles(sheet);
227
- const [draft, setDraft] = React2.useState(null);
228
- const [capped, setCapped] = React2.useState(false);
229
- const display = draft ?? money(valueMinor, currency, { noSymbol: true, locale });
230
- const maxText = money(remaining, currency, { locale });
231
- const chips = fractions === false ? [] : fractions;
232
- const cappedMessage = labels.capped(maxText);
233
- React2.useEffect(() => {
234
- if (capped) announce(cappedMessage);
235
- }, [capped]);
236
- return /* @__PURE__ */ jsxs(View, { style: [styles.amountBlock, style], children: [
237
- /* @__PURE__ */ jsx(
238
- TextField,
239
- {
240
- label: label ?? labels.amount,
241
- hint: hint ?? labels.upTo(maxText),
242
- error: error ?? (capped ? cappedMessage : void 0),
243
- value: display,
244
- editable: !disabled,
245
- inputMode: "decimal",
246
- autoComplete: "off",
247
- autoCorrect: false,
248
- keyboardType: "decimal-pad",
249
- onChangeText: (text) => {
250
- setDraft(text);
251
- const parsed = parseAmount(text, currency);
252
- setCapped(parsed !== null && parsed > remaining);
253
- onChangeMinor(clampRefund(parsed ?? 0, remaining));
254
- },
255
- onBlur: () => setDraft(null)
256
- }
257
- ),
258
- chips.length > 0 ? /* @__PURE__ */ jsx(View, { style: styles.chipRow, children: chips.map((percent) => {
259
- const target = refundFraction(percent, remaining);
260
- return /* @__PURE__ */ jsx(
261
- Chip,
262
- {
263
- variant: "filter",
264
- size: "sm",
265
- disabled,
266
- selected: !disabled && valueMinor === target && remaining > 0,
267
- accessibilityLabel: labels.fractionAria(percent, money(target, currency, { locale })),
268
- onSelectedChange: () => {
269
- setDraft(null);
270
- setCapped(false);
271
- onChangeMinor(target);
272
- },
273
- children: labels.percent(percent)
274
- },
275
- percent
276
- );
277
- }) }) : null
278
- ] });
279
- }
280
- var sheet = createStyleSheet((theme) => ({
281
- arrivalBlock: {
282
- flexDirection: "row",
283
- alignItems: "flex-start",
284
- gap: theme.space.s2,
285
- padding: theme.space.s3,
286
- borderRadius: theme.radius.md,
287
- // The soft tint always carries its tone edge: it collapses to the plain
288
- // surface under high contrast, where the edge is all that draws it.
289
- borderWidth: theme.borderWidth.base,
290
- borderColor: theme.edge.info,
291
- backgroundColor: theme.color.infoSoft
292
- },
293
- arrivalBlockBody: {
294
- flexShrink: 1,
295
- fontFamily: theme.font.sans,
296
- fontSize: theme.type.footnote.fontSize,
297
- lineHeight: theme.type.footnote.fontSize * theme.lineHeight.normal,
298
- color: theme.color.infoOnSoft
299
- },
300
- arrivalInline: { flexDirection: "row", alignItems: "flex-start", gap: theme.space.s2 },
301
- arrivalInlineBody: {
302
- flexShrink: 1,
303
- fontFamily: theme.font.sans,
304
- fontSize: theme.type.footnote.fontSize,
305
- lineHeight: theme.type.footnote.fontSize * theme.lineHeight.normal,
306
- color: theme.color.text2
307
- },
308
- remaining: {
309
- flexDirection: "row",
310
- flexWrap: "wrap",
311
- alignItems: "baseline",
312
- gap: theme.space.s1
313
- },
314
- remainingWord: {
315
- fontFamily: theme.font.sans,
316
- fontSize: theme.type.footnote.fontSize,
317
- lineHeight: theme.type.footnote.lineHeight,
318
- color: theme.color.text2
319
- },
320
- ledger: {
321
- alignSelf: "stretch",
322
- gap: theme.space.s2,
323
- padding: theme.space.s4,
324
- borderRadius: theme.radius.md,
325
- borderWidth: theme.borderWidth.base,
326
- borderColor: theme.color.border,
327
- backgroundColor: theme.color.surface2
328
- },
329
- overline: {
330
- fontFamily: theme.font.sans,
331
- fontWeight: theme.fontWeight.bold,
332
- fontSize: theme.type.caption2.fontSize,
333
- lineHeight: theme.type.caption2.lineHeight,
334
- letterSpacing: theme.tracking.caps,
335
- textTransform: "uppercase",
336
- color: theme.color.text3
337
- },
338
- reasonRow: { gap: theme.space[2] },
339
- reasonNote: {
340
- marginStart: theme.space.s7,
341
- fontFamily: theme.font.sans,
342
- fontSize: theme.type.caption1.fontSize,
343
- lineHeight: theme.type.caption1.fontSize * theme.lineHeight.normal,
344
- color: theme.color.text3
345
- },
346
- amountBlock: { alignSelf: "stretch", gap: theme.space.s2 },
347
- chipRow: {
348
- flexDirection: "row",
349
- flexWrap: "wrap",
350
- alignItems: "center",
351
- gap: theme.space.s1
352
- }
353
- }));
354
- function RefundConfirmation({
355
- charge,
356
- result,
357
- method,
358
- currency,
359
- title: titleProp,
360
- refundAnotherLabel,
361
- onRefundAnother,
362
- actions,
363
- locale: localeProp,
364
- labels: labelsProp,
365
- style,
366
- motion = "full"
367
- }) {
368
- const labels = useLabels("refund", DEFAULT_LABELS, labelsProp);
369
- const providerLocale = useLoamLocale();
370
- const locale = localeProp ?? providerLocale;
371
- const title = titleProp ?? labels.issuedTitle;
372
- const theme = useLoamTheme("refund");
373
- const { styles } = useStyles(sheet2);
374
- const code = currency ?? charge.currency ?? "USD";
375
- const level = useResolvedMotion(motion, "refund");
376
- const rise = React2.useRef(new Animated.Value(level === "full" ? 0 : 1)).current;
377
- const pop = React2.useRef(new Animated.Value(level === "full" ? 0 : 1)).current;
378
- React2.useEffect(() => {
379
- AccessibilityInfo.announceForAccessibility(
380
- labels.announceIssued(title, money(result.amountMinor, code, { locale }))
381
- );
382
- }, []);
383
- React2.useEffect(() => {
384
- if (level !== "full") return;
385
- const run = Animated.parallel([
386
- Animated.spring(rise, { ...springConfig(theme, "ds"), toValue: 1, useNativeDriver: true }),
387
- Animated.sequence([
388
- // loam-audit-ignore raw-duration — one stagger step after the panel starts rising.
389
- Animated.delay(60),
390
- Animated.spring(pop, { ...springConfig(theme, "fs"), toValue: 1, useNativeDriver: true })
391
- ])
392
- ]);
393
- run.start();
394
- return () => run.stop();
395
- }, []);
396
- return /* @__PURE__ */ jsxs(
397
- View,
398
- {
399
- role: "status",
400
- accessibilityLiveRegion: "polite",
401
- accessibilityLabel: title,
402
- style: [styles.panel, style],
403
- ...{ "aria-live": "polite" },
404
- children: [
405
- /* @__PURE__ */ jsxs(
406
- Animated.View,
407
- {
408
- style: [
409
- styles.confirmHead,
410
- {
411
- opacity: rise,
412
- transform: [
413
- {
414
- translateY: rise.interpolate({
415
- inputRange: [0, 1],
416
- outputRange: [theme.space.s3, 0]
417
- })
418
- }
419
- ]
420
- }
421
- ],
422
- children: [
423
- /* @__PURE__ */ jsx(
424
- Animated.View,
425
- {
426
- "aria-hidden": true,
427
- accessibilityElementsHidden: true,
428
- importantForAccessibility: "no-hide-descendants",
429
- style: [
430
- styles.checkPlate,
431
- {
432
- opacity: pop,
433
- transform: [
434
- { scale: pop.interpolate({ inputRange: [0, 1], outputRange: [0.5, 1] }) }
435
- ]
436
- }
437
- ],
438
- children: /* @__PURE__ */ jsx(
439
- Icon,
440
- {
441
- name: "check",
442
- size: theme.icon.md,
443
- color: theme.color.goodOnSoft,
444
- strokeWidth: theme.icon.strokeBold
445
- }
446
- )
447
- }
448
- ),
449
- /* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: styles.title, children: title }),
450
- /* @__PURE__ */ jsx(Amount, { minor: result.amountMinor, currency: code, size: "hero", locale }),
451
- /* @__PURE__ */ jsxs(View, { style: styles.confirmMeta, children: [
452
- /* @__PURE__ */ jsx(RefundStatus, { state: result.state, labels: labelsProp }),
453
- result.issuedLabel ? /* @__PURE__ */ jsx(Text, { style: styles.meta, children: result.issuedLabel }) : null,
454
- result.refundId ? /* @__PURE__ */ jsx(Text, { style: styles.mono, children: result.refundId }) : null
455
- ] })
456
- ]
457
- }
458
- ),
459
- /* @__PURE__ */ jsx(RefundArrivalNote, { method, labels: labelsProp }),
460
- /* @__PURE__ */ jsx(
461
- RefundLedger,
462
- {
463
- charge,
464
- next: result.amountMinor,
465
- currency: code,
466
- locale,
467
- labels: labelsProp
468
- }
469
- ),
470
- /* @__PURE__ */ jsxs(View, { style: styles.actionRow, children: [
471
- onRefundAnother ? /* @__PURE__ */ jsx(Button, { variant: "outline", onPress: onRefundAnother, children: refundAnotherLabel ?? labels.refundAnother }) : null,
472
- actions
473
- ] })
474
- ]
475
- }
476
- );
477
- }
478
- function RefundPanel({
479
- charge,
480
- method,
481
- mode,
482
- amountMinor,
483
- reason,
484
- notify,
485
- currency,
486
- title: titleProp,
487
- chargeLabel,
488
- error,
489
- result,
490
- busy = false,
491
- notifyLabel: notifyLabelProp,
492
- irreversibleNote: irreversibleNoteProp,
493
- onModeChange,
494
- onAmountChange,
495
- onReasonChange,
496
- onNotifyChange,
497
- onSubmit,
498
- onRefundAnother,
499
- locale: localeProp,
500
- labels: labelsProp,
501
- style,
502
- motion = "full"
503
- }) {
504
- const labels = useLabels("refund", DEFAULT_LABELS, labelsProp);
505
- const pay = usePayLabels(labelsProp);
506
- const providerLocale = useLoamLocale();
507
- const locale = localeProp ?? providerLocale;
508
- const title = titleProp ?? labels.title;
509
- const notifyLabel = notifyLabelProp ?? labels.notify;
510
- const irreversibleNote = irreversibleNoteProp ?? labels.irreversible;
511
- const theme = useLoamTheme("refund");
512
- const { styles } = useStyles(sheet2);
513
- const code = currency ?? charge.currency ?? "USD";
514
- const remaining = refundRemaining(charge);
515
- const effective = mode === "full" ? remaining : amountMinor;
516
- const reasonRow = reason === null ? void 0 : refundReasons(pay).find(([id]) => id === reason);
517
- if (result) {
518
- return /* @__PURE__ */ jsx(
519
- RefundConfirmation,
520
- {
521
- charge,
522
- result,
523
- method,
524
- currency: code,
525
- onRefundAnother,
526
- locale,
527
- labels: labelsProp,
528
- style
529
- }
530
- );
531
- }
532
- return /* @__PURE__ */ jsxs(View, { role: "region", accessibilityLabel: title, style: [styles.panel, style], children: [
533
- /* @__PURE__ */ jsxs(View, { style: styles.header, children: [
534
- /* @__PURE__ */ jsxs(View, { style: styles.headerRow, children: [
535
- /* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: styles.title, children: title }),
536
- charge.receiptId ? /* @__PURE__ */ jsx(View, { style: styles.pushEnd, children: /* @__PURE__ */ jsx(Text, { style: styles.mono, children: charge.receiptId }) }) : null
537
- ] }),
538
- chargeLabel ? /* @__PURE__ */ jsx(Text, { style: styles.chargeLabel, children: chargeLabel }) : null,
539
- /* @__PURE__ */ jsx(RefundRemainingNote, { charge, currency: code, locale, labels: labelsProp })
540
- ] }),
541
- onModeChange ? /* @__PURE__ */ jsx(
542
- SegmentedControl,
543
- {
544
- accessibilityLabel: labels.amountMode,
545
- value: mode,
546
- onValueChange: (next) => onModeChange(next),
547
- items: [
548
- { value: "full", label: labels.modeFull },
549
- { value: "partial", label: labels.modePartial }
550
- ]
551
- }
552
- ) : /* @__PURE__ */ jsx(
553
- Stated,
554
- {
555
- label: mode === "full" ? labels.fullRefund : labels.partialRefund,
556
- overline: labels.amountMode
557
- }
558
- ),
559
- mode === "full" ? /* @__PURE__ */ jsxs(View, { style: styles.fullBox, children: [
560
- /* @__PURE__ */ jsx(Text, { style: styles.fullLabel, children: labels.fullBalance }),
561
- /* @__PURE__ */ jsx(View, { style: styles.pushEnd, children: /* @__PURE__ */ jsx(Amount, { minor: remaining, currency: code, size: "lg", weight: "bold", locale }) })
562
- ] }) : onAmountChange ? /* @__PURE__ */ jsx(
563
- RefundAmountField,
564
- {
565
- valueMinor: amountMinor,
566
- onChangeMinor: onAmountChange,
567
- remaining,
568
- currency: code,
569
- locale,
570
- labels: labelsProp
571
- }
572
- ) : /* @__PURE__ */ jsxs(View, { style: styles.fullBox, children: [
573
- /* @__PURE__ */ jsx(Text, { style: styles.fullLabel, children: labels.refunding }),
574
- /* @__PURE__ */ jsx(View, { style: styles.pushEnd, children: /* @__PURE__ */ jsx(
575
- Amount,
576
- {
577
- minor: amountMinor,
578
- currency: code,
579
- size: "lg",
580
- weight: "bold",
581
- locale,
582
- roll: true,
583
- motion
584
- }
585
- ) })
586
- ] }),
587
- onReasonChange ? /* @__PURE__ */ jsx(RefundReasonList, { value: reason, onChange: onReasonChange, labels: labelsProp }) : /* @__PURE__ */ jsx(
588
- Stated,
589
- {
590
- overline: labels.reason,
591
- label: reasonRow ? reasonRow[1] : labels.notStated,
592
- note: reasonRow ? reasonRow[2] : void 0
593
- }
594
- ),
595
- onNotifyChange ? (
596
- // The box and its text are one control: one tap target, one focus
597
- // stop, read once as "<label>, checkbox".
598
- /* @__PURE__ */ jsx(
599
- Checkbox,
600
- {
601
- checked: notify,
602
- onCheckedChange: (next) => onNotifyChange(next),
603
- label: notifyLabel
604
- }
605
- )
606
- ) : /* @__PURE__ */ jsx(
607
- Stated,
608
- {
609
- overline: labels.customerEmail,
610
- label: notify ? labels.notifyYes(notifyLabel) : labels.notifyNo(notifyLabel)
611
- }
612
- ),
613
- /* @__PURE__ */ jsx(
614
- RefundLedger,
615
- {
616
- charge,
617
- next: effective,
618
- currency: code,
619
- locale,
620
- labels: labelsProp
621
- }
622
- ),
623
- /* @__PURE__ */ jsx(RefundArrivalNote, { method, labels: labelsProp }),
624
- error ? /* @__PURE__ */ jsx(Alert, { tone: "danger", title: error }) : null,
625
- /* @__PURE__ */ jsxs(View, { style: styles.commitBlock, children: [
626
- /* @__PURE__ */ jsxs(View, { style: styles.irreversibleRow, children: [
627
- /* @__PURE__ */ jsx(Icon, { name: "alert-circle", size: theme.icon.sm, color: theme.color.text3 }),
628
- /* @__PURE__ */ jsx(Text, { style: styles.irreversible, children: irreversibleNote })
629
- ] }),
630
- /* @__PURE__ */ jsx(Button, { loading: busy, onPress: onSubmit, children: labels.commit(money(effective, code, { locale })) })
631
- ] })
632
- ] });
633
- }
634
- function Stated({
635
- overline,
636
- label,
637
- note
638
- }) {
639
- const { styles } = useStyles(sheet2);
640
- return /* @__PURE__ */ jsxs(View, { style: styles.stated, children: [
641
- /* @__PURE__ */ jsx(Text, { style: styles.overline, children: overline }),
642
- /* @__PURE__ */ jsx(Text, { style: styles.statedValue, children: label }),
643
- note ? /* @__PURE__ */ jsx(Text, { style: styles.statedNote, children: note }) : null
644
- ] });
645
- }
646
- var sheet2 = createStyleSheet((theme) => ({
647
- panel: {
648
- alignSelf: "stretch",
649
- gap: theme.space.s5,
650
- padding: theme.space.s5,
651
- borderRadius: theme.radius.lg,
652
- borderWidth: theme.borderWidth.base,
653
- borderColor: theme.color.border,
654
- backgroundColor: theme.color.surface
655
- },
656
- header: { gap: theme.space.s1 },
657
- headerRow: {
658
- flexDirection: "row",
659
- flexWrap: "wrap",
660
- alignItems: "baseline",
661
- gap: theme.space.s2
662
- },
663
- title: {
664
- fontFamily: theme.font.display,
665
- fontWeight: theme.font.displayWeight,
666
- fontSize: theme.type.title3.fontSize,
667
- lineHeight: theme.type.title3.lineHeight,
668
- letterSpacing: theme.type.title3.letterSpacing,
669
- color: theme.color.text
670
- },
671
- pushEnd: { marginStart: "auto" },
672
- mono: {
673
- fontFamily: theme.font.mono,
674
- fontVariant: ["tabular-nums"],
675
- fontSize: theme.type.caption1.fontSize,
676
- lineHeight: theme.type.caption1.lineHeight,
677
- color: theme.color.text3
678
- },
679
- chargeLabel: {
680
- fontFamily: theme.font.sans,
681
- fontSize: theme.type.footnote.fontSize,
682
- lineHeight: theme.type.footnote.fontSize * theme.lineHeight.normal,
683
- color: theme.color.text2
684
- },
685
- fullBox: {
686
- flexDirection: "row",
687
- flexWrap: "wrap",
688
- alignItems: "baseline",
689
- gap: theme.space.s2,
690
- padding: theme.space.s4,
691
- borderRadius: theme.radius.md,
692
- borderWidth: theme.borderWidth.base,
693
- borderColor: theme.color.border,
694
- backgroundColor: theme.color.surface2
695
- },
696
- fullLabel: {
697
- fontFamily: theme.font.sans,
698
- fontSize: theme.type.footnote.fontSize,
699
- lineHeight: theme.type.footnote.lineHeight,
700
- color: theme.color.text2
701
- },
702
- stated: { gap: theme.space[2] },
703
- overline: {
704
- fontFamily: theme.font.sans,
705
- fontWeight: theme.fontWeight.bold,
706
- fontSize: theme.type.caption2.fontSize,
707
- lineHeight: theme.type.caption2.lineHeight,
708
- letterSpacing: theme.tracking.caps,
709
- textTransform: "uppercase",
710
- color: theme.color.text3
711
- },
712
- statedValue: {
713
- fontFamily: theme.font.sans,
714
- fontWeight: theme.fontWeight.semibold,
715
- fontSize: theme.type.footnote.fontSize,
716
- lineHeight: theme.type.footnote.lineHeight,
717
- color: theme.color.text
718
- },
719
- statedNote: {
720
- fontFamily: theme.font.sans,
721
- fontSize: theme.type.caption1.fontSize,
722
- lineHeight: theme.type.caption1.fontSize * theme.lineHeight.normal,
723
- color: theme.color.text3
724
- },
725
- commitBlock: { gap: theme.space.s2 },
726
- irreversibleRow: { flexDirection: "row", alignItems: "flex-start", gap: theme.space.s2 },
727
- irreversible: {
728
- flexShrink: 1,
729
- fontFamily: theme.font.sans,
730
- fontSize: theme.type.caption1.fontSize,
731
- lineHeight: theme.type.caption1.fontSize * theme.lineHeight.normal,
732
- color: theme.color.text3
733
- },
734
- confirmHead: { alignItems: "center", gap: theme.space.s3 },
735
- checkPlate: {
736
- width: theme.ctl.iconBtn,
737
- height: theme.ctl.iconBtn,
738
- alignItems: "center",
739
- justifyContent: "center",
740
- borderRadius: theme.radius.full,
741
- // The soft tint always carries its tone edge.
742
- borderWidth: theme.borderWidth.base,
743
- borderColor: theme.edge.good,
744
- backgroundColor: theme.color.goodSoft
745
- },
746
- confirmMeta: {
747
- flexDirection: "row",
748
- flexWrap: "wrap",
749
- alignItems: "center",
750
- justifyContent: "center",
751
- gap: theme.space.s2
752
- },
753
- meta: {
754
- fontFamily: theme.font.sans,
755
- fontSize: theme.type.footnote.fontSize,
756
- lineHeight: theme.type.footnote.lineHeight,
757
- color: theme.color.text3
758
- },
759
- actionRow: {
760
- flexDirection: "row",
761
- flexWrap: "wrap",
762
- alignItems: "center",
763
- gap: theme.space.s2
764
- }
765
- }));
766
- var BADGE_VARIANT = {
767
- info: "info",
768
- good: "good",
769
- warn: "warn",
770
- danger: "danger",
771
- "text-3": "neutral"
772
- };
773
- var EVIDENCE_ICON = {
774
- have: "check-circle",
775
- missing: "alert-circle",
776
- "n/a": "minus"
777
- };
778
- function DisputeDeadline({
779
- dispute,
780
- urgentAt = 3,
781
- locale: localeProp,
782
- labels: labelsProp,
783
- style
784
- }) {
785
- const labels = useLabels("refund", DEFAULT_LABELS, labelsProp);
786
- const providerLocale = useLoamLocale();
787
- const locale = localeProp ?? providerLocale;
788
- const theme = useLoamTheme("refund");
789
- const { styles } = useStyles(sheet3);
790
- const urgent = dispute.daysLeft <= urgentAt;
791
- const ink = urgent ? theme.color.dangerOnSoft : theme.color.warnOnSoft;
792
- return /* @__PURE__ */ jsxs(
793
- View,
794
- {
795
- style: [
796
- styles.deadline,
797
- {
798
- // A soft tint always carries its tone edge.
799
- borderColor: urgent ? theme.edge.danger : theme.edge.warn,
800
- backgroundColor: urgent ? theme.color.dangerSoft : theme.color.warnSoft
801
- },
802
- style
803
- ],
804
- children: [
805
- /* @__PURE__ */ jsxs(View, { children: [
806
- /* @__PURE__ */ jsx(Text, { style: [styles.daysLeft, { color: ink }], children: labels.days(dispute.daysLeft) }),
807
- /* @__PURE__ */ jsx(Text, { style: [styles.daysNote, { color: ink }], children: labels.toRespond(dispute.due) })
808
- ] }),
809
- /* @__PURE__ */ jsxs(View, { style: styles.factGrid, children: [
810
- /* @__PURE__ */ jsxs(View, { style: styles.fact, children: [
811
- /* @__PURE__ */ jsx(Text, { style: [styles.factTerm, { color: ink }], children: labels.disputed }),
812
- /* @__PURE__ */ jsx(
813
- Amount,
814
- {
815
- minor: dispute.amountMinor,
816
- currency: dispute.currency,
817
- size: "lg",
818
- weight: "bold",
819
- locale
820
- }
821
- )
822
- ] }),
823
- /* @__PURE__ */ jsxs(View, { style: styles.fact, children: [
824
- /* @__PURE__ */ jsx(Text, { style: [styles.factTerm, { color: ink }], children: labels.networkFee }),
825
- /* @__PURE__ */ jsx(Text, { style: styles.factValueNum, children: money(dispute.feeMinor, dispute.currency, { locale }) })
826
- ] }),
827
- /* @__PURE__ */ jsxs(View, { style: styles.fact, children: [
828
- /* @__PURE__ */ jsx(Text, { style: [styles.factTerm, { color: ink }], children: labels.reason }),
829
- /* @__PURE__ */ jsx(Text, { style: styles.factValue, children: labels.reasonNetwork(dispute.reason, dispute.network) })
830
- ] }),
831
- /* @__PURE__ */ jsxs(View, { style: styles.fact, children: [
832
- /* @__PURE__ */ jsx(Text, { style: [styles.factTerm, { color: ink }], children: labels.opened }),
833
- /* @__PURE__ */ jsx(Text, { style: styles.factValue, children: dispute.opened })
834
- ] })
835
- ] })
836
- ]
837
- }
838
- );
839
- }
840
- function DisputeEvidenceRow({
841
- item,
842
- attachLabel,
843
- onAttach,
844
- labels: labelsProp,
845
- style
846
- }) {
847
- const labels = useLabels("refund", DEFAULT_LABELS, labelsProp);
848
- const pay = usePayLabels(labelsProp);
849
- const theme = useLoamTheme("refund");
850
- const { styles } = useStyles(sheet3);
851
- const tone = evidenceTone(item.state);
852
- const glyphColor = tone === "good" ? theme.color.good : tone === "warn" ? theme.color.warn : theme.color.text3;
853
- return /* @__PURE__ */ jsxs(View, { role: "listitem", style: [styles.evidenceRow, style], children: [
854
- /* @__PURE__ */ jsx(Icon, { name: EVIDENCE_ICON[item.state], size: theme.icon.sm, color: glyphColor }),
855
- /* @__PURE__ */ jsxs(View, { style: styles.evidenceBody, children: [
856
- /* @__PURE__ */ jsx(Text, { style: styles.evidenceLabel, children: item.label }),
857
- /* @__PURE__ */ jsx(Text, { style: styles.evidenceNote, children: item.note })
858
- ] }),
859
- /* @__PURE__ */ jsxs(View, { style: styles.evidenceTrail, children: [
860
- /* @__PURE__ */ jsx(Badge, { style: styles.rowBadge, variant: BADGE_VARIANT[tone], size: "sm", children: evidenceLabel(item.state, pay) }),
861
- item.state === "missing" && onAttach ? /* @__PURE__ */ jsx(Button, { size: "xs", variant: "outline", leadingIcon: "upload", onPress: () => onAttach(item), children: attachLabel ?? labels.attach }) : null
862
- ] })
863
- ] });
864
- }
865
- function DisputePanel({
866
- dispute,
867
- title,
868
- description,
869
- submitLabel,
870
- acceptLabel,
871
- canSubmit = true,
872
- busy = false,
873
- showGuidance = true,
874
- onSubmitEvidence,
875
- onAccept,
876
- onAttach,
877
- locale: localeProp,
878
- labels: labelsProp,
879
- style
880
- }) {
881
- const labels = useLabels("refund", DEFAULT_LABELS, labelsProp);
882
- const providerLocale = useLoamLocale();
883
- const locale = localeProp ?? providerLocale;
884
- const theme = useLoamTheme("refund");
885
- const { styles } = useStyles(sheet3);
886
- const worth = disputeWorthDefending(dispute.amountMinor);
887
- const threshold = money(DISPUTE_ACCEPT_THRESHOLD_MINOR, dispute.currency, { locale });
888
- return /* @__PURE__ */ jsxs(View, { role: "region", accessibilityLabel: title ?? labels.disputeTitle, style: [styles.panel, style], children: [
889
- /* @__PURE__ */ jsxs(View, { style: styles.header, children: [
890
- /* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: styles.title, children: title ?? labels.disputeTitle }),
891
- /* @__PURE__ */ jsx(DisputeDeadline, { dispute, locale, labels: labelsProp }),
892
- /* @__PURE__ */ jsx(Text, { style: styles.description, children: description ?? labels.disputeDescription })
893
- ] }),
894
- /* @__PURE__ */ jsxs(View, { style: styles.evidenceBlock, children: [
895
- /* @__PURE__ */ jsx(Text, { style: styles.overline, children: labels.evidence }),
896
- /* @__PURE__ */ jsx(View, { role: "list", accessibilityRole: "list", children: dispute.evidence.map((item) => /* @__PURE__ */ jsx(DisputeEvidenceRow, { item, onAttach, labels: labelsProp }, item.label)) })
897
- ] }),
898
- showGuidance ? /* @__PURE__ */ jsxs(View, { style: styles.guidanceRow, children: [
899
- /* @__PURE__ */ jsx(Icon, { name: "info", size: theme.icon.sm, color: theme.color.text3 }),
900
- /* @__PURE__ */ jsx(Text, { style: styles.guidance, children: labels.guidance(worth, threshold, canSubmit) })
901
- ] }) : null,
902
- /* @__PURE__ */ jsxs(View, { style: styles.actionRow, children: [
903
- /* @__PURE__ */ jsx(Button, { loading: busy, onPress: onSubmitEvidence, children: submitLabel ?? labels.submitEvidence }),
904
- /* @__PURE__ */ jsx(Button, { variant: "outline", onPress: onAccept, children: acceptLabel ?? labels.acceptDispute })
905
- ] })
906
- ] });
907
- }
908
- var sheet3 = createStyleSheet((theme) => ({
909
- panel: {
910
- alignSelf: "stretch",
911
- gap: theme.space.s5,
912
- padding: theme.space.s5,
913
- borderRadius: theme.radius.lg,
914
- borderWidth: theme.borderWidth.base,
915
- borderColor: theme.color.border,
916
- backgroundColor: theme.color.surface
917
- },
918
- header: { gap: theme.space.s3 },
919
- title: {
920
- fontFamily: theme.font.display,
921
- fontWeight: theme.font.displayWeight,
922
- fontSize: theme.type.title3.fontSize,
923
- lineHeight: theme.type.title3.lineHeight,
924
- letterSpacing: theme.type.title3.letterSpacing,
925
- color: theme.color.text
926
- },
927
- description: {
928
- fontFamily: theme.font.sans,
929
- fontSize: theme.type.footnote.fontSize,
930
- lineHeight: theme.type.footnote.fontSize * theme.lineHeight.normal,
931
- color: theme.color.text2
932
- },
933
- deadline: {
934
- gap: theme.space.s4,
935
- padding: theme.space.s4,
936
- borderRadius: theme.radius.md,
937
- borderWidth: theme.borderWidth.base
938
- },
939
- daysLeft: {
940
- fontFamily: theme.font.sans,
941
- fontWeight: theme.fontWeight.bold,
942
- fontVariant: ["tabular-nums"],
943
- fontSize: theme.fontSize[32],
944
- lineHeight: theme.fontSize[32] * theme.lineHeight.tight
945
- },
946
- daysNote: {
947
- fontFamily: theme.font.sans,
948
- fontSize: theme.type.footnote.fontSize,
949
- lineHeight: theme.type.footnote.lineHeight
950
- },
951
- factGrid: {
952
- flexDirection: "row",
953
- flexWrap: "wrap",
954
- columnGap: theme.space.s5,
955
- rowGap: theme.space.s2
956
- },
957
- fact: { gap: theme.space[2] },
958
- // No `color` here: the fact terms are inked by the caller with the *tint's*
959
- // own measured ink (`dangerOnSoft` / `warnOnSoft`), the same one the days-left
960
- // figure uses. They used to be `theme.color.text3`, and `--text-3` is measured
961
- // against the neutral surface ramp only — on this banner's tint it read 4.20:1
962
- // on `--danger-soft` and 3.78:1 on `--warn-soft` in dark mode, 28 axe
963
- // `color-contrast` nodes from one style (seven deadlines x four terms).
964
- factTerm: {
965
- fontFamily: theme.font.sans,
966
- fontWeight: theme.fontWeight.bold,
967
- fontSize: theme.type.caption2.fontSize,
968
- lineHeight: theme.type.caption2.lineHeight,
969
- letterSpacing: theme.tracking.caps,
970
- textTransform: "uppercase"
971
- },
972
- factValue: {
973
- fontFamily: theme.font.sans,
974
- fontSize: theme.type.footnote.fontSize,
975
- lineHeight: theme.type.footnote.lineHeight,
976
- color: theme.color.text
977
- },
978
- factValueNum: {
979
- fontFamily: theme.font.sans,
980
- fontWeight: theme.fontWeight.bold,
981
- fontVariant: ["tabular-nums"],
982
- fontSize: theme.type.footnote.fontSize,
983
- lineHeight: theme.type.footnote.lineHeight,
984
- color: theme.color.text
985
- },
986
- evidenceBlock: { gap: theme.space.s2 },
987
- overline: {
988
- fontFamily: theme.font.sans,
989
- fontWeight: theme.fontWeight.bold,
990
- fontSize: theme.type.caption2.fontSize,
991
- lineHeight: theme.type.caption2.lineHeight,
992
- letterSpacing: theme.tracking.caps,
993
- textTransform: "uppercase",
994
- color: theme.color.text3
995
- },
996
- evidenceRow: {
997
- flexDirection: "row",
998
- flexWrap: "wrap",
999
- alignItems: "flex-start",
1000
- gap: theme.space.s3,
1001
- paddingVertical: theme.space.s3,
1002
- borderTopWidth: theme.borderWidth.base,
1003
- borderTopColor: theme.color.border
1004
- },
1005
- // A floor, so the row wraps the badge and Attach under the text rather than
1006
- // squeezing the note to a 126px column beside them.
1007
- evidenceBody: { flexGrow: 1, flexShrink: 1, flexBasis: theme.panel.xs, gap: theme.space[2] },
1008
- evidenceLabel: {
1009
- fontFamily: theme.font.sans,
1010
- fontWeight: theme.fontWeight.semibold,
1011
- fontSize: theme.type.footnote.fontSize,
1012
- lineHeight: theme.type.footnote.lineHeight,
1013
- color: theme.color.text
1014
- },
1015
- evidenceNote: {
1016
- fontFamily: theme.font.sans,
1017
- fontSize: theme.type.caption1.fontSize,
1018
- lineHeight: theme.type.caption1.fontSize * theme.lineHeight.normal,
1019
- color: theme.color.text3
1020
- },
1021
- evidenceTrail: { flexDirection: "row", alignItems: "center", gap: theme.space.s2 },
1022
- guidanceRow: { flexDirection: "row", alignItems: "flex-start", gap: theme.space.s2 },
1023
- guidance: {
1024
- flexShrink: 1,
1025
- fontFamily: theme.font.sans,
1026
- fontSize: theme.type.caption1.fontSize,
1027
- lineHeight: theme.type.caption1.fontSize * theme.lineHeight.normal,
1028
- color: theme.color.text3
1029
- },
1030
- actionRow: {
1031
- flexDirection: "row",
1032
- flexWrap: "wrap",
1033
- alignItems: "center",
1034
- gap: theme.space.s2
1035
- },
1036
- // Badge hugs with `flex-start`, which pins it to the top of this centred row.
1037
- rowBadge: { alignSelf: "center" }
1038
- }));
1039
-
1040
- export { DisputeDeadline, DisputeEvidenceRow, DisputePanel, RefundAmountField, RefundArrivalNote, RefundConfirmation, RefundLedger, RefundPanel, RefundReasonList, RefundRemainingNote, RefundStatus };