@draftbit/core 46.4.4-6da88d.2 → 46.4.4-7001c8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (535) hide show
  1. package/lib/commonjs/index.js +13 -219
  2. package/lib/commonjs/index.js.map +1 -1
  3. package/lib/commonjs/mappings/Touchable.js +1 -1
  4. package/lib/commonjs/mappings/View.js.map +1 -1
  5. package/lib/commonjs/mappings/WebView.js.map +1 -1
  6. package/lib/module/index.js +29 -42
  7. package/lib/module/index.js.map +1 -1
  8. package/lib/module/mappings/Touchable.js +1 -1
  9. package/lib/typescript/src/index.d.ts +13 -40
  10. package/lib/typescript/src/index.d.ts.map +1 -1
  11. package/package.json +4 -6
  12. package/src/index.js +22 -42
  13. package/src/index.tsx +36 -52
  14. package/src/mappings/Touchable.js +1 -1
  15. package/src/mappings/Touchable.ts +1 -1
  16. package/lib/commonjs/components/AnimatedCircularProgress.js +0 -67
  17. package/lib/commonjs/components/AnimatedCircularProgress.js.map +0 -1
  18. package/lib/commonjs/components/AspectRatio.js +0 -51
  19. package/lib/commonjs/components/AspectRatio.js.map +0 -1
  20. package/lib/commonjs/components/AvatarEdit.js +0 -60
  21. package/lib/commonjs/components/AvatarEdit.js.map +0 -1
  22. package/lib/commonjs/components/Banner.js +0 -168
  23. package/lib/commonjs/components/Banner.js.map +0 -1
  24. package/lib/commonjs/components/Card.js +0 -138
  25. package/lib/commonjs/components/Card.js.map +0 -1
  26. package/lib/commonjs/components/CardBlock.js +0 -107
  27. package/lib/commonjs/components/CardBlock.js.map +0 -1
  28. package/lib/commonjs/components/CardContainer.js +0 -130
  29. package/lib/commonjs/components/CardContainer.js.map +0 -1
  30. package/lib/commonjs/components/CardContainerRating.js +0 -134
  31. package/lib/commonjs/components/CardContainerRating.js.map +0 -1
  32. package/lib/commonjs/components/CardContainerShortImage.js +0 -85
  33. package/lib/commonjs/components/CardContainerShortImage.js.map +0 -1
  34. package/lib/commonjs/components/CardInline.js +0 -92
  35. package/lib/commonjs/components/CardInline.js.map +0 -1
  36. package/lib/commonjs/components/Carousel.js +0 -130
  37. package/lib/commonjs/components/Carousel.js.map +0 -1
  38. package/lib/commonjs/components/CircleImage.js +0 -36
  39. package/lib/commonjs/components/CircleImage.js.map +0 -1
  40. package/lib/commonjs/components/CircularProgress.js +0 -113
  41. package/lib/commonjs/components/CircularProgress.js.map +0 -1
  42. package/lib/commonjs/components/Container.js +0 -105
  43. package/lib/commonjs/components/Container.js.map +0 -1
  44. package/lib/commonjs/components/DeprecatedCardWrapper.js +0 -41
  45. package/lib/commonjs/components/DeprecatedCardWrapper.js.map +0 -1
  46. package/lib/commonjs/components/DeprecatedFAB.js +0 -159
  47. package/lib/commonjs/components/DeprecatedFAB.js.map +0 -1
  48. package/lib/commonjs/components/Divider.js +0 -31
  49. package/lib/commonjs/components/Divider.js.map +0 -1
  50. package/lib/commonjs/components/FAB.js +0 -83
  51. package/lib/commonjs/components/FAB.js.map +0 -1
  52. package/lib/commonjs/components/FieldSearchBarFull.js +0 -98
  53. package/lib/commonjs/components/FieldSearchBarFull.js.map +0 -1
  54. package/lib/commonjs/components/Header.js +0 -83
  55. package/lib/commonjs/components/Header.js.map +0 -1
  56. package/lib/commonjs/components/HeaderLarge.js +0 -39
  57. package/lib/commonjs/components/HeaderLarge.js.map +0 -1
  58. package/lib/commonjs/components/HeaderMedium.js +0 -39
  59. package/lib/commonjs/components/HeaderMedium.js.map +0 -1
  60. package/lib/commonjs/components/HeaderOverline.js +0 -40
  61. package/lib/commonjs/components/HeaderOverline.js.map +0 -1
  62. package/lib/commonjs/components/Image.js +0 -82
  63. package/lib/commonjs/components/Image.js.map +0 -1
  64. package/lib/commonjs/components/Justification.js +0 -5
  65. package/lib/commonjs/components/Justification.js.map +0 -1
  66. package/lib/commonjs/components/ProgressBar.js +0 -159
  67. package/lib/commonjs/components/ProgressBar.js.map +0 -1
  68. package/lib/commonjs/components/ProgressCircle.js +0 -49
  69. package/lib/commonjs/components/ProgressCircle.js.map +0 -1
  70. package/lib/commonjs/components/ProgressIndicator.js +0 -56
  71. package/lib/commonjs/components/ProgressIndicator.js.map +0 -1
  72. package/lib/commonjs/components/ResizeMode.js +0 -5
  73. package/lib/commonjs/components/ResizeMode.js.map +0 -1
  74. package/lib/commonjs/components/Row.js +0 -74
  75. package/lib/commonjs/components/Row.js.map +0 -1
  76. package/lib/commonjs/components/RowBodyIcon.js +0 -46
  77. package/lib/commonjs/components/RowBodyIcon.js.map +0 -1
  78. package/lib/commonjs/components/RowHeadlineImageCaption.js +0 -46
  79. package/lib/commonjs/components/RowHeadlineImageCaption.js.map +0 -1
  80. package/lib/commonjs/components/RowHeadlineImageIcon.js +0 -52
  81. package/lib/commonjs/components/RowHeadlineImageIcon.js.map +0 -1
  82. package/lib/commonjs/components/StepIndicator.js +0 -386
  83. package/lib/commonjs/components/StepIndicator.js.map +0 -1
  84. package/lib/commonjs/components/TabView/TabView.js +0 -88
  85. package/lib/commonjs/components/TabView/TabView.js.map +0 -1
  86. package/lib/commonjs/components/TabView/TabViewItem.js +0 -25
  87. package/lib/commonjs/components/TabView/TabViewItem.js.map +0 -1
  88. package/lib/commonjs/components/TabView/index.js +0 -21
  89. package/lib/commonjs/components/TabView/index.js.map +0 -1
  90. package/lib/commonjs/components/ToggleButton.js +0 -72
  91. package/lib/commonjs/components/ToggleButton.js.map +0 -1
  92. package/lib/commonjs/components/Typography.js +0 -59
  93. package/lib/commonjs/components/Typography.js.map +0 -1
  94. package/lib/commonjs/components/useAuthState.js +0 -29
  95. package/lib/commonjs/components/useAuthState.js.map +0 -1
  96. package/lib/commonjs/mappings/AvatarEdit.js +0 -46
  97. package/lib/commonjs/mappings/AvatarEdit.js.map +0 -1
  98. package/lib/commonjs/mappings/Banner.js +0 -40
  99. package/lib/commonjs/mappings/Banner.js.map +0 -1
  100. package/lib/commonjs/mappings/Card.js +0 -61
  101. package/lib/commonjs/mappings/Card.js.map +0 -1
  102. package/lib/commonjs/mappings/CardBlock.js +0 -127
  103. package/lib/commonjs/mappings/CardBlock.js.map +0 -1
  104. package/lib/commonjs/mappings/CardContainer.js +0 -109
  105. package/lib/commonjs/mappings/CardContainer.js.map +0 -1
  106. package/lib/commonjs/mappings/CardContainerRating.js +0 -131
  107. package/lib/commonjs/mappings/CardContainerRating.js.map +0 -1
  108. package/lib/commonjs/mappings/CardContainerShortImage.js +0 -125
  109. package/lib/commonjs/mappings/CardContainerShortImage.js.map +0 -1
  110. package/lib/commonjs/mappings/CardInline.js +0 -60
  111. package/lib/commonjs/mappings/CardInline.js.map +0 -1
  112. package/lib/commonjs/mappings/Carousel.js +0 -25
  113. package/lib/commonjs/mappings/Carousel.js.map +0 -1
  114. package/lib/commonjs/mappings/CircleImage.js +0 -33
  115. package/lib/commonjs/mappings/CircleImage.js.map +0 -1
  116. package/lib/commonjs/mappings/Container.js +0 -38
  117. package/lib/commonjs/mappings/Container.js.map +0 -1
  118. package/lib/commonjs/mappings/Divider.js +0 -33
  119. package/lib/commonjs/mappings/Divider.js.map +0 -1
  120. package/lib/commonjs/mappings/FAB.js +0 -45
  121. package/lib/commonjs/mappings/FAB.js.map +0 -1
  122. package/lib/commonjs/mappings/FieldSearchBarFull.js +0 -57
  123. package/lib/commonjs/mappings/FieldSearchBarFull.js.map +0 -1
  124. package/lib/commonjs/mappings/HeaderLarge.js +0 -35
  125. package/lib/commonjs/mappings/HeaderLarge.js.map +0 -1
  126. package/lib/commonjs/mappings/HeaderMedium.js +0 -61
  127. package/lib/commonjs/mappings/HeaderMedium.js.map +0 -1
  128. package/lib/commonjs/mappings/HeaderOverline.js +0 -61
  129. package/lib/commonjs/mappings/HeaderOverline.js.map +0 -1
  130. package/lib/commonjs/mappings/ProgressBar.js +0 -107
  131. package/lib/commonjs/mappings/ProgressBar.js.map +0 -1
  132. package/lib/commonjs/mappings/ProgressCircle.js +0 -117
  133. package/lib/commonjs/mappings/ProgressCircle.js.map +0 -1
  134. package/lib/commonjs/mappings/ProgressIndicator.js +0 -189
  135. package/lib/commonjs/mappings/ProgressIndicator.js.map +0 -1
  136. package/lib/commonjs/mappings/RowBodyIcon.js +0 -80
  137. package/lib/commonjs/mappings/RowBodyIcon.js.map +0 -1
  138. package/lib/commonjs/mappings/RowHeadlineImageCaption.js +0 -170
  139. package/lib/commonjs/mappings/RowHeadlineImageCaption.js.map +0 -1
  140. package/lib/commonjs/mappings/RowHeadlineImageIcon.js +0 -100
  141. package/lib/commonjs/mappings/RowHeadlineImageIcon.js.map +0 -1
  142. package/lib/commonjs/mappings/TabView.js +0 -78
  143. package/lib/commonjs/mappings/TabView.js.map +0 -1
  144. package/lib/commonjs/mappings/ToggleButton.js +0 -54
  145. package/lib/commonjs/mappings/ToggleButton.js.map +0 -1
  146. package/lib/module/components/AnimatedCircularProgress.js +0 -57
  147. package/lib/module/components/AnimatedCircularProgress.js.map +0 -1
  148. package/lib/module/components/AspectRatio.js +0 -43
  149. package/lib/module/components/AspectRatio.js.map +0 -1
  150. package/lib/module/components/AvatarEdit.js +0 -50
  151. package/lib/module/components/AvatarEdit.js.map +0 -1
  152. package/lib/module/components/Banner.js +0 -158
  153. package/lib/module/components/Banner.js.map +0 -1
  154. package/lib/module/components/Card.js +0 -129
  155. package/lib/module/components/Card.js.map +0 -1
  156. package/lib/module/components/CardBlock.js +0 -99
  157. package/lib/module/components/CardBlock.js.map +0 -1
  158. package/lib/module/components/CardContainer.js +0 -122
  159. package/lib/module/components/CardContainer.js.map +0 -1
  160. package/lib/module/components/CardContainerRating.js +0 -126
  161. package/lib/module/components/CardContainerRating.js.map +0 -1
  162. package/lib/module/components/CardContainerShortImage.js +0 -77
  163. package/lib/module/components/CardContainerShortImage.js.map +0 -1
  164. package/lib/module/components/CardInline.js +0 -83
  165. package/lib/module/components/CardInline.js.map +0 -1
  166. package/lib/module/components/Carousel.js +0 -120
  167. package/lib/module/components/Carousel.js.map +0 -1
  168. package/lib/module/components/CircleImage.js +0 -26
  169. package/lib/module/components/CircleImage.js.map +0 -1
  170. package/lib/module/components/CircularProgress.js +0 -105
  171. package/lib/module/components/CircularProgress.js.map +0 -1
  172. package/lib/module/components/Container.js +0 -84
  173. package/lib/module/components/Container.js.map +0 -1
  174. package/lib/module/components/DeprecatedCardWrapper.js +0 -33
  175. package/lib/module/components/DeprecatedCardWrapper.js.map +0 -1
  176. package/lib/module/components/DeprecatedFAB.js +0 -149
  177. package/lib/module/components/DeprecatedFAB.js.map +0 -1
  178. package/lib/module/components/Divider.js +0 -22
  179. package/lib/module/components/Divider.js.map +0 -1
  180. package/lib/module/components/FAB.js +0 -74
  181. package/lib/module/components/FAB.js.map +0 -1
  182. package/lib/module/components/FieldSearchBarFull.js +0 -88
  183. package/lib/module/components/FieldSearchBarFull.js.map +0 -1
  184. package/lib/module/components/Header.js +0 -73
  185. package/lib/module/components/Header.js.map +0 -1
  186. package/lib/module/components/HeaderLarge.js +0 -29
  187. package/lib/module/components/HeaderLarge.js.map +0 -1
  188. package/lib/module/components/HeaderMedium.js +0 -29
  189. package/lib/module/components/HeaderMedium.js.map +0 -1
  190. package/lib/module/components/HeaderOverline.js +0 -30
  191. package/lib/module/components/HeaderOverline.js.map +0 -1
  192. package/lib/module/components/Image.js +0 -75
  193. package/lib/module/components/Image.js.map +0 -1
  194. package/lib/module/components/Justification.js +0 -2
  195. package/lib/module/components/Justification.js.map +0 -1
  196. package/lib/module/components/ProgressBar.js +0 -150
  197. package/lib/module/components/ProgressBar.js.map +0 -1
  198. package/lib/module/components/ProgressCircle.js +0 -39
  199. package/lib/module/components/ProgressCircle.js.map +0 -1
  200. package/lib/module/components/ProgressIndicator.js +0 -46
  201. package/lib/module/components/ProgressIndicator.js.map +0 -1
  202. package/lib/module/components/ResizeMode.js +0 -2
  203. package/lib/module/components/ResizeMode.js.map +0 -1
  204. package/lib/module/components/Row.js +0 -64
  205. package/lib/module/components/Row.js.map +0 -1
  206. package/lib/module/components/RowBodyIcon.js +0 -36
  207. package/lib/module/components/RowBodyIcon.js.map +0 -1
  208. package/lib/module/components/RowHeadlineImageCaption.js +0 -36
  209. package/lib/module/components/RowHeadlineImageCaption.js.map +0 -1
  210. package/lib/module/components/RowHeadlineImageIcon.js +0 -42
  211. package/lib/module/components/RowHeadlineImageIcon.js.map +0 -1
  212. package/lib/module/components/StepIndicator.js +0 -378
  213. package/lib/module/components/StepIndicator.js.map +0 -1
  214. package/lib/module/components/TabView/TabView.js +0 -80
  215. package/lib/module/components/TabView/TabView.js.map +0 -1
  216. package/lib/module/components/TabView/TabViewItem.js +0 -18
  217. package/lib/module/components/TabView/TabViewItem.js.map +0 -1
  218. package/lib/module/components/TabView/index.js +0 -3
  219. package/lib/module/components/TabView/index.js.map +0 -1
  220. package/lib/module/components/ToggleButton.js +0 -62
  221. package/lib/module/components/ToggleButton.js.map +0 -1
  222. package/lib/module/components/Typography.js +0 -49
  223. package/lib/module/components/Typography.js.map +0 -1
  224. package/lib/module/components/useAuthState.js +0 -20
  225. package/lib/module/components/useAuthState.js.map +0 -1
  226. package/lib/module/mappings/AvatarEdit.js +0 -39
  227. package/lib/module/mappings/AvatarEdit.js.map +0 -1
  228. package/lib/module/mappings/Banner.js +0 -33
  229. package/lib/module/mappings/Banner.js.map +0 -1
  230. package/lib/module/mappings/Card.js +0 -54
  231. package/lib/module/mappings/Card.js.map +0 -1
  232. package/lib/module/mappings/CardBlock.js +0 -120
  233. package/lib/module/mappings/CardBlock.js.map +0 -1
  234. package/lib/module/mappings/CardContainer.js +0 -102
  235. package/lib/module/mappings/CardContainer.js.map +0 -1
  236. package/lib/module/mappings/CardContainerRating.js +0 -124
  237. package/lib/module/mappings/CardContainerRating.js.map +0 -1
  238. package/lib/module/mappings/CardContainerShortImage.js +0 -118
  239. package/lib/module/mappings/CardContainerShortImage.js.map +0 -1
  240. package/lib/module/mappings/CardInline.js +0 -53
  241. package/lib/module/mappings/CardInline.js.map +0 -1
  242. package/lib/module/mappings/Carousel.js +0 -18
  243. package/lib/module/mappings/Carousel.js.map +0 -1
  244. package/lib/module/mappings/CircleImage.js +0 -26
  245. package/lib/module/mappings/CircleImage.js.map +0 -1
  246. package/lib/module/mappings/Container.js +0 -31
  247. package/lib/module/mappings/Container.js.map +0 -1
  248. package/lib/module/mappings/Divider.js +0 -26
  249. package/lib/module/mappings/Divider.js.map +0 -1
  250. package/lib/module/mappings/FAB.js +0 -38
  251. package/lib/module/mappings/FAB.js.map +0 -1
  252. package/lib/module/mappings/FieldSearchBarFull.js +0 -50
  253. package/lib/module/mappings/FieldSearchBarFull.js.map +0 -1
  254. package/lib/module/mappings/HeaderLarge.js +0 -28
  255. package/lib/module/mappings/HeaderLarge.js.map +0 -1
  256. package/lib/module/mappings/HeaderMedium.js +0 -54
  257. package/lib/module/mappings/HeaderMedium.js.map +0 -1
  258. package/lib/module/mappings/HeaderOverline.js +0 -54
  259. package/lib/module/mappings/HeaderOverline.js.map +0 -1
  260. package/lib/module/mappings/ProgressBar.js +0 -100
  261. package/lib/module/mappings/ProgressBar.js.map +0 -1
  262. package/lib/module/mappings/ProgressCircle.js +0 -110
  263. package/lib/module/mappings/ProgressCircle.js.map +0 -1
  264. package/lib/module/mappings/ProgressIndicator.js +0 -182
  265. package/lib/module/mappings/ProgressIndicator.js.map +0 -1
  266. package/lib/module/mappings/RowBodyIcon.js +0 -73
  267. package/lib/module/mappings/RowBodyIcon.js.map +0 -1
  268. package/lib/module/mappings/RowHeadlineImageCaption.js +0 -163
  269. package/lib/module/mappings/RowHeadlineImageCaption.js.map +0 -1
  270. package/lib/module/mappings/RowHeadlineImageIcon.js +0 -93
  271. package/lib/module/mappings/RowHeadlineImageIcon.js.map +0 -1
  272. package/lib/module/mappings/TabView.js +0 -71
  273. package/lib/module/mappings/TabView.js.map +0 -1
  274. package/lib/module/mappings/ToggleButton.js +0 -47
  275. package/lib/module/mappings/ToggleButton.js.map +0 -1
  276. package/lib/typescript/src/components/AnimatedCircularProgress.d.ts +0 -14
  277. package/lib/typescript/src/components/AnimatedCircularProgress.d.ts.map +0 -1
  278. package/lib/typescript/src/components/AspectRatio.d.ts +0 -9
  279. package/lib/typescript/src/components/AspectRatio.d.ts.map +0 -1
  280. package/lib/typescript/src/components/AvatarEdit.d.ts +0 -16
  281. package/lib/typescript/src/components/AvatarEdit.d.ts.map +0 -1
  282. package/lib/typescript/src/components/Banner.d.ts +0 -23
  283. package/lib/typescript/src/components/Banner.d.ts.map +0 -1
  284. package/lib/typescript/src/components/Card.d.ts +0 -43
  285. package/lib/typescript/src/components/Card.d.ts.map +0 -1
  286. package/lib/typescript/src/components/CardBlock.d.ts +0 -21
  287. package/lib/typescript/src/components/CardBlock.d.ts.map +0 -1
  288. package/lib/typescript/src/components/CardContainer.d.ts +0 -23
  289. package/lib/typescript/src/components/CardContainer.d.ts.map +0 -1
  290. package/lib/typescript/src/components/CardContainerRating.d.ts +0 -24
  291. package/lib/typescript/src/components/CardContainerRating.d.ts.map +0 -1
  292. package/lib/typescript/src/components/CardContainerShortImage.d.ts +0 -19
  293. package/lib/typescript/src/components/CardContainerShortImage.d.ts.map +0 -1
  294. package/lib/typescript/src/components/CardInline.d.ts +0 -20
  295. package/lib/typescript/src/components/CardInline.d.ts.map +0 -1
  296. package/lib/typescript/src/components/Carousel.d.ts +0 -15
  297. package/lib/typescript/src/components/Carousel.d.ts.map +0 -1
  298. package/lib/typescript/src/components/CircleImage.d.ts +0 -10
  299. package/lib/typescript/src/components/CircleImage.d.ts.map +0 -1
  300. package/lib/typescript/src/components/CircularProgress.d.ts +0 -43
  301. package/lib/typescript/src/components/CircularProgress.d.ts.map +0 -1
  302. package/lib/typescript/src/components/Container.d.ts +0 -21
  303. package/lib/typescript/src/components/Container.d.ts.map +0 -1
  304. package/lib/typescript/src/components/DeprecatedCardWrapper.d.ts +0 -15
  305. package/lib/typescript/src/components/DeprecatedCardWrapper.d.ts.map +0 -1
  306. package/lib/typescript/src/components/DeprecatedFAB.d.ts +0 -56
  307. package/lib/typescript/src/components/DeprecatedFAB.d.ts.map +0 -1
  308. package/lib/typescript/src/components/Divider.d.ts +0 -13
  309. package/lib/typescript/src/components/Divider.d.ts.map +0 -1
  310. package/lib/typescript/src/components/FAB.d.ts +0 -20
  311. package/lib/typescript/src/components/FAB.d.ts.map +0 -1
  312. package/lib/typescript/src/components/FieldSearchBarFull.d.ts +0 -20
  313. package/lib/typescript/src/components/FieldSearchBarFull.d.ts.map +0 -1
  314. package/lib/typescript/src/components/Header.d.ts +0 -20
  315. package/lib/typescript/src/components/Header.d.ts.map +0 -1
  316. package/lib/typescript/src/components/HeaderLarge.d.ts +0 -17
  317. package/lib/typescript/src/components/HeaderLarge.d.ts.map +0 -1
  318. package/lib/typescript/src/components/HeaderMedium.d.ts +0 -17
  319. package/lib/typescript/src/components/HeaderMedium.d.ts.map +0 -1
  320. package/lib/typescript/src/components/HeaderOverline.d.ts +0 -17
  321. package/lib/typescript/src/components/HeaderOverline.d.ts.map +0 -1
  322. package/lib/typescript/src/components/Image.d.ts +0 -5
  323. package/lib/typescript/src/components/Image.d.ts.map +0 -1
  324. package/lib/typescript/src/components/Justification.d.ts +0 -2
  325. package/lib/typescript/src/components/Justification.d.ts.map +0 -1
  326. package/lib/typescript/src/components/ProgressBar.d.ts +0 -35
  327. package/lib/typescript/src/components/ProgressBar.d.ts.map +0 -1
  328. package/lib/typescript/src/components/ProgressCircle.d.ts +0 -21
  329. package/lib/typescript/src/components/ProgressCircle.d.ts.map +0 -1
  330. package/lib/typescript/src/components/ProgressIndicator.d.ts +0 -24
  331. package/lib/typescript/src/components/ProgressIndicator.d.ts.map +0 -1
  332. package/lib/typescript/src/components/ResizeMode.d.ts +0 -2
  333. package/lib/typescript/src/components/ResizeMode.d.ts.map +0 -1
  334. package/lib/typescript/src/components/Row.d.ts +0 -21
  335. package/lib/typescript/src/components/Row.d.ts.map +0 -1
  336. package/lib/typescript/src/components/RowBodyIcon.d.ts +0 -16
  337. package/lib/typescript/src/components/RowBodyIcon.d.ts.map +0 -1
  338. package/lib/typescript/src/components/RowHeadlineImageCaption.d.ts +0 -16
  339. package/lib/typescript/src/components/RowHeadlineImageCaption.d.ts.map +0 -1
  340. package/lib/typescript/src/components/RowHeadlineImageIcon.d.ts +0 -18
  341. package/lib/typescript/src/components/RowHeadlineImageIcon.d.ts.map +0 -1
  342. package/lib/typescript/src/components/StepIndicator.d.ts +0 -54
  343. package/lib/typescript/src/components/StepIndicator.d.ts.map +0 -1
  344. package/lib/typescript/src/components/TabView/TabView.d.ts +0 -20
  345. package/lib/typescript/src/components/TabView/TabView.d.ts.map +0 -1
  346. package/lib/typescript/src/components/TabView/TabViewItem.d.ts +0 -11
  347. package/lib/typescript/src/components/TabView/TabViewItem.d.ts.map +0 -1
  348. package/lib/typescript/src/components/TabView/index.d.ts +0 -3
  349. package/lib/typescript/src/components/TabView/index.d.ts.map +0 -1
  350. package/lib/typescript/src/components/ToggleButton.d.ts +0 -25
  351. package/lib/typescript/src/components/ToggleButton.d.ts.map +0 -1
  352. package/lib/typescript/src/components/Typography.d.ts +0 -22
  353. package/lib/typescript/src/components/Typography.d.ts.map +0 -1
  354. package/lib/typescript/src/components/useAuthState.d.ts +0 -2
  355. package/lib/typescript/src/components/useAuthState.d.ts.map +0 -1
  356. package/lib/typescript/src/mappings/AvatarEdit.d.ts +0 -38
  357. package/lib/typescript/src/mappings/AvatarEdit.d.ts.map +0 -1
  358. package/lib/typescript/src/mappings/Banner.d.ts +0 -49
  359. package/lib/typescript/src/mappings/Banner.d.ts.map +0 -1
  360. package/lib/typescript/src/mappings/Card.d.ts +0 -114
  361. package/lib/typescript/src/mappings/Card.d.ts.map +0 -1
  362. package/lib/typescript/src/mappings/CardBlock.d.ts +0 -289
  363. package/lib/typescript/src/mappings/CardBlock.d.ts.map +0 -1
  364. package/lib/typescript/src/mappings/CardContainer.d.ts +0 -102
  365. package/lib/typescript/src/mappings/CardContainer.d.ts.map +0 -1
  366. package/lib/typescript/src/mappings/CardContainerRating.d.ts +0 -108
  367. package/lib/typescript/src/mappings/CardContainerRating.d.ts.map +0 -1
  368. package/lib/typescript/src/mappings/CardContainerShortImage.d.ts +0 -139
  369. package/lib/typescript/src/mappings/CardContainerShortImage.d.ts.map +0 -1
  370. package/lib/typescript/src/mappings/CardInline.d.ts +0 -62
  371. package/lib/typescript/src/mappings/CardInline.d.ts.map +0 -1
  372. package/lib/typescript/src/mappings/Carousel.d.ts +0 -34
  373. package/lib/typescript/src/mappings/Carousel.d.ts.map +0 -1
  374. package/lib/typescript/src/mappings/CircleImage.d.ts +0 -34
  375. package/lib/typescript/src/mappings/CircleImage.d.ts.map +0 -1
  376. package/lib/typescript/src/mappings/Container.d.ts +0 -55
  377. package/lib/typescript/src/mappings/Container.d.ts.map +0 -1
  378. package/lib/typescript/src/mappings/Divider.d.ts +0 -25
  379. package/lib/typescript/src/mappings/Divider.d.ts.map +0 -1
  380. package/lib/typescript/src/mappings/FAB.d.ts +0 -83
  381. package/lib/typescript/src/mappings/FAB.d.ts.map +0 -1
  382. package/lib/typescript/src/mappings/FieldSearchBarFull.d.ts +0 -56
  383. package/lib/typescript/src/mappings/FieldSearchBarFull.d.ts.map +0 -1
  384. package/lib/typescript/src/mappings/HeaderLarge.d.ts +0 -34
  385. package/lib/typescript/src/mappings/HeaderLarge.d.ts.map +0 -1
  386. package/lib/typescript/src/mappings/HeaderMedium.d.ts +0 -53
  387. package/lib/typescript/src/mappings/HeaderMedium.d.ts.map +0 -1
  388. package/lib/typescript/src/mappings/HeaderOverline.d.ts +0 -53
  389. package/lib/typescript/src/mappings/HeaderOverline.d.ts.map +0 -1
  390. package/lib/typescript/src/mappings/ProgressBar.d.ts +0 -99
  391. package/lib/typescript/src/mappings/ProgressBar.d.ts.map +0 -1
  392. package/lib/typescript/src/mappings/ProgressCircle.d.ts +0 -109
  393. package/lib/typescript/src/mappings/ProgressCircle.d.ts.map +0 -1
  394. package/lib/typescript/src/mappings/ProgressIndicator.d.ts +0 -181
  395. package/lib/typescript/src/mappings/ProgressIndicator.d.ts.map +0 -1
  396. package/lib/typescript/src/mappings/RowBodyIcon.d.ts +0 -73
  397. package/lib/typescript/src/mappings/RowBodyIcon.d.ts.map +0 -1
  398. package/lib/typescript/src/mappings/RowHeadlineImageCaption.d.ts +0 -166
  399. package/lib/typescript/src/mappings/RowHeadlineImageCaption.d.ts.map +0 -1
  400. package/lib/typescript/src/mappings/RowHeadlineImageIcon.d.ts +0 -170
  401. package/lib/typescript/src/mappings/RowHeadlineImageIcon.d.ts.map +0 -1
  402. package/lib/typescript/src/mappings/TabView.d.ts +0 -112
  403. package/lib/typescript/src/mappings/TabView.d.ts.map +0 -1
  404. package/lib/typescript/src/mappings/ToggleButton.d.ts +0 -116
  405. package/lib/typescript/src/mappings/ToggleButton.d.ts.map +0 -1
  406. package/src/components/AnimatedCircularProgress.js +0 -43
  407. package/src/components/AnimatedCircularProgress.tsx +0 -101
  408. package/src/components/AspectRatio.js +0 -18
  409. package/src/components/AspectRatio.tsx +0 -40
  410. package/src/components/AvatarEdit.js +0 -30
  411. package/src/components/AvatarEdit.tsx +0 -64
  412. package/src/components/Banner.js +0 -109
  413. package/src/components/Banner.tsx +0 -204
  414. package/src/components/Card.js +0 -57
  415. package/src/components/Card.tsx +0 -161
  416. package/src/components/CardBlock.js +0 -54
  417. package/src/components/CardBlock.tsx +0 -127
  418. package/src/components/CardContainer.js +0 -69
  419. package/src/components/CardContainer.tsx +0 -165
  420. package/src/components/CardContainerRating.js +0 -79
  421. package/src/components/CardContainerRating.tsx +0 -175
  422. package/src/components/CardContainerShortImage.js +0 -33
  423. package/src/components/CardContainerShortImage.tsx +0 -101
  424. package/src/components/CardInline.js +0 -36
  425. package/src/components/CardInline.tsx +0 -93
  426. package/src/components/Carousel.js +0 -68
  427. package/src/components/Carousel.tsx +0 -134
  428. package/src/components/CircleImage.js +0 -8
  429. package/src/components/CircleImage.tsx +0 -33
  430. package/src/components/CircularProgress.js +0 -81
  431. package/src/components/CircularProgress.tsx +0 -188
  432. package/src/components/Container.js +0 -43
  433. package/src/components/Container.tsx +0 -116
  434. package/src/components/DeprecatedCardWrapper.js +0 -18
  435. package/src/components/DeprecatedCardWrapper.tsx +0 -46
  436. package/src/components/DeprecatedFAB.js +0 -115
  437. package/src/components/DeprecatedFAB.tsx +0 -231
  438. package/src/components/Divider.js +0 -13
  439. package/src/components/Divider.tsx +0 -32
  440. package/src/components/FAB.js +0 -46
  441. package/src/components/FAB.tsx +0 -108
  442. package/src/components/FieldSearchBarFull.js +0 -53
  443. package/src/components/FieldSearchBarFull.tsx +0 -126
  444. package/src/components/Header.js +0 -44
  445. package/src/components/Header.tsx +0 -105
  446. package/src/components/HeaderLarge.js +0 -7
  447. package/src/components/HeaderLarge.tsx +0 -40
  448. package/src/components/HeaderMedium.js +0 -7
  449. package/src/components/HeaderMedium.tsx +0 -41
  450. package/src/components/HeaderOverline.js +0 -7
  451. package/src/components/HeaderOverline.tsx +0 -42
  452. package/src/components/Image.js +0 -47
  453. package/src/components/Image.tsx +0 -91
  454. package/src/components/Justification.js +0 -1
  455. package/src/components/Justification.ts +0 -8
  456. package/src/components/ProgressBar.js +0 -118
  457. package/src/components/ProgressBar.tsx +0 -191
  458. package/src/components/ProgressCircle.js +0 -13
  459. package/src/components/ProgressCircle.tsx +0 -64
  460. package/src/components/ProgressIndicator.js +0 -27
  461. package/src/components/ProgressIndicator.tsx +0 -71
  462. package/src/components/ResizeMode.js +0 -1
  463. package/src/components/ResizeMode.ts +0 -7
  464. package/src/components/Row.js +0 -48
  465. package/src/components/Row.tsx +0 -108
  466. package/src/components/RowBodyIcon.js +0 -8
  467. package/src/components/RowBodyIcon.tsx +0 -47
  468. package/src/components/RowHeadlineImageCaption.js +0 -12
  469. package/src/components/RowHeadlineImageCaption.tsx +0 -49
  470. package/src/components/RowHeadlineImageIcon.js +0 -14
  471. package/src/components/RowHeadlineImageIcon.tsx +0 -61
  472. package/src/components/StepIndicator.js +0 -346
  473. package/src/components/StepIndicator.tsx +0 -494
  474. package/src/components/TabView/TabView.js +0 -34
  475. package/src/components/TabView/TabView.tsx +0 -97
  476. package/src/components/TabView/TabViewItem.js +0 -5
  477. package/src/components/TabView/TabViewItem.tsx +0 -21
  478. package/src/components/TabView/index.js +0 -2
  479. package/src/components/TabView/index.tsx +0 -2
  480. package/src/components/ToggleButton.js +0 -39
  481. package/src/components/ToggleButton.tsx +0 -94
  482. package/src/components/Typography.js +0 -36
  483. package/src/components/Typography.tsx +0 -67
  484. package/src/components/useAuthState.js +0 -31
  485. package/src/components/useAuthState.tsx +0 -38
  486. package/src/mappings/AvatarEdit.js +0 -38
  487. package/src/mappings/AvatarEdit.ts +0 -45
  488. package/src/mappings/Banner.js +0 -32
  489. package/src/mappings/Banner.ts +0 -40
  490. package/src/mappings/Card.js +0 -52
  491. package/src/mappings/Card.ts +0 -64
  492. package/src/mappings/CardBlock.js +0 -123
  493. package/src/mappings/CardBlock.ts +0 -136
  494. package/src/mappings/CardContainer.js +0 -104
  495. package/src/mappings/CardContainer.ts +0 -116
  496. package/src/mappings/CardContainerRating.js +0 -126
  497. package/src/mappings/CardContainerRating.ts +0 -137
  498. package/src/mappings/CardContainerShortImage.js +0 -120
  499. package/src/mappings/CardContainerShortImage.ts +0 -130
  500. package/src/mappings/CardInline.js +0 -52
  501. package/src/mappings/CardInline.ts +0 -61
  502. package/src/mappings/Carousel.js +0 -19
  503. package/src/mappings/Carousel.ts +0 -25
  504. package/src/mappings/CircleImage.js +0 -25
  505. package/src/mappings/CircleImage.ts +0 -33
  506. package/src/mappings/Container.js +0 -30
  507. package/src/mappings/Container.ts +0 -41
  508. package/src/mappings/Divider.js +0 -27
  509. package/src/mappings/Divider.ts +0 -34
  510. package/src/mappings/FAB.js +0 -37
  511. package/src/mappings/FAB.ts +0 -48
  512. package/src/mappings/FieldSearchBarFull.js +0 -50
  513. package/src/mappings/FieldSearchBarFull.ts +0 -59
  514. package/src/mappings/HeaderLarge.js +0 -29
  515. package/src/mappings/HeaderLarge.ts +0 -38
  516. package/src/mappings/HeaderMedium.js +0 -55
  517. package/src/mappings/HeaderMedium.ts +0 -63
  518. package/src/mappings/HeaderOverline.js +0 -55
  519. package/src/mappings/HeaderOverline.ts +0 -63
  520. package/src/mappings/ProgressBar.js +0 -101
  521. package/src/mappings/ProgressBar.ts +0 -110
  522. package/src/mappings/ProgressCircle.js +0 -109
  523. package/src/mappings/ProgressCircle.ts +0 -117
  524. package/src/mappings/ProgressIndicator.js +0 -181
  525. package/src/mappings/ProgressIndicator.ts +0 -190
  526. package/src/mappings/RowBodyIcon.js +0 -75
  527. package/src/mappings/RowBodyIcon.ts +0 -82
  528. package/src/mappings/RowHeadlineImageCaption.js +0 -167
  529. package/src/mappings/RowHeadlineImageCaption.ts +0 -178
  530. package/src/mappings/RowHeadlineImageIcon.js +0 -99
  531. package/src/mappings/RowHeadlineImageIcon.ts +0 -116
  532. package/src/mappings/TabView.js +0 -73
  533. package/src/mappings/TabView.ts +0 -80
  534. package/src/mappings/ToggleButton.js +0 -50
  535. package/src/mappings/ToggleButton.ts +0 -63
