@draftbit/core 46.0.0 → 46.0.1-d651f1.1

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 (366) hide show
  1. package/lib/commonjs/Provider.js.map +1 -1
  2. package/lib/commonjs/components/ActionSheet/ActionSheetCancel.js.map +1 -1
  3. package/lib/commonjs/components/ActionSheet/ActionSheetItem.js.map +1 -1
  4. package/lib/commonjs/components/AnimatedCircularProgress.js.map +1 -1
  5. package/lib/commonjs/components/AspectRatio.js.map +1 -1
  6. package/lib/commonjs/components/AvatarEdit.js.map +1 -1
  7. package/lib/commonjs/components/Banner.js.map +1 -1
  8. package/lib/commonjs/components/Card.js.map +1 -1
  9. package/lib/commonjs/components/CardBlock.js.map +1 -1
  10. package/lib/commonjs/components/CardContainer.js.map +1 -1
  11. package/lib/commonjs/components/CardContainerRating.js.map +1 -1
  12. package/lib/commonjs/components/CardContainerShortImage.js.map +1 -1
  13. package/lib/commonjs/components/CardInline.js.map +1 -1
  14. package/lib/commonjs/components/Carousel.js.map +1 -1
  15. package/lib/commonjs/components/CircleImage.js.map +1 -1
  16. package/lib/commonjs/components/CircularProgress.js.map +1 -1
  17. package/lib/commonjs/components/Container.js.map +1 -1
  18. package/lib/commonjs/components/DatePicker/DatePicker.js.map +1 -1
  19. package/lib/commonjs/components/DatePicker/DatePickerComponent.js.map +1 -1
  20. package/lib/commonjs/components/DeprecatedButton.js +20 -4
  21. package/lib/commonjs/components/DeprecatedButton.js.map +1 -1
  22. package/lib/commonjs/components/DeprecatedCardWrapper.js +14 -2
  23. package/lib/commonjs/components/DeprecatedCardWrapper.js.map +1 -1
  24. package/lib/commonjs/components/DeprecatedFAB.js.map +1 -1
  25. package/lib/commonjs/components/Divider.js.map +1 -1
  26. package/lib/commonjs/components/Elevation.js.map +1 -1
  27. package/lib/commonjs/components/FAB.js.map +1 -1
  28. package/lib/commonjs/components/FieldSearchBarFull.js.map +1 -1
  29. package/lib/commonjs/components/Header.js.map +1 -1
  30. package/lib/commonjs/components/HeaderLarge.js.map +1 -1
  31. package/lib/commonjs/components/HeaderMedium.js.map +1 -1
  32. package/lib/commonjs/components/HeaderOverline.js.map +1 -1
  33. package/lib/commonjs/components/IconButton.js.map +1 -1
  34. package/lib/commonjs/components/Justification.js +3 -0
  35. package/lib/commonjs/components/Portal/Portal.js.map +1 -1
  36. package/lib/commonjs/components/ProgressCircle.js.map +1 -1
  37. package/lib/commonjs/components/ProgressIndicator.js.map +1 -1
  38. package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js.map +1 -1
  39. package/lib/commonjs/components/ResizeMode.js +3 -0
  40. package/lib/commonjs/components/Row.js.map +1 -1
  41. package/lib/commonjs/components/RowBodyIcon.js.map +1 -1
  42. package/lib/commonjs/components/RowHeadlineImageCaption.js.map +1 -1
  43. package/lib/commonjs/components/RowHeadlineImageIcon.js.map +1 -1
  44. package/lib/commonjs/components/StarRating.js.map +1 -1
  45. package/lib/commonjs/components/Surface.js.map +1 -1
  46. package/lib/commonjs/components/Swiper/Swiper.js.map +1 -1
  47. package/lib/commonjs/components/ToggleButton.js.map +1 -1
  48. package/lib/commonjs/interfaces/Icon.js.map +1 -1
  49. package/lib/commonjs/mappings/KeyboardAvoidingView.js +2 -2
  50. package/lib/commonjs/mappings/KeyboardAvoidingView.js.map +1 -1
  51. package/lib/commonjs/mappings/RadioButtonGroup.js.map +1 -1
  52. package/lib/commonjs/mappings/RadioButtonRow.js.map +1 -1
  53. package/lib/module/Provider.js.map +1 -1
  54. package/lib/module/components/ActionSheet/ActionSheetCancel.js.map +1 -1
  55. package/lib/module/components/ActionSheet/ActionSheetItem.js.map +1 -1
  56. package/lib/module/components/AnimatedCircularProgress.js.map +1 -1
  57. package/lib/module/components/AspectRatio.js.map +1 -1
  58. package/lib/module/components/AvatarEdit.js.map +1 -1
  59. package/lib/module/components/Banner.js.map +1 -1
  60. package/lib/module/components/Card.js.map +1 -1
  61. package/lib/module/components/CardBlock.js.map +1 -1
  62. package/lib/module/components/CardContainer.js +15 -5
  63. package/lib/module/components/CardContainer.js.map +1 -1
  64. package/lib/module/components/CardContainerRating.js.map +1 -1
  65. package/lib/module/components/CardContainerShortImage.js.map +1 -1
  66. package/lib/module/components/CardInline.js.map +1 -1
  67. package/lib/module/components/Carousel.js.map +1 -1
  68. package/lib/module/components/CircleImage.js.map +1 -1
  69. package/lib/module/components/CircularProgress.js.map +1 -1
  70. package/lib/module/components/Container.js.map +1 -1
  71. package/lib/module/components/DatePicker/DatePicker.js.map +1 -1
  72. package/lib/module/components/DatePicker/DatePickerComponent.js.map +1 -1
  73. package/lib/module/components/DeprecatedButton.js.map +1 -1
  74. package/lib/module/components/DeprecatedCardWrapper.js.map +1 -1
  75. package/lib/module/components/DeprecatedFAB.js.map +1 -1
  76. package/lib/module/components/Divider.js.map +1 -1
  77. package/lib/module/components/Elevation.js.map +1 -1
  78. package/lib/module/components/FAB.js.map +1 -1
  79. package/lib/module/components/FieldSearchBarFull.js.map +1 -1
  80. package/lib/module/components/Header.js.map +1 -1
  81. package/lib/module/components/HeaderLarge.js.map +1 -1
  82. package/lib/module/components/HeaderMedium.js.map +1 -1
  83. package/lib/module/components/HeaderOverline.js.map +1 -1
  84. package/lib/module/components/IconButton.js.map +1 -1
  85. package/lib/module/components/Justification.js +1 -1
  86. package/lib/module/components/Portal/Portal.js.map +1 -1
  87. package/lib/module/components/ProgressCircle.js.map +1 -1
  88. package/lib/module/components/ProgressIndicator.js.map +1 -1
  89. package/lib/module/components/RadioButton/RadioButtonFieldGroup.js.map +1 -1
  90. package/lib/module/components/ResizeMode.js +1 -1
  91. package/lib/module/components/Row.js.map +1 -1
  92. package/lib/module/components/RowBodyIcon.js.map +1 -1
  93. package/lib/module/components/RowHeadlineImageCaption.js.map +1 -1
  94. package/lib/module/components/RowHeadlineImageIcon.js.map +1 -1
  95. package/lib/module/components/StarRating.js.map +1 -1
  96. package/lib/module/components/Surface.js.map +1 -1
  97. package/lib/module/components/Swiper/Swiper.js.map +1 -1
  98. package/lib/module/components/ToggleButton.js.map +1 -1
  99. package/lib/module/interfaces/Icon.js.map +1 -1
  100. package/lib/module/mappings/KeyboardAvoidingView.js +2 -2
  101. package/lib/module/mappings/KeyboardAvoidingView.js.map +1 -1
  102. package/lib/typescript/src/components/Accordion/AccordionGroup.d.ts +2 -3022
  103. package/lib/typescript/src/components/Accordion/AccordionItem.d.ts +2 -3010
  104. package/lib/typescript/src/components/ActionSheet/ActionSheetCancel.d.ts +1 -1
  105. package/lib/typescript/src/components/ActionSheet/ActionSheetItem.d.ts +1 -1
  106. package/lib/typescript/src/components/AnimatedCircularProgress.d.ts +1 -1
  107. package/lib/typescript/src/components/AspectRatio.d.ts +1 -1
  108. package/lib/typescript/src/components/AvatarEdit.d.ts +2 -2
  109. package/lib/typescript/src/components/Banner.d.ts +2 -2
  110. package/lib/typescript/src/components/Card.d.ts +2 -2
  111. package/lib/typescript/src/components/CardBlock.d.ts +2 -2
  112. package/lib/typescript/src/components/CardContainer.d.ts +2 -2
  113. package/lib/typescript/src/components/CardContainerRating.d.ts +2 -2
  114. package/lib/typescript/src/components/CardContainerShortImage.d.ts +2 -2
  115. package/lib/typescript/src/components/CardInline.d.ts +2 -2
  116. package/lib/typescript/src/components/Carousel.d.ts +4 -7
  117. package/lib/typescript/src/components/CircleImage.d.ts +1 -1
  118. package/lib/typescript/src/components/Container.d.ts +2 -2
  119. package/lib/typescript/src/components/DatePicker/DatePicker.d.ts +2 -2
  120. package/lib/typescript/src/components/DatePicker/DatePickerComponent.d.ts +1 -1
  121. package/lib/typescript/src/components/DeprecatedButton.d.ts +2 -2
  122. package/lib/typescript/src/components/DeprecatedCardWrapper.d.ts +2 -2
  123. package/lib/typescript/src/components/DeprecatedFAB.d.ts +2 -2
  124. package/lib/typescript/src/components/Divider.d.ts +2 -2
  125. package/lib/typescript/src/components/Elevation.d.ts +2 -2
  126. package/lib/typescript/src/components/FAB.d.ts +2 -2
  127. package/lib/typescript/src/components/FieldSearchBarFull.d.ts +2 -2
  128. package/lib/typescript/src/components/Header.d.ts +2 -2
  129. package/lib/typescript/src/components/HeaderLarge.d.ts +2 -2
  130. package/lib/typescript/src/components/HeaderMedium.d.ts +2 -2
  131. package/lib/typescript/src/components/HeaderOverline.d.ts +2 -2
  132. package/lib/typescript/src/components/IconButton.d.ts +2 -2
  133. package/lib/typescript/src/components/ProgressCircle.d.ts +2 -2
  134. package/lib/typescript/src/components/ProgressIndicator.d.ts +2 -2
  135. package/lib/typescript/src/components/RadioButton/RadioButtonFieldGroup.d.ts +2 -2
  136. package/lib/typescript/src/components/Row.d.ts +2 -2
  137. package/lib/typescript/src/components/RowBodyIcon.d.ts +2 -2
  138. package/lib/typescript/src/components/RowHeadlineImageCaption.d.ts +2 -2
  139. package/lib/typescript/src/components/RowHeadlineImageIcon.d.ts +2 -2
  140. package/lib/typescript/src/components/Slider.d.ts +2 -3032
  141. package/lib/typescript/src/components/StarRating.d.ts +2 -2
  142. package/lib/typescript/src/components/Surface.d.ts +2 -2
  143. package/lib/typescript/src/components/Switch.d.ts +2 -3018
  144. package/lib/typescript/src/components/ToggleButton.d.ts +2 -2
  145. package/lib/typescript/src/interfaces/Icon.d.ts +1 -3
  146. package/package.json +4 -4
  147. package/src/Provider.js +9 -0
  148. package/src/Provider.tsx +1 -0
  149. package/src/components/Accordion/AccordionGroup.js +44 -0
  150. package/src/components/Accordion/AccordionItem.js +32 -0
  151. package/src/components/Accordion/index.js +2 -0
  152. package/src/components/ActionSheet/ActionSheet.js +45 -0
  153. package/src/components/ActionSheet/ActionSheetCancel.js +6 -0
  154. package/src/components/ActionSheet/ActionSheetCancel.tsx +1 -1
  155. package/src/components/ActionSheet/ActionSheetItem.js +30 -0
  156. package/src/components/ActionSheet/ActionSheetItem.tsx +6 -1
  157. package/src/components/ActionSheet/index.js +3 -0
  158. package/src/components/AnimatedCircularProgress.js +43 -0
  159. package/src/components/AnimatedCircularProgress.tsx +1 -1
  160. package/src/components/AspectRatio.js +18 -0
  161. package/src/components/AspectRatio.tsx +1 -1
  162. package/src/components/AvatarEdit.js +30 -0
  163. package/src/components/AvatarEdit.tsx +1 -1
  164. package/src/components/Banner.js +109 -0
  165. package/src/components/Banner.tsx +1 -1
  166. package/src/components/Button.js +112 -0
  167. package/src/components/Card.js +57 -0
  168. package/src/components/Card.tsx +1 -1
  169. package/src/components/CardBlock.js +54 -0
  170. package/src/components/CardBlock.tsx +1 -1
  171. package/src/components/CardContainer.js +69 -0
  172. package/src/components/CardContainer.tsx +1 -1
  173. package/src/components/CardContainerRating.js +79 -0
  174. package/src/components/CardContainerRating.tsx +1 -1
  175. package/src/components/CardContainerShortImage.js +33 -0
  176. package/src/components/CardContainerShortImage.tsx +1 -1
  177. package/src/components/CardInline.js +36 -0
  178. package/src/components/CardInline.tsx +1 -1
  179. package/src/components/Carousel.js +66 -0
  180. package/src/components/Carousel.tsx +2 -1
  181. package/src/components/Checkbox/Checkbox.js +63 -0
  182. package/src/components/Checkbox/CheckboxGroup.js +21 -0
  183. package/src/components/Checkbox/CheckboxGroupRow.js +77 -0
  184. package/src/components/Checkbox/CheckboxRow.js +78 -0
  185. package/src/components/Checkbox/context.js +14 -0
  186. package/src/components/Checkbox/index.js +3 -0
  187. package/src/components/CircleImage.js +8 -0
  188. package/src/components/CircleImage.tsx +1 -1
  189. package/src/components/CircularProgress.js +78 -0
  190. package/src/components/CircularProgress.tsx +1 -0
  191. package/src/components/Config.js +63 -0
  192. package/src/components/Container.js +43 -0
  193. package/src/components/Container.tsx +1 -1
  194. package/src/components/DatePicker/DatePicker.js +368 -0
  195. package/src/components/DatePicker/DatePicker.tsx +1 -1
  196. package/src/components/DatePicker/DatePickerComponent.js +13 -0
  197. package/src/components/DatePicker/DatePickerComponent.tsx +1 -1
  198. package/src/components/DatePicker/DatePickerComponent.web.js +30 -0
  199. package/src/components/DatePicker/DatePickerComponentType.js +1 -0
  200. package/src/components/DeprecatedButton.js +95 -0
  201. package/src/components/DeprecatedButton.tsx +1 -1
  202. package/src/components/DeprecatedCardWrapper.js +18 -0
  203. package/src/components/DeprecatedCardWrapper.tsx +1 -1
  204. package/src/components/DeprecatedFAB.js +115 -0
  205. package/src/components/DeprecatedFAB.tsx +1 -1
  206. package/src/components/Divider.js +13 -0
  207. package/src/components/Divider.tsx +1 -1
  208. package/src/components/Elevation.js +20 -0
  209. package/src/components/Elevation.tsx +6 -1
  210. package/src/components/FAB.js +46 -0
  211. package/src/components/FAB.tsx +1 -1
  212. package/src/components/FieldSearchBarFull.js +53 -0
  213. package/src/components/FieldSearchBarFull.tsx +1 -1
  214. package/src/components/FormRow.js +19 -0
  215. package/src/components/Header.js +44 -0
  216. package/src/components/Header.tsx +1 -1
  217. package/src/components/HeaderLarge.js +7 -0
  218. package/src/components/HeaderLarge.tsx +1 -1
  219. package/src/components/HeaderMedium.js +7 -0
  220. package/src/components/HeaderMedium.tsx +1 -1
  221. package/src/components/HeaderOverline.js +7 -0
  222. package/src/components/HeaderOverline.tsx +1 -1
  223. package/src/components/IconButton.js +35 -0
  224. package/src/components/IconButton.tsx +1 -1
  225. package/src/components/Image.js +47 -0
  226. package/src/components/Justification.js +1 -0
  227. package/src/components/Layout.js +50 -0
  228. package/src/components/NumberInput.js +49 -0
  229. package/src/components/Picker/Picker.js +266 -0
  230. package/src/components/Picker/PickerComponent.android.js +68 -0
  231. package/src/components/Picker/PickerComponent.ios.js +78 -0
  232. package/src/components/Picker/PickerComponent.web.js +69 -0
  233. package/src/components/Picker/PickerTypes.js +1 -0
  234. package/src/components/Portal/Portal.js +35 -0
  235. package/src/components/Portal/Portal.tsx +1 -0
  236. package/src/components/Portal/PortalConsumer.js +28 -0
  237. package/src/components/Portal/PortalHost.js +105 -0
  238. package/src/components/Portal/PortalManager.js +29 -0
  239. package/src/components/ProgressBar.js +118 -0
  240. package/src/components/ProgressCircle.js +13 -0
  241. package/src/components/ProgressCircle.tsx +2 -1
  242. package/src/components/ProgressIndicator.js +27 -0
  243. package/src/components/ProgressIndicator.tsx +1 -1
  244. package/src/components/RadioButton/RadioButton.js +17 -0
  245. package/src/components/RadioButton/RadioButtonFieldGroup.js +17 -0
  246. package/src/components/RadioButton/RadioButtonFieldGroup.tsx +1 -1
  247. package/src/components/RadioButton/RadioButtonGroup.js +43 -0
  248. package/src/components/RadioButton/RadioButtonRow.js +76 -0
  249. package/src/components/RadioButton/context.js +14 -0
  250. package/src/components/RadioButton/index.js +4 -0
  251. package/src/components/ResizeMode.js +1 -0
  252. package/src/components/Row.js +48 -0
  253. package/src/components/Row.tsx +1 -1
  254. package/src/components/RowBodyIcon.js +8 -0
  255. package/src/components/RowBodyIcon.tsx +1 -1
  256. package/src/components/RowHeadlineImageCaption.js +12 -0
  257. package/src/components/RowHeadlineImageCaption.tsx +1 -1
  258. package/src/components/RowHeadlineImageIcon.js +14 -0
  259. package/src/components/RowHeadlineImageIcon.tsx +1 -1
  260. package/src/components/ScreenContainer.js +34 -0
  261. package/src/components/Slider.js +63 -0
  262. package/src/components/StarRating.js +50 -0
  263. package/src/components/StarRating.tsx +2 -2
  264. package/src/components/StepIndicator.js +346 -0
  265. package/src/components/Stepper.js +39 -0
  266. package/src/components/Surface.js +32 -0
  267. package/src/components/Surface.tsx +1 -1
  268. package/src/components/Swiper/Swiper.js +29 -0
  269. package/src/components/Swiper/Swiper.tsx +1 -0
  270. package/src/components/Swiper/SwiperItem.js +9 -0
  271. package/src/components/Swiper/index.js +2 -0
  272. package/src/components/Switch.js +56 -0
  273. package/src/components/Text.js +28 -0
  274. package/src/components/TextField.js +420 -0
  275. package/src/components/ToggleButton.js +39 -0
  276. package/src/components/ToggleButton.tsx +1 -1
  277. package/src/components/Touchable.js +12 -0
  278. package/src/components/Touchable.web.js +2 -0
  279. package/src/components/Typography.js +36 -0
  280. package/src/components/useAuthState.js +31 -0
  281. package/src/constants.js +10 -0
  282. package/src/hooks.js +12 -0
  283. package/src/index.js +52 -0
  284. package/src/interfaces/Icon.js +8 -0
  285. package/src/interfaces/Icon.ts +1 -1
  286. package/src/mappings/Accordion.js +41 -0
  287. package/src/mappings/AccordionItem.js +16 -0
  288. package/src/mappings/ActionSheet.js +13 -0
  289. package/src/mappings/ActionSheetCancel.js +19 -0
  290. package/src/mappings/ActionSheetItem.js +23 -0
  291. package/src/mappings/ActivityIndicator.js +53 -0
  292. package/src/mappings/AudioPlayer.js +20 -0
  293. package/src/mappings/AvatarEdit.js +37 -0
  294. package/src/mappings/Banner.js +32 -0
  295. package/src/mappings/BlurView.js +41 -0
  296. package/src/mappings/Button.js +56 -0
  297. package/src/mappings/Card.js +52 -0
  298. package/src/mappings/CardBlock.js +122 -0
  299. package/src/mappings/CardContainer.js +102 -0
  300. package/src/mappings/CardContainerRating.js +124 -0
  301. package/src/mappings/CardContainerShortImage.js +118 -0
  302. package/src/mappings/CardInline.js +51 -0
  303. package/src/mappings/Carousel.js +18 -0
  304. package/src/mappings/Checkbox.js +45 -0
  305. package/src/mappings/CheckboxGroup.js +25 -0
  306. package/src/mappings/CheckboxRow.js +56 -0
  307. package/src/mappings/CircleImage.js +24 -0
  308. package/src/mappings/Container.js +29 -0
  309. package/src/mappings/CustomCode.js +8 -0
  310. package/src/mappings/DatePicker.js +147 -0
  311. package/src/mappings/Divider.js +26 -0
  312. package/src/mappings/FAB.js +36 -0
  313. package/src/mappings/Fetch.js +12 -0
  314. package/src/mappings/FieldSearchBarFull.js +49 -0
  315. package/src/mappings/FlatList.js +19 -0
  316. package/src/mappings/HeaderLarge.js +28 -0
  317. package/src/mappings/HeaderMedium.js +54 -0
  318. package/src/mappings/HeaderOverline.js +54 -0
  319. package/src/mappings/Icon.js +25 -0
  320. package/src/mappings/IconButton.js +30 -0
  321. package/src/mappings/Image.js +15 -0
  322. package/src/mappings/ImageBackground.js +28 -0
  323. package/src/mappings/KeyboardAvoidingView.js +40 -0
  324. package/src/mappings/KeyboardAvoidingView.ts +2 -2
  325. package/src/mappings/KeyboardAwareScrollView.js +49 -0
  326. package/src/mappings/Layout.js +195 -0
  327. package/src/mappings/LinearGradient.js +77 -0
  328. package/src/mappings/MapCallout.js +21 -0
  329. package/src/mappings/MapMarker.js +47 -0
  330. package/src/mappings/MapView.js +138 -0
  331. package/src/mappings/Modal.js +41 -0
  332. package/src/mappings/Picker.js +139 -0
  333. package/src/mappings/ProgressBar.js +100 -0
  334. package/src/mappings/ProgressCircle.js +108 -0
  335. package/src/mappings/ProgressIndicator.js +180 -0
  336. package/src/mappings/RadioButton.js +50 -0
  337. package/src/mappings/RadioButtonGroup.js +16 -0
  338. package/src/mappings/RadioButtonRow.js +37 -0
  339. package/src/mappings/RowBodyIcon.js +75 -0
  340. package/src/mappings/RowHeadlineImageCaption.js +167 -0
  341. package/src/mappings/RowHeadlineImageIcon.js +99 -0
  342. package/src/mappings/SafeAreaView.js +33 -0
  343. package/src/mappings/ScrollView.js +30 -0
  344. package/src/mappings/Slider.js +59 -0
  345. package/src/mappings/StarRating.js +42 -0
  346. package/src/mappings/Stepper.js +28 -0
  347. package/src/mappings/Surface.js +13 -0
  348. package/src/mappings/Swiper.js +60 -0
  349. package/src/mappings/SwiperItem.js +8 -0
  350. package/src/mappings/Switch.js +75 -0
  351. package/src/mappings/Text.js +232 -0
  352. package/src/mappings/TextArea.js +52 -0
  353. package/src/mappings/TextField.js +158 -0
  354. package/src/mappings/TextInput.js +208 -0
  355. package/src/mappings/ToggleButton.js +45 -0
  356. package/src/mappings/Touchable.js +12 -0
  357. package/src/mappings/Video.js +74 -0
  358. package/src/mappings/View.js +206 -0
  359. package/src/mappings/WebView.js +18 -0
  360. package/src/styles/DarkTheme.js +26 -0
  361. package/src/styles/DefaultTheme.js +111 -0
  362. package/src/styles/fonts.js +62 -0
  363. package/src/styles/overlay.js +60 -0
  364. package/src/styles/shadow.js +51 -0
  365. package/src/theming.js +3 -0
  366. package/src/utilities.js +102 -0
