@draftbit/core 54.0.3 → 54.0.4-6c949a.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (326) hide show
  1. package/lib/typescript/tsconfig.tsbuildinfo +1 -1
  2. package/package.json +6 -4
  3. package/src/Provider.js +0 -10
  4. package/src/Provider.js.map +0 -1
  5. package/src/components/AccordionGroup.js +0 -51
  6. package/src/components/AccordionGroup.js.map +0 -1
  7. package/src/components/ActionSheet/ActionSheet.js +0 -46
  8. package/src/components/ActionSheet/ActionSheet.js.map +0 -1
  9. package/src/components/ActionSheet/ActionSheetCancel.js +0 -7
  10. package/src/components/ActionSheet/ActionSheetCancel.js.map +0 -1
  11. package/src/components/ActionSheet/ActionSheetItem.js +0 -31
  12. package/src/components/ActionSheet/ActionSheetItem.js.map +0 -1
  13. package/src/components/ActionSheet/index.js +0 -4
  14. package/src/components/ActionSheet/index.js.map +0 -1
  15. package/src/components/AspectRatio.js +0 -19
  16. package/src/components/AspectRatio.js.map +0 -1
  17. package/src/components/BottomSheet/BottomSheet.js +0 -76
  18. package/src/components/BottomSheet/BottomSheet.js.map +0 -1
  19. package/src/components/BottomSheet/index.js +0 -2
  20. package/src/components/BottomSheet/index.js.map +0 -1
  21. package/src/components/Button.js +0 -119
  22. package/src/components/Button.js.map +0 -1
  23. package/src/components/Checkbox/Checkbox.js +0 -63
  24. package/src/components/Checkbox/Checkbox.js.map +0 -1
  25. package/src/components/Checkbox/CheckboxGroupRow.js +0 -77
  26. package/src/components/Checkbox/CheckboxGroupRow.js.map +0 -1
  27. package/src/components/Checkbox/CheckboxRow.js +0 -79
  28. package/src/components/Checkbox/CheckboxRow.js.map +0 -1
  29. package/src/components/Checkbox/context.js +0 -15
  30. package/src/components/Checkbox/context.js.map +0 -1
  31. package/src/components/Checkbox/index.js +0 -3
  32. package/src/components/Checkbox/index.js.map +0 -1
  33. package/src/components/Config.js +0 -65
  34. package/src/components/Config.js.map +0 -1
  35. package/src/components/DatePicker/DatePicker.js +0 -418
  36. package/src/components/DatePicker/DatePicker.js.map +0 -1
  37. package/src/components/DatePicker/DatePickerComponent.js +0 -17
  38. package/src/components/DatePicker/DatePickerComponent.js.map +0 -1
  39. package/src/components/DatePicker/DatePickerComponent.web.js +0 -57
  40. package/src/components/DatePicker/DatePickerComponent.web.js.map +0 -1
  41. package/src/components/DatePicker/DatePickerComponentType.js +0 -2
  42. package/src/components/DatePicker/DatePickerComponentType.js.map +0 -1
  43. package/src/components/DatePicker/parseDate.js +0 -12
  44. package/src/components/DatePicker/parseDate.js.map +0 -1
  45. package/src/components/DeckSwiper/DeckSwiper.js +0 -116
  46. package/src/components/DeckSwiper/DeckSwiper.js.map +0 -1
  47. package/src/components/DeckSwiper/DeckSwiperCard.js +0 -21
  48. package/src/components/DeckSwiper/DeckSwiperCard.js.map +0 -1
  49. package/src/components/DeckSwiper/index.js +0 -3
  50. package/src/components/DeckSwiper/index.js.map +0 -1
  51. package/src/components/Divider.js +0 -14
  52. package/src/components/Divider.js.map +0 -1
  53. package/src/components/Elevation.js +0 -20
  54. package/src/components/Elevation.js.map +0 -1
  55. package/src/components/ExpoImage.js +0 -44
  56. package/src/components/ExpoImage.js.map +0 -1
  57. package/src/components/FlatList.js +0 -7
  58. package/src/components/FlatList.js.map +0 -1
  59. package/src/components/FormRow.js +0 -20
  60. package/src/components/FormRow.js.map +0 -1
  61. package/src/components/IconButton.js +0 -36
  62. package/src/components/IconButton.js.map +0 -1
  63. package/src/components/Image.js +0 -48
  64. package/src/components/Image.js.map +0 -1
  65. package/src/components/KeyboardAvoidingView.js +0 -29
  66. package/src/components/KeyboardAvoidingView.js.map +0 -1
  67. package/src/components/Layout/AspectRatio.js +0 -7
  68. package/src/components/Layout/AspectRatio.js.map +0 -1
  69. package/src/components/Layout/Center.js +0 -15
  70. package/src/components/Layout/Center.js.map +0 -1
  71. package/src/components/Layout/Circle.js +0 -16
  72. package/src/components/Layout/Circle.js.map +0 -1
  73. package/src/components/Layout/HStack.js +0 -12
  74. package/src/components/Layout/HStack.js.map +0 -1
  75. package/src/components/Layout/LayoutCommon.js +0 -8
  76. package/src/components/Layout/LayoutCommon.js.map +0 -1
  77. package/src/components/Layout/Spacer.js +0 -15
  78. package/src/components/Layout/Spacer.js.map +0 -1
  79. package/src/components/Layout/Square.js +0 -25
  80. package/src/components/Layout/Square.js.map +0 -1
  81. package/src/components/Layout/VStack.js +0 -12
  82. package/src/components/Layout/VStack.js.map +0 -1
  83. package/src/components/Layout/ZStack.js +0 -58
  84. package/src/components/Layout/ZStack.js.map +0 -1
  85. package/src/components/Layout/index.js +0 -9
  86. package/src/components/Layout/index.js.map +0 -1
  87. package/src/components/LoadingIndicator.js +0 -38
  88. package/src/components/LoadingIndicator.js.map +0 -1
  89. package/src/components/LottieAnimation.js +0 -12
  90. package/src/components/LottieAnimation.js.map +0 -1
  91. package/src/components/Markdown.js +0 -33
  92. package/src/components/Markdown.js.map +0 -1
  93. package/src/components/MediaPlayer/AudioPlayer/AudioPlayerCommon.js +0 -2
  94. package/src/components/MediaPlayer/AudioPlayer/AudioPlayerCommon.js.map +0 -1
  95. package/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js +0 -123
  96. package/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js.map +0 -1
  97. package/src/components/MediaPlayer/AudioPlayer/HeadlessAudioPlayer.js +0 -90
  98. package/src/components/MediaPlayer/AudioPlayer/HeadlessAudioPlayer.js.map +0 -1
  99. package/src/components/MediaPlayer/AudioPlayer/index.js +0 -13
  100. package/src/components/MediaPlayer/AudioPlayer/index.js.map +0 -1
  101. package/src/components/MediaPlayer/MediaPlaybackWrapper.js +0 -42
  102. package/src/components/MediaPlayer/MediaPlaybackWrapper.js.map +0 -1
  103. package/src/components/MediaPlayer/MediaPlayerCommon.js +0 -71
  104. package/src/components/MediaPlayer/MediaPlayerCommon.js.map +0 -1
  105. package/src/components/MediaPlayer/VideoPlayer/VideoPlayer.js +0 -109
  106. package/src/components/MediaPlayer/VideoPlayer/VideoPlayer.js.map +0 -1
  107. package/src/components/MediaPlayer/VideoPlayer/index.js +0 -2
  108. package/src/components/MediaPlayer/VideoPlayer/index.js.map +0 -1
  109. package/src/components/NumberInput.js +0 -63
  110. package/src/components/NumberInput.js.map +0 -1
  111. package/src/components/Picker/NativePicker.ios.js +0 -77
  112. package/src/components/Picker/NativePicker.ios.js.map +0 -1
  113. package/src/components/Picker/NativePicker.js +0 -73
  114. package/src/components/Picker/NativePicker.js.map +0 -1
  115. package/src/components/Picker/PickerCommon.js +0 -36
  116. package/src/components/Picker/PickerCommon.js.map +0 -1
  117. package/src/components/Picker/PickerInputContainer.js +0 -36
  118. package/src/components/Picker/PickerInputContainer.js.map +0 -1
  119. package/src/components/Picker/dropdown/DropDownModalPicker.js +0 -70
  120. package/src/components/Picker/dropdown/DropDownModalPicker.js.map +0 -1
  121. package/src/components/Picker/dropdown/DropDownPicker.js +0 -61
  122. package/src/components/Picker/dropdown/DropDownPicker.js.map +0 -1
  123. package/src/components/Picker/dropdown/MultiSelectPicker.js +0 -9
  124. package/src/components/Picker/dropdown/MultiSelectPicker.js.map +0 -1
  125. package/src/components/Picker/dropdown/PickerItem.js +0 -9
  126. package/src/components/Picker/dropdown/PickerItem.js.map +0 -1
  127. package/src/components/Picker/index.js +0 -22
  128. package/src/components/Picker/index.js.map +0 -1
  129. package/src/components/PinInput/CustomPinInputCell.js +0 -11
  130. package/src/components/PinInput/CustomPinInputCell.js.map +0 -1
  131. package/src/components/PinInput/PinInput.js +0 -89
  132. package/src/components/PinInput/PinInput.js.map +0 -1
  133. package/src/components/PinInput/PinInputText.js +0 -14
  134. package/src/components/PinInput/PinInputText.js.map +0 -1
  135. package/src/components/PinInput/index.js +0 -4
  136. package/src/components/PinInput/index.js.map +0 -1
  137. package/src/components/Portal/Portal.js +0 -34
  138. package/src/components/Portal/Portal.js.map +0 -1
  139. package/src/components/Portal/PortalConsumer.js +0 -28
  140. package/src/components/Portal/PortalConsumer.js.map +0 -1
  141. package/src/components/Portal/PortalHost.js +0 -109
  142. package/src/components/Portal/PortalHost.js.map +0 -1
  143. package/src/components/Portal/PortalManager.js +0 -33
  144. package/src/components/Portal/PortalManager.js.map +0 -1
  145. package/src/components/Pressable.js +0 -23
  146. package/src/components/Pressable.js.map +0 -1
  147. package/src/components/Progress/CircularProgress/CircularProgress.js +0 -103
  148. package/src/components/Progress/CircularProgress/CircularProgress.js.map +0 -1
  149. package/src/components/Progress/CircularProgress/index.js +0 -14
  150. package/src/components/Progress/CircularProgress/index.js.map +0 -1
  151. package/src/components/Progress/IndeterminateProgress.js +0 -39
  152. package/src/components/Progress/IndeterminateProgress.js.map +0 -1
  153. package/src/components/Progress/LinearProgress/LinearProgress.js +0 -57
  154. package/src/components/Progress/LinearProgress/LinearProgress.js.map +0 -1
  155. package/src/components/Progress/LinearProgress/index.js +0 -14
  156. package/src/components/Progress/LinearProgress/index.js.map +0 -1
  157. package/src/components/Progress/ProgressCommon.js +0 -2
  158. package/src/components/Progress/ProgressCommon.js.map +0 -1
  159. package/src/components/ProgressIndicator.js +0 -28
  160. package/src/components/ProgressIndicator.js.map +0 -1
  161. package/src/components/RadioButton/RadioButton.js +0 -18
  162. package/src/components/RadioButton/RadioButton.js.map +0 -1
  163. package/src/components/RadioButton/RadioButtonGroup.js +0 -44
  164. package/src/components/RadioButton/RadioButtonGroup.js.map +0 -1
  165. package/src/components/RadioButton/RadioButtonRow.js +0 -79
  166. package/src/components/RadioButton/RadioButtonRow.js.map +0 -1
  167. package/src/components/RadioButton/context.js +0 -15
  168. package/src/components/RadioButton/context.js.map +0 -1
  169. package/src/components/RadioButton/index.js +0 -4
  170. package/src/components/RadioButton/index.js.map +0 -1
  171. package/src/components/Row.js +0 -49
  172. package/src/components/Row.js.map +0 -1
  173. package/src/components/SVG.js +0 -8
  174. package/src/components/SVG.js.map +0 -1
  175. package/src/components/SVG.native.js +0 -10
  176. package/src/components/SVG.native.js.map +0 -1
  177. package/src/components/ScreenContainer.js +0 -42
  178. package/src/components/ScreenContainer.js.map +0 -1
  179. package/src/components/SectionList/SectionHeader.js +0 -14
  180. package/src/components/SectionList/SectionHeader.js.map +0 -1
  181. package/src/components/SectionList/SectionList.js +0 -111
  182. package/src/components/SectionList/SectionList.js.map +0 -1
  183. package/src/components/SectionList/index.js +0 -3
  184. package/src/components/SectionList/index.js.map +0 -1
  185. package/src/components/Shadow.js +0 -26
  186. package/src/components/Shadow.js.map +0 -1
  187. package/src/components/SimpleStyleScrollables/SimpleStyleFlashList.js +0 -13
  188. package/src/components/SimpleStyleScrollables/SimpleStyleFlashList.js.map +0 -1
  189. package/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js +0 -13
  190. package/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js.map +0 -1
  191. package/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js +0 -13
  192. package/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js.map +0 -1
  193. package/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js +0 -13
  194. package/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js.map +0 -1
  195. package/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js +0 -13
  196. package/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js.map +0 -1
  197. package/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js +0 -15
  198. package/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js.map +0 -1
  199. package/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js +0 -15
  200. package/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js.map +0 -1
  201. package/src/components/SimpleStyleScrollables/useSplitContentContainerStyles.js +0 -91
  202. package/src/components/SimpleStyleScrollables/useSplitContentContainerStyles.js.map +0 -1
  203. package/src/components/Slider.js +0 -84
  204. package/src/components/Slider.js.map +0 -1
  205. package/src/components/StarRating.js +0 -51
  206. package/src/components/StarRating.js.map +0 -1
  207. package/src/components/StepIndicator.js +0 -347
  208. package/src/components/StepIndicator.js.map +0 -1
  209. package/src/components/Stepper.js +0 -43
  210. package/src/components/Stepper.js.map +0 -1
  211. package/src/components/Surface.js +0 -55
  212. package/src/components/Surface.js.map +0 -1
  213. package/src/components/SwipeableItem/SwipeableItem.js +0 -124
  214. package/src/components/SwipeableItem/SwipeableItem.js.map +0 -1
  215. package/src/components/SwipeableItem/SwipeableItemButton.js +0 -6
  216. package/src/components/SwipeableItem/SwipeableItemButton.js.map +0 -1
  217. package/src/components/SwipeableItem/SwipeableItemCommon.js +0 -44
  218. package/src/components/SwipeableItem/SwipeableItemCommon.js.map +0 -1
  219. package/src/components/SwipeableItem/SwipeableList.js +0 -29
  220. package/src/components/SwipeableItem/SwipeableList.js.map +0 -1
  221. package/src/components/SwipeableItem/index.js +0 -4
  222. package/src/components/SwipeableItem/index.js.map +0 -1
  223. package/src/components/Swiper/Swiper.js +0 -99
  224. package/src/components/Swiper/Swiper.js.map +0 -1
  225. package/src/components/Swiper/SwiperItem.js +0 -10
  226. package/src/components/Swiper/SwiperItem.js.map +0 -1
  227. package/src/components/Swiper/index.js +0 -3
  228. package/src/components/Swiper/index.js.map +0 -1
  229. package/src/components/Switch.js +0 -56
  230. package/src/components/Switch.js.map +0 -1
  231. package/src/components/TabView/TabView.js +0 -65
  232. package/src/components/TabView/TabView.js.map +0 -1
  233. package/src/components/TabView/TabViewItem.js +0 -12
  234. package/src/components/TabView/TabViewItem.js.map +0 -1
  235. package/src/components/TabView/index.js +0 -3
  236. package/src/components/TabView/index.js.map +0 -1
  237. package/src/components/Table/Table.js +0 -94
  238. package/src/components/Table/Table.js.map +0 -1
  239. package/src/components/Table/TableCell.js +0 -34
  240. package/src/components/Table/TableCell.js.map +0 -1
  241. package/src/components/Table/TableCommon.js +0 -13
  242. package/src/components/Table/TableCommon.js.map +0 -1
  243. package/src/components/Table/TableRow.js +0 -42
  244. package/src/components/Table/TableRow.js.map +0 -1
  245. package/src/components/Table/index.js +0 -4
  246. package/src/components/Table/index.js.map +0 -1
  247. package/src/components/Text.js +0 -25
  248. package/src/components/Text.js.map +0 -1
  249. package/src/components/TextField.js +0 -411
  250. package/src/components/TextField.js.map +0 -1
  251. package/src/components/TextInput.js +0 -25
  252. package/src/components/TextInput.js.map +0 -1
  253. package/src/components/Timer.js +0 -87
  254. package/src/components/Timer.js.map +0 -1
  255. package/src/components/Touchable.js +0 -13
  256. package/src/components/Touchable.js.map +0 -1
  257. package/src/components/Touchable.web.js +0 -3
  258. package/src/components/Touchable.web.js.map +0 -1
  259. package/src/components/Typography.js +0 -37
  260. package/src/components/Typography.js.map +0 -1
  261. package/src/components/YoutubePlayer/YoutubePlayer.js +0 -21
  262. package/src/components/YoutubePlayer/YoutubePlayer.js.map +0 -1
  263. package/src/components/YoutubePlayer/YoutubePlayer.native.js +0 -36
  264. package/src/components/YoutubePlayer/YoutubePlayer.native.js.map +0 -1
  265. package/src/components/YoutubePlayer/YoutubePlayerProps.js +0 -2
  266. package/src/components/YoutubePlayer/YoutubePlayerProps.js.map +0 -1
  267. package/src/components/YoutubePlayer/index.js +0 -2
  268. package/src/components/YoutubePlayer/index.js.map +0 -1
  269. package/src/components/useAuthState.js +0 -35
  270. package/src/components/useAuthState.js.map +0 -1
  271. package/src/constants.js +0 -11
  272. package/src/constants.js.map +0 -1
  273. package/src/deprecated-components/AccordionItem.js +0 -36
  274. package/src/deprecated-components/AccordionItem.js.map +0 -1
  275. package/src/deprecated-components/AnimatedCircularProgress.js +0 -47
  276. package/src/deprecated-components/AnimatedCircularProgress.js.map +0 -1
  277. package/src/deprecated-components/AvatarEdit.js +0 -34
  278. package/src/deprecated-components/AvatarEdit.js.map +0 -1
  279. package/src/deprecated-components/AvoidKeyboardView.js +0 -36
  280. package/src/deprecated-components/AvoidKeyboardView.js.map +0 -1
  281. package/src/deprecated-components/Banner.js +0 -112
  282. package/src/deprecated-components/Banner.js.map +0 -1
  283. package/src/deprecated-components/Card.js +0 -61
  284. package/src/deprecated-components/Card.js.map +0 -1
  285. package/src/deprecated-components/CheckboxGroup.js +0 -25
  286. package/src/deprecated-components/CheckboxGroup.js.map +0 -1
  287. package/src/deprecated-components/CircleImage.js +0 -12
  288. package/src/deprecated-components/CircleImage.js.map +0 -1
  289. package/src/deprecated-components/CircularProgress.js +0 -85
  290. package/src/deprecated-components/CircularProgress.js.map +0 -1
  291. package/src/deprecated-components/Container.js +0 -46
  292. package/src/deprecated-components/Container.js.map +0 -1
  293. package/src/deprecated-components/DeprecatedButton.js +0 -87
  294. package/src/deprecated-components/DeprecatedButton.js.map +0 -1
  295. package/src/deprecated-components/DeprecatedCardWrapper.js +0 -22
  296. package/src/deprecated-components/DeprecatedCardWrapper.js.map +0 -1
  297. package/src/deprecated-components/DeprecatedFAB.js +0 -111
  298. package/src/deprecated-components/DeprecatedFAB.js.map +0 -1
  299. package/src/deprecated-components/FAB.js +0 -50
  300. package/src/deprecated-components/FAB.js.map +0 -1
  301. package/src/deprecated-components/FieldSearchBarFull.js +0 -57
  302. package/src/deprecated-components/FieldSearchBarFull.js.map +0 -1
  303. package/src/deprecated-components/Layout.js +0 -69
  304. package/src/deprecated-components/Layout.js.map +0 -1
  305. package/src/deprecated-components/ProgressBar.js +0 -122
  306. package/src/deprecated-components/ProgressBar.js.map +0 -1
  307. package/src/deprecated-components/ProgressCircle.js +0 -17
  308. package/src/deprecated-components/ProgressCircle.js.map +0 -1
  309. package/src/deprecated-components/RadioButtonFieldGroup.js +0 -21
  310. package/src/deprecated-components/RadioButtonFieldGroup.js.map +0 -1
  311. package/src/deprecated-components/RowBodyIcon.js +0 -12
  312. package/src/deprecated-components/RowBodyIcon.js.map +0 -1
  313. package/src/deprecated-components/RowHeadlineImageCaption.js +0 -16
  314. package/src/deprecated-components/RowHeadlineImageCaption.js.map +0 -1
  315. package/src/deprecated-components/RowHeadlineImageIcon.js +0 -18
  316. package/src/deprecated-components/RowHeadlineImageIcon.js.map +0 -1
  317. package/src/deprecated-components/ToggleButton.js +0 -43
  318. package/src/deprecated-components/ToggleButton.js.map +0 -1
  319. package/src/hooks.js +0 -35
  320. package/src/hooks.js.map +0 -1
  321. package/src/index.js +0 -77
  322. package/src/index.js.map +0 -1
  323. package/src/interfaces/Icon.js +0 -9
  324. package/src/interfaces/Icon.js.map +0 -1
  325. package/src/utilities.js +0 -223
  326. package/src/utilities.js.map +0 -1
