@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,191 @@
1
+ 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); }
2
+ import React, { useCallback, useEffect, useMemo, useState } from 'react';
3
+ import { StyleSheet, View } from 'react-native';
4
+ import Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';
5
+ import { Button, ButtonType } from '../../buttons';
6
+ import { DownIcon, UpIcon } from '../../icons/credential';
7
+ import { useAppColorScheme } from '../../theme/color-scheme-context';
8
+ import { concatTestID } from '../../utils/testID';
9
+ import CredentialAttributeItem from '../credential-attribute-item';
10
+ import CredentialCard from './credential-card';
11
+ const PREVIEW_ATTRIBUTES_COUNT = 3;
12
+ const CredentialDetailsCard = _ref => {
13
+ var _header$accessory;
14
+ let {
15
+ animate = true,
16
+ attributes,
17
+ card,
18
+ expanded,
19
+ footer,
20
+ onImagePreview,
21
+ onAttributeSelected,
22
+ style,
23
+ testID,
24
+ showAllButtonLabel,
25
+ ...viewProps
26
+ } = _ref;
27
+ const colorScheme = useAppColorScheme();
28
+ const [previewAttributesHeight, setPreviewAttributesHeight] = useState();
29
+ const [fullAttributesHeight, setFullAttributesHeight] = useState();
30
+ const [buttonViewHeight, setButtonViewHeight] = useState();
31
+ const [allAttributesRendered, setAllAttributesRendered] = useState(attributes && attributes.length <= PREVIEW_ATTRIBUTES_COUNT || !showAllButtonLabel);
32
+ const CaretIcon = expanded ? UpIcon : DownIcon;
33
+ const currentHeight = useSharedValue(undefined);
34
+ const previewAttributes = attributes ? attributes.slice(0, PREVIEW_ATTRIBUTES_COUNT) : [];
35
+ const extraAttributes = useMemo(() => attributes ? attributes.slice(PREVIEW_ATTRIBUTES_COUNT) : [], [attributes]);
36
+ useEffect(() => {
37
+ if (!extraAttributes || allAttributesRendered) {
38
+ setButtonViewHeight(0);
39
+ }
40
+ }, [extraAttributes, allAttributesRendered]);
41
+ useEffect(() => {
42
+ if (extraAttributes.length === 0) {
43
+ const viewStyle = StyleSheet.flatten([styles.allAttributesWrapper, footer && styles.allAttributesWrapperWithFooter]);
44
+ const padding = viewStyle.paddingBottom;
45
+ setFullAttributesHeight(padding);
46
+ }
47
+ }, [extraAttributes, footer]);
48
+ useEffect(() => {
49
+ if (previewAttributesHeight === undefined || buttonViewHeight === undefined) {
50
+ return;
51
+ }
52
+ if (allAttributesRendered && fullAttributesHeight === undefined) {
53
+ return;
54
+ }
55
+ const additionalAttributesHeight = fullAttributesHeight !== null && fullAttributesHeight !== void 0 ? fullAttributesHeight : 0;
56
+ const additionalHeight = allAttributesRendered ? additionalAttributesHeight : buttonViewHeight;
57
+ const newHeight = expanded ? previewAttributesHeight + additionalHeight : 0;
58
+ if (currentHeight.value === undefined || !animate) {
59
+ currentHeight.value = newHeight;
60
+ return;
61
+ }
62
+ const duration = !expanded ? 250 : allAttributesRendered ? previewAttributes.length * 50 : extraAttributes.length * 50;
63
+ currentHeight.value = withTiming(newHeight, {
64
+ duration
65
+ });
66
+ }, [allAttributesRendered, buttonViewHeight, currentHeight, animate, expanded, extraAttributes.length, fullAttributesHeight, previewAttributes.length, previewAttributesHeight]);
67
+ const credentialAttributesStyle = useAnimatedStyle(() => {
68
+ if (currentHeight.value === undefined) {
69
+ if (expanded) {
70
+ return {};
71
+ }
72
+ return {
73
+ height: 0
74
+ };
75
+ }
76
+ return {
77
+ height: currentHeight.value
78
+ };
79
+ });
80
+ const onPreviewAttrContentLayout = useCallback(event => {
81
+ setPreviewAttributesHeight(event.nativeEvent.layout.height);
82
+ }, []);
83
+ const onFullAttrContentLayout = useCallback(event => {
84
+ setFullAttributesHeight(event.nativeEvent.layout.height);
85
+ }, []);
86
+ const onButtonViewLayout = useCallback(event => {
87
+ setButtonViewHeight(event.nativeEvent.layout.height);
88
+ }, []);
89
+ const footerView = useMemo(() => {
90
+ if (!footer) {
91
+ return undefined;
92
+ }
93
+ if ( /*#__PURE__*/React.isValidElement(footer)) {
94
+ return footer;
95
+ } else {
96
+ const FooterComponent = footer;
97
+ return /*#__PURE__*/React.createElement(FooterComponent, null);
98
+ }
99
+ }, [footer]);
100
+ const {
101
+ header,
102
+ ...cardProps
103
+ } = card;
104
+ const renderExtraAttributes = allAttributesRendered || previewAttributesHeight !== undefined && currentHeight.value !== undefined;
105
+ return /*#__PURE__*/React.createElement(View, _extends({
106
+ style: [styles.detailsCard, {
107
+ backgroundColor: colorScheme.white
108
+ }, style],
109
+ testID: testID
110
+ }, viewProps), /*#__PURE__*/React.createElement(View, {
111
+ testID: concatTestID(testID, expanded ? 'expanded' : 'collapsed')
112
+ }, /*#__PURE__*/React.createElement(CredentialCard, _extends({}, cardProps, {
113
+ header: {
114
+ ...header,
115
+ accessory: (_header$accessory = header.accessory) !== null && _header$accessory !== void 0 ? _header$accessory : CaretIcon
116
+ },
117
+ style: [styles.card, cardProps.style],
118
+ testID: concatTestID(testID, 'card')
119
+ })), previewAttributes.length > 0 && /*#__PURE__*/React.createElement(Animated.View, {
120
+ style: [styles.attributesAnimatedWrapper, credentialAttributesStyle]
121
+ }, /*#__PURE__*/React.createElement(View, {
122
+ style: styles.attributesWrapper
123
+ }, /*#__PURE__*/React.createElement(View, {
124
+ onLayout: onPreviewAttrContentLayout,
125
+ style: styles.previewAttributesWrapper
126
+ }, previewAttributes.map((attribute, idx) => /*#__PURE__*/React.createElement(CredentialAttributeItem, _extends({
127
+ key: attribute.id,
128
+ last: !footerView && !extraAttributes.length && idx === previewAttributes.length - 1,
129
+ testID: concatTestID(testID, 'attribute', attribute.id),
130
+ onImagePreview: onImagePreview,
131
+ onPress: onAttributeSelected
132
+ }, attribute)))), !allAttributesRendered && extraAttributes.length > 0 && /*#__PURE__*/React.createElement(View, {
133
+ style: styles.allAttributesWrapper,
134
+ onLayout: onButtonViewLayout
135
+ }, /*#__PURE__*/React.createElement(Button, {
136
+ onPress: () => setAllAttributesRendered(true),
137
+ type: ButtonType.Secondary,
138
+ testID: concatTestID(testID, 'showAllAttributesButton'),
139
+ title: showAllButtonLabel
140
+ })), renderExtraAttributes && /*#__PURE__*/React.createElement(View, {
141
+ style: [styles.allAttributesWrapper, footerView && styles.allAttributesWrapperWithFooter],
142
+ onLayout: onFullAttrContentLayout
143
+ }, extraAttributes.map((attribute, index, _ref2) => {
144
+ let {
145
+ length
146
+ } = _ref2;
147
+ return /*#__PURE__*/React.createElement(CredentialAttributeItem, _extends({
148
+ key: attribute.id,
149
+ last: !footerView && index === length - 1,
150
+ testID: concatTestID(testID, 'attribute', attribute.id),
151
+ onImagePreview: onImagePreview,
152
+ onPress: onAttributeSelected
153
+ }, attribute));
154
+ })))), footerView ? /*#__PURE__*/React.createElement(View, {
155
+ style: styles.footer
156
+ }, footerView) : null));
157
+ };
158
+ const styles = StyleSheet.create({
159
+ allAttributesWrapper: {
160
+ paddingBottom: 12,
161
+ paddingHorizontal: 4,
162
+ width: '100%'
163
+ },
164
+ allAttributesWrapperWithFooter: {
165
+ paddingBottom: 0
166
+ },
167
+ attributesAnimatedWrapper: {
168
+ overflow: 'hidden'
169
+ },
170
+ attributesWrapper: {
171
+ paddingTop: 7,
172
+ position: 'absolute',
173
+ width: '100%'
174
+ },
175
+ card: {
176
+ borderRadius: 0
177
+ },
178
+ detailsCard: {
179
+ borderRadius: 10,
180
+ overflow: 'hidden'
181
+ },
182
+ footer: {
183
+ marginTop: 12
184
+ },
185
+ previewAttributesWrapper: {
186
+ paddingHorizontal: 4,
187
+ width: '100%'
188
+ }
189
+ });
190
+ export default CredentialDetailsCard;
191
+ //# sourceMappingURL=credential-details-card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useCallback","useEffect","useMemo","useState","StyleSheet","View","Animated","useAnimatedStyle","useSharedValue","withTiming","Button","ButtonType","DownIcon","UpIcon","useAppColorScheme","concatTestID","CredentialAttributeItem","CredentialCard","PREVIEW_ATTRIBUTES_COUNT","CredentialDetailsCard","_ref","_header$accessory","animate","attributes","card","expanded","footer","onImagePreview","onAttributeSelected","style","testID","showAllButtonLabel","viewProps","colorScheme","previewAttributesHeight","setPreviewAttributesHeight","fullAttributesHeight","setFullAttributesHeight","buttonViewHeight","setButtonViewHeight","allAttributesRendered","setAllAttributesRendered","length","CaretIcon","currentHeight","undefined","previewAttributes","slice","extraAttributes","viewStyle","flatten","styles","allAttributesWrapper","allAttributesWrapperWithFooter","padding","paddingBottom","additionalAttributesHeight","additionalHeight","newHeight","value","duration","credentialAttributesStyle","height","onPreviewAttrContentLayout","event","nativeEvent","layout","onFullAttrContentLayout","onButtonViewLayout","footerView","isValidElement","FooterComponent","createElement","header","cardProps","renderExtraAttributes","_extends","detailsCard","backgroundColor","white","accessory","attributesAnimatedWrapper","attributesWrapper","onLayout","previewAttributesWrapper","map","attribute","idx","key","id","last","onPress","type","Secondary","title","index","_ref2","create","paddingHorizontal","width","overflow","paddingTop","position","borderRadius","marginTop"],"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,OAAOA,KAAK,IAAqCC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AACzG,SAAiDC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAClG,OAAOC,QAAQ,IAAIC,gBAAgB,EAAEC,cAAc,EAAEC,UAAU,QAAQ,yBAAyB;AAEhG,SAASC,MAAM,EAAEC,UAAU,QAAQ,eAAe;AAClD,SAASC,QAAQ,EAAEC,MAAM,QAAQ,wBAAwB;AACzD,SAASC,iBAAiB,QAAQ,kCAAkC;AACpE,SAASC,YAAY,QAAQ,oBAAoB;AACjD,OAAOC,uBAAuB,MAA+B,8BAA8B;AAC3F,OAAOC,cAAc,MAA+B,mBAAmB;AAavE,MAAMC,wBAAwB,GAAG,CAAC;AAElC,MAAMC,qBAAqD,GAAGC,IAAA,IAYxD;EAAA,IAAAC,iBAAA;EAAA,IAZyD;IAC7DC,OAAO,GAAG,IAAI;IACdC,UAAU;IACVC,IAAI;IACJC,QAAQ;IACRC,MAAM;IACNC,cAAc;IACdC,mBAAmB;IACnBC,KAAK;IACLC,MAAM;IACNC,kBAAkB;IAClB,GAAGC;EACL,CAAC,GAAAZ,IAAA;EACC,MAAMa,WA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C,CAEL,CACI,CAEV,EACAjB,UAAU,gBAAGtE,KAAA,CAAAyE,aAAA,CAACnE,IAAI;IAACwB,KAAK,EAAEsB,MAAM,CAACzB;EAAO,GAAE2C,UAAU,CAAQ,GAAG,IAAI,CAC/D,CACF;AAEX,CAAC;AAED,MAAMlB,MAAM,GAAG/C,UAAU,CAAC6F,MAAM,CAAC;EAC/B7C,oBAAoB,EAAE;IACpBG,aAAa,EAAE,EAAE;IACjB2C,iBAAiB,EAAE,CAAC;IACpBC,KAAK,EAAE;EACT,CAAC;EACD9C,8BAA8B,EAAE;IAC9BE,aAAa,EAAE;EACjB,CAAC;EACD0B,yBAAyB,EAAE;IACzBmB,QAAQ,EAAE;EACZ,CAAC;EACDlB,iBAAiB,EAAE;IACjBmB,UAAU,EAAE,CAAC;IACbC,QAAQ,EAAE,UAAU;IACpBH,KAAK,EAAE;EACT,CAAC;EACD3E,IAAI,EAAE;IACJ+E,YAAY,EAAE;EAChB,CAAC;EACD1B,WAAW,EAAE;IACX0B,YAAY,EAAE,EAAE;IAChBH,QAAQ,EAAE;EACZ,CAAC;EACD1E,MAAM,EAAE;IACN8E,SAAS,EAAE;EACb,CAAC;EACDpB,wBAAwB,EAAE;IACxBc,iBAAiB,EAAE,CAAC;IACpBC,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAEF,eAAehF,qBAAqB"}
@@ -0,0 +1,74 @@
1
+ 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); }
2
+ import React, { useCallback, useEffect, useState } from 'react';
3
+ import { StyleSheet, View } from 'react-native';
4
+ import Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';
5
+ import { CredentialCardRatio, CredentialCardShadow } from './credential-card';
6
+ import CredentialDetailsCard from './credential-details-card';
7
+ const CredentialDetailsCardListItem = _ref => {
8
+ let {
9
+ detailsCardStyle,
10
+ expanded,
11
+ lastItem,
12
+ style,
13
+ ...props
14
+ } = _ref;
15
+ const [minHeight, setMinHeight] = useState();
16
+ const [detailsCardHeight, setDetailsCardHeight] = useState();
17
+ const cardListItemHeight = useSharedValue(undefined);
18
+ useEffect(() => {
19
+ if (!detailsCardHeight || !minHeight) {
20
+ return;
21
+ }
22
+ const newValue = expanded ? detailsCardHeight : minHeight;
23
+ if (cardListItemHeight.value === undefined) {
24
+ cardListItemHeight.value = newValue;
25
+ return;
26
+ }
27
+ cardListItemHeight.value = withTiming(newValue, {
28
+ duration: 250
29
+ });
30
+ }, [cardListItemHeight, detailsCardHeight, minHeight, expanded]);
31
+ const cardWrapperStyle = useAnimatedStyle(() => {
32
+ if (cardListItemHeight.value !== undefined) {
33
+ return {
34
+ height: cardListItemHeight.value
35
+ };
36
+ }
37
+ if (lastItem || expanded) {
38
+ return {};
39
+ }
40
+ return {
41
+ height: 60
42
+ };
43
+ });
44
+ const onContentLayout = useCallback(event => {
45
+ var _StyleSheet$flatten$b, _StyleSheet$flatten;
46
+ const {
47
+ width,
48
+ height
49
+ } = event.nativeEvent.layout;
50
+ if (!minHeight) {
51
+ setMinHeight(lastItem ? width / CredentialCardRatio : 60);
52
+ }
53
+ const borderWidth = (_StyleSheet$flatten$b = (_StyleSheet$flatten = StyleSheet.flatten(style)) === null || _StyleSheet$flatten === void 0 ? void 0 : _StyleSheet$flatten.borderWidth) !== null && _StyleSheet$flatten$b !== void 0 ? _StyleSheet$flatten$b : 0;
54
+ setDetailsCardHeight(height + 2 * borderWidth);
55
+ }, [lastItem, minHeight, style]);
56
+ return /*#__PURE__*/React.createElement(Animated.View, {
57
+ style: [cardWrapperStyle, style]
58
+ }, /*#__PURE__*/React.createElement(View, {
59
+ style: styles.cardWrapper
60
+ }, /*#__PURE__*/React.createElement(CredentialDetailsCard, _extends({
61
+ animate: false,
62
+ expanded: expanded,
63
+ onLayout: onContentLayout,
64
+ style: detailsCardStyle
65
+ }, props))));
66
+ };
67
+ const styles = StyleSheet.create({
68
+ cardWrapper: {
69
+ ...CredentialCardShadow,
70
+ overflow: 'visible'
71
+ }
72
+ });
73
+ export default CredentialDetailsCardListItem;
74
+ //# sourceMappingURL=credential-details-list-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useCallback","useEffect","useState","StyleSheet","View","Animated","useAnimatedStyle","useSharedValue","withTiming","CredentialCardRatio","CredentialCardShadow","CredentialDetailsCard","CredentialDetailsCardListItem","_ref","detailsCardStyle","expanded","lastItem","style","props","minHeight","setMinHeight","detailsCardHeight","setDetailsCardHeight","cardListItemHeight","undefined","newValue","value","duration","cardWrapperStyle","height","onContentLayout","event","_StyleSheet$flatten$b","_StyleSheet$flatten","width","nativeEvent","layout","borderWidth","flatten","createElement","styles","cardWrapper","_extends","animate","onLayout","create","overflow"],"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,OAAOA,KAAK,IAAQC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AACnE,SAAuCC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AACxF,OAAOC,QAAQ,IAAIC,gBAAgB,EAAEC,cAAc,EAAEC,UAAU,QAAQ,yBAAyB;AAEhG,SAASC,mBAAmB,EAAEC,oBAAoB,QAAQ,mBAAmB;AAC7E,OAAOC,qBAAqB,MAAsC,2BAA2B;AAO7F,MAAMC,6BAAqE,GAAGC,IAAA,IAMxE;EAAA,IANyE;IAC7EC,gBAAgB;IAChBC,QAAQ;IACRC,QAAQ;IACRC,KAAK;IACL,GAAGC;EACL,CAAC,GAAAL,IAAA;EACC,MAAM,CAACM,SAAS,EAAEC,YAAY,CAAC,GAAGlB,QAAQ,EAAU;EACpD,MAAM,CAACmB,i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AAC,cAAAgB,mBAAA,uBAAzBA,mBAAA,CAA2BI,WAAW,cAAAL,qBAAA,cAAAA,qBAAA,GAAI,CAAC;IAC/DV,oBAAoB,CAACO,MAAM,GAAG,CAAC,GAAGQ,WAAW,CAAC;EAChD,CAAC,EACD,CAACrB,QAAQ,EAAEG,SAAS,EAAEF,KAAK,CAAC,CAC7B;EAED,oBACElB,KAAA,CAAAwC,aAAA,CAAClC,QAAQ,CAACD,IAAI;IAACa,KAAK,EAAE,CAACW,gBAAgB,EAAEX,KAAK;EAAE,gBAC9ClB,KAAA,CAAAwC,aAAA,CAACnC,IAAI;IAACa,KAAK,EAAEuB,MAAM,CAACC;EAAY,gBAC9B1C,KAAA,CAAAwC,aAAA,CAAC5B,qBAAqB,EAAA+B,QAAA;IACpBC,OAAO,EAAE,KAAM;IACf5B,QAAQ,EAAEA,QAAS;IACnB6B,QAAQ,EAAEd,eAAgB;IAC1Bb,KAAK,EAAEH;EAAiB,GACpBI,KAAK,EACT,CACG,CACO;AAEpB,CAAC;AAED,MAAMsB,MAAM,GAAGrC,UAAU,CAAC0C,MAAM,CAAC;EAC/BJ,WAAW,EAAE;IACX,GAAG/B,oBAAoB;IACvBoC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAEF,eAAelC,6BAA6B"}
@@ -0,0 +1,162 @@
1
+ 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); }
2
+ import React, { useMemo } from 'react';
3
+ import { StyleSheet, View } from 'react-native';
4
+ import BlurView from '../../blur/blur-view';
5
+ import ImageOrComponent from '../../image/image-or-component';
6
+ import Typography from '../../text/typography';
7
+ import { useAppColorScheme } from '../../theme/color-scheme-context';
8
+ import { concatTestID } from '../../utils/testID';
9
+ const CredentialHeader = _ref => {
10
+ let {
11
+ accessory,
12
+ blur = true,
13
+ color = '#5A69F3',
14
+ credentialDetailPrimary,
15
+ credentialDetailSecondary,
16
+ credentialDetailTestID,
17
+ credentialDetailErrorColor,
18
+ credentialName,
19
+ icon,
20
+ iconLabelColor = '#FFFFFF',
21
+ statusIcon,
22
+ style,
23
+ testID
24
+ } = _ref;
25
+ const colorScheme = useAppColorScheme();
26
+ const statusIconView = useMemo(() => {
27
+ if (!statusIcon) {
28
+ return undefined;
29
+ }
30
+ if ( /*#__PURE__*/React.isValidElement(statusIcon)) {
31
+ return statusIcon;
32
+ } else {
33
+ const StatusIconComponent = statusIcon;
34
+ return /*#__PURE__*/React.createElement(StatusIconComponent, null);
35
+ }
36
+ }, [statusIcon]);
37
+ const accessoryView = useMemo(() => {
38
+ if (!accessory) {
39
+ return undefined;
40
+ }
41
+ if ( /*#__PURE__*/React.isValidElement(accessory)) {
42
+ return accessory;
43
+ } else {
44
+ const AccessoryComponent = accessory;
45
+ return /*#__PURE__*/React.createElement(AccessoryComponent, null);
46
+ }
47
+ }, [accessory]);
48
+ const DetailText = useMemo(() => {
49
+ const commonProps = {
50
+ color: credentialDetailErrorColor ? colorScheme.error : colorScheme.text,
51
+ ellipsizeMode: 'tail',
52
+ numberOfLines: 1,
53
+ preset: 'xs',
54
+ style: styles.detailText
55
+ };
56
+ return /*#__PURE__*/React.createElement(View, {
57
+ style: styles.detailTextContainer
58
+ }, /*#__PURE__*/React.createElement(Typography, _extends({}, commonProps, {
59
+ testID: credentialDetailTestID !== null && credentialDetailTestID !== void 0 ? credentialDetailTestID : concatTestID(testID, 'primaryDetail')
60
+ }), credentialDetailPrimary), credentialDetailSecondary ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Typography, _extends({}, commonProps, {
61
+ style: styles.interpunct
62
+ }), '·'), /*#__PURE__*/React.createElement(Typography, _extends({}, commonProps, {
63
+ testID: concatTestID(testID, 'secondaryDetail')
64
+ }), credentialDetailSecondary)) : null);
65
+ }, [credentialDetailPrimary, credentialDetailSecondary, colorScheme, testID, credentialDetailErrorColor, credentialDetailTestID]);
66
+ return /*#__PURE__*/React.createElement(View, {
67
+ style: [styles.container, {
68
+ backgroundColor: blur ? undefined : colorScheme.white
69
+ }, style],
70
+ testID: testID
71
+ }, blur && /*#__PURE__*/React.createElement(BlurView, {
72
+ blurStyle: "strong",
73
+ style: StyleSheet.absoluteFill
74
+ }), /*#__PURE__*/React.createElement(View, {
75
+ style: [styles.imageContainer, {
76
+ backgroundColor: color
77
+ }]
78
+ }, icon ? /*#__PURE__*/React.createElement(ImageOrComponent, {
79
+ testID: concatTestID(testID, 'logoIcon'),
80
+ source: icon,
81
+ style: styles.image
82
+ }) : /*#__PURE__*/React.createElement(View, {
83
+ testID: concatTestID(testID, 'logoBackgroundColor', String(color))
84
+ }, /*#__PURE__*/React.createElement(View, {
85
+ testID: concatTestID(testID, 'logoTextColor', String(iconLabelColor))
86
+ }, /*#__PURE__*/React.createElement(Typography, {
87
+ testID: concatTestID(testID, 'logoName'),
88
+ color: iconLabelColor,
89
+ preset: "m",
90
+ style: styles.imagePlaceholder
91
+ }, credentialName.substring(0, 1))))), statusIconView && /*#__PURE__*/React.createElement(View, {
92
+ style: styles.statusIconWrapper
93
+ }, statusIconView), /*#__PURE__*/React.createElement(View, {
94
+ style: styles.text
95
+ }, /*#__PURE__*/React.createElement(Typography, {
96
+ testID: concatTestID(testID, 'name'),
97
+ color: colorScheme.text,
98
+ ellipsizeMode: 'tail',
99
+ numberOfLines: 1,
100
+ preset: "regular",
101
+ style: styles.nameText
102
+ }, credentialName), DetailText), accessoryView && /*#__PURE__*/React.createElement(View, {
103
+ style: styles.accessory
104
+ }, accessoryView));
105
+ };
106
+ const styles = StyleSheet.create({
107
+ accessory: {
108
+ alignItems: 'center',
109
+ height: 44,
110
+ justifyContent: 'center',
111
+ width: 44
112
+ },
113
+ container: {
114
+ alignItems: 'center',
115
+ flexDirection: 'row',
116
+ height: 60,
117
+ padding: 8
118
+ },
119
+ detailText: {
120
+ opacity: 0.7
121
+ },
122
+ detailTextContainer: {
123
+ flexDirection: 'row',
124
+ marginTop: -1
125
+ },
126
+ image: {
127
+ height: 44,
128
+ width: 44
129
+ },
130
+ imageContainer: {
131
+ alignItems: 'center',
132
+ borderRadius: 5,
133
+ height: 44,
134
+ justifyContent: 'center',
135
+ marginRight: 8,
136
+ overflow: 'hidden',
137
+ width: 44
138
+ },
139
+ imagePlaceholder: {
140
+ paddingLeft: 1,
141
+ paddingTop: 3,
142
+ textTransform: 'uppercase'
143
+ },
144
+ interpunct: {
145
+ marginHorizontal: 12,
146
+ opacity: 0.5
147
+ },
148
+ nameText: {
149
+ marginTop: 2
150
+ },
151
+ statusIconWrapper: {
152
+ bottom: 3,
153
+ left: 36,
154
+ position: 'absolute'
155
+ },
156
+ text: {
157
+ flex: 1,
158
+ justifyContent: 'center'
159
+ }
160
+ });
161
+ export default CredentialHeader;
162
+ //# sourceMappingURL=credential-header.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useMemo","StyleSheet","View","BlurView","ImageOrComponent","Typography","useAppColorScheme","concatTestID","CredentialHeader","_ref","accessory","blur","color","credentialDetailPrimary","credentialDetailSecondary","credentialDetailTestID","credentialDetailErrorColor","credentialName","icon","iconLabelColor","statusIcon","style","testID","colorScheme","statusIconView","undefined","isValidElement","StatusIconComponent","createElement","accessoryView","AccessoryComponent","DetailText","commonProps","error","text","ellipsizeMode","numberOfLines","preset","styles","detailText","detailTextContainer","_extends","Fragment","interpunct","container","backgroundColor","white","blurStyle","absoluteFill","imageContainer","source","image","String","imagePlaceholder","substring","statusIconWrapper","nameText","create","alignItems","height","justifyContent","width","flexDirection","padding","opacity","marginTop","borderRadius","marginRight","overflow","paddingLeft","paddingTop","textTransform","marginHorizontal","bottom","left","position","flex"],"sources":["credential-header.tsx"],"sourcesContent":["import React, { FC, useMemo } from 'react';\nimport { AccessibilityProps, ColorValue, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\n\nimport BlurView from '../../blur/blur-view';\nimport ImageOrComponent, { ImageOrComponentSource } from '../../image/image-or-component';\nimport Typography, { TypographyProps } from '../../text/typography';\nimport { useAppColorScheme } from '../../theme/color-scheme-context';\nimport { concatTestID } from '../../utils/testID';\n\nexport interface CredentialHeaderProps extends AccessibilityProps {\n accessory?: React.ComponentType<any> | React.ReactElement;\n blur?: boolean;\n color?: ColorValue;\n credentialDetailPrimary: string;\n credentialDetailSecondary?: string;\n credentialDetailTestID?: string;\n credentialDetailErrorColor?: boolean;\n credentialName: string;\n icon?: ImageOrComponentSource;\n iconLabelColor?: ColorValue;\n statusIcon?: React.ComponentType<any> | React.ReactElement;\n style?: StyleProp<ViewStyle>;\n testID?: string;\n}\n\nconst CredentialHeader: FC<CredentialHeaderProps> = ({\n accessory,\n blur = true,\n color = '#5A69F3',\n credentialDetailPrimary,\n credentialDetailSecondary,\n credentialDetailTestID,\n credentialDetailErrorColor,\n credentialName,\n icon,\n iconLabelColor = '#FFFFFF',\n statusIcon,\n style,\n testID,\n}) => {\n const colorScheme = useAppColorScheme();\n\n const statusIconView: React.ReactElement | undefined = useMemo(() => {\n if (!statusIcon) {\n return undefined;\n }\n if (React.isValidElement(statusIcon)) {\n return statusIcon;\n } else {\n const StatusIconComponent = statusIcon as React.ComponentType<any>;\n return <StatusIconComponent />;\n }\n }, [statusIcon]);\n\n const accessoryView: React.ReactElement | undefined = useMemo(() => {\n if (!accessory) {\n return undefined;\n }\n if (React.isValidElement(accessory)) {\n return accessory;\n } else {\n const AccessoryComponent = accessory as React.ComponentType<any>;\n return <AccessoryComponent />;\n }\n }, [accessory]);\n\n const DetailText = useMemo(() => {\n const commonProps: TypographyProps = {\n color: credentialDetailErrorColor ? colorScheme.error : colorScheme.text,\n ellipsizeMode: 'tail',\n numberOfLines: 1,\n preset: 'xs',\n style: styles.detailText,\n };\n return (\n <View style={styles.detailTextContainer}>\n <Typography {...commonProps} testID={credentialDetailTestID ?? concatTestID(testID, 'primaryDetail')}>\n {credentialDetailPrimary}\n </Typography>\n {credentialDetailSecondary ? (\n <>\n <Typography {...commonProps} style={styles.interpunct}>\n {'·'}\n </Typography>\n <Typography {...commonProps} testID={concatTestID(testID, 'secondaryDetail')}>\n {credentialDetailSecondary}\n </Typography>\n </>\n ) : null}\n </View>\n );\n }, [\n credentialDetailPrimary,\n credentialDetailSecondary,\n colorScheme,\n testID,\n credentialDetailErrorColor,\n credentialDetailTestID,\n ]);\n\n return (\n <View style={[styles.container, { backgroundColor: blur ? undefined : colorScheme.white }, style]} testID={testID}>\n {blur && <BlurView blurStyle=\"strong\" style={StyleSheet.absoluteFill} />}\n <View style={[styles.imageContainer, { backgroundColor: color }]}>\n {icon ? (\n <ImageOrComponent testID={concatTestID(testID, 'logoIcon')} source={icon} style={styles.image} />\n ) : (\n <View testID={concatTestID(testID, 'logoBackgroundColor', String(color))}>\n <View testID={concatTestID(testID, 'logoTextColor', String(iconLabelColor))}>\n <Typography\n testID={concatTestID(testID, 'logoName')}\n color={iconLabelColor}\n preset=\"m\"\n style={styles.imagePlaceholder}>\n {credentialName.substring(0, 1)}\n </Typography>\n </View>\n </View>\n )}\n </View>\n {statusIconView && <View style={styles.statusIconWrapper}>{statusIconView}</View>}\n <View style={styles.text}>\n <Typography\n testID={concatTestID(testID, 'name')}\n color={colorScheme.text}\n ellipsizeMode={'tail'}\n numberOfLines={1}\n preset=\"regular\"\n style={styles.nameText}>\n {credentialName}\n </Typography>\n {DetailText}\n </View>\n {accessoryView && <View style={styles.accessory}>{accessoryView}</View>}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n accessory: {\n alignItems: 'center',\n height: 44,\n justifyContent: 'center',\n width: 44,\n },\n container: {\n alignItems: 'center',\n flexDirection: 'row',\n height: 60,\n padding: 8,\n },\n detailText: {\n opacity: 0.7,\n },\n detailTextContainer: {\n flexDirection: 'row',\n marginTop: -1,\n },\n image: {\n height: 44,\n width: 44,\n },\n imageContainer: {\n alignItems: 'center',\n borderRadius: 5,\n height: 44,\n justifyContent: 'center',\n marginRight: 8,\n overflow: 'hidden',\n width: 44,\n },\n imagePlaceholder: {\n paddingLeft: 1,\n paddingTop: 3,\n textTransform: 'uppercase',\n },\n interpunct: {\n marginHorizontal: 12,\n opacity: 0.5,\n },\n nameText: {\n marginTop: 2,\n },\n statusIconWrapper: {\n bottom: 3,\n left: 36,\n position: 'absolute',\n },\n text: {\n flex: 1,\n justifyContent: 'center',\n },\n});\n\nexport default CredentialHeader;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAQC,OAAO,QAAQ,OAAO;AAC1C,SAAoDC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAErG,OAAOC,QAAQ,MAAM,sBAAsB;AAC3C,OAAOC,gBAAgB,MAAkC,gCAAgC;AACzF,OAAOC,UAAU,MAA2B,uBAAuB;AACnE,SAASC,iBAAiB,QAAQ,kCAAkC;AACpE,SAASC,YAAY,QAAQ,oBAAoB;AAkBjD,MAAMC,gBAA2C,GAAGC,IAAA,IAc9C;EAAA,IAd+C;IACnDC,SAAS;IACTC,IAAI,GAAG,IAAI;IACXC,KAAK,GAAG,SAAS;IACjBC,uBAAuB;IACvBC,yBAAyB;IACzBC,sBAAsB;IACtBC,0BAA0B;IAC1BC,cAAc;IACdC,IAAI;IACJC,cAAc,GAAG,SAAS;IAC1BC,UAAU;IACVC,KAAK;IACLC;EACF,CAAC,GAAAb,IAAA;EACC,MAAMc,WAAW,GAAGjB,iBAAiB,EAAE;EAEvC,MAAMkB,cAA8C,GAAGxB,OAAO,CAAC,MAAM;IACnE,IAAI,CAACoB,UAAU,EAAE;MACf,OAAOK,SAAS;IAClB;IACA,kBAAI1B,KAAK,CAAC2B,cAAc,CAACN,UAAU,CAAC,EAAE;MACpC,OAAOA,UAAU;IACnB,CAAC,MAAM;MACL,MAAMO,mBAAmB,GAAGP,UAAsC;MAClE,oBAAOrB,KAAA,CAAA6B,aAAA,CAACD,mBAAmB,OAAG;IAChC;EACF,CAAC,EAAE,CAACP,UAAU,CAAC,CAAC;EAEhB,MAAMS,a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LQ,MAAM,EAAE,EAAE;IACVE,KAAK,EAAE;EACT,CAAC;EACDZ,cAAc,EAAE;IACdS,UAAU,EAAE,QAAQ;IACpBQ,YAAY,EAAE,CAAC;IACfP,MAAM,EAAE,EAAE;IACVC,cAAc,EAAE,QAAQ;IACxBO,WAAW,EAAE,CAAC;IACdC,QAAQ,EAAE,QAAQ;IAClBP,KAAK,EAAE;EACT,CAAC;EACDR,gBAAgB,EAAE;IAChBgB,WAAW,EAAE,CAAC;IACdC,UAAU,EAAE,CAAC;IACbC,aAAa,EAAE;EACjB,CAAC;EACD5B,UAAU,EAAE;IACV6B,gBAAgB,EAAE,EAAE;IACpBR,OAAO,EAAE;EACX,CAAC;EACDR,QAAQ,EAAE;IACRS,SAAS,EAAE;EACb,CAAC;EACDV,iBAAiB,EAAE;IACjBkB,MAAM,EAAE,CAAC;IACTC,IAAI,EAAE,EAAE;IACRC,QAAQ,EAAE;EACZ,CAAC;EACDzC,IAAI,EAAE;IACJ0C,IAAI,EAAE,CAAC;IACPhB,cAAc,EAAE;EAClB;AACF,CAAC,CAAC;AAEF,eAAepD,gBAAgB"}
@@ -0,0 +1,113 @@
1
+ import React, { useState } from 'react';
2
+ import { StyleSheet, View } from 'react-native';
3
+ import Carousel from 'react-native-reanimated-carousel';
4
+ import Svg, { Circle } from 'react-native-svg';
5
+ import { concatTestID } from '../../utils';
6
+ export let CarouselImageType;
7
+ (function (CarouselImageType) {
8
+ CarouselImageType["Barcode"] = "Barcode";
9
+ CarouselImageType["QrCode"] = "QrCode";
10
+ CarouselImageType["MRZ"] = "MRZ";
11
+ CarouselImageType["Photo"] = "Photo";
12
+ })(CarouselImageType || (CarouselImageType = {}));
13
+ const CarouselComponent = _ref => {
14
+ let {
15
+ carouselSize,
16
+ imagesToRender,
17
+ style,
18
+ testID
19
+ } = _ref;
20
+ const [selectedDot, setSelectedDot] = useState(0);
21
+ if (!carouselSize.width || !carouselSize.height) {
22
+ return null;
23
+ }
24
+ const numberOfSlides = imagesToRender.length;
25
+ if (!numberOfSlides) {
26
+ return null;
27
+ }
28
+ return /*#__PURE__*/React.createElement(View, {
29
+ style: [styles.container, style]
30
+ }, /*#__PURE__*/React.createElement(Carousel, {
31
+ width: carouselSize.width,
32
+ onSnapToItem: setSelectedDot,
33
+ height: carouselSize.height,
34
+ enabled: numberOfSlides >= 2,
35
+ data: imagesToRender,
36
+ testID: testID,
37
+ renderItem: _ref2 => {
38
+ let {
39
+ item: {
40
+ type,
41
+ element
42
+ }
43
+ } = _ref2;
44
+ return /*#__PURE__*/React.createElement(View, {
45
+ style: styles.carouselItem
46
+ }, /*#__PURE__*/React.createElement(View, {
47
+ style: [styles[type]]
48
+ }, element));
49
+ }
50
+ }), numberOfSlides >= 2 ? /*#__PURE__*/React.createElement(View, {
51
+ style: styles.pageDotContainer
52
+ }, imagesToRender.map((_, index) => /*#__PURE__*/React.createElement(Svg, {
53
+ key: index,
54
+ width: "8",
55
+ height: "8",
56
+ viewBox: "0 0 8 8",
57
+ fill: "none"
58
+ }, /*#__PURE__*/React.createElement(Circle, {
59
+ testID: concatTestID(testID, 'dot', index.toString()),
60
+ cx: "4.5",
61
+ cy: "4",
62
+ r: "4",
63
+ fill: "white",
64
+ fillOpacity: selectedDot === index ? 0.8 : 0.2
65
+ })))) : null);
66
+ };
67
+ const styles = StyleSheet.create({
68
+ // eslint-disable-next-line react-native/no-unused-styles
69
+ Barcode: {
70
+ borderRadius: 4,
71
+ height: '50%',
72
+ width: '80%'
73
+ },
74
+ // eslint-disable-next-line react-native/no-unused-styles
75
+ MRZ: {
76
+ height: '50%',
77
+ width: '100%'
78
+ },
79
+ // eslint-disable-next-line react-native/no-unused-styles
80
+ Photo: {
81
+ aspectRatio: 1,
82
+ borderColor: '#FFFFFF',
83
+ borderRadius: 100,
84
+ borderWidth: 2,
85
+ height: '70%',
86
+ overflow: 'hidden'
87
+ },
88
+ // eslint-disable-next-line react-native/no-unused-styles
89
+ QrCode: {
90
+ aspectRatio: 1,
91
+ borderRadius: 4,
92
+ height: '70%'
93
+ },
94
+ carouselItem: {
95
+ alignItems: 'center',
96
+ height: '100%',
97
+ justifyContent: 'center',
98
+ width: '100%'
99
+ },
100
+ container: {
101
+ flex: 1,
102
+ position: 'absolute',
103
+ width: '100%'
104
+ },
105
+ pageDotContainer: {
106
+ bottom: 15,
107
+ columnGap: 8,
108
+ flexDirection: 'row',
109
+ justifyContent: 'center'
110
+ }
111
+ });
112
+ export default CarouselComponent;
113
+ //# sourceMappingURL=credential-image-carousel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useState","StyleSheet","View","Carousel","Svg","Circle","concatTestID","CarouselImageType","CarouselComponent","_ref","carouselSize","imagesToRender","style","testID","selectedDot","setSelectedDot","width","height","numberOfSlides","length","createElement","styles","container","onSnapToItem","enabled","data","renderItem","_ref2","item","type","element","carouselItem","pageDotContainer","map","_","index","key","viewBox","fill","toString","cx","cy","r","fillOpacity","create","Barcode","borderRadius","MRZ","Photo","aspectRatio","borderColor","borderWidth","overflow","QrCode","alignItems","justifyContent","flex","position","bottom","columnGap","flexDirection"],"sources":["credential-image-carousel.tsx"],"sourcesContent":["import React, { FC, useState } from 'react';\nimport { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\nimport Carousel from 'react-native-reanimated-carousel';\nimport Svg, { Circle } from 'react-native-svg';\n\nimport { concatTestID } from '../../utils';\n\nexport enum CarouselImageType {\n Barcode = 'Barcode',\n QrCode = 'QrCode',\n MRZ = 'MRZ',\n Photo = 'Photo',\n}\n\nexport type CarouselImage = {\n type: CarouselImageType;\n element: React.ReactElement;\n};\n\ntype CarouselProps = {\n carouselSize: { width: number; height: number };\n imagesToRender: CarouselImage[];\n style?: StyleProp<ViewStyle>;\n testID?: string;\n};\n\nconst CarouselComponent: FC<CarouselProps> = ({ carouselSize, imagesToRender, style, testID }) => {\n const [selectedDot, setSelectedDot] = useState(0);\n\n if (!carouselSize.width || !carouselSize.height) {\n return null;\n }\n\n const numberOfSlides = imagesToRender.length;\n\n if (!numberOfSlides) {\n return null;\n }\n\n return (\n <View style={[styles.container, style]}>\n <Carousel\n width={carouselSize.width}\n onSnapToItem={setSelectedDot}\n height={carouselSize.height}\n enabled={numberOfSlides >= 2}\n data={imagesToRender}\n testID={testID}\n renderItem={({ item: { type, element } }) => (\n <View style={styles.carouselItem}>\n <View style={[styles[type]]}>{element}</View>\n </View>\n )}\n />\n {numberOfSlides >= 2 ? (\n <View style={styles.pageDotContainer}>\n {imagesToRender.map((_, index) => (\n <Svg key={index} width=\"8\" height=\"8\" viewBox=\"0 0 8 8\" fill=\"none\">\n <Circle\n testID={concatTestID(testID, 'dot', index.toString())}\n cx=\"4.5\"\n cy=\"4\"\n r=\"4\"\n fill=\"white\"\n fillOpacity={selectedDot === index ? 0.8 : 0.2}\n />\n </Svg>\n ))}\n </View>\n ) : null}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n // eslint-disable-next-line react-native/no-unused-styles\n Barcode: { borderRadius: 4, height: '50%', width: '80%' },\n // eslint-disable-next-line react-native/no-unused-styles\n MRZ: {\n height: '50%',\n width: '100%',\n },\n // eslint-disable-next-line react-native/no-unused-styles\n Photo: {\n aspectRatio: 1,\n borderColor: '#FFFFFF',\n borderRadius: 100,\n borderWidth: 2,\n height: '70%',\n overflow: 'hidden',\n },\n // eslint-disable-next-line react-native/no-unused-styles\n QrCode: { aspectRatio: 1, borderRadius: 4, height: '70%' },\n carouselItem: {\n alignItems: 'center',\n height: '100%',\n justifyContent: 'center',\n width: '100%',\n },\n container: {\n flex: 1,\n position: 'absolute',\n width: '100%',\n },\n pageDotContainer: {\n bottom: 15,\n columnGap: 8,\n flexDirection: 'row',\n justifyContent: 'center',\n },\n});\n\nexport default CarouselComponent;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAQC,QAAQ,QAAQ,OAAO;AAC3C,SAAoBC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AACrE,OAAOC,QAAQ,MAAM,kCAAkC;AACvD,OAAOC,GAAG,IAA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,EAAE,CAAC;IAAE7B,MAAM,EAAE;EAAM,CAAC;EAC1Dc,YAAY,EAAE;IACZuB,UAAU,EAAE,QAAQ;IACpBrC,MAAM,EAAE,MAAM;IACdsC,cAAc,EAAE,QAAQ;IACxBvC,KAAK,EAAE;EACT,CAAC;EACDM,SAAS,EAAE;IACTkC,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE,UAAU;IACpBzC,KAAK,EAAE;EACT,CAAC;EACDgB,gBAAgB,EAAE;IAChB0B,MAAM,EAAE,EAAE;IACVC,SAAS,EAAE,CAAC;IACZC,aAAa,EAAE,KAAK;IACpBL,cAAc,EAAE;EAClB;AACF,CAAC,CAAC;AAEF,eAAe/C,iBAAiB"}
@@ -0,0 +1,11 @@
1
+ import CredentialCard, { CredentialCardProps, CredentialCardRatio, CredentialCardShadow } from './credential-card';
2
+ import CredentialDetailsCard, { CredentialDetailsCardProps } from './credential-details-card';
3
+ import CredentialDetailsCardListItem, { CredentialDetailsCardListItemProps } from './credential-details-list-item';
4
+ import CredentialHeader, { CredentialHeaderProps } from './credential-header';
5
+ import { CarouselImage, CarouselImageType } from './credential-image-carousel';
6
+ export { CarouselImage, CarouselImageType };
7
+ export { CredentialCard, CredentialCardProps, CredentialCardRatio, CredentialCardShadow };
8
+ export { CredentialDetailsCard, CredentialDetailsCardProps };
9
+ export { CredentialDetailsCardListItem, CredentialDetailsCardListItemProps };
10
+ export { CredentialHeader, CredentialHeaderProps };
11
+ //# sourceMappingURL=index.js.map