@@ -1,386 +0,0 @@
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
- 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); }
10
- 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; }
11
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
12
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
13
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
14
- const STEP_STATUS = {
15
- CURRENT: "current",
16
- FINISHED: "finished",
17
- UNFINISHED: "unfinished"
18
- };
19
- class StepIndicator extends _react.Component {
20
- constructor(props) {
21
- super(props);
22
- _defineProperty(this, "renderProgressBarBackground", () => {
23
- const {
24
- stepCount,
25
- direction
26
- } = this.props;
27
- let progressBarBackgroundStyle;
28
- if (direction === "vertical") {
29
- progressBarBackgroundStyle = {
30
- backgroundColor: this.state.customStyles.separatorUnFinishedColor,
31
- position: "absolute",
32
- left: (this.state.width - this.state.customStyles.separatorStrokeWidth) / 2,
33
- top: this.state.height / (2 * stepCount),
34
- bottom: this.state.height / (2 * stepCount),
35
- width: this.state.customStyles.separatorStrokeUnfinishedWidth === 0 ? this.state.customStyles.separatorStrokeWidth : this.state.customStyles.separatorStrokeUnfinishedWidth
36
- };
37
- } else {
38
- progressBarBackgroundStyle = {
39
- backgroundColor: this.state.customStyles.separatorUnFinishedColor,
40
- position: "absolute",
41
- top: (this.state.height - this.state.customStyles.separatorStrokeWidth) / 2,
42
- left: this.state.width / (2 * stepCount),
43
- right: this.state.width / (2 * stepCount),
44
- height: this.state.customStyles.separatorStrokeUnfinishedWidth === 0 ? this.state.customStyles.separatorStrokeWidth : this.state.customStyles.separatorStrokeUnfinishedWidth
45
- };
46
- }
47
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
48
- onLayout: event => {
49
- if (direction === "vertical") {
50
- this.setState({
51
- progressBarSize: event.nativeEvent.layout.height
52
- }, () => {
53
- this.onCurrentPositionChanged(this.props.currentPosition);
54
- });
55
- } else {
56
- this.setState({
57
- progressBarSize: event.nativeEvent.layout.width
58
- }, () => {
59
- this.onCurrentPositionChanged(this.props.currentPosition);
60
- });
61
- }
62
- },
63
- style: progressBarBackgroundStyle
64
- });
65
- });
66
- _defineProperty(this, "renderProgressBar", () => {
67
- const {
68
- stepCount,
69
- direction
70
- } = this.props;
71
- let progressBarStyle;
72
- if (direction === "vertical") {
73
- progressBarStyle = {
74
- backgroundColor: this.state.customStyles.separatorFinishedColor,
75
- position: "absolute",
76
- left: (this.state.width - this.state.customStyles.separatorStrokeWidth) / 2,
77
- top: this.state.height / (2 * stepCount),
78
- bottom: this.state.height / (2 * stepCount),
79
- width: this.state.customStyles.separatorStrokeFinishedWidth === 0 ? this.state.customStyles.separatorStrokeWidth : this.state.customStyles.separatorStrokeFinishedWidth,
80
- height: this.progressAnim
81
- };
82
- } else {
83
- progressBarStyle = {
84
- backgroundColor: this.state.customStyles.separatorFinishedColor,
85
- position: "absolute",
86
- top: (this.state.height - this.state.customStyles.separatorStrokeWidth) / 2,
87
- left: this.state.width / (2 * stepCount),
88
- right: this.state.width / (2 * stepCount),
89
- height: this.state.customStyles.separatorStrokeFinishedWidth === 0 ? this.state.customStyles.separatorStrokeWidth : this.state.customStyles.separatorStrokeFinishedWidth,
90
- width: this.progressAnim
91
- };
92
- }
93
- return /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
94
- style: progressBarStyle
95
- });
96
- });
97
- _defineProperty(this, "renderStepIndicator", () => {
98
- let steps = [];
99
- const {
100
- stepCount,
101
- direction
102
- } = this.props;
103
- for (let position = 0; position < stepCount; position++) {
104
- steps.push( /*#__PURE__*/_react.default.createElement(_reactNative.TouchableWithoutFeedback, {
105
- key: position,
106
- onPress: () => this.stepPressed(position)
107
- }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
108
- style: [styles.stepContainer, direction === "vertical" ? {
109
- flexDirection: "column"
110
- } : {
111
- flexDirection: "row"
112
- }]
113
- }, this.renderStep(position))));
114
- }
115
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
116
- onLayout: event => this.setState({
117
- width: event.nativeEvent.layout.width,
118
- height: event.nativeEvent.layout.height
119
- }),
120
- style: [styles.stepIndicatorContainer, direction === "vertical" ? {
121
- flexDirection: "column",
122
- width: this.state.customStyles.currentStepIndicatorSize
123
- } : {
124
- flexDirection: "row",
125
- height: this.state.customStyles.currentStepIndicatorSize
126
- }]
127
- }, steps);
128
- });
129
- _defineProperty(this, "renderStepLabels", () => {
130
- const {
131
- labels,
132
- direction,
133
- currentPosition,
134
- renderLabel
135
- } = this.props;
136
- var labelViews = labels.map((label, index) => {
137
- const selectedStepLabelStyle = index === currentPosition ? {
138
- color: this.state.customStyles.currentStepLabelColor
139
- } : {
140
- color: this.state.customStyles.labelColor
141
- };
142
- return /*#__PURE__*/_react.default.createElement(_reactNative.TouchableWithoutFeedback, {
143
- style: styles.stepLabelItem,
144
- key: index,
145
- onPress: () => this.stepPressed(index)
146
- }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
147
- style: styles.stepLabelItem
148
- }, renderLabel ? renderLabel({
149
- position: index,
150
- stepStatus: this.getStepStatus(index),
151
- label,
152
- currentPosition
153
- }) : /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
154
- style: [styles.stepLabel, selectedStepLabelStyle, {
155
- fontSize: this.state.customStyles.labelSize,
156
- fontFamily: this.state.customStyles.labelFontFamily
157
- }]
158
- }, label)));
159
- });
160
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
161
- style: [styles.stepLabelsContainer, direction === "vertical" ? {
162
- flexDirection: "column",
163
- paddingHorizontal: 4
164
- } : {
165
- flexDirection: "row",
166
- paddingVertical: 4
167
- }, {
168
- alignItems: this.state.customStyles.labelAlign
169
- }]
170
- }, labelViews);
171
- });
172
- _defineProperty(this, "renderStep", position => {
173
- const {
174
- renderStepIndicator
175
- } = this.props;
176
- let stepStyle;
177
- let indicatorLabelStyle;
178
- switch (this.getStepStatus(position)) {
179
- case STEP_STATUS.CURRENT:
180
- {
181
- stepStyle = {
182
- backgroundColor: this.state.customStyles.stepIndicatorCurrentColor,
183
- borderWidth: this.state.customStyles.currentStepStrokeWidth,
184
- borderColor: this.state.customStyles.stepStrokeCurrentColor,
185
- height: this.sizeAnim,
186
- width: this.sizeAnim,
187
- borderRadius: this.borderRadiusAnim
188
- };
189
- indicatorLabelStyle = {
190
- fontSize: this.state.customStyles.currentStepIndicatorLabelFontSize,
191
- color: this.state.customStyles.stepIndicatorLabelCurrentColor
192
- };
193
- break;
194
- }
195
- case STEP_STATUS.FINISHED:
196
- {
197
- stepStyle = {
198
- backgroundColor: this.state.customStyles.stepIndicatorFinishedColor,
199
- borderWidth: this.state.customStyles.stepStrokeWidth,
200
- borderColor: this.state.customStyles.stepStrokeFinishedColor,
201
- height: this.state.customStyles.stepIndicatorSize,
202
- width: this.state.customStyles.stepIndicatorSize,
203
- borderRadius: this.state.customStyles.stepIndicatorSize / 2
204
- };
205
- indicatorLabelStyle = {
206
- fontSize: this.state.customStyles.stepIndicatorLabelFontSize,
207
- color: this.state.customStyles.stepIndicatorLabelFinishedColor
208
- };
209
- break;
210
- }
211
- case STEP_STATUS.UNFINISHED:
212
- {
213
- stepStyle = {
214
- backgroundColor: this.state.customStyles.stepIndicatorUnFinishedColor,
215
- borderWidth: this.state.customStyles.stepStrokeWidth,
216
- borderColor: this.state.customStyles.stepStrokeUnFinishedColor,
217
- height: this.state.customStyles.stepIndicatorSize,
218
- width: this.state.customStyles.stepIndicatorSize,
219
- borderRadius: this.state.customStyles.stepIndicatorSize / 2
220
- };
221
- indicatorLabelStyle = {
222
- overflow: "hidden",
223
- fontSize: this.state.customStyles.stepIndicatorLabelFontSize,
224
- color: this.state.customStyles.stepIndicatorLabelUnFinishedColor
225
- };
226
- break;
227
- }
228
- default:
229
- }
230
- return /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
231
- key: "step-indicator",
232
- style: [styles.step, stepStyle]
233
- }, renderStepIndicator ? renderStepIndicator({
234
- position,
235
- stepStatus: this.getStepStatus(position)
236
- }) : /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
237
- style: indicatorLabelStyle
238
- }, `${position + 1}`));
239
- });
240
- _defineProperty(this, "getStepStatus", stepPosition => {
241
- const {
242
- currentPosition
243
- } = this.props;
244
- if (stepPosition === currentPosition) {
245
- return STEP_STATUS.CURRENT;
246
- } else if (stepPosition < currentPosition) {
247
- return STEP_STATUS.FINISHED;
248
- } else {
249
- return STEP_STATUS.UNFINISHED;
250
- }
251
- });
252
- _defineProperty(this, "onCurrentPositionChanged", position => {
253
- let {
254
- stepCount
255
- } = this.props;
256
- if (position > stepCount - 1) {
257
- position = stepCount - 1;
258
- }
259
- const animateToPosition = this.state.progressBarSize / (stepCount - 1) * position;
260
- this.sizeAnim.setValue(this.state.customStyles.stepIndicatorSize);
261
- this.borderRadiusAnim.setValue(this.state.customStyles.stepIndicatorSize / 2);
262
- _reactNative.Animated.sequence([_reactNative.Animated.timing(this.progressAnim, {
263
- toValue: animateToPosition,
264
- duration: 200
265
- }), _reactNative.Animated.parallel([_reactNative.Animated.timing(this.sizeAnim, {
266
- toValue: this.state.customStyles.currentStepIndicatorSize,
267
- duration: 100
268
- }), _reactNative.Animated.timing(this.borderRadiusAnim, {
269
- toValue: this.state.customStyles.currentStepIndicatorSize / 2,
270
- duration: 100
271
- })])]).start();
272
- });
273
- const defaultStyles = {
274
- stepIndicatorSize: 30,
275
- currentStepIndicatorSize: 40,
276
- separatorStrokeWidth: 3,
277
- separatorStrokeUnfinishedWidth: 0,
278
- separatorStrokeFinishedWidth: 0,
279
- currentStepStrokeWidth: 5,
280
- stepStrokeWidth: 0,
281
- stepStrokeCurrentColor: "#4aae4f",
282
- stepStrokeFinishedColor: "#4aae4f",
283
- stepStrokeUnFinishedColor: "#4aae4f",
284
- separatorFinishedColor: "#4aae4f",
285
- separatorUnFinishedColor: "#a4d4a5",
286
- stepIndicatorFinishedColor: "#4aae4f",
287
- stepIndicatorUnFinishedColor: "#a4d4a5",
288
- stepIndicatorCurrentColor: "#ffffff",
289
- stepIndicatorLabelFontSize: 15,
290
- currentStepIndicatorLabelFontSize: 15,
291
- stepIndicatorLabelCurrentColor: "#000000",
292
- stepIndicatorLabelFinishedColor: "#ffffff",
293
- stepIndicatorLabelUnFinishedColor: "rgba(255,255,255,0.5)",
294
- labelColor: "#000000",
295
- labelSize: 13,
296
- labelAlign: "center",
297
- currentStepLabelColor: "#4aae4f"
298
- };
299
- const customStyles = Object.assign(defaultStyles, props.customStyles);
300
- this.state = {
301
- width: 0,
302
- height: 1,
303
- progressBarSize: -2,
304
- customStyles
305
- };
306
- this.progressAnim = new _reactNative.Animated.Value(0);
307
- this.sizeAnim = new _reactNative.Animated.Value(this.state.customStyles.stepIndicatorSize);
308
- this.borderRadiusAnim = new _reactNative.Animated.Value(this.state.customStyles.stepIndicatorSize / 2);
309
- }
310
- stepPressed(position) {
311
- if (this.props.onPress) {
312
- this.props.onPress(position);
313
- }
314
- }
315
- render() {
316
- const {
317
- labels,
318
- direction
319
- } = this.props;
320
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
321
- style: [styles.container, direction === "vertical" ? {
322
- flexDirection: "row",
323
- flex: 1
324
- } : {
325
- flexDirection: "column"
326
- }]
327
- }, this.state.width !== 0 && this.renderProgressBarBackground(), this.state.width !== 0 && this.renderProgressBar(), this.renderStepIndicator(), labels && this.renderStepLabels());
328
- }
329
- componentDidUpdate(prevProps) {
330
- // if (prevProps.customStyles !== this.props.customStyles) {
331
- // this.setState((state) => ({
332
- // customStyles: Object.assign(
333
- // state.customStyles,
334
- // this.props.customStyles
335
- // ),
336
- // }));
337
- // }
338
-
339
- if (prevProps.currentPosition !== this.props.currentPosition) {
340
- this.onCurrentPositionChanged(this.props.currentPosition);
341
- }
342
- }
343
- }
344
- exports.default = StepIndicator;
345
- const styles = _reactNative.StyleSheet.create({
346
- container: {
347
- backgroundColor: "transparent"
348
- },
349
- stepIndicatorContainer: {
350
- flexDirection: "row",
351
- alignItems: "center",
352
- justifyContent: "space-around",
353
- backgroundColor: "transparent"
354
- },
355
- stepLabelsContainer: {
356
- justifyContent: "space-around"
357
- },
358
- step: {
359
- alignItems: "center",
360
- justifyContent: "center",
361
- zIndex: 2
362
- },
363
- stepContainer: {
364
- flex: 1,
365
- flexDirection: "row",
366
- alignItems: "center",
367
- justifyContent: "center"
368
- },
369
- stepLabel: {
370
- fontSize: 12,
371
- textAlign: "center",
372
- fontWeight: "500"
373
- },
374
- stepLabelItem: {
375
- flex: 1,
376
- alignItems: "center",
377
- justifyContent: "center"
378
- }
379
- });
380
- StepIndicator.defaultProps = {
381
- currentPosition: 0,
382
- stepCount: 5,
383
- customStyles: {},
384
- direction: "horizontal"
385
- };
386
- //# sourceMappingURL=StepIndicator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["STEP_STATUS","CURRENT","FINISHED","UNFINISHED","StepIndicator","Component","constructor","props","stepCount","direction","progressBarBackgroundStyle","backgroundColor","state","customStyles","separatorUnFinishedColor","position","left","width","separatorStrokeWidth","top","height","bottom","separatorStrokeUnfinishedWidth","right","event","setState","progressBarSize","nativeEvent","layout","onCurrentPositionChanged","currentPosition","progressBarStyle","separatorFinishedColor","separatorStrokeFinishedWidth","progressAnim","steps","push","stepPressed","styles","stepContainer","flexDirection","renderStep","stepIndicatorContainer","currentStepIndicatorSize","labels","renderLabel","labelViews","map","label","index","selectedStepLabelStyle","color","currentStepLabelColor","labelColor","stepLabelItem","stepStatus","getStepStatus","stepLabel","fontSize","labelSize","fontFamily","labelFontFamily","stepLabelsContainer","paddingHorizontal","paddingVertical","alignItems","labelAlign","renderStepIndicator","stepStyle","indicatorLabelStyle","stepIndicatorCurrentColor","borderWidth","currentStepStrokeWidth","borderColor","stepStrokeCurrentColor","sizeAnim","borderRadius","borderRadiusAnim","currentStepIndicatorLabelFontSize","stepIndicatorLabelCurrentColor","stepIndicatorFinishedColor","stepStrokeWidth","stepStrokeFinishedColor","stepIndicatorSize","stepIndicatorLabelFontSize","stepIndicatorLabelFinishedColor","stepIndicatorUnFinishedColor","stepStrokeUnFinishedColor","overflow","stepIndicatorLabelUnFinishedColor","step","stepPosition","animateToPosition","setValue","Animated","sequence","timing","toValue","duration","parallel","start","defaultStyles","Object","assign","Value","onPress","render","container","flex","renderProgressBarBackground","renderProgressBar","renderStepLabels","componentDidUpdate","prevProps","StyleSheet","create","justifyContent","zIndex","textAlign","fontWeight","defaultProps"],"sourceRoot":"../../src","sources":["StepIndicator.tsx"],"mappings":";;;;;;AACA;AACA;AAMsB;AAAA;AAAA;AAAA;AAAA;AAEtB,MAAMA,WAAW,GAAG;EAClBC,OAAO,EAAE,SAAS;EAClBC,QAAQ,EAAE,UAAU;EACpBC,UAAU,EAAE;AACd,CAAC;AA2Cc,MAAMC,aAAa,SAASC,gBAAS,CAAe;EACjEC,WAAW,CAACC,KAAY,EAAE;IACxB,KAAK,CAACA,KAAK,CAAC;IAAC,qDAuFe,MAAM;MAClC,MAAM;QAAEC,SAAS;QAAEC;MAAU,CAAC,GAAG,IAAI,CAACF,KAAK;MAC3C,IAAIG,0BAA0B;MAC9B,IAAID,SAAS,KAAK,UAAU,EAAE;QAC5BC,0BAA0B,GAAG;UAC3BC,eAAe,EAAE,IAAI,CAACC,KAAK,CAACC,YAAY,CAACC,wBAAwB;UACjEC,QAAQ,EAAE,UAAU;UACpBC,IAAI,EACF,CAAC,IAAI,CAACJ,KAAK,CAACK,KAAK,GAAG,IAAI,CAACL,KAAK,CAACC,YAAY,CAACK,oBAAoB,IAAI,CAAC;UACvEC,GAAG,EAAE,IAAI,CAACP,KAAK,CAACQ,MAAM,IAAI,CAAC,GAAGZ,SAAS,CAAC;UACxCa,MAAM,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3B1F,eAAe,EAAE,CAAC;EAClBtB,SAAS,EAAE,CAAC;EACZK,YAAY,EAAE,CAAC,CAAC;EAChBJ,SAAS,EAAE;AACb,CAAC"}
@@ -1,88 +0,0 @@
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 _reactNativeTabView = require("react-native-tab-view");
9
- var _TabViewItem = _interopRequireDefault(require("./TabViewItem"));
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
- 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); }
12
- 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; }
13
- 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); }
14
- const TabViewComponent = _ref => {
15
- let {
16
- Icon,
17
- tabBarPosition,
18
- keyboardDismissMode,
19
- swipeEnabled,
20
- scrollEnabled,
21
- activeColor,
22
- inactiveColor,
23
- pressColor,
24
- indicatorColor,
25
- style,
26
- children
27
- } = _ref;
28
- const [index, setIndex] = React.useState(0);
29
- const [routes, setRoutes] = React.useState([]);
30
- const [tabScenes, setTabScenes] = React.useState({});
31
- React.useEffect(() => {
32
- const newRoutes = [];
33
- const scenes = {};
34
- React.Children.toArray(children).filter(child => child.type === _TabViewItem.default).forEach(child => {
35
- var _child$props;
36
- if (child !== null && child !== void 0 && (_child$props = child.props) !== null && _child$props !== void 0 && _child$props.id) {
37
- var _child$props2, _child$props3;
38
- newRoutes.push({
39
- key: child === null || child === void 0 ? void 0 : (_child$props2 = child.props) === null || _child$props2 === void 0 ? void 0 : _child$props2.id,
40
- ...(child === null || child === void 0 ? void 0 : child.props)
41
- });
42
- scenes[child === null || child === void 0 ? void 0 : (_child$props3 = child.props) === null || _child$props3 === void 0 ? void 0 : _child$props3.id] = () => child;
43
- }
44
- });
45
- setRoutes(newRoutes);
46
- setTabScenes(scenes);
47
- }, [children]);
48
- const indexChangeHandler = i => setIndex(i);
49
- const renderTabBar = props => {
50
- console.log(props);
51
- return /*#__PURE__*/React.createElement(_reactNativeTabView.TabBar, _extends({}, props, {
52
- activeColor: activeColor,
53
- inactiveColor: inactiveColor,
54
- pressColor: pressColor,
55
- scrollEnabled: scrollEnabled,
56
- indicatorStyle: {
57
- backgroundColor: indicatorColor
58
- },
59
- renderIcon: _ref2 => {
60
- let {
61
- route,
62
- color
63
- } = _ref2;
64
- return route !== null && route !== void 0 && route.icon ? /*#__PURE__*/React.createElement(Icon, {
65
- name: route.icon,
66
- color: color,
67
- size: 36
68
- }) : null;
69
- },
70
- style: style
71
- }));
72
- };
73
- return /*#__PURE__*/React.createElement(_reactNativeTabView.TabView, {
74
- navigationState: {
75
- index,
76
- routes
77
- },
78
- renderScene: (0, _reactNativeTabView.SceneMap)(tabScenes),
79
- renderTabBar: renderTabBar,
80
- onIndexChange: indexChangeHandler,
81
- tabBarPosition: tabBarPosition,
82
- keyboardDismissMode: keyboardDismissMode,
83
- swipeEnabled: swipeEnabled
84
- });
85
- };
86
- var _default = TabViewComponent;
87
- exports.default = _default;
88
- //# sourceMappingURL=TabView.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["TabViewComponent","Icon","tabBarPosition","keyboardDismissMode","swipeEnabled","scrollEnabled","activeColor","inactiveColor","pressColor","indicatorColor","style","children","index","setIndex","React","useState","routes","setRoutes","tabScenes","setTabScenes","useEffect","newRoutes","scenes","Children","toArray","filter","child","type","TabViewItem","forEach","props","id","push","key","indexChangeHandler","i","renderTabBar","console","log","backgroundColor","route","color","icon","SceneMap"],"sourceRoot":"../../src","sources":["TabView.tsx"],"mappings":";;;;;;AAAA;AAEA;AAGA;AAAwC;AAAA;AAAA;AAAA;AAmBxC,MAAMA,gBAAgB,GAAG,QAYL;EAAA,IAZM;IACxBC,IAAI;IACJC,cAAc;IACdC,mBAAmB;IACnBC,YAAY;IACZC,aAAa;IACbC,WAAW;IACXC,aAAa;IACbC,UAAU;IACVC,cAAc;IACdC,KAAK;IACLC;EACY,CAAC;EACb,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGC,KAAK,CAACC,QAAQ,CAAC,CAAC,CAAC;EAC3C,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGH,KAAK,CAACC,QAAQ,CAAC,EAAE,CAAC;EAC9C,MAAM,CAACG,SAAS,EAAEC,YAAY,CAAC,GAAGL,KAAK,CAACC,QAAQ,CAAC,CAAC,CAAC,CAAC;EAEpDD,KAAK,CAACM,SAAS,CAAC,MAAM;IACpB,MAAMC,SAAc,GAAG,EAAE;IACzB,MAAMC,MAAW,GAAG,CAAC,CAAC;IAEtBR,KAAK,CAACS,QAAQ,CAACC,OAAO,CAACb,QAAQ,CAAC,CAC7Bc,MAAM,CAAEC,KAAU,IAAKA,KAAK,CAACC,IAAI,KAAKC,oBAAW,CAAC,CAClDC,OAAO,CAAEH,KAAU,IAAK;MAAA;MACvB,IAAIA,KAAK,a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AAE,IAAA2B,4BAAQ,EAACzB,SAAS,CAAE;IACjC,YAAY,EAAEkB,YAAa;IAC3B,aAAa,EAAEF,kBAAmB;IAClC,cAAc,EAAEhC,cAAe;IAC/B,mBAAmB,EAAEC,mBAAoB;IACzC,YAAY,EAAEC;EAAa,EAC3B;AAEN,CAAC;AAAC,eAEaJ,gBAAgB;AAAA"}
@@ -1,25 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- const TabViewItem = _ref => {
8
- let {
9
- title,
10
- id,
11
- icon,
12
- children,
13
- accessibilityLabel
14
- } = _ref;
15
- console.log({
16
- title,
17
- id,
18
- icon,
19
- accessibilityLabel
20
- });
21
- return children;
22
- };
23
- var _default = TabViewItem;
24
- exports.default = _default;
25
- //# sourceMappingURL=TabViewItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["TabViewItem","title","id","icon","children","accessibilityLabel","console","log"],"sourceRoot":"../../src","sources":["TabViewItem.tsx"],"mappings":";;;;;;AASA,MAAMA,WAAW,GAAG,QAMI;EAAA,IANH;IACnBC,KAAK;IACLC,EAAE;IACFC,IAAI;IACJC,QAAQ;IACRC;EACgB,CAAC;EACjBC,OAAO,CAACC,GAAG,CAAC;IAAEN,KAAK;IAAEC,EAAE;IAAEC,IAAI;IAAEE;EAAmB,CAAC,CAAC;EACpD,OAAOD,QAAQ;AACjB,CAAC;AAAC,eAEaJ,WAAW;AAAA"}
@@ -1,21 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "TabView", {
7
- enumerable: true,
8
- get: function () {
9
- return _TabView.default;
10
- }
11
- });
12
- Object.defineProperty(exports, "TabViewItem", {
13
- enumerable: true,
14
- get: function () {
15
- return _TabViewItem.default;
16
- }
17
- });
18
- var _TabView = _interopRequireDefault(require("./TabView"));
19
- var _TabViewItem = _interopRequireDefault(require("./TabViewItem"));
20
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AACA;AAAuD"}
@@ -1,72 +0,0 @@
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 _theming = require("../theming");
9
- var _reactNative = require("react-native");
10
- var _IconButton = _interopRequireDefault(require("./IconButton"));
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
- 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); }
13
- 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; }
14
- 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); }
15
- const ToggleButton = _ref => {
16
- let {
17
- Icon,
18
- icon,
19
- toggled = false,
20
- onPress = () => {},
21
- defaultValue,
22
- disabled = false,
23
- color = "primary",
24
- colorSecondary = "surface",
25
- borderColor = "divider",
26
- iconSize = 25,
27
- width = 50,
28
- height = 50,
29
- theme: {
30
- colors
31
- },
32
- style,
33
- ...rest
34
- } = _ref;
35
- const [internalValue, setInternalValue] = React.useState(toggled || defaultValue || false);
36
- React.useEffect(() => {
37
- if (toggled != null) {
38
- setInternalValue(toggled);
39
- }
40
- }, [toggled]);
41
- React.useEffect(() => {
42
- if (defaultValue != null) {
43
- setInternalValue(defaultValue);
44
- }
45
- }, [defaultValue]);
46
- const handlePress = () => {
47
- setInternalValue(!internalValue);
48
- onPress(!internalValue);
49
- };
50
- return /*#__PURE__*/React.createElement(_IconButton.default, _extends({
51
- Icon: Icon,
52
- icon: icon,
53
- size: iconSize,
54
- color: internalValue ? colors[color] : colors[colorSecondary],
55
- onPress: handlePress,
56
- disabled: disabled,
57
- style: [styles.mainContainer, {
58
- width,
59
- height,
60
- backgroundColor: internalValue ? colors[colorSecondary] : colors[color],
61
- borderColor: colors[borderColor]
62
- }, style]
63
- }, rest));
64
- };
65
- const styles = _reactNative.StyleSheet.create({
66
- mainContainer: {
67
- borderWidth: 1
68
- }
69
- });
70
- var _default = (0, _theming.withTheme)(ToggleButton);
71
- exports.default = _default;
72
- //# sourceMappingURL=ToggleButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["ToggleButton","Icon","icon","toggled","onPress","defaultValue","disabled","color","colorSecondary","borderColor","iconSize","width","height","theme","colors","style","rest","internalValue","setInternalValue","React","useState","useEffect","handlePress","styles","mainContainer","backgroundColor","StyleSheet","create","borderWidth","withTheme"],"sourceRoot":"../../src","sources":["ToggleButton.tsx"],"mappings":";;;;;;AAAA;AACA;AAEA;AACA;AAAsC;AAAA;AAAA;AAAA;AAoBtC,MAAMA,YAAsD,GAAG,QAgBzD;EAAA,IAhB0D;IAC9DC,IAAI;IACJC,IAAI;IACJC,OA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