@@ -1,9 +0,0 @@
1
- /**
2
- * Renders nothing, only serves as a container for the props
3
- * Prop values are used by the DropDownPicker
4
- */
5
- export const PickerItem = () => {
6
- return null;
7
- };
8
- export default PickerItem;
9
- //# sourceMappingURL=PickerItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PickerItem.js","sourceRoot":"","sources":["PickerItem.tsx"],"names":[],"mappings":"AAUA;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAA8B,GAAG,EAAE;IACxD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1,22 +0,0 @@
1
- import React from "react";
2
- import NativePicker from "./NativePicker";
3
- import DropDownPicker from "./dropdown/DropDownPicker";
4
- import DropDownModalPicker from "./dropdown/DropDownModalPicker";
5
- import { withTheme } from "@draftbit/theme";
6
- const SinglePicker = ({ mode = "native", ...rest }) => {
7
- switch (mode) {
8
- case "native":
9
- //@ts-ignore Ignore theme type issues
10
- return React.createElement(NativePicker, { ...rest });
11
- case "dropdown":
12
- //@ts-ignore
13
- return React.createElement(DropDownPicker, { ...rest });
14
- case "dropdown-modal":
15
- //@ts-ignore
16
- return React.createElement(DropDownModalPicker, { ...rest });
17
- }
18
- };
19
- export const Picker = withTheme(SinglePicker);
20
- export { default as MultiSelectPicker } from "./dropdown/MultiSelectPicker";
21
- export { default as PickerItem } from "./dropdown/PickerItem";
22
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,cAAc,MAAM,2BAA2B,CAAC;AACvD,OAAO,mBAAmB,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAS5C,MAAM,YAAY,GAAmD,CAAC,EACpE,IAAI,GAAG,QAAQ,EACf,GAAG,IAAI,EACR,EAAE,EAAE;IACH,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,QAAQ;YACX,qCAAqC;YACrC,OAAO,oBAAC,YAAY,OAAK,IAAI,GAAI,CAAC;QACpC,KAAK,UAAU;YACb,YAAY;YACZ,OAAO,oBAAC,cAAc,OAAK,IAAI,GAAI,CAAC;QACtC,KAAK,gBAAgB;YACnB,YAAY;YACZ,OAAO,oBAAC,mBAAmB,OAAK,IAAI,GAAI,CAAC;IAC7C,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC"}
@@ -1,11 +0,0 @@
1
- import React from "react";
2
- import { View } from "react-native";
3
- /**
4
- * Simple View wrapper component to create a custom pin input cell
5
- * Meant to be used in PinInput's renderItem
6
- */
7
- const CustomPinInputCell = (props) => {
8
- return React.createElement(View, { ...props });
9
- };
10
- export default CustomPinInputCell;
11
- //# sourceMappingURL=CustomPinInputCell.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CustomPinInputCell.js","sourceRoot":"","sources":["CustomPinInputCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAwB,IAAI,EAAqB,MAAM,cAAc,CAAC;AAO7E;;;GAGG;AACH,MAAM,kBAAkB,GAEpB,CAAC,KAAK,EAAE,EAAE;IACZ,OAAO,oBAAC,IAAI,OAAK,KAAK,GAAI,CAAC;AAC7B,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -1,89 +0,0 @@
1
- import React from "react";
2
- import { View, StyleSheet, Platform, } from "react-native";
3
- import TextInput from "../TextInput";
4
- import { CodeField, useClearByFocusCell, } from "react-native-confirmation-code-field";
5
- import { withTheme } from "@draftbit/theme";
6
- import PinInputText from "./PinInputText";
7
- import { extractStyles } from "../../utilities";
8
- const PinInput = React.forwardRef(({ theme, onInputFull, cellCount = 4, clearOnCellFocus = true, blurOnFull = true, renderItem, value, onChangeText, focusedBorderColor = theme.colors.branding.primary, focusedBackgroundColor, focusedBorderWidth, focusedTextColor, secureTextEntry, style, ...rest }, ref) => {
9
- const newPinInputRef = React.useRef(null);
10
- // Use the provided ref or default to new ref when not provided
11
- const pinInputRef = ref
12
- ? ref
13
- : newPinInputRef;
14
- const { viewStyles, textStyles } = extractStyles(style);
15
- // Clears input of a cell when focused, configured as explained here (https://github.com/retyui/react-native-confirmation-code-field/blob/master/API.md#useclearbyfocuscellvalue-string-setvalue-text-string--void)
16
- const [codeFieldProps, getCellOnLayout] = useClearByFocusCell({
17
- value,
18
- setValue: (text) => onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(text),
19
- });
20
- React.useEffect(() => {
21
- var _a;
22
- if ((value === null || value === void 0 ? void 0 : value.length) === cellCount) {
23
- if (blurOnFull) {
24
- (_a = pinInputRef.current) === null || _a === void 0 ? void 0 : _a.blur();
25
- }
26
- onInputFull === null || onInputFull === void 0 ? void 0 : onInputFull(value);
27
- }
28
- // eslint-disable-next-line react-hooks/exhaustive-deps
29
- }, [value, cellCount, blurOnFull, pinInputRef]);
30
- const renderCell = (cellValue, index, isFocused) => {
31
- if (secureTextEntry && cellValue) {
32
- cellValue = "•";
33
- }
34
- const cell = (renderItem === null || renderItem === void 0 ? void 0 : renderItem({ cellValue, index, isFocused })) || (React.createElement(View, { testID: "default-code-input-cell", style: [
35
- styles.cell,
36
- { borderColor: theme.colors.border.base },
37
- viewStyles,
38
- isFocused && focusedBorderWidth
39
- ? { borderWidth: focusedBorderWidth }
40
- : undefined,
41
- isFocused && focusedBorderColor
42
- ? { borderColor: focusedBorderColor }
43
- : undefined,
44
- isFocused && focusedBackgroundColor
45
- ? { backgroundColor: focusedBackgroundColor }
46
- : undefined,
47
- ] },
48
- React.createElement(PinInputText, { style: [
49
- styles.cellText,
50
- { color: theme.colors.text.strong },
51
- textStyles,
52
- isFocused && focusedTextColor
53
- ? { color: focusedTextColor }
54
- : undefined,
55
- ], isFocused: isFocused }, cellValue)));
56
- return React.cloneElement(cell, {
57
- onLayout: clearOnCellFocus ? getCellOnLayout(index) : undefined,
58
- });
59
- };
60
- return (React.createElement(CodeField, { ref: pinInputRef, ...(clearOnCellFocus ? codeFieldProps : {}), value: value, onChangeText: onChangeText, rootStyle: styles.rootContainer, textInputStyle: [
61
- // addresses issue on firefox where the hidden input did not fill the height
62
- { height: "100%" },
63
- //@ts-ignore Web specific prop. Removes default blue outline that appears on the hidden TextInput
64
- Platform.OS === "web" ? { outlineWidth: 0 } : {},
65
- ], InputComponent: TextInput, cellCount: cellCount, renderCell: ({ symbol: cellValue, index, isFocused }) => (React.createElement(React.Fragment, { key: index }, renderCell(cellValue, index, isFocused))), secureTextEntry: secureTextEntry, ...rest }));
66
- });
67
- const styles = StyleSheet.create({
68
- rootContainer: {
69
- justifyContent: "center",
70
- },
71
- cell: {
72
- marginLeft: 5,
73
- marginRight: 5,
74
- padding: 5,
75
- borderRadius: 5,
76
- justifyContent: "center",
77
- alignItems: "center",
78
- aspectRatio: 1,
79
- maxWidth: 70,
80
- maxHeight: 70,
81
- borderWidth: 1,
82
- flex: 1,
83
- },
84
- cellText: {
85
- fontSize: 25,
86
- },
87
- });
88
- export default withTheme(PinInput);
89
- //# sourceMappingURL=PinInput.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PinInput.js","sourceRoot":"","sources":["PinInput.tsx"],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IAAI,EAAE;QACJ,UAAU,EAAE,CAAC;QACb,WAAW,EAAE,CAAC;QACd,OAAO,EAAE,CAAC;QACV,YAAY,EAAE,CAAC;QACf,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,WAAW,EAAE,CAAC;QACd,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,EAAE;QACb,WAAW,EAAE,CAAC;QACd,IAAI,EAAE,CAAC;KACR;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,EAAE;KACb;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC,QAAQ,CAAC,CAAC"}
@@ -1,14 +0,0 @@
1
- import React from "react";
2
- import { Text } from "react-native";
3
- import { withTheme } from "@draftbit/theme";
4
- import { Cursor } from "react-native-confirmation-code-field";
5
- /**
6
- * Text component that can conditionally render a blinking cursor when focused and empty
7
- * Meant to be used within a CustomPinInputCell component
8
- */
9
- const CustomPinInputText = ({ isFocused, cursorBlinkDuration, cursorText, style, theme, children, ...rest }) => {
10
- return (React.createElement(Text, { style: [{ color: theme.colors.text.strong }, style], ...rest }, children ||
11
- (isFocused ? (React.createElement(Cursor, { cursorSymbol: cursorText, delay: cursorBlinkDuration })) : null)));
12
- };
13
- export default withTheme(CustomPinInputText);
14
- //# sourceMappingURL=PinInputText.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PinInputText.js","sourceRoot":"","sources":["PinInputText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAa,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAC;AAS9D;;;GAGG;AACH,MAAM,kBAAkB,GAAsC,CAAC,EAC7D,SAAS,EACT,mBAAmB,EACnB,UAAU,EACV,KAAK,EACL,KAAK,EACL,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,EAAE;IACH,OAAO,CACL,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,KAAK,CAAC,KAAM,IAAI,IAChE,QAAQ;QACP,CAAC,SAAS,CAAC,CAAC,CAAC,CACX,oBAAC,MAAM,IAAC,YAAY,EAAE,UAAU,EAAE,KAAK,EAAE,mBAAmB,GAAI,CACjE,CAAC,CAAC,CAAC,IAAI,CAAC,CACN,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC,kBAAkB,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- export { default as PinInput } from "./PinInput";
2
- export { default as CustomPinInputCell } from "./CustomPinInputCell";
3
- export { default as PinInputText } from "./PinInputText";
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,34 +0,0 @@
1
- import * as React from "react";
2
- import PortalConsumer from "./PortalConsumer";
3
- import PortalHost, { PortalContext } from "./PortalHost";
4
- /**
5
- * Portal allows to render a component at a different place in the parent tree.
6
- * You can use it to render content which should appear above other elements, similar to `Modal`.
7
- * It requires a [`Portal.Host`](portal-host.html) component to be rendered somewhere in the parent tree.
8
- *
9
- * ## Usage
10
- * ```js
11
- * import * as React from 'react';
12
- * import { Portal, Text } from 'react-native-paper';
13
- *
14
- * export default class MyComponent extends React.Component {
15
- * render() {
16
- * return (
17
- * <Portal>
18
- * <Text>This is rendered at a different place</Text>
19
- * </Portal>
20
- * );
21
- * }
22
- * }
23
- * ```
24
- */
25
- class Portal extends React.Component {
26
- render() {
27
- const { children } = this.props;
28
- return (React.createElement(PortalContext.Consumer, null, (manager) => (React.createElement(PortalConsumer, { manager: manager }, children))));
29
- }
30
- }
31
- // @component ./PortalHost.tsx
32
- Portal.Host = PortalHost;
33
- export default Portal;
34
- //# sourceMappingURL=Portal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Portal.js","sourceRoot":"","sources":["Portal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,UAAU,EAAE,EAAE,aAAa,EAAiB,MAAM,cAAc,CAAC;AASxE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAO,SAAQ,KAAK,CAAC,SAAgB;IAIzC,MAAM;QACJ,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAEhC,OAAO,CACL,oBAAC,aAAa,CAAC,QAAQ,QACpB,CAAC,OAAO,EAAE,EAAE,CAAC,CACZ,oBAAC,cAAc,IAAC,OAAO,EAAE,OAAwB,IAC9C,QAAQ,CACM,CAClB,CACsB,CAC1B,CAAC;IACJ,CAAC;;AAfD,8BAA8B;AACvB,WAAI,GAAG,UAAU,CAAC;AAiB3B,eAAe,MAAM,CAAC"}
@@ -1,28 +0,0 @@
1
- import * as React from "react";
2
- export default class PortalConsumer extends React.Component {
3
- async componentDidMount() {
4
- this.checkManager();
5
- // Delay updating to prevent React from going to infinite loop
6
- await Promise.resolve();
7
- this.key = this.props.manager.mount(this.props.children);
8
- }
9
- componentDidUpdate() {
10
- this.checkManager();
11
- this.props.manager.update(this.key, this.props.children);
12
- }
13
- componentWillUnmount() {
14
- this.checkManager();
15
- this.props.manager.unmount(this.key);
16
- }
17
- checkManager() {
18
- if (!this.props.manager) {
19
- throw new Error("Looks like you forgot to wrap your root component with `Provider` component from `react-native-paper`.\n\n" +
20
- "Please read our getting-started guide and make sure you've followed all the required steps.\n\n" +
21
- "https://callstack.github.io/react-native-paper/getting-started.html");
22
- }
23
- }
24
- render() {
25
- return null;
26
- }
27
- }
28
- //# sourceMappingURL=PortalConsumer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PortalConsumer.js","sourceRoot":"","sources":["PortalConsumer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,KAAK,CAAC,SAAgB;IAChE,KAAK,CAAC,iBAAiB;QACrB,IAAI,CAAC,YAAY,EAAE,CAAC;QAEpB,8DAA8D;QAC9D,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;QAExB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC3D,CAAC;IAED,kBAAkB;QAChB,IAAI,CAAC,YAAY,EAAE,CAAC;QAEpB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC3D,CAAC;IAED,oBAAoB;QAClB,IAAI,CAAC,YAAY,EAAE,CAAC;QAEpB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACvC,CAAC;IAIO,YAAY;QAClB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CACb,4GAA4G;gBAC1G,iGAAiG;gBACjG,qEAAqE,CACxE,CAAC;QACJ,CAAC;IACH,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
@@ -1,109 +0,0 @@
1
- import * as React from "react";
2
- import { View, StyleSheet } from "react-native";
3
- import PortalManager from "./PortalManager";
4
- export const PortalContext = React.createContext(null);
5
- /**
6
- * Portal host renders all of its children `Portal` elements.
7
- * For example, you can wrap a screen in `Portal.Host` to render items above the screen.
8
- * If you're using the `Provider` component, it already includes `Portal.Host`.
9
- *
10
- * ## Usage
11
- * ```js
12
- * import * as React from 'react';
13
- * import { Text } from 'react-native';
14
- * import { Portal } from 'react-native-paper';
15
- *
16
- * export default class MyComponent extends React.Component {
17
- * render() {
18
- * return (
19
- * <Portal.Host>
20
- * <Text>Content of the app</Text>
21
- * </Portal.Host>
22
- * );
23
- * }
24
- * }
25
- * ```
26
- *
27
- * Here any `Portal` elements under `<App />` are rendered alongside `<App />` and will appear above `<App />` like a `Modal`.
28
- */
29
- class PortalHost extends React.Component {
30
- constructor() {
31
- super(...arguments);
32
- this.setManager = (manager) => {
33
- this.manager = manager;
34
- };
35
- this.mount = (children) => {
36
- const key = this.nextKey++;
37
- if (this.manager) {
38
- this.manager.mount(key, children);
39
- }
40
- else {
41
- this.queue.push({ type: "mount", key, children });
42
- }
43
- return key;
44
- };
45
- this.update = (key, children) => {
46
- if (this.manager) {
47
- this.manager.update(key, children);
48
- }
49
- else {
50
- const op = { type: "mount", key, children };
51
- const index = this.queue.findIndex((o) => o.type === "mount" || (o.type === "update" && o.key === key));
52
- if (index > -1) {
53
- // @ts-ignore
54
- this.queue[index] = op;
55
- }
56
- else {
57
- this.queue.push(op);
58
- }
59
- }
60
- };
61
- this.unmount = (key) => {
62
- if (this.manager) {
63
- this.manager.unmount(key);
64
- }
65
- else {
66
- this.queue.push({ type: "unmount", key });
67
- }
68
- };
69
- this.nextKey = 0;
70
- this.queue = [];
71
- }
72
- componentDidMount() {
73
- const manager = this.manager;
74
- const queue = this.queue;
75
- while (queue.length && manager) {
76
- const action = queue.pop();
77
- if (action) {
78
- switch (action.type) {
79
- case "mount":
80
- manager.mount(action.key, action.children);
81
- break;
82
- case "update":
83
- manager.update(action.key, action.children);
84
- break;
85
- case "unmount":
86
- manager.unmount(action.key);
87
- break;
88
- }
89
- }
90
- }
91
- }
92
- render() {
93
- return (React.createElement(PortalContext.Provider, { value: {
94
- mount: this.mount,
95
- update: this.update,
96
- unmount: this.unmount,
97
- } },
98
- React.createElement(View, { style: styles.container, collapsable: false, pointerEvents: "box-none" }, this.props.children),
99
- React.createElement(PortalManager, { ref: this.setManager })));
100
- }
101
- }
102
- PortalHost.displayName = "Portal.Host";
103
- export default PortalHost;
104
- const styles = StyleSheet.create({
105
- container: {
106
- flex: 1,
107
- },
108
- });
109
- //# sourceMappingURL=PortalHost.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PortalHost.js","sourceRoot":"","sources":["PortalHost.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAiB5C,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,CAAC,aAAa,CAAgB,IAAW,CAAC,CAAC;AAE7E;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAqB,UAAW,SAAQ,KAAK,CAAC,SAAgB;IAA9D;;QAyBU,eAAU,GAAG,CAAC,OAAyC,EAAE,EAAE;YACjE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACzB,CAAC,CAAC;QAEM,UAAK,GAAG,CAAC,QAAyB,EAAE,EAAE;YAC5C,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;YAE3B,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;gBACjB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;YACpC,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;YACpD,CAAC;YAED,OAAO,GAAG,CAAC;QACb,CAAC,CAAC;Q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
4
- * Portal host is the component which actually renders all Portals.
5
- */
6
- export default class PortalManager extends React.PureComponent {
7
- constructor() {
8
- super(...arguments);
9
- this.state = {
10
- portals: [],
11
- };
12
- this.mount = (key, children) => {
13
- this.setState((state) => ({
14
- portals: [...state.portals, { key, children }],
15
- }));
16
- };
17
- this.update = (key, children) => this.setState((state) => ({
18
- portals: state.portals.map((item) => {
19
- if (item.key === key) {
20
- return { ...item, children };
21
- }
22
- return item;
23
- }),
24
- }));
25
- this.unmount = (key) => this.setState((state) => ({
26
- portals: state.portals.filter((item) => item.key !== key),
27
- }));
28
- }
29
- render() {
30
- return this.state.portals.map(({ key, children }) => (React.createElement(View, { key: key, collapsable: false /* Need collapsable=false here to clip the elevations, otherwise they appear above sibling components */, pointerEvents: "box-none", style: StyleSheet.absoluteFill }, children)));
31
- }
32
- }
33
- //# sourceMappingURL=PortalManager.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PortalManager.js","sourceRoot":"","sources":["PortalManager.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAShD;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,KAAK,CAAC,aAA4B;IAA7E;;QACE,UAAK,GAAU;YACb,OAAO,EAAE,EAAE;SACZ,CAAC;QAEF,UAAK,GAAG,CAAC,GAAW,EAAE,QAAyB,EAAE,EAAE;YACjD,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;gBACxB,OAAO,EAAE,CAAC,GAAG,KAAK,CAAC,OAAO,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC;aAC/C,CAAC,CAAC,CAAC;QACN,CAAC,CAAC;QAEF,WAAM,GAAG,CAAC,GAAW,EAAE,QAAyB,EAAE,EAAE,CAClD,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YACxB,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;gBAClC,IAAI,IAAI,CAAC,GAAG,KAAK,GAAG,EAAE,CAAC;oBACrB,OAAO,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,CAAC;gBAC/B,CAAC;gBACD,OAAO,IAAI,CAAC;YACd,CAAC,CAAC;SACH,CAAC,CAAC,CAAC;QAEN,YAAO,GAAG,CAAC,GAAW,EAAE,EAAE,CACxB,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YACxB,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC;SAC1D,CAAC,CAAC,CAAC;IAgBR,CAAC;IAdC,MAAM;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CACnD,oBAAC,IAAI,IACH,GAAG,EAAE,GAAG,EACR,WAAW,EACT,KAAK,CAAC,wGAAwG,EAEhH,aAAa,EAAC,UAAU,EACxB,KAAK,EAAE,UAAU,CAAC,YAAY,IAE7B,QAAQ,CACJ,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -1,23 +0,0 @@
1
- import React from "react";
2
- import { Pressable as NativePressable, } from "react-native";
3
- export default function Pressable({ children, disabled, onPress, activeOpacity = 0.8, disabledOpacity = 0.8, delayLongPress, hitSlop, androidRippleColor, androidRippleBorderless, androidRippleRadius, androidRippleForeground, style, ...props }) {
4
- return (React.createElement(NativePressable, { onPress: onPress, disabled: disabled, delayLongPress: delayLongPress ? delayLongPress : 500, hitSlop: hitSlop ? hitSlop : 8, style: ({ pressed }) => {
5
- return [
6
- {
7
- opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1,
8
- },
9
- style,
10
- ];
11
- }, android_ripple: androidRippleColor ||
12
- androidRippleBorderless ||
13
- androidRippleColor ||
14
- androidRippleForeground
15
- ? {
16
- radius: androidRippleRadius,
17
- borderless: androidRippleBorderless,
18
- color: androidRippleColor,
19
- foreground: androidRippleForeground,
20
- }
21
- : null, ...props }, children));
22
- }
23
- //# sourceMappingURL=Pressable.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Pressable.js","sourceRoot":"","sources":["Pressable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,SAAS,IAAI,eAAe,GAI7B,MAAM,cAAc,CAAC;AAYtB,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,aAAa,GAAG,GAAG,EACnB,eAAe,GAAG,GAAG,EACrB,cAAc,EACd,OAAO,EACP,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,EACnB,uBAAuB,EACvB,KAAK,EACL,GAAG,KAAK,EACF;IACN,OAAO,CACL,oBAAC,eAAe,IACd,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,EACrD,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAC9B,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;YACrB,OAAO;gBACL;oBACE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;iBAClE;gBACD,KAAK;aACN,CAAC;QACJ,CAAC,EACD,cAAc,EACZ,kBAAkB;YAClB,uBAAuB;YACvB,kBAAkB;YAClB,uBAAuB;YACrB,CAAC,CAAC;gBACE,MAAM,EAAE,mBAAmB;gBAC3B,UAAU,EAAE,uBAAuB;gBACnC,KAAK,EAAE,kBAAkB;gBACzB,UAAU,EAAE,uBAAuB;aACpC;YACH,CAAC,CAAC,IAAI,KAEN,KAAK,IAER,QAAQ,CACO,CACnB,CAAC;AACJ,CAAC"}
@@ -1,103 +0,0 @@
1
- import React from "react";
2
- import Svg, { Path } from "react-native-svg";
3
- import { View } from "react-native";
4
- import Animated, { useAnimatedProps, useSharedValue, withTiming, } from "react-native-reanimated";
5
- import { DEFAULT_ANIMATION_DURATION, } from "../ProgressCommon";
6
- export const AnimatedPath = Animated.createAnimatedComponent(Path);
7
- export const CircularProgress = ({ theme, minimumValue = 0, maximumValue = 100, value = minimumValue, thickness = 10, trackThickness = thickness, color = theme.colors.branding.primary, trackColor = theme.colors.border.base, trackOpacity = 1, showTrack = true, animationDuration = DEFAULT_ANIMATION_DURATION, isAnimated = true, lineCap = "round", trackLineCap = lineCap, dashWidth, trackDashWidth, dashGap, trackDashGap, dashOffset, trackDashOffset, customDashArray, trackCustomDashArray, onFullPathWidth, startPosition = "top", style, testID, }) => {
8
- const [svgContainerWidth, setSvgContainerWidth] = React.useState(0);
9
- const [circumfrence, setCircumefrence] = React.useState(0);
10
- const dashArray = dashWidth !== undefined
11
- ? `${dashWidth} ${dashGap || dashWidth}`
12
- : undefined;
13
- const trackDashArray = trackDashWidth !== undefined
14
- ? `${trackDashWidth} ${trackDashGap || trackDashWidth}`
15
- : undefined;
16
- const maxThickness = Math.max(thickness, trackThickness);
17
- const thicknessOffset = maxThickness / 2; // This offset guarantees nothing is cut off by view bounds
18
- const radius = svgContainerWidth / 2;
19
- const c = 2 * Math.PI * radius;
20
- if (c !== circumfrence) {
21
- setCircumefrence(c);
22
- }
23
- const startAngle = React.useMemo(() => {
24
- switch (startPosition) {
25
- case "top":
26
- return 0;
27
- case "right":
28
- return 90;
29
- case "bottom":
30
- return 180;
31
- case "left":
32
- return 270;
33
- }
34
- }, [startPosition]);
35
- const currentFillPercentage = (value - minimumValue) / (maximumValue - minimumValue);
36
- const currentAngle = useSharedValue(startAngle);
37
- const progressPathAnimatedProps = useAnimatedProps(() => {
38
- const isBelowMinAngle = currentAngle.value <= startAngle;
39
- return {
40
- d: circlePath(radius, radius, radius - thicknessOffset, startAngle, Math.min(currentAngle.value, startAngle + 360) //Prevents going beyond the max angle
41
- ),
42
- strokeOpacity: isBelowMinAngle ? 0.0 : 1.0,
43
- };
44
- });
45
- React.useEffect(() => {
46
- currentAngle.value = withTiming(startAngle + currentFillPercentage * 360, {
47
- duration: isAnimated ? animationDuration : 0,
48
- });
49
- }, [
50
- value,
51
- currentFillPercentage,
52
- animationDuration,
53
- currentAngle,
54
- maximumValue,
55
- minimumValue,
56
- isAnimated,
57
- startAngle,
58
- ]);
59
- React.useEffect(() => {
60
- onFullPathWidth === null || onFullPathWidth === void 0 ? void 0 : onFullPathWidth(circumfrence);
61
- }, [circumfrence, onFullPathWidth]);
62
- return (React.createElement(View, { onLayout: (event) => {
63
- const width = event.nativeEvent.layout.width;
64
- setSvgContainerWidth(width);
65
- }, style: [
66
- {
67
- height: svgContainerWidth,
68
- },
69
- style,
70
- ] },
71
- React.createElement(Svg, { testID: testID !== null && testID !== void 0 ? testID : "circular-progress-component", style: { flex: 1 } },
72
- showTrack && (React.createElement(Path, { d: circlePath(radius, radius, radius - thicknessOffset, startAngle, startAngle + 360), stroke: trackColor, strokeWidth: trackThickness, strokeOpacity: trackOpacity, strokeLinecap: trackLineCap, strokeDasharray: trackCustomDashArray || trackDashArray, strokeDashoffset: trackDashOffset, fill: "rgba(0,0,0,0)" })),
73
- React.createElement(AnimatedPath, { animatedProps: progressPathAnimatedProps, stroke: color, strokeWidth: thickness, strokeLinecap: lineCap, strokeDasharray: customDashArray || dashArray, strokeDashoffset: dashOffset, fill: "rgba(0,0,0,0)", onPress: () => { } }))));
74
- };
75
- // From: https://github.com/bartgryszko/react-native-circular-progress/blob/a93b501aea40306126c8ede72089741eead52308/src/CircularProgress.js#L15
76
- function circlePath(x, y, radius, startAngle, endAngle) {
77
- "worklet"; // Reanimated worklet to be runnable on the UI thread
78
- function polarToCartesian(centerX, centerY, radius, angleInDegrees) {
79
- const angleInRadians = ((angleInDegrees - 90) * Math.PI) / 180.0;
80
- return {
81
- x: centerX + radius * Math.cos(angleInRadians),
82
- y: centerY + radius * Math.sin(angleInRadians),
83
- };
84
- }
85
- const start = polarToCartesian(x, y, radius, endAngle * 0.9999);
86
- const end = polarToCartesian(x, y, radius, startAngle);
87
- const largeArcFlag = endAngle - startAngle <= 180 ? "0" : "1";
88
- const d = [
89
- "M",
90
- start.x,
91
- start.y,
92
- "A",
93
- radius,
94
- radius,
95
- 0,
96
- largeArcFlag,
97
- 0,
98
- end.x,
99
- end.y,
100
- ];
101
- return d.join(" ");
102
- }
103
- //# sourceMappingURL=CircularProgress.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CircularProgress.js","sourceRoot":"","sources":["CircularProgress.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,EAAE,EAAE,IAAI,EAAa,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,QAAQ,EAAE,EACf,gBAAgB,EAChB,cAAc,EACd,UAAU,GACX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,0BAA0B,GAG3B,MAAM,mBAAmB,CAAC;AAE3B,MAAM,CAAC,MAAM,YAAY,GAAG,QAAQ,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC;AAEnE,MAAM,CAAC,MAAM,gBAAgB,GAEzB,CAAC,EACH,KAAK,EACL,YAAY,GAAG,CAAC,EAChB,YAAY,GAAG,GAAG,EAClB,KAAK,GAAG,YAAY,EACpB,SAAS,GAAG,EAAE,EACd,cAAc,GAAG,SAAS,EAC1B,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,EACrC,UAAU,GAAG,KAAK,CAAC,M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,CAAC,qDAAqD;IAEhE,SAAS,gBAAgB,CACvB,OAAe,EACf,OAAe,EACf,MAAc,EACd,cAAsB;QAEtB,MAAM,cAAc,GAAG,CAAC,CAAC,cAAc,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC;QACjE,OAAO;YACL,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC;YAC9C,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC;SAC/C,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,GAAG,MAAM,CAAC,CAAC;IAChE,MAAM,GAAG,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;IACvD,MAAM,YAAY,GAAG,QAAQ,GAAG,UAAU,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;IAC9D,MAAM,CAAC,GAAG;QACR,GAAG;QACH,KAAK,CAAC,CAAC;QACP,KAAK,CAAC,CAAC;QACP,GAAG;QACH,MAAM;QACN,MAAM;QACN,CAAC;QACD,YAAY;QACZ,CAAC;QACD,GAAG,CAAC,CAAC;QACL,GAAG,CAAC,CAAC;KACN,CAAC;IACF,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACrB,CAAC"}
@@ -1,14 +0,0 @@
1
- import React from "react";
2
- import IndeterminateProgress from "../IndeterminateProgress";
3
- import { CircularProgress as CircularProgressComponent } from "./CircularProgress";
4
- import { withTheme } from "@draftbit/theme";
5
- const CircularProgress = (props) => {
6
- if (props.indeterminate) {
7
- return (React.createElement(IndeterminateProgress, { ProgressComponent: CircularProgressComponent, ...props }));
8
- }
9
- else {
10
- return React.createElement(CircularProgressComponent, { ...props });
11
- }
12
- };
13
- export default withTheme(CircularProgress);
14
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,qBAAqB,MAAM,0BAA0B,CAAC;AAM7D,OAAO,EAAE,gBAAgB,IAAI,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AACnF,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,gBAAgB,GAElB,CAAC,KAAK,EAAE,EAAE;IACZ,IAAI,KAAK,CAAC,aAAa,EAAE,CAAC;QACxB,OAAO,CACL,oBAAC,qBAAqB,IACpB,iBAAiB,EACf,yBAAwE,KAEtE,KAAK,GACT,CACH,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,OAAO,oBAAC,yBAAyB,OAAK,KAAK,GAAI,CAAC;IAClD,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC,gBAAgB,CAAC,CAAC"}
@@ -1,39 +0,0 @@
1
- import React from "react";
2
- import { runOnJS, useAnimatedReaction, useSharedValue, withTiming, } from "react-native-reanimated";
3
- import { DEFAULT_ANIMATION_DURATION, } from "./ProgressCommon";
4
- const IndeterminateProgress = ({ ProgressComponent, ...rest }) => {
5
- const [pathWidth, setPathWidth] = React.useState(0);
6
- const [value, setValue] = React.useState(0);
7
- const [dashOffset, setDashOffset] = React.useState(0);
8
- const animationDuration = rest.animationDuration || DEFAULT_ANIMATION_DURATION;
9
- const currentOffset = useSharedValue(0);
10
- // dashOffset animation done through state due to it not being a 'native' prop that reanimated can animate on the native thread
11
- useAnimatedReaction(() => currentOffset.value, (result) => runOnJS(setDashOffset)(result));
12
- const repeatIndeterminateAnimation = React.useCallback(() => {
13
- if (value === 0) {
14
- setValue(100);
15
- currentOffset.value = withTiming(pathWidth, {
16
- duration: animationDuration,
17
- });
18
- }
19
- else {
20
- setValue(0);
21
- currentOffset.value = withTiming(0, {
22
- duration: animationDuration,
23
- });
24
- }
25
- }, [currentOffset, value, animationDuration, pathWidth]);
26
- React.useEffect(() => {
27
- const timeout = setTimeout(() => {
28
- repeatIndeterminateAnimation();
29
- }, animationDuration);
30
- return () => clearTimeout(timeout);
31
- }, [animationDuration, repeatIndeterminateAnimation]);
32
- return (React.createElement(ProgressComponent, { ...rest, testID: rest.testID || "indeterminate-progress", onFullPathWidth: (width) => {
33
- var _a;
34
- setPathWidth(width);
35
- (_a = rest.onFullPathWidth) === null || _a === void 0 ? void 0 : _a.call(rest, width);
36
- }, dashOffset: dashOffset, dashGap: pathWidth / 2, dashWidth: pathWidth / 2, animationDuration: animationDuration, minimumValue: 0, maximumValue: 100, value: 100 }));
37
- };
38
- export default IndeterminateProgress;
39
- //# sourceMappingURL=IndeterminateProgress.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IndeterminateProgress.js","sourceRoot":"","sources":["IndeterminateProgress.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,OAAO,EACP,mBAAmB,EACnB,cAAc,EACd,UAAU,GACX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,0BAA0B,GAE3B,MAAM,kBAAkB,CAAC;AAM1B,MAAM,qBAAqB,GAAyC,CAAC,EACnE,iBAAiB,EACjB,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACpD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC5C,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACtD,MAAM,iBAAiB,GACrB,IAAI,CAAC,iBAAiB,IAAI,0BAA0B,CAAC;IAEv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