@procivis/one-react-native-components 0.1.63

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 (767) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +66 -0
  3. package/lib/commonjs/accessibility/accessibility.js +193 -0
  4. package/lib/commonjs/accessibility/accessibility.js.map +1 -0
  5. package/lib/commonjs/accessibility/accessibilityHistory.js +81 -0
  6. package/lib/commonjs/accessibility/accessibilityHistory.js.map +1 -0
  7. package/lib/commonjs/accessibility/accessibilityHistoryWrappers.js +49 -0
  8. package/lib/commonjs/accessibility/accessibilityHistoryWrappers.js.map +1 -0
  9. package/lib/commonjs/accessibility/accessibilityLanguage.js +63 -0
  10. package/lib/commonjs/accessibility/accessibilityLanguage.js.map +1 -0
  11. package/lib/commonjs/accessibility/index.js +129 -0
  12. package/lib/commonjs/accessibility/index.js.map +1 -0
  13. package/lib/commonjs/accessibility/locale/de.json +21 -0
  14. package/lib/commonjs/accessibility/locale/en.json +21 -0
  15. package/lib/commonjs/accessibility/locale/fr.json +21 -0
  16. package/lib/commonjs/accessibility/locale/index.js +21 -0
  17. package/lib/commonjs/accessibility/locale/index.js.map +1 -0
  18. package/lib/commonjs/accessibility/locale/it.json +21 -0
  19. package/lib/commonjs/accessibility/locale.test.js +15 -0
  20. package/lib/commonjs/accessibility/locale.test.js.map +1 -0
  21. package/lib/commonjs/action-modal/ActionModal.js +52 -0
  22. package/lib/commonjs/action-modal/ActionModal.js.map +1 -0
  23. package/lib/commonjs/action-modal/index.js +14 -0
  24. package/lib/commonjs/action-modal/index.js.map +1 -0
  25. package/lib/commonjs/activity-indicator/activity-indicator.js +34 -0
  26. package/lib/commonjs/activity-indicator/activity-indicator.js.map +1 -0
  27. package/lib/commonjs/activity-indicator/index.js +14 -0
  28. package/lib/commonjs/activity-indicator/index.js.map +1 -0
  29. package/lib/commonjs/blur/blur-view.js +76 -0
  30. package/lib/commonjs/blur/blur-view.js.map +1 -0
  31. package/lib/commonjs/blur/index.js +21 -0
  32. package/lib/commonjs/blur/index.js.map +1 -0
  33. package/lib/commonjs/buttons/back-button.js +37 -0
  34. package/lib/commonjs/buttons/back-button.js.map +1 -0
  35. package/lib/commonjs/buttons/button.js +153 -0
  36. package/lib/commonjs/buttons/button.js.map +1 -0
  37. package/lib/commonjs/buttons/connectivity-button.js +82 -0
  38. package/lib/commonjs/buttons/connectivity-button.js.map +1 -0
  39. package/lib/commonjs/buttons/filter-button.js +51 -0
  40. package/lib/commonjs/buttons/filter-button.js.map +1 -0
  41. package/lib/commonjs/buttons/ghost-button.js +62 -0
  42. package/lib/commonjs/buttons/ghost-button.js.map +1 -0
  43. package/lib/commonjs/buttons/index.js +104 -0
  44. package/lib/commonjs/buttons/index.js.map +1 -0
  45. package/lib/commonjs/buttons/scan-button.js +83 -0
  46. package/lib/commonjs/buttons/scan-button.js.map +1 -0
  47. package/lib/commonjs/camera/camera-overlay.js +61 -0
  48. package/lib/commonjs/camera/camera-overlay.js.map +1 -0
  49. package/lib/commonjs/camera/index.js +21 -0
  50. package/lib/commonjs/camera/index.js.map +1 -0
  51. package/lib/commonjs/camera/qr-code-scanner.js +50 -0
  52. package/lib/commonjs/camera/qr-code-scanner.js.map +1 -0
  53. package/lib/commonjs/control/checkbox.js +79 -0
  54. package/lib/commonjs/control/checkbox.js.map +1 -0
  55. package/lib/commonjs/control/index.js +32 -0
  56. package/lib/commonjs/control/index.js.map +1 -0
  57. package/lib/commonjs/control/switch.js +65 -0
  58. package/lib/commonjs/control/switch.js.map +1 -0
  59. package/lib/commonjs/credential/card/credential-card.js +189 -0
  60. package/lib/commonjs/credential/card/credential-card.js.map +1 -0
  61. package/lib/commonjs/credential/card/credential-details-card.js +201 -0
  62. package/lib/commonjs/credential/card/credential-details-card.js.map +1 -0
  63. package/lib/commonjs/credential/card/credential-details-list-item.js +84 -0
  64. package/lib/commonjs/credential/card/credential-details-list-item.js.map +1 -0
  65. package/lib/commonjs/credential/card/credential-header.js +172 -0
  66. package/lib/commonjs/credential/card/credential-header.js.map +1 -0
  67. package/lib/commonjs/credential/card/credential-image-carousel.js +124 -0
  68. package/lib/commonjs/credential/card/credential-image-carousel.js.map +1 -0
  69. package/lib/commonjs/credential/card/index.js +85 -0
  70. package/lib/commonjs/credential/card/index.js.map +1 -0
  71. package/lib/commonjs/credential/credential-attribute-item.js +289 -0
  72. package/lib/commonjs/credential/credential-attribute-item.js.map +1 -0
  73. package/lib/commonjs/credential/credential-carousel-images.js +98 -0
  74. package/lib/commonjs/credential/credential-carousel-images.js.map +1 -0
  75. package/lib/commonjs/credential/index.js +90 -0
  76. package/lib/commonjs/credential/index.js.map +1 -0
  77. package/lib/commonjs/credential/selector-status.js +17 -0
  78. package/lib/commonjs/credential/selector-status.js.map +1 -0
  79. package/lib/commonjs/credential/selector.js +79 -0
  80. package/lib/commonjs/credential/selector.js.map +1 -0
  81. package/lib/commonjs/detail/detail.js +84 -0
  82. package/lib/commonjs/detail/detail.js.map +1 -0
  83. package/lib/commonjs/detail/index.js +14 -0
  84. package/lib/commonjs/detail/index.js.map +1 -0
  85. package/lib/commonjs/entity/avatar.js +96 -0
  86. package/lib/commonjs/entity/avatar.js.map +1 -0
  87. package/lib/commonjs/entity/entity-cluster.js +66 -0
  88. package/lib/commonjs/entity/entity-cluster.js.map +1 -0
  89. package/lib/commonjs/entity/index.js +34 -0
  90. package/lib/commonjs/entity/index.js.map +1 -0
  91. package/lib/commonjs/header/focus-aware-status-bar.js +20 -0
  92. package/lib/commonjs/header/focus-aware-status-bar.js.map +1 -0
  93. package/lib/commonjs/header/foldable-header.js +89 -0
  94. package/lib/commonjs/header/foldable-header.js.map +1 -0
  95. package/lib/commonjs/header/header.js +105 -0
  96. package/lib/commonjs/header/header.js.map +1 -0
  97. package/lib/commonjs/header/index.js +55 -0
  98. package/lib/commonjs/header/index.js.map +1 -0
  99. package/lib/commonjs/header/navigation-header.js +148 -0
  100. package/lib/commonjs/header/navigation-header.js.map +1 -0
  101. package/lib/commonjs/history/data-item.js +70 -0
  102. package/lib/commonjs/history/data-item.js.map +1 -0
  103. package/lib/commonjs/history/history-list-item.js +90 -0
  104. package/lib/commonjs/history/history-list-item.js.map +1 -0
  105. package/lib/commonjs/history/history-section-header.js +49 -0
  106. package/lib/commonjs/history/history-section-header.js.map +1 -0
  107. package/lib/commonjs/history/history-section-list-item.js +47 -0
  108. package/lib/commonjs/history/history-section-list-item.js.map +1 -0
  109. package/lib/commonjs/history/index.js +55 -0
  110. package/lib/commonjs/history/index.js.map +1 -0
  111. package/lib/commonjs/icons/connectivity.js +139 -0
  112. package/lib/commonjs/icons/connectivity.js.map +1 -0
  113. package/lib/commonjs/icons/credential.js +162 -0
  114. package/lib/commonjs/icons/credential.js.map +1 -0
  115. package/lib/commonjs/icons/entity.js +34 -0
  116. package/lib/commonjs/icons/entity.js.map +1 -0
  117. package/lib/commonjs/icons/history.js +408 -0
  118. package/lib/commonjs/icons/history.js.map +1 -0
  119. package/lib/commonjs/icons/icons.js +250 -0
  120. package/lib/commonjs/icons/icons.js.map +1 -0
  121. package/lib/commonjs/icons/index.js +127 -0
  122. package/lib/commonjs/icons/index.js.map +1 -0
  123. package/lib/commonjs/icons/input.js +44 -0
  124. package/lib/commonjs/icons/input.js.map +1 -0
  125. package/lib/commonjs/icons/keypad.js +94 -0
  126. package/lib/commonjs/icons/keypad.js.map +1 -0
  127. package/lib/commonjs/icons/loader.js +180 -0
  128. package/lib/commonjs/icons/loader.js.map +1 -0
  129. package/lib/commonjs/icons/nerd-view.js +123 -0
  130. package/lib/commonjs/icons/nerd-view.js.map +1 -0
  131. package/lib/commonjs/icons/selector.js +56 -0
  132. package/lib/commonjs/icons/selector.js.map +1 -0
  133. package/lib/commonjs/icons/wallet.js +121 -0
  134. package/lib/commonjs/icons/wallet.js.map +1 -0
  135. package/lib/commonjs/image/image-or-component.js +80 -0
  136. package/lib/commonjs/image/image-or-component.js.map +1 -0
  137. package/lib/commonjs/image/index.js +21 -0
  138. package/lib/commonjs/image/index.js.map +1 -0
  139. package/lib/commonjs/index.js +292 -0
  140. package/lib/commonjs/index.js.map +1 -0
  141. package/lib/commonjs/input/index.js +65 -0
  142. package/lib/commonjs/input/index.js.map +1 -0
  143. package/lib/commonjs/input/radio-group.js +95 -0
  144. package/lib/commonjs/input/radio-group.js.map +1 -0
  145. package/lib/commonjs/input/selection-input.js +102 -0
  146. package/lib/commonjs/input/selection-input.js.map +1 -0
  147. package/lib/commonjs/input/text-input.js +195 -0
  148. package/lib/commonjs/input/text-input.js.map +1 -0
  149. package/lib/commonjs/list/index.js +34 -0
  150. package/lib/commonjs/list/index.js.map +1 -0
  151. package/lib/commonjs/list/list-section-header.js +36 -0
  152. package/lib/commonjs/list/list-section-header.js.map +1 -0
  153. package/lib/commonjs/list/list-title-header.js +35 -0
  154. package/lib/commonjs/list/list-title-header.js.map +1 -0
  155. package/lib/commonjs/loader/index.js +40 -0
  156. package/lib/commonjs/loader/index.js.map +1 -0
  157. package/lib/commonjs/loader/loader.js +140 -0
  158. package/lib/commonjs/loader/loader.js.map +1 -0
  159. package/lib/commonjs/loader/loading-result.js +92 -0
  160. package/lib/commonjs/loader/loading-result.js.map +1 -0
  161. package/lib/commonjs/nerd-view/index.js +27 -0
  162. package/lib/commonjs/nerd-view/index.js.map +1 -0
  163. package/lib/commonjs/nerd-view/nerd-mode-item.js +235 -0
  164. package/lib/commonjs/nerd-view/nerd-mode-item.js.map +1 -0
  165. package/lib/commonjs/normalize-color.d.js +2 -0
  166. package/lib/commonjs/normalize-color.d.js.map +1 -0
  167. package/lib/commonjs/pin/index.js +32 -0
  168. package/lib/commonjs/pin/index.js.map +1 -0
  169. package/lib/commonjs/pin/keypad.js +201 -0
  170. package/lib/commonjs/pin/keypad.js.map +1 -0
  171. package/lib/commonjs/pin/pin-code-screen.js +162 -0
  172. package/lib/commonjs/pin/pin-code-screen.js.map +1 -0
  173. package/lib/commonjs/pin/pins.js +54 -0
  174. package/lib/commonjs/pin/pins.js.map +1 -0
  175. package/lib/commonjs/screens/backup-screen.js +87 -0
  176. package/lib/commonjs/screens/backup-screen.js.map +1 -0
  177. package/lib/commonjs/screens/image-preview-screen.js +92 -0
  178. package/lib/commonjs/screens/image-preview-screen.js.map +1 -0
  179. package/lib/commonjs/screens/index.js +98 -0
  180. package/lib/commonjs/screens/index.js.map +1 -0
  181. package/lib/commonjs/screens/nerd-mode-screen.js +142 -0
  182. package/lib/commonjs/screens/nerd-mode-screen.js.map +1 -0
  183. package/lib/commonjs/screens/qr-code-scanner-screen.js +120 -0
  184. package/lib/commonjs/screens/qr-code-scanner-screen.js.map +1 -0
  185. package/lib/commonjs/screens/scroll-view-screen.js +94 -0
  186. package/lib/commonjs/screens/scroll-view-screen.js.map +1 -0
  187. package/lib/commonjs/screens/section-list-screen.js +67 -0
  188. package/lib/commonjs/screens/section-list-screen.js.map +1 -0
  189. package/lib/commonjs/searchbar/animated-search-bar.js +88 -0
  190. package/lib/commonjs/searchbar/animated-search-bar.js.map +1 -0
  191. package/lib/commonjs/searchbar/index.js +34 -0
  192. package/lib/commonjs/searchbar/index.js.map +1 -0
  193. package/lib/commonjs/searchbar/search-bar.js +99 -0
  194. package/lib/commonjs/searchbar/search-bar.js.map +1 -0
  195. package/lib/commonjs/settings/button-setting.js +67 -0
  196. package/lib/commonjs/settings/button-setting.js.map +1 -0
  197. package/lib/commonjs/settings/index.js +73 -0
  198. package/lib/commonjs/settings/index.js.map +1 -0
  199. package/lib/commonjs/settings/setting-item-separator.js +40 -0
  200. package/lib/commonjs/settings/setting-item-separator.js.map +1 -0
  201. package/lib/commonjs/settings/setting-item.js +79 -0
  202. package/lib/commonjs/settings/setting-item.js.map +1 -0
  203. package/lib/commonjs/settings/settings-button.js +35 -0
  204. package/lib/commonjs/settings/settings-button.js.map +1 -0
  205. package/lib/commonjs/settings/switch-setting.js +35 -0
  206. package/lib/commonjs/settings/switch-setting.js.map +1 -0
  207. package/lib/commonjs/state/error-screen.js +71 -0
  208. package/lib/commonjs/state/error-screen.js.map +1 -0
  209. package/lib/commonjs/state/index.js +27 -0
  210. package/lib/commonjs/state/index.js.map +1 -0
  211. package/lib/commonjs/text/base.js +40 -0
  212. package/lib/commonjs/text/base.js.map +1 -0
  213. package/lib/commonjs/text/font.js +64 -0
  214. package/lib/commonjs/text/font.js.map +1 -0
  215. package/lib/commonjs/text/index.js +21 -0
  216. package/lib/commonjs/text/index.js.map +1 -0
  217. package/lib/commonjs/text/typography.js +119 -0
  218. package/lib/commonjs/text/typography.js.map +1 -0
  219. package/lib/commonjs/theme/color-scheme-context.js +52 -0
  220. package/lib/commonjs/theme/color-scheme-context.js.map +1 -0
  221. package/lib/commonjs/theme/color-scheme.js +2 -0
  222. package/lib/commonjs/theme/color-scheme.js.map +1 -0
  223. package/lib/commonjs/theme/index.js +19 -0
  224. package/lib/commonjs/theme/index.js.map +1 -0
  225. package/lib/commonjs/utils/color.js +34 -0
  226. package/lib/commonjs/utils/color.js.map +1 -0
  227. package/lib/commonjs/utils/contrasting-status-bar.js +30 -0
  228. package/lib/commonjs/utils/contrasting-status-bar.js.map +1 -0
  229. package/lib/commonjs/utils/date.js +57 -0
  230. package/lib/commonjs/utils/date.js.map +1 -0
  231. package/lib/commonjs/utils/hooks/header/on-scroll-header-state.js +21 -0
  232. package/lib/commonjs/utils/hooks/header/on-scroll-header-state.js.map +1 -0
  233. package/lib/commonjs/utils/hooks/index.js +20 -0
  234. package/lib/commonjs/utils/hooks/index.js.map +1 -0
  235. package/lib/commonjs/utils/hooks/list/list-content-inset.js +31 -0
  236. package/lib/commonjs/utils/hooks/list/list-content-inset.js.map +1 -0
  237. package/lib/commonjs/utils/index.js +83 -0
  238. package/lib/commonjs/utils/index.js.map +1 -0
  239. package/lib/commonjs/utils/navigation.js +51 -0
  240. package/lib/commonjs/utils/navigation.js.map +1 -0
  241. package/lib/commonjs/utils/ref.js +42 -0
  242. package/lib/commonjs/utils/ref.js.map +1 -0
  243. package/lib/commonjs/utils/testID.js +18 -0
  244. package/lib/commonjs/utils/testID.js.map +1 -0
  245. package/lib/commonjs/utils/testID.test.js +21 -0
  246. package/lib/commonjs/utils/testID.test.js.map +1 -0
  247. package/lib/commonjs/utils/useMemoAsync.js +26 -0
  248. package/lib/commonjs/utils/useMemoAsync.js.map +1 -0
  249. package/lib/module/accessibility/accessibility.js +185 -0
  250. package/lib/module/accessibility/accessibility.js.map +1 -0
  251. package/lib/module/accessibility/accessibilityHistory.js +71 -0
  252. package/lib/module/accessibility/accessibilityHistory.js.map +1 -0
  253. package/lib/module/accessibility/accessibilityHistoryWrappers.js +38 -0
  254. package/lib/module/accessibility/accessibilityHistoryWrappers.js.map +1 -0
  255. package/lib/module/accessibility/accessibilityLanguage.js +53 -0
  256. package/lib/module/accessibility/accessibilityLanguage.js.map +1 -0
  257. package/lib/module/accessibility/index.js +8 -0
  258. package/lib/module/accessibility/index.js.map +1 -0
  259. package/lib/module/accessibility/locale/de.json +21 -0
  260. package/lib/module/accessibility/locale/en.json +21 -0
  261. package/lib/module/accessibility/locale/fr.json +21 -0
  262. package/lib/module/accessibility/locale/index.js +12 -0
  263. package/lib/module/accessibility/locale/index.js.map +1 -0
  264. package/lib/module/accessibility/locale/it.json +21 -0
  265. package/lib/module/accessibility/locale.test.js +13 -0
  266. package/lib/module/accessibility/locale.test.js.map +1 -0
  267. package/lib/module/action-modal/ActionModal.js +44 -0
  268. package/lib/module/action-modal/ActionModal.js.map +1 -0
  269. package/lib/module/action-modal/index.js +3 -0
  270. package/lib/module/action-modal/index.js.map +1 -0
  271. package/lib/module/activity-indicator/activity-indicator.js +24 -0
  272. package/lib/module/activity-indicator/activity-indicator.js.map +1 -0
  273. package/lib/module/activity-indicator/index.js +3 -0
  274. package/lib/module/activity-indicator/index.js.map +1 -0
  275. package/lib/module/blur/blur-view.js +67 -0
  276. package/lib/module/blur/blur-view.js.map +1 -0
  277. package/lib/module/blur/index.js +3 -0
  278. package/lib/module/blur/index.js.map +1 -0
  279. package/lib/module/buttons/back-button.js +28 -0
  280. package/lib/module/buttons/back-button.js.map +1 -0
  281. package/lib/module/buttons/button.js +143 -0
  282. package/lib/module/buttons/button.js.map +1 -0
  283. package/lib/module/buttons/connectivity-button.js +73 -0
  284. package/lib/module/buttons/connectivity-button.js.map +1 -0
  285. package/lib/module/buttons/filter-button.js +43 -0
  286. package/lib/module/buttons/filter-button.js.map +1 -0
  287. package/lib/module/buttons/ghost-button.js +53 -0
  288. package/lib/module/buttons/ghost-button.js.map +1 -0
  289. package/lib/module/buttons/index.js +8 -0
  290. package/lib/module/buttons/index.js.map +1 -0
  291. package/lib/module/buttons/scan-button.js +75 -0
  292. package/lib/module/buttons/scan-button.js.map +1 -0
  293. package/lib/module/camera/camera-overlay.js +51 -0
  294. package/lib/module/camera/camera-overlay.js.map +1 -0
  295. package/lib/module/camera/index.js +3 -0
  296. package/lib/module/camera/index.js.map +1 -0
  297. package/lib/module/camera/qr-code-scanner.js +40 -0
  298. package/lib/module/camera/qr-code-scanner.js.map +1 -0
  299. package/lib/module/control/checkbox.js +70 -0
  300. package/lib/module/control/checkbox.js.map +1 -0
  301. package/lib/module/control/index.js +4 -0
  302. package/lib/module/control/index.js.map +1 -0
  303. package/lib/module/control/switch.js +56 -0
  304. package/lib/module/control/switch.js.map +1 -0
  305. package/lib/module/credential/card/credential-card.js +177 -0
  306. package/lib/module/credential/card/credential-card.js.map +1 -0
  307. package/lib/module/credential/card/credential-details-card.js +191 -0
  308. package/lib/module/credential/card/credential-details-card.js.map +1 -0
  309. package/lib/module/credential/card/credential-details-list-item.js +74 -0
  310. package/lib/module/credential/card/credential-details-list-item.js.map +1 -0
  311. package/lib/module/credential/card/credential-header.js +162 -0
  312. package/lib/module/credential/card/credential-header.js.map +1 -0
  313. package/lib/module/credential/card/credential-image-carousel.js +113 -0
  314. package/lib/module/credential/card/credential-image-carousel.js.map +1 -0
  315. package/lib/module/credential/card/index.js +11 -0
  316. package/lib/module/credential/card/index.js.map +1 -0
  317. package/lib/module/credential/credential-attribute-item.js +279 -0
  318. package/lib/module/credential/credential-attribute-item.js.map +1 -0
  319. package/lib/module/credential/credential-carousel-images.js +86 -0
  320. package/lib/module/credential/credential-carousel-images.js.map +1 -0
  321. package/lib/module/credential/index.js +9 -0
  322. package/lib/module/credential/index.js.map +1 -0
  323. package/lib/module/credential/selector-status.js +10 -0
  324. package/lib/module/credential/selector-status.js.map +1 -0
  325. package/lib/module/credential/selector.js +70 -0
  326. package/lib/module/credential/selector.js.map +1 -0
  327. package/lib/module/detail/detail.js +75 -0
  328. package/lib/module/detail/detail.js.map +1 -0
  329. package/lib/module/detail/index.js +3 -0
  330. package/lib/module/detail/index.js.map +1 -0
  331. package/lib/module/entity/avatar.js +86 -0
  332. package/lib/module/entity/avatar.js.map +1 -0
  333. package/lib/module/entity/entity-cluster.js +56 -0
  334. package/lib/module/entity/entity-cluster.js.map +1 -0
  335. package/lib/module/entity/index.js +5 -0
  336. package/lib/module/entity/index.js.map +1 -0
  337. package/lib/module/header/focus-aware-status-bar.js +12 -0
  338. package/lib/module/header/focus-aware-status-bar.js.map +1 -0
  339. package/lib/module/header/foldable-header.js +79 -0
  340. package/lib/module/header/foldable-header.js.map +1 -0
  341. package/lib/module/header/header.js +97 -0
  342. package/lib/module/header/header.js.map +1 -0
  343. package/lib/module/header/index.js +9 -0
  344. package/lib/module/header/index.js.map +1 -0
  345. package/lib/module/header/navigation-header.js +138 -0
  346. package/lib/module/header/navigation-header.js.map +1 -0
  347. package/lib/module/history/data-item.js +60 -0
  348. package/lib/module/history/data-item.js.map +1 -0
  349. package/lib/module/history/history-list-item.js +80 -0
  350. package/lib/module/history/history-list-item.js.map +1 -0
  351. package/lib/module/history/history-section-header.js +42 -0
  352. package/lib/module/history/history-section-header.js.map +1 -0
  353. package/lib/module/history/history-section-list-item.js +43 -0
  354. package/lib/module/history/history-section-list-item.js.map +1 -0
  355. package/lib/module/history/index.js +9 -0
  356. package/lib/module/history/index.js.map +1 -0
  357. package/lib/module/icons/connectivity.js +125 -0
  358. package/lib/module/icons/connectivity.js.map +1 -0
  359. package/lib/module/icons/credential.js +147 -0
  360. package/lib/module/icons/credential.js.map +1 -0
  361. package/lib/module/icons/entity.js +25 -0
  362. package/lib/module/icons/entity.js.map +1 -0
  363. package/lib/module/icons/history.js +391 -0
  364. package/lib/module/icons/history.js.map +1 -0
  365. package/lib/module/icons/icons.js +231 -0
  366. package/lib/module/icons/icons.js.map +1 -0
  367. package/lib/module/icons/index.js +12 -0
  368. package/lib/module/icons/index.js.map +1 -0
  369. package/lib/module/icons/input.js +33 -0
  370. package/lib/module/icons/input.js.map +1 -0
  371. package/lib/module/icons/keypad.js +81 -0
  372. package/lib/module/icons/keypad.js.map +1 -0
  373. package/lib/module/icons/loader.js +168 -0
  374. package/lib/module/icons/loader.js.map +1 -0
  375. package/lib/module/icons/nerd-view.js +110 -0
  376. package/lib/module/icons/nerd-view.js.map +1 -0
  377. package/lib/module/icons/selector.js +45 -0
  378. package/lib/module/icons/selector.js.map +1 -0
  379. package/lib/module/icons/wallet.js +111 -0
  380. package/lib/module/icons/wallet.js.map +1 -0
  381. package/lib/module/image/image-or-component.js +71 -0
  382. package/lib/module/image/image-or-component.js.map +1 -0
  383. package/lib/module/image/index.js +3 -0
  384. package/lib/module/image/index.js.map +1 -0
  385. package/lib/module/index.js +27 -0
  386. package/lib/module/index.js.map +1 -0
  387. package/lib/module/input/index.js +7 -0
  388. package/lib/module/input/index.js.map +1 -0
  389. package/lib/module/input/radio-group.js +87 -0
  390. package/lib/module/input/radio-group.js.map +1 -0
  391. package/lib/module/input/selection-input.js +92 -0
  392. package/lib/module/input/selection-input.js.map +1 -0
  393. package/lib/module/input/text-input.js +185 -0
  394. package/lib/module/input/text-input.js.map +1 -0
  395. package/lib/module/list/index.js +5 -0
  396. package/lib/module/list/index.js.map +1 -0
  397. package/lib/module/list/list-section-header.js +28 -0
  398. package/lib/module/list/list-section-header.js.map +1 -0
  399. package/lib/module/list/list-title-header.js +27 -0
  400. package/lib/module/list/list-title-header.js.map +1 -0
  401. package/lib/module/loader/index.js +5 -0
  402. package/lib/module/loader/index.js.map +1 -0
  403. package/lib/module/loader/loader.js +130 -0
  404. package/lib/module/loader/loader.js.map +1 -0
  405. package/lib/module/loader/loading-result.js +84 -0
  406. package/lib/module/loader/loading-result.js.map +1 -0
  407. package/lib/module/nerd-view/index.js +3 -0
  408. package/lib/module/nerd-view/index.js.map +1 -0
  409. package/lib/module/nerd-view/nerd-mode-item.js +224 -0
  410. package/lib/module/nerd-view/nerd-mode-item.js.map +1 -0
  411. package/lib/module/normalize-color.d.js +2 -0
  412. package/lib/module/normalize-color.d.js.map +1 -0
  413. package/lib/module/pin/index.js +4 -0
  414. package/lib/module/pin/index.js.map +1 -0
  415. package/lib/module/pin/keypad.js +191 -0
  416. package/lib/module/pin/keypad.js.map +1 -0
  417. package/lib/module/pin/pin-code-screen.js +152 -0
  418. package/lib/module/pin/pin-code-screen.js.map +1 -0
  419. package/lib/module/pin/pins.js +46 -0
  420. package/lib/module/pin/pins.js.map +1 -0
  421. package/lib/module/screens/backup-screen.js +78 -0
  422. package/lib/module/screens/backup-screen.js.map +1 -0
  423. package/lib/module/screens/image-preview-screen.js +83 -0
  424. package/lib/module/screens/image-preview-screen.js.map +1 -0
  425. package/lib/module/screens/index.js +13 -0
  426. package/lib/module/screens/index.js.map +1 -0
  427. package/lib/module/screens/nerd-mode-screen.js +132 -0
  428. package/lib/module/screens/nerd-mode-screen.js.map +1 -0
  429. package/lib/module/screens/qr-code-scanner-screen.js +110 -0
  430. package/lib/module/screens/qr-code-scanner-screen.js.map +1 -0
  431. package/lib/module/screens/scroll-view-screen.js +86 -0
  432. package/lib/module/screens/scroll-view-screen.js.map +1 -0
  433. package/lib/module/screens/section-list-screen.js +59 -0
  434. package/lib/module/screens/section-list-screen.js.map +1 -0
  435. package/lib/module/searchbar/animated-search-bar.js +78 -0
  436. package/lib/module/searchbar/animated-search-bar.js.map +1 -0
  437. package/lib/module/searchbar/index.js +5 -0
  438. package/lib/module/searchbar/index.js.map +1 -0
  439. package/lib/module/searchbar/search-bar.js +89 -0
  440. package/lib/module/searchbar/search-bar.js.map +1 -0
  441. package/lib/module/settings/button-setting.js +57 -0
  442. package/lib/module/settings/button-setting.js.map +1 -0
  443. package/lib/module/settings/index.js +11 -0
  444. package/lib/module/settings/index.js.map +1 -0
  445. package/lib/module/settings/setting-item-separator.js +32 -0
  446. package/lib/module/settings/setting-item-separator.js.map +1 -0
  447. package/lib/module/settings/setting-item.js +69 -0
  448. package/lib/module/settings/setting-item.js.map +1 -0
  449. package/lib/module/settings/settings-button.js +27 -0
  450. package/lib/module/settings/settings-button.js.map +1 -0
  451. package/lib/module/settings/switch-setting.js +27 -0
  452. package/lib/module/settings/switch-setting.js.map +1 -0
  453. package/lib/module/state/error-screen.js +63 -0
  454. package/lib/module/state/error-screen.js.map +1 -0
  455. package/lib/module/state/index.js +3 -0
  456. package/lib/module/state/index.js.map +1 -0
  457. package/lib/module/text/base.js +31 -0
  458. package/lib/module/text/base.js.map +1 -0
  459. package/lib/module/text/font.js +56 -0
  460. package/lib/module/text/font.js.map +1 -0
  461. package/lib/module/text/index.js +3 -0
  462. package/lib/module/text/index.js.map +1 -0
  463. package/lib/module/text/typography.js +111 -0
  464. package/lib/module/text/typography.js.map +1 -0
  465. package/lib/module/theme/color-scheme-context.js +44 -0
  466. package/lib/module/theme/color-scheme-context.js.map +1 -0
  467. package/lib/module/theme/color-scheme.js +2 -0
  468. package/lib/module/theme/color-scheme.js.map +1 -0
  469. package/lib/module/theme/index.js +3 -0
  470. package/lib/module/theme/index.js.map +1 -0
  471. package/lib/module/utils/color.js +23 -0
  472. package/lib/module/utils/color.js.map +1 -0
  473. package/lib/module/utils/contrasting-status-bar.js +21 -0
  474. package/lib/module/utils/contrasting-status-bar.js.map +1 -0
  475. package/lib/module/utils/date.js +51 -0
  476. package/lib/module/utils/date.js.map +1 -0
  477. package/lib/module/utils/hooks/header/on-scroll-header-state.js +14 -0
  478. package/lib/module/utils/hooks/header/on-scroll-header-state.js.map +1 -0
  479. package/lib/module/utils/hooks/index.js +5 -0
  480. package/lib/module/utils/hooks/index.js.map +1 -0
  481. package/lib/module/utils/hooks/list/list-content-inset.js +24 -0
  482. package/lib/module/utils/hooks/list/list-content-inset.js.map +1 -0
  483. package/lib/module/utils/index.js +9 -0
  484. package/lib/module/utils/index.js.map +1 -0
  485. package/lib/module/utils/navigation.js +45 -0
  486. package/lib/module/utils/navigation.js.map +1 -0
  487. package/lib/module/utils/ref.js +35 -0
  488. package/lib/module/utils/ref.js.map +1 -0
  489. package/lib/module/utils/testID.js +12 -0
  490. package/lib/module/utils/testID.js.map +1 -0
  491. package/lib/module/utils/testID.test.js +19 -0
  492. package/lib/module/utils/testID.test.js.map +1 -0
  493. package/lib/module/utils/useMemoAsync.js +20 -0
  494. package/lib/module/utils/useMemoAsync.js.map +1 -0
  495. package/lib/typescript/accessibility/accessibility.d.ts +55 -0
  496. package/lib/typescript/accessibility/accessibilityHistory.d.ts +13 -0
  497. package/lib/typescript/accessibility/accessibilityHistoryWrappers.d.ts +18 -0
  498. package/lib/typescript/accessibility/accessibilityLanguage.d.ts +20 -0
  499. package/lib/typescript/accessibility/index.d.ts +6 -0
  500. package/lib/typescript/accessibility/locale/index.d.ts +90 -0
  501. package/lib/typescript/accessibility/locale.test.d.ts +1 -0
  502. package/lib/typescript/action-modal/ActionModal.d.ts +10 -0
  503. package/lib/typescript/action-modal/index.d.ts +2 -0
  504. package/lib/typescript/activity-indicator/activity-indicator.d.ts +7 -0
  505. package/lib/typescript/activity-indicator/index.d.ts +2 -0
  506. package/lib/typescript/blur/blur-view.d.ts +10 -0
  507. package/lib/typescript/blur/index.d.ts +2 -0
  508. package/lib/typescript/buttons/back-button.d.ts +9 -0
  509. package/lib/typescript/buttons/button.d.ts +22 -0
  510. package/lib/typescript/buttons/connectivity-button.d.ts +17 -0
  511. package/lib/typescript/buttons/filter-button.d.ts +7 -0
  512. package/lib/typescript/buttons/ghost-button.d.ts +11 -0
  513. package/lib/typescript/buttons/index.d.ts +7 -0
  514. package/lib/typescript/buttons/scan-button.d.ts +5 -0
  515. package/lib/typescript/camera/camera-overlay.d.ts +7 -0
  516. package/lib/typescript/camera/index.d.ts +2 -0
  517. package/lib/typescript/camera/qr-code-scanner.d.ts +11 -0
  518. package/lib/typescript/control/checkbox.d.ts +9 -0
  519. package/lib/typescript/control/index.d.ts +3 -0
  520. package/lib/typescript/control/switch.d.ts +7 -0
  521. package/lib/typescript/credential/card/credential-card.d.ts +22 -0
  522. package/lib/typescript/credential/card/credential-details-card.d.ts +16 -0
  523. package/lib/typescript/credential/card/credential-details-list-item.d.ts +9 -0
  524. package/lib/typescript/credential/card/credential-header.d.ts +20 -0
  525. package/lib/typescript/credential/card/credential-image-carousel.d.ts +23 -0
  526. package/lib/typescript/credential/card/index.d.ts +10 -0
  527. package/lib/typescript/credential/credential-attribute-item.d.ts +48 -0
  528. package/lib/typescript/credential/credential-carousel-images.d.ts +19 -0
  529. package/lib/typescript/credential/index.d.ts +8 -0
  530. package/lib/typescript/credential/selector-status.d.ts +8 -0
  531. package/lib/typescript/credential/selector.d.ts +15 -0
  532. package/lib/typescript/detail/detail.d.ts +18 -0
  533. package/lib/typescript/detail/index.d.ts +2 -0
  534. package/lib/typescript/entity/avatar.d.ts +10 -0
  535. package/lib/typescript/entity/entity-cluster.d.ts +12 -0
  536. package/lib/typescript/entity/index.d.ts +4 -0
  537. package/lib/typescript/header/focus-aware-status-bar.d.ts +4 -0
  538. package/lib/typescript/header/foldable-header.d.ts +11 -0
  539. package/lib/typescript/header/header.d.ts +17 -0
  540. package/lib/typescript/header/index.d.ts +8 -0
  541. package/lib/typescript/header/navigation-header.d.ts +15 -0
  542. package/lib/typescript/history/data-item.d.ts +12 -0
  543. package/lib/typescript/history/history-list-item.d.ts +14 -0
  544. package/lib/typescript/history/history-section-header.d.ts +7 -0
  545. package/lib/typescript/history/history-section-list-item.d.ts +7 -0
  546. package/lib/typescript/history/index.d.ts +8 -0
  547. package/lib/typescript/icons/connectivity.d.ts +12 -0
  548. package/lib/typescript/icons/credential.d.ts +9 -0
  549. package/lib/typescript/icons/entity.d.ts +3 -0
  550. package/lib/typescript/icons/history.d.ts +42 -0
  551. package/lib/typescript/icons/icons.d.ts +13 -0
  552. package/lib/typescript/icons/index.d.ts +11 -0
  553. package/lib/typescript/icons/input.d.ts +3 -0
  554. package/lib/typescript/icons/keypad.d.ts +6 -0
  555. package/lib/typescript/icons/loader.d.ts +6 -0
  556. package/lib/typescript/icons/nerd-view.d.ts +7 -0
  557. package/lib/typescript/icons/selector.d.ts +10 -0
  558. package/lib/typescript/icons/wallet.d.ts +4 -0
  559. package/lib/typescript/image/image-or-component.d.ts +16 -0
  560. package/lib/typescript/image/index.d.ts +2 -0
  561. package/lib/typescript/index.d.ts +26 -0
  562. package/lib/typescript/input/index.d.ts +6 -0
  563. package/lib/typescript/input/radio-group.d.ts +23 -0
  564. package/lib/typescript/input/selection-input.d.ts +32 -0
  565. package/lib/typescript/input/text-input.d.ts +31 -0
  566. package/lib/typescript/list/index.d.ts +4 -0
  567. package/lib/typescript/list/list-section-header.d.ts +7 -0
  568. package/lib/typescript/list/list-title-header.d.ts +7 -0
  569. package/lib/typescript/loader/index.d.ts +4 -0
  570. package/lib/typescript/loader/loader.d.ts +14 -0
  571. package/lib/typescript/loader/loading-result.d.ts +16 -0
  572. package/lib/typescript/nerd-view/index.d.ts +2 -0
  573. package/lib/typescript/nerd-view/nerd-mode-item.d.ts +31 -0
  574. package/lib/typescript/pin/index.d.ts +3 -0
  575. package/lib/typescript/pin/keypad.d.ts +16 -0
  576. package/lib/typescript/pin/pin-code-screen.d.ts +32 -0
  577. package/lib/typescript/pin/pins.d.ts +7 -0
  578. package/lib/typescript/screens/backup-screen.d.ts +16 -0
  579. package/lib/typescript/screens/image-preview-screen.d.ts +9 -0
  580. package/lib/typescript/screens/index.d.ts +12 -0
  581. package/lib/typescript/screens/nerd-mode-screen.d.ts +22 -0
  582. package/lib/typescript/screens/qr-code-scanner-screen.d.ts +14 -0
  583. package/lib/typescript/screens/scroll-view-screen.d.ts +13 -0
  584. package/lib/typescript/screens/section-list-screen.d.ts +12 -0
  585. package/lib/typescript/searchbar/animated-search-bar.d.ts +10 -0
  586. package/lib/typescript/searchbar/index.d.ts +4 -0
  587. package/lib/typescript/searchbar/search-bar.d.ts +10 -0
  588. package/lib/typescript/settings/button-setting.d.ts +13 -0
  589. package/lib/typescript/settings/index.d.ts +10 -0
  590. package/lib/typescript/settings/setting-item-separator.d.ts +8 -0
  591. package/lib/typescript/settings/setting-item.d.ts +9 -0
  592. package/lib/typescript/settings/settings-button.d.ts +5 -0
  593. package/lib/typescript/settings/switch-setting.d.ts +13 -0
  594. package/lib/typescript/state/error-screen.d.ts +15 -0
  595. package/lib/typescript/state/index.d.ts +2 -0
  596. package/lib/typescript/text/base.d.ts +20 -0
  597. package/lib/typescript/text/font.d.ts +26 -0
  598. package/lib/typescript/text/index.d.ts +2 -0
  599. package/lib/typescript/text/typography.d.ts +112 -0
  600. package/lib/typescript/theme/color-scheme-context.d.ts +10 -0
  601. package/lib/typescript/theme/color-scheme.d.ts +31 -0
  602. package/lib/typescript/theme/index.d.ts +3 -0
  603. package/lib/typescript/utils/color.d.ts +4 -0
  604. package/lib/typescript/utils/contrasting-status-bar.d.ts +10 -0
  605. package/lib/typescript/utils/date.d.ts +12 -0
  606. package/lib/typescript/utils/hooks/header/on-scroll-header-state.d.ts +5 -0
  607. package/lib/typescript/utils/hooks/index.d.ts +4 -0
  608. package/lib/typescript/utils/hooks/list/list-content-inset.d.ts +8 -0
  609. package/lib/typescript/utils/index.d.ts +8 -0
  610. package/lib/typescript/utils/navigation.d.ts +9 -0
  611. package/lib/typescript/utils/ref.d.ts +11 -0
  612. package/lib/typescript/utils/testID.d.ts +6 -0
  613. package/lib/typescript/utils/testID.test.d.ts +1 -0
  614. package/lib/typescript/utils/useMemoAsync.d.ts +21 -0
  615. package/package.json +240 -0
  616. package/src/accessibility/accessibility.ts +215 -0
  617. package/src/accessibility/accessibilityHistory.tsx +77 -0
  618. package/src/accessibility/accessibilityHistoryWrappers.tsx +80 -0
  619. package/src/accessibility/accessibilityLanguage.tsx +66 -0
  620. package/src/accessibility/index.ts +35 -0
  621. package/src/accessibility/locale/de.json +21 -0
  622. package/src/accessibility/locale/en.json +21 -0
  623. package/src/accessibility/locale/fr.json +21 -0
  624. package/src/accessibility/locale/index.ts +19 -0
  625. package/src/accessibility/locale/it.json +21 -0
  626. package/src/accessibility/locale.test.ts +16 -0
  627. package/src/action-modal/ActionModal.stories.tsx +35 -0
  628. package/src/action-modal/ActionModal.tsx +45 -0
  629. package/src/action-modal/index.ts +3 -0
  630. package/src/activity-indicator/activity-indicator.stories.tsx +21 -0
  631. package/src/activity-indicator/activity-indicator.tsx +25 -0
  632. package/src/activity-indicator/index.ts +3 -0
  633. package/src/blur/blur-view.tsx +82 -0
  634. package/src/blur/index.ts +3 -0
  635. package/src/buttons/back-button.stories.tsx +31 -0
  636. package/src/buttons/back-button.tsx +31 -0
  637. package/src/buttons/button.stories.tsx +29 -0
  638. package/src/buttons/button.tsx +169 -0
  639. package/src/buttons/connectivity-button.stories.tsx +34 -0
  640. package/src/buttons/connectivity-button.tsx +95 -0
  641. package/src/buttons/filter-button.tsx +38 -0
  642. package/src/buttons/ghost-button.stories.tsx +28 -0
  643. package/src/buttons/ghost-button.tsx +56 -0
  644. package/src/buttons/index.ts +24 -0
  645. package/src/buttons/scan-button.stories.tsx +26 -0
  646. package/src/buttons/scan-button.tsx +66 -0
  647. package/src/camera/camera-overlay.tsx +48 -0
  648. package/src/camera/index.tsx +3 -0
  649. package/src/camera/qr-code-scanner.tsx +52 -0
  650. package/src/control/checkbox.stories.tsx +27 -0
  651. package/src/control/checkbox.tsx +81 -0
  652. package/src/control/index.ts +4 -0
  653. package/src/control/switch.stories.tsx +29 -0
  654. package/src/control/switch.tsx +47 -0
  655. package/src/credential/card/credential-card.stories.tsx +52 -0
  656. package/src/credential/card/credential-card.tsx +195 -0
  657. package/src/credential/card/credential-details-card.stories.tsx +268 -0
  658. package/src/credential/card/credential-details-card.tsx +242 -0
  659. package/src/credential/card/credential-details-list-item.tsx +87 -0
  660. package/src/credential/card/credential-header.stories.tsx +50 -0
  661. package/src/credential/card/credential-header.tsx +195 -0
  662. package/src/credential/card/credential-image-carousel.tsx +113 -0
  663. package/src/credential/card/index.ts +11 -0
  664. package/src/credential/credential-attribute-item.tsx +372 -0
  665. package/src/credential/credential-carousel-images.tsx +90 -0
  666. package/src/credential/index.ts +13 -0
  667. package/src/credential/selector-status.ts +8 -0
  668. package/src/credential/selector.stories.tsx +37 -0
  669. package/src/credential/selector.tsx +64 -0
  670. package/src/detail/detail.stories.tsx +65 -0
  671. package/src/detail/detail.tsx +98 -0
  672. package/src/detail/index.tsx +3 -0
  673. package/src/entity/avatar.stories.tsx +39 -0
  674. package/src/entity/avatar.tsx +87 -0
  675. package/src/entity/entity-cluster.stories.tsx +42 -0
  676. package/src/entity/entity-cluster.tsx +72 -0
  677. package/src/entity/index.ts +5 -0
  678. package/src/header/focus-aware-status-bar.tsx +10 -0
  679. package/src/header/foldable-header.tsx +107 -0
  680. package/src/header/header.stories.tsx +59 -0
  681. package/src/header/header.tsx +105 -0
  682. package/src/header/index.ts +9 -0
  683. package/src/header/navigation-header.stories.tsx +56 -0
  684. package/src/header/navigation-header.tsx +147 -0
  685. package/src/history/data-item.tsx +79 -0
  686. package/src/history/history-list-item.tsx +102 -0
  687. package/src/history/history-section-header.tsx +44 -0
  688. package/src/history/history-section-list-item.tsx +41 -0
  689. package/src/history/index.ts +9 -0
  690. package/src/icons/connectivity.tsx +114 -0
  691. package/src/icons/credential.tsx +118 -0
  692. package/src/icons/entity.tsx +21 -0
  693. package/src/icons/history.tsx +378 -0
  694. package/src/icons/icons.tsx +134 -0
  695. package/src/icons/index.ts +11 -0
  696. package/src/icons/input.tsx +29 -0
  697. package/src/icons/keypad.tsx +40 -0
  698. package/src/icons/loader.tsx +117 -0
  699. package/src/icons/nerd-view.tsx +105 -0
  700. package/src/icons/selector.tsx +43 -0
  701. package/src/icons/wallet.tsx +73 -0
  702. package/src/image/image-or-component.tsx +92 -0
  703. package/src/image/index.tsx +3 -0
  704. package/src/index.ts +26 -0
  705. package/src/input/index.ts +7 -0
  706. package/src/input/radio-group.tsx +110 -0
  707. package/src/input/selection-input.stories.tsx +46 -0
  708. package/src/input/selection-input.tsx +112 -0
  709. package/src/input/text-input.tsx +253 -0
  710. package/src/list/index.ts +5 -0
  711. package/src/list/list-section-header.tsx +37 -0
  712. package/src/list/list-title-header.tsx +30 -0
  713. package/src/loader/index.ts +5 -0
  714. package/src/loader/loader.stories.tsx +31 -0
  715. package/src/loader/loader.tsx +169 -0
  716. package/src/loader/loading-result.stories.tsx +67 -0
  717. package/src/loader/loading-result.tsx +93 -0
  718. package/src/nerd-view/index.ts +3 -0
  719. package/src/nerd-view/nerd-mode-item.tsx +296 -0
  720. package/src/normalize-color.d.ts +1 -0
  721. package/src/pin/index.ts +4 -0
  722. package/src/pin/keypad.tsx +166 -0
  723. package/src/pin/pin-code-screen.stories.tsx +80 -0
  724. package/src/pin/pin-code-screen.tsx +195 -0
  725. package/src/pin/pins.tsx +48 -0
  726. package/src/screens/backup-screen.tsx +92 -0
  727. package/src/screens/image-preview-screen.stories.tsx +28 -0
  728. package/src/screens/image-preview-screen.tsx +82 -0
  729. package/src/screens/index.ts +13 -0
  730. package/src/screens/nerd-mode-screen.tsx +150 -0
  731. package/src/screens/qr-code-scanner-screen.stories.tsx +37 -0
  732. package/src/screens/qr-code-scanner-screen.tsx +124 -0
  733. package/src/screens/scroll-view-screen.tsx +91 -0
  734. package/src/screens/section-list-screen.tsx +61 -0
  735. package/src/searchbar/animated-search-bar.tsx +96 -0
  736. package/src/searchbar/index.ts +5 -0
  737. package/src/searchbar/search-bar.stories.tsx +31 -0
  738. package/src/searchbar/search-bar.tsx +94 -0
  739. package/src/settings/button-setting.tsx +72 -0
  740. package/src/settings/index.ts +11 -0
  741. package/src/settings/setting-item-separator.tsx +32 -0
  742. package/src/settings/setting-item.tsx +68 -0
  743. package/src/settings/settings-button.tsx +23 -0
  744. package/src/settings/switch-setting.tsx +33 -0
  745. package/src/state/error-screen.stories.tsx +22 -0
  746. package/src/state/error-screen.tsx +71 -0
  747. package/src/state/index.ts +3 -0
  748. package/src/text/base.tsx +53 -0
  749. package/src/text/font.ts +52 -0
  750. package/src/text/index.ts +3 -0
  751. package/src/text/typography.stories.tsx +70 -0
  752. package/src/text/typography.tsx +117 -0
  753. package/src/theme/color-scheme-context.tsx +48 -0
  754. package/src/theme/color-scheme.ts +31 -0
  755. package/src/theme/index.ts +4 -0
  756. package/src/utils/color.ts +34 -0
  757. package/src/utils/contrasting-status-bar.tsx +21 -0
  758. package/src/utils/date.ts +49 -0
  759. package/src/utils/hooks/header/on-scroll-header-state.tsx +16 -0
  760. package/src/utils/hooks/index.ts +5 -0
  761. package/src/utils/hooks/list/list-content-inset.ts +24 -0
  762. package/src/utils/index.ts +19 -0
  763. package/src/utils/navigation.ts +37 -0
  764. package/src/utils/ref.ts +39 -0
  765. package/src/utils/testID.test.ts +20 -0
  766. package/src/utils/testID.ts +9 -0
  767. package/src/utils/useMemoAsync.ts +50 -0
