@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,494 +0,0 @@
1
- // @ts-nocheck
2
- import React, { Component } from "react";
3
- import {
4
- View,
5
- Text,
6
- StyleSheet,
7
- Animated,
8
- TouchableWithoutFeedback,
9
- } from "react-native";
10
-
11
- const STEP_STATUS = {
12
- CURRENT: "current",
13
- FINISHED: "finished",
14
- UNFINISHED: "unfinished",
15
- };
16
-
17
- interface CustomStyles {
18
- stepIndicatorSize?: number;
19
- currentStepIndicatorSize?: number;
20
- separatorStrokeWidth?: number;
21
- separatorStrokeUnfinishedWidth?: number;
22
- separatorStrokeFinishedWidth?: number;
23
- currentStepStrokeWidth: number;
24
- stepStrokeWidth?: number;
25
- stepStrokeCurrentColor?: string;
26
- stepStrokeFinishedColor: string;
27
- stepStrokeUnFinishedColor: string;
28
- separatorFinishedColor: string;
29
- separatorUnFinishedColor: string;
30
- stepIndicatorFinishedColor: string;
31
- stepIndicatorUnFinishedColor: string;
32
- stepIndicatorCurrentColor: string;
33
- stepIndicatorLabelFontSize: number;
34
- currentStepIndicatorLabelFontSize?: number;
35
- stepIndicatorLabelCurrentColor: string;
36
- stepIndicatorLabelFinishedColor: string;
37
- stepIndicatorLabelUnFinishedColor: string;
38
- labelColor?: string;
39
- labelSize?: number;
40
- labelAlign?: string;
41
- currentStepLabelColor?: string;
42
- labelFontFamily?: string;
43
- }
44
-
45
- type Props = {
46
- stepCount: number;
47
- currentPosition: number;
48
- customStyles: CustomStyles;
49
- };
50
-
51
- type State = {
52
- width: number;
53
- height: number;
54
- progressBarSize: number;
55
- customStyles: CustomStyles;
56
- };
57
-
58
- export default class StepIndicator extends Component<Props, State> {
59
- constructor(props: Props) {
60
- super(props);
61
-
62
- const defaultStyles = {
63
- stepIndicatorSize: 30,
64
- currentStepIndicatorSize: 40,
65
- separatorStrokeWidth: 3,
66
- separatorStrokeUnfinishedWidth: 0,
67
- separatorStrokeFinishedWidth: 0,
68
- currentStepStrokeWidth: 5,
69
- stepStrokeWidth: 0,
70
- stepStrokeCurrentColor: "#4aae4f",
71
- stepStrokeFinishedColor: "#4aae4f",
72
- stepStrokeUnFinishedColor: "#4aae4f",
73
- separatorFinishedColor: "#4aae4f",
74
- separatorUnFinishedColor: "#a4d4a5",
75
- stepIndicatorFinishedColor: "#4aae4f",
76
- stepIndicatorUnFinishedColor: "#a4d4a5",
77
- stepIndicatorCurrentColor: "#ffffff",
78
- stepIndicatorLabelFontSize: 15,
79
- currentStepIndicatorLabelFontSize: 15,
80
- stepIndicatorLabelCurrentColor: "#000000",
81
- stepIndicatorLabelFinishedColor: "#ffffff",
82
- stepIndicatorLabelUnFinishedColor: "rgba(255,255,255,0.5)",
83
- labelColor: "#000000",
84
- labelSize: 13,
85
- labelAlign: "center",
86
- currentStepLabelColor: "#4aae4f",
87
- };
88
-
89
- const customStyles = Object.assign(defaultStyles, props.customStyles);
90
-
91
- this.state = {
92
- width: 0,
93
- height: 1,
94
- progressBarSize: -2,
95
- customStyles,
96
- };
97
-
98
- this.progressAnim = new Animated.Value(0);
99
- this.sizeAnim = new Animated.Value(
100
- this.state.customStyles.stepIndicatorSize
101
- );
102
- this.borderRadiusAnim = new Animated.Value(
103
- this.state.customStyles.stepIndicatorSize / 2
104
- );
105
- }
106
-
107
- stepPressed(position) {
108
- if (this.props.onPress) {
109
- this.props.onPress(position);
110
- }
111
- }
112
-
113
- render() {
114
- const { labels, direction } = this.props;
115
- return (
116
- <View
117
- style={[
118
- styles.container,
119
- direction === "vertical"
120
- ? { flexDirection: "row", flex: 1 }
121
- : { flexDirection: "column" },
122
- ]}
123
- >
124
- {this.state.width !== 0 && this.renderProgressBarBackground()}
125
- {this.state.width !== 0 && this.renderProgressBar()}
126
- {this.renderStepIndicator()}
127
- {labels && this.renderStepLabels()}
128
- </View>
129
- );
130
- }
131
-
132
- componentDidUpdate(prevProps) {
133
- // if (prevProps.customStyles !== this.props.customStyles) {
134
- // this.setState((state) => ({
135
- // customStyles: Object.assign(
136
- // state.customStyles,
137
- // this.props.customStyles
138
- // ),
139
- // }));
140
- // }
141
-
142
- if (prevProps.currentPosition !== this.props.currentPosition) {
143
- this.onCurrentPositionChanged(this.props.currentPosition);
144
- }
145
- }
146
-
147
- renderProgressBarBackground = () => {
148
- const { stepCount, direction } = this.props;
149
- let progressBarBackgroundStyle;
150
- if (direction === "vertical") {
151
- progressBarBackgroundStyle = {
152
- backgroundColor: this.state.customStyles.separatorUnFinishedColor,
153
- position: "absolute",
154
- left:
155
- (this.state.width - this.state.customStyles.separatorStrokeWidth) / 2,
156
- top: this.state.height / (2 * stepCount),
157
- bottom: this.state.height / (2 * stepCount),
158
- width:
159
- this.state.customStyles.separatorStrokeUnfinishedWidth === 0
160
- ? this.state.customStyles.separatorStrokeWidth
161
- : this.state.customStyles.separatorStrokeUnfinishedWidth,
162
- };
163
- } else {
164
- progressBarBackgroundStyle = {
165
- backgroundColor: this.state.customStyles.separatorUnFinishedColor,
166
- position: "absolute",
167
- top:
168
- (this.state.height - this.state.customStyles.separatorStrokeWidth) /
169
- 2,
170
- left: this.state.width / (2 * stepCount),
171
- right: this.state.width / (2 * stepCount),
172
- height:
173
- this.state.customStyles.separatorStrokeUnfinishedWidth === 0
174
- ? this.state.customStyles.separatorStrokeWidth
175
- : this.state.customStyles.separatorStrokeUnfinishedWidth,
176
- };
177
- }
178
- return (
179
- <View
180
- onLayout={(event) => {
181
- if (direction === "vertical") {
182
- this.setState(
183
- { progressBarSize: event.nativeEvent.layout.height },
184
- () => {
185
- this.onCurrentPositionChanged(this.props.currentPosition);
186
- }
187
- );
188
- } else {
189
- this.setState(
190
- { progressBarSize: event.nativeEvent.layout.width },
191
- () => {
192
- this.onCurrentPositionChanged(this.props.currentPosition);
193
- }
194
- );
195
- }
196
- }}
197
- style={progressBarBackgroundStyle}
198
- />
199
- );
200
- };
201
-
202
- renderProgressBar = () => {
203
- const { stepCount, direction } = this.props;
204
- let progressBarStyle;
205
- if (direction === "vertical") {
206
- progressBarStyle = {
207
- backgroundColor: this.state.customStyles.separatorFinishedColor,
208
- position: "absolute",
209
- left:
210
- (this.state.width - this.state.customStyles.separatorStrokeWidth) / 2,
211
- top: this.state.height / (2 * stepCount),
212
- bottom: this.state.height / (2 * stepCount),
213
- width:
214
- this.state.customStyles.separatorStrokeFinishedWidth === 0
215
- ? this.state.customStyles.separatorStrokeWidth
216
- : this.state.customStyles.separatorStrokeFinishedWidth,
217
- height: this.progressAnim,
218
- };
219
- } else {
220
- progressBarStyle = {
221
- backgroundColor: this.state.customStyles.separatorFinishedColor,
222
- position: "absolute",
223
- top:
224
- (this.state.height - this.state.customStyles.separatorStrokeWidth) /
225
- 2,
226
- left: this.state.width / (2 * stepCount),
227
- right: this.state.width / (2 * stepCount),
228
- height:
229
- this.state.customStyles.separatorStrokeFinishedWidth === 0
230
- ? this.state.customStyles.separatorStrokeWidth
231
- : this.state.customStyles.separatorStrokeFinishedWidth,
232
- width: this.progressAnim,
233
- };
234
- }
235
- return <Animated.View style={progressBarStyle} />;
236
- };
237
-
238
- renderStepIndicator = () => {
239
- let steps = [];
240
- const { stepCount, direction } = this.props;
241
- for (let position = 0; position < stepCount; position++) {
242
- steps.push(
243
- <TouchableWithoutFeedback
244
- key={position}
245
- onPress={() => this.stepPressed(position)}
246
- >
247
- <View
248
- style={[
249
- styles.stepContainer,
250
- direction === "vertical"
251
- ? { flexDirection: "column" }
252
- : { flexDirection: "row" },
253
- ]}
254
- >
255
- {this.renderStep(position)}
256
- </View>
257
- </TouchableWithoutFeedback>
258
- );
259
- }
260
- return (
261
- <View
262
- onLayout={(event) =>
263
- this.setState({
264
- width: event.nativeEvent.layout.width,
265
- height: event.nativeEvent.layout.height,
266
- })
267
- }
268
- style={[
269
- styles.stepIndicatorContainer,
270
- direction === "vertical"
271
- ? {
272
- flexDirection: "column",
273
- width: this.state.customStyles.currentStepIndicatorSize,
274
- }
275
- : {
276
- flexDirection: "row",
277
- height: this.state.customStyles.currentStepIndicatorSize,
278
- },
279
- ]}
280
- >
281
- {steps}
282
- </View>
283
- );
284
- };
285
-
286
- renderStepLabels = () => {
287
- const { labels, direction, currentPosition, renderLabel } = this.props;
288
- var labelViews = labels.map((label, index) => {
289
- const selectedStepLabelStyle =
290
- index === currentPosition
291
- ? { color: this.state.customStyles.currentStepLabelColor }
292
- : { color: this.state.customStyles.labelColor };
293
- return (
294
- <TouchableWithoutFeedback
295
- style={styles.stepLabelItem}
296
- key={index}
297
- onPress={() => this.stepPressed(index)}
298
- >
299
- <View style={styles.stepLabelItem}>
300
- {renderLabel ? (
301
- renderLabel({
302
- position: index,
303
- stepStatus: this.getStepStatus(index),
304
- label,
305
- currentPosition,
306
- })
307
- ) : (
308
- <Text
309
- style={[
310
- styles.stepLabel,
311
- selectedStepLabelStyle,
312
- {
313
- fontSize: this.state.customStyles.labelSize,
314
- fontFamily: this.state.customStyles.labelFontFamily,
315
- },
316
- ]}
317
- >
318
- {label}
319
- </Text>
320
- )}
321
- </View>
322
- </TouchableWithoutFeedback>
323
- );
324
- });
325
-
326
- return (
327
- <View
328
- style={[
329
- styles.stepLabelsContainer,
330
- direction === "vertical"
331
- ? { flexDirection: "column", paddingHorizontal: 4 }
332
- : { flexDirection: "row", paddingVertical: 4 },
333
- { alignItems: this.state.customStyles.labelAlign },
334
- ]}
335
- >
336
- {labelViews}
337
- </View>
338
- );
339
- };
340
-
341
- renderStep = (position) => {
342
- const { renderStepIndicator } = this.props;
343
- let stepStyle;
344
- let indicatorLabelStyle;
345
-
346
- switch (this.getStepStatus(position)) {
347
- case STEP_STATUS.CURRENT: {
348
- stepStyle = {
349
- backgroundColor: this.state.customStyles.stepIndicatorCurrentColor,
350
- borderWidth: this.state.customStyles.currentStepStrokeWidth,
351
- borderColor: this.state.customStyles.stepStrokeCurrentColor,
352
- height: this.sizeAnim,
353
- width: this.sizeAnim,
354
- borderRadius: this.borderRadiusAnim,
355
- };
356
- indicatorLabelStyle = {
357
- fontSize: this.state.customStyles.currentStepIndicatorLabelFontSize,
358
- color: this.state.customStyles.stepIndicatorLabelCurrentColor,
359
- };
360
-
361
- break;
362
- }
363
- case STEP_STATUS.FINISHED: {
364
- stepStyle = {
365
- backgroundColor: this.state.customStyles.stepIndicatorFinishedColor,
366
- borderWidth: this.state.customStyles.stepStrokeWidth,
367
- borderColor: this.state.customStyles.stepStrokeFinishedColor,
368
- height: this.state.customStyles.stepIndicatorSize,
369
- width: this.state.customStyles.stepIndicatorSize,
370
- borderRadius: this.state.customStyles.stepIndicatorSize / 2,
371
- };
372
- indicatorLabelStyle = {
373
- fontSize: this.state.customStyles.stepIndicatorLabelFontSize,
374
- color: this.state.customStyles.stepIndicatorLabelFinishedColor,
375
- };
376
- break;
377
- }
378
-
379
- case STEP_STATUS.UNFINISHED: {
380
- stepStyle = {
381
- backgroundColor: this.state.customStyles.stepIndicatorUnFinishedColor,
382
- borderWidth: this.state.customStyles.stepStrokeWidth,
383
- borderColor: this.state.customStyles.stepStrokeUnFinishedColor,
384
- height: this.state.customStyles.stepIndicatorSize,
385
- width: this.state.customStyles.stepIndicatorSize,
386
- borderRadius: this.state.customStyles.stepIndicatorSize / 2,
387
- };
388
- indicatorLabelStyle = {
389
- overflow: "hidden",
390
- fontSize: this.state.customStyles.stepIndicatorLabelFontSize,
391
- color: this.state.customStyles.stepIndicatorLabelUnFinishedColor,
392
- };
393
- break;
394
- }
395
- default:
396
- }
397
-
398
- return (
399
- <Animated.View key={"step-indicator"} style={[styles.step, stepStyle]}>
400
- {renderStepIndicator ? (
401
- renderStepIndicator({
402
- position,
403
- stepStatus: this.getStepStatus(position),
404
- })
405
- ) : (
406
- <Text style={indicatorLabelStyle}>{`${position + 1}`}</Text>
407
- )}
408
- </Animated.View>
409
- );
410
- };
411
-
412
- getStepStatus = (stepPosition) => {
413
- const { currentPosition } = this.props;
414
- if (stepPosition === currentPosition) {
415
- return STEP_STATUS.CURRENT;
416
- } else if (stepPosition < currentPosition) {
417
- return STEP_STATUS.FINISHED;
418
- } else {
419
- return STEP_STATUS.UNFINISHED;
420
- }
421
- };
422
-
423
- onCurrentPositionChanged = (position) => {
424
- let { stepCount } = this.props;
425
- if (position > stepCount - 1) {
426
- position = stepCount - 1;
427
- }
428
- const animateToPosition =
429
- (this.state.progressBarSize / (stepCount - 1)) * position;
430
- this.sizeAnim.setValue(this.state.customStyles.stepIndicatorSize);
431
- this.borderRadiusAnim.setValue(
432
- this.state.customStyles.stepIndicatorSize / 2
433
- );
434
- Animated.sequence([
435
- Animated.timing(this.progressAnim, {
436
- toValue: animateToPosition,
437
- duration: 200,
438
- }),
439
- Animated.parallel([
440
- Animated.timing(this.sizeAnim, {
441
- toValue: this.state.customStyles.currentStepIndicatorSize,
442
- duration: 100,
443
- }),
444
- Animated.timing(this.borderRadiusAnim, {
445
- toValue: this.state.customStyles.currentStepIndicatorSize / 2,
446
- duration: 100,
447
- }),
448
- ]),
449
- ]).start();
450
- };
451
- }
452
-
453
- const styles = StyleSheet.create({
454
- container: {
455
- backgroundColor: "transparent",
456
- },
457
- stepIndicatorContainer: {
458
- flexDirection: "row",
459
- alignItems: "center",
460
- justifyContent: "space-around",
461
- backgroundColor: "transparent",
462
- },
463
- stepLabelsContainer: {
464
- justifyContent: "space-around",
465
- },
466
- step: {
467
- alignItems: "center",
468
- justifyContent: "center",
469
- zIndex: 2,
470
- },
471
- stepContainer: {
472
- flex: 1,
473
- flexDirection: "row",
474
- alignItems: "center",
475
- justifyContent: "center",
476
- },
477
- stepLabel: {
478
- fontSize: 12,
479
- textAlign: "center",
480
- fontWeight: "500",
481
- },
482
- stepLabelItem: {
483
- flex: 1,
484
- alignItems: "center",
485
- justifyContent: "center",
486
- },
487
- });
488
-
489
- StepIndicator.defaultProps = {
490
- currentPosition: 0,
491
- stepCount: 5,
492
- customStyles: {},
493
- direction: "horizontal",
494
- };
@@ -1,34 +0,0 @@
1
- import * as React from "react";
2
- import { TabView, TabBar, SceneMap } from "react-native-tab-view";
3
- // import { withTheme } from "../../theming";
4
- import TabViewItem from "./TabViewItem";
5
- const TabViewComponent = ({ Icon, tabBarPosition, keyboardDismissMode, swipeEnabled, scrollEnabled, activeColor, inactiveColor, pressColor, indicatorColor, style, children, }) => {
6
- const [index, setIndex] = React.useState(0);
7
- const [routes, setRoutes] = React.useState([]);
8
- const [tabScenes, setTabScenes] = React.useState({});
9
- React.useEffect(() => {
10
- const newRoutes = [];
11
- const scenes = {};
12
- React.Children.toArray(children)
13
- .filter((child) => child.type === TabViewItem)
14
- .forEach((child) => {
15
- var _a, _b, _c;
16
- if ((_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.id) {
17
- newRoutes.push({
18
- key: (_b = child === null || child === void 0 ? void 0 : child.props) === null || _b === void 0 ? void 0 : _b.id,
19
- ...child === null || child === void 0 ? void 0 : child.props,
20
- });
21
- scenes[(_c = child === null || child === void 0 ? void 0 : child.props) === null || _c === void 0 ? void 0 : _c.id] = () => child;
22
- }
23
- });
24
- setRoutes(newRoutes);
25
- setTabScenes(scenes);
26
- }, [children]);
27
- const indexChangeHandler = (i) => setIndex(i);
28
- const renderTabBar = (props) => {
29
- console.log(props);
30
- return (React.createElement(TabBar, { ...props, activeColor: activeColor, inactiveColor: inactiveColor, pressColor: pressColor, scrollEnabled: scrollEnabled, indicatorStyle: { backgroundColor: indicatorColor }, renderIcon: ({ route, color }) => (route === null || route === void 0 ? void 0 : route.icon) ? (React.createElement(Icon, { name: route.icon, color: color, size: 36 })) : null, style: style }));
31
- };
32
- return (React.createElement(TabView, { navigationState: { index, routes }, renderScene: SceneMap(tabScenes), renderTabBar: renderTabBar, onIndexChange: indexChangeHandler, tabBarPosition: tabBarPosition, keyboardDismissMode: keyboardDismissMode, swipeEnabled: swipeEnabled }));
33
- };
34
- export default TabViewComponent;
@@ -1,97 +0,0 @@
1
- import * as React from "react";
2
- import { StyleProp, TextStyle, ViewStyle } from "react-native";
3
- import { TabView, TabBar, SceneMap } from "react-native-tab-view";
4
-
5
- // import { withTheme } from "../../theming";
6
- import TabViewItem from "./TabViewItem";
7
- import type { IconSlot } from "../../interfaces/Icon";
8
-
9
- type TabBarPosition = "top" | "bottom";
10
- type KeyboardDismissMode = "none" | "auto" | "on-drag";
11
-
12
- type TabViewProps = {
13
- tabBarPosition?: TabBarPosition;
14
- keyboardDismissMode?: KeyboardDismissMode;
15
- swipeEnabled?: boolean;
16
- scrollEnabled?: boolean;
17
- activeColor?: string;
18
- inactiveColor?: string;
19
- pressColor?: string;
20
- indicatorColor?: string;
21
- style?: StyleProp<TextStyle | ViewStyle>;
22
- children: React.ReactNode;
23
- } & IconSlot;
24
-
25
- const TabViewComponent = ({
26
- Icon,
27
- tabBarPosition,
28
- keyboardDismissMode,
29
- swipeEnabled,
30
- scrollEnabled,
31
- activeColor,
32
- inactiveColor,
33
- pressColor,
34
- indicatorColor,
35
- style,
36
- children,
37
- }: TabViewProps) => {
38
- const [index, setIndex] = React.useState(0);
39
- const [routes, setRoutes] = React.useState([]);
40
- const [tabScenes, setTabScenes] = React.useState({});
41
-
42
- React.useEffect(() => {
43
- const newRoutes: any = [];
44
- const scenes: any = {};
45
-
46
- React.Children.toArray(children)
47
- .filter((child: any) => child.type === TabViewItem)
48
- .forEach((child: any) => {
49
- if (child?.props?.id) {
50
- newRoutes.push({
51
- key: child?.props?.id,
52
- ...child?.props,
53
- });
54
- scenes[child?.props?.id] = () => child;
55
- }
56
- });
57
-
58
- setRoutes(newRoutes);
59
- setTabScenes(scenes);
60
- }, [children]);
61
-
62
- const indexChangeHandler = (i: any) => setIndex(i);
63
-
64
- const renderTabBar = (props: any) => {
65
- console.log(props);
66
- return (
67
- <TabBar
68
- {...props}
69
- activeColor={activeColor}
70
- inactiveColor={inactiveColor}
71
- pressColor={pressColor}
72
- scrollEnabled={scrollEnabled}
73
- indicatorStyle={{ backgroundColor: indicatorColor }}
74
- renderIcon={({ route, color }) =>
75
- route?.icon ? (
76
- <Icon name={route.icon} color={color} size={36} />
77
- ) : null
78
- }
79
- style={style}
80
- />
81
- );
82
- };
83
-
84
- return (
85
- <TabView
86
- navigationState={{ index, routes }}
87
- renderScene={SceneMap(tabScenes)}
88
- renderTabBar={renderTabBar}
89
- onIndexChange={indexChangeHandler}
90
- tabBarPosition={tabBarPosition}
91
- keyboardDismissMode={keyboardDismissMode}
92
- swipeEnabled={swipeEnabled}
93
- />
94
- );
95
- };
96
-
97
- export default TabViewComponent;
@@ -1,5 +0,0 @@
1
- const TabViewItem = ({ title, id, icon, children, accessibilityLabel, }) => {
2
- console.log({ title, id, icon, accessibilityLabel });
3
- return children;
4
- };
5
- export default TabViewItem;
@@ -1,21 +0,0 @@
1
- import React from "react";
2
- interface TabViewItemProps {
3
- title: string;
4
- id: string;
5
- icon: string;
6
- accessibilityLabel: string;
7
- children: React.ReactNode;
8
- }
9
-
10
- const TabViewItem = ({
11
- title,
12
- id,
13
- icon,
14
- children,
15
- accessibilityLabel,
16
- }: TabViewItemProps) => {
17
- console.log({ title, id, icon, accessibilityLabel });
18
- return children;
19
- };
20
-
21
- export default TabViewItem;
@@ -1,2 +0,0 @@
1
- export { default as TabView } from "./TabView";
2
- export { default as TabViewItem } from "./TabViewItem";
@@ -1,2 +0,0 @@
1
- export { default as TabView } from "./TabView";
2
- export { default as TabViewItem } from "./TabViewItem";
@@ -1,39 +0,0 @@
1
- import * as React from "react";
2
- import { withTheme } from "../theming";
3
- import { StyleSheet } from "react-native";
4
- import IconButton from "./IconButton";
5
- const ToggleButton = ({ Icon, icon, toggled = false, onPress = () => { }, defaultValue, disabled = false, color = "primary", colorSecondary = "surface", borderColor = "divider", iconSize = 25, width = 50, height = 50, theme: { colors }, style, ...rest }) => {
6
- const [internalValue, setInternalValue] = React.useState(toggled || defaultValue || false);
7
- React.useEffect(() => {
8
- if (toggled != null) {
9
- setInternalValue(toggled);
10
- }
11
- }, [toggled]);
12
- React.useEffect(() => {
13
- if (defaultValue != null) {
14
- setInternalValue(defaultValue);
15
- }
16
- }, [defaultValue]);
17
- const handlePress = () => {
18
- setInternalValue(!internalValue);
19
- onPress(!internalValue);
20
- };
21
- return (React.createElement(IconButton, { Icon: Icon, icon: icon, size: iconSize, color: internalValue ? colors[color] : colors[colorSecondary], onPress: handlePress, disabled: disabled, style: [
22
- styles.mainContainer,
23
- {
24
- width,
25
- height,
26
- backgroundColor: internalValue
27
- ? colors[colorSecondary]
28
- : colors[color],
29
- borderColor: colors[borderColor],
30
- },
31
- style,
32
- ], ...rest }));
33
- };
34
- const styles = StyleSheet.create({
35
- mainContainer: {
36
- borderWidth: 1,
37
- },
38
- });
39
- export default withTheme(ToggleButton);