@@ -1 +1 @@
1
- {"version":3,"names":["ProgressCircle","progress","style","color","size","showsText","unfilledColor","strokeCap","textStyle","thickness","theme","progressNum","Math","round","tintColor","colors","primary","backgroundColor","secondary","fill","fontSize","withTheme"],"sources":["ProgressCircle.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Text, StyleProp, ViewStyle, TextStyle } from \"react-native\";\nimport AnimatedCircularProgress from \"./AnimatedCircularProgress\";\nimport { withTheme } from \"../theming\";\nimport themeT from \"../styles/DefaultTheme\";\nimport { colorTypes } from \"@draftbit/types\";\n\ntype Props = {\n progress?: number;\n style?: StyleProp<ViewStyle>;\n color?: colorTypes;\n size?: number;\n showsText?: boolean;\n unfilledColor?: colorTypes;\n strokeCap?: \"butt\" | \"square\" | \"round\" | undefined;\n textStyle?: StyleProp<TextStyle>;\n thickness?: number;\n theme: typeof themeT;\n};\n\nconst ProgressCircle: React.FC<Props> = ({\n progress = 0.5,\n style,\n color = \"primary\",\n size = 100,\n showsText = true,\n unfilledColor,\n strokeCap = \"butt\",\n textStyle,\n thickness = 1,\n theme,\n}) => {\n const progressNum = Math.round(progress * 100);\n\n const tintColor = color || theme.colors.primary;\n const backgroundColor = unfilledColor || theme.colors.secondary;\n\n return (\n <AnimatedCircularProgress\n size={size}\n width={thickness}\n backgroundWidth={thickness}\n fill={progressNum}\n tintColor={tintColor}\n backgroundColor={backgroundColor}\n rotation={0}\n lineCap={strokeCap}\n style={style}\n >\n {(fill) =>\n showsText ? (\n <Text\n style={[{ fontSize: size * 0.275, color: tintColor }, textStyle]}\n >\n {Math.round(fill)}%\n </Text>\n ) : null\n }\n </AnimatedCircularProgress>\n );\n};\n\nexport default withTheme(ProgressCircle);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;AAiBA,MAAMA,cAA+B,GAAG,QAWlC;EAAA,IAXmC;IACvCC,QAAQ,GAAG,GAD4B;IAEvCC,KAFuC;IAGvCC,KAAK,GAAG,SAH+B;IAIvCC,IAAI,GAAG,GAJgC;IAKvCC,SAAS,GAAG,IAL2B;IAMvCC,aANuC;IAOvCC,SAAS,GAAG,MAP2B;IAQvCC,SARuC;IASvCC,SAAS,GAAG,CAT2B;IAUvCC;EAVuC,CAWnC;EACJ,MAAMC,WAAW,GAAGC,IAAI,CAACC,KAAL,CAAWZ,QAAQ,GAAG,GAAtB,CAApB;EAEA,MAAMa,SAAS,GAAGX,KAAK,IAAIO,KAAK,CAACK,MAAN,CAAaC,OAAxC;EACA,MAAMC,eAAe,GAAGX,aAAa,IAAII,KAAK,CAACK,MAAN,CAAaG,SAAtD;EAEA,oBACE,oBAAC,iCAAD;IACE,IAAI,EAAEd,IADR;IAEE,KAAK,EAAEK,SAFT;IAGE,eAAe,EAAEA,SAHnB;IAIE,IAAI,EAAEE,WAJR;IAKE,SAAS,EAAEG,SALb;IAME,eAAe,EAAEG,eANnB;IAOE,QAAQ,EAAE,CAPZ;IAQE,OAAO,EAAEV,SARX;IASE,KAAK,EAAEL;EATT,GAWIiB,IAAD,IACCd,SAAS,gBACP,oBAAC,iBAAD;IACE,KAAK,EAAE,CAAC;MAAEe,QAAQ,EAAEhB,IAAI,GAAG,KAAnB;MAA0BD,KAAK,EAAEW;IAAjC,CAAD,EAA+CN,SAA/C;EADT,GAGGI,IAAI,CAACC,KAAL,CAAWM,IAAX,CAHH,MADO,GAML,IAlBR,CADF;AAuBD,CAxCD;;eA0Ce,IAAAE,kBAAA,EAAUrB,cAAV,C"}
1
+ {"version":3,"names":["ProgressCircle","progress","style","color","size","showsText","unfilledColor","strokeCap","textStyle","thickness","theme","progressNum","Math","round","tintColor","colors","primary","backgroundColor","secondary","fill","fontSize","withTheme"],"sources":["ProgressCircle.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Text, StyleProp, ViewStyle, TextStyle } from \"react-native\";\nimport AnimatedCircularProgress from \"./AnimatedCircularProgress\";\nimport { withTheme } from \"../theming\";\nimport themeT from \"../styles/DefaultTheme\";\nimport { colorTypes } from \"@draftbit/types\";\n\ntype Props = {\n progress?: number;\n style?: StyleProp<ViewStyle>;\n color?: colorTypes;\n size?: number;\n showsText?: boolean;\n unfilledColor?: colorTypes;\n strokeCap?: \"butt\" | \"square\" | \"round\" | undefined;\n textStyle?: StyleProp<TextStyle>;\n thickness?: number;\n theme: typeof themeT;\n};\n\nconst ProgressCircle: React.FC<React.PropsWithChildren<Props>> = ({\n progress = 0.5,\n style,\n color = \"primary\",\n size = 100,\n showsText = true,\n unfilledColor,\n strokeCap = \"butt\",\n textStyle,\n thickness = 1,\n theme,\n}) => {\n const progressNum = Math.round(progress * 100);\n\n const tintColor = color || theme.colors.primary;\n const backgroundColor = unfilledColor || theme.colors.secondary;\n\n return (\n <AnimatedCircularProgress\n size={size}\n width={thickness}\n backgroundWidth={thickness}\n fill={progressNum}\n tintColor={tintColor}\n backgroundColor={backgroundColor}\n rotation={0}\n lineCap={strokeCap}\n style={style}\n >\n {/* @ts-ignore */}\n {(fill) =>\n showsText ? (\n <Text\n style={[{ fontSize: size * 0.275, color: tintColor }, textStyle]}\n >\n {Math.round(fill)}%\n </Text>\n ) : null\n }\n </AnimatedCircularProgress>\n );\n};\n\nexport default withTheme(ProgressCircle);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;AAiBA,MAAMA,cAAwD,GAAG,QAW3D;EAAA,IAX4D;IAChEC,QAAQ,GAAG,GADqD;IAEhEC,KAFgE;IAGhEC,KAAK,GAAG,SAHwD;IAIhEC,IAAI,GAAG,GAJyD;IAKhEC,SAAS,GAAG,IALoD;IAMhEC,aANgE;IAOhEC,SAAS,GAAG,MAPoD;IAQhEC,SARgE;IAShEC,SAAS,GAAG,CAToD;IAUhEC;EAVgE,CAW5D;EACJ,MAAMC,WAAW,GAAGC,IAAI,CAACC,KAAL,CAAWZ,QAAQ,GAAG,GAAtB,CAApB;EAEA,MAAMa,SAAS,GAAGX,KAAK,IAAIO,KAAK,CAACK,MAAN,CAAaC,OAAxC;EACA,MAAMC,eAAe,GAAGX,aAAa,IAAII,KAAK,CAACK,MAAN,CAAaG,SAAtD;EAEA,oBACE,oBAAC,iCAAD;IACE,IAAI,EAAEd,IADR;IAEE,KAAK,EAAEK,SAFT;IAGE,eAAe,EAAEA,SAHnB;IAIE,IAAI,EAAEE,WAJR;IAKE,SAAS,EAAEG,SALb;IAME,eAAe,EAAEG,eANnB;IAOE,QAAQ,EAAE,CAPZ;IAQE,OAAO,EAAEV,SARX;IASE,KAAK,EAAEL;EATT,GAYIiB,IAAD,IACCd,SAAS,gBACP,oBAAC,iBAAD;IACE,KAAK,EAAE,CAAC;MAAEe,QAAQ,EAAEhB,IAAI,GAAG,KAAnB;MAA0BD,KAAK,EAAEW;IAAjC,CAAD,EAA+CN,SAA/C;EADT,GAGGI,IAAI,CAACC,KAAL,CAAWM,IAAX,CAHH,MADO,GAML,IAnBR,CADF;AAwBD,CAzCD;;eA2Ce,IAAAE,kBAAA,EAAUrB,cAAV,C"}
@@ -1 +1 @@
1
- {"version":3,"names":["ProgressIndicator","numberOfSteps","currentStep","currentStepStrokeWidth","stepStrokeCurrentColor","stepIndicatorSize","currentStepIndicatorSize","stepIndicatorCurrentColor","stepIndicatorLabelCurrentColor","stepIndicatorLabelFontSize","stepNumberFinishedColor","stepNumberUnfinishedColor","unfinishedColor","finishedColor","theme","currentPosition","stepStrokeFinishedColor","stepStrokeUnFinishedColor","separatorFinishedColor","separatorUnFinishedColor","stepIndicatorFinishedColor","stepIndicatorUnFinishedColor","stepIndicatorLabelUnFinishedColor","stepIndicatorLabelFinishedColor","labelFontFamily","typography","body1","fontFamily","withTheme"],"sources":["ProgressIndicator.tsx"],"sourcesContent":["import * as React from \"react\";\nimport StepIndicator from \"./StepIndicator\";\nimport { withTheme } from \"../theming\";\nimport themeT from \"../styles/DefaultTheme\";\nimport { colorTypes } from \"@draftbit/types\";\n\ntype Props = {\n numberOfSteps: number;\n currentStep: number;\n currentStepStrokeWidth?: number;\n stepStrokeCurrentColor?: colorTypes;\n stepIndicatorSize?: number;\n currentStepIndicatorSize?: number;\n stepIndicatorCurrentColor?: colorTypes;\n stepIndicatorLabelCurrentColor?: colorTypes;\n stepIndicatorLabelFontSize?: number;\n stepNumberFinishedColor?: colorTypes;\n stepNumberUnfinishedColor?: colorTypes;\n unfinishedColor?: colorTypes;\n finishedColor?: colorTypes;\n theme: typeof themeT;\n};\n\nconst ProgressIndicator: React.FC<Props> = ({\n numberOfSteps,\n currentStep,\n currentStepStrokeWidth = 3,\n stepStrokeCurrentColor = \"primary\",\n stepIndicatorSize,\n currentStepIndicatorSize,\n stepIndicatorCurrentColor,\n stepIndicatorLabelCurrentColor,\n stepIndicatorLabelFontSize = 12,\n stepNumberFinishedColor = \"strongInverse\",\n stepNumberUnfinishedColor = \"primary\",\n unfinishedColor = \"light\",\n finishedColor = \"primary\",\n theme,\n}) => {\n const currentPosition = currentStep - 1;\n return (\n <StepIndicator\n stepCount={numberOfSteps}\n currentPosition={currentPosition}\n customStyles={{\n stepIndicatorSize,\n currentStepIndicatorSize: currentStepIndicatorSize\n ? currentStepIndicatorSize\n : stepIndicatorSize,\n stepStrokeFinishedColor: finishedColor,\n stepStrokeUnFinishedColor: unfinishedColor,\n separatorFinishedColor: finishedColor,\n separatorUnFinishedColor: unfinishedColor,\n stepIndicatorFinishedColor: finishedColor,\n stepIndicatorUnFinishedColor: unfinishedColor,\n currentStepStrokeWidth,\n stepStrokeCurrentColor:\n stepStrokeCurrentColor || stepIndicatorCurrentColor,\n stepIndicatorLabelUnFinishedColor: stepNumberUnfinishedColor,\n stepIndicatorLabelFinishedColor: stepNumberFinishedColor,\n stepIndicatorCurrentColor: stepIndicatorCurrentColor || unfinishedColor,\n stepIndicatorLabelCurrentColor:\n stepIndicatorLabelCurrentColor || stepNumberUnfinishedColor,\n stepIndicatorLabelFontSize,\n labelFontFamily: theme.typography.body1.fontFamily,\n }}\n />\n );\n};\n\nexport default withTheme(ProgressIndicator);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AAqBA,MAAMA,iBAAkC,GAAG,QAerC;EAAA,IAfsC;IAC1CC,aAD0C;IAE1CC,WAF0C;IAG1CC,sBAAsB,GAAG,CAHiB;IAI1CC,sBAAsB,GAAG,SAJiB;IAK1CC,iBAL0C;IAM1CC,wBAN0C;IAO1CC,yBAP0C;IAQ1CC,8BAR0C;IAS1CC,0BAA0B,GAAG,EATa;IAU1CC,uBAAuB,GAAG,eAVgB;IAW1CC,yBAAyB,GAAG,SAXc;IAY1CC,eAAe,GAAG,OAZwB;IAa1CC,aAAa,GAAG,SAb0B;IAc1CC;EAd0C,CAetC;EACJ,MAAMC,eAAe,GAAGb,WAAW,GAAG,CAAtC;EACA,oBACE,oBAAC,sBAAD;IACE,SAAS,EAAED,aADb;IAEE,eAAe,EAAEc,eAFnB;IAGE,YAAY,EAAE;MACZV,iBADY;MAEZC,wBAAwB,EAAEA,wBAAwB,GAC9CA,wBAD8C,GAE9CD,iBAJQ;MAKZW,uBAAuB,EAAEH,aALb;MAMZI,yBAAyB,EAAEL,eANf;MAOZM,sBAAsB,EAAEL,aAPZ;MAQZM,wBAAwB,EAAEP,eARd;MASZQ,0BAA0B,EAAEP,aAThB;MAUZQ,4BAA4B,EAAET,eAVlB;MAWZT,sBAXY;MAYZC,sBAAsB,EACpBA,sBAAsB,IAAIG,yBAbhB;MAcZe,iCAAiC,EAAEX,yBAdvB;MAeZY,+BAA+B,EAAEb,uBAfrB;MAgBZH,yBAAyB,EAAEA,yBAAyB,IAAIK,eAhB5C;MAiBZJ,8BAA8B,EAC5BA,8BAA8B,IAAIG,yBAlBxB;MAmBZF,0BAnBY;MAoBZe,eAAe,EAAEV,KAAK,CAACW,UAAN,CAAiBC,KAAjB,CAAuBC;IApB5B;EAHhB,EADF;AA4BD,CA7CD;;eA+Ce,IAAAC,kBAAA,EAAU5B,iBAAV,C"}
1
+ {"version":3,"names":["ProgressIndicator","numberOfSteps","currentStep","currentStepStrokeWidth","stepStrokeCurrentColor","stepIndicatorSize","currentStepIndicatorSize","stepIndicatorCurrentColor","stepIndicatorLabelCurrentColor","stepIndicatorLabelFontSize","stepNumberFinishedColor","stepNumberUnfinishedColor","unfinishedColor","finishedColor","theme","currentPosition","stepStrokeFinishedColor","stepStrokeUnFinishedColor","separatorFinishedColor","separatorUnFinishedColor","stepIndicatorFinishedColor","stepIndicatorUnFinishedColor","stepIndicatorLabelUnFinishedColor","stepIndicatorLabelFinishedColor","labelFontFamily","typography","body1","fontFamily","withTheme"],"sources":["ProgressIndicator.tsx"],"sourcesContent":["import * as React from \"react\";\nimport StepIndicator from \"./StepIndicator\";\nimport { withTheme } from \"../theming\";\nimport themeT from \"../styles/DefaultTheme\";\nimport { colorTypes } from \"@draftbit/types\";\n\ntype Props = {\n numberOfSteps: number;\n currentStep: number;\n currentStepStrokeWidth?: number;\n stepStrokeCurrentColor?: colorTypes;\n stepIndicatorSize?: number;\n currentStepIndicatorSize?: number;\n stepIndicatorCurrentColor?: colorTypes;\n stepIndicatorLabelCurrentColor?: colorTypes;\n stepIndicatorLabelFontSize?: number;\n stepNumberFinishedColor?: colorTypes;\n stepNumberUnfinishedColor?: colorTypes;\n unfinishedColor?: colorTypes;\n finishedColor?: colorTypes;\n theme: typeof themeT;\n};\n\nconst ProgressIndicator: React.FC<React.PropsWithChildren<Props>> = ({\n numberOfSteps,\n currentStep,\n currentStepStrokeWidth = 3,\n stepStrokeCurrentColor = \"primary\",\n stepIndicatorSize,\n currentStepIndicatorSize,\n stepIndicatorCurrentColor,\n stepIndicatorLabelCurrentColor,\n stepIndicatorLabelFontSize = 12,\n stepNumberFinishedColor = \"strongInverse\",\n stepNumberUnfinishedColor = \"primary\",\n unfinishedColor = \"light\",\n finishedColor = \"primary\",\n theme,\n}) => {\n const currentPosition = currentStep - 1;\n return (\n <StepIndicator\n stepCount={numberOfSteps}\n currentPosition={currentPosition}\n customStyles={{\n stepIndicatorSize,\n currentStepIndicatorSize: currentStepIndicatorSize\n ? currentStepIndicatorSize\n : stepIndicatorSize,\n stepStrokeFinishedColor: finishedColor,\n stepStrokeUnFinishedColor: unfinishedColor,\n separatorFinishedColor: finishedColor,\n separatorUnFinishedColor: unfinishedColor,\n stepIndicatorFinishedColor: finishedColor,\n stepIndicatorUnFinishedColor: unfinishedColor,\n currentStepStrokeWidth,\n stepStrokeCurrentColor:\n stepStrokeCurrentColor || stepIndicatorCurrentColor,\n stepIndicatorLabelUnFinishedColor: stepNumberUnfinishedColor,\n stepIndicatorLabelFinishedColor: stepNumberFinishedColor,\n stepIndicatorCurrentColor: stepIndicatorCurrentColor || unfinishedColor,\n stepIndicatorLabelCurrentColor:\n stepIndicatorLabelCurrentColor || stepNumberUnfinishedColor,\n stepIndicatorLabelFontSize,\n labelFontFamily: theme.typography.body1.fontFamily,\n }}\n />\n );\n};\n\nexport default withTheme(ProgressIndicator);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AAqBA,MAAMA,iBAA2D,GAAG,QAe9D;EAAA,IAf+D;IACnEC,aADmE;IAEnEC,WAFmE;IAGnEC,sBAAsB,GAAG,CAH0C;IAInEC,sBAAsB,GAAG,SAJ0C;IAKnEC,iBALmE;IAMnEC,wBANmE;IAOnEC,yBAPmE;IAQnEC,8BARmE;IASnEC,0BAA0B,GAAG,EATsC;IAUnEC,uBAAuB,GAAG,eAVyC;IAWnEC,yBAAyB,GAAG,SAXuC;IAYnEC,eAAe,GAAG,OAZiD;IAanEC,aAAa,GAAG,SAbmD;IAcnEC;EAdmE,CAe/D;EACJ,MAAMC,eAAe,GAAGb,WAAW,GAAG,CAAtC;EACA,oBACE,oBAAC,sBAAD;IACE,SAAS,EAAED,aADb;IAEE,eAAe,EAAEc,eAFnB;IAGE,YAAY,EAAE;MACZV,iBADY;MAEZC,wBAAwB,EAAEA,wBAAwB,GAC9CA,wBAD8C,GAE9CD,iBAJQ;MAKZW,uBAAuB,EAAEH,aALb;MAMZI,yBAAyB,EAAEL,eANf;MAOZM,sBAAsB,EAAEL,aAPZ;MAQZM,wBAAwB,EAAEP,eARd;MASZQ,0BAA0B,EAAEP,aAThB;MAUZQ,4BAA4B,EAAET,eAVlB;MAWZT,sBAXY;MAYZC,sBAAsB,EACpBA,sBAAsB,IAAIG,yBAbhB;MAcZe,iCAAiC,EAAEX,yBAdvB;MAeZY,+BAA+B,EAAEb,uBAfrB;MAgBZH,yBAAyB,EAAEA,yBAAyB,IAAIK,eAhB5C;MAiBZJ,8BAA8B,EAC5BA,8BAA8B,IAAIG,yBAlBxB;MAmBZF,0BAnBY;MAoBZe,eAAe,EAAEV,KAAK,CAACW,UAAN,CAAiBC,KAAjB,CAAuBC;IApB5B;EAHhB,EADF;AA4BD,CA7CD;;eA+Ce,IAAAC,kBAAA,EAAU5B,iBAAV,C"}
@@ -1 +1 @@
1
- {"version":3,"names":["RadioButtonFieldGroup","label","children","theme","labelStyle","style","rest","fontSize","typography","headline4","color","withTheme"],"sources":["RadioButtonFieldGroup.tsx"],"sourcesContent":["import React from \"react\";\nimport { View, StyleProp, TextStyle, ViewStyle } from \"react-native\";\nimport Text from \"../Text\";\nimport { withTheme } from \"../../theming\";\nimport RadioButtonGroup, { RadioButtonGroupProps } from \"./RadioButtonGroup\";\n\ninterface Props extends RadioButtonGroupProps {\n label?: string;\n labelStyle?: StyleProp<TextStyle>;\n style?: StyleProp<ViewStyle>;\n}\n\nconst RadioButtonFieldGroup: React.FC<Props> = ({\n label,\n children,\n theme,\n labelStyle,\n style,\n ...rest\n}) => {\n return (\n <View style={style}>\n <Text\n style={[\n {\n fontSize: theme.typography.headline4.fontSize,\n color: theme.typography.headline4.color,\n },\n labelStyle,\n ]}\n >\n {label}\n </Text>\n <RadioButtonGroup theme={theme} {...rest}>\n {children}\n </RadioButtonGroup>\n </View>\n );\n};\n\nexport default withTheme(RadioButtonFieldGroup);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;AAQA,MAAMA,qBAAsC,GAAG,QAOzC;EAAA,IAP0C;IAC9CC,KAD8C;IAE9CC,QAF8C;IAG9CC,KAH8C;IAI9CC,UAJ8C;IAK9CC,KAL8C;IAM9C,GAAGC;EAN2C,CAO1C;EACJ,oBACE,6BAAC,iBAAD;IAAM,KAAK,EAAED;EAAb,gBACE,6BAAC,aAAD;IACE,KAAK,EAAE,CACL;MACEE,QAAQ,EAAEJ,KAAK,CAACK,UAAN,CAAiBC,SAAjB,CAA2BF,QADvC;MAEEG,KAAK,EAAEP,KAAK,CAACK,UAAN,CAAiBC,SAAjB,CAA2BC;IAFpC,CADK,EAKLN,UALK;EADT,GASGH,KATH,CADF,eAYE,6BAAC,yBAAD;IAAkB,KAAK,EAAEE;EAAzB,GAAoCG,IAApC,GACGJ,QADH,CAZF,CADF;AAkBD,CA1BD;;eA4Be,IAAAS,kBAAA,EAAUX,qBAAV,C"}
1
+ {"version":3,"names":["RadioButtonFieldGroup","label","children","theme","labelStyle","style","rest","fontSize","typography","headline4","color","withTheme"],"sources":["RadioButtonFieldGroup.tsx"],"sourcesContent":["import React from \"react\";\nimport { View, StyleProp, TextStyle, ViewStyle } from \"react-native\";\nimport Text from \"../Text\";\nimport { withTheme } from \"../../theming\";\nimport RadioButtonGroup, { RadioButtonGroupProps } from \"./RadioButtonGroup\";\n\ninterface Props extends RadioButtonGroupProps {\n label?: string;\n labelStyle?: StyleProp<TextStyle>;\n style?: StyleProp<ViewStyle>;\n}\n\nconst RadioButtonFieldGroup: React.FC<React.PropsWithChildren<Props>> = ({\n label,\n children,\n theme,\n labelStyle,\n style,\n ...rest\n}) => {\n return (\n <View style={style}>\n <Text\n style={[\n {\n fontSize: theme.typography.headline4.fontSize,\n color: theme.typography.headline4.color,\n },\n labelStyle,\n ]}\n >\n {label}\n </Text>\n <RadioButtonGroup theme={theme} {...rest}>\n {children}\n </RadioButtonGroup>\n </View>\n );\n};\n\nexport default withTheme(RadioButtonFieldGroup);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;AAQA,MAAMA,qBAA+D,GAAG,QAOlE;EAAA,IAPmE;IACvEC,KADuE;IAEvEC,QAFuE;IAGvEC,KAHuE;IAIvEC,UAJuE;IAKvEC,KALuE;IAMvE,GAAGC;EANoE,CAOnE;EACJ,oBACE,6BAAC,iBAAD;IAAM,KAAK,EAAED;EAAb,gBACE,6BAAC,aAAD;IACE,KAAK,EAAE,CACL;MACEE,QAAQ,EAAEJ,KAAK,CAACK,UAAN,CAAiBC,SAAjB,CAA2BF,QADvC;MAEEG,KAAK,EAAEP,KAAK,CAACK,UAAN,CAAiBC,SAAjB,CAA2BC;IAFpC,CADK,EAKLN,UALK;EADT,GASGH,KATH,CADF,eAYE,6BAAC,yBAAD;IAAkB,KAAK,EAAEE;EAAzB,GAAoCG,IAApC,GACGJ,QADH,CAZF,CADF;AAkBD,CA1BD;;eA4Be,IAAAS,kBAAA,EAAUX,qBAAV,C"}
@@ -1,2 +1,5 @@
1
1
  "use strict";
2
+ //# sourceMappingURL=ResizeMode.js.mapodule", {
3
+ value: true
4
+ });
2
5
  //# sourceMappingURL=ResizeMode.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Row","titleTypeStyle","titleColor","subtitleTypeStyle","subtitleColor","title","subtitle","multilineSubtitle","image","right","style","styles","container","padding","leftContainer","uri","marginRight","width","Config","rowMultiLineImageSize","rowSingleLineImageSize","height","textContainer","color","marginTop","undefined","StyleSheet","create","flexDirection","flex","justifyContent","alignItems","withTheme"],"sources":["Row.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n View,\n Text,\n Image,\n ImageSourcePropType,\n StyleSheet,\n StyleProp,\n TextStyle,\n ViewStyle,\n} from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport Config from \"./Config\";\nimport theme from \"../styles/DefaultTheme\";\n\ntype Props = {\n titleTypeStyle?: StyleProp<TextStyle>;\n titleColor?: string;\n subtitleTypeStyle?: StyleProp<TextStyle>;\n subtitleColor?: string;\n title?: string;\n subtitle?: string;\n multilineSubtitle?: boolean;\n image?: string | ImageSourcePropType;\n right?: () => React.ReactNode;\n style?: StyleProp<ViewStyle>;\n theme: typeof theme;\n};\n\nconst Row: React.FC<Props> = ({\n titleTypeStyle,\n titleColor,\n subtitleTypeStyle,\n subtitleColor,\n title,\n subtitle,\n multilineSubtitle,\n image,\n right,\n style,\n}) => {\n return (\n <View style={[styles.container, { padding: 16 }, style]}>\n <View style={styles.leftContainer}>\n {image && (\n <Image\n source={typeof image === \"string\" ? { uri: image } : image}\n style={{\n marginRight: 12,\n width: subtitle\n ? Config.rowMultiLineImageSize\n : Config.rowSingleLineImageSize,\n height: subtitle\n ? Config.rowMultiLineImageSize\n : Config.rowSingleLineImageSize,\n }}\n />\n )}\n <View style={styles.textContainer}>\n <Text\n style={[\n titleTypeStyle,\n {\n color: titleColor,\n },\n ]}\n numberOfLines={1}\n >\n {title}\n </Text>\n {subtitle ? (\n <Text\n style={[\n subtitleTypeStyle,\n {\n color: subtitleColor,\n marginTop: 4,\n },\n ]}\n numberOfLines={multilineSubtitle ? undefined : 1}\n >\n {subtitle}\n </Text>\n ) : null}\n </View>\n </View>\n {right && right()}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n leftContainer: {\n flexDirection: \"row\",\n flex: 1,\n },\n container: {\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n },\n textContainer: {\n flex: 1,\n justifyContent: \"center\",\n },\n});\n\nexport default withTheme(Row);\n"],"mappings":";;;;;;;AAAA;;AACA;;AAUA;;AACA;;;;;;;;AAiBA,MAAMA,GAAoB,GAAG,QAWvB;EAAA,IAXwB;IAC5BC,cAD4B;IAE5BC,UAF4B;IAG5BC,iBAH4B;IAI5BC,aAJ4B;IAK5BC,KAL4B;IAM5BC,QAN4B;IAO5BC,iBAP4B;IAQ5BC,KAR4B;IAS5BC,KAT4B;IAU5BC;EAV4B,CAWxB;EACJ,oBACE,oBAAC,iBAAD;IAAM,KAAK,EAAE,CAACC,MAAM,CAACC,SAAR,EAAmB;MAAEC,OAAO,EAAE;IAAX,CAAnB,EAAoCH,KAApC;EAAb,gBACE,oBAAC,iBAAD;IAAM,KAAK,EAAEC,MAAM,CAACG;EAApB,GACGN,KAAK,iBACJ,oBAAC,kBAAD;IACE,MAAM,EAAE,OAAOA,KAAP,KAAiB,QAAjB,GAA4B;MAAEO,GAAG,EAAEP;IAAP,CAA5B,GAA6CA,KADvD;IAEE,KAAK,EAAE;MACLQ,WAAW,EAAE,EADR;MAELC,KAAK,EAAEX,QAAQ,GACXY,eAAA,CAAOC,qBADI,GAEXD,eAAA,CAAOE,sBAJN;MAKLC,MAAM,EAAEf,QAAQ,GACZY,eAAA,CAAOC,qBADK,GAEZD,eAAA,CAAOE;IAPN;EAFT,EAFJ,eAeE,oBAAC,iBAAD;IAAM,KAAK,EAAET,MAAM,CAACW;EAApB,gBACE,oBAAC,iBAAD;IACE,KAAK,EAAE,CACLrB,cADK,EAEL;MACEsB,KAAK,EAAErB;IADT,CAFK,CADT;IAOE,aAAa,EAAE;EAPjB,GASGG,KATH,CADF,EAYGC,QAAQ,gBACP,oBAAC,iBAAD;IACE,KAAK,EAAE,CACLH,iBADK,EAEL;MACEoB,KAAK,EAAEnB,aADT;MAEEoB,SAAS,EAAE;IAFb,CAFK,CADT;IAQE,aAAa,EAAEjB,iBAAiB,GAAGkB,SAAH,GAAe;EARjD,GAUGnB,QAVH,CADO,GAaL,IAzBN,CAfF,CADF,EA4CGG,KAAK,IAAIA,KAAK,EA5CjB,CADF;AAgDD,CA5DD;;AA8DA,MAAME,MAAM,GAAGe,uBAAA,CAAWC,MAAX,CAAkB;EAC/Bb,aAAa,EAAE;IACbc,aAAa,EAAE,KADF;IAEbC,IAAI,EAAE;EAFO,CADgB;EAK/BjB,SAAS,EAAE;IACTgB,aAAa,EAAE,KADN;IAETE,cAAc,EAAE,eAFP;IAGTC,UAAU,EAAE;EAHH,CALoB;EAU/BT,aAAa,EAAE;IACbO,IAAI,EAAE,CADO;IAEbC,cAAc,EAAE;EAFH;AAVgB,CAAlB,CAAf;;eAgBe,IAAAE,kBAAA,EAAUhC,GAAV,C"}
1
+ {"version":3,"names":["Row","titleTypeStyle","titleColor","subtitleTypeStyle","subtitleColor","title","subtitle","multilineSubtitle","image","right","style","styles","container","padding","leftContainer","uri","marginRight","width","Config","rowMultiLineImageSize","rowSingleLineImageSize","height","textContainer","color","marginTop","undefined","StyleSheet","create","flexDirection","flex","justifyContent","alignItems","withTheme"],"sources":["Row.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n View,\n Text,\n Image,\n ImageSourcePropType,\n StyleSheet,\n StyleProp,\n TextStyle,\n ViewStyle,\n} from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport Config from \"./Config\";\nimport theme from \"../styles/DefaultTheme\";\n\ntype Props = {\n titleTypeStyle?: StyleProp<TextStyle>;\n titleColor?: string;\n subtitleTypeStyle?: StyleProp<TextStyle>;\n subtitleColor?: string;\n title?: string;\n subtitle?: string;\n multilineSubtitle?: boolean;\n image?: string | ImageSourcePropType;\n right?: () => React.ReactNode;\n style?: StyleProp<ViewStyle>;\n theme: typeof theme;\n};\n\nconst Row: React.FC<React.PropsWithChildren<Props>> = ({\n titleTypeStyle,\n titleColor,\n subtitleTypeStyle,\n subtitleColor,\n title,\n subtitle,\n multilineSubtitle,\n image,\n right,\n style,\n}) => {\n return (\n <View style={[styles.container, { padding: 16 }, style]}>\n <View style={styles.leftContainer}>\n {image && (\n <Image\n source={typeof image === \"string\" ? { uri: image } : image}\n style={{\n marginRight: 12,\n width: subtitle\n ? Config.rowMultiLineImageSize\n : Config.rowSingleLineImageSize,\n height: subtitle\n ? Config.rowMultiLineImageSize\n : Config.rowSingleLineImageSize,\n }}\n />\n )}\n <View style={styles.textContainer}>\n <Text\n style={[\n titleTypeStyle,\n {\n color: titleColor,\n },\n ]}\n numberOfLines={1}\n >\n {title}\n </Text>\n {subtitle ? (\n <Text\n style={[\n subtitleTypeStyle,\n {\n color: subtitleColor,\n marginTop: 4,\n },\n ]}\n numberOfLines={multilineSubtitle ? undefined : 1}\n >\n {subtitle}\n </Text>\n ) : null}\n </View>\n </View>\n {right && right()}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n leftContainer: {\n flexDirection: \"row\",\n flex: 1,\n },\n container: {\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n },\n textContainer: {\n flex: 1,\n justifyContent: \"center\",\n },\n});\n\nexport default withTheme(Row);\n"],"mappings":";;;;;;;AAAA;;AACA;;AAUA;;AACA;;;;;;;;AAiBA,MAAMA,GAA6C,GAAG,QAWhD;EAAA,IAXiD;IACrDC,cADqD;IAErDC,UAFqD;IAGrDC,iBAHqD;IAIrDC,aAJqD;IAKrDC,KALqD;IAMrDC,QANqD;IAOrDC,iBAPqD;IAQrDC,KARqD;IASrDC,KATqD;IAUrDC;EAVqD,CAWjD;EACJ,oBACE,oBAAC,iBAAD;IAAM,KAAK,EAAE,CAACC,MAAM,CAACC,SAAR,EAAmB;MAAEC,OAAO,EAAE;IAAX,CAAnB,EAAoCH,KAApC;EAAb,gBACE,oBAAC,iBAAD;IAAM,KAAK,EAAEC,MAAM,CAACG;EAApB,GACGN,KAAK,iBACJ,oBAAC,kBAAD;IACE,MAAM,EAAE,OAAOA,KAAP,KAAiB,QAAjB,GAA4B;MAAEO,GAAG,EAAEP;IAAP,CAA5B,GAA6CA,KADvD;IAEE,KAAK,EAAE;MACLQ,WAAW,EAAE,EADR;MAELC,KAAK,EAAEX,QAAQ,GACXY,eAAA,CAAOC,qBADI,GAEXD,eAAA,CAAOE,sBAJN;MAKLC,MAAM,EAAEf,QAAQ,GACZY,eAAA,CAAOC,qBADK,GAEZD,eAAA,CAAOE;IAPN;EAFT,EAFJ,eAeE,oBAAC,iBAAD;IAAM,KAAK,EAAET,MAAM,CAACW;EAApB,gBACE,oBAAC,iBAAD;IACE,KAAK,EAAE,CACLrB,cADK,EAEL;MACEsB,KAAK,EAAErB;IADT,CAFK,CADT;IAOE,aAAa,EAAE;EAPjB,GASGG,KATH,CADF,EAYGC,QAAQ,gBACP,oBAAC,iBAAD;IACE,KAAK,EAAE,CACLH,iBADK,EAEL;MACEoB,KAAK,EAAEnB,aADT;MAEEoB,SAAS,EAAE;IAFb,CAFK,CADT;IAQE,aAAa,EAAEjB,iBAAiB,GAAGkB,SAAH,GAAe;EARjD,GAUGnB,QAVH,CADO,GAaL,IAzBN,CAfF,CADF,EA4CGG,KAAK,IAAIA,KAAK,EA5CjB,CADF;AAgDD,CA5DD;;AA8DA,MAAME,MAAM,GAAGe,uBAAA,CAAWC,MAAX,CAAkB;EAC/Bb,aAAa,EAAE;IACbc,aAAa,EAAE,KADF;IAEbC,IAAI,EAAE;EAFO,CADgB;EAK/BjB,SAAS,EAAE;IACTgB,aAAa,EAAE,KADN;IAETE,cAAc,EAAE,eAFP;IAGTC,UAAU,EAAE;EAHH,CALoB;EAU/BT,aAAa,EAAE;IACbO,IAAI,EAAE,CADO;IAEbC,cAAc,EAAE;EAFH;AAVgB,CAAlB,CAAf;;eAgBe,IAAAE,kBAAA,EAAUhC,GAAV,C"}
@@ -1 +1 @@
1
- {"version":3,"names":["RowBodyIcon","Icon","title","subtitle","icon","style","theme","colors","typography","body1","medium","subtitle2","light","Config","rowSingleLineIconSize","marginLeft","withTheme"],"sources":["RowBodyIcon.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\nimport Row from \"./Row\";\nimport Config from \"./Config\";\nimport { StyleProp, ViewStyle } from \"react-native\";\n\ntype Props = {\n title?: string;\n subtitle?: string;\n icon: string;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst RowBodyIcon: React.FC<Props> = ({\n Icon,\n title,\n subtitle,\n icon,\n style,\n theme: { colors, typography },\n}) => {\n return (\n <Row\n titleTypeStyle={typography.body1}\n titleColor={colors.medium}\n subtitleTypeStyle={typography.subtitle2}\n subtitleColor={colors.light}\n title={title}\n subtitle={subtitle}\n right={() => (\n <Icon\n name={icon}\n size={Config.rowSingleLineIconSize}\n color={colors.light}\n style={{ marginLeft: 16 }}\n />\n )}\n style={style}\n />\n );\n};\n\nexport default withTheme(RowBodyIcon);\n"],"mappings":";;;;;;;AAAA;;AACA;;AAIA;;AACA;;;;;;;;AAWA,MAAMA,WAA4B,GAAG,QAO/B;EAAA,IAPgC;IACpCC,IADoC;IAEpCC,KAFoC;IAGpCC,QAHoC;IAIpCC,IAJoC;IAKpCC,KALoC;IAMpCC,KAAK,EAAE;MAAEC,MAAF;MAAUC;IAAV;EAN6B,CAOhC;EACJ,oBACE,oBAAC,YAAD;IACE,cAAc,EAAEA,UAAU,CAACC,KAD7B;IAEE,UAAU,EAAEF,MAAM,CAACG,MAFrB;IAGE,iBAAiB,EAAEF,UAAU,CAACG,SAHhC;IAIE,aAAa,EAAEJ,MAAM,CAACK,KAJxB;IAKE,KAAK,EAAEV,KALT;IAME,QAAQ,EAAEC,QANZ;IAOE,KAAK,EAAE,mBACL,oBAAC,IAAD;MACE,IAAI,EAAEC,IADR;MAEE,IAAI,EAAES,eAAA,CAAOC,qBAFf;MAGE,KAAK,EAAEP,MAAM,CAACK,KAHhB;MAIE,KAAK,EAAE;QAAEG,UAAU,EAAE;MAAd;IAJT,EARJ;IAeE,KAAK,EAAEV;EAfT,EADF;AAmBD,CA3BD;;eA6Be,IAAAW,kBAAA,EAAUhB,WAAV,C"}
1
+ {"version":3,"names":["RowBodyIcon","Icon","title","subtitle","icon","style","theme","colors","typography","body1","medium","subtitle2","light","Config","rowSingleLineIconSize","marginLeft","withTheme"],"sources":["RowBodyIcon.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\nimport Row from \"./Row\";\nimport Config from \"./Config\";\nimport { StyleProp, ViewStyle } from \"react-native\";\n\ntype Props = {\n title?: string;\n subtitle?: string;\n icon: string;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst RowBodyIcon: React.FC<React.PropsWithChildren<Props>> = ({\n Icon,\n title,\n subtitle,\n icon,\n style,\n theme: { colors, typography },\n}) => {\n return (\n <Row\n titleTypeStyle={typography.body1}\n titleColor={colors.medium}\n subtitleTypeStyle={typography.subtitle2}\n subtitleColor={colors.light}\n title={title}\n subtitle={subtitle}\n right={() => (\n <Icon\n name={icon}\n size={Config.rowSingleLineIconSize}\n color={colors.light}\n style={{ marginLeft: 16 }}\n />\n )}\n style={style}\n />\n );\n};\n\nexport default withTheme(RowBodyIcon);\n"],"mappings":";;;;;;;AAAA;;AACA;;AAIA;;AACA;;;;;;;;AAWA,MAAMA,WAAqD,GAAG,QAOxD;EAAA,IAPyD;IAC7DC,IAD6D;IAE7DC,KAF6D;IAG7DC,QAH6D;IAI7DC,IAJ6D;IAK7DC,KAL6D;IAM7DC,KAAK,EAAE;MAAEC,MAAF;MAAUC;IAAV;EANsD,CAOzD;EACJ,oBACE,oBAAC,YAAD;IACE,cAAc,EAAEA,UAAU,CAACC,KAD7B;IAEE,UAAU,EAAEF,MAAM,CAACG,MAFrB;IAGE,iBAAiB,EAAEF,UAAU,CAACG,SAHhC;IAIE,aAAa,EAAEJ,MAAM,CAACK,KAJxB;IAKE,KAAK,EAAEV,KALT;IAME,QAAQ,EAAEC,QANZ;IAOE,KAAK,EAAE,mBACL,oBAAC,IAAD;MACE,IAAI,EAAEC,IADR;MAEE,IAAI,EAAES,eAAA,CAAOC,qBAFf;MAGE,KAAK,EAAEP,MAAM,CAACK,KAHhB;MAIE,KAAK,EAAE;QAAEG,UAAU,EAAE;MAAd;IAJT,EARJ;IAeE,KAAK,EAAEV;EAfT,EADF;AAmBD,CA3BD;;eA6Be,IAAAW,kBAAA,EAAUhB,WAAV,C"}
@@ -1 +1 @@
1
- {"version":3,"names":["RowHeadlineImageCaption","title","subtitle","caption","image","style","theme","colors","typography","headline6","strong","body2","medium","color","marginLeft","withTheme"],"sources":["RowHeadlineImageCaption.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Text, ImageSourcePropType, StyleProp, ViewStyle } from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport Row from \"./Row\";\nimport theme from \"../styles/DefaultTheme\";\n\ntype Props = {\n title?: string;\n subtitle?: string;\n caption?: string;\n image: string | ImageSourcePropType;\n style?: StyleProp<ViewStyle>;\n theme: typeof theme;\n};\n\nconst RowHeadlineImageCaption: React.FC<Props> = ({\n title,\n subtitle,\n caption,\n image,\n style,\n theme: { colors, typography },\n}) => {\n return (\n <Row\n titleTypeStyle={typography.headline6}\n titleColor={colors.strong}\n subtitleTypeStyle={typography.body2}\n subtitleColor={colors.medium}\n title={title}\n subtitle={subtitle}\n image={image}\n right={() => (\n <Text\n style={{\n ...typography.caption,\n color: colors.strong,\n marginLeft: 16,\n }}\n >\n {caption}\n </Text>\n )}\n style={style}\n />\n );\n};\n\nexport default withTheme(RowHeadlineImageCaption);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;AAYA,MAAMA,uBAAwC,GAAG,QAO3C;EAAA,IAP4C;IAChDC,KADgD;IAEhDC,QAFgD;IAGhDC,OAHgD;IAIhDC,KAJgD;IAKhDC,KALgD;IAMhDC,KAAK,EAAE;MAAEC,MAAF;MAAUC;IAAV;EANyC,CAO5C;EACJ,oBACE,oBAAC,YAAD;IACE,cAAc,EAAEA,UAAU,CAACC,SAD7B;IAEE,UAAU,EAAEF,MAAM,CAACG,MAFrB;IAGE,iBAAiB,EAAEF,UAAU,CAACG,KAHhC;IAIE,aAAa,EAAEJ,MAAM,CAACK,MAJxB;IAKE,KAAK,EAAEX,KALT;IAME,QAAQ,EAAEC,QANZ;IAOE,KAAK,EAAEE,KAPT;IAQE,KAAK,EAAE,mBACL,oBAAC,iBAAD;MACE,KAAK,EAAE,EACL,GAAGI,UAAU,CAACL,OADT;QAELU,KAAK,EAAEN,MAAM,CAACG,MAFT;QAGLI,UAAU,EAAE;MAHP;IADT,GAOGX,OAPH,CATJ;IAmBE,KAAK,EAAEE;EAnBT,EADF;AAuBD,CA/BD;;eAiCe,IAAAU,kBAAA,EAAUf,uBAAV,C"}
1
+ {"version":3,"names":["RowHeadlineImageCaption","title","subtitle","caption","image","style","theme","colors","typography","headline6","strong","body2","medium","color","marginLeft","withTheme"],"sources":["RowHeadlineImageCaption.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Text, ImageSourcePropType, StyleProp, ViewStyle } from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport Row from \"./Row\";\nimport theme from \"../styles/DefaultTheme\";\n\ntype Props = {\n title?: string;\n subtitle?: string;\n caption?: string;\n image: string | ImageSourcePropType;\n style?: StyleProp<ViewStyle>;\n theme: typeof theme;\n};\n\nconst RowHeadlineImageCaption: React.FC<React.PropsWithChildren<Props>> = ({\n title,\n subtitle,\n caption,\n image,\n style,\n theme: { colors, typography },\n}) => {\n return (\n <Row\n titleTypeStyle={typography.headline6}\n titleColor={colors.strong}\n subtitleTypeStyle={typography.body2}\n subtitleColor={colors.medium}\n title={title}\n subtitle={subtitle}\n image={image}\n right={() => (\n <Text\n style={{\n ...typography.caption,\n color: colors.strong,\n marginLeft: 16,\n }}\n >\n {caption}\n </Text>\n )}\n style={style}\n />\n );\n};\n\nexport default withTheme(RowHeadlineImageCaption);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;AAYA,MAAMA,uBAAiE,GAAG,QAOpE;EAAA,IAPqE;IACzEC,KADyE;IAEzEC,QAFyE;IAGzEC,OAHyE;IAIzEC,KAJyE;IAKzEC,KALyE;IAMzEC,KAAK,EAAE;MAAEC,MAAF;MAAUC;IAAV;EANkE,CAOrE;EACJ,oBACE,oBAAC,YAAD;IACE,cAAc,EAAEA,UAAU,CAACC,SAD7B;IAEE,UAAU,EAAEF,MAAM,CAACG,MAFrB;IAGE,iBAAiB,EAAEF,UAAU,CAACG,KAHhC;IAIE,aAAa,EAAEJ,MAAM,CAACK,MAJxB;IAKE,KAAK,EAAEX,KALT;IAME,QAAQ,EAAEC,QANZ;IAOE,KAAK,EAAEE,KAPT;IAQE,KAAK,EAAE,mBACL,oBAAC,iBAAD;MACE,KAAK,EAAE,EACL,GAAGI,UAAU,CAACL,OADT;QAELU,KAAK,EAAEN,MAAM,CAACG,MAFT;QAGLI,UAAU,EAAE;MAHP;IADT,GAOGX,OAPH,CATJ;IAmBE,KAAK,EAAEE;EAnBT,EADF;AAuBD,CA/BD;;eAiCe,IAAAU,kBAAA,EAAUf,uBAAV,C"}
@@ -1 +1 @@
1
- {"version":3,"names":["RowHeadlineImageIcon","Icon","icon","title","image","subtitle","multilineSubtitle","style","theme","colors","typography","headline6","strong","body2","medium","Config","rowMultiLineIconSize","rowSingleLineIconSize","light","marginLeft","alignSelf","marginTop","withTheme"],"sources":["RowHeadlineImageIcon.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\nimport Row from \"./Row\";\nimport Config from \"./Config\";\nimport { ImageSourcePropType, StyleProp, ViewStyle } from \"react-native\";\n\ntype Props = {\n title?: string;\n image: string | ImageSourcePropType;\n subtitle?: string;\n multilineSubtitle?: boolean;\n icon: string;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst RowHeadlineImageIcon: React.FC<Props> = ({\n Icon,\n icon,\n title,\n image,\n subtitle,\n multilineSubtitle = false,\n style,\n theme: { colors, typography },\n}) => {\n return (\n <Row\n titleTypeStyle={typography.headline6}\n titleColor={colors.strong}\n subtitleTypeStyle={typography.body2}\n subtitleColor={colors.medium}\n title={title}\n subtitle={subtitle}\n multilineSubtitle={multilineSubtitle}\n image={image}\n right={() => (\n <Icon\n name={icon}\n size={\n multilineSubtitle\n ? Config.rowMultiLineIconSize\n : Config.rowSingleLineIconSize\n }\n color={colors.light}\n style={{\n marginLeft: 16,\n alignSelf: multilineSubtitle ? \"flex-start\" : \"center\",\n marginTop: multilineSubtitle ? 4 : 0,\n }}\n />\n )}\n style={style}\n />\n );\n};\n\nexport default withTheme(RowHeadlineImageIcon);\n"],"mappings":";;;;;;;AAAA;;AACA;;AAIA;;AACA;;;;;;;;AAaA,MAAMA,oBAAqC,GAAG,QASxC;EAAA,IATyC;IAC7CC,IAD6C;IAE7CC,IAF6C;IAG7CC,KAH6C;IAI7CC,KAJ6C;IAK7CC,QAL6C;IAM7CC,iBAAiB,GAAG,KANyB;IAO7CC,KAP6C;IAQ7CC,KAAK,EAAE;MAAEC,MAAF;MAAUC;IAAV;EARsC,CASzC;EACJ,oBACE,oBAAC,YAAD;IACE,cAAc,EAAEA,UAAU,CAACC,SAD7B;IAEE,UAAU,EAAEF,MAAM,CAACG,MAFrB;IAGE,iBAAiB,EAAEF,UAAU,CAACG,KAHhC;IAIE,aAAa,EAAEJ,MAAM,CAACK,MAJxB;IAKE,KAAK,EAAEX,KALT;IAME,QAAQ,EAAEE,QANZ;IAOE,iBAAiB,EAAEC,iBAPrB;IAQE,KAAK,EAAEF,KART;IASE,KAAK,EAAE,mBACL,oBAAC,IAAD;MACE,IAAI,EAAEF,IADR;MAEE,IAAI,EACFI,iBAAiB,GACbS,eAAA,CAAOC,oBADM,GAEbD,eAAA,CAAOE,qBALf;MAOE,KAAK,EAAER,MAAM,CAACS,KAPhB;MAQE,KAAK,EAAE;QACLC,UAAU,EAAE,EADP;QAELC,SAAS,EAAEd,iBAAiB,GAAG,YAAH,GAAkB,QAFzC;QAGLe,SAAS,EAAEf,iBAAiB,GAAG,CAAH,GAAO;MAH9B;IART,EAVJ;IAyBE,KAAK,EAAEC;EAzBT,EADF;AA6BD,CAvCD;;eAyCe,IAAAe,kBAAA,EAAUtB,oBAAV,C"}
1
+ {"version":3,"names":["RowHeadlineImageIcon","Icon","icon","title","image","subtitle","multilineSubtitle","style","theme","colors","typography","headline6","strong","body2","medium","Config","rowMultiLineIconSize","rowSingleLineIconSize","light","marginLeft","alignSelf","marginTop","withTheme"],"sources":["RowHeadlineImageIcon.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\nimport Row from \"./Row\";\nimport Config from \"./Config\";\nimport { ImageSourcePropType, StyleProp, ViewStyle } from \"react-native\";\n\ntype Props = {\n title?: string;\n image: string | ImageSourcePropType;\n subtitle?: string;\n multilineSubtitle?: boolean;\n icon: string;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst RowHeadlineImageIcon: React.FC<React.PropsWithChildren<Props>> = ({\n Icon,\n icon,\n title,\n image,\n subtitle,\n multilineSubtitle = false,\n style,\n theme: { colors, typography },\n}) => {\n return (\n <Row\n titleTypeStyle={typography.headline6}\n titleColor={colors.strong}\n subtitleTypeStyle={typography.body2}\n subtitleColor={colors.medium}\n title={title}\n subtitle={subtitle}\n multilineSubtitle={multilineSubtitle}\n image={image}\n right={() => (\n <Icon\n name={icon}\n size={\n multilineSubtitle\n ? Config.rowMultiLineIconSize\n : Config.rowSingleLineIconSize\n }\n color={colors.light}\n style={{\n marginLeft: 16,\n alignSelf: multilineSubtitle ? \"flex-start\" : \"center\",\n marginTop: multilineSubtitle ? 4 : 0,\n }}\n />\n )}\n style={style}\n />\n );\n};\n\nexport default withTheme(RowHeadlineImageIcon);\n"],"mappings":";;;;;;;AAAA;;AACA;;AAIA;;AACA;;;;;;;;AAaA,MAAMA,oBAA8D,GAAG,QASjE;EAAA,IATkE;IACtEC,IADsE;IAEtEC,IAFsE;IAGtEC,KAHsE;IAItEC,KAJsE;IAKtEC,QALsE;IAMtEC,iBAAiB,GAAG,KANkD;IAOtEC,KAPsE;IAQtEC,KAAK,EAAE;MAAEC,MAAF;MAAUC;IAAV;EAR+D,CASlE;EACJ,oBACE,oBAAC,YAAD;IACE,cAAc,EAAEA,UAAU,CAACC,SAD7B;IAEE,UAAU,EAAEF,MAAM,CAACG,MAFrB;IAGE,iBAAiB,EAAEF,UAAU,CAACG,KAHhC;IAIE,aAAa,EAAEJ,MAAM,CAACK,MAJxB;IAKE,KAAK,EAAEX,KALT;IAME,QAAQ,EAAEE,QANZ;IAOE,iBAAiB,EAAEC,iBAPrB;IAQE,KAAK,EAAEF,KART;IASE,KAAK,EAAE,mBACL,oBAAC,IAAD;MACE,IAAI,EAAEF,IADR;MAEE,IAAI,EACFI,iBAAiB,GACbS,eAAA,CAAOC,oBADM,GAEbD,eAAA,CAAOE,qBALf;MAOE,KAAK,EAAER,MAAM,CAACS,KAPhB;MAQE,KAAK,EAAE;QACLC,UAAU,EAAE,EADP;QAELC,SAAS,EAAEd,iBAAiB,GAAG,YAAH,GAAkB,QAFzC;QAGLe,SAAS,EAAEf,iBAAiB,GAAG,CAAH,GAAO;MAH9B;IART,EAVJ;IAyBE,KAAK,EAAEC;EAzBT,EADF;AA6BD,CAvCD;;eAyCe,IAAAe,kBAAA,EAAUtB,oBAAV,C"}
@@ -1 +1 @@
1
- {"version":3,"names":["StarRating","Icon","starSize","maxStars","rating","defaultValue","isEditable","activeColor","inactiveColor","style","onPress","rest","localRating","setLocalRating","React","useState","useEffect","ratingHandler","useCallback","r","ratingRounded","Math","round","styles","container","Array","map","_","i","display","touchContainer","pressable","StyleSheet","create","flexDirection","alignItems","position","top","right","left","bottom","zIndex","flex","height","width","withTheme"],"sources":["StarRating.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n View,\n StyleSheet,\n StyleProp,\n ViewStyle,\n Pressable,\n} from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\ntype Props = {\n starSize?: number;\n maxStars?: number;\n rating?: number;\n defaultValue?: number;\n isEditable?: boolean;\n activeColor?: string;\n inactiveColor?: string;\n theme: Theme;\n style?: StyleProp<ViewStyle>;\n onPress?: (newValue: number) => void;\n} & IconSlot;\n\nconst StarRating: React.FC<Props> = ({\n Icon,\n starSize = 16,\n maxStars = 5,\n rating = 0,\n defaultValue,\n isEditable = false,\n activeColor,\n inactiveColor,\n style,\n onPress,\n ...rest\n}) => {\n const [localRating, setLocalRating] = React.useState<number>(\n rating || defaultValue || 0\n );\n\n React.useEffect(() => {\n if (rating != null) {\n setLocalRating(rating);\n }\n }, [rating]);\n\n React.useEffect(() => {\n if (defaultValue != null) {\n setLocalRating(defaultValue);\n }\n }, [defaultValue]);\n\n const ratingHandler = React.useCallback(\n (r) => {\n setLocalRating(r);\n !!onPress && onPress(r);\n },\n [onPress]\n );\n\n const ratingRounded = Math.round(localRating * 2) / 2;\n\n return (\n <View style={[styles.container, style]} {...rest}>\n {[...Array(maxStars)].map((_, i) => (\n <View key={i} style={{ display: \"flex\" }}>\n <Icon\n name={\n ratingRounded - i === 0.5\n ? \"MaterialIcons/star-half\"\n : \"MaterialIcons/star\"\n }\n size={starSize}\n color={ratingRounded > i ? activeColor : inactiveColor}\n />\n {isEditable && (\n <View style={styles.touchContainer}>\n <Pressable\n style={styles.pressable}\n onPress={() => ratingHandler(i + 0.5)}\n />\n <Pressable\n style={styles.pressable}\n onPress={() => ratingHandler(i + 1)}\n />\n </View>\n )}\n </View>\n ))}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flexDirection: \"row\",\n alignItems: \"center\",\n },\n touchContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n position: \"absolute\",\n top: 0,\n right: 0,\n left: 0,\n bottom: 0,\n zIndex: 1,\n },\n pressable: {\n flex: 1,\n height: \"100%\",\n width: \"50%\",\n },\n});\n\nexport default withTheme(StarRating);\n"],"mappings":";;;;;;;AAAA;;AACA;;AAOA;;;;;;;;AAiBA,MAAMA,UAA2B,GAAG,QAY9B;EAAA,IAZ+B;IACnCC,IADmC;IAEnCC,QAAQ,GAAG,EAFwB;IAGnCC,QAAQ,GAAG,CAHwB;IAInCC,MAAM,GAAG,CAJ0B;IAKnCC,YALmC;IAMnCC,UAAU,GAAG,KANsB;IAOnCC,WAPmC;IAQnCC,aARmC;IASnCC,KATmC;IAUnCC,OAVmC;IAWnC,GAAGC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M,KAAK,EAAEiB,MAAM,CAACO;EAApB,gBACE,oBAAC,sBAAD;IACE,KAAK,EAAEP,MAAM,CAACQ,SADhB;IAEE,OAAO,EAAE,MAAMd,aAAa,CAACW,CAAC,GAAG,GAAL;EAF9B,EADF,eAKE,oBAAC,sBAAD;IACE,KAAK,EAAEL,MAAM,CAACQ,SADhB;IAEE,OAAO,EAAE,MAAMd,aAAa,CAACW,CAAC,GAAG,CAAL;EAF9B,EALF,CAXJ,CADD,CADH,CADF;AA6BD,CApED;;AAsEA,MAAML,MAAM,GAAGS,uBAAA,CAAWC,MAAX,CAAkB;EAC/BT,SAAS,EAAE;IACTU,aAAa,EAAE,KADN;IAETC,UAAU,EAAE;EAFH,CADoB;EAK/BL,cAAc,EAAE;IACdD,OAAO,EAAE,MADK;IAEdK,aAAa,EAAE,KAFD;IAGdE,QAAQ,EAAE,UAHI;IAIdC,GAAG,EAAE,CAJS;IAKdC,KAAK,EAAE,CALO;IAMdC,IAAI,EAAE,CANQ;IAOdC,MAAM,EAAE,CAPM;IAQdC,MAAM,EAAE;EARM,CALe;EAe/BV,SAAS,EAAE;IACTW,IAAI,EAAE,CADG;IAETC,MAAM,EAAE,MAFC;IAGTC,KAAK,EAAE;EAHE;AAfoB,CAAlB,CAAf;;eAsBe,IAAAC,kBAAA,EAAU7C,UAAV,C"}
1
+ {"version":3,"names":["StarRating","Icon","starSize","maxStars","rating","defaultValue","isEditable","activeColor","inactiveColor","style","onPress","rest","localRating","setLocalRating","React","useState","useEffect","ratingHandler","useCallback","r","ratingRounded","Math","round","styles","container","Array","map","_","i","display","touchContainer","pressable","StyleSheet","create","flexDirection","alignItems","position","top","right","left","bottom","zIndex","flex","height","width","withTheme"],"sources":["StarRating.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n View,\n StyleSheet,\n StyleProp,\n ViewStyle,\n Pressable,\n} from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\ntype Props = {\n starSize?: number;\n maxStars?: number;\n rating?: number;\n defaultValue?: number;\n isEditable?: boolean;\n activeColor?: string;\n inactiveColor?: string;\n theme: Theme;\n style?: StyleProp<ViewStyle>;\n onPress?: (newValue: number) => void;\n} & IconSlot;\n\nconst StarRating: React.FC<React.PropsWithChildren<Props>> = ({\n Icon,\n starSize = 16,\n maxStars = 5,\n rating = 0,\n defaultValue,\n isEditable = false,\n activeColor,\n inactiveColor,\n style,\n onPress,\n ...rest\n}) => {\n const [localRating, setLocalRating] = React.useState<number>(\n rating || defaultValue || 0\n );\n\n React.useEffect(() => {\n if (rating != null) {\n setLocalRating(rating);\n }\n }, [rating]);\n\n React.useEffect(() => {\n if (defaultValue != null) {\n setLocalRating(defaultValue);\n }\n }, [defaultValue]);\n\n const ratingHandler = React.useCallback(\n (r: number) => {\n setLocalRating(r);\n !!onPress && onPress(r);\n },\n [onPress]\n );\n\n const ratingRounded = Math.round(localRating * 2) / 2;\n\n return (\n <View style={[styles.container, style]} {...rest}>\n {[...Array(maxStars)].map((_, i) => (\n <View key={i} style={{ display: \"flex\" }}>\n <Icon\n name={\n ratingRounded - i === 0.5\n ? \"MaterialIcons/star-half\"\n : \"MaterialIcons/star\"\n }\n size={starSize}\n color={ratingRounded > i ? activeColor : inactiveColor}\n />\n {isEditable && (\n <View style={styles.touchContainer}>\n <Pressable\n style={styles.pressable}\n onPress={() => ratingHandler(i + 0.5)}\n />\n <Pressable\n style={styles.pressable}\n onPress={() => ratingHandler(i + 1)}\n />\n </View>\n )}\n </View>\n ))}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flexDirection: \"row\",\n alignItems: \"center\",\n },\n touchContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n position: \"absolute\",\n top: 0,\n right: 0,\n left: 0,\n bottom: 0,\n zIndex: 1,\n },\n pressable: {\n flex: 1,\n height: \"100%\",\n width: \"50%\",\n },\n});\n\nexport default withTheme(StarRating);\n"],"mappings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,GAAG,EAAEA,CAAX;IAAc,KAAK,EAAE;MAAEC,OAAO,EAAE;IAAX;EAArB,gBACE,oBAAC,IAAD;IACE,IAAI,EACFT,aAAa,GAAGQ,CAAhB,KAAsB,GAAtB,GACI,yBADJ,GAEI,oBAJR;IAME,IAAI,EAAE1B,QANR;IAOE,KAAK,EAAEkB,aAAa,GAAGQ,CAAhB,GAAoBrB,WAApB,GAAkCC;EAP3C,EADF,EAUGF,UAAU,iBACT,oBAAC,iBAAD;IAAM,KAAK,EAAEiB,MAAM,CAACO;EAApB,gBACE,oBAAC,sBAAD;IACE,KAAK,EAAEP,MAAM,CAACQ,SADhB;IAEE,OAAO,EAAE,MAAMd,aAAa,CAACW,CAAC,GAAG,GAAL;EAF9B,EADF,eAKE,oBAAC,sBAAD;IACE,KAAK,EAAEL,MAAM,CAACQ,SADhB;IAEE,OAAO,EAAE,MAAMd,aAAa,CAACW,CAAC,GAAG,CAAL;EAF9B,EALF,CAXJ,CADD,CADH,CADF;AA6BD,CApED;;AAsEA,MAAML,MAAM,GAAGS,uBAAA,CAAWC,MAAX,CAAkB;EAC/BT,SAAS,EAAE;IACTU,aAAa,EAAE,KADN;IAETC,UAAU,EAAE;EAFH,CADoB;EAK/BL,cAAc,EAAE;IACdD,OAAO,EAAE,MADK;IAEdK,aAAa,EAAE,KAFD;IAGdE,QAAQ,EAAE,UAHI;IAIdC,GAAG,EAAE,CAJS;IAKdC,KAAK,EAAE,CALO;IAMdC,IAAI,EAAE,CANQ;IAOdC,MAAM,EAAE,CAPM;IAQdC,MAAM,EAAE;EARM,CALe;EAe/BV,SAAS,EAAE;IACTW,IAAI,EAAE,CADG;IAETC,MAAM,EAAE,MAFC;IAGTC,KAAK,EAAE;EAHE;AAfoB,CAAlB,CAAf;;eAsBe,IAAAC,kBAAA,EAAU7C,UAAV,C"}
@@ -1 +1 @@
1
- {"version":3,"names":["Surface","elevation","propElevation","style","theme","children","rest","styleElevation","backgroundColor","restStyle","StyleSheet","flatten","dark","isDarkTheme","mode","colors","evalationStyles","shadow","getBackgroundColor","overlay","surface","withTheme"],"sources":["Surface.tsx"],"sourcesContent":["/* Copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx */\nimport * as React from \"react\";\nimport {\n Animated,\n StyleSheet,\n ViewProps,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\n\nimport shadow from \"../styles/shadow\";\nimport overlay from \"../styles/overlay\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\n\ntype Props = {\n elevation?: number;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & ViewProps;\n\nconst Surface: React.FC<Props> = ({\n elevation: propElevation,\n style,\n theme,\n children,\n ...rest\n}) => {\n const {\n elevation: styleElevation = 3,\n backgroundColor,\n ...restStyle\n } = (StyleSheet.flatten(style) || {}) as ViewStyle;\n\n const { dark: isDarkTheme, mode, colors } = theme;\n\n const elevation = propElevation || styleElevation;\n\n const evalationStyles = elevation ? shadow(elevation) : {};\n\n const getBackgroundColor = () => {\n if (backgroundColor) {\n return backgroundColor;\n } else if (isDarkTheme && mode === \"adaptive\") {\n return overlay(elevation, colors.surface);\n } else {\n return colors.surface;\n }\n };\n\n return (\n <Animated.View\n {...rest}\n style={[\n {\n backgroundColor: getBackgroundColor(),\n elevation,\n ...evalationStyles,\n ...restStyle,\n },\n ]}\n >\n {children}\n </Animated.View>\n );\n};\n\nexport default withTheme(Surface);\n"],"mappings":";;;;;;;AACA;;AACA;;AAQA;;AACA;;AACA;;;;;;;;;;AASA,MAAMA,OAAwB,GAAG,QAM3B;EAAA,IAN4B;IAChCC,SAAS,EAAEC,aADqB;IAEhCC,KAFgC;IAGhCC,KAHgC;IAIhCC,QAJgC;IAKhC,GAAGC;EAL6B,CAM5B;EACJ,MAAM;IACJL,SAAS,EAAEM,cAAc,GAAG,CADxB;IAEJC,eAFI;IAGJ,GAAGC;EAHC,IAIDC,uBAAA,CAAWC,OAAX,CAAmBR,KAAnB,KAA6B,EAJlC;EAMA,MAAM;IAAES,IAAI,EAAEC,WAAR;IAAqBC,IAArB;IAA2BC;EAA3B,IAAsCX,KAA5C;EAEA,MAAMH,SAAS,GAAGC,aAAa,IAAIK,cAAnC;EAEA,MAAMS,eAAe,GAAGf,SAAS,GAAG,IAAAgB,eAAA,EAAOhB,SAAP,CAAH,GAAuB,EAAxD;;EAEA,MAAMiB,kBAAkB,GAAG,MAAM;IAC/B,IAAIV,eAAJ,EAAqB;MACnB,OAAOA,eAAP;IACD,CAFD,MAEO,IAAIK,WAAW,IAAIC,IAAI,KAAK,UAA5B,EAAwC;MAC7C,OAAO,IAAAK,gBAAA,EAAQlB,SAAR,EAAmBc,MAAM,CAACK,OAA1B,CAAP;IACD,CAFM,MAEA;MACL,OAAOL,MAAM,CAACK,OAAd;IACD;EACF,CARD;;EAUA,oBACE,oBAAC,qBAAD,CAAU,IAAV,eACMd,IADN;IAEE,KAAK,EAAE,CACL;MACEE,eAAe,EAAEU,kBAAkB,EADrC;MAEEjB,SAFF;MAGE,GAAGe,eAHL;MAIE,GAAGP;IAJL,CADK;EAFT,IAWGJ,QAXH,CADF;AAeD,CA5CD;;eA8Ce,IAAAgB,kBAAA,EAAUrB,OAAV,C"}
1
+ {"version":3,"names":["Surface","elevation","propElevation","style","theme","children","rest","styleElevation","backgroundColor","restStyle","StyleSheet","flatten","dark","isDarkTheme","mode","colors","evalationStyles","shadow","getBackgroundColor","overlay","surface","withTheme"],"sources":["Surface.tsx"],"sourcesContent":["/* Copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx */\nimport * as React from \"react\";\nimport {\n Animated,\n StyleSheet,\n ViewProps,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\n\nimport shadow from \"../styles/shadow\";\nimport overlay from \"../styles/overlay\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\n\ntype Props = {\n elevation?: number;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & ViewProps;\n\nconst Surface: React.FC<React.PropsWithChildren<Props>> = ({\n elevation: propElevation,\n style,\n theme,\n children,\n ...rest\n}) => {\n const {\n elevation: styleElevation = 3,\n backgroundColor,\n ...restStyle\n } = (StyleSheet.flatten(style) || {}) as ViewStyle;\n\n const { dark: isDarkTheme, mode, colors } = theme;\n\n const elevation = propElevation || styleElevation;\n\n const evalationStyles = elevation ? shadow(elevation) : {};\n\n const getBackgroundColor = () => {\n if (backgroundColor) {\n return backgroundColor;\n } else if (isDarkTheme && mode === \"adaptive\") {\n return overlay(elevation, colors.surface);\n } else {\n return colors.surface;\n }\n };\n\n return (\n <Animated.View\n {...rest}\n style={[\n {\n backgroundColor: getBackgroundColor(),\n elevation,\n ...evalationStyles,\n ...restStyle,\n },\n ]}\n >\n {children}\n </Animated.View>\n );\n};\n\nexport default withTheme(Surface);\n"],"mappings":";;;;;;;AACA;;AACA;;AAQA;;AACA;;AACA;;;;;;;;;;AASA,MAAMA,OAAiD,GAAG,QAMpD;EAAA,IANqD;IACzDC,SAAS,EAAEC,aAD8C;IAEzDC,KAFyD;IAGzDC,KAHyD;IAIzDC,QAJyD;IAKzD,GAAGC;EALsD,CAMrD;EACJ,MAAM;IACJL,SAAS,EAAEM,cAAc,GAAG,CADxB;IAEJC,eAFI;IAGJ,GAAGC;EAHC,IAIDC,uBAAA,CAAWC,OAAX,CAAmBR,KAAnB,KAA6B,EAJlC;EAMA,MAAM;IAAES,IAAI,EAAEC,WAAR;IAAqBC,IAArB;IAA2BC;EAA3B,IAAsCX,KAA5C;EAEA,MAAMH,SAAS,GAAGC,aAAa,IAAIK,cAAnC;EAEA,MAAMS,eAAe,GAAGf,SAAS,GAAG,IAAAgB,eAAA,EAAOhB,SAAP,CAAH,GAAuB,EAAxD;;EAEA,MAAMiB,kBAAkB,GAAG,MAAM;IAC/B,IAAIV,eAAJ,EAAqB;MACnB,OAAOA,eAAP;IACD,CAFD,MAEO,IAAIK,WAAW,IAAIC,IAAI,KAAK,UAA5B,EAAwC;MAC7C,OAAO,IAAAK,gBAAA,EAAQlB,SAAR,EAAmBc,MAAM,CAACK,OAA1B,CAAP;IACD,CAFM,MAEA;MACL,OAAOL,MAAM,CAACK,OAAd;IACD;EACF,CARD;;EAUA,oBACE,oBAAC,qBAAD,CAAU,IAAV,eACMd,IADN;IAEE,KAAK,EAAE,CACL;MACEE,eAAe,EAAEU,kBAAkB,EADrC;MAEEjB,SAFF;MAGE,GAAGe,eAHL;MAIE,GAAGP;IAJL,CADK;EAFT,IAWGJ,QAXH,CADF;AAeD,CA5CD;;eA8Ce,IAAAgB,kBAAA,EAAUrB,OAAV,C"}
@@ -1 +1 @@
1
- {"version":3,"names":["Swiper","vertical","loop","timeout","from","prevTitle","nextTitle","prevTitleColor","nextTitleColor","dotsTouchable","dotColor","dotActiveColor","data","keyExtractor","renderItem","children","style","prevTitleStyle","color","nextTitleStyle","dotProps","badgeStyle","backgroundColor","dotActiveStyle","map","item","index","component","key","React","cloneElement"],"sources":["Swiper.tsx"],"sourcesContent":["import React from \"react\";\nimport { View, StyleProp, ViewStyle } from \"react-native\";\nimport SwiperComponent from \"react-native-web-swiper\";\n\nexport interface SwiperProps<T> {\n vertical?: boolean;\n loop?: boolean;\n from?: number;\n timeout?: number;\n prevTitle?: string;\n nextTitle?: string;\n prevTitleColor?: string;\n nextTitleColor?: string;\n dotsTouchable?: boolean;\n dotColor?: string;\n dotActiveColor?: string;\n children: React.ReactNode;\n data?: Array<T>;\n keyExtractor: (item: T, index: number) => string;\n renderItem?: ({ item, index }: { item: T; index: number }) => JSX.Element;\n style?: StyleProp<ViewStyle>;\n}\n\nconst Swiper = ({\n vertical = false,\n loop = false,\n timeout = 0,\n from = 0,\n prevTitle = \"\",\n nextTitle = \"\",\n prevTitleColor,\n nextTitleColor,\n dotsTouchable = true,\n dotColor,\n dotActiveColor,\n data,\n keyExtractor,\n renderItem,\n children,\n style,\n}: SwiperProps<any>) => (\n <View style={style}>\n <SwiperComponent\n from={from}\n loop={loop}\n timeout={timeout}\n vertical={vertical}\n controlsProps={{\n prevTitle,\n nextTitle,\n prevTitleStyle: { color: prevTitleColor },\n nextTitleStyle: { color: nextTitleColor },\n dotsTouchable,\n ...(dotColor\n ? { dotProps: { badgeStyle: { backgroundColor: dotColor } } }\n : {}),\n ...(dotActiveColor\n ? { dotActiveStyle: { backgroundColor: dotActiveColor } }\n : {}),\n }}\n >\n {data && renderItem\n ? data.map((item, index) => {\n const component = renderItem({ item, index });\n\n if (!component) {\n return null;\n }\n\n const key = keyExtractor ? keyExtractor(item, index) : index;\n return React.cloneElement(component, {\n key,\n });\n })\n : children}\n </SwiperComponent>\n </View>\n);\n\nexport default Swiper;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;AAqBA,MAAMA,MAAM,GAAG;EAAA,IAAC;IACdC,QAAQ,GAAG,KADG;IAEdC,IAAI,GAAG,KAFO;IAGdC,OAAO,GAAG,CAHI;IAIdC,IAAI,GAAG,CAJO;IAKdC,SAAS,GAAG,EALE;IAMdC,SAAS,GAAG,EANE;IAOdC,cAPc;IAQdC,cARc;IASdC,aAAa,GAAG,IATF;IAUdC,QAVc;IAWdC,cAXc;IAYdC,IAZc;IAadC,YAbc;IAcdC,UAdc;IAedC,QAfc;IAgBdC;EAhBc,CAAD;EAAA,oBAkBb,6BAAC,iBAAD;IAAM,KAAK,EAAEA;EAAb,gBACE,6BAAC,6BAAD;IACE,IAAI,EAAEZ,IADR;IAEE,IAAI,EAAEF,IAFR;IAGE,OAAO,EAAEC,OAHX;IAIE,QAAQ,EAAEF,QAJZ;IAKE,aAAa,EAAE;MACbI,SADa;MAEbC,SAFa;MAGbW,cAAc,EAAE;QAAEC,KAAK,EAAEX;MAAT,CAHH;MAIbY,cAAc,EAAE;QAAED,KAAK,EAAEV;MAAT,CAJH;MAKbC,aALa;MAMb,IAAIC,QAAQ,GACR;QAAEU,QAAQ,EAAE;UAAEC,UAAU,EAAE;YAAEC,eAAe,EAAEZ;UAAnB;QAAd;MAAZ,CADQ,GAER,EAFJ,CANa;MASb,IAAIC,cAAc,GACd;QAAEY,cAAc,EAAE;UAAED,eAAe,EAAEX;QAAnB;MAAlB,CADc,GAEd,EAFJ;IATa;EALjB,GAmBGC,IAAI,IAAIE,UAAR,GACGF,IAAI,CAACY,GAAL,CAAS,CAACC,IAAD,EAAOC,KAAP,KAAiB;IACxB,MAAMC,SAAS,GAAGb,UAAU,CAAC;MAAEW,IAAF;MAAQC;IAAR,CAAD,CAA5B;;IAEA,IAAI,CAACC,SAAL,EAAgB;MACd,OAAO,IAAP;IACD;;IAED,MAAMC,GAAG,GAAGf,YAAY,GAAGA,YAAY,CAACY,IAAD,EAAOC,KAAP,CAAf,GAA+BA,KAAvD;IACA,oBAAOG,cAAA,CAAMC,YAAN,CAAmBH,SAAnB,EAA8B;MACnCC;IADmC,CAA9B,CAAP;EAGD,CAXD,CADH,GAaGb,QAhCN,CADF,CAlBa;AAAA,CAAf;;eAwDef,M"}
1
+ {"version":3,"names":["Swiper","vertical","loop","timeout","from","prevTitle","nextTitle","prevTitleColor","nextTitleColor","dotsTouchable","dotColor","dotActiveColor","data","keyExtractor","renderItem","children","style","prevTitleStyle","color","nextTitleStyle","dotProps","badgeStyle","backgroundColor","dotActiveStyle","map","item","index","component","key","React","cloneElement"],"sources":["Swiper.tsx"],"sourcesContent":["import React from \"react\";\nimport { View, StyleProp, ViewStyle } from \"react-native\";\nimport SwiperComponent from \"react-native-web-swiper\";\n\nexport interface SwiperProps<T> {\n vertical?: boolean;\n loop?: boolean;\n from?: number;\n timeout?: number;\n prevTitle?: string;\n nextTitle?: string;\n prevTitleColor?: string;\n nextTitleColor?: string;\n dotsTouchable?: boolean;\n dotColor?: string;\n dotActiveColor?: string;\n children: React.ReactNode;\n data?: Array<T>;\n keyExtractor: (item: T, index: number) => string;\n renderItem?: ({ item, index }: { item: T; index: number }) => JSX.Element;\n style?: StyleProp<ViewStyle>;\n}\n\nconst Swiper = ({\n vertical = false,\n loop = false,\n timeout = 0,\n from = 0,\n prevTitle = \"\",\n nextTitle = \"\",\n prevTitleColor,\n nextTitleColor,\n dotsTouchable = true,\n dotColor,\n dotActiveColor,\n data,\n keyExtractor,\n renderItem,\n children,\n style,\n}: SwiperProps<any>) => (\n <View style={style}>\n {/* @ts-ignore */}\n <SwiperComponent\n from={from}\n loop={loop}\n timeout={timeout}\n vertical={vertical}\n controlsProps={{\n prevTitle,\n nextTitle,\n prevTitleStyle: { color: prevTitleColor },\n nextTitleStyle: { color: nextTitleColor },\n dotsTouchable,\n ...(dotColor\n ? { dotProps: { badgeStyle: { backgroundColor: dotColor } } }\n : {}),\n ...(dotActiveColor\n ? { dotActiveStyle: { backgroundColor: dotActiveColor } }\n : {}),\n }}\n >\n {data && renderItem\n ? data.map((item, index) => {\n const component = renderItem({ item, index });\n\n if (!component) {\n return null;\n }\n\n const key = keyExtractor ? keyExtractor(item, index) : index;\n return React.cloneElement(component, {\n key,\n });\n })\n : children}\n </SwiperComponent>\n </View>\n);\n\nexport default Swiper;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;AAqBA,MAAMA,MAAM,GAAG;EAAA,IAAC;IACdC,QAAQ,GAAG,KADG;IAEdC,IAAI,GAAG,KAFO;IAGdC,OAAO,GAAG,CAHI;IAIdC,IAAI,GAAG,CAJO;IAKdC,SAAS,GAAG,EALE;IAMdC,SAAS,GAAG,EANE;IAOdC,cAPc;IAQdC,cARc;IASdC,aAAa,GAAG,IATF;IAUdC,QAVc;IAWdC,cAXc;IAYdC,IAZc;IAadC,YAbc;IAcdC,UAdc;IAedC,QAfc;IAgBdC;EAhBc,CAAD;EAAA,oBAkBb,6BAAC,iBAAD;IAAM,KAAK,EAAEA;EAAb,gBAEE,6BAAC,6BAAD;IACE,IAAI,EAAEZ,IADR;IAEE,IAAI,EAAEF,IAFR;IAGE,OAAO,EAAEC,OAHX;IAIE,QAAQ,EAAEF,QAJZ;IAKE,aAAa,EAAE;MACbI,SADa;MAEbC,SAFa;MAGbW,cAAc,EAAE;QAAEC,KAAK,EAAEX;MAAT,CAHH;MAIbY,cAAc,EAAE;QAAED,KAAK,EAAEV;MAAT,CAJH;MAKbC,aALa;MAMb,IAAIC,QAAQ,GACR;QAAEU,QAAQ,EAAE;UAAEC,UAAU,EAAE;YAAEC,eAAe,EAAEZ;UAAnB;QAAd;MAAZ,CADQ,GAER,EAFJ,CANa;MASb,IAAIC,cAAc,GACd;QAAEY,cAAc,EAAE;UAAED,eAAe,EAAEX;QAAnB;MAAlB,CADc,GAEd,EAFJ;IATa;EALjB,GAmBGC,IAAI,IAAIE,UAAR,GACGF,IAAI,CAACY,GAAL,CAAS,CAACC,IAAD,EAAOC,KAAP,KAAiB;IACxB,MAAMC,SAAS,GAAGb,UAAU,CAAC;MAAEW,IAAF;MAAQC;IAAR,CAAD,CAA5B;;IAEA,IAAI,CAACC,SAAL,EAAgB;MACd,OAAO,IAAP;IACD;;IAED,MAAMC,GAAG,GAAGf,YAAY,GAAGA,YAAY,CAACY,IAAD,EAAOC,KAAP,CAAf,GAA+BA,KAAvD;IACA,oBAAOG,cAAA,CAAMC,YAAN,CAAmBH,SAAnB,EAA8B;MACnCC;IADmC,CAA9B,CAAP;EAGD,CAXD,CADH,GAaGb,QAhCN,CAFF,CAlBa;AAAA,CAAf;;eAyDef,M"}
@@ -1 +1 @@
1
- {"version":3,"names":["ToggleButton","Icon","icon","toggled","onPress","defaultValue","disabled","color","colorSecondary","borderColor","iconSize","width","height","theme","colors","style","rest","internalValue","setInternalValue","React","useState","useEffect","handlePress","styles","mainContainer","backgroundColor","StyleSheet","create","borderWidth","withTheme"],"sources":["ToggleButton.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport { colorTypes } from \"@draftbit/types\";\nimport { StyleProp, StyleSheet, ViewStyle } from \"react-native\";\nimport IconButton from \"./IconButton\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\ntype Props = {\n icon: string;\n toggled?: boolean;\n onPress?: (value: boolean) => void;\n defaultValue?: boolean;\n disabled?: boolean;\n color?: colorTypes;\n colorSecondary?: colorTypes;\n borderColor?: colorTypes;\n iconSize?: number;\n width?: number;\n height?: number;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst ToggleButton: React.FC<Props> = ({\n Icon,\n icon,\n toggled = false,\n onPress = () => {},\n defaultValue,\n disabled = false,\n color = \"primary\",\n colorSecondary = \"surface\",\n borderColor = \"divider\",\n iconSize = 25,\n width = 50,\n height = 50,\n theme: { colors },\n style,\n ...rest\n}) => {\n const [internalValue, setInternalValue] = React.useState<boolean>(\n toggled || defaultValue || false\n );\n\n React.useEffect(() => {\n if (toggled != null) {\n setInternalValue(toggled);\n }\n }, [toggled]);\n\n React.useEffect(() => {\n if (defaultValue != null) {\n setInternalValue(defaultValue);\n }\n }, [defaultValue]);\n\n const handlePress = () => {\n setInternalValue(!internalValue);\n onPress(!internalValue);\n };\n\n return (\n <IconButton\n Icon={Icon}\n icon={icon}\n size={iconSize}\n color={internalValue ? colors[color] : colors[colorSecondary]}\n onPress={handlePress}\n disabled={disabled}\n style={[\n styles.mainContainer,\n {\n width,\n height,\n backgroundColor: internalValue\n ? colors[colorSecondary]\n : colors[color],\n borderColor: colors[borderColor],\n },\n style,\n ]}\n {...rest}\n />\n );\n};\n\nconst styles = StyleSheet.create({\n mainContainer: {\n borderWidth: 1,\n },\n});\n\nexport default withTheme(ToggleButton);\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;;;AAoBA,MAAMA,YAA6B,GAAG,QAgBhC;EAAA,IAhBiC;IACrCC,IADqC;IAErCC,IAFqC;IAGrCC,OAAO,GAAG,KAH2B;IAIrCC,OAAO,GAAG,MAAM,CAAE,CAJmB;IAKrCC,YALqC;IAMrCC,QAAQ,GAAG,KAN0B;IAOrCC,KAAK,GAAG,SAP6B;IAQrCC,cAAc,GAAG,SARoB;IASrCC,WAAW,GAAG,SATuB;IAUrCC,QAAQ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,GAAGG,uBAAA,CAAWC,MAAX,CAAkB;EAC/BH,aAAa,EAAE;IACbI,WAAW,EAAE;EADA;AADgB,CAAlB,CAAf;;eAMe,IAAAC,kBAAA,EAAU7B,YAAV,C"}
1
+ {"version":3,"names":["ToggleButton","Icon","icon","toggled","onPress","defaultValue","disabled","color","colorSecondary","borderColor","iconSize","width","height","theme","colors","style","rest","internalValue","setInternalValue","React","useState","useEffect","handlePress","styles","mainContainer","backgroundColor","StyleSheet","create","borderWidth","withTheme"],"sources":["ToggleButton.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport { colorTypes } from \"@draftbit/types\";\nimport { StyleProp, StyleSheet, ViewStyle } from \"react-native\";\nimport IconButton from \"./IconButton\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\ntype Props = {\n icon: string;\n toggled?: boolean;\n onPress?: (value: boolean) => void;\n defaultValue?: boolean;\n disabled?: boolean;\n color?: colorTypes;\n colorSecondary?: colorTypes;\n borderColor?: colorTypes;\n iconSize?: number;\n width?: number;\n height?: number;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst ToggleButton: React.FC<React.PropsWithChildren<Props>> = ({\n Icon,\n icon,\n toggled = false,\n onPress = () => {},\n defaultValue,\n disabled = false,\n color = \"primary\",\n colorSecondary = \"surface\",\n borderColor = \"divider\",\n iconSize = 25,\n width = 50,\n height = 50,\n theme: { colors },\n style,\n ...rest\n}) => {\n const [internalValue, setInternalValue] = React.useState<boolean>(\n toggled || defaultValue || false\n );\n\n React.useEffect(() => {\n if (toggled != null) {\n setInternalValue(toggled);\n }\n }, [toggled]);\n\n React.useEffect(() => {\n if (defaultValue != null) {\n setInternalValue(defaultValue);\n }\n }, [defaultValue]);\n\n const handlePress = () => {\n setInternalValue(!internalValue);\n onPress(!internalValue);\n };\n\n return (\n <IconButton\n Icon={Icon}\n icon={icon}\n size={iconSize}\n color={internalValue ? colors[color] : colors[colorSecondary]}\n onPress={handlePress}\n disabled={disabled}\n style={[\n styles.mainContainer,\n {\n width,\n height,\n backgroundColor: internalValue\n ? colors[colorSecondary]\n : colors[color],\n borderColor: colors[borderColor],\n },\n style,\n ]}\n {...rest}\n />\n );\n};\n\nconst styles = StyleSheet.create({\n mainContainer: {\n borderWidth: 1,\n },\n});\n\nexport default withTheme(ToggleButton);\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;;;AAoBA,MAAMA,YAAsD,GAAG,QAgBzD;EAAA,IAhB0D;IAC9DC,IAD8D;IAE9DC,IAF8D;IAG9DC,OAAO,GAAG,KAHoD;IAI9DC,OAAO,GAAG,MAAM,CAAE,CAJ4C;IAK9DC,YAL8D;IAM9DC,QAAQ,GAAG,KANmD;IAO9DC,KAAK,GAAG,SAPsD;IAQ9DC,cAAc,GAAG,SAR6C;IAS9DC,WAAW,GAAG,SATgD;IAU9DC,QAAQ,GAAG,EAVmD;IAW9DC,KAAK,GAAG,EAXsD;IAY9DC,MAAM,GAAG,EAZqD;IAa9DC,KAAK,EAAE;MAAEC;IAAF,CAbuD;IAc9DC,KAd8D;IAe9D,GAAGC;EAf2D,CAgB1D;EACJ,MAAM,CAACC,aAAD,EAAgBC,gBAAhB,IAAoCC,KAAK,CAACC,QAAN,CACxCjB,OAAO,IAAIE,YAAX,IAA2B,KADa,CAA1C;EAIAc,KAAK,CAACE,SAAN,CAAgB,MAAM;IACpB,IAAIlB,OAAO,IAAI,IAAf,EAAqB;MACnBe,gBAAgB,CAACf,OAAD,CAAhB;IACD;EACF,CAJD,EAIG,CAACA,OAAD,CAJH;EAMAgB,KAAK,CAACE,SAAN,CAAgB,MAAM;IACpB,IAAIhB,YAAY,IAAI,IAApB,EAA0B;MACxBa,gBAAgB,CAACb,YAAD,CAAhB;IACD;EACF,CAJD,EAIG,CAACA,YAAD,CAJH;;EAMA,MAAMiB,WAAW,GAAG,MAAM;IACxBJ,gBAAgB,CAAC,CAACD,aAAF,CAAhB;IACAb,OAAO,CAAC,CAACa,aAAF,CAAP;EACD,CAHD;;EAKA,oBACE,oBAAC,mBAAD;IACE,IAAI,EAAEhB,IADR;IAEE,IAAI,EAAEC,IAFR;IAGE,IAAI,EAAEQ,QAHR;IAIE,KAAK,EAAEO,aAAa,GAAGH,MAAM,CAACP,KAAD,CAAT,GAAmBO,MAAM,CAACN,cAAD,CAJ/C;IAKE,OAAO,EAAEc,WALX;IAME,QAAQ,EAAEhB,QANZ;IAOE,KAAK,EAAE,CACLiB,MAAM,CAACC,aADF,EAEL;MACEb,KADF;MAEEC,MAFF;MAGEa,eAAe,EAAER,aAAa,GAC1BH,MAAM,CAACN,cAAD,CADoB,GAE1BM,MAAM,CAACP,KAAD,CALZ;MAMEE,WAAW,EAAEK,MAAM,CAACL,WAAD;IANrB,CAFK,EAULM,KAVK;EAPT,GAmBMC,IAnBN,EADF;AAuBD,CA7DD;;AA+DA,MAAMO,MAAM,GAAGG,uBAAA,CAAWC,MAAX,CAAkB;EAC/BH,aAAa,EAAE;IACbI,WAAW,EAAE;EADA;AADgB,CAAlB,CAAf;;eAMe,IAAAC,kBAAA,EAAU7B,YAAV,C"}
@@ -1 +1 @@
1
- {"version":3,"names":["injectIcon","Component","Icon","props","React","createElement"],"sources":["Icon.ts"],"sourcesContent":["/**\n * This is an interface for a hybrid component.\n *\n * Its public implementation is `@draftbit/native`, and it is injected inside\n * `@draftbit/ui`.\n */\nimport React from \"react\";\nimport { ViewProps, StyleProp, ImageStyle } from \"react-native\";\n\nimport { Subtract } from \"utility-types\";\n\ntype Props = {\n name: string | number | { uri: string };\n color?: string;\n size: number;\n style?: StyleProp<ImageStyle>;\n} & ViewProps;\n\nexport type IconI = React.ComponentType<Props>;\n\nexport interface IconSlot {\n Icon: IconI;\n}\n\nexport const injectIcon =\n <P extends IconSlot>(Component: React.ComponentType<P>, Icon: IconI) =>\n (props: Subtract<P, IconSlot>) =>\n React.createElement(Component, { ...(props as P), Icon });\n"],"mappings":";;;;;;;AAMA;;;;AANA;AACA;AACA;AACA;AACA;AACA;AAmBO,MAAMA,UAAU,GACrB,CAAqBC,SAArB,EAAwDC,IAAxD,KACCC,KAAD,iBACEC,cAAA,CAAMC,aAAN,CAAoBJ,SAApB,EAA+B,EAAE,GAAIE,KAAN;EAAmBD;AAAnB,CAA/B,CAHG"}
1
+ {"version":3,"names":["injectIcon","Component","Icon","props","React","createElement"],"sources":["Icon.ts"],"sourcesContent":["/**\n * This is an interface for a hybrid component.\n *\n * Its public implementation is `@draftbit/native`, and it is injected inside\n * `@draftbit/ui`.\n */\nimport React from \"react\";\nimport { ViewProps, StyleProp, ImageStyle } from \"react-native\";\n\nimport { Subtract } from \"utility-types\";\n\ntype Props = {\n name: string;\n color?: string;\n size: number;\n style?: StyleProp<ImageStyle>;\n} & ViewProps;\n\nexport type IconI = React.ComponentType<Props>;\n\nexport interface IconSlot {\n Icon: IconI;\n}\n\nexport const injectIcon =\n <P extends IconSlot>(Component: React.ComponentType<P>, Icon: IconI) =>\n (props: Subtract<P, IconSlot>) =>\n React.createElement(Component, { ...(props as P), Icon });\n"],"mappings":";;;;;;;AAMA;;;;AANA;AACA;AACA;AACA;AACA;AACA;AAmBO,MAAMA,UAAU,GACrB,CAAqBC,SAArB,EAAwDC,IAAxD,KACCC,KAAD,iBACEC,cAAA,CAAMC,aAAN,CAAoBJ,SAApB,EAA+B,EAAE,GAAIE,KAAN;EAAmBD;AAAnB,CAA/B,CAHG"}
@@ -11,10 +11,10 @@ const SEED_DATA = {
11
11
  name: "Keyboard Avoiding View",
12
12
  tag: "KeyboardAvoidingView",
13
13
  description: "View that moves out of the way of the virtual keyboard. ",
14
- category: _types.COMPONENT_TYPES.deprecated,
14
+ category: _types.COMPONENT_TYPES.layout,
15
15
  props: {
16
16
  enabled: {
17
- label: "Enable",
17
+ label: "Enabled",
18
18
  description: "Enable the keyboard avoiding view",
19
19
  editable: true,
20
20
  required: true,
@@ -1 +1 @@
1
- {"version":3,"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","deprecated","props","enabled","label","editable","required","defaultValue","formType","FORM_TYPES","boolean","propType","PROP_TYPES","BOOLEAN","group","GROUPS","basic","behavior","options","flatArray","STRING","keyboardVerticalOffset","number","NUMBER"],"sources":["KeyboardAvoidingView.ts"],"sourcesContent":["import {\n COMPONENT_TYPES,\n FORM_TYPES,\n PROP_TYPES,\n GROUPS,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Keyboard Avoiding View\",\n tag: \"KeyboardAvoidingView\",\n description: \"View that moves out of the way of the virtual keyboard. \",\n category: COMPONENT_TYPES.deprecated,\n props: {\n enabled: {\n label: \"Enable\",\n description: \"Enable the keyboard avoiding view\",\n editable: true,\n required: true,\n defaultValue: true,\n formType: FORM_TYPES.boolean,\n propType: PROP_TYPES.BOOLEAN,\n group: GROUPS.basic,\n },\n behavior: {\n label: \"Resizing Behavior\",\n description:\n \"The behavior for how the keyboard resizing interacts with the rest of the screen. (Default: padding).\",\n editable: true,\n required: true,\n defaultValue: \"padding\",\n options: [\"padding\", \"position\", \"height\"],\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n group: GROUPS.basic,\n },\n keyboardVerticalOffset: {\n label: \"Keyboard Vertical Offset\",\n description:\n \"The distance between the bottom of the view and the keyboard\",\n editable: true,\n required: false,\n defaultValue: 0,\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n group: GROUPS.basic,\n },\n },\n};\n"],"mappings":";;;;;;;AAAA;;AAOO,MAAMA,SAAS,GAAG;EACvBC,IAAI,EAAE,wBADiB;EAEvBC,GAAG,EAAE,sBAFkB;EAGvBC,WAAW,EAAE,0DAHU;EAIvBC,QAAQ,EAAEC,sBAAA,CAAgBC,UAJH;EAKvBC,KAAK,EAAE;IACLC,OAAO,EAAE;MACPC,KAAK,EAAE,QADA;MAEPN,WAAW,EAAE,mCAFN;MAGPO,QAAQ,EAAE,IAHH;MAIPC,QAAQ,EAAE,IAJH;MAKPC,YAAY,EAAE,IALP;MAMPC,QAAQ,EAAEC,iBAAA,CAAWC,OANd;MAOPC,QAAQ,EAAEC,iBAAA,CAAWC,OAPd;MAQPC,KAAK,EAAEC,aAAA,CAAOC;IARP,CADJ;IAWLC,QAAQ,EAAE;MACRb,KAAK,EAAE,mBADC;MAERN,WAAW,EACT,uGAHM;MAIRO,QAAQ,EAAE,IAJF;MAKRC,QAAQ,EAAE,IALF;MAMRC,YAAY,EAAE,SANN;MAORW,OAAO,EAAE,CAAC,SAAD,EAAY,UAAZ,EAAwB,QAAxB,CAPD;MAQRV,QAAQ,EAAEC,iBAAA,CAAWU,SARb;MASRR,QAAQ,EAAEC,iBAAA,CAAWQ,MATb;MAURN,KAAK,EAAEC,aAAA,CAAOC;IAVN,CAXL;IAuBLK,sBAAsB,EAAE;MACtBjB,KAAK,EAAE,0BADe;MAEtBN,WAAW,EACT,8DAHoB;MAItBO,QAAQ,EAAE,IAJY;MAKtBC,QAAQ,EAAE,KALY;MAMtBC,YAAY,EAAE,CANQ;MAOtBC,QAAQ,EAAEC,iBAAA,CAAWa,MAPC;MAQtBX,QAAQ,EAAEC,iBAAA,CAAWW,MARC;MAStBT,KAAK,EAAEC,aAAA,CAAOC;IATQ;EAvBnB;AALgB,CAAlB"}
1
+ {"version":3,"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","layout","props","enabled","label","editable","required","defaultValue","formType","FORM_TYPES","boolean","propType","PROP_TYPES","BOOLEAN","group","GROUPS","basic","behavior","options","flatArray","STRING","keyboardVerticalOffset","number","NUMBER"],"sources":["KeyboardAvoidingView.ts"],"sourcesContent":["import {\n COMPONENT_TYPES,\n FORM_TYPES,\n PROP_TYPES,\n GROUPS,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Keyboard Avoiding View\",\n tag: \"KeyboardAvoidingView\",\n description: \"View that moves out of the way of the virtual keyboard. \",\n category: COMPONENT_TYPES.layout,\n props: {\n enabled: {\n label: \"Enabled\",\n description: \"Enable the keyboard avoiding view\",\n editable: true,\n required: true,\n defaultValue: true,\n formType: FORM_TYPES.boolean,\n propType: PROP_TYPES.BOOLEAN,\n group: GROUPS.basic,\n },\n behavior: {\n label: \"Resizing Behavior\",\n description:\n \"The behavior for how the keyboard resizing interacts with the rest of the screen. (Default: padding).\",\n editable: true,\n required: true,\n defaultValue: \"padding\",\n options: [\"padding\", \"position\", \"height\"],\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n group: GROUPS.basic,\n },\n keyboardVerticalOffset: {\n label: \"Keyboard Vertical Offset\",\n description:\n \"The distance between the bottom of the view and the keyboard\",\n editable: true,\n required: false,\n defaultValue: 0,\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n group: GROUPS.basic,\n },\n },\n};\n"],"mappings":";;;;;;;AAAA;;AAOO,MAAMA,SAAS,GAAG;EACvBC,IAAI,EAAE,wBADiB;EAEvBC,GAAG,EAAE,sBAFkB;EAGvBC,WAAW,EAAE,0DAHU;EAIvBC,QAAQ,EAAEC,sBAAA,CAAgBC,MAJH;EAKvBC,KAAK,EAAE;IACLC,OAAO,EAAE;MACPC,KAAK,EAAE,SADA;MAEPN,WAAW,EAAE,mCAFN;MAGPO,QAAQ,EAAE,IAHH;MAIPC,QAAQ,EAAE,IAJH;MAKPC,YAAY,EAAE,IALP;MAMPC,QAAQ,EAAEC,iBAAA,CAAWC,OANd;MAOPC,QAAQ,EAAEC,iBAAA,CAAWC,OAPd;MAQPC,KAAK,EAAEC,aAAA,CAAOC;IARP,CADJ;IAWLC,QAAQ,EAAE;MACRb,KAAK,EAAE,mBADC;MAERN,WAAW,EACT,uGAHM;MAIRO,QAAQ,EAAE,IAJF;MAKRC,QAAQ,EAAE,IALF;MAMRC,YAAY,EAAE,SANN;MAORW,OAAO,EAAE,CAAC,SAAD,EAAY,UAAZ,EAAwB,QAAxB,CAPD;MAQRV,QAAQ,EAAEC,iBAAA,CAAWU,SARb;MASRR,QAAQ,EAAEC,iBAAA,CAAWQ,MATb;MAURN,KAAK,EAAEC,aAAA,CAAOC;IAVN,CAXL;IAuBLK,sBAAsB,EAAE;MACtBjB,KAAK,EAAE,0BADe;MAEtBN,WAAW,EACT,8DAHoB;MAItBO,QAAQ,EAAE,IAJY;MAKtBC,QAAQ,EAAE,KALY;MAMtBC,YAAY,EAAE,CANQ;MAOtBC,QAAQ,EAAEC,iBAAA,CAAWa,MAPC;MAQtBX,QAAQ,EAAEC,iBAAA,CAAWW,MARC;MAStBT,KAAK,EAAEC,aAAA,CAAOC;IATQ;EAvBnB;AALgB,CAAlB"}
@@ -1 +1 @@
1
- {"version":3,"names":["SEED_DATA","name","tag","category","COMPONENT_TYPES","input","layout","triggers","Triggers","OnValueChange","props","direction","createDirectionProp","fieldName","createFieldNameProp","handlerPropName","valuePropName","defaultValue"],"sources":["RadioButtonGroup.ts"],"sourcesContent":["import {\n COMPONENT_TYPES,\n createFieldNameProp,\n createDirectionProp,\n Triggers,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Radio Button Group\",\n tag: \"RadioButtonGroup\",\n category: COMPONENT_TYPES.input,\n layout: {},\n triggers: [Triggers.OnValueChange],\n props: {\n direction: createDirectionProp(),\n fieldName: createFieldNameProp({\n handlerPropName: \"onValueChange\",\n valuePropName: \"value\",\n defaultValue: \"radioButtonGroupValue\",\n }),\n },\n};\n"],"mappings":";;;;;;;AAAA;;AAOO,MAAMA,SAAS,GAAG;EACvBC,IAAI,EAAE,oBADiB;EAEvBC,GAAG,EAAE,kBAFkB;EAGvBC,QAAQ,EAAEC,sBAAA,CAAgBC,KAHH;EAIvBC,MAAM,EAAE,EAJe;EAKvBC,QAAQ,EAAE,CAACC,eAAA,CAASC,aAAV,CALa;EAMvBC,KAAK,EAAE;IACLC,SAAS,EAAE,IAAAC,0BAAA,GADN;IAELC,SAAS,EAAE,IAAAC,0BAAA,EAAoB;MAC7BC,eAAe,EAAE,eADY;MAE7BC,aAAa,EAAE,OAFc;MAG7BC,YAAY,EAAE;IAHe,CAApB;EAFN;AANgB,CAAlB"}
1
+ {"version":3,"names":["SEED_DATA","name","tag","category","COMPONENT_TYPES","input","layout","triggers","Triggers","OnValueChange","props","direction","createDirectionProp","fieldName","createFieldNameProp","handlerPropName","valuePropName","defaultValue"],"sources":["RadioButtonGroup.js"],"sourcesContent":["import { COMPONENT_TYPES, createFieldNameProp, createDirectionProp, Triggers, } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"Radio Button Group\",\n tag: \"RadioButtonGroup\",\n category: COMPONENT_TYPES.input,\n layout: {},\n triggers: [Triggers.OnValueChange],\n props: {\n direction: createDirectionProp(),\n fieldName: createFieldNameProp({\n handlerPropName: \"onValueChange\",\n valuePropName: \"value\",\n defaultValue: \"radioButtonGroupValue\",\n }),\n },\n};\n"],"mappings":";;;;;;;AAAA;;AACO,MAAMA,SAAS,GAAG;EACrBC,IAAI,EAAE,oBADe;EAErBC,GAAG,EAAE,kBAFgB;EAGrBC,QAAQ,EAAEC,sBAAA,CAAgBC,KAHL;EAIrBC,MAAM,EAAE,EAJa;EAKrBC,QAAQ,EAAE,CAACC,eAAA,CAASC,aAAV,CALW;EAMrBC,KAAK,EAAE;IACHC,SAAS,EAAE,IAAAC,0BAAA,GADR;IAEHC,SAAS,EAAE,IAAAC,0BAAA,EAAoB;MAC3BC,eAAe,EAAE,eADU;MAE3BC,aAAa,EAAE,OAFY;MAG3BC,YAAY,EAAE;IAHa,CAApB;EAFR;AANc,CAAlB"}
@@ -1 +1 @@
1
- {"version":3,"names":["SEED_DATA","name","tag","category","COMPONENT_TYPES","input","layout","props","label","createTextProp","description","required","defaultValue","direction","createTextEnumProp","options","value","color","createColorProp","group","GROUPS","basic","unselectedColor"],"sources":["RadioButtonRow.ts"],"sourcesContent":["import {\n createTextProp,\n createTextEnumProp,\n COMPONENT_TYPES,\n createColorProp,\n GROUPS,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Radio Button Row\",\n tag: \"RadioButtonRow\",\n category: COMPONENT_TYPES.input,\n layout: {},\n props: {\n label: createTextProp({\n label: \"Label\",\n description: \"Label to show with the radio button\",\n required: true,\n defaultValue: \"First Option\",\n }),\n direction: createTextEnumProp({\n label: \"Direction\",\n description:\n \"Whether the checkbox will appear on the left or on the right\",\n options: [\"row\", \"row-reverse\"],\n }),\n value: createTextProp({\n label: \"Value\",\n description: \"Value of the radio button\",\n defaultValue: null,\n required: true,\n }),\n color: createColorProp({\n group: GROUPS.basic,\n description: \"Color for the button\",\n defaultValue: \"primary\",\n }),\n unselectedColor: createColorProp({\n group: GROUPS.basic,\n label: \"Unselected Color\",\n description: \"Unselected Color for the button\",\n defaultValue: \"primary\",\n }),\n },\n};\n"],"mappings":";;;;;;;AAAA;;AAQO,MAAMA,SAAS,GAAG;EACvBC,IAAI,EAAE,kBADiB;EAEvBC,GAAG,EAAE,gBAFkB;EAGvBC,QAAQ,EAAEC,sBAAA,CAAgBC,KAHH;EAIvBC,MAAM,EAAE,EAJe;EAKvBC,KAAK,EAAE;IACLC,KAAK,EAAE,IAAAC,qBAAA,EAAe;MACpBD,KAAK,EAAE,OADa;MAEpBE,WAAW,EAAE,qCAFO;MAGpBC,QAAQ,EAAE,IAHU;MAIpBC,YAAY,EAAE;IAJM,CAAf,CADF;IAOLC,SAAS,EAAE,IAAAC,yBAAA,EAAmB;MAC5BN,KAAK,EAAE,WADqB;MAE5BE,WAAW,EACT,8DAH0B;MAI5BK,OAAO,EAAE,CAAC,KAAD,EAAQ,aAAR;IAJmB,CAAnB,CAPN;IAaLC,KAAK,EAAE,IAAAP,qBAAA,EAAe;MACpBD,KAAK,EAAE,OADa;MAEpBE,WAAW,EAAE,2BAFO;MAGpBE,YAAY,EAAE,IAHM;MAIpBD,QAAQ,EAAE;IAJU,CAAf,CAbF;IAmBLM,KAAK,EAAE,IAAAC,sBAAA,EAAgB;MACrBC,KAAK,EAAEC,aAAA,CAAOC,KADO;MAErBX,WAAW,EAAE,sBAFQ;MAGrBE,YAAY,EAAE;IAHO,CAAhB,CAnBF;IAwBLU,eAAe,EAAE,IAAAJ,sBAAA,EAAgB;MAC/BC,KAAK,EAAEC,aAAA,CAAOC,KADiB;MAE/Bb,KAAK,EAAE,kBAFwB;MAG/BE,WAAW,EAAE,iCAHkB;MAI/BE,YAAY,EAAE;IAJiB,CAAhB;EAxBZ;AALgB,CAAlB"}
1
+ {"version":3,"names":["SEED_DATA","name","tag","category","COMPONENT_TYPES","input","layout","props","label","createTextProp","description","required","defaultValue","direction","createTextEnumProp","options","value","color","createColorProp","group","GROUPS","basic","unselectedColor"],"sources":["RadioButtonRow.js"],"sourcesContent":["import { createTextProp, createTextEnumProp, COMPONENT_TYPES, createColorProp, GROUPS, } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"Radio Button Row\",\n tag: \"RadioButtonRow\",\n category: COMPONENT_TYPES.input,\n layout: {},\n props: {\n label: createTextProp({\n label: \"Label\",\n description: \"Label to show with the radio button\",\n required: true,\n defaultValue: \"First Option\",\n }),\n direction: createTextEnumProp({\n label: \"Direction\",\n description: \"Whether the checkbox will appear on the left or on the right\",\n options: [\"row\", \"row-reverse\"],\n }),\n value: createTextProp({\n label: \"Value\",\n description: \"Value of the radio button\",\n defaultValue: null,\n required: true,\n }),\n color: createColorProp({\n group: GROUPS.basic,\n description: \"Color for the button\",\n defaultValue: \"primary\",\n }),\n unselectedColor: createColorProp({\n group: GROUPS.basic,\n label: \"Unselected Color\",\n description: \"Unselected Color for the button\",\n defaultValue: \"primary\",\n }),\n },\n};\n"],"mappings":";;;;;;;AAAA;;AACO,MAAMA,SAAS,GAAG;EACrBC,IAAI,EAAE,kBADe;EAErBC,GAAG,EAAE,gBAFgB;EAGrBC,QAAQ,EAAEC,sBAAA,CAAgBC,KAHL;EAIrBC,MAAM,EAAE,EAJa;EAKrBC,KAAK,EAAE;IACHC,KAAK,EAAE,IAAAC,qBAAA,EAAe;MAClBD,KAAK,EAAE,OADW;MAElBE,WAAW,EAAE,qCAFK;MAGlBC,QAAQ,EAAE,IAHQ;MAIlBC,YAAY,EAAE;IAJI,CAAf,CADJ;IAOHC,SAAS,EAAE,IAAAC,yBAAA,EAAmB;MAC1BN,KAAK,EAAE,WADmB;MAE1BE,WAAW,EAAE,8DAFa;MAG1BK,OAAO,EAAE,CAAC,KAAD,EAAQ,aAAR;IAHiB,CAAnB,CAPR;IAYHC,KAAK,EAAE,IAAAP,qBAAA,EAAe;MAClBD,KAAK,EAAE,OADW;MAElBE,WAAW,EAAE,2BAFK;MAGlBE,YAAY,EAAE,IAHI;MAIlBD,QAAQ,EAAE;IAJQ,CAAf,CAZJ;IAkBHM,KAAK,EAAE,IAAAC,sBAAA,EAAgB;MACnBC,KAAK,EAAEC,aAAA,CAAOC,KADK;MAEnBX,WAAW,EAAE,sBAFM;MAGnBE,YAAY,EAAE;IAHK,CAAhB,CAlBJ;IAuBHU,eAAe,EAAE,IAAAJ,sBAAA,EAAgB;MAC7BC,KAAK,EAAEC,aAAA,CAAOC,KADe;MAE7Bb,KAAK,EAAE,kBAFsB;MAG7BE,WAAW,EAAE,iCAHgB;MAI7BE,YAAY,EAAE;IAJe,CAAhB;EAvBd;AALc,CAAlB"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","ThemeProvider","PortalHost","Provider","Component","render","props","theme","children"],"sources":["Provider.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { ThemeProvider } from \"./theming\";\nimport PortalHost from \"./components/Portal/PortalHost\";\nimport { Theme } from \"@draftbit/types\";\n\ntype Props = {\n children: React.ReactNode;\n theme?: Theme;\n};\n\nexport default class Provider extends React.Component<Props> {\n render() {\n return (\n <PortalHost>\n <ThemeProvider theme={this.props.theme}>\n {this.props.children}\n </ThemeProvider>\n </PortalHost>\n );\n }\n}\n"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,aAAT,QAA8B,WAA9B;AACA,OAAOC,UAAP,MAAuB,gCAAvB;AAQA,eAAe,MAAMC,QAAN,SAAuBH,KAAK,CAACI,SAA7B,CAA8C;EAC3DC,MAAM,GAAG;IACP,oBACE,oBAAC,UAAD,qBACE,oBAAC,aAAD;MAAe,KAAK,EAAE,KAAKC,KAAL,CAAWC;IAAjC,GACG,KAAKD,KAAL,CAAWE,QADd,CADF,CADF;EAOD;;AAT0D"}
1
+ {"version":3,"names":["React","ThemeProvider","PortalHost","Provider","Component","render","props","theme","children"],"sources":["Provider.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { ThemeProvider } from \"./theming\";\nimport PortalHost from \"./components/Portal/PortalHost\";\nimport { Theme } from \"@draftbit/types\";\n\ntype Props = {\n children: React.ReactNode;\n theme?: Theme;\n};\n\nexport default class Provider extends React.Component<Props> {\n render() {\n return (\n <PortalHost>\n {/* @ts-ignore */}\n <ThemeProvider theme={this.props.theme}>\n {this.props.children}\n </ThemeProvider>\n </PortalHost>\n );\n }\n}\n"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,aAAT,QAA8B,WAA9B;AACA,OAAOC,UAAP,MAAuB,gCAAvB;AAQA,eAAe,MAAMC,QAAN,SAAuBH,KAAK,CAACI,SAA7B,CAA8C;EAC3DC,MAAM,GAAG;IACP,oBACE,oBAAC,UAAD,qBAEE,oBAAC,aAAD;MAAe,KAAK,EAAE,KAAKC,KAAL,CAAWC;IAAjC,GACG,KAAKD,KAAL,CAAWE,QADd,CAFF,CADF;EAQD;;AAV0D"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","ActionSheetItem","ActionSheetCancel","label","color","style","onPress"],"sources":["ActionSheetCancel.tsx"],"sourcesContent":["import React from \"react\";\nimport { StyleProp, ViewStyle, TextStyle } from \"react-native\";\nimport ActionSheetItem from \"./ActionSheetItem\";\n\ntype Props = {\n label: string;\n color: string;\n style?: StyleProp<ViewStyle | TextStyle>;\n onPress?: () => void;\n};\n\nconst ActionSheetCancel: React.FC<Props> = ({\n label = \"Cancel\",\n color,\n style,\n onPress,\n}) => {\n return (\n <ActionSheetItem\n label={label}\n color={color || \"#FF453A\"}\n style={[style]}\n onPress={onPress}\n />\n );\n};\n\nexport default ActionSheetCancel;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,OAAOC,eAAP,MAA4B,mBAA5B;;AASA,MAAMC,iBAAkC,GAAG,QAKrC;EAAA,IALsC;IAC1CC,KAAK,GAAG,QADkC;IAE1CC,KAF0C;IAG1CC,KAH0C;IAI1CC;EAJ0C,CAKtC;EACJ,oBACE,oBAAC,eAAD;IACE,KAAK,EAAEH,KADT;IAEE,KAAK,EAAEC,KAAK,IAAI,SAFlB;IAGE,KAAK,EAAE,CAACC,KAAD,CAHT;IAIE,OAAO,EAAEC;EAJX,EADF;AAQD,CAdD;;AAgBA,eAAeJ,iBAAf"}
1
+ {"version":3,"names":["React","ActionSheetItem","ActionSheetCancel","label","color","style","onPress"],"sources":["ActionSheetCancel.tsx"],"sourcesContent":["import React from \"react\";\nimport { StyleProp, ViewStyle, TextStyle } from \"react-native\";\nimport ActionSheetItem from \"./ActionSheetItem\";\n\ntype Props = {\n label: string;\n color: string;\n style?: StyleProp<ViewStyle | TextStyle>;\n onPress?: () => void;\n};\n\nconst ActionSheetCancel: React.FC<React.PropsWithChildren<Props>> = ({\n label = \"Cancel\",\n color,\n style,\n onPress,\n}) => {\n return (\n <ActionSheetItem\n label={label}\n color={color || \"#FF453A\"}\n style={[style]}\n onPress={onPress}\n />\n );\n};\n\nexport default ActionSheetCancel;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,OAAOC,eAAP,MAA4B,mBAA5B;;AASA,MAAMC,iBAA2D,GAAG,QAK9D;EAAA,IAL+D;IACnEC,KAAK,GAAG,QAD2D;IAEnEC,KAFmE;IAGnEC,KAHmE;IAInEC;EAJmE,CAK/D;EACJ,oBACE,oBAAC,eAAD;IACE,KAAK,EAAEH,KADT;IAEE,KAAK,EAAEC,KAAK,IAAI,SAFlB;IAGE,KAAK,EAAE,CAACC,KAAD,CAHT;IAIE,OAAO,EAAEC;EAJX,EADF;AAQD,CAdD;;AAgBA,eAAeJ,iBAAf"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","Text","StyleSheet","TouchableOpacity","extractStyles","ActionSheetItem","label","style","color","onPress","textStyles","viewStyles","styles","wrapper","create","borderBottomWidth","hairlineWidth","borderBottomColor","backgroundColor","minHeight","overflow","display","justifyContent","fontSize","textAlign","fontWeight","paddingHorizontal","paddingVertical","alignSelf"],"sources":["ActionSheetItem.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n Text,\n StyleSheet,\n StyleProp,\n TouchableOpacity,\n ViewStyle,\n TextStyle,\n} from \"react-native\";\nimport { extractStyles } from \"../../utilities\";\n\ntype Props = {\n label: string;\n color: string;\n style?: StyleProp<ViewStyle | TextStyle>;\n onPress?: () => void;\n};\n\nconst ActionSheetItem: React.FC<Props> = ({ label, style, color, onPress }) => {\n const { textStyles, viewStyles } = extractStyles(style);\n return (\n <TouchableOpacity\n activeOpacity={0.7}\n style={[styles.wrapper, viewStyles]}\n onPress={onPress}\n >\n <Text style={[styles.label, textStyles, { color }]}>{label}</Text>\n </TouchableOpacity>\n );\n};\n\nconst styles = StyleSheet.create({\n wrapper: {\n borderBottomWidth: StyleSheet.hairlineWidth,\n borderBottomColor: \"#CCCCCC\",\n backgroundColor: \"#F1F1F1\",\n minHeight: 50,\n overflow: \"hidden\",\n display: \"flex\",\n justifyContent: \"center\",\n },\n label: {\n fontSize: 16,\n textAlign: \"center\",\n color: \"#0A84FF\",\n fontWeight: \"500\",\n overflow: \"hidden\",\n paddingHorizontal: 20,\n paddingVertical: 10,\n alignSelf: \"center\",\n },\n});\n\nexport default ActionSheetItem;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SACEC,IADF,EAEEC,UAFF,EAIEC,gBAJF,QAOO,cAPP;AAQA,SAASC,aAAT,QAA8B,iBAA9B;;AASA,MAAMC,eAAgC,GAAG,QAAsC;EAAA,IAArC;IAAEC,KAAF;IAASC,KAAT;IAAgBC,KAAhB;IAAuBC;EAAvB,CAAqC;EAC7E,MAAM;IAAEC,UAAF;IAAcC;EAAd,IAA6BP,aAAa,CAACG,KAAD,CAAhD;EACA,oBACE,oBAAC,gBAAD;IACE,aAAa,EAAE,GADjB;IAEE,KAAK,EAAE,CAACK,MAAM,CAACC,OAAR,EAAiBF,UAAjB,CAFT;IAGE,OAAO,EAAEF;EAHX,gBAKE,oBAAC,IAAD;IAAM,KAAK,EAAE,CAACG,MAAM,CAACN,KAAR,EAAeI,UAAf,EAA2B;MAAEF;IAAF,CAA3B;EAAb,GAAqDF,KAArD,CALF,CADF;AASD,CAXD;;AAaA,MAAMM,MAAM,GAAGV,UAAU,CAACY,MAAX,CAAkB;EAC/BD,OAAO,EAAE;IACPE,iBAAiB,EAAEb,UAAU,CAACc,aADvB;IAEPC,iBAAiB,EAAE,SAFZ;IAGPC,eAAe,EAAE,SAHV;IAIPC,SAAS,EAAE,EAJJ;IAKPC,QAAQ,EAAE,QALH;IAMPC,OAAO,EAAE,MANF;IAOPC,cAAc,EAAE;EAPT,CADsB;EAU/BhB,KAAK,EAAE;IACLiB,QAAQ,EAAE,EADL;IAELC,SAAS,EAAE,QAFN;IAGLhB,KAAK,EAAE,SAHF;IAILiB,UAAU,EAAE,KAJP;IAKLL,QAAQ,EAAE,QALL;IAMLM,iBAAiB,EAAE,EANd;IAOLC,eAAe,EAAE,EAPZ;IAQLC,SAAS,EAAE;EARN;AAVwB,CAAlB,CAAf;AAsBA,eAAevB,eAAf"}
1
+ {"version":3,"names":["React","Text","StyleSheet","TouchableOpacity","extractStyles","ActionSheetItem","label","style","color","onPress","textStyles","viewStyles","styles","wrapper","create","borderBottomWidth","hairlineWidth","borderBottomColor","backgroundColor","minHeight","overflow","display","justifyContent","fontSize","textAlign","fontWeight","paddingHorizontal","paddingVertical","alignSelf"],"sources":["ActionSheetItem.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n Text,\n StyleSheet,\n StyleProp,\n TouchableOpacity,\n ViewStyle,\n TextStyle,\n} from \"react-native\";\nimport { extractStyles } from \"../../utilities\";\n\ntype Props = {\n label: string;\n color: string;\n style?: StyleProp<ViewStyle | TextStyle>;\n onPress?: () => void;\n};\n\nconst ActionSheetItem: React.FC<React.PropsWithChildren<Props>> = ({\n label,\n style,\n color,\n onPress,\n}) => {\n const { textStyles, viewStyles } = extractStyles(style);\n return (\n <TouchableOpacity\n activeOpacity={0.7}\n style={[styles.wrapper, viewStyles]}\n onPress={onPress}\n >\n <Text style={[styles.label, textStyles, { color }]}>{label}</Text>\n </TouchableOpacity>\n );\n};\n\nconst styles = StyleSheet.create({\n wrapper: {\n borderBottomWidth: StyleSheet.hairlineWidth,\n borderBottomColor: \"#CCCCCC\",\n backgroundColor: \"#F1F1F1\",\n minHeight: 50,\n overflow: \"hidden\",\n display: \"flex\",\n justifyContent: \"center\",\n },\n label: {\n fontSize: 16,\n textAlign: \"center\",\n color: \"#0A84FF\",\n fontWeight: \"500\",\n overflow: \"hidden\",\n paddingHorizontal: 20,\n paddingVertical: 10,\n alignSelf: \"center\",\n },\n});\n\nexport default ActionSheetItem;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SACEC,IADF,EAEEC,UAFF,EAIEC,gBAJF,QAOO,cAPP;AAQA,SAASC,aAAT,QAA8B,iBAA9B;;AASA,MAAMC,eAAyD,GAAG,QAK5D;EAAA,IAL6D;IACjEC,KADiE;IAEjEC,KAFiE;IAGjEC,KAHiE;IAIjEC;EAJiE,CAK7D;EACJ,MAAM;IAAEC,UAAF;IAAcC;EAAd,IAA6BP,aAAa,CAACG,KAAD,CAAhD;EACA,oBACE,oBAAC,gBAAD;IACE,aAAa,EAAE,GADjB;IAEE,KAAK,EAAE,CAACK,MAAM,CAACC,OAAR,EAAiBF,UAAjB,CAFT;IAGE,OAAO,EAAEF;EAHX,gBAKE,oBAAC,IAAD;IAAM,KAAK,EAAE,CAACG,MAAM,CAACN,KAAR,EAAeI,UAAf,EAA2B;MAAEF;IAAF,CAA3B;EAAb,GAAqDF,KAArD,CALF,CADF;AASD,CAhBD;;AAkBA,MAAMM,MAAM,GAAGV,UAAU,CAACY,MAAX,CAAkB;EAC/BD,OAAO,EAAE;IACPE,iBAAiB,EAAEb,UAAU,CAACc,aADvB;IAEPC,iBAAiB,EAAE,SAFZ;IAGPC,eAAe,EAAE,SAHV;IAIPC,SAAS,EAAE,EAJJ;IAKPC,QAAQ,EAAE,QALH;IAMPC,OAAO,EAAE,MANF;IAOPC,cAAc,EAAE;EAPT,CADsB;EAU/BhB,KAAK,EAAE;IACLiB,QAAQ,EAAE,EADL;IAELC,SAAS,EAAE,QAFN;IAGLhB,KAAK,EAAE,SAHF;IAILiB,UAAU,EAAE,KAJP;IAKLL,QAAQ,EAAE,QALL;IAMLM,iBAAiB,EAAE,EANd;IAOLC,eAAe,EAAE,EAPZ;IAQLC,SAAS,EAAE;EARN;AAVwB,CAAlB,CAAf;AAsBA,eAAevB,eAAf"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","Animated","Easing","CircularProgress","AnimatedProgress","createAnimatedComponent","AnimatedCircularProgress","duration","easing","out","ease","fill","prefill","useNativeDriver","tintColorSecondary","onAnimationComplete","tintColor","other","fillAnimation","useState","Value","animate","useCallback","toVal","dur","toValue","dura","eas","useNative","anim","timing","start","animateColor","tintAnimation","interpolate","inputRange","outputRange","useEffect","style","childrenContainerStyle"],"sources":["AnimatedCircularProgress.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n Animated,\n Easing,\n EasingFunction,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\nimport CircularProgress, {\n Props as CircularProgressProps,\n} from \"./CircularProgress\";\nconst AnimatedProgress = Animated.createAnimatedComponent(CircularProgress);\n\ntype Props = {\n duration?: number;\n easing?: EasingFunction;\n prefill?: number;\n useNativeDriver?: boolean;\n tintColorSecondary?: string;\n onAnimationComplete?: Animated.EndCallback | undefined;\n} & CircularProgressProps;\n\nconst AnimatedCircularProgress: React.FC<Props> = ({\n duration = 500,\n easing = Easing.out(Easing.ease),\n fill,\n prefill = 0,\n useNativeDriver = false,\n tintColorSecondary,\n onAnimationComplete,\n tintColor = \"black\",\n ...other\n}) => {\n const [fillAnimation] = React.useState<Animated.Value>(\n new Animated.Value(prefill)\n );\n\n const animate = React.useCallback(\n (\n toVal: number = -1,\n dur?: number,\n ease?: EasingFunction\n ): Animated.CompositeAnimation => {\n const toValue = toVal >= 0 ? toVal : fill;\n const dura = dur || duration;\n const eas = ease || easing;\n const useNative = useNativeDriver;\n\n const anim = Animated.timing(fillAnimation, {\n useNativeDriver: useNative,\n toValue,\n easing: eas,\n duration: dura,\n });\n anim.start(onAnimationComplete);\n\n return anim;\n },\n [\n duration,\n easing,\n fill,\n useNativeDriver,\n fillAnimation,\n onAnimationComplete,\n ]\n );\n\n const animateColor = () => {\n if (!tintColorSecondary) {\n return tintColor;\n }\n\n const tintAnimation = fillAnimation.interpolate({\n inputRange: [0, 100],\n outputRange: [tintColor, tintColorSecondary],\n });\n\n return tintAnimation;\n };\n\n React.useEffect(() => {\n animate();\n }, [fill, animate]);\n\n return (\n <AnimatedProgress\n {...other}\n style={other.style as Animated.WithAnimatedValue<StyleProp<ViewStyle>>}\n childrenContainerStyle={\n other.childrenContainerStyle as Animated.WithAnimatedValue<\n StyleProp<ViewStyle>\n >\n }\n fill={fillAnimation}\n tintColor={animateColor()}\n />\n );\n};\n\nexport default AnimatedCircularProgress;\n"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SACEC,QADF,EAEEC,MAFF,QAMO,cANP;AAOA,OAAOC,gBAAP,MAEO,oBAFP;AAGA,MAAMC,gBAAgB,GAAGH,QAAQ,CAACI,uBAAT,CAAiCF,gBAAjC,CAAzB;;AAWA,MAAMG,wBAAyC,GAAG,QAU5C;EAAA,IAV6C;IACjDC,QAAQ,GAAG,GADsC;IAEjDC,MAAM,GAAGN,M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E9CC,WAAW,EAAE,CAACpB,SAAD,EAAYF,kBAAZ;IAFiC,CAA1B,CAAtB;IAKA,OAAOmB,aAAP;EACD,CAXD;;EAaAjC,KAAK,CAACqC,SAAN,CAAgB,MAAM;IACpBhB,OAAO;EACR,CAFD,EAEG,CAACV,IAAD,EAAOU,OAAP,CAFH;EAIA,oBACE,oBAAC,gBAAD,eACMJ,KADN;IAEE,KAAK,EAAEA,KAAK,CAACqB,KAFf;IAGE,sBAAsB,EACpBrB,KAAK,CAACsB,sBAJV;IAQE,IAAI,EAAErB,aARR;IASE,SAAS,EAAEc,YAAY;EATzB,GADF;AAaD,CA5ED;;AA8EA,eAAe1B,wBAAf"}
1
+ {"version":3,"names":["React","Animated","Easing","CircularProgress","AnimatedProgress","createAnimatedComponent","AnimatedCircularProgress","duration","easing","out","ease","fill","prefill","useNativeDriver","tintColorSecondary","onAnimationComplete","tintColor","other","fillAnimation","useState","Value","animate","useCallback","toVal","dur","toValue","dura","eas","useNative","anim","timing","start","animateColor","tintAnimation","interpolate","inputRange","outputRange","useEffect","style","childrenContainerStyle"],"sources":["AnimatedCircularProgress.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n Animated,\n Easing,\n EasingFunction,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\nimport CircularProgress, {\n Props as CircularProgressProps,\n} from \"./CircularProgress\";\nconst AnimatedProgress = Animated.createAnimatedComponent(CircularProgress);\n\ntype Props = {\n duration?: number;\n easing?: EasingFunction;\n prefill?: number;\n useNativeDriver?: boolean;\n tintColorSecondary?: string;\n onAnimationComplete?: Animated.EndCallback | undefined;\n} & CircularProgressProps;\n\nconst AnimatedCircularProgress: React.FC<React.PropsWithChildren<Props>> = ({\n duration = 500,\n easing = Easing.out(Easing.ease),\n fill,\n prefill = 0,\n useNativeDriver = false,\n tintColorSecondary,\n onAnimationComplete,\n tintColor = \"black\",\n ...other\n}) => {\n const [fillAnimation] = React.useState<Animated.Value>(\n new Animated.Value(prefill)\n );\n\n const animate = React.useCallback(\n (\n toVal: number = -1,\n dur?: number,\n ease?: EasingFunction\n ): Animated.CompositeAnimation => {\n const toValue = toVal >= 0 ? toVal : fill;\n const dura = dur || duration;\n const eas = ease || easing;\n const useNative = useNativeDriver;\n\n const anim = Animated.timing(fillAnimation, {\n useNativeDriver: useNative,\n toValue,\n easing: eas,\n duration: dura,\n });\n anim.start(onAnimationComplete);\n\n return anim;\n },\n [\n duration,\n easing,\n fill,\n useNativeDriver,\n fillAnimation,\n onAnimationComplete,\n ]\n );\n\n const animateColor = () => {\n if (!tintColorSecondary) {\n return tintColor;\n }\n\n const tintAnimation = fillAnimation.interpolate({\n inputRange: [0, 100],\n outputRange: [tintColor, tintColorSecondary],\n });\n\n return tintAnimation;\n };\n\n React.useEffect(() => {\n animate();\n }, [fill, animate]);\n\n return (\n <AnimatedProgress\n {...other}\n style={other.style as Animated.WithAnimatedValue<StyleProp<ViewStyle>>}\n childrenContainerStyle={\n other.childrenContainerStyle as Animated.WithAnimatedValue<\n StyleProp<ViewStyle>\n >\n }\n fill={fillAnimation}\n tintColor={animateColor()}\n />\n );\n};\n\nexport default AnimatedCircularProgress;\n"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SACEC,QADF,EAEEC,MAFF,QAMO,cANP;AAOA,OAAOC,gBAAP,MAEO,oBAFP;AAGA,MAAMC,gBAAgB,GAAGH,QAAQ,CAACI,uBAAT,CAAiCF,gBAAjC,CAAzB;;AAWA,MAAMG,wBAAkE,GAAG,QAUrE;EAAA,IAVsE;IAC1EC,QAAQ,GAAG,GAD+D;IAE1EC,MAAM,GAAGN,MAAM,CAACO,GAAP,CAAWP,MAAM,CAACQ,IAAlB,CAFiE;IAG1EC,IAH0E;IAI1EC,OAAO,GAAG,CAJgE;IAK1EC,eAAe,GAAG,KALwD;IAM1EC,kBAN0E;IAO1EC,mBAP0E;IAQ1EC,SAAS,GAAG,OAR8D;IAS1E,GAAGC;EATuE,CAUtE;EACJ,MAA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AAC,gBAAD,eACMJ,KADN;IAEE,KAAK,EAAEA,KAAK,CAACqB,KAFf;IAGE,sBAAsB,EACpBrB,KAAK,CAACsB,sBAJV;IAQE,IAAI,EAAErB,aARR;IASE,SAAS,EAAEc,YAAY;EATzB,GADF;AAaD,CA5ED;;AA8EA,eAAe1B,wBAAf"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","StyleSheet","AspectRatio","props","layout","setLayout","useState","aspectRatio","inputStyle","flatten","style","width","height","push","nativeEvent","l","children"],"sources":["AspectRatio.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n View,\n StyleSheet,\n LayoutRectangle,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\n\ntype Props = {\n children?: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n};\n\nconst AspectRatio: React.FC<Props> = (props) => {\n const [layout, setLayout] = React.useState<LayoutRectangle | null>(null);\n const { aspectRatio = 1, ...inputStyle } =\n StyleSheet.flatten(props.style) || {};\n const style = [inputStyle, { aspectRatio }];\n\n if (layout) {\n const { width = 0, height = 0 } = layout;\n if (width === 0) {\n style.push({ width: height * (1 / aspectRatio), height });\n } else {\n style.push({ width, height: width * (1 / aspectRatio) });\n }\n }\n return (\n <View\n {...props}\n style={style}\n onLayout={({ nativeEvent: { layout: l } }) => setLayout(l)}\n >\n {props.children}\n </View>\n );\n};\n\nexport default AspectRatio;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SACEC,IADF,EAEEC,UAFF,QAMO,cANP;;AAaA,MAAMC,WAA4B,GAAIC,KAAD,IAAW;EAC9C,MAAM,CAACC,MAAD,EAASC,SAAT,IAAsBN,KAAK,CAACO,QAAN,CAAuC,IAAvC,CAA5B;EACA,MAAM;IAAEC,WAAW,GAAG,CAAhB;IAAmB,GAAGC;EAAtB,IACJP,UAAU,CAACQ,OAAX,CAAmBN,KAAK,CAACO,KAAzB,KAAmC,EADrC;EAEA,MAAMA,KAAK,GAAG,CAACF,UAAD,EAAa;IAAED;EAAF,CAAb,CAAd;;EAEA,IAAIH,MAAJ,EAAY;IACV,MAAM;MAAEO,KAAK,GAAG,CAAV;MAAaC,MAAM,GAAG;IAAtB,IAA4BR,MAAlC;;IACA,IAAIO,KAAK,KAAK,CAAd,EAAiB;MACfD,KAAK,CAACG,IAAN,CAAW;QAAEF,KAAK,EAAEC,MAAM,IAAI,IAAIL,WAAR,CAAf;QAAqCK;MAArC,CAAX;IACD,CAFD,MAEO;MACLF,KAAK,CAACG,IAAN,CAAW;QAAEF,KAAF;QAASC,MAAM,EAAED,KAAK,IAAI,IAAIJ,WAAR;MAAtB,CAAX;IACD;EACF;;EACD,oBACE,oBAAC,IAAD,eACMJ,KADN;IAEE,KAAK,EAAEO,KAFT;IAGE,QAAQ,EAAE;MAAA,IAAC;QAAEI,WAAW,EAAE;UAAEV,MAAM,EAAEW;QAAV;MAAf,CAAD;MAAA,OAAoCV,SAAS,CAACU,CAAD,CAA7C;IAAA;EAHZ,IAKGZ,KAAK,CAACa,QALT,CADF;AASD,CAvBD;;AAyBA,eAAed,WAAf"}
1
+ {"version":3,"names":["React","View","StyleSheet","AspectRatio","props","layout","setLayout","useState","aspectRatio","inputStyle","flatten","style","width","height","push","nativeEvent","l","children"],"sources":["AspectRatio.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n View,\n StyleSheet,\n LayoutRectangle,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\n\ntype Props = {\n children?: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n};\n\nconst AspectRatio: React.FC<React.PropsWithChildren<Props>> = (props) => {\n const [layout, setLayout] = React.useState<LayoutRectangle | null>(null);\n const { aspectRatio = 1, ...inputStyle } =\n StyleSheet.flatten(props.style) || {};\n const style = [inputStyle, { aspectRatio }];\n\n if (layout) {\n const { width = 0, height = 0 } = layout;\n if (width === 0) {\n style.push({ width: height * (1 / aspectRatio), height });\n } else {\n style.push({ width, height: width * (1 / aspectRatio) });\n }\n }\n return (\n <View\n {...props}\n style={style}\n onLayout={({ nativeEvent: { layout: l } }) => setLayout(l)}\n >\n {props.children}\n </View>\n );\n};\n\nexport default AspectRatio;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SACEC,IADF,EAEEC,UAFF,QAMO,cANP;;AAaA,MAAMC,WAAqD,GAAIC,KAAD,IAAW;EACvE,MAAM,CAACC,MAAD,EAASC,SAAT,IAAsBN,KAAK,CAACO,QAAN,CAAuC,IAAvC,CAA5B;EACA,MAAM;IAAEC,WAAW,GAAG,CAAhB;IAAmB,GAAGC;EAAtB,IACJP,UAAU,CAACQ,OAAX,CAAmBN,KAAK,CAACO,KAAzB,KAAmC,EADrC;EAEA,MAAMA,KAAK,GAAG,CAACF,UAAD,EAAa;IAAED;EAAF,CAAb,CAAd;;EAEA,IAAIH,MAAJ,EAAY;IACV,MAAM;MAAEO,KAAK,GAAG,CAAV;MAAaC,MAAM,GAAG;IAAtB,IAA4BR,MAAlC;;IACA,IAAIO,KAAK,KAAK,CAAd,EAAiB;MACfD,KAAK,CAACG,IAAN,CAAW;QAAEF,KAAK,EAAEC,MAAM,IAAI,IAAIL,WAAR,CAAf;QAAqCK;MAArC,CAAX;IACD,CAFD,MAEO;MACLF,KAAK,CAACG,IAAN,CAAW;QAAEF,KAAF;QAASC,MAAM,EAAED,KAAK,IAAI,IAAIJ,WAAR;MAAtB,CAAX;IACD;EACF;;EACD,oBACE,oBAAC,IAAD,eACMJ,KADN;IAEE,KAAK,EAAEO,KAFT;IAGE,QAAQ,EAAE;MAAA,IAAC;QAAEI,WAAW,EAAE;UAAEV,MAAM,EAAEW;QAAV;MAAf,CAAD;MAAA,OAAoCV,SAAS,CAACU,CAAD,CAA7C;IAAA;EAHZ,IAKGZ,KAAK,CAACa,QALT,CADF;AASD,CAvBD;;AAyBA,eAAed,WAAf"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","Touchable","CircleImage","withTheme","AvatarEdit","Icon","image","size","onPress","style","theme","rest","colorStyles","editBackgroundColor","colors","primary","editIconColor","surface","editBorderColor","dimensions","width","height","position","top","right","borderColor","backgroundColor","borderRadius","padding"],"sources":["AvatarEdit.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { View, ImageSourcePropType, StyleProp, ViewStyle } from \"react-native\";\nimport Touchable from \"./Touchable\";\nimport CircleImage from \"./CircleImage\";\nimport { withTheme } from \"../theming\";\n\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\ntype Props = {\n image: string | ImageSourcePropType;\n size?: number;\n onPress?: () => void;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst AvatarEdit: React.FC<Props> = ({\n Icon,\n image,\n size = 80,\n onPress = () => {},\n style,\n theme,\n ...rest\n}) => {\n const colorStyles = {\n editBackgroundColor: theme.colors.primary,\n editIconColor: theme.colors.surface,\n editBorderColor: theme.colors.surface,\n };\n\n const dimensions = {\n width: size,\n height: size,\n };\n\n return (\n <View style={[style, dimensions]} {...rest}>\n <Touchable onPress={onPress}>\n <CircleImage source={image} size={size} />\n <View\n style={{\n position: \"absolute\",\n top: -3,\n right: -3,\n borderColor: colorStyles.editBorderColor,\n backgroundColor: colorStyles.editBackgroundColor,\n borderRadius: size * (3 / 16),\n padding: size * (3 / 32),\n }}\n >\n <Icon\n name=\"MaterialIcons/edit\"\n color={colorStyles.editIconColor}\n size={size * (3 / 16)}\n />\n </View>\n </Touchable>\n </View>\n );\n};\n\nexport default withTheme(AvatarEdit);\n"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,QAAgE,cAAhE;AACA,OAAOC,SAAP,MAAsB,aAAtB;AACA,OAAOC,WAAP,MAAwB,eAAxB;AACA,SAASC,SAAT,QAA0B,YAA1B;;AAaA,MAAMC,UAA2B,GAAG,QAQ9B;EAAA,IAR+B;IACnCC,IADmC;IAEnCC,KAFmC;IAGnCC,IAAI,GAAG,EAH4B;IAInCC,OAAO,GAAG,MAAM,CAAE,CAJiB;IAKnCC,KALmC;IAMnCC,KANmC;IAOnC,GAAGC;EAPgC,CAQ/B;EACJ,MAAMC,WAAW,GAAG;IAClBC,mBAAmB,EAAEH,KAAK,CAACI,MAAN,CAAaC,OADhB;IAElBC,aAAa,EAAEN,KAAK,CAACI,MAAN,CAAaG,OAFV;IAGlBC,eAAe,EAAER,KAAK,CAACI,MAAN,CAAaG;EAHZ,CAApB;EAMA,MAAME,UAAU,GAAG;IACjBC,KAAK,EAAEb,IADU;IAEjBc,MAAM,EAAEd;EAFS,CAAnB;EAKA,oBACE,oBAAC,IAAD;IAAM,KAAK,EAAE,CAACE,KAAD,EAAQU,UAAR;EAAb,GAAsCR,IAAtC,gBACE,oBAAC,SAAD;IAAW,OAAO,EAAEH;EAApB,gBACE,oBAAC,WAAD;IAAa,MAAM,EAAEF,KAArB;IAA4B,IAAI,EAAEC;EAAlC,EADF,eAEE,oBAAC,IAAD;IACE,KAAK,EAAE;MACLe,QAAQ,EAAE,UADL;MAELC,GAAG,EAAE,CAAC,CAFD;MAGLC,KAAK,EAAE,CAAC,CAHH;MAILC,WAAW,EAAEb,WAAW,CAACM,eAJpB;MAKLQ,eAAe,EAAEd,WAAW,CAACC,mBALxB;MAMLc,YAAY,EAAEpB,IAAI,IAAI,IAAI,EAAR,CANb;MAOLqB,OAAO,EAAErB,IAAI,IAAI,IAAI,EAAR;IAPR;EADT,gBAWE,oBAAC,IAAD;IACE,IAAI,EAAC,oBADP;IAEE,KAAK,EAAEK,WAAW,CAACI,aAFrB;IAGE,IAAI,EAAET,IAAI,IAAI,IAAI,EAAR;EAHZ,EAXF,CAFF,CADF,CADF;AAwBD,CA5CD;;AA8CA,eAAeJ,SAAS,CAACC,UAAD,CAAxB"}
1
+ {"version":3,"names":["React","View","Touchable","CircleImage","withTheme","AvatarEdit","Icon","image","size","onPress","style","theme","rest","colorStyles","editBackgroundColor","colors","primary","editIconColor","surface","editBorderColor","dimensions","width","height","position","top","right","borderColor","backgroundColor","borderRadius","padding"],"sources":["AvatarEdit.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { View, ImageSourcePropType, StyleProp, ViewStyle } from \"react-native\";\nimport Touchable from \"./Touchable\";\nimport CircleImage from \"./CircleImage\";\nimport { withTheme } from \"../theming\";\n\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\ntype Props = {\n image: string | ImageSourcePropType;\n size?: number;\n onPress?: () => void;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst AvatarEdit: React.FC<React.PropsWithChildren<Props>> = ({\n Icon,\n image,\n size = 80,\n onPress = () => {},\n style,\n theme,\n ...rest\n}) => {\n const colorStyles = {\n editBackgroundColor: theme.colors.primary,\n editIconColor: theme.colors.surface,\n editBorderColor: theme.colors.surface,\n };\n\n const dimensions = {\n width: size,\n height: size,\n };\n\n return (\n <View style={[style, dimensions]} {...rest}>\n <Touchable onPress={onPress}>\n <CircleImage source={image} size={size} />\n <View\n style={{\n position: \"absolute\",\n top: -3,\n right: -3,\n borderColor: colorStyles.editBorderColor,\n backgroundColor: colorStyles.editBackgroundColor,\n borderRadius: size * (3 / 16),\n padding: size * (3 / 32),\n }}\n >\n <Icon\n name=\"MaterialIcons/edit\"\n color={colorStyles.editIconColor}\n size={size * (3 / 16)}\n />\n </View>\n </Touchable>\n </View>\n );\n};\n\nexport default withTheme(AvatarEdit);\n"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,QAAgE,cAAhE;AACA,OAAOC,SAAP,MAAsB,aAAtB;AACA,OAAOC,WAAP,MAAwB,eAAxB;AACA,SAASC,SAAT,QAA0B,YAA1B;;AAaA,MAAMC,UAAoD,GAAG,QAQvD;EAAA,IARwD;IAC5DC,IAD4D;IAE5DC,KAF4D;IAG5DC,IAAI,GAAG,EAHqD;IAI5DC,OAAO,GAAG,MAAM,CAAE,CAJ0C;IAK5DC,KAL4D;IAM5DC,KAN4D;IAO5D,GAAGC;EAPyD,CAQxD;EACJ,MAAMC,WAAW,GAAG;IAClBC,mBAAmB,EAAEH,KAAK,CAACI,MAAN,CAAaC,OADhB;IAElBC,aAAa,EAAEN,KAAK,CAACI,MAAN,CAAaG,OAFV;IAGlBC,eAAe,EAAER,KAAK,CAACI,MAAN,CAAaG;EAHZ,CAApB;EAMA,MAAME,UAAU,GAAG;IACjBC,KAAK,EAAEb,IADU;IAEjBc,MAAM,EAAEd;EAFS,CAAnB;EAKA,oBACE,oBAAC,IAAD;IAAM,KAAK,EAAE,CAACE,KAAD,EAAQU,UAAR;EAAb,GAAsCR,IAAtC,gBACE,oBAAC,SAAD;IAAW,OAAO,EAAEH;EAApB,gBACE,oBAAC,WAAD;IAAa,MAAM,EAAEF,KAArB;IAA4B,IAAI,EAAEC;EAAlC,EADF,eAEE,oBAAC,IAAD;IACE,KAAK,EAAE;MACLe,QAAQ,EAAE,UADL;MAELC,GAAG,EAAE,CAAC,CAFD;MAGLC,KAAK,EAAE,CAAC,CAHH;MAILC,WAAW,EAAEb,WAAW,CAACM,eAJpB;MAKLQ,eAAe,EAAEd,WAAW,CAACC,mBALxB;MAMLc,YAAY,EAAEpB,IAAI,IAAI,IAAI,EAAR,CANb;MAOLqB,OAAO,EAAErB,IAAI,IAAI,IAAI,EAAR;IAPR;EADT,gBAWE,oBAAC,IAAD;IACE,IAAI,EAAC,oBADP;IAEE,KAAK,EAAEK,WAAW,CAACI,aAFrB;IAGE,IAAI,EAAET,IAAI,IAAI,IAAI,EAAR;EAHZ,EAXF,CAFF,CADF,CADF;AAwBD,CA5CD;;AA8CA,eAAeJ,SAAS,CAACC,UAAD,CAAxB"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","Button","Text","View","StyleSheet","Animated","Surface","shadow","withTheme","ELEVATION","DEFAULT_MAX_WIDTH","Banner","initiallyVisible","dismissable","icon","buttonColor","content","contentStyle","style","theme","Icon","rest","visible","setVisible","useState","useEffect","current","position","useRef","Value","layout","setLayout","height","measured","timing","duration","toValue","useNativeDriver","start","handleLayout","nativeEvent","multiply","translateY","add","styles","container","wrapper","absolute","transform","opacity","marginBottom","message","color","colors","text","actions","primary","create","elevation","overflow","alignSelf","width","maxWidth","top","flexDirection","justifyContent","marginHorizontal","marginTop","margin","flex"],"sources":["Banner.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n Button,\n Text,\n View,\n ViewStyle,\n StyleSheet,\n StyleProp,\n Animated,\n} from \"react-native\";\nimport Surface from \"./Surface\";\nimport type { IconSlot } from \"../interfaces/Icon\";\nimport shadow from \"../styles/shadow\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\n\nconst ELEVATION = 1;\nconst DEFAULT_MAX_WIDTH = 960;\n\ntype Props = {\n initiallyVisible: boolean;\n dismissable: boolean;\n buttonColor?: string;\n icon?: string;\n content?: string;\n contentStyle?: StyleProp<ViewStyle>;\n style?: StyleProp<ViewStyle>;\n ref?: React.RefObject<View>;\n /**\n * @optional\n */\n theme: Theme;\n} & IconSlot;\n\ntype NativeEvent = {\n nativeEvent: {\n layout: {\n x: number;\n y: number;\n width: number;\n height: number;\n };\n };\n};\n\nconst Banner: React.FC<Props> = ({\n initiallyVisible = true,\n dismissable = true,\n icon,\n buttonColor,\n content,\n contentStyle,\n style,\n theme,\n Icon,\n ...rest\n}) => {\n const [visible, setVisible] = React.useState(initiallyVisible);\n\n React.useEffect(() => {\n if (initiallyVisible) {\n setVisible(true);\n }\n }, [initiallyVisible]);\n\n const { current: position } = React.useRef<Animated.Value>(\n new Animated.Value(visible ? 1 : 0)\n );\n const [layout, setLayout] = React.useState<{\n height: number;\n measured: boolean;\n }>({\n height: 0,\n measured: false,\n });\n\n React.useEffect(() => {\n if (visible) {\n // show\n Animated.timing(position, {\n duration: 250,\n toValue: 1,\n useNativeDriver: false,\n }).start();\n } else {\n // hide\n Animated.timing(position, {\n duration: 200,\n toValue: 0,\n useNativeDriver: false,\n }).start();\n }\n }, [visible, position]);\n\n const handleLayout = ({ nativeEvent }: NativeEvent) => {\n const { height } = nativeEvent.layout;\n setLayout({ height, measured: true });\n };\n\n // The banner animation has 2 parts:\n // 1. Blank spacer element which animates its height to move the content\n // 2. Actual banner which animates its translateY\n // In initial render, we position everything normally and measure the height of the banner\n // Once we have the height, we apply the height to the spacer and switch the banner to position: absolute\n // We need this because we need to move the content below as if banner's height was being animated\n // However we can't animated banner's height directly as it'll also resize the content inside\n const height = Animated.multiply(position, layout.height);\n\n const translateY = Animated.multiply(\n Animated.add(position, -1),\n layout.height\n );\n\n return (\n <Surface\n {...rest}\n style={[styles.container, shadow(ELEVATION) as ViewStyle, style]}\n >\n <View style={[styles.wrapper, contentStyle]}>\n <Animated.View style={{ height }} />\n <Animated.View\n onLayout={handleLayout}\n style={[\n layout.measured || !visible\n ? // If we have measured banner's height or it's invisible,\n // Position it absolutely, the layout will be taken care of the spacer\n [styles.absolute, { transform: [{ translateY }] }]\n : // Otherwise position it normally\n null,\n !layout.measured && !visible\n ? // If we haven't measured banner's height yet and it's invisible,\n // hide it with opacity: 0 so user doesn't see it\n { opacity: 0 }\n : null,\n ]}\n >\n <View\n style={[styles.content, { marginBottom: dismissable ? 0 : 16 }]}\n >\n {icon ? (\n <View style={styles.icon}>\n <Icon name={icon} size={40} />\n </View>\n ) : null}\n <Text\n style={[styles.message, { color: theme.colors.text }]}\n accessibilityLiveRegion={visible ? \"polite\" : \"none\"}\n accessibilityRole=\"alert\"\n >\n {content}\n </Text>\n </View>\n {dismissable ? (\n <View style={styles.actions}>\n <Button\n color={buttonColor || theme.colors.primary}\n title=\"Close\"\n onPress={() => setVisible(false)}\n />\n </View>\n ) : null}\n </Animated.View>\n </View>\n </Surface>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n elevation: ELEVATION,\n },\n wrapper: {\n overflow: \"hidden\",\n alignSelf: \"center\",\n width: \"100%\",\n maxWidth: DEFAULT_MAX_WIDTH,\n },\n absolute: {\n position: \"absolute\",\n top: 0,\n width: \"100%\",\n },\n content: {\n flexDirection: \"row\",\n justifyContent: \"flex-start\",\n marginHorizontal: 8,\n marginTop: 16,\n marginBottom: 0,\n },\n icon: {\n margin: 8,\n },\n message: {\n flex: 1,\n margin: 8,\n },\n actions: {\n flexDirection: \"row\",\n justifyContent: \"flex-end\",\n margin: 8,\n },\n});\n\nexport default withTheme(Banner);\n"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SACEC,MADF,EAEEC,IAFF,EAGEC,IAHF,EAKEC,UALF,EAOEC,QAPF,QAQO,cARP;AASA,OAAOC,OAAP,MAAoB,WAApB;AAEA,OAAOC,MAAP,MAAmB,kBAAnB;AACA,SAASC,SAAT,QAA0B,YAA1B;AAGA,MAAMC,SAAS,GAAG,CAAlB;AACA,MAAMC,iBAAiB,GAAG,GAA1B;;AA4BA,MAAMC,MAAuB,GAAG,QAW1B;EAAA,IAX2B;IAC/BC,gBAAgB,GAAG,IADY;IAE/BC,WAAW,GAAG,IAFiB;IAG/BC,IAH+B;IAI/BC,WAJ+B;IAK/BC,OAL+B;IAM/BC,YAN+B;IAO/BC,KAP+B;IAQ/BC,KAR+B;IAS/BC,IAT+B;IAU/B,GAAGC;EAV4B,CAW3B;EACJ,MAAM,CAACC,OAAD,EAAUC,UAAV,IAAwBvB,KAAK,CAACwB,QAAN,CAAeZ,gBAAf,CAA9B;EAEAZ,KAAK,CAACyB,SAAN,CAAgB,MAAM;IACpB,IAAIb,gBAAJ,EAAsB;MACpBW,UAAU,CAAC,IAAD,CAAV;IACD;EACF,CAJD,EAIG,CAACX,gBAAD,CAJH;EAMA,MAAM;IAAEc,OAAO,EAAEC;EAAX,IAAwB3B,KAAK,CAAC4B,MAAN,CAC5B,IAAIvB,QAAQ,CAACwB,KAAb,CAAmBP,OAAO,GAAG,CAAH,GAAO,CAAjC,CAD4B,CAA9B;EAGA,MAAM,CAACQ,MAAD,EAASC,SAAT,IAAsB/B,KAAK,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H3B,EADF,CADU,GAQR,IAxCN,CAFF,CAJF,CADF;AAoDD,CAxHD;;AA0HA,MAAMqB,MAAM,GAAGxC,UAAU,CAACqD,MAAX,CAAkB;EAC/BZ,SAAS,EAAE;IACTa,SAAS,EAAEjD;EADF,CADoB;EAI/BqC,OAAO,EAAE;IACPa,QAAQ,EAAE,QADH;IAEPC,SAAS,EAAE,QAFJ;IAGPC,KAAK,EAAE,MAHA;IAIPC,QAAQ,EAAEpD;EAJH,CAJsB;EAU/BqC,QAAQ,EAAE;IACRpB,QAAQ,EAAE,UADF;IAERoC,GAAG,EAAE,CAFG;IAGRF,KAAK,EAAE;EAHC,CAVqB;EAe/B7C,OAAO,EAAE;IACPgD,aAAa,EAAE,KADR;IAEPC,cAAc,EAAE,YAFT;IAGPC,gBAAgB,EAAE,CAHX;IAIPC,SAAS,EAAE,EAJJ;IAKPjB,YAAY,EAAE;EALP,CAfsB;EAsB/BpC,IAAI,EAAE;IACJsD,MAAM,EAAE;EADJ,CAtByB;EAyB/BjB,OAAO,EAAE;IACPkB,IAAI,EAAE,CADC;IAEPD,MAAM,EAAE;EAFD,CAzBsB;EA6B/Bb,OAAO,EAAE;IACPS,aAAa,EAAE,KADR;IAEPC,cAAc,EAAE,UAFT;IAGPG,MAAM,EAAE;EAHD;AA7BsB,CAAlB,CAAf;AAoCA,eAAe5D,SAAS,CAACG,MAAD,CAAxB"}
1
+ {"version":3,"names":["React","Button","Text","View","StyleSheet","Animated","Surface","shadow","withTheme","ELEVATION","DEFAULT_MAX_WIDTH","Banner","initiallyVisible","dismissable","icon","buttonColor","content","contentStyle","style","theme","Icon","rest","visible","setVisible","useState","useEffect","current","position","useRef","Value","layout","setLayout","height","measured","timing","duration","toValue","useNativeDriver","start","handleLayout","nativeEvent","multiply","translateY","add","styles","container","wrapper","absolute","transform","opacity","marginBottom","message","color","colors","text","actions","primary","create","elevation","overflow","alignSelf","width","maxWidth","top","flexDirection","justifyContent","marginHorizontal","marginTop","margin","flex"],"sources":["Banner.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n Button,\n Text,\n View,\n ViewStyle,\n StyleSheet,\n StyleProp,\n Animated,\n} from \"react-native\";\nimport Surface from \"./Surface\";\nimport type { IconSlot } from \"../interfaces/Icon\";\nimport shadow from \"../styles/shadow\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\n\nconst ELEVATION = 1;\nconst DEFAULT_MAX_WIDTH = 960;\n\ntype Props = {\n initiallyVisible: boolean;\n dismissable: boolean;\n buttonColor?: string;\n icon?: string;\n content?: string;\n contentStyle?: StyleProp<ViewStyle>;\n style?: StyleProp<ViewStyle>;\n ref?: React.RefObject<View>;\n /**\n * @optional\n */\n theme: Theme;\n} & IconSlot;\n\ntype NativeEvent = {\n nativeEvent: {\n layout: {\n x: number;\n y: number;\n width: number;\n height: number;\n };\n };\n};\n\nconst Banner: React.FC<React.PropsWithChildren<Props>> = ({\n initiallyVisible = true,\n dismissable = true,\n icon,\n buttonColor,\n content,\n contentStyle,\n style,\n theme,\n Icon,\n ...rest\n}) => {\n const [visible, setVisible] = React.useState(initiallyVisible);\n\n React.useEffect(() => {\n if (initiallyVisible) {\n setVisible(true);\n }\n }, [initiallyVisible]);\n\n const { current: position } = React.useRef<Animated.Value>(\n new Animated.Value(visible ? 1 : 0)\n );\n const [layout, setLayout] = React.useState<{\n height: number;\n measured: boolean;\n }>({\n height: 0,\n measured: false,\n });\n\n React.useEffect(() => {\n if (visible) {\n // show\n Animated.timing(position, {\n duration: 250,\n toValue: 1,\n useNativeDriver: false,\n }).start();\n } else {\n // hide\n Animated.timing(position, {\n duration: 200,\n toValue: 0,\n useNativeDriver: false,\n }).start();\n }\n }, [visible, position]);\n\n const handleLayout = ({ nativeEvent }: NativeEvent) => {\n const { height } = nativeEvent.layout;\n setLayout({ height, measured: true });\n };\n\n // The banner animation has 2 parts:\n // 1. Blank spacer element which animates its height to move the content\n // 2. Actual banner which animates its translateY\n // In initial render, we position everything normally and measure the height of the banner\n // Once we have the height, we apply the height to the spacer and switch the banner to position: absolute\n // We need this because we need to move the content below as if banner's height was being animated\n // However we can't animated banner's height directly as it'll also resize the content inside\n const height = Animated.multiply(position, layout.height);\n\n const translateY = Animated.multiply(\n Animated.add(position, -1),\n layout.height\n );\n\n return (\n <Surface\n {...rest}\n style={[styles.container, shadow(ELEVATION) as ViewStyle, style]}\n >\n <View style={[styles.wrapper, contentStyle]}>\n <Animated.View style={{ height }} />\n <Animated.View\n onLayout={handleLayout}\n style={[\n layout.measured || !visible\n ? // If we have measured banner's height or it's invisible,\n // Position it absolutely, the layout will be taken care of the spacer\n [styles.absolute, { transform: [{ translateY }] }]\n : // Otherwise position it normally\n null,\n !layout.measured && !visible\n ? // If we haven't measured banner's height yet and it's invisible,\n // hide it with opacity: 0 so user doesn't see it\n { opacity: 0 }\n : null,\n ]}\n >\n <View\n style={[styles.content, { marginBottom: dismissable ? 0 : 16 }]}\n >\n {icon ? (\n <View style={styles.icon}>\n <Icon name={icon} size={40} />\n </View>\n ) : null}\n <Text\n style={[styles.message, { color: theme.colors.text }]}\n accessibilityLiveRegion={visible ? \"polite\" : \"none\"}\n accessibilityRole=\"alert\"\n >\n {content}\n </Text>\n </View>\n {dismissable ? (\n <View style={styles.actions}>\n <Button\n color={buttonColor || theme.colors.primary}\n title=\"Close\"\n onPress={() => setVisible(false)}\n />\n </View>\n ) : null}\n </Animated.View>\n </View>\n </Surface>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n elevation: ELEVATION,\n },\n wrapper: {\n overflow: \"hidden\",\n alignSelf: \"center\",\n width: \"100%\",\n maxWidth: DEFAULT_MAX_WIDTH,\n },\n absolute: {\n position: \"absolute\",\n top: 0,\n width: \"100%\",\n },\n content: {\n flexDirection: \"row\",\n justifyContent: \"flex-start\",\n marginHorizontal: 8,\n marginTop: 16,\n marginBottom: 0,\n },\n icon: {\n margin: 8,\n },\n message: {\n flex: 1,\n margin: 8,\n },\n actions: {\n flexDirection: \"row\",\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,EAAE,QADH;IAEPC,SAAS,EAAE,QAFJ;IAGPC,KAAK,EAAE,MAHA;IAIPC,QAAQ,EAAEpD;EAJH,CAJsB;EAU/BqC,QAAQ,EAAE;IACRpB,QAAQ,EAAE,UADF;IAERoC,GAAG,EAAE,CAFG;IAGRF,KAAK,EAAE;EAHC,CAVqB;EAe/B7C,OAAO,EAAE;IACPgD,aAAa,EAAE,KADR;IAEPC,cAAc,EAAE,YAFT;IAGPC,gBAAgB,EAAE,CAHX;IAIPC,SAAS,EAAE,EAJJ;IAKPjB,YAAY,EAAE;EALP,CAfsB;EAsB/BpC,IAAI,EAAE;IACJsD,MAAM,EAAE;EADJ,CAtByB;EAyB/BjB,OAAO,EAAE;IACPkB,IAAI,EAAE,CADC;IAEPD,MAAM,EAAE;EAFD,CAzBsB;EA6B/Bb,OAAO,EAAE;IACPS,aAAa,EAAE,KADR;IAEPC,cAAc,EAAE,UAFT;IAGPG,MAAM,EAAE;EAHD;AA7BsB,CAAlB,CAAf;AAoCA,eAAe5D,SAAS,CAACG,MAAD,CAAxB"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","StyleSheet","View","Pressable","Image","Surface","Title","Subtitle","Caption","withTheme","Config","ICON_SIZE","cardIconSize","ICON_CONTAINER_SIZE","ICON_CONTAINER_PADDING","ICON_ELEVATION","cardIconElevation","TopRightCircleIcon","Icon","icon","theme","onPress","justifyContent","alignItems","elevation","position","top","right","width","height","padding","borderRadius","backgroundColor","pressed","opacity","colors","surface","Card","image","cardImageUrl","title","subtitle","description","textCentered","aspectRatio","style","onPressIcon","titleStyle","subtitleStyle","descriptionStyle","children","bgColor","styles","flatten","innerPadding","uri","marginTop"],"sources":["Card.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n StyleSheet,\n View,\n ImageSourcePropType,\n StyleProp,\n ViewStyle,\n TextStyle,\n Pressable,\n} from \"react-native\";\nimport Image from \"./Image\";\nimport Surface from \"./Surface\";\nimport { Title, Subtitle, Caption } from \"./Typography\";\n\nimport { withTheme } from \"../theming\";\nimport Config from \"./Config\";\n\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\nconst ICON_SIZE = Config.cardIconSize;\nconst ICON_CONTAINER_SIZE = Config.cardIconSize * 2;\nconst ICON_CONTAINER_PADDING = Config.cardIconSize / 2 - 1;\nconst ICON_ELEVATION = Config.cardIconElevation;\n\nexport const TopRightCircleIcon = withTheme(\n ({\n Icon,\n icon,\n theme,\n onPress,\n }: {\n icon: string;\n theme: Theme;\n onPress?: () => void;\n } & IconSlot) => {\n return (\n <Surface\n style={{\n justifyContent: \"center\",\n alignItems: \"center\",\n elevation: ICON_ELEVATION,\n position: \"absolute\",\n top: 12,\n right: 12,\n width: ICON_CONTAINER_SIZE,\n height: ICON_CONTAINER_SIZE,\n padding: ICON_CONTAINER_PADDING,\n borderRadius: ICON_CONTAINER_SIZE,\n backgroundColor: \"rgba(0, 0, 0, 0.1)\",\n }}\n >\n <Pressable\n disabled={!onPress}\n onPress={onPress}\n style={({ pressed }) => {\n return [\n {\n opacity: pressed ? 0.8 : 1,\n },\n ];\n }}\n >\n <Icon name={icon} size={ICON_SIZE} color={theme.colors.surface} />\n </Pressable>\n </Surface>\n );\n }\n);\n\ntype Props = {\n image?: string | ImageSourcePropType;\n title?: string;\n subtitle?: string;\n description?: string;\n textCentered: boolean;\n icon?: string;\n aspectRatio?: number;\n elevation?: number;\n numColumns?: number;\n theme: Theme;\n titleStyle?: StyleProp<TextStyle>;\n subtitleStyle?: StyleProp<TextStyle>;\n descriptionStyle?: StyleProp<TextStyle>;\n style?: StyleProp<ViewStyle>;\n onPress?: () => void;\n onPressIcon?: () => void;\n children?: React.ReactNode;\n} & IconSlot;\n\nconst Card: React.FC<Props> = ({\n Icon,\n image = Config.cardImageUrl,\n title,\n subtitle,\n description,\n textCentered,\n icon,\n aspectRatio = 1.5,\n elevation = 2,\n style,\n onPress,\n onPressIcon,\n titleStyle,\n subtitleStyle,\n descriptionStyle,\n theme,\n children,\n}) => {\n const {\n backgroundColor: bgColor,\n padding,\n ...styles\n } = StyleSheet.flatten(style || {});\n\n const backgroundColor = bgColor ? bgColor : theme.colors.surface;\n const innerPadding = padding ? padding : 12;\n\n return (\n <Surface style={[{ elevation, backgroundColor }, styles]}>\n <Pressable\n disabled={!onPress}\n onPress={onPress}\n style={({ pressed }) => {\n return [\n {\n opacity: pressed ? 0.8 : 1,\n },\n ];\n }}\n >\n <Image\n style={{ aspectRatio }}\n source={typeof image === \"string\" ? { uri: image } : image}\n resizeMode=\"cover\"\n />\n <View style={{ padding: innerPadding }}>\n <View style={{ alignItems: textCentered ? \"center\" : \"flex-start\" }}>\n {title || (title && title !== \"\") ? (\n <Title text={title} style={titleStyle} />\n ) : null}\n {subtitle || (subtitle && subtitle !== \"\") ? (\n <Subtitle text={subtitle} style={subtitleStyle} />\n ) : null}\n {description || (description && description !== \"\") ? (\n <View style={{ marginTop: 4 }}>\n <Caption text={description} style={descriptionStyle} />\n </View>\n ) : null}\n {children}\n </View>\n </View>\n {icon ? (\n <TopRightCircleIcon Icon={Icon} icon={icon} onPress={onPressIcon} />\n ) : null}\n </Pressable>\n </Surface>\n );\n};\n\nexport default withTheme(Card);\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SACEC,UADF,EAEEC,IAFF,EAOEC,SAPF,QAQO,cARP;AASA,OAAOC,KAAP,MAAkB,SAAlB;AACA,OAAOC,OAAP,MAAoB,WAApB;AACA,SAASC,KAAT,EAAgBC,QAAhB,EAA0BC,OAA1B,QAAyC,cAAzC;AAEA,SAASC,SAAT,QAA0B,YAA1B;AACA,OAAOC,MAAP,MAAmB,UAAnB;AAKA,MAAMC,SAAS,GAAGD,MAAM,CAACE,YAAzB;AACA,MAAMC,mBAAmB,GAAGH,MAAM,CAACE,YAAP,GAAsB,CAAlD;AACA,MAAME,sBAAsB,GAAGJ,MAAM,CAACE,YAAP,GAAsB,CAAtB,GAA0B,CAAzD;AACA,MAA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AAI,EAAEA,QAAhB;IAA0B,KAAK,EAAEO;EAAjC,EADD,GAEG,IANN,EAOGN,WAAW,IAAKA,WAAW,IAAIA,WAAW,KAAK,EAA/C,gBACC,oBAAC,IAAD;IAAM,KAAK,EAAE;MAAEc,SAAS,EAAE;IAAb;EAAb,gBACE,oBAAC,OAAD;IAAS,IAAI,EAAEd,WAAf;IAA4B,KAAK,EAAEO;EAAnC,EADF,CADD,GAIG,IAXN,EAYGC,QAZH,CADF,CAhBF,EAgCG/B,IAAI,gBACH,oBAAC,kBAAD;IAAoB,IAAI,EAAED,IAA1B;IAAgC,IAAI,EAAEC,IAAtC;IAA4C,OAAO,EAAE2B;EAArD,EADG,GAED,IAlCN,CADF,CADF;AAwCD,CApED;;AAsEA,eAAerC,SAAS,CAAC4B,IAAD,CAAxB"}
1
+ {"version":3,"names":["React","StyleSheet","View","Pressable","Image","Surface","Title","Subtitle","Caption","withTheme","Config","ICON_SIZE","cardIconSize","ICON_CONTAINER_SIZE","ICON_CONTAINER_PADDING","ICON_ELEVATION","cardIconElevation","TopRightCircleIcon","Icon","icon","theme","onPress","justifyContent","alignItems","elevation","position","top","right","width","height","padding","borderRadius","backgroundColor","pressed","opacity","colors","surface","Card","image","cardImageUrl","title","subtitle","description","textCentered","aspectRatio","style","onPressIcon","titleStyle","subtitleStyle","descriptionStyle","children","bgColor","styles","flatten","innerPadding","uri","marginTop"],"sources":["Card.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n StyleSheet,\n View,\n ImageSourcePropType,\n StyleProp,\n ViewStyle,\n TextStyle,\n Pressable,\n} from \"react-native\";\nimport Image from \"./Image\";\nimport Surface from \"./Surface\";\nimport { Title, Subtitle, Caption } from \"./Typography\";\n\nimport { withTheme } from \"../theming\";\nimport Config from \"./Config\";\n\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\nconst ICON_SIZE = Config.cardIconSize;\nconst ICON_CONTAINER_SIZE = Config.cardIconSize * 2;\nconst ICON_CONTAINER_PADDING = Config.cardIconSize / 2 - 1;\nconst ICON_ELEVATION = Config.cardIconElevation;\n\nexport const TopRightCircleIcon = withTheme(\n ({\n Icon,\n icon,\n theme,\n onPress,\n }: {\n icon: string;\n theme: Theme;\n onPress?: () => void;\n } & IconSlot) => {\n return (\n <Surface\n style={{\n justifyContent: \"center\",\n alignItems: \"center\",\n elevation: ICON_ELEVATION,\n position: \"absolute\",\n top: 12,\n right: 12,\n width: ICON_CONTAINER_SIZE,\n height: ICON_CONTAINER_SIZE,\n padding: ICON_CONTAINER_PADDING,\n borderRadius: ICON_CONTAINER_SIZE,\n backgroundColor: \"rgba(0, 0, 0, 0.1)\",\n }}\n >\n <Pressable\n disabled={!onPress}\n onPress={onPress}\n style={({ pressed }) => {\n return [\n {\n opacity: pressed ? 0.8 : 1,\n },\n ];\n }}\n >\n <Icon name={icon} size={ICON_SIZE} color={theme.colors.surface} />\n </Pressable>\n </Surface>\n );\n }\n);\n\ntype Props = {\n image?: string | ImageSourcePropType;\n title?: string;\n subtitle?: string;\n description?: string;\n textCentered: boolean;\n icon?: string;\n aspectRatio?: number;\n elevation?: number;\n numColumns?: number;\n theme: Theme;\n titleStyle?: StyleProp<TextStyle>;\n subtitleStyle?: StyleProp<TextStyle>;\n descriptionStyle?: StyleProp<TextStyle>;\n style?: StyleProp<ViewStyle>;\n onPress?: () => void;\n onPressIcon?: () => void;\n children?: React.ReactNode;\n} & IconSlot;\n\nconst Card: React.FC<React.PropsWithChildren<Props>> = ({\n Icon,\n image = Config.cardImageUrl,\n title,\n subtitle,\n description,\n textCentered,\n icon,\n aspectRatio = 1.5,\n elevation = 2,\n style,\n onPress,\n onPressIcon,\n titleStyle,\n subtitleStyle,\n descriptionStyle,\n theme,\n children,\n}) => {\n const {\n backgroundColor: bgColor,\n padding,\n ...styles\n } = StyleSheet.flatten(style || {});\n\n const backgroundColor = bgColor ? bgColor : theme.colors.surface;\n const innerPadding = padding ? padding : 12;\n\n return (\n <Surface style={[{ elevation, backgroundColor }, styles]}>\n <Pressable\n disabled={!onPress}\n onPress={onPress}\n style={({ pressed }) => {\n return [\n {\n opacity: pressed ? 0.8 : 1,\n },\n ];\n }}\n >\n <Image\n style={{ aspectRatio }}\n source={typeof image === \"string\" ? { uri: image } : image}\n resizeMode=\"cover\"\n />\n <View style={{ padding: innerPadding }}>\n <View style={{ alignItems: textCentered ? \"center\" : \"flex-start\" }}>\n {title || (title && title !== \"\") ? (\n <Title text={title} style={titleStyle} />\n ) : null}\n {subtitle || (subtitle && subtitle !== \"\") ? (\n <Subtitle text={subtitle} style={subtitleStyle} />\n ) : null}\n {description || (description && description !== \"\") ? (\n <View style={{ marginTop: 4 }}>\n <Caption text={description} style={descriptionStyle} />\n </View>\n ) : null}\n {children}\n </View>\n </View>\n {icon ? (\n <TopRightCircleIcon Icon={Icon} icon={icon} onPress={onPressIcon} />\n ) : null}\n </Pressable>\n </Surface>\n );\n};\n\nexport default withTheme(Card);\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SACEC,UADF,EAEEC,IAFF,EAOEC,SAPF,QAQO,cARP;AASA,OAAOC,KAAP,MAAkB,SAAlB;AACA,OAAOC,OAAP,MAAoB,WAApB;AACA,SAASC,KAAT,EAAgBC,QAAhB,EAA0BC,OAA1B,QAAyC,cAAzC;AAEA,SAASC,SAAT,QAA0B,YAA1B;AACA,OAAOC,MAAP,MAAmB,UAAnB;AAKA,MAAMC,SAAS,GAAGD,MAAM,CAACE,YAAzB;AACA,MAAMC,mBAAmB,GAAGH,MAAM,CAACE,YAAP,GAAsB,CAAlD;AACA,MAAME,sBAAsB,GAAGJ,MAAM,CAACE,YAAP,GAAsB,CAAtB,GAA0B,CAAzD;AACA,MAAMG,cAAc,GAAGL,MAAM,CAACM,iBAA9B;AAEA,OAAO,MAAMC,kBAAkB,GAAGR,SAAS,CACzC,QASiB;EAAA,IAThB;IACCS,IADD;IAECC,IAFD;IAGCC,KAHD;IAICC;EAJD,CASg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,EAAE;IAAb;EAAb,gBACE,oBAAC,OAAD;IAAS,IAAI,EAAEd,WAAf;IAA4B,KAAK,EAAEO;EAAnC,EADF,CADD,GAIG,IAXN,EAYGC,QAZH,CADF,CAhBF,EAgCG/B,IAAI,gBACH,oBAAC,kBAAD;IAAoB,IAAI,EAAED,IAA1B;IAAgC,IAAI,EAAEC,IAAtC;IAA4C,OAAO,EAAE2B;EAArD,EADG,GAED,IAlCN,CADF,CADF;AAwCD,CApED;;AAsEA,eAAerC,SAAS,CAAC4B,IAAD,CAAxB"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","Text","Image","Card","Elevation","withTheme","Config","CardBlock","image","cardImageUrl","title","leftDescription","rightDescription","titleCentered","aspectRatio","elevation","numColumns","theme","colors","roundness","typography","style","onPress","rest","titleJustification","titleStyle","button","headline6","headline5","rightDescriptionStyles","subtitle2","color","light","backgroundColor","background","borderRadius","uri","flexDirection","alignItems","justifyContent","marginTop","strong","body2","medium"],"sources":["CardBlock.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n ImageSourcePropType,\n View,\n Text,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\nimport Image from \"./Image\";\nimport Card from \"./DeprecatedCardWrapper\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\nimport Config from \"./Config\";\nimport theme from \"../styles/DefaultTheme\";\nimport { justificationType } from \"./Justification\";\n\ntype Props = {\n image?: string | ImageSourcePropType;\n title?: string;\n leftDescription?: string;\n rightDescription?: string;\n titleCentered: boolean;\n aspectRatio?: number;\n elevation?: number;\n numColumns?: number;\n theme: typeof theme;\n style?: StyleProp<ViewStyle>;\n onPress: () => void;\n};\n\nconst CardBlock: React.FC<Props> = ({\n image = Config.cardImageUrl,\n title,\n leftDescription,\n rightDescription,\n titleCentered,\n aspectRatio = 1.5,\n elevation = 2,\n numColumns = 3,\n theme: { colors, roundness, typography },\n style,\n onPress,\n ...rest\n}) => {\n let titleJustification: justificationType;\n\n let titleStyle;\n if (titleCentered && !leftDescription && !rightDescription) {\n titleJustification = \"center\";\n } else {\n titleJustification = \"space-between\";\n }\n\n if (numColumns === 1) {\n titleStyle = typography.button;\n } else if (numColumns === 2) {\n titleStyle = typography.headline6;\n } else {\n titleStyle = typography.headline5;\n }\n\n const rightDescriptionStyles = [\n typography.subtitle2,\n { color: colors.light },\n ];\n\n return (\n <Card style={style} onPress={onPress} numColumns={numColumns} {...rest}>\n <View style={{ backgroundColor: colors.background }}>\n <Elevation style={{ elevation, borderRadius: roundness }}>\n <Image\n style={{\n borderRadius: roundness,\n aspectRatio,\n }}\n source={typeof image === \"string\" ? { uri: image } : image}\n resizeMode=\"cover\"\n />\n </Elevation>\n {title ? (\n <View\n style={{\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: titleJustification,\n marginTop: numColumns === 3 ? 16 : 12,\n }}\n >\n <Text\n numberOfLines={1}\n style={[titleStyle, { color: colors.strong }]}\n >\n {title}\n </Text>\n {!leftDescription && rightDescription ? (\n <Text style={rightDescriptionStyles}>{rightDescription}</Text>\n ) : null}\n </View>\n ) : null}\n {leftDescription ? (\n <View\n style={{\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n marginTop: numColumns === 3 ? 4 : 4 / 2,\n }}\n >\n <Text\n numberOfLines={1}\n style={[typography.body2, { color: colors.medium }]}\n >\n {leftDescription}\n </Text>\n {rightDescription ? (\n <Text numberOfLines={1} style={rightDescriptionStyles}>\n {rightDescription}\n </Text>\n ) : null}\n </View>\n ) : null}\n </View>\n </Card>\n );\n};\n\nexport default withTheme(CardBlock);\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAEEC,IAFF,EAGEC,IAHF,QAMO,cANP;AAOA,OAAOC,KAAP,MAAkB,SAAlB;AACA,OAAOC,IAAP,MAAiB,yBAAjB;AACA,OAAOC,SAAP,MAAsB,aAAtB;AACA,SAASC,SAAT,QAA0B,YAA1B;AACA,OAAOC,MAAP,MAAmB,UA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"}
1
+ {"version":3,"names":["React","View","Text","Image","Card","Elevation","withTheme","Config","CardBlock","image","cardImageUrl","title","leftDescription","rightDescription","titleCentered","aspectRatio","elevation","numColumns","theme","colors","roundness","typography","style","onPress","rest","titleJustification","titleStyle","button","headline6","headline5","rightDescriptionStyles","subtitle2","color","light","backgroundColor","background","borderRadius","uri","flexDirection","alignItems","justifyContent","marginTop","strong","body2","medium"],"sources":["CardBlock.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n ImageSourcePropType,\n View,\n Text,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\nimport Image from \"./Image\";\nimport Card from \"./DeprecatedCardWrapper\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\nimport Config from \"./Config\";\nimport theme from \"../styles/DefaultTheme\";\nimport { justificationType } from \"./Justification\";\n\ntype Props = {\n image?: string | ImageSourcePropType;\n title?: string;\n leftDescription?: string;\n rightDescription?: string;\n titleCentered: boolean;\n aspectRatio?: number;\n elevation?: number;\n numColumns?: number;\n theme: typeof theme;\n style?: StyleProp<ViewStyle>;\n onPress: () => void;\n};\n\nconst CardBlock: React.FC<React.PropsWithChildren<Props>> = ({\n image = Config.cardImageUrl,\n title,\n leftDescription,\n rightDescription,\n titleCentered,\n aspectRatio = 1.5,\n elevation = 2,\n numColumns = 3,\n theme: { colors, roundness, typography },\n style,\n onPress,\n ...rest\n}) => {\n let titleJustification: justificationType;\n\n let titleStyle;\n if (titleCentered && !leftDescription && !rightDescription) {\n titleJustification = \"center\";\n } else {\n titleJustification = \"space-between\";\n }\n\n if (numColumns === 1) {\n titleStyle = typography.button;\n } else if (numColumns === 2) {\n titleStyle = typography.headline6;\n } else {\n titleStyle = typography.headline5;\n }\n\n const rightDescriptionStyles = [\n typography.subtitle2,\n { color: colors.light },\n ];\n\n return (\n <Card style={style} onPress={onPress} numColumns={numColumns} {...rest}>\n <View style={{ backgroundColor: colors.background }}>\n <Elevation style={{ elevation, borderRadius: roundness }}>\n <Image\n style={{\n borderRadius: roundness,\n aspectRatio,\n }}\n source={typeof image === \"string\" ? { uri: image } : image}\n resizeMode=\"cover\"\n />\n </Elevation>\n {title ? (\n <View\n style={{\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: titleJustification,\n marginTop: numColumns === 3 ? 16 : 12,\n }}\n >\n <Text\n numberOfLines={1}\n style={[titleStyle, { color: colors.strong }]}\n >\n {title}\n </Text>\n {!leftDescription && rightDescription ? (\n <Text style={rightDescriptionStyles}>{rightDescription}</Text>\n ) : null}\n </View>\n ) : null}\n {leftDescription ? (\n <View\n style={{\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n marginTop: numColumns === 3 ? 4 : 4 / 2,\n }}\n >\n <Text\n numberOfLines={1}\n style={[typography.body2, { color: colors.medium }]}\n >\n {leftDescription}\n </Text>\n {rightDescription ? (\n <Text numberOfLines={1} style={rightDescriptionStyles}>\n {rightDescription}\n </Text>\n ) : null}\n </View>\n ) : null}\n </View>\n </Card>\n );\n};\n\nexport default withTheme(CardBlock);\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAEEC,IAFF,EAGEC,IAHF,QAMO,cANP;AAOA,OAAOC,KAAP,MAAkB,SAAlB;AACA,OAAOC,IAAP,MAAiB,yBAAjB;AACA,OAAOC,SAAP,MAAsB,aAAtB;AACA,SAASC,SAAT,QAA0B,YAA1B;AACA,OAAOC,MAAP,MAAmB,UAAnB;;AAkBA,MAAMC,SAAmD,GAAG,QAatD;EAAA,IAbuD;IAC3DC,KAAK,GAAGF,MAAM,CAACG,YAD4C;IAE3DC,KAF2D;IAG3DC,eAH2D;IAI3DC,gBAJ2D;IAK3DC,aAL2D;IAM3DC,WAAW,GAAG,GAN6C;IAO3DC,SAAS,GAAG,CAP+C;IAQ3DC,UAAU,GAAG,CAR8C;IAS3DC,KAAK,EAAE;MAAEC,MAAF;MAAUC,SAAV;MAAqBC;IAArB,CAToD;IAU3DC,KAV2D;IAW3DC,O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