@@ -0,0 +1,189 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.CredentialCardShadow = exports.CredentialCardRatio = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _accessibilityHistoryWrappers = require("../../accessibility/accessibilityHistoryWrappers");
10
+ var _blurView = _interopRequireDefault(require("../../blur/blur-view"));
11
+ var _imageOrComponent = _interopRequireDefault(require("../../image/image-or-component"));
12
+ var _typography = _interopRequireDefault(require("../../text/typography"));
13
+ var _colorSchemeContext = require("../../theme/color-scheme-context");
14
+ var _testID = require("../../utils/testID");
15
+ var _credentialHeader = _interopRequireDefault(require("./credential-header"));
16
+ var _credentialImageCarousel = _interopRequireDefault(require("./credential-image-carousel"));
17
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
20
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
21
+ const CredentialCardShadow = {
22
+ shadowColor: '#10274226',
23
+ shadowOffset: {
24
+ height: 5,
25
+ width: 0
26
+ },
27
+ shadowOpacity: 1,
28
+ shadowRadius: 7
29
+ };
30
+ exports.CredentialCardShadow = CredentialCardShadow;
31
+ const CredentialCardRatio = 18 / 11;
32
+ exports.CredentialCardRatio = CredentialCardRatio;
33
+ const CredentialCard = _ref => {
34
+ var _header$color;
35
+ let {
36
+ cardCarouselImages = [],
37
+ cardImage,
38
+ color = '#5A69F3',
39
+ credentialId,
40
+ header,
41
+ notice,
42
+ noticeIcon,
43
+ onCardPress,
44
+ onHeaderPress,
45
+ style,
46
+ testID
47
+ } = _ref;
48
+ const colorScheme = (0, _colorSchemeContext.useAppColorScheme)();
49
+ const [tappableHeaderHeight, setTappableHeaderHeight] = (0, _react.useState)();
50
+ const [noticeHeight, setNoticeHeight] = (0, _react.useState)();
51
+ const [cardSize, setCardSize] = (0, _react.useState)();
52
+ const onCardLayoutChange = (0, _react.useCallback)(event => {
53
+ const {
54
+ width,
55
+ height
56
+ } = event.nativeEvent.layout;
57
+ setCardSize({
58
+ width,
59
+ height
60
+ });
61
+ }, []);
62
+ const onHeaderLayoutChange = (0, _react.useCallback)(event => {
63
+ setTappableHeaderHeight(event.nativeEvent.layout.height);
64
+ }, []);
65
+ const onNoticeLayoutChange = (0, _react.useCallback)(event => {
66
+ setNoticeHeight(event.nativeEvent.layout.height);
67
+ }, []);
68
+ const headerPressHandler = (0, _react.useCallback)(() => {
69
+ onHeaderPress === null || onHeaderPress === void 0 ? void 0 : onHeaderPress(credentialId);
70
+ }, [credentialId, onHeaderPress]);
71
+ const cardPressHandler = (0, _react.useCallback)(() => {
72
+ onCardPress === null || onCardPress === void 0 ? void 0 : onCardPress(credentialId);
73
+ }, [credentialId, onCardPress]);
74
+ const noticeIconView = (0, _react.useMemo)(() => {
75
+ if (!noticeIcon) {
76
+ return undefined;
77
+ }
78
+ if ( /*#__PURE__*/_react.default.isValidElement(noticeIcon)) {
79
+ return noticeIcon;
80
+ } else {
81
+ const NoticeIconComponent = noticeIcon;
82
+ return /*#__PURE__*/_react.default.createElement(NoticeIconComponent, null);
83
+ }
84
+ }, [noticeIcon]);
85
+ const shouldShowCarousel = (cardSize === null || cardSize === void 0 ? void 0 : cardSize.width) && cardSize.height;
86
+ return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
87
+ onLayout: onCardLayoutChange,
88
+ style: [styles.card, style],
89
+ testID: testID
90
+ }, cardImage ? 'imageSource' in cardImage ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
91
+ style: styles.cardImage
92
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
93
+ testID: (0, _testID.concatTestID)(testID, 'imageSource'),
94
+ source: cardImage.imageSource,
95
+ style: styles.image
96
+ })) : /*#__PURE__*/_react.default.createElement(_imageOrComponent.default, {
97
+ testID: (0, _testID.concatTestID)(testID, 'cardImage'),
98
+ source: cardImage,
99
+ style: styles.cardImage
100
+ }) : /*#__PURE__*/_react.default.createElement(_reactNative.View, {
101
+ testID: (0, _testID.concatTestID)(testID, 'cardBackgroundColor', String(color)),
102
+ style: [styles.cardImage, {
103
+ backgroundColor: color
104
+ }]
105
+ }), onCardPress && /*#__PURE__*/_react.default.createElement(_accessibilityHistoryWrappers.TouchableOpacity, {
106
+ style: styles.cardButton,
107
+ onPress: cardPressHandler
108
+ }), shouldShowCarousel ? /*#__PURE__*/_react.default.createElement(_credentialImageCarousel.default, {
109
+ style: {
110
+ marginTop: tappableHeaderHeight !== null && tappableHeaderHeight !== void 0 ? tappableHeaderHeight : 0
111
+ },
112
+ imagesToRender: cardCarouselImages !== null && cardCarouselImages !== void 0 ? cardCarouselImages : [],
113
+ carouselSize: {
114
+ width: cardSize.width,
115
+ height: cardSize.height - (tappableHeaderHeight !== null && tappableHeaderHeight !== void 0 ? tappableHeaderHeight : 0) - (noticeHeight !== null && noticeHeight !== void 0 ? noticeHeight : 0)
116
+ },
117
+ testID: (0, _testID.concatTestID)(testID, 'carousel')
118
+ }) : null, /*#__PURE__*/_react.default.createElement(_accessibilityHistoryWrappers.TouchableOpacity, {
119
+ onLayout: onHeaderLayoutChange,
120
+ activeOpacity: 0.9,
121
+ disabled: !onHeaderPress,
122
+ onPress: headerPressHandler,
123
+ style: styles.header
124
+ }, /*#__PURE__*/_react.default.createElement(_credentialHeader.default, _extends({}, header, {
125
+ color: (_header$color = header.color) !== null && _header$color !== void 0 ? _header$color : color,
126
+ testID: (0, _testID.concatTestID)(testID, 'header')
127
+ }))), notice && /*#__PURE__*/_react.default.createElement(_blurView.default, {
128
+ onLayout: onNoticeLayoutChange,
129
+ blurStyle: "soft",
130
+ style: [styles.notice, style],
131
+ testID: (0, _testID.concatTestID)(testID, 'notice')
132
+ }, noticeIconView && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
133
+ style: styles.noticeIcon
134
+ }, noticeIconView), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
135
+ style: styles.noticeTextWrapper
136
+ }, /*#__PURE__*/_react.default.createElement(_typography.default, {
137
+ color: colorScheme.text,
138
+ preset: "xs/line-height-small",
139
+ style: styles.noticeText,
140
+ testID: (0, _testID.concatTestID)(testID, 'notice.text')
141
+ }, notice))));
142
+ };
143
+ const styles = _reactNative.StyleSheet.create({
144
+ card: {
145
+ borderRadius: 10,
146
+ overflow: 'hidden'
147
+ },
148
+ cardButton: {
149
+ height: '100%',
150
+ position: 'absolute',
151
+ width: '100%'
152
+ },
153
+ cardImage: {
154
+ aspectRatio: CredentialCardRatio,
155
+ width: '100%'
156
+ },
157
+ header: {
158
+ position: 'absolute',
159
+ top: 0,
160
+ width: '100%'
161
+ },
162
+ image: {
163
+ height: '100%',
164
+ width: '100%'
165
+ },
166
+ notice: {
167
+ bottom: 0,
168
+ columnGap: 6,
169
+ flexDirection: 'row',
170
+ justifyContent: 'flex-start',
171
+ paddingBottom: 6,
172
+ paddingHorizontal: 12,
173
+ paddingTop: 2,
174
+ position: 'absolute',
175
+ width: '100%'
176
+ },
177
+ noticeIcon: {
178
+ marginTop: 4
179
+ },
180
+ noticeText: {
181
+ marginVertical: 5
182
+ },
183
+ noticeTextWrapper: {
184
+ flex: 1
185
+ }
186
+ });
187
+ var _default = CredentialCard;
188
+ exports.default = _default;
189
+ //# sourceMappingURL=credential-card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_accessibilityHistoryWrappers","_blurView","_interopRequireDefault","_imageOrComponent","_typography","_colorSchemeContext","_testID","_credentialHeader","_credentialImageCarousel","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","CredentialCardShadow","shadowColor","shadowOffset","height","width","shadowOpacity","shadowRadius","exports","CredentialCardRatio","CredentialCard","_ref","_header$color","cardCarouselImages","cardImage","color","credentialId","header","notice","noticeIcon","onCardPress","onHeaderPress","style","testID","colorScheme","useAppColorScheme","tappableHeaderHeight","setTappableHeaderHeight","useState","noticeHeight","setNoticeHeight","cardSize","setCardSize","onCardLayoutChange","useCallback","event","nativeEvent","layout","onHeaderLayoutChange","onNoticeLayoutChange","headerPressHandler","cardPressHandler","noticeIconView","useMemo","undefined","React","isValidElement","NoticeIconComponent","createElement","shouldShowCarousel","View","onLayout","styles","card","Image","concatTestID","imageSource","image","String","backgroundColor","TouchableOpacity","cardButton","onPress","marginTop","imagesToRender","carouselSize","activeOpacity","disabled","blurStyle","noticeTextWrapper","text","preset","noticeText","StyleSheet","create","borderRadius","overflow","position","aspectRatio","top","bottom","columnGap","flexDirection","justifyContent","paddingBottom","paddingHorizontal","paddingTop","marginVertical","flex","_default"],"sources":["credential-card.tsx"],"sourcesContent":["import React, { FC, useCallback, useMemo, useState } from 'react';\nimport { ColorValue, Image, LayoutChangeEvent, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\n\nimport { TouchableOpacity } from '../../accessibility/accessibilityHistoryWrappers';\nimport BlurView from '../../blur/blur-view';\nimport ImageOrComponent, { ImageOrComponentSource } from '../../image/image-or-component';\nimport Typography from '../../text/typography';\nimport { useAppColorScheme } from '../../theme/color-scheme-context';\nimport { concatTestID } from '../../utils/testID';\nimport CredentialHeader, { CredentialHeaderProps } from './credential-header';\nimport CarouselComponent, { CarouselImage } from './credential-image-carousel';\n\nexport const CredentialCardShadow: Pick<ViewStyle, 'shadowColor' | 'shadowOffset' | 'shadowOpacity' | 'shadowRadius'> =\n {\n shadowColor: '#10274226',\n shadowOffset: {\n height: 5,\n width: 0,\n },\n shadowOpacity: 1,\n shadowRadius: 7,\n };\n\nexport const CredentialCardRatio = 18 / 11;\n\nexport type CredentialCardProps = {\n cardCarouselImages?: CarouselImage[];\n cardImage?: ImageOrComponentSource;\n color?: ColorValue;\n credentialId?: string;\n header: CredentialHeaderProps;\n notice?: string;\n noticeIcon?: React.ComponentType<any> | React.ReactElement;\n onCardPress?: (credentialId?: string) => void;\n onHeaderPress?: (credentialId?: string) => void;\n style?: StyleProp<ViewStyle>;\n testID?: string;\n};\n\nconst CredentialCard: FC<CredentialCardProps> = ({\n cardCarouselImages = [],\n cardImage,\n color = '#5A69F3',\n credentialId,\n header,\n notice,\n noticeIcon,\n onCardPress,\n onHeaderPress,\n style,\n testID,\n}) => {\n const colorScheme = useAppColorScheme();\n const [tappableHeaderHeight, setTappableHeaderHeight] = useState<number>();\n const [noticeHeight, setNoticeHeight] = useState<number>();\n const [cardSize, setCardSize] = useState<{ height: number; width: number }>();\n\n const onCardLayoutChange = useCallback((event: LayoutChangeEvent) => {\n const { width, height } = event.nativeEvent.layout;\n setCardSize({ width, height });\n }, []);\n\n const onHeaderLayoutChange = useCallback((event: LayoutChangeEvent) => {\n setTappableHeaderHeight(event.nativeEvent.layout.height);\n }, []);\n\n const onNoticeLayoutChange = useCallback((event: LayoutChangeEvent) => {\n setNoticeHeight(event.nativeEvent.layout.height);\n }, []);\n\n const headerPressHandler = useCallback(() => {\n onHeaderPress?.(credentialId);\n }, [credentialId, onHeaderPress]);\n\n const cardPressHandler = useCallback(() => {\n onCardPress?.(credentialId);\n }, [credentialId, onCardPress]);\n\n const noticeIconView: React.ReactElement | undefined = useMemo(() => {\n if (!noticeIcon) {\n return undefined;\n }\n if (React.isValidElement(noticeIcon)) {\n return noticeIcon;\n } else {\n const NoticeIconComponent = noticeIcon as React.ComponentType<any>;\n return <NoticeIconComponent />;\n }\n }, [noticeIcon]);\n\n const shouldShowCarousel = cardSize?.width && cardSize.height;\n return (\n <View onLayout={onCardLayoutChange} style={[styles.card, style]} testID={testID}>\n {cardImage ? (\n 'imageSource' in cardImage ? (\n <View style={styles.cardImage}>\n <Image testID={concatTestID(testID, 'imageSource')} source={cardImage.imageSource} style={styles.image} />\n </View>\n ) : (\n <ImageOrComponent testID={concatTestID(testID, 'cardImage')} source={cardImage} style={styles.cardImage} />\n )\n ) : (\n <View\n testID={concatTestID(testID, 'cardBackgroundColor', String(color))}\n style={[styles.cardImage, { backgroundColor: color }]}\n />\n )}\n {onCardPress && <TouchableOpacity style={styles.cardButton} onPress={cardPressHandler} />}\n {shouldShowCarousel ? (\n <CarouselComponent\n style={{ marginTop: tappableHeaderHeight ?? 0 }}\n imagesToRender={cardCarouselImages ?? []}\n carouselSize={{\n width: cardSize.width,\n height: cardSize.height - (tappableHeaderHeight ?? 0) - (noticeHeight ?? 0),\n }}\n testID={concatTestID(testID, 'carousel')}\n />\n ) : null}\n <TouchableOpacity\n onLayout={onHeaderLayoutChange}\n activeOpacity={0.9}\n disabled={!onHeaderPress}\n onPress={headerPressHandler}\n style={styles.header}>\n <CredentialHeader {...header} color={header.color ?? color} testID={concatTestID(testID, 'header')} />\n </TouchableOpacity>\n {notice && (\n <BlurView\n onLayout={onNoticeLayoutChange}\n blurStyle=\"soft\"\n style={[styles.notice, style]}\n testID={concatTestID(testID, 'notice')}>\n {noticeIconView && <View style={styles.noticeIcon}>{noticeIconView}</View>}\n <View style={styles.noticeTextWrapper}>\n <Typography\n color={colorScheme.text}\n preset=\"xs/line-height-small\"\n style={styles.noticeText}\n testID={concatTestID(testID, 'notice.text')}>\n {notice}\n </Typography>\n </View>\n </BlurView>\n )}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n card: {\n borderRadius: 10,\n overflow: 'hidden',\n },\n cardButton: {\n height: '100%',\n position: 'absolute',\n width: '100%',\n },\n cardImage: {\n aspectRatio: CredentialCardRatio,\n width: '100%',\n },\n header: {\n position: 'absolute',\n top: 0,\n width: '100%',\n },\n image: {\n height: '100%',\n width: '100%',\n },\n notice: {\n bottom: 0,\n columnGap: 6,\n flexDirection: 'row',\n justifyContent: 'flex-start',\n paddingBottom: 6,\n paddingHorizontal: 12,\n paddingTop: 2,\n position: 'absolute',\n width: '100%',\n },\n noticeIcon: {\n marginTop: 4,\n },\n noticeText: {\n marginVertical: 5,\n },\n noticeTextWrapper: {\n flex: 1,\n },\n});\n\nexport default CredentialCard;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,6BAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,WAAA,GAAAF,sBAAA,CAAAJ,OAAA;AACA,IAAAO,mBAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,iBAAA,GAAAL,sBAAA,CAAAJ,OAAA;AACA,IAAAU,wBAAA,GAAAN,sBAAA,CAAAJ,OAAA;AAA+E,SAAAI,uBAAAO,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAhB,wBAAAY,GAAA,EAAAI,WAAA,SAAAA,WAAA,IAAAJ,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAQ,KAAA,GAAAL,wBAAA,CAAAC,WAAA,OAAAI,KAAA,IAAA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AAC,IAAAC,QAAA,GAEY/E,cAAc;AAAAF,OAAA,CAAApC,OAAA,GAAAqH,QAAA"}
@@ -0,0 +1,201 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
10
+ var _buttons = require("../../buttons");
11
+ var _credential = require("../../icons/credential");
12
+ var _colorSchemeContext = require("../../theme/color-scheme-context");
13
+ var _testID = require("../../utils/testID");
14
+ var _credentialAttributeItem = _interopRequireDefault(require("../credential-attribute-item"));
15
+ var _credentialCard = _interopRequireDefault(require("./credential-card"));
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
18
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
20
+ const PREVIEW_ATTRIBUTES_COUNT = 3;
21
+ const CredentialDetailsCard = _ref => {
22
+ var _header$accessory;
23
+ let {
24
+ animate = true,
25
+ attributes,
26
+ card,
27
+ expanded,
28
+ footer,
29
+ onImagePreview,
30
+ onAttributeSelected,
31
+ style,
32
+ testID,
33
+ showAllButtonLabel,
34
+ ...viewProps
35
+ } = _ref;
36
+ const colorScheme = (0, _colorSchemeContext.useAppColorScheme)();
37
+ const [previewAttributesHeight, setPreviewAttributesHeight] = (0, _react.useState)();
38
+ const [fullAttributesHeight, setFullAttributesHeight] = (0, _react.useState)();
39
+ const [buttonViewHeight, setButtonViewHeight] = (0, _react.useState)();
40
+ const [allAttributesRendered, setAllAttributesRendered] = (0, _react.useState)(attributes && attributes.length <= PREVIEW_ATTRIBUTES_COUNT || !showAllButtonLabel);
41
+ const CaretIcon = expanded ? _credential.UpIcon : _credential.DownIcon;
42
+ const currentHeight = (0, _reactNativeReanimated.useSharedValue)(undefined);
43
+ const previewAttributes = attributes ? attributes.slice(0, PREVIEW_ATTRIBUTES_COUNT) : [];
44
+ const extraAttributes = (0, _react.useMemo)(() => attributes ? attributes.slice(PREVIEW_ATTRIBUTES_COUNT) : [], [attributes]);
45
+ (0, _react.useEffect)(() => {
46
+ if (!extraAttributes || allAttributesRendered) {
47
+ setButtonViewHeight(0);
48
+ }
49
+ }, [extraAttributes, allAttributesRendered]);
50
+ (0, _react.useEffect)(() => {
51
+ if (extraAttributes.length === 0) {
52
+ const viewStyle = _reactNative.StyleSheet.flatten([styles.allAttributesWrapper, footer && styles.allAttributesWrapperWithFooter]);
53
+ const padding = viewStyle.paddingBottom;
54
+ setFullAttributesHeight(padding);
55
+ }
56
+ }, [extraAttributes, footer]);
57
+ (0, _react.useEffect)(() => {
58
+ if (previewAttributesHeight === undefined || buttonViewHeight === undefined) {
59
+ return;
60
+ }
61
+ if (allAttributesRendered && fullAttributesHeight === undefined) {
62
+ return;
63
+ }
64
+ const additionalAttributesHeight = fullAttributesHeight !== null && fullAttributesHeight !== void 0 ? fullAttributesHeight : 0;
65
+ const additionalHeight = allAttributesRendered ? additionalAttributesHeight : buttonViewHeight;
66
+ const newHeight = expanded ? previewAttributesHeight + additionalHeight : 0;
67
+ if (currentHeight.value === undefined || !animate) {
68
+ currentHeight.value = newHeight;
69
+ return;
70
+ }
71
+ const duration = !expanded ? 250 : allAttributesRendered ? previewAttributes.length * 50 : extraAttributes.length * 50;
72
+ currentHeight.value = (0, _reactNativeReanimated.withTiming)(newHeight, {
73
+ duration
74
+ });
75
+ }, [allAttributesRendered, buttonViewHeight, currentHeight, animate, expanded, extraAttributes.length, fullAttributesHeight, previewAttributes.length, previewAttributesHeight]);
76
+ const credentialAttributesStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
77
+ if (currentHeight.value === undefined) {
78
+ if (expanded) {
79
+ return {};
80
+ }
81
+ return {
82
+ height: 0
83
+ };
84
+ }
85
+ return {
86
+ height: currentHeight.value
87
+ };
88
+ });
89
+ const onPreviewAttrContentLayout = (0, _react.useCallback)(event => {
90
+ setPreviewAttributesHeight(event.nativeEvent.layout.height);
91
+ }, []);
92
+ const onFullAttrContentLayout = (0, _react.useCallback)(event => {
93
+ setFullAttributesHeight(event.nativeEvent.layout.height);
94
+ }, []);
95
+ const onButtonViewLayout = (0, _react.useCallback)(event => {
96
+ setButtonViewHeight(event.nativeEvent.layout.height);
97
+ }, []);
98
+ const footerView = (0, _react.useMemo)(() => {
99
+ if (!footer) {
100
+ return undefined;
101
+ }
102
+ if ( /*#__PURE__*/_react.default.isValidElement(footer)) {
103
+ return footer;
104
+ } else {
105
+ const FooterComponent = footer;
106
+ return /*#__PURE__*/_react.default.createElement(FooterComponent, null);
107
+ }
108
+ }, [footer]);
109
+ const {
110
+ header,
111
+ ...cardProps
112
+ } = card;
113
+ const renderExtraAttributes = allAttributesRendered || previewAttributesHeight !== undefined && currentHeight.value !== undefined;
114
+ return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({
115
+ style: [styles.detailsCard, {
116
+ backgroundColor: colorScheme.white
117
+ }, style],
118
+ testID: testID
119
+ }, viewProps), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
120
+ testID: (0, _testID.concatTestID)(testID, expanded ? 'expanded' : 'collapsed')
121
+ }, /*#__PURE__*/_react.default.createElement(_credentialCard.default, _extends({}, cardProps, {
122
+ header: {
123
+ ...header,
124
+ accessory: (_header$accessory = header.accessory) !== null && _header$accessory !== void 0 ? _header$accessory : CaretIcon
125
+ },
126
+ style: [styles.card, cardProps.style],
127
+ testID: (0, _testID.concatTestID)(testID, 'card')
128
+ })), previewAttributes.length > 0 && /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.View, {
129
+ style: [styles.attributesAnimatedWrapper, credentialAttributesStyle]
130
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
131
+ style: styles.attributesWrapper
132
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
133
+ onLayout: onPreviewAttrContentLayout,
134
+ style: styles.previewAttributesWrapper
135
+ }, previewAttributes.map((attribute, idx) => /*#__PURE__*/_react.default.createElement(_credentialAttributeItem.default, _extends({
136
+ key: attribute.id,
137
+ last: !footerView && !extraAttributes.length && idx === previewAttributes.length - 1,
138
+ testID: (0, _testID.concatTestID)(testID, 'attribute', attribute.id),
139
+ onImagePreview: onImagePreview,
140
+ onPress: onAttributeSelected
141
+ }, attribute)))), !allAttributesRendered && extraAttributes.length > 0 && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
142
+ style: styles.allAttributesWrapper,
143
+ onLayout: onButtonViewLayout
144
+ }, /*#__PURE__*/_react.default.createElement(_buttons.Button, {
145
+ onPress: () => setAllAttributesRendered(true),
146
+ type: _buttons.ButtonType.Secondary,
147
+ testID: (0, _testID.concatTestID)(testID, 'showAllAttributesButton'),
148
+ title: showAllButtonLabel
149
+ })), renderExtraAttributes && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
150
+ style: [styles.allAttributesWrapper, footerView && styles.allAttributesWrapperWithFooter],
151
+ onLayout: onFullAttrContentLayout
152
+ }, extraAttributes.map((attribute, index, _ref2) => {
153
+ let {
154
+ length
155
+ } = _ref2;
156
+ return /*#__PURE__*/_react.default.createElement(_credentialAttributeItem.default, _extends({
157
+ key: attribute.id,
158
+ last: !footerView && index === length - 1,
159
+ testID: (0, _testID.concatTestID)(testID, 'attribute', attribute.id),
160
+ onImagePreview: onImagePreview,
161
+ onPress: onAttributeSelected
162
+ }, attribute));
163
+ })))), footerView ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
164
+ style: styles.footer
165
+ }, footerView) : null));
166
+ };
167
+ const styles = _reactNative.StyleSheet.create({
168
+ allAttributesWrapper: {
169
+ paddingBottom: 12,
170
+ paddingHorizontal: 4,
171
+ width: '100%'
172
+ },
173
+ allAttributesWrapperWithFooter: {
174
+ paddingBottom: 0
175
+ },
176
+ attributesAnimatedWrapper: {
177
+ overflow: 'hidden'
178
+ },
179
+ attributesWrapper: {
180
+ paddingTop: 7,
181
+ position: 'absolute',
182
+ width: '100%'
183
+ },
184
+ card: {
185
+ borderRadius: 0
186
+ },
187
+ detailsCard: {
188
+ borderRadius: 10,
189
+ overflow: 'hidden'
190
+ },
191
+ footer: {
192
+ marginTop: 12
193
+ },
194
+ previewAttributesWrapper: {
195
+ paddingHorizontal: 4,
196
+ width: '100%'
197
+ }
198
+ });
199
+ var _default = CredentialDetailsCard;
200
+ exports.default = _default;
201
+ //# sourceMappingURL=credential-details-card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_buttons","_credential","_colorSchemeContext","_testID","_credentialAttributeItem","_interopRequireDefault","_credentialCard","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","PREVIEW_ATTRIBUTES_COUNT","CredentialDetailsCard","_ref","_header$accessory","animate","attributes","card","expanded","footer","onImagePreview","onAttributeSelected","style","testID","showAllButtonLabel","viewProps","colorScheme","useAppColorScheme","previewAttributesHeight","setPreviewAttributesHeight","useState","fullAttributesHeight","setFullAttributesHeight","buttonViewHeight","setButtonViewHeight","allAttributesRendered","setAllAttributesRendered","CaretIcon","UpIcon","DownIcon","currentHeight","useSharedValue","undefined","previewAttributes","slice","extraAttributes","useMemo","useEffect","viewStyle","StyleSheet","flatten","styles","allAttributesWrapper","allAttributesWrapperWithFooter","padding","paddingBottom","additionalAttributesHeight","additionalHeight","newHeight","value","duration","withTiming","credentialAttributesStyle","useAnimatedStyle","height","onPreviewAttrContentLayout","useCallback","event","nativeEvent","layout","onFullAttrContentLayout","onButtonViewLayout","footerView","React","isValidElement","FooterComponent","createElement","header","cardProps","renderExtraAttributes","View","detailsCard","backgroundColor","white","concatTestID","accessory","attributesAnimatedWrapper","attributesWrapper","onLayout","previewAttributesWrapper","map","attribute","idx","id","last","onPress","Button","type","ButtonType","Secondary","title","index","_ref2","create","paddingHorizontal","width","overflow","paddingTop","position","borderRadius","marginTop","_default","exports"],"sources":["credential-details-card.tsx"],"sourcesContent":["import React, { ComponentType, FC, ReactElement, useCallback, useEffect, useMemo, useState } from 'react';\nimport { ImageSourcePropType, LayoutChangeEvent, StyleSheet, View, ViewProps } from 'react-native';\nimport Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';\n\nimport { Button, ButtonType } from '../../buttons';\nimport { DownIcon, UpIcon } from '../../icons/credential';\nimport { useAppColorScheme } from '../../theme/color-scheme-context';\nimport { concatTestID } from '../../utils/testID';\nimport CredentialAttributeItem, { CredentialAttribute } from '../credential-attribute-item';\nimport CredentialCard, { CredentialCardProps } from './credential-card';\n\nexport type CredentialDetailsCardProps = ViewProps & {\n animate?: boolean;\n attributes: CredentialAttribute[] | false;\n card: CredentialCardProps;\n expanded?: boolean;\n footer?: ComponentType<any> | ReactElement;\n onImagePreview?: (name: string, image: ImageSourcePropType) => void;\n onAttributeSelected?: (id: string, selected: boolean) => void;\n showAllButtonLabel?: string;\n};\n\nconst PREVIEW_ATTRIBUTES_COUNT = 3;\n\nconst CredentialDetailsCard: FC<CredentialDetailsCardProps> = ({\n animate = true,\n attributes,\n card,\n expanded,\n footer,\n onImagePreview,\n onAttributeSelected,\n style,\n testID,\n showAllButtonLabel,\n ...viewProps\n}) => {\n const colorScheme = useAppColorScheme();\n const [previewAttributesHeight, setPreviewAttributesHeight] = useState<number>();\n const [fullAttributesHeight, setFullAttributesHeight] = useState<number>();\n const [buttonViewHeight, setButtonViewHeight] = useState<number>();\n\n const [allAttributesRendered, setAllAttributesRendered] = useState<boolean>(\n (attributes && attributes.length <= PREVIEW_ATTRIBUTES_COUNT) || !showAllButtonLabel,\n );\n\n const CaretIcon = expanded ? UpIcon : DownIcon;\n\n const currentHeight = useSharedValue<number | undefined>(undefined);\n\n const previewAttributes = attributes ? attributes.slice(0, PREVIEW_ATTRIBUTES_COUNT) : [];\n const extraAttributes = useMemo(() => (attributes ? attributes.slice(PREVIEW_ATTRIBUTES_COUNT) : []), [attributes]);\n\n useEffect(() => {\n if (!extraAttributes || allAttributesRendered) {\n setButtonViewHeight(0);\n }\n }, [extraAttributes, allAttributesRendered]);\n\n useEffect(() => {\n if (extraAttributes.length === 0) {\n const viewStyle = StyleSheet.flatten([\n styles.allAttributesWrapper,\n footer && styles.allAttributesWrapperWithFooter,\n ]);\n const padding = viewStyle.paddingBottom;\n setFullAttributesHeight(padding);\n }\n }, [extraAttributes, footer]);\n\n useEffect(() => {\n if (previewAttributesHeight === undefined || buttonViewHeight === undefined) {\n return;\n }\n if (allAttributesRendered && fullAttributesHeight === undefined) {\n return;\n }\n\n const additionalAttributesHeight = fullAttributesHeight ?? 0;\n const additionalHeight = allAttributesRendered ? additionalAttributesHeight : buttonViewHeight;\n const newHeight = expanded ? previewAttributesHeight + additionalHeight : 0;\n\n if (currentHeight.value === undefined || !animate) {\n currentHeight.value = newHeight;\n return;\n }\n\n const duration = !expanded\n ? 250\n : allAttributesRendered\n ? previewAttributes.length * 50\n : extraAttributes.length * 50;\n currentHeight.value = withTiming(newHeight, {\n duration,\n });\n }, [\n allAttributesRendered,\n buttonViewHeight,\n currentHeight,\n animate,\n expanded,\n extraAttributes.length,\n fullAttributesHeight,\n previewAttributes.length,\n previewAttributesHeight,\n ]);\n\n const credentialAttributesStyle = useAnimatedStyle(() => {\n if (currentHeight.value === undefined) {\n if (expanded) {\n return {};\n }\n return {\n height: 0,\n };\n }\n return {\n height: currentHeight.value,\n };\n });\n\n const onPreviewAttrContentLayout = useCallback((event: LayoutChangeEvent) => {\n setPreviewAttributesHeight(event.nativeEvent.layout.height);\n }, []);\n\n const onFullAttrContentLayout = useCallback((event: LayoutChangeEvent) => {\n setFullAttributesHeight(event.nativeEvent.layout.height);\n }, []);\n\n const onButtonViewLayout = useCallback((event: LayoutChangeEvent) => {\n setButtonViewHeight(event.nativeEvent.layout.height);\n }, []);\n\n const footerView: ReactElement | undefined = useMemo(() => {\n if (!footer) {\n return undefined;\n }\n if (React.isValidElement(footer)) {\n return footer;\n } else {\n const FooterComponent = footer as React.ComponentType<any>;\n return <FooterComponent />;\n }\n }, [footer]);\n\n const { header, ...cardProps } = card;\n\n const renderExtraAttributes =\n allAttributesRendered || (previewAttributesHeight !== undefined && currentHeight.value !== undefined);\n return (\n <View style={[styles.detailsCard, { backgroundColor: colorScheme.white }, style]} testID={testID} {...viewProps}>\n <View testID={concatTestID(testID, expanded ? 'expanded' : 'collapsed')}>\n <CredentialCard\n {...cardProps}\n header={{ ...header, accessory: header.accessory ?? CaretIcon }}\n style={[styles.card, cardProps.style]}\n testID={concatTestID(testID, 'card')}\n />\n {previewAttributes.length > 0 && (\n <Animated.View style={[styles.attributesAnimatedWrapper, credentialAttributesStyle]}>\n <View style={styles.attributesWrapper}>\n <View onLayout={onPreviewAttrContentLayout} style={styles.previewAttributesWrapper}>\n {previewAttributes.map((attribute, idx) => (\n <CredentialAttributeItem\n key={attribute.id}\n last={!footerView && !extraAttributes.length && idx === previewAttributes.length - 1}\n testID={concatTestID(testID, 'attribute', attribute.id)}\n onImagePreview={onImagePreview}\n onPress={onAttributeSelected}\n {...attribute}\n />\n ))}\n </View>\n {!allAttributesRendered && extraAttributes.length > 0 && (\n <View style={styles.allAttributesWrapper} onLayout={onButtonViewLayout}>\n <Button\n onPress={() => setAllAttributesRendered(true)}\n type={ButtonType.Secondary}\n testID={concatTestID(testID, 'showAllAttributesButton')}\n title={showAllButtonLabel!}\n />\n </View>\n )}\n {renderExtraAttributes && (\n <View\n style={[styles.allAttributesWrapper, footerView && styles.allAttributesWrapperWithFooter]}\n onLayout={onFullAttrContentLayout}>\n {extraAttributes.map((attribute, index, { length }) => (\n <CredentialAttributeItem\n key={attribute.id}\n last={!footerView && index === length - 1}\n testID={concatTestID(testID, 'attribute', attribute.id)}\n onImagePreview={onImagePreview}\n onPress={onAttributeSelected}\n {...attribute}\n />\n ))}\n </View>\n )}\n </View>\n </Animated.View>\n )}\n {footerView ? <View style={styles.footer}>{footerView}</View> : null}\n </View>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n allAttributesWrapper: {\n paddingBottom: 12,\n paddingHorizontal: 4,\n width: '100%',\n },\n allAttributesWrapperWithFooter: {\n paddingBottom: 0,\n },\n attributesAnimatedWrapper: {\n overflow: 'hidden',\n },\n attributesWrapper: {\n paddingTop: 7,\n position: 'absolute',\n width: '100%',\n },\n card: {\n borderRadius: 0,\n },\n detailsCard: {\n borderRadius: 10,\n overflow: 'hidden',\n },\n footer: {\n marginTop: 12,\n },\n previewAttributesWrapper: {\n paddingHorizontal: 4,\n width: '100%',\n },\n});\n\nexport default CredentialDetailsCard;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;A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(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
10
+ var _credentialCard = require("./credential-card");
11
+ var _credentialDetailsCard = _interopRequireDefault(require("./credential-details-card"));
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
16
+ const CredentialDetailsCardListItem = _ref => {
17
+ let {
18
+ detailsCardStyle,
19
+ expanded,
20
+ lastItem,
21
+ style,
22
+ ...props
23
+ } = _ref;
24
+ const [minHeight, setMinHeight] = (0, _react.useState)();
25
+ const [detailsCardHeight, setDetailsCardHeight] = (0, _react.useState)();
26
+ const cardListItemHeight = (0, _reactNativeReanimated.useSharedValue)(undefined);
27
+ (0, _react.useEffect)(() => {
28
+ if (!detailsCardHeight || !minHeight) {
29
+ return;
30
+ }
31
+ const newValue = expanded ? detailsCardHeight : minHeight;
32
+ if (cardListItemHeight.value === undefined) {
33
+ cardListItemHeight.value = newValue;
34
+ return;
35
+ }
36
+ cardListItemHeight.value = (0, _reactNativeReanimated.withTiming)(newValue, {
37
+ duration: 250
38
+ });
39
+ }, [cardListItemHeight, detailsCardHeight, minHeight, expanded]);
40
+ const cardWrapperStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
41
+ if (cardListItemHeight.value !== undefined) {
42
+ return {
43
+ height: cardListItemHeight.value
44
+ };
45
+ }
46
+ if (lastItem || expanded) {
47
+ return {};
48
+ }
49
+ return {
50
+ height: 60
51
+ };
52
+ });
53
+ const onContentLayout = (0, _react.useCallback)(event => {
54
+ var _StyleSheet$flatten$b, _StyleSheet$flatten;
55
+ const {
56
+ width,
57
+ height
58
+ } = event.nativeEvent.layout;
59
+ if (!minHeight) {
60
+ setMinHeight(lastItem ? width / _credentialCard.CredentialCardRatio : 60);
61
+ }
62
+ const borderWidth = (_StyleSheet$flatten$b = (_StyleSheet$flatten = _reactNative.StyleSheet.flatten(style)) === null || _StyleSheet$flatten === void 0 ? void 0 : _StyleSheet$flatten.borderWidth) !== null && _StyleSheet$flatten$b !== void 0 ? _StyleSheet$flatten$b : 0;
63
+ setDetailsCardHeight(height + 2 * borderWidth);
64
+ }, [lastItem, minHeight, style]);
65
+ return /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.View, {
66
+ style: [cardWrapperStyle, style]
67
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
68
+ style: styles.cardWrapper
69
+ }, /*#__PURE__*/_react.default.createElement(_credentialDetailsCard.default, _extends({
70
+ animate: false,
71
+ expanded: expanded,
72
+ onLayout: onContentLayout,
73
+ style: detailsCardStyle
74
+ }, props))));
75
+ };
76
+ const styles = _reactNative.StyleSheet.create({
77
+ cardWrapper: {
78
+ ..._credentialCard.CredentialCardShadow,
79
+ overflow: 'visible'
80
+ }
81
+ });
82
+ var _default = CredentialDetailsCardListItem;
83
+ exports.default = _default;
84
+ //# sourceMappingURL=credential-details-list-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_credentialCard","_credentialDetailsCard","_interopRequireDefault","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","CredentialDetailsCardListItem","_ref","detailsCardStyle","expanded","lastItem","style","props","minHeight","setMinHeight","useState","detailsCardHeight","setDetailsCardHeight","cardListItemHeight","useSharedValue","undefined","useEffect","newValue","value","withTiming","duration","cardWrapperStyle","useAnimatedStyle","height","onContentLayout","useCallback","event","_StyleSheet$flatten$b","_StyleSheet$flatten","width","nativeEvent","layout","CredentialCardRatio","borderWidth","StyleSheet","flatten","createElement","View","styles","cardWrapper","animate","onLayout","create","CredentialCardShadow","overflow","_default","exports"],"sources":["credential-details-list-item.tsx"],"sourcesContent":["import React, { FC, useCallback, useEffect, useState } from 'react';\nimport { LayoutChangeEvent, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\nimport Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';\n\nimport { CredentialCardRatio, CredentialCardShadow } from './credential-card';\nimport CredentialDetailsCard, { CredentialDetailsCardProps } from './credential-details-card';\n\nexport type CredentialDetailsCardListItemProps = Omit<CredentialDetailsCardProps, 'animate'> & {\n detailsCardStyle?: StyleProp<ViewStyle>;\n lastItem?: boolean;\n};\n\nconst CredentialDetailsCardListItem: FC<CredentialDetailsCardListItemProps> = ({\n detailsCardStyle,\n expanded,\n lastItem,\n style,\n ...props\n}) => {\n const [minHeight, setMinHeight] = useState<number>();\n const [detailsCardHeight, setDetailsCardHeight] = useState<number>();\n\n const cardListItemHeight = useSharedValue<number | undefined>(undefined);\n\n useEffect(() => {\n if (!detailsCardHeight || !minHeight) {\n return;\n }\n const newValue = expanded ? detailsCardHeight : minHeight;\n if (cardListItemHeight.value === undefined) {\n cardListItemHeight.value = newValue;\n return;\n }\n cardListItemHeight.value = withTiming(newValue, {\n duration: 250,\n });\n }, [cardListItemHeight, detailsCardHeight, minHeight, expanded]);\n\n const cardWrapperStyle = useAnimatedStyle(() => {\n if (cardListItemHeight.value !== undefined) {\n return {\n height: cardListItemHeight.value,\n };\n }\n if (lastItem || expanded) {\n return {};\n }\n return {\n height: 60,\n };\n });\n\n const onContentLayout = useCallback(\n (event: LayoutChangeEvent) => {\n const { width, height } = event.nativeEvent.layout;\n if (!minHeight) {\n setMinHeight(lastItem ? width / CredentialCardRatio : 60);\n }\n const borderWidth = StyleSheet.flatten(style)?.borderWidth ?? 0;\n setDetailsCardHeight(height + 2 * borderWidth);\n },\n [lastItem, minHeight, style],\n );\n\n return (\n <Animated.View style={[cardWrapperStyle, style]}>\n <View style={styles.cardWrapper}>\n <CredentialDetailsCard\n animate={false}\n expanded={expanded}\n onLayout={onContentLayout}\n style={detailsCardStyle}\n {...props}\n />\n </View>\n </Animated.View>\n );\n};\n\nconst styles = StyleSheet.create({\n cardWrapper: {\n ...CredentialCardShadow,\n overflow: 'visible',\n },\n});\n\nexport default CredentialDetailsCardListItem;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAH,uBAAA,CAAAC,OAAA;AAEA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,sBAAA,GAAAC,sBAAA,CAAAL,OAAA;AAA8F,SAAAK,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD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