@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,191 +0,0 @@
1
- import React, { Component } from "react";
2
- import {
3
- Animated,
4
- Easing,
5
- View,
6
- I18nManager,
7
- ViewProps,
8
- StyleProp,
9
- ViewStyle,
10
- LayoutChangeEvent,
11
- } from "react-native";
12
-
13
- const INDETERMINATE_WIDTH_FACTOR = 0.3;
14
- const BAR_WIDTH_ZERO_POSITION =
15
- INDETERMINATE_WIDTH_FACTOR / (1 + INDETERMINATE_WIDTH_FACTOR);
16
-
17
- type Props = {
18
- borderColor?: string;
19
- borderRadius?: number;
20
- borderWidth?: number;
21
- children?: React.ReactNode;
22
- color?: string;
23
- height?: number;
24
- style?: StyleProp<ViewStyle>;
25
- unfilledColor?: string;
26
- width?: number;
27
- animated?: boolean;
28
- indeterminate?: boolean;
29
- indeterminateAnimationDuration?: number;
30
- progress?: number;
31
- useNativeDriver?: boolean;
32
- animationConfig?: Animated.AnimationConfig;
33
- animationType?: "decay" | "timing" | "spring";
34
- } & ViewProps;
35
-
36
- interface State {
37
- width: number;
38
- progress: Animated.Value;
39
- animationValue: Animated.Value;
40
- }
41
-
42
- export default class ProgressBar extends Component<Props, State> {
43
- constructor(props: Props) {
44
- super(props);
45
- const { progress: progressP = 0, indeterminate = false } = props;
46
- const progress = Math.min(Math.max(progressP, 0), 1);
47
- this.state = {
48
- width: 0,
49
- progress: new Animated.Value(
50
- indeterminate ? INDETERMINATE_WIDTH_FACTOR : progress
51
- ),
52
- animationValue: new Animated.Value(BAR_WIDTH_ZERO_POSITION),
53
- };
54
- }
55
-
56
- componentDidMount() {
57
- const { indeterminate = false } = this.props;
58
- if (indeterminate) {
59
- this.animate();
60
- }
61
- }
62
-
63
- componentDidUpdate(prevProps: Props) {
64
- const {
65
- indeterminate = false,
66
- useNativeDriver = false,
67
- progress: progressP = 0,
68
- animationType = "spring",
69
- animationConfig = { bounciness: 0 },
70
- animated = true,
71
- } = this.props;
72
-
73
- if (prevProps.indeterminate !== indeterminate) {
74
- if (indeterminate) {
75
- this.animate();
76
- } else {
77
- Animated.spring(this.state.animationValue, {
78
- toValue: BAR_WIDTH_ZERO_POSITION,
79
- useNativeDriver,
80
- }).start();
81
- }
82
- }
83
- if (
84
- prevProps.indeterminate !== indeterminate ||
85
- prevProps.progress !== progressP
86
- ) {
87
- const progress = this.props.indeterminate
88
- ? INDETERMINATE_WIDTH_FACTOR
89
- : Math.min(Math.max(progressP, 0), 1);
90
-
91
- if (animated) {
92
- Animated[animationType](this.state.progress, {
93
- ...animationConfig,
94
- toValue: progress,
95
- velocity: 0, //adjust this value if animation fails - velocity is required
96
- useNativeDriver,
97
- }).start();
98
- } else {
99
- this.state.progress.setValue(progress);
100
- }
101
- }
102
- }
103
-
104
- handleLayout = (event: LayoutChangeEvent) => {
105
- const { width = 150, onLayout } = this.props;
106
- if (!width) {
107
- this.setState({ width: event.nativeEvent.layout.width });
108
- }
109
- if (onLayout) {
110
- onLayout(event);
111
- }
112
- };
113
-
114
- animate() {
115
- const { useNativeDriver = false, indeterminateAnimationDuration = 1000 } =
116
- this.props;
117
- this.state.animationValue.setValue(0);
118
- Animated.timing(this.state.animationValue, {
119
- toValue: 1,
120
- duration: indeterminateAnimationDuration,
121
- easing: Easing.linear,
122
- isInteraction: false,
123
- useNativeDriver,
124
- }).start((endState) => {
125
- if (endState.finished) {
126
- this.animate();
127
- }
128
- });
129
- }
130
-
131
- render() {
132
- const {
133
- borderColor,
134
- borderRadius = 4,
135
- borderWidth = 1,
136
- children,
137
- color = "rgba(0, 122, 255, 1)",
138
- style,
139
- unfilledColor,
140
- width = 150,
141
- ...restProps
142
- } = this.props;
143
-
144
- const innerWidth = Math.max(0, width || this.state.width) - borderWidth * 2;
145
- const containerStyle: StyleProp<ViewStyle> = {
146
- width,
147
- borderWidth,
148
- borderColor: borderColor || color,
149
- borderRadius,
150
- overflow: "hidden",
151
- backgroundColor: unfilledColor,
152
- };
153
- const progressStyle = {
154
- backgroundColor: color,
155
- // Always take up full height of container.
156
- height: "100%",
157
- transform: [
158
- {
159
- translateX: this.state.animationValue.interpolate({
160
- inputRange: [0, 1],
161
- outputRange: [innerWidth * -INDETERMINATE_WIDTH_FACTOR, innerWidth],
162
- }),
163
- },
164
- {
165
- translateX: this.state.progress.interpolate({
166
- inputRange: [0, 1],
167
- outputRange: [innerWidth / (I18nManager.isRTL ? 2 : -2), 0],
168
- }),
169
- },
170
- {
171
- // Interpolation a temp workaround for https://github.com/facebook/react-native/issues/6278
172
- scaleX: this.state.progress.interpolate({
173
- inputRange: [0, 1],
174
- outputRange: [0.0001, 1],
175
- }),
176
- },
177
- ],
178
- };
179
-
180
- return (
181
- <View
182
- style={[containerStyle, style]}
183
- onLayout={this.handleLayout}
184
- {...restProps}
185
- >
186
- <Animated.View style={progressStyle} />
187
- {children}
188
- </View>
189
- );
190
- }
191
- }
@@ -1,13 +0,0 @@
1
- import * as React from "react";
2
- import { Text } from "react-native";
3
- import AnimatedCircularProgress from "./AnimatedCircularProgress";
4
- import { withTheme } from "../theming";
5
- const ProgressCircle = ({ progress = 0.5, style, color = "primary", size = 100, showsText = true, unfilledColor, strokeCap = "butt", textStyle, thickness = 1, theme, }) => {
6
- const progressNum = Math.round(progress * 100);
7
- const tintColor = color || theme.colors.primary;
8
- const backgroundColor = unfilledColor || theme.colors.secondary;
9
- return (React.createElement(AnimatedCircularProgress, { size: size, width: thickness, backgroundWidth: thickness, fill: progressNum, tintColor: tintColor, backgroundColor: backgroundColor, rotation: 0, lineCap: strokeCap, style: style }, (fill) => showsText ? (React.createElement(Text, { style: [{ fontSize: size * 0.275, color: tintColor }, textStyle] },
10
- Math.round(fill),
11
- "%")) : null));
12
- };
13
- export default withTheme(ProgressCircle);
@@ -1,64 +0,0 @@
1
- import * as React from "react";
2
- import { Text, StyleProp, ViewStyle, TextStyle } from "react-native";
3
- import AnimatedCircularProgress from "./AnimatedCircularProgress";
4
- import { withTheme } from "../theming";
5
- import themeT from "../styles/DefaultTheme";
6
- import { colorTypes } from "@draftbit/types";
7
-
8
- type Props = {
9
- progress?: number;
10
- style?: StyleProp<ViewStyle>;
11
- color?: colorTypes;
12
- size?: number;
13
- showsText?: boolean;
14
- unfilledColor?: colorTypes;
15
- strokeCap?: "butt" | "square" | "round" | undefined;
16
- textStyle?: StyleProp<TextStyle>;
17
- thickness?: number;
18
- theme: typeof themeT;
19
- };
20
-
21
- const ProgressCircle: React.FC<React.PropsWithChildren<Props>> = ({
22
- progress = 0.5,
23
- style,
24
- color = "primary",
25
- size = 100,
26
- showsText = true,
27
- unfilledColor,
28
- strokeCap = "butt",
29
- textStyle,
30
- thickness = 1,
31
- theme,
32
- }) => {
33
- const progressNum = Math.round(progress * 100);
34
-
35
- const tintColor = color || theme.colors.primary;
36
- const backgroundColor = unfilledColor || theme.colors.secondary;
37
-
38
- return (
39
- <AnimatedCircularProgress
40
- size={size}
41
- width={thickness}
42
- backgroundWidth={thickness}
43
- fill={progressNum}
44
- tintColor={tintColor}
45
- backgroundColor={backgroundColor}
46
- rotation={0}
47
- lineCap={strokeCap}
48
- style={style}
49
- >
50
- {/* @ts-ignore */}
51
- {(fill) =>
52
- showsText ? (
53
- <Text
54
- style={[{ fontSize: size * 0.275, color: tintColor }, textStyle]}
55
- >
56
- {Math.round(fill)}%
57
- </Text>
58
- ) : null
59
- }
60
- </AnimatedCircularProgress>
61
- );
62
- };
63
-
64
- export default withTheme(ProgressCircle);
@@ -1,27 +0,0 @@
1
- import * as React from "react";
2
- import StepIndicator from "./StepIndicator";
3
- import { withTheme } from "../theming";
4
- const ProgressIndicator = ({ numberOfSteps, currentStep, currentStepStrokeWidth = 3, stepStrokeCurrentColor = "primary", stepIndicatorSize, currentStepIndicatorSize, stepIndicatorCurrentColor, stepIndicatorLabelCurrentColor, stepIndicatorLabelFontSize = 12, stepNumberFinishedColor = "strongInverse", stepNumberUnfinishedColor = "primary", unfinishedColor = "light", finishedColor = "primary", theme, }) => {
5
- const currentPosition = currentStep - 1;
6
- return (React.createElement(StepIndicator, { stepCount: numberOfSteps, currentPosition: currentPosition, customStyles: {
7
- stepIndicatorSize,
8
- currentStepIndicatorSize: currentStepIndicatorSize
9
- ? currentStepIndicatorSize
10
- : stepIndicatorSize,
11
- stepStrokeFinishedColor: finishedColor,
12
- stepStrokeUnFinishedColor: unfinishedColor,
13
- separatorFinishedColor: finishedColor,
14
- separatorUnFinishedColor: unfinishedColor,
15
- stepIndicatorFinishedColor: finishedColor,
16
- stepIndicatorUnFinishedColor: unfinishedColor,
17
- currentStepStrokeWidth,
18
- stepStrokeCurrentColor: stepStrokeCurrentColor || stepIndicatorCurrentColor,
19
- stepIndicatorLabelUnFinishedColor: stepNumberUnfinishedColor,
20
- stepIndicatorLabelFinishedColor: stepNumberFinishedColor,
21
- stepIndicatorCurrentColor: stepIndicatorCurrentColor || unfinishedColor,
22
- stepIndicatorLabelCurrentColor: stepIndicatorLabelCurrentColor || stepNumberUnfinishedColor,
23
- stepIndicatorLabelFontSize,
24
- labelFontFamily: theme.typography.body1.fontFamily,
25
- } }));
26
- };
27
- export default withTheme(ProgressIndicator);
@@ -1,71 +0,0 @@
1
- import * as React from "react";
2
- import StepIndicator from "./StepIndicator";
3
- import { withTheme } from "../theming";
4
- import themeT from "../styles/DefaultTheme";
5
- import { colorTypes } from "@draftbit/types";
6
-
7
- type Props = {
8
- numberOfSteps: number;
9
- currentStep: number;
10
- currentStepStrokeWidth?: number;
11
- stepStrokeCurrentColor?: colorTypes;
12
- stepIndicatorSize?: number;
13
- currentStepIndicatorSize?: number;
14
- stepIndicatorCurrentColor?: colorTypes;
15
- stepIndicatorLabelCurrentColor?: colorTypes;
16
- stepIndicatorLabelFontSize?: number;
17
- stepNumberFinishedColor?: colorTypes;
18
- stepNumberUnfinishedColor?: colorTypes;
19
- unfinishedColor?: colorTypes;
20
- finishedColor?: colorTypes;
21
- theme: typeof themeT;
22
- };
23
-
24
- const ProgressIndicator: React.FC<React.PropsWithChildren<Props>> = ({
25
- numberOfSteps,
26
- currentStep,
27
- currentStepStrokeWidth = 3,
28
- stepStrokeCurrentColor = "primary",
29
- stepIndicatorSize,
30
- currentStepIndicatorSize,
31
- stepIndicatorCurrentColor,
32
- stepIndicatorLabelCurrentColor,
33
- stepIndicatorLabelFontSize = 12,
34
- stepNumberFinishedColor = "strongInverse",
35
- stepNumberUnfinishedColor = "primary",
36
- unfinishedColor = "light",
37
- finishedColor = "primary",
38
- theme,
39
- }) => {
40
- const currentPosition = currentStep - 1;
41
- return (
42
- <StepIndicator
43
- stepCount={numberOfSteps}
44
- currentPosition={currentPosition}
45
- customStyles={{
46
- stepIndicatorSize,
47
- currentStepIndicatorSize: currentStepIndicatorSize
48
- ? currentStepIndicatorSize
49
- : stepIndicatorSize,
50
- stepStrokeFinishedColor: finishedColor,
51
- stepStrokeUnFinishedColor: unfinishedColor,
52
- separatorFinishedColor: finishedColor,
53
- separatorUnFinishedColor: unfinishedColor,
54
- stepIndicatorFinishedColor: finishedColor,
55
- stepIndicatorUnFinishedColor: unfinishedColor,
56
- currentStepStrokeWidth,
57
- stepStrokeCurrentColor:
58
- stepStrokeCurrentColor || stepIndicatorCurrentColor,
59
- stepIndicatorLabelUnFinishedColor: stepNumberUnfinishedColor,
60
- stepIndicatorLabelFinishedColor: stepNumberFinishedColor,
61
- stepIndicatorCurrentColor: stepIndicatorCurrentColor || unfinishedColor,
62
- stepIndicatorLabelCurrentColor:
63
- stepIndicatorLabelCurrentColor || stepNumberUnfinishedColor,
64
- stepIndicatorLabelFontSize,
65
- labelFontFamily: theme.typography.body1.fontFamily,
66
- }}
67
- />
68
- );
69
- };
70
-
71
- export default withTheme(ProgressIndicator);
@@ -1 +0,0 @@
1
- export {};
@@ -1,7 +0,0 @@
1
- export type ResizeModeType =
2
- | "cover"
3
- | "contain"
4
- | "stretch"
5
- | "repeat"
6
- | "center"
7
- | undefined;
@@ -1,48 +0,0 @@
1
- import * as React from "react";
2
- import { View, Text, Image, StyleSheet, } from "react-native";
3
- import { withTheme } from "../theming";
4
- import Config from "./Config";
5
- const Row = ({ titleTypeStyle, titleColor, subtitleTypeStyle, subtitleColor, title, subtitle, multilineSubtitle, image, right, style, }) => {
6
- return (React.createElement(View, { style: [styles.container, { padding: 16 }, style] },
7
- React.createElement(View, { style: styles.leftContainer },
8
- image && (React.createElement(Image, { source: typeof image === "string" ? { uri: image } : image, style: {
9
- marginRight: 12,
10
- width: subtitle
11
- ? Config.rowMultiLineImageSize
12
- : Config.rowSingleLineImageSize,
13
- height: subtitle
14
- ? Config.rowMultiLineImageSize
15
- : Config.rowSingleLineImageSize,
16
- } })),
17
- React.createElement(View, { style: styles.textContainer },
18
- React.createElement(Text, { style: [
19
- titleTypeStyle,
20
- {
21
- color: titleColor,
22
- },
23
- ], numberOfLines: 1 }, title),
24
- subtitle ? (React.createElement(Text, { style: [
25
- subtitleTypeStyle,
26
- {
27
- color: subtitleColor,
28
- marginTop: 4,
29
- },
30
- ], numberOfLines: multilineSubtitle ? undefined : 1 }, subtitle)) : null)),
31
- right && right()));
32
- };
33
- const styles = StyleSheet.create({
34
- leftContainer: {
35
- flexDirection: "row",
36
- flex: 1,
37
- },
38
- container: {
39
- flexDirection: "row",
40
- justifyContent: "space-between",
41
- alignItems: "center",
42
- },
43
- textContainer: {
44
- flex: 1,
45
- justifyContent: "center",
46
- },
47
- });
48
- export default withTheme(Row);
@@ -1,108 +0,0 @@
1
- import * as React from "react";
2
- import {
3
- View,
4
- Text,
5
- Image,
6
- ImageSourcePropType,
7
- StyleSheet,
8
- StyleProp,
9
- TextStyle,
10
- ViewStyle,
11
- } from "react-native";
12
- import { withTheme } from "../theming";
13
- import Config from "./Config";
14
- import theme from "../styles/DefaultTheme";
15
-
16
- type Props = {
17
- titleTypeStyle?: StyleProp<TextStyle>;
18
- titleColor?: string;
19
- subtitleTypeStyle?: StyleProp<TextStyle>;
20
- subtitleColor?: string;
21
- title?: string;
22
- subtitle?: string;
23
- multilineSubtitle?: boolean;
24
- image?: string | ImageSourcePropType;
25
- right?: () => React.ReactNode;
26
- style?: StyleProp<ViewStyle>;
27
- theme: typeof theme;
28
- };
29
-
30
- const Row: React.FC<React.PropsWithChildren<Props>> = ({
31
- titleTypeStyle,
32
- titleColor,
33
- subtitleTypeStyle,
34
- subtitleColor,
35
- title,
36
- subtitle,
37
- multilineSubtitle,
38
- image,
39
- right,
40
- style,
41
- }) => {
42
- return (
43
- <View style={[styles.container, { padding: 16 }, style]}>
44
- <View style={styles.leftContainer}>
45
- {image && (
46
- <Image
47
- source={typeof image === "string" ? { uri: image } : image}
48
- style={{
49
- marginRight: 12,
50
- width: subtitle
51
- ? Config.rowMultiLineImageSize
52
- : Config.rowSingleLineImageSize,
53
- height: subtitle
54
- ? Config.rowMultiLineImageSize
55
- : Config.rowSingleLineImageSize,
56
- }}
57
- />
58
- )}
59
- <View style={styles.textContainer}>
60
- <Text
61
- style={[
62
- titleTypeStyle,
63
- {
64
- color: titleColor,
65
- },
66
- ]}
67
- numberOfLines={1}
68
- >
69
- {title}
70
- </Text>
71
- {subtitle ? (
72
- <Text
73
- style={[
74
- subtitleTypeStyle,
75
- {
76
- color: subtitleColor,
77
- marginTop: 4,
78
- },
79
- ]}
80
- numberOfLines={multilineSubtitle ? undefined : 1}
81
- >
82
- {subtitle}
83
- </Text>
84
- ) : null}
85
- </View>
86
- </View>
87
- {right && right()}
88
- </View>
89
- );
90
- };
91
-
92
- const styles = StyleSheet.create({
93
- leftContainer: {
94
- flexDirection: "row",
95
- flex: 1,
96
- },
97
- container: {
98
- flexDirection: "row",
99
- justifyContent: "space-between",
100
- alignItems: "center",
101
- },
102
- textContainer: {
103
- flex: 1,
104
- justifyContent: "center",
105
- },
106
- });
107
-
108
- export default withTheme(Row);
@@ -1,8 +0,0 @@
1
- import * as React from "react";
2
- import { withTheme } from "../theming";
3
- import Row from "./Row";
4
- import Config from "./Config";
5
- const RowBodyIcon = ({ Icon, title, subtitle, icon, style, theme: { colors, typography }, }) => {
6
- return (React.createElement(Row, { titleTypeStyle: typography.body1, titleColor: colors.medium, subtitleTypeStyle: typography.subtitle2, subtitleColor: colors.light, title: title, subtitle: subtitle, right: () => (React.createElement(Icon, { name: icon, size: Config.rowSingleLineIconSize, color: colors.light, style: { marginLeft: 16 } })), style: style }));
7
- };
8
- export default withTheme(RowBodyIcon);
@@ -1,47 +0,0 @@
1
- import * as React from "react";
2
- import { withTheme } from "../theming";
3
- import type { Theme } from "../styles/DefaultTheme";
4
- import type { IconSlot } from "../interfaces/Icon";
5
-
6
- import Row from "./Row";
7
- import Config from "./Config";
8
- import { StyleProp, ViewStyle } from "react-native";
9
-
10
- type Props = {
11
- title?: string;
12
- subtitle?: string;
13
- icon: string;
14
- style?: StyleProp<ViewStyle>;
15
- theme: Theme;
16
- } & IconSlot;
17
-
18
- const RowBodyIcon: React.FC<React.PropsWithChildren<Props>> = ({
19
- Icon,
20
- title,
21
- subtitle,
22
- icon,
23
- style,
24
- theme: { colors, typography },
25
- }) => {
26
- return (
27
- <Row
28
- titleTypeStyle={typography.body1}
29
- titleColor={colors.medium}
30
- subtitleTypeStyle={typography.subtitle2}
31
- subtitleColor={colors.light}
32
- title={title}
33
- subtitle={subtitle}
34
- right={() => (
35
- <Icon
36
- name={icon}
37
- size={Config.rowSingleLineIconSize}
38
- color={colors.light}
39
- style={{ marginLeft: 16 }}
40
- />
41
- )}
42
- style={style}
43
- />
44
- );
45
- };
46
-
47
- export default withTheme(RowBodyIcon);
@@ -1,12 +0,0 @@
1
- import * as React from "react";
2
- import { Text } from "react-native";
3
- import { withTheme } from "../theming";
4
- import Row from "./Row";
5
- const RowHeadlineImageCaption = ({ title, subtitle, caption, image, style, theme: { colors, typography }, }) => {
6
- return (React.createElement(Row, { titleTypeStyle: typography.headline6, titleColor: colors.strong, subtitleTypeStyle: typography.body2, subtitleColor: colors.medium, title: title, subtitle: subtitle, image: image, right: () => (React.createElement(Text, { style: {
7
- ...typography.caption,
8
- color: colors.strong,
9
- marginLeft: 16,
10
- } }, caption)), style: style }));
11
- };
12
- export default withTheme(RowHeadlineImageCaption);
@@ -1,49 +0,0 @@
1
- import * as React from "react";
2
- import { Text, ImageSourcePropType, StyleProp, ViewStyle } from "react-native";
3
- import { withTheme } from "../theming";
4
- import Row from "./Row";
5
- import theme from "../styles/DefaultTheme";
6
-
7
- type Props = {
8
- title?: string;
9
- subtitle?: string;
10
- caption?: string;
11
- image: string | ImageSourcePropType;
12
- style?: StyleProp<ViewStyle>;
13
- theme: typeof theme;
14
- };
15
-
16
- const RowHeadlineImageCaption: React.FC<React.PropsWithChildren<Props>> = ({
17
- title,
18
- subtitle,
19
- caption,
20
- image,
21
- style,
22
- theme: { colors, typography },
23
- }) => {
24
- return (
25
- <Row
26
- titleTypeStyle={typography.headline6}
27
- titleColor={colors.strong}
28
- subtitleTypeStyle={typography.body2}
29
- subtitleColor={colors.medium}
30
- title={title}
31
- subtitle={subtitle}
32
- image={image}
33
- right={() => (
34
- <Text
35
- style={{
36
- ...typography.caption,
37
- color: colors.strong,
38
- marginLeft: 16,
39
- }}
40
- >
41
- {caption}
42
- </Text>
43
- )}
44
- style={style}
45
- />
46
- );
47
- };
48
-
49
- export default withTheme(RowHeadlineImageCaption);
@@ -1,14 +0,0 @@
1
- import * as React from "react";
2
- import { withTheme } from "../theming";
3
- import Row from "./Row";
4
- import Config from "./Config";
5
- const RowHeadlineImageIcon = ({ Icon, icon, title, image, subtitle, multilineSubtitle = false, style, theme: { colors, typography }, }) => {
6
- return (React.createElement(Row, { titleTypeStyle: typography.headline6, titleColor: colors.strong, subtitleTypeStyle: typography.body2, subtitleColor: colors.medium, title: title, subtitle: subtitle, multilineSubtitle: multilineSubtitle, image: image, right: () => (React.createElement(Icon, { name: icon, size: multilineSubtitle
7
- ? Config.rowMultiLineIconSize
8
- : Config.rowSingleLineIconSize, color: colors.light, style: {
9
- marginLeft: 16,
10
- alignSelf: multilineSubtitle ? "flex-start" : "center",
11
- marginTop: multilineSubtitle ? 4 : 0,
12
- } })), style: style }));
13
- };
14
- export default withTheme(RowHeadlineImageIcon);