@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 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","obj","__esModule","default","defaultColorScheme","accent","accentText","background","backgroundScroll","black","codeAccent","credentialHeaderBackground","error","grayDark","linkText","success","successText","text","warning","white","darkMode","nerdView","attributeLabel","attributeValueBackground","attributeValueBorder","attributeSectionBackground","button","codeHighlightText","ColorSchemeContext","React","createContext","displayName","ColorSchemeProvider","props","createElement","Provider","value","colorScheme","children","useAppColorScheme","useContext"],"sources":["color-scheme-context.tsx"],"sourcesContent":["import React, { PropsWithChildren } from 'react';\n\nimport type { ColorScheme } from './color-scheme';\n\nconst defaultColorScheme: ColorScheme = {\n accent: '#0F151A',\n accentText: '#EBF2F4',\n background: '#F1F3F5',\n backgroundScroll: 'rgba(241, 243, 245, 0.7)',\n black: '#000000',\n codeAccent: '#CFD2E7',\n credentialHeaderBackground: 'rgba(255, 255, 255, 0.87)',\n error: '#D90D0D',\n grayDark: '#CDD4DA',\n linkText: '#3F7BA6',\n success: '#00D066',\n successText: '#006B34',\n text: '#0D0E10',\n warning: '#F7BF0B',\n white: '#FFFFFF',\n darkMode: false,\n nerdView: {\n background: 'rgba(2, 4, 21, 0.95)',\n attributeLabel: '#929497',\n attributeValueBackground: 'rgba(255, 255, 255, 0.02)',\n attributeValueBorder: 'rgba(255, 255, 255, 0.2)',\n attributeSectionBackground: 'rgba(2, 4, 21, 0.8)',\n button: 'rgba(255, 255, 255, 0.05)',\n codeHighlightText: 'rgba(232, 135, 114, 1)',\n },\n};\n\nconst ColorSchemeContext = React.createContext<ColorScheme>(defaultColorScheme);\nColorSchemeContext.displayName = 'ColorSchemeContext';\n\nexport function ColorSchemeProvider<Scheme extends ColorScheme = ColorScheme>(\n props: PropsWithChildren<{ colorScheme: Scheme }>,\n) {\n return <ColorSchemeContext.Provider value={props.colorScheme}>{props.children}</ColorSchemeContext.Provider>;\n}\n\n/**\n * A hook to gain access to the current `ColorScheme`\n * @note A custom superset of `ColorScheme` can be used (must also be passed to the `ColorSchemeProvider`)\n */\nexport function useAppColorScheme<Scheme extends ColorScheme = ColorScheme>(): Readonly<Scheme> {\n return React.useContext(ColorSchemeContext) as Scheme;\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAiD,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAIjD,MAAMG,kBAA+B,GAAG;EACtCC,MAAM,EAAE,SAAS;EACjBC,UAAU,EAAE,SAAS;EACrBC,UAAU,EAAE,SAAS;EACrBC,gBAAgB,EAAE,0BAA0B;EAC5CC,KAAK,EAAE,SAAS;EAChBC,UAAU,EAAE,SAAS;EACrBC,0BAA0B,EAAE,2BAA2B;EACvDC,KAAK,EAAE,SAAS;EAChBC,QAAQ,EAAE,SAAS;EACnBC,QAAQ,EAAE,SAAS;EACnBC,OAAO,EAAE,SAAS;EAClBC,WAAW,EAAE,SAAS;EACtBC,IAAI,EAAE,SAAS;EACfC,OAAO,EAAE,SAAS;EAClBC,KAAK,EAAE,SAAS;EAChBC,QAAQ,EAAE,KAAK;EACfC,QAAQ,EAAE;IACRd,UAAU,EAAE,sBAAsB;IAClCe,cAAc,EAAE,SAAS;IACzBC,wBAAwB,EAAE,2BAA2B;IACrDC,oBAAoB,EAAE,0BAA0B;IAChDC,0BAA0B,EAAE,qBAAqB;IACjDC,MAAM,EAAE,2BAA2B;IACnCC,iBAAiB,EAAE;EACrB;AACF,CAAC;AAED,MAAMC,kBAAkB,gBAAGC,cAAK,CAACC,aAAa,CAAc1B,kBAAkB,CAAC;AAC/EwB,kBAAkB,CAACG,WAAW,GAAG,oBAAoB;AAE9C,SAASC,mBAAmBA,CACjCC,KAAiD,EACjD;EACA,oBAAOnC,MAAA,CAAAK,OAAA,CAAA+B,aAAA,CAACN,kBAAkB,CAACO,QAAQ;IAACC,KAAK,EAAEH,KAAK,CAACI;EAAY,GAAEJ,KAAK,CAACK,QAAQ,CAA+B;AAC9G;;AAEA;AACA;AACA;AACA;AACO,SAASC,iBAAiBA,CAAA,EAA+D;EAC9F,OAAOV,cAAK,CAACW,UAAU,CAACZ,kBAAkB,CAAC;AAC7C"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=color-scheme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["color-scheme.ts"],"sourcesContent":["/**\n * Color flavour of the application\n * colors according to figma design: https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=0-1\n */\nexport interface ColorScheme {\n accent: string;\n accentText: string;\n background: string;\n backgroundScroll: string;\n black: string;\n codeAccent: string;\n credentialHeaderBackground: string;\n error: string;\n grayDark: string;\n linkText: string;\n success: string;\n successText: string;\n text: string;\n warning: string;\n white: string;\n darkMode: boolean;\n nerdView: {\n background: string;\n attributeLabel: string;\n attributeSectionBackground: string;\n attributeValueBackground: string;\n attributeValueBorder: string;\n button: string;\n codeHighlightText: string;\n };\n}\n"],"mappings":""}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "ColorSchemeProvider", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _colorSchemeContext.ColorSchemeProvider;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "useAppColorScheme", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _colorSchemeContext.useAppColorScheme;
16
+ }
17
+ });
18
+ var _colorSchemeContext = require("./color-scheme-context");
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_colorSchemeContext","require"],"sources":["index.ts"],"sourcesContent":["export type { ColorScheme } from './color-scheme';\nimport { ColorSchemeProvider, useAppColorScheme } from './color-scheme-context';\n\nexport { ColorSchemeProvider, useAppColorScheme };\n"],"mappings":";;;;;;;;;;;;;;;;;AACA,IAAAA,mBAAA,GAAAC,OAAA"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getBrightness = exports.colorWithAlphaComponent = exports.colorArray = void 0;
7
+ var _normalizeColor = _interopRequireDefault(require("@react-native/normalize-color"));
8
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
+ /* eslint-disable no-bitwise */
10
+
11
+ const colorArray = color => {
12
+ const normalized = (0, _normalizeColor.default)(color);
13
+ const r = normalized >> 24 & 0xff;
14
+ const g = normalized >> 16 & 0xff;
15
+ const b = normalized >> 8 & 0xff;
16
+ const a = normalized & 0xff;
17
+ return [r / 255, g / 255, b / 255, a / 255];
18
+ };
19
+ exports.colorArray = colorArray;
20
+ const colorWithAlphaComponent = (color, alpha) => {
21
+ alpha = Math.min(1, Math.max(0, alpha));
22
+ const colorValues = colorArray(color);
23
+ colorValues[3] = alpha;
24
+ const colorHexString = colorValues.map(value => Math.round(255 * value).toString(16).padStart(2, '0')).join('');
25
+ return `#${colorHexString}`;
26
+ };
27
+ exports.colorWithAlphaComponent = colorWithAlphaComponent;
28
+ const getBrightness = color => {
29
+ const rgb = colorArray(color);
30
+ // https://en.wikipedia.org/wiki/Relative_luminance
31
+ return 0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2];
32
+ };
33
+ exports.getBrightness = getBrightness;
34
+ //# sourceMappingURL=color.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_normalizeColor","_interopRequireDefault","require","obj","__esModule","default","colorArray","color","normalized","normalizeColor","r","g","b","a","exports","colorWithAlphaComponent","alpha","Math","min","max","colorValues","colorHexString","map","value","round","toString","padStart","join","getBrightness","rgb"],"sources":["color.ts"],"sourcesContent":["/* eslint-disable no-bitwise */\nimport normalizeColor from '@react-native/normalize-color';\nimport type { ColorValue } from 'react-native';\n\nexport const colorArray = (color: ColorValue) => {\n const normalized = normalizeColor(color);\n\n const r = (normalized >> 24) & 0xff;\n const g = (normalized >> 16) & 0xff;\n const b = (normalized >> 8) & 0xff;\n const a = normalized & 0xff;\n\n return [r / 255, g / 255, b / 255, a / 255];\n};\n\nexport const colorWithAlphaComponent = (color: ColorValue, alpha: number): ColorValue => {\n alpha = Math.min(1, Math.max(0, alpha));\n const colorValues = colorArray(color);\n colorValues[3] = alpha;\n const colorHexString = colorValues\n .map((value) =>\n Math.round(255 * value)\n .toString(16)\n .padStart(2, '0'),\n )\n .join('');\n return `#${colorHexString}`;\n};\n\nexport const getBrightness = (color: ColorValue) => {\n const rgb = colorArray(color);\n // https://en.wikipedia.org/wiki/Relative_luminance\n return 0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2];\n};\n"],"mappings":";;;;;;AACA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA2D,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAD3D;;AAIO,MAAMG,UAAU,GAAIC,KAAiB,IAAK;EAC/C,MAAMC,UAAU,GAAG,IAAAC,uBAAc,EAACF,KAAK,CAAC;EAExC,MAAMG,CAAC,GAAIF,UAAU,IAAI,EAAE,GAAI,IAAI;EACnC,MAAMG,CAAC,GAAIH,UAAU,IAAI,EAAE,GAAI,IAAI;EACnC,MAAMI,CAAC,GAAIJ,UAAU,IAAI,CAAC,GAAI,IAAI;EAClC,MAAMK,CAAC,GAAGL,UAAU,GAAG,IAAI;EAE3B,OAAO,CAACE,CAAC,GAAG,GAAG,EAAEC,CAAC,GAAG,GAAG,EAAEC,CAAC,GAAG,GAAG,EAAEC,CAAC,GAAG,GAAG,CAAC;AAC7C,CAAC;AAACC,OAAA,CAAAR,UAAA,GAAAA,UAAA;AAEK,MAAMS,uBAAuB,GAAGA,CAACR,KAAiB,EAAES,KAAa,KAAiB;EACvFA,KAAK,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAED,IAAI,CAACE,GAAG,CAAC,CAAC,EAAEH,KAAK,CAAC,CAAC;EACvC,MAAMI,WAAW,GAAGd,UAAU,CAACC,KAAK,CAAC;EACrCa,WAAW,CAAC,CAAC,CAAC,GAAGJ,KAAK;EACtB,MAAMK,cAAc,GAAGD,WAAW,CAC/BE,GAAG,CAAEC,KAAK,IACTN,IAAI,CAACO,KAAK,CAAC,GAAG,GAAGD,KAAK,CAAC,CACpBE,QAAQ,CAAC,EAAE,CAAC,CACZC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CACpB,CACAC,IAAI,CAAC,EAAE,CAAC;EACX,OAAQ,IAAGN,cAAe,EAAC;AAC7B,CAAC;AAACP,OAAA,CAAAC,uBAAA,GAAAA,uBAAA;AAEK,MAAMa,aAAa,GAAIrB,KAAiB,IAAK;EAClD,MAAMsB,GAAG,GAAGvB,UAAU,CAACC,KAAK,CAAC;EAC7B;EACA,OAAO,MAAM,GAAGsB,GAAG,CAAC,CAAC,CAAC,GAAG,MAAM,GAAGA,GAAG,CAAC,CAAC,CAAC,GAAG,MAAM,GAAGA,GAAG,CAAC,CAAC,CAAC;AAC5D,CAAC;AAACf,OAAA,CAAAc,aAAA,GAAAA,aAAA"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _color = require("./color");
10
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
12
+ 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); }
13
+ /**
14
+ * Defines transparent status bar with content contrasting to the background
15
+ */
16
+ const ContrastingStatusBar = _ref => {
17
+ let {
18
+ backgroundColor,
19
+ ...props
20
+ } = _ref;
21
+ const barStyle = (0, _react.useMemo)(() => (0, _color.getBrightness)(backgroundColor) > 0.5 ? 'dark-content' : 'light-content', [backgroundColor]);
22
+ return /*#__PURE__*/_react.default.createElement(_reactNative.StatusBar, _extends({
23
+ translucent: true,
24
+ barStyle: barStyle,
25
+ backgroundColor: 'transparent'
26
+ }, props));
27
+ };
28
+ var _default = ContrastingStatusBar;
29
+ exports.default = _default;
30
+ //# sourceMappingURL=contrasting-status-bar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_color","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","ContrastingStatusBar","_ref","backgroundColor","props","barStyle","useMemo","getBrightness","createElement","StatusBar","translucent","_default","exports"],"sources":["contrasting-status-bar.tsx"],"sourcesContent":["import React, { FC, useMemo } from 'react';\nimport { ColorValue, StatusBar, StatusBarProps, StatusBarStyle } from 'react-native';\n\nimport { getBrightness } from './color';\n\ninterface ContrastingStatusBarProps extends Omit<StatusBarProps, 'barStyle'> {\n backgroundColor: ColorValue;\n}\n\n/**\n * Defines transparent status bar with content contrasting to the background\n */\nconst ContrastingStatusBar: FC<ContrastingStatusBarProps> = ({ backgroundColor, ...props }) => {\n const barStyle = useMemo<StatusBarStyle>(\n () => (getBrightness(backgroundColor) > 0.5 ? 'dark-content' : 'light-content'),\n [backgroundColor],\n );\n return <StatusBar translucent={true} barStyle={barStyle} backgroundColor={'transparent'} {...props} />;\n};\n\nexport default ContrastingStatusBar;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAAwC,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAL,wBAAAS,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAX,GAAA,CAAAW,GAAA,SAAAL,MAAA,CAAAJ,OAAA,GAAAF,GAAA,MAAAG,KAAA,IAAAA,KAAA,CAAAa,GAAA,CAAAhB,GAAA,EAAAM,MAAA,YAAAA,MAAA;AAAA,SAAAW,SAAA,IAAAA,QAAA,GAAAT,MAAA,CAAAU,MAAA,GAAAV,MAAA,CAAAU,MAAA,CAAAC,IAAA,eAAAC,MAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAF,CAAA,UAAAG,MAAA,GAAAF,SAAA,CAAAD,CAAA,YAAAV,GAAA,IAAAa,MAAA,QAAAhB,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAU,MAAA,EAAAb,GAAA,KAAAS,MAAA,CAAAT,GAAA,IAAAa,MAAA,CAAAb,GAAA,gBAAAS,MAAA,YAAAH,QAAA,CAAAQ,KAAA,OAAAH,SAAA;AAMxC;AACA;AACA;AACA,MAAMI,oBAAmD,GAAGC,IAAA,IAAmC;EAAA,IAAlC;IAAEC,eAAe;IAAE,GAAGC;EAAM,CAAC,GAAAF,IAAA;EACxF,MAAMG,QAAQ,GAAG,IAAAC,cAAO,EACtB,MAAO,IAAAC,oBAAa,EAACJ,eAAe,CAAC,GAAG,GAAG,GAAG,cAAc,GAAG,eAAgB,EAC/E,CAACA,eAAe,CAAC,CAClB;EACD,oBAAOtC,MAAA,CAAAY,OAAA,CAAA+B,aAAA,CAACxC,YAAA,CAAAyC,SAAS,EAAAjB,QAAA;IAACkB,WAAW,EAAE,IAAK;IAACL,QAAQ,EAAEA,QAAS;IAACF,eAAe,EAAE;EAAc,GAAKC,KAAK,EAAI;AACxG,CAAC;AAAC,IAAAO,QAAA,GAEaV,oBAAoB;AAAAW,OAAA,CAAAnC,OAAA,GAAAkC,QAAA"}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.formatTime = exports.formatDateTime = exports.formatDate = void 0;
7
+ var _reactNative = require("react-native");
8
+ var _NativeModules$I18nMa, _NativeModules$I18nMa2;
9
+ // OS locale
10
+ const systemLocale = (_NativeModules$I18nMa = _reactNative.NativeModules.I18nManager) === null || _NativeModules$I18nMa === void 0 ? void 0 : (_NativeModules$I18nMa2 = _NativeModules$I18nMa.localeIdentifier) === null || _NativeModules$I18nMa2 === void 0 ? void 0 : _NativeModules$I18nMa2.replace(/_/g, '-').split('#')[0].replace(/-$/, '');
11
+
12
+ /**
13
+ * Date only format
14
+ */
15
+ const formatDate = (date, locale, options) => {
16
+ try {
17
+ return date.toLocaleDateString(locale || systemLocale, options);
18
+ } catch {
19
+ return undefined;
20
+ }
21
+ };
22
+
23
+ /**
24
+ * Time only format
25
+ */
26
+ exports.formatDate = formatDate;
27
+ const formatTime = (date, locale) => {
28
+ try {
29
+ return date.toLocaleTimeString(locale || systemLocale, {
30
+ hour: '2-digit',
31
+ minute: '2-digit'
32
+ });
33
+ } catch {
34
+ return undefined;
35
+ }
36
+ };
37
+
38
+ /**
39
+ * Date and time format
40
+ */
41
+ exports.formatTime = formatTime;
42
+ const formatDateTime = (date, locale) => {
43
+ try {
44
+ return date.toLocaleString(locale || systemLocale, {
45
+ hour: '2-digit',
46
+ minute: '2-digit',
47
+ year: 'numeric',
48
+ month: 'numeric',
49
+ day: 'numeric',
50
+ hour12: locale === 'en-US'
51
+ });
52
+ } catch {
53
+ return undefined;
54
+ }
55
+ };
56
+ exports.formatDateTime = formatDateTime;
57
+ //# sourceMappingURL=date.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","_NativeModules$I18nMa","_NativeModules$I18nMa2","systemLocale","NativeModules","I18nManager","localeIdentifier","replace","split","formatDate","date","locale","options","toLocaleDateString","undefined","exports","formatTime","toLocaleTimeString","hour","minute","formatDateTime","toLocaleString","year","month","day","hour12"],"sources":["date.ts"],"sourcesContent":["// Date & Time formatted as specified in SW-610\n\nimport { NativeModules } from 'react-native';\n\n// OS locale\nconst systemLocale: string = NativeModules.I18nManager?.localeIdentifier\n ?.replace(/_/g, '-')\n .split('#')[0]\n .replace(/-$/, '');\n\n/**\n * Date only format\n */\nexport const formatDate = (date: Date, locale?: string, options?: Intl.DateTimeFormatOptions) => {\n try {\n return date.toLocaleDateString(locale || systemLocale, options);\n } catch {\n return undefined;\n }\n};\n\n/**\n * Time only format\n */\nexport const formatTime = (date: Date, locale?: string) => {\n try {\n return date.toLocaleTimeString(locale || systemLocale, { hour: '2-digit', minute: '2-digit' });\n } catch {\n return undefined;\n }\n};\n\n/**\n * Date and time format\n */\nexport const formatDateTime = (date: Date, locale?: string) => {\n try {\n return date.toLocaleString(locale || systemLocale, {\n hour: '2-digit',\n minute: '2-digit',\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n hour12: locale === 'en-US',\n });\n } catch {\n return undefined;\n }\n};\n"],"mappings":";;;;;;AAEA,IAAAA,YAAA,GAAAC,OAAA;AAA6C,IAAAC,qBAAA,EAAAC,sBAAA;AAE7C;AACA,MAAMC,YAAoB,IAAAF,qBAAA,GAAGG,0BAAa,CAACC,WAAW,cAAAJ,qBAAA,wBAAAC,sBAAA,GAAzBD,qBAAA,CAA2BK,gBAAgB,cAAAJ,sBAAA,uBAA3CA,sBAAA,CACzBK,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CACnBC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CACbD,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;;AAEpB;AACA;AACA;AACO,MAAME,UAAU,GAAGA,CAACC,IAAU,EAAEC,MAAe,EAAEC,OAAoC,KAAK;EAC/F,IAAI;IACF,OAAOF,IAAI,CAACG,kBAAkB,CAACF,MAAM,IAAIR,YAAY,EAAES,OAAO,CAAC;EACjE,CAAC,CAAC,MAAM;IACN,OAAOE,SAAS;EAClB;AACF,CAAC;;AAED;AACA;AACA;AAFAC,OAAA,CAAAN,UAAA,GAAAA,UAAA;AAGO,MAAMO,UAAU,GAAGA,CAACN,IAAU,EAAEC,MAAe,KAAK;EACzD,IAAI;IACF,OAAOD,IAAI,CAACO,kBAAkB,CAACN,MAAM,IAAIR,YAAY,EAAE;MAAEe,IAAI,EAAE,SAAS;MAAEC,MAAM,EAAE;IAAU,CAAC,CAAC;EAChG,CAAC,CAAC,MAAM;IACN,OAAOL,SAAS;EAClB;AACF,CAAC;;AAED;AACA;AACA;AAFAC,OAAA,CAAAC,UAAA,GAAAA,UAAA;AAGO,MAAMI,cAAc,GAAGA,CAACV,IAAU,EAAEC,MAAe,KAAK;EAC7D,IAAI;IACF,OAAOD,IAAI,CAACW,cAAc,CAACV,MAAM,IAAIR,YAAY,EAAE;MACjDe,IAAI,EAAE,SAAS;MACfC,MAAM,EAAE,SAAS;MACjBG,IAAI,EAAE,SAAS;MACfC,KAAK,EAAE,SAAS;MAChBC,GAAG,EAAE,SAAS;MACdC,MAAM,EAAEd,MAAM,KAAK;IACrB,CAAC,CAAC;EACJ,CAAC,CAAC,MAAM;IACN,OAAOG,SAAS;EAClB;AACF,CAAC;AAACC,OAAA,CAAAK,cAAA,GAAAA,cAAA"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useOnScrollHeaderState = void 0;
7
+ var _react = require("react");
8
+ const useOnScrollHeaderState = function () {
9
+ let offset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 30;
10
+ const [titleVisible, setTitleVisible] = (0, _react.useState)(false);
11
+ const onScroll = (0, _react.useCallback)(event => {
12
+ const scrollOffset = event.nativeEvent.contentOffset.y;
13
+ setTitleVisible(scrollOffset > offset);
14
+ }, [offset]);
15
+ return {
16
+ onScroll,
17
+ titleVisible
18
+ };
19
+ };
20
+ exports.useOnScrollHeaderState = useOnScrollHeaderState;
21
+ //# sourceMappingURL=on-scroll-header-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","useOnScrollHeaderState","offset","arguments","length","undefined","titleVisible","setTitleVisible","useState","onScroll","useCallback","event","scrollOffset","nativeEvent","contentOffset","y","exports"],"sources":["on-scroll-header-state.tsx"],"sourcesContent":["import { useCallback, useState } from 'react';\nimport { NativeScrollEvent, NativeSyntheticEvent } from 'react-native';\n\nexport const useOnScrollHeaderState = (offset = 30) => {\n const [titleVisible, setTitleVisible] = useState(false);\n\n const onScroll = useCallback(\n (event: NativeSyntheticEvent<NativeScrollEvent>) => {\n const scrollOffset = event.nativeEvent.contentOffset.y;\n setTitleVisible(scrollOffset > offset);\n },\n [offset],\n );\n\n return { onScroll, titleVisible };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGO,MAAMC,sBAAsB,GAAG,SAAAA,CAAA,EAAiB;EAAA,IAAhBC,MAAM,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAChD,MAAM,CAACG,YAAY,EAAEC,eAAe,CAAC,GAAG,IAAAC,eAAQ,EAAC,KAAK,CAAC;EAEvD,MAAMC,QAAQ,GAAG,IAAAC,kBAAW,EACzBC,KAA8C,IAAK;IAClD,MAAMC,YAAY,GAAGD,KAAK,CAACE,WAAW,CAACC,aAAa,CAACC,CAAC;IACtDR,eAAe,CAACK,YAAY,GAAGV,MAAM,CAAC;EACxC,CAAC,EACD,CAACA,MAAM,CAAC,CACT;EAED,OAAO;IAAEO,QAAQ;IAAEH;EAAa,CAAC;AACnC,CAAC;AAACU,OAAA,CAAAf,sBAAA,GAAAA,sBAAA"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "useListContentInset", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _listContentInset.useListContentInset;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "useOnScrollHeaderState", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _onScrollHeaderState.useOnScrollHeaderState;
16
+ }
17
+ });
18
+ var _onScrollHeaderState = require("./header/on-scroll-header-state");
19
+ var _listContentInset = require("./list/list-content-inset");
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_onScrollHeaderState","require","_listContentInset"],"sources":["index.ts"],"sourcesContent":["import { useOnScrollHeaderState } from './header/on-scroll-header-state';\nimport { useListContentInset } from './list/list-content-inset';\n\nexport { useOnScrollHeaderState };\nexport { useListContentInset };\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,oBAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useListContentInset = void 0;
7
+ var _reactNative = require("react-native");
8
+ var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
9
+ const useListContentInset = function () {
10
+ let {
11
+ additionalBottomPadding = 54,
12
+ headerHeight = 48,
13
+ modalPresentation = false
14
+ } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
15
+ additionalBottomPadding: 54,
16
+ headerHeight: 48,
17
+ modalPresentation: false
18
+ };
19
+ const {
20
+ top,
21
+ bottom
22
+ } = (0, _reactNativeSafeAreaContext.useSafeAreaInsets)();
23
+ const topSafeAreaInset = !modalPresentation || _reactNative.Platform.OS === 'android' ? top : 0;
24
+ const contentInsetsStyle = {
25
+ paddingBottom: bottom + additionalBottomPadding,
26
+ paddingTop: topSafeAreaInset + headerHeight
27
+ };
28
+ return contentInsetsStyle;
29
+ };
30
+ exports.useListContentInset = useListContentInset;
31
+ //# sourceMappingURL=list-content-inset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","_reactNativeSafeAreaContext","useListContentInset","additionalBottomPadding","headerHeight","modalPresentation","arguments","length","undefined","top","bottom","useSafeAreaInsets","topSafeAreaInset","Platform","OS","contentInsetsStyle","paddingBottom","paddingTop","exports"],"sources":["list-content-inset.ts"],"sourcesContent":["import { Platform, ViewStyle } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\ntype ListContentInsetProps = {\n additionalBottomPadding?: number;\n headerHeight?: number;\n modalPresentation?: boolean;\n};\n\nexport const useListContentInset = (\n { additionalBottomPadding = 54, headerHeight = 48, modalPresentation = false }: ListContentInsetProps = {\n additionalBottomPadding: 54,\n headerHeight: 48,\n modalPresentation: false,\n },\n) => {\n const { top, bottom } = useSafeAreaInsets();\n const topSafeAreaInset = !modalPresentation || Platform.OS === 'android' ? top : 0;\n const contentInsetsStyle: ViewStyle = {\n paddingBottom: bottom + additionalBottomPadding,\n paddingTop: topSafeAreaInset + headerHeight,\n };\n return contentInsetsStyle;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,2BAAA,GAAAD,OAAA;AAQO,MAAME,mBAAmB,GAAG,SAAAA,CAAA,EAM9B;EAAA,IALH;IAAEC,uBAAuB,GAAG,EAAE;IAAEC,YAAY,GAAG,EAAE;IAAEC,iBAAiB,GAAG;EAA6B,CAAC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG;IACtGH,uBAAuB,EAAE,EAAE;IAC3BC,YAAY,EAAE,EAAE;IAChBC,iBAAiB,EAAE;EACrB,CAAC;EAED,MAAM;IAAEI,GAAG;IAAEC;EAAO,CAAC,GAAG,IAAAC,6CAAiB,GAAE;EAC3C,MAAMC,gBAAgB,GAAG,CAACP,iBAAiB,IAAIQ,qBAAQ,CAACC,EAAE,KAAK,SAAS,GAAGL,GAAG,GAAG,CAAC;EAClF,MAAMM,kBAA6B,GAAG;IACpCC,aAAa,EAAEN,MAAM,GAAGP,uBAAuB;IAC/Cc,UAAU,EAAEL,gBAAgB,GAAGR;EACjC,CAAC;EACD,OAAOW,kBAAkB;AAC3B,CAAC;AAACG,OAAA,CAAAhB,mBAAA,GAAAA,mBAAA"}
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _exportNames = {
7
+ ContrastingStatusBar: true,
8
+ formatDate: true,
9
+ formatDateTime: true,
10
+ formatTime: true,
11
+ useBlockOSBackNavigation: true,
12
+ useForwardedRef: true,
13
+ concatTestID: true,
14
+ useMemoAsync: true
15
+ };
16
+ Object.defineProperty(exports, "ContrastingStatusBar", {
17
+ enumerable: true,
18
+ get: function () {
19
+ return _contrastingStatusBar.default;
20
+ }
21
+ });
22
+ Object.defineProperty(exports, "concatTestID", {
23
+ enumerable: true,
24
+ get: function () {
25
+ return _testID.concatTestID;
26
+ }
27
+ });
28
+ Object.defineProperty(exports, "formatDate", {
29
+ enumerable: true,
30
+ get: function () {
31
+ return _date.formatDate;
32
+ }
33
+ });
34
+ Object.defineProperty(exports, "formatDateTime", {
35
+ enumerable: true,
36
+ get: function () {
37
+ return _date.formatDateTime;
38
+ }
39
+ });
40
+ Object.defineProperty(exports, "formatTime", {
41
+ enumerable: true,
42
+ get: function () {
43
+ return _date.formatTime;
44
+ }
45
+ });
46
+ Object.defineProperty(exports, "useBlockOSBackNavigation", {
47
+ enumerable: true,
48
+ get: function () {
49
+ return _navigation.useBlockOSBackNavigation;
50
+ }
51
+ });
52
+ Object.defineProperty(exports, "useForwardedRef", {
53
+ enumerable: true,
54
+ get: function () {
55
+ return _ref.useForwardedRef;
56
+ }
57
+ });
58
+ Object.defineProperty(exports, "useMemoAsync", {
59
+ enumerable: true,
60
+ get: function () {
61
+ return _useMemoAsync.useMemoAsync;
62
+ }
63
+ });
64
+ var _contrastingStatusBar = _interopRequireDefault(require("./contrasting-status-bar"));
65
+ var _date = require("./date");
66
+ var _navigation = require("./navigation");
67
+ var _ref = require("./ref");
68
+ var _testID = require("./testID");
69
+ var _useMemoAsync = require("./useMemoAsync");
70
+ var _hooks = require("./hooks");
71
+ Object.keys(_hooks).forEach(function (key) {
72
+ if (key === "default" || key === "__esModule") return;
73
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
74
+ if (key in exports && exports[key] === _hooks[key]) return;
75
+ Object.defineProperty(exports, key, {
76
+ enumerable: true,
77
+ get: function () {
78
+ return _hooks[key];
79
+ }
80
+ });
81
+ });
82
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
83
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_contrastingStatusBar","_interopRequireDefault","require","_date","_navigation","_ref","_testID","_useMemoAsync","_hooks","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","obj","__esModule","default"],"sources":["index.ts"],"sourcesContent":["import ContrastingStatusBar from './contrasting-status-bar';\nimport { formatDate, formatDateTime, formatTime } from './date';\nimport { useBlockOSBackNavigation } from './navigation';\nimport { useForwardedRef } from './ref';\nimport { concatTestID } from './testID';\nimport { useMemoAsync } from './useMemoAsync';\n\nexport {\n concatTestID,\n ContrastingStatusBar,\n formatDate,\n formatDateTime,\n formatTime,\n useBlockOSBackNavigation,\n useForwardedRef,\n useMemoAsync,\n};\n\nexport * from './hooks';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,qBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,IAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AAaA,IAAAM,MAAA,GAAAN,OAAA;AAAAO,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,MAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AAAwB,SAAAX,uBAAAoB,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA"}
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useBlockOSBackNavigation = void 0;
7
+ var _native = require("@react-navigation/native");
8
+ var _react = require("react");
9
+ var _reactNative = require("react-native");
10
+ /**
11
+ * Prevent OS back navigation
12
+ * * iOS: block back swipe gesture
13
+ * * Android: block back button from system task bar
14
+ * @param block Whether to prevent the default behavior (default: true)
15
+ * @param onAndroidBack (Android only) Custom callback triggered when OS back button is pressed while blocked
16
+ * * return `false` to allow back navigation, return `true` to block back navigation
17
+ */
18
+ const useBlockOSBackNavigation = function () {
19
+ let block = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
20
+ let onAndroidBack = arguments.length > 1 ? arguments[1] : undefined;
21
+ const navigation = (0, _native.useNavigation)();
22
+ const isFocused = (0, _native.useIsFocused)();
23
+
24
+ // iOS: block back swipe (via screen options)
25
+ (0, _react.useEffect)(() => {
26
+ if (block) {
27
+ navigation.setOptions({
28
+ gestureEnabled: false
29
+ });
30
+ return () => navigation.setOptions({
31
+ gestureEnabled: true
32
+ });
33
+ }
34
+ return undefined;
35
+ }, [block, navigation]);
36
+
37
+ // Anroid: block system back button
38
+ (0, _react.useEffect)(() => {
39
+ if (block && isFocused) {
40
+ const handler = () => {
41
+ var _onAndroidBack;
42
+ return (_onAndroidBack = onAndroidBack === null || onAndroidBack === void 0 ? void 0 : onAndroidBack()) !== null && _onAndroidBack !== void 0 ? _onAndroidBack : true;
43
+ };
44
+ _reactNative.BackHandler.addEventListener('hardwareBackPress', handler);
45
+ return () => _reactNative.BackHandler.removeEventListener('hardwareBackPress', handler);
46
+ }
47
+ return undefined;
48
+ }, [block, isFocused, onAndroidBack]);
49
+ };
50
+ exports.useBlockOSBackNavigation = useBlockOSBackNavigation;
51
+ //# sourceMappingURL=navigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_native","require","_react","_reactNative","useBlockOSBackNavigation","block","arguments","length","undefined","onAndroidBack","navigation","useNavigation","isFocused","useIsFocused","useEffect","setOptions","gestureEnabled","handler","_onAndroidBack","BackHandler","addEventListener","removeEventListener","exports"],"sources":["navigation.ts"],"sourcesContent":["import { NavigationProp, useIsFocused, useNavigation } from '@react-navigation/native';\nimport { useEffect } from 'react';\nimport { BackHandler } from 'react-native';\n\n/**\n * Prevent OS back navigation\n * * iOS: block back swipe gesture\n * * Android: block back button from system task bar\n * @param block Whether to prevent the default behavior (default: true)\n * @param onAndroidBack (Android only) Custom callback triggered when OS back button is pressed while blocked\n * * return `false` to allow back navigation, return `true` to block back navigation\n */\nexport const useBlockOSBackNavigation = (block: boolean = true, onAndroidBack?: () => boolean) => {\n const navigation = useNavigation<NavigationProp<{}>>();\n const isFocused = useIsFocused();\n\n // iOS: block back swipe (via screen options)\n useEffect(() => {\n if (block) {\n navigation.setOptions({ gestureEnabled: false });\n return () => navigation.setOptions({ gestureEnabled: true });\n }\n return undefined;\n }, [block, navigation]);\n\n // Anroid: block system back button\n useEffect(() => {\n if (block && isFocused) {\n const handler = () => {\n return onAndroidBack?.() ?? true;\n };\n BackHandler.addEventListener('hardwareBackPress', handler);\n return () => BackHandler.removeEventListener('hardwareBackPress', handler);\n }\n return undefined;\n }, [block, isFocused, onAndroidBack]);\n};\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,wBAAwB,GAAG,SAAAA,CAAA,EAA0D;EAAA,IAAzDC,KAAc,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;EAAA,IAAEG,aAA6B,GAAAH,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EAC3F,MAAME,UAAU,GAAG,IAAAC,qBAAa,GAAsB;EACtD,MAAMC,SAAS,GAAG,IAAAC,oBAAY,GAAE;;EAEhC;EACA,IAAAC,gBAAS,EAAC,MAAM;IACd,IAAIT,KAAK,EAAE;MACTK,UAAU,CAACK,UAAU,CAAC;QAAEC,cAAc,EAAE;MAAM,CAAC,CAAC;MAChD,OAAO,MAAMN,UAAU,CAACK,UAAU,CAAC;QAAEC,cAAc,EAAE;MAAK,CAAC,CAAC;IAC9D;IACA,OAAOR,SAAS;EAClB,CAAC,EAAE,CAACH,KAAK,EAAEK,UAAU,CAAC,CAAC;;EAEvB;EACA,IAAAI,gBAAS,EAAC,MAAM;IACd,IAAIT,KAAK,IAAIO,SAAS,EAAE;MACtB,MAAMK,OAAO,GAAGA,CAAA,KAAM;QAAA,IAAAC,cAAA;QACpB,QAAAA,cAAA,GAAOT,aAAa,aAAbA,aAAa,uBAAbA,aAAa,EAAI,cAAAS,cAAA,cAAAA,cAAA,GAAI,IAAI;MAClC,CAAC;MACDC,wBAAW,CAACC,gBAAgB,CAAC,mBAAmB,EAAEH,OAAO,CAAC;MAC1D,OAAO,MAAME,wBAAW,CAACE,mBAAmB,CAAC,mBAAmB,EAAEJ,OAAO,CAAC;IAC5E;IACA,OAAOT,SAAS;EAClB,CAAC,EAAE,CAACH,KAAK,EAAEO,SAAS,EAAEH,aAAa,CAAC,CAAC;AACvC,CAAC;AAACa,OAAA,CAAAlB,wBAAA,GAAAA,wBAAA"}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useForwardedRef = void 0;
7
+ var _react = require("react");
8
+ const isWritable = (obj, key) => {
9
+ const desc = Object.getOwnPropertyDescriptor(obj, key) || Object.getOwnPropertyDescriptor(Object.getPrototypeOf(obj), key) || {};
10
+ return Boolean(desc.writable);
11
+ };
12
+
13
+ /**
14
+ * Transforms a forwarded ref to a locally usable reference object
15
+ * @example
16
+ * const Component = forwardRef<RefComponent, Props>((props, ref) => {
17
+ * const [forwardedRef, refObject] = useForwardedRef(ref);
18
+ * const onAction = useCallback(() => doSomething(refObject.current), [refObject]);
19
+ * return <RefComponent ref={forwardedRef} {...props} />;
20
+ * }
21
+ */
22
+ const useForwardedRef = passedRef => {
23
+ const localRef = (0, _react.useRef)(null);
24
+ return (0, _react.useMemo)(() => {
25
+ const ref = localRef;
26
+ const forwardedRef = instance => {
27
+ ref.current = instance;
28
+ if (passedRef) {
29
+ if (passedRef instanceof Function) {
30
+ passedRef(instance);
31
+ } else if (isWritable(passedRef, 'current')) {
32
+ try {
33
+ passedRef.current = instance;
34
+ } catch (e) {}
35
+ }
36
+ }
37
+ };
38
+ return [forwardedRef, ref];
39
+ }, [passedRef]);
40
+ };
41
+ exports.useForwardedRef = useForwardedRef;
42
+ //# sourceMappingURL=ref.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","isWritable","obj","key","desc","Object","getOwnPropertyDescriptor","getPrototypeOf","Boolean","writable","useForwardedRef","passedRef","localRef","useRef","useMemo","ref","forwardedRef","instance","current","Function","e","exports"],"sources":["ref.ts"],"sourcesContent":["import React, { useMemo, useRef } from 'react';\n\nconst isWritable = <T extends Object>(obj: T, key: keyof T) => {\n const desc =\n Object.getOwnPropertyDescriptor(obj, key) || Object.getOwnPropertyDescriptor(Object.getPrototypeOf(obj), key) || {};\n return Boolean(desc.writable);\n};\n\n/**\n * Transforms a forwarded ref to a locally usable reference object\n * @example\n * const Component = forwardRef<RefComponent, Props>((props, ref) => {\n * const [forwardedRef, refObject] = useForwardedRef(ref);\n * const onAction = useCallback(() => doSomething(refObject.current), [refObject]);\n * return <RefComponent ref={forwardedRef} {...props} />;\n * }\n */\nexport const useForwardedRef = <Component extends React.Component<any> | React.ComponentClass<any>>(\n passedRef?: React.Ref<Component>,\n) => {\n const localRef = useRef<Component>(null);\n return useMemo<[React.Ref<Component>, React.RefObject<Component>]>(() => {\n const ref: React.MutableRefObject<Component | null> = localRef;\n const forwardedRef: React.Ref<Component> = (instance: Component | null) => {\n ref.current = instance;\n if (passedRef) {\n if (passedRef instanceof Function) {\n passedRef(instance);\n } else if (isWritable(passedRef, 'current')) {\n try {\n (passedRef as any).current = instance;\n } catch (e) {}\n }\n }\n };\n\n return [forwardedRef, ref as React.RefObject<Component>];\n }, [passedRef]);\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,MAAMC,UAAU,GAAGA,CAAmBC,GAAM,EAAEC,GAAY,KAAK;EAC7D,MAAMC,IAAI,GACRC,MAAM,CAACC,wBAAwB,CAACJ,GAAG,EAAEC,GAAG,CAAC,IAAIE,MAAM,CAACC,wBAAwB,CAACD,MAAM,CAACE,cAAc,CAACL,GAAG,CAAC,EAAEC,GAAG,CAAC,IAAI,CAAC,CAAC;EACrH,OAAOK,OAAO,CAACJ,IAAI,CAACK,QAAQ,CAAC;AAC/B,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,eAAe,GAC1BC,SAAgC,IAC7B;EACH,MAAMC,QAAQ,GAAG,IAAAC,aAAM,EAAY,IAAI,CAAC;EACxC,OAAO,IAAAC,cAAO,EAAqD,MAAM;IACvE,MAAMC,GAA6C,GAAGH,QAAQ;IAC9D,MAAMI,YAAkC,GAAIC,QAA0B,IAAK;MACzEF,GAAG,CAACG,OAAO,GAAGD,QAAQ;MACtB,IAAIN,SAAS,EAAE;QACb,IAAIA,SAAS,YAAYQ,QAAQ,EAAE;UACjCR,SAAS,CAACM,QAAQ,CAAC;QACrB,CAAC,MAAM,IAAIhB,UAAU,CAACU,SAAS,EAAE,SAAS,CAAC,EAAE;UAC3C,IAAI;YACDA,SAAS,CAASO,OAAO,GAAGD,QAAQ;UACvC,CAAC,CAAC,OAAOG,CAAC,EAAE,CAAC;QACf;MACF;IACF,CAAC;IAED,OAAO,CAACJ,YAAY,EAAED,GAAG,CAA+B;EAC1D,CAAC,EAAE,CAACJ,SAAS,CAAC,CAAC;AACjB,CAAC;AAACU,OAAA,CAAAX,eAAA,GAAAA,eAAA"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.concatTestID = concatTestID;
7
+ /**
8
+ * Create `testID` prop by concatenating parts
9
+ * @returns {string} concatenated identifier or undefined if one part is missing
10
+ */
11
+
12
+ function concatTestID(part1) {
13
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
14
+ args[_key - 1] = arguments[_key];
15
+ }
16
+ return args.reduce((aggr, part) => aggr && part ? `${aggr}.${part}` : undefined, part1 || undefined);
17
+ }
18
+ //# sourceMappingURL=testID.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["concatTestID","part1","_len","arguments","length","args","Array","_key","reduce","aggr","part","undefined"],"sources":["testID.ts"],"sourcesContent":["/**\n * Create `testID` prop by concatenating parts\n * @returns {string} concatenated identifier or undefined if one part is missing\n */\nexport function concatTestID(part1: string, ...args: Array<string>): string;\nexport function concatTestID(part1: string | undefined, ...args: Array<string | undefined>): string | undefined;\nexport function concatTestID(part1: string | undefined, ...args: Array<string | undefined>): string | undefined {\n return args.reduce((aggr, part) => (aggr && part ? `${aggr}.${part}` : undefined), part1 || undefined);\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;;AAGO,SAASA,YAAYA,CAACC,KAAyB,EAA0D;EAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAArDC,IAAI,OAAAC,KAAA,CAAAJ,IAAA,OAAAA,IAAA,WAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;IAAJF,IAAI,CAAAE,IAAA,QAAAJ,SAAA,CAAAI,IAAA;EAAA;EAC7D,OAAOF,IAAI,CAACG,MAAM,CAAC,CAACC,IAAI,EAAEC,IAAI,KAAMD,IAAI,IAAIC,IAAI,GAAI,GAAED,IAAK,IAAGC,IAAK,EAAC,GAAGC,SAAU,EAAEV,KAAK,IAAIU,SAAS,CAAC;AACxG"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ var _testID = require("./testID");
4
+ describe('concatTestID', () => {
5
+ it('concatenates testID parts', () => {
6
+ expect((0, _testID.concatTestID)('A')).toBe('A');
7
+ expect((0, _testID.concatTestID)('A', 'B')).toBe('A.B');
8
+ expect((0, _testID.concatTestID)('A', 'B', 'C')).toBe('A.B.C');
9
+ });
10
+ it('recognizes missing parts', () => {
11
+ expect((0, _testID.concatTestID)('')).toBe(undefined);
12
+ expect((0, _testID.concatTestID)(undefined)).toBe(undefined);
13
+ expect((0, _testID.concatTestID)('', 'something')).toBe(undefined);
14
+ expect((0, _testID.concatTestID)(undefined, 'something')).toBe(undefined);
15
+ expect((0, _testID.concatTestID)('something', '')).toBe(undefined);
16
+ expect((0, _testID.concatTestID)('something', undefined)).toBe(undefined);
17
+ expect((0, _testID.concatTestID)('something', '', 'somethingElse')).toBe(undefined);
18
+ expect((0, _testID.concatTestID)('something', undefined, 'somethingElse')).toBe(undefined);
19
+ });
20
+ });
21
+ //# sourceMappingURL=testID.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_testID","require","describe","it","expect","concatTestID","toBe","undefined"],"sources":["testID.test.ts"],"sourcesContent":["import { concatTestID } from './testID';\n\ndescribe('concatTestID', () => {\n it('concatenates testID parts', () => {\n expect(concatTestID('A')).toBe('A');\n expect(concatTestID('A', 'B')).toBe('A.B');\n expect(concatTestID('A', 'B', 'C')).toBe('A.B.C');\n });\n\n it('recognizes missing parts', () => {\n expect(concatTestID('')).toBe(undefined);\n expect(concatTestID(undefined)).toBe(undefined);\n expect(concatTestID('', 'something')).toBe(undefined);\n expect(concatTestID(undefined, 'something')).toBe(undefined);\n expect(concatTestID('something', '')).toBe(undefined);\n expect(concatTestID('something', undefined)).toBe(undefined);\n expect(concatTestID('something', '', 'somethingElse')).toBe(undefined);\n expect(concatTestID('something', undefined, 'somethingElse')).toBe(undefined);\n });\n});\n"],"mappings":";;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEAC,QAAQ,CAAC,cAAc,EAAE,MAAM;EAC7BC,EAAE,CAAC,2BAA2B,EAAE,MAAM;IACpCC,MAAM,CAAC,IAAAC,oBAAY,EAAC,GAAG,CAAC,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC;IACnCF,MAAM,CAAC,IAAAC,oBAAY,EAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAACC,IAAI,CAAC,KAAK,CAAC;IAC1CF,MAAM,CAAC,IAAAC,oBAAY,EAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAACC,IAAI,CAAC,OAAO,CAAC;EACnD,CAAC,CAAC;EAEFH,EAAE,CAAC,0BAA0B,EAAE,MAAM;IACnCC,MAAM,CAAC,IAAAC,oBAAY,EAAC,EAAE,CAAC,CAAC,CAACC,IAAI,CAACC,SAAS,CAAC;IACxCH,MAAM,CAAC,IAAAC,oBAAY,EAACE,SAAS,CAAC,CAAC,CAACD,IAAI,CAACC,SAAS,CAAC;IAC/CH,MAAM,CAAC,IAAAC,oBAAY,EAAC,EAAE,EAAE,WAAW,CAAC,CAAC,CAACC,IAAI,CAACC,SAAS,CAAC;IACrDH,MAAM,CAAC,IAAAC,oBAAY,EAACE,SAAS,EAAE,WAAW,CAAC,CAAC,CAACD,IAAI,CAACC,SAAS,CAAC;IAC5DH,MAAM,CAAC,IAAAC,oBAAY,EAAC,WAAW,EAAE,EAAE,CAAC,CAAC,CAACC,IAAI,CAACC,SAAS,CAAC;IACrDH,MAAM,CAAC,IAAAC,oBAAY,EAAC,WAAW,EAAEE,SAAS,CAAC,CAAC,CAACD,IAAI,CAACC,SAAS,CAAC;IAC5DH,MAAM,CAAC,IAAAC,oBAAY,EAAC,WAAW,EAAE,EAAE,EAAE,eAAe,CAAC,CAAC,CAACC,IAAI,CAACC,SAAS,CAAC;IACtEH,MAAM,CAAC,IAAAC,oBAAY,EAAC,WAAW,EAAEE,SAAS,EAAE,eAAe,CAAC,CAAC,CAACD,IAAI,CAACC,SAAS,CAAC;EAC/E,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useMemoAsync = useMemoAsync;
7
+ var _react = require("react");
8
+ function useMemoAsync(factory, deps, initialValue, fallbackValue) {
9
+ const [value, setValue] = (0, _react.useState)(initialValue);
10
+ (0, _react.useEffect)(() => {
11
+ const abortCtrl = new AbortController();
12
+ const update = async () => {
13
+ try {
14
+ const result = await factory(abortCtrl.signal);
15
+ if (!abortCtrl.signal.aborted) setValue(result);
16
+ } catch (e) {
17
+ if (!abortCtrl.signal.aborted) setValue(fallbackValue !== null && fallbackValue !== void 0 ? fallbackValue : initialValue);
18
+ }
19
+ };
20
+ update();
21
+ return () => abortCtrl.abort();
22
+ // eslint-disable-next-line react-hooks/exhaustive-deps
23
+ }, deps);
24
+ return value;
25
+ }
26
+ //# sourceMappingURL=useMemoAsync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","useMemoAsync","factory","deps","initialValue","fallbackValue","value","setValue","useState","useEffect","abortCtrl","AbortController","update","result","signal","aborted","e","abort"],"sources":["useMemoAsync.ts"],"sourcesContent":["import { DependencyList, useEffect, useState } from 'react';\n\ninterface FactoryFn<Value> {\n /**\n * Custom factory function\n * @param abortSignal Signaled when the deps change and the factory function need to be called again or when the parent component unmounts\n * @returns Result to be returned from the {@link useMemoAsync}\n */\n (abortSignal: AbortSignal): Value | Promise<Value>;\n}\n\n/**\n * Utility hook that can be used the same way as `useMemo` when the initializer needs to be async\n * @param factory Factory function to produce a value\n * @param deps Hook dependency list (to trigger an update)\n * @param initialValue Initial value before factory finishes producing a value (default = `undefined`)\n * @param fallbackValue Used when factory fails to produce a value (default = `initialValue`)\n * @returns Result from the {@link factory}, {@link initialValue} or {@link fallbackValue}\n */\nexport function useMemoAsync<Value, FallbackValue = Value | undefined>(\n factory: FactoryFn<Value>,\n deps: DependencyList,\n initialValue: FallbackValue,\n fallbackValue?: FallbackValue,\n): Value | FallbackValue;\nexport function useMemoAsync<Value>(factory: FactoryFn<Value>, deps: DependencyList): Value | undefined;\n\nexport function useMemoAsync<Value, FallbackValue = Value | undefined>(\n factory: FactoryFn<Value>,\n deps: DependencyList,\n initialValue?: FallbackValue,\n fallbackValue?: FallbackValue,\n): Value | FallbackValue | undefined {\n const [value, setValue] = useState<Value | FallbackValue | undefined>(initialValue);\n useEffect(() => {\n const abortCtrl = new AbortController();\n const update = async () => {\n try {\n const result = await factory(abortCtrl.signal);\n if (!abortCtrl.signal.aborted) setValue(result);\n } catch (e) {\n if (!abortCtrl.signal.aborted) setValue(fallbackValue ?? initialValue);\n }\n };\n update();\n return () => abortCtrl.abort();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, deps);\n return value;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AA2BO,SAASC,YAAYA,CAC1BC,OAAyB,EACzBC,IAAoB,EACpBC,YAA4B,EAC5BC,aAA6B,EACM;EACnC,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAG,IAAAC,eAAQ,EAAoCJ,YAAY,CAAC;EACnF,IAAAK,gBAAS,EAAC,MAAM;IACd,MAAMC,SAAS,GAAG,IAAIC,eAAe,EAAE;IACvC,MAAMC,MAAM,GAAG,MAAAA,CAAA,KAAY;MACzB,IAAI;QACF,MAAMC,MAAM,GAAG,MAAMX,OAAO,CAACQ,SAAS,CAACI,MAAM,CAAC;QAC9C,IAAI,CAACJ,SAAS,CAACI,MAAM,CAACC,OAAO,EAAER,QAAQ,CAACM,MAAM,CAAC;MACjD,CAAC,CAAC,OAAOG,CAAC,EAAE;QACV,IAAI,CAACN,SAAS,CAACI,MAAM,CAACC,OAAO,EAAER,QAAQ,CAACF,aAAa,aAAbA,aAAa,cAAbA,aAAa,GAAID,YAAY,CAAC;MACxE;IACF,CAAC;IACDQ,MAAM,EAAE;IACR,OAAO,MAAMF,SAAS,CAACO,KAAK,EAAE;IAC9B;EACF,CAAC,EAAEd,IAAI,CAAC;EACR,OAAOG,KAAK;AACd"}