@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "54.0.3",
3
+ "version": "54.0.4-6c949a.2+6c949af",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "types": "lib/typescript/src/index.d.ts",
@@ -25,7 +25,9 @@
25
25
  "android"
26
26
  ],
27
27
  "publishConfig": {
28
- "access": "public"
28
+ "access": "public",
29
+ "registry": "https://registry.npmjs.org/",
30
+ "provenance": true
29
31
  },
30
32
  "repository": {
31
33
  "type": "git",
@@ -40,7 +42,7 @@
40
42
  "homepage": "https://github.com/draftbit/react-native-jigsaw#readme",
41
43
  "dependencies": {
42
44
  "@draftbit/react-theme-provider": "^2.1.1",
43
- "@draftbit/theme": "54.0.3",
45
+ "@draftbit/theme": "^54.0.4-6c949a.2+6c949af",
44
46
  "@emotion/react": "^11.13.5",
45
47
  "@emotion/styled": "^11.13.5",
46
48
  "@expo/vector-icons": "^15.0.3",
@@ -120,5 +122,5 @@
120
122
  ],
121
123
  "testEnvironment": "node"
122
124
  },
123
- "gitHead": "eceef38dbc6dc703d1f555fa2cdfd2cebd82a8ef"
125
+ "gitHead": "6c949afa2c601852d436883343b61091d025d849"
124
126
  }
package/src/Provider.js DELETED
@@ -1,10 +0,0 @@
1
- import React from "react";
2
- import PortalHost from "./components/Portal/PortalHost";
3
- import { ThemeProvider } from "@draftbit/theme";
4
- export default class Provider extends React.Component {
5
- render() {
6
- return (React.createElement(ThemeProvider, { themes: this.props.themes, breakpoints: this.props.breakpoints, initialThemeName: this.props.initialThemeName },
7
- React.createElement(PortalHost, null, this.props.children)));
8
- }
9
- }
10
- //# sourceMappingURL=Provider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Provider.js","sourceRoot":"","sources":["Provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,gCAAgC,CAAC;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAShD,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,KAAK,CAAC,SAAwB;IAClE,MAAM;QACJ,OAAO,CACL,oBAAC,aAAa,IACZ,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EACzB,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,gBAAgB,EAAE,IAAI,CAAC,KAAK,CAAC,gBAAgB;YAE7C,oBAAC,UAAU,QAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAc,CAChC,CACjB,CAAC;IACJ,CAAC;CACF"}
@@ -1,51 +0,0 @@
1
- import * as React from "react";
2
- import { View, StyleSheet, Pressable, } from "react-native";
3
- import Text from "./Text";
4
- import { withTheme } from "@draftbit/theme";
5
- import { extractStyles } from "../utilities";
6
- const AccordionGroup = ({ label, expanded: expandedProp = false, openColor, closedColor, caretColor: caretColorProp, caretSize = 24, icon, iconSize = 24, style, children, theme, Icon, }) => {
7
- const [expanded, setExpanded] = React.useState(expandedProp);
8
- const { textStyles, viewStyles } = extractStyles(style);
9
- const expandedColor = openColor || theme.colors.branding.primary;
10
- const collapsedColor = closedColor || theme.colors.branding.primary;
11
- const labelColor = expanded ? expandedColor : collapsedColor;
12
- const caretColor = caretColorProp || labelColor;
13
- React.useEffect(() => {
14
- if (expandedProp !== expanded) {
15
- setExpanded(expandedProp);
16
- }
17
- // eslint-disable-next-line react-hooks/exhaustive-deps
18
- }, [expandedProp]);
19
- const handlePressAction = () => {
20
- setExpanded(!expanded);
21
- };
22
- return (React.createElement(React.Fragment, null,
23
- React.createElement(Pressable, { style: [styles.row, viewStyles], onPress: handlePressAction, accessibilityRole: "button" },
24
- icon ? (React.createElement(Icon, { name: icon, size: iconSize, color: labelColor, style: styles.icon })) : null,
25
- React.createElement(View, { style: styles.content },
26
- React.createElement(Text, { selectable: false, style: [
27
- textStyles,
28
- {
29
- color: labelColor,
30
- },
31
- ] }, label)),
32
- React.createElement(Icon, { name: expanded
33
- ? "MaterialIcons/keyboard-arrow-up"
34
- : "MaterialIcons/keyboard-arrow-down", color: caretColor, size: caretSize })),
35
- expanded ? children : null));
36
- };
37
- const styles = StyleSheet.create({
38
- row: {
39
- flexDirection: "row",
40
- alignItems: "center",
41
- },
42
- content: {
43
- flex: 1,
44
- justifyContent: "center",
45
- },
46
- icon: {
47
- marginRight: 8,
48
- },
49
- });
50
- export default withTheme(AccordionGroup);
51
- //# sourceMappingURL=AccordionGroup.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AccordionGroup.js","sourceRoot":"","sources":["AccordionGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,IAAI,EACJ,UAAU,EAGV,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAgB7C,MAAM,cAAc,GAAG,CAAC,EACtB,KAAK,EACL,QAAQ,EAAE,YAAY,GAAG,KAAK,EAC9B,SAAS,EACT,WAAW,EACX,UAAU,EAAE,cAAc,EAC1B,SAAS,GAAG,EAAE,EACd,IAAI,EACJ,QAAQ,GAAG,EAAE,EACb,KAAK,EACL,QAAQ,EACR,KAAK,EACL,IAAI,GACgB,EAAE,EAAE;IACxB,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAU,YAAY,CAAC,CAAC;IACtE,M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,IAAI,EACF,QAAQ;oBACN,CAAC,CAAC,iCAAiC;oBACnC,CAAC,CAAC,mCAAmC,EAEzC,KAAK,EAAE,UAAU,EACjB,IAAI,EAAE,SAAS,GACf,CACQ;QACX,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAC1B,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,GAAG,EAAE;QACH,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;KACrB;IACD,OAAO,EAAE;QACP,IAAI,EAAE,CAAC;QACP,cAAc,EAAE,QAAQ;KACzB;IACD,IAAI,EAAE;QACJ,WAAW,EAAE,CAAC;KACf;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC,cAAc,CAAC,CAAC"}
@@ -1,46 +0,0 @@
1
- import React from "react";
2
- import { View, StyleSheet } from "react-native";
3
- import Portal from "../Portal/Portal";
4
- import Touchable from "../Touchable";
5
- import ActionSheetCancel from "./ActionSheetCancel";
6
- const ActionSheet = ({ visible = false, onClose, children }) => {
7
- return visible ? (React.createElement(Portal, null,
8
- React.createElement(Touchable, { style: styles.wrapper, onPress: onClose },
9
- React.createElement(View, { style: styles.overlay }),
10
- React.createElement(View, { style: styles.groupWrapper },
11
- React.createElement(View, { style: styles.group }, React.Children.toArray(children).filter((child) => (child === null || child === void 0 ? void 0 : child.type) !== ActionSheetCancel)),
12
- React.createElement(View, { style: styles.group }, React.Children.toArray(children).filter((child) => child.type === ActionSheetCancel)))))) : (React.createElement(React.Fragment, null));
13
- };
14
- const styles = StyleSheet.create({
15
- wrapper: {
16
- flex: 1,
17
- display: "flex",
18
- flexDirection: "column",
19
- },
20
- overlay: {
21
- position: "absolute",
22
- top: 0,
23
- left: 0,
24
- right: 0,
25
- bottom: 0,
26
- backgroundColor: "#000000",
27
- opacity: 0.3,
28
- },
29
- groupWrapper: {
30
- flex: 1,
31
- flexDirection: "column",
32
- justifyContent: "flex-end",
33
- display: "flex",
34
- marginBottom: 25,
35
- },
36
- group: {
37
- display: "flex",
38
- flexDirection: "column",
39
- borderRadius: 10,
40
- marginHorizontal: 7,
41
- marginVertical: 2.5,
42
- overflow: "hidden",
43
- },
44
- });
45
- export default ActionSheet;
46
- //# sourceMappingURL=ActionSheet.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ActionSheet.js","sourceRoot":"","sources":["ActionSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AAQpD,MAAM,WAAW,GAAG,CAAC,EAAE,OAAO,GAAG,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAS,EAAE,EAAE;IACpE,OAAO,OAAO,CAAC,CAAC,CAAC,CACf,oBAAC,MAAM;QACL,oBAAC,SAAS,IAAC,KAAK,EAAE,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO;YAChD,oBAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,OAAO,GAAI;YAC/B,oBAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,YAAY;gBAC9B,oBAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,KAAK,IACtB,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CACtC,CAAC,KAAU,EAAE,EAAE,CAAC,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,MAAK,iBAAiB,CAClD,CACI;gBACP,oBAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,KAAK,IACtB,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CACtC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,iBAAiB,CACjD,CACI,CACF,CACG,CACL,CACV,CAAC,CAAC,CAAC,CACF,yCAAK,CACN,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,OAAO,EAAE;QACP,IAAI,EAAE,CAAC;QACP,OAAO,EAAE,MAAM;QACf,aAAa,EAAE,QAAQ;KACxB;IACD,OAAO,EAAE;QACP,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,CAAC;QACN,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,CAAC;QACT,eAAe,EAAE,SAAS;QAC1B,OAAO,EAAE,GAAG;KACb;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,CAAC;QACP,aAAa,EAAE,QAAQ;QACvB,cAAc,EAAE,UAAU;QAC1B,OAAO,EAAE,MAAM;QACf,YAAY,EAAE,EAAE;KACjB;IACD,KAAK,EAAE;QACL,OAAO,EAAE,MAAM;QACf,aAAa,EAAE,QAAQ;QACvB,YAAY,EAAE,EAAE;QAChB,gBAAgB,EAAE,CAAC;QACnB,cAAc,EAAE,GAAG;QACnB,QAAQ,EAAE,QAAQ;KACnB;CACF,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC"}
@@ -1,7 +0,0 @@
1
- import React from "react";
2
- import ActionSheetItem from "./ActionSheetItem";
3
- const ActionSheetCancel = ({ label = "Cancel", color, style, onPress, }) => {
4
- return (React.createElement(ActionSheetItem, { label: label, color: color || "#FF453A", style: style, onPress: onPress }));
5
- };
6
- export default ActionSheetCancel;
7
- //# sourceMappingURL=ActionSheetCancel.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ActionSheetCancel.js","sourceRoot":"","sources":["ActionSheetCancel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAShD,MAAM,iBAAiB,GAA6C,CAAC,EACnE,KAAK,GAAG,QAAQ,EAChB,KAAK,EACL,KAAK,EACL,OAAO,GACR,EAAE,EAAE;IACH,OAAO,CACL,oBAAC,eAAe,IACd,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,IAAI,SAAS,EACzB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,GAChB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -1,31 +0,0 @@
1
- import React from "react";
2
- import { Text, StyleSheet, TouchableOpacity, } from "react-native";
3
- import { extractStyles } from "../../utilities";
4
- const ActionSheetItem = ({ label, style, color, onPress, activeOpacity = 0.7, }) => {
5
- const { textStyles, viewStyles } = extractStyles(style);
6
- return (React.createElement(TouchableOpacity, { activeOpacity: activeOpacity, style: [styles.wrapper, viewStyles], onPress: onPress },
7
- React.createElement(Text, { style: [styles.label, textStyles, { color }] }, label)));
8
- };
9
- const styles = StyleSheet.create({
10
- wrapper: {
11
- borderBottomWidth: StyleSheet.hairlineWidth,
12
- borderBottomColor: "#CCCCCC",
13
- backgroundColor: "#F1F1F1",
14
- minHeight: 50,
15
- overflow: "hidden",
16
- display: "flex",
17
- justifyContent: "center",
18
- },
19
- label: {
20
- fontSize: 16,
21
- textAlign: "center",
22
- color: "#0A84FF",
23
- fontWeight: "500",
24
- overflow: "hidden",
25
- paddingHorizontal: 20,
26
- paddingVertical: 10,
27
- alignSelf: "center",
28
- },
29
- });
30
- export default ActionSheetItem;
31
- //# sourceMappingURL=ActionSheetItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ActionSheetItem.js","sourceRoot":"","sources":["ActionSheetItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,IAAI,EACJ,UAAU,EAEV,gBAAgB,GAGjB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAUhD,MAAM,eAAe,GAA6C,CAAC,EACjE,KAAK,EACL,KAAK,EACL,KAAK,EACL,OAAO,EACP,aAAa,GAAG,GAAG,GACpB,EAAE,EAAE;IACH,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IACxD,OAAO,CACL,oBAAC,gBAAgB,IACf,aAAa,EAAE,aAAa,EAC5B,KAAK,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,EACnC,OAAO,EAAE,OAAO;QAEhB,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,CAAC,IAAG,KAAK,CAAQ,CACjD,CACpB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,OAAO,EAAE;QACP,iBAAiB,EAAE,UAAU,CAAC,aAAa;QAC3C,iBAAiB,EAAE,SAAS;QAC5B,eAAe,EAAE,SAAS;QAC1B,SAAS,EAAE,EAAE;QACb,QAAQ,EAAE,QAAQ;QAClB,OAAO,EAAE,MAAM;QACf,cAAc,EAAE,QAAQ;KACzB;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,QAAQ;QACnB,KAAK,EAAE,SAAS;QAChB,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,QAAQ;QAClB,iBAAiB,EAAE,EAAE;QACrB,eAAe,EAAE,EAAE;QACnB,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAC;AAEH,eAAe,eAAe,CAAC"}
@@ -1,4 +0,0 @@
1
- export { default as ActionSheet } from "./ActionSheet";
2
- export { default as ActionSheetItem } from "./ActionSheetItem";
3
- export { default as ActionSheetCancel } from "./ActionSheetCancel";
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,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -1,19 +0,0 @@
1
- import React from "react";
2
- import { View, StyleSheet, } from "react-native";
3
- const AspectRatio = (props) => {
4
- const [layout, setLayout] = React.useState(null);
5
- const { aspectRatio = 1, ...inputStyle } = StyleSheet.flatten(props.style) || {};
6
- const style = [inputStyle, { aspectRatio }];
7
- if (layout) {
8
- const { width = 0, height = 0 } = layout;
9
- if (width === 0) {
10
- style.push({ width: height * (1 / +aspectRatio), height });
11
- }
12
- else {
13
- style.push({ width, height: width * (1 / +aspectRatio) });
14
- }
15
- }
16
- return (React.createElement(View, { ...props, style: style, onLayout: ({ nativeEvent: { layout: l } }) => setLayout(l) }, props.children));
17
- };
18
- export default AspectRatio;
19
- //# sourceMappingURL=AspectRatio.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AspectRatio.js","sourceRoot":"","sources":["AspectRatio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,IAAI,EACJ,UAAU,GAIX,MAAM,cAAc,CAAC;AAOtB,MAAM,WAAW,GAA6C,CAAC,KAAK,EAAE,EAAE;IACtE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAyB,IAAI,CAAC,CAAC;IACzE,MAAM,EAAE,WAAW,GAAG,CAAC,EAAE,GAAG,UAAU,EAAE,GACtC,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;IACxC,MAAM,KAAK,GAAG,CAAC,UAAU,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;IAE5C,IAAI,MAAM,EAAE,CAAC;QACX,MAAM,EAAE,KAAK,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,GAAG,MAAM,CAAC;QACzC,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;YAChB,KAAK,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;QAC7D,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QAC5D,CAAC;IACH,CAAC;IACD,OAAO,CACL,oBAAC,IAAI,OACC,KAAK,EACT,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,IAEzD,KAAK,CAAC,QAAQ,CACV,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1,76 +0,0 @@
1
- import React from "react";
2
- import { StyleSheet, Dimensions, } from "react-native";
3
- import BottomSheetComponent, { BottomSheetScrollView, } from "@gorhom/bottom-sheet";
4
- import { useTheme } from "@draftbit/theme";
5
- import { extractPercentNumber, useDeepCompareMemo } from "../../utilities";
6
- const windowHeight = Dimensions.get("window").height;
7
- // Clarification:
8
- // Input of snap points is sorted top -> bottom where each value represents distance from top
9
- // Implementation using `@gorhom/bottom-sheet` is sorted bottom -> top where each value represents distance from bottom
10
- const BottomSheet = React.forwardRef(({ snapPoints: snapPointsProp, topSnapPosition = "10%", middleSnapPosition = "50%", bottomSnapPosition = "80%", initialSnapIndex, initialSnapPosition = "bottom", showHandle = true, handleColor, topBorderRadius = 20, borderWidth = 1, borderColor, enableDynamicSizing = true, onSettle, style, children, ...rest }, ref) => {
11
- const theme = useTheme();
12
- const backgroundColor = (style === null || style === void 0 ? void 0 : style.backgroundColor) || theme.colors.background.base;
13
- const snapPoints = snapPointsProp !== null && snapPointsProp !== void 0 ? snapPointsProp : [
14
- topSnapPosition,
15
- middleSnapPosition,
16
- bottomSnapPosition,
17
- ];
18
- const mappedSnapPoints = useDeepCompareMemo(() => convertSnapPointsForNewImplementation(snapPoints), snapPoints);
19
- const getSnapIndexFromPosition = (position) => {
20
- switch (position) {
21
- case "bottom":
22
- return 0;
23
- case "middle":
24
- return 1;
25
- case "top":
26
- return 2;
27
- }
28
- };
29
- return (React.createElement(BottomSheetComponent, { ref: ref, enableDynamicSizing: enableDynamicSizing, snapPoints: mappedSnapPoints, index: initialSnapIndex !== undefined
30
- ? mappedSnapPoints.length - initialSnapIndex - 1
31
- : getSnapIndexFromPosition(initialSnapPosition), handleIndicatorStyle: [
32
- { backgroundColor: handleColor !== null && handleColor !== void 0 ? handleColor : theme.colors.border.base },
33
- !showHandle ? { display: "none" } : {},
34
- ], backgroundStyle: {
35
- backgroundColor,
36
- borderTopLeftRadius: topBorderRadius,
37
- borderTopRightRadius: topBorderRadius,
38
- borderWidth,
39
- borderColor: borderColor !== null && borderColor !== void 0 ? borderColor : theme.colors.border.base,
40
- }, onChange: (index) =>
41
- // Convert bottom-sheet index to match our top-to-bottom ordering
42
- // When dynamic sizing is enabled, we don't need to subtract 1 since an extra snap point may be added
43
- enableDynamicSizing
44
- ? onSettle === null || onSettle === void 0 ? void 0 : onSettle(mappedSnapPoints.length - index)
45
- : onSettle === null || onSettle === void 0 ? void 0 : onSettle(mappedSnapPoints.length - index - 1) },
46
- React.createElement(BottomSheetScrollView, { contentContainerStyle: [styles.contentContainerStyle, style], ...rest }, children)));
47
- });
48
- // @gorhom/bottom-sheet has a different format for snap points and requires some manipulation
49
- function convertSnapPointsForNewImplementation(snapPoints) {
50
- // Older implementation required snap points sorted top -> bottom, new library requires bottom -> top
51
- const reversedSnapPoints = [...snapPoints].reverse();
52
- // Older implementation required snap points as distance from top, new library requires them as distance from bottom
53
- return reversedSnapPoints.map((point) => {
54
- if (typeof point === "string") {
55
- const percentNumber = extractPercentNumber(point);
56
- if (percentNumber !== undefined) {
57
- return `${100 - percentNumber}%`;
58
- }
59
- return point;
60
- }
61
- else if (typeof point === "number") {
62
- return windowHeight - point;
63
- }
64
- else {
65
- return point;
66
- }
67
- });
68
- }
69
- const styles = StyleSheet.create({
70
- contentContainerStyle: {
71
- paddingHorizontal: 16,
72
- paddingVertical: 10,
73
- },
74
- });
75
- export default BottomSheet;
76
- //# sourceMappingURL=BottomSheet.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BottomSheet.js","sourceRoot":"","sources":["BottomSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,UAAU,EAIV,UAAU,GACX,MAAM,cAAc,CAAC;AAEtB,OAAO,oBAAoB,EAAE,EAC3B,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAI3E,MAAM,YAAY,GAAG,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC;AAyBrD,iBAAiB;AACjB,6FAA6F;AAC7F,uHAAuH;AACvH,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAClC,CACE,EACE,UAAU,EAAE,cAAc,EAC1B,eAAe,GAAG,KAAK,EACvB,kBAAkB,GAAG,KAAK,EAC1B,kBAAkB,GAAG,KAAK,EAC1B,gBAAgB,EAChB,mBAAmB,GAAG,QAAQ,EAC9B,UAAU,GAAG,IAAI,EACjB,WAAW,EACX,eAAe,GAAG,EAAE,EACpB,WAAW,GAAG,CAAC,EACf,WAAW,EACX,mBAAmB,GAAG,IAAI,EAC1B,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,GAAG,IAAI,EACR,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AAM,CAAC;IAC/B,qBAAqB,EAAE;QACrB,iBAAiB,EAAE,EAAE;QACrB,eAAe,EAAE,EAAE;KACpB;CACF,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC"}
@@ -1,2 +0,0 @@
1
- export { default as BottomSheet } from "./BottomSheet";
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC"}
@@ -1,119 +0,0 @@
1
- import * as React from "react";
2
- import { Text, Pressable, Platform, StyleSheet, ActivityIndicator, } from "react-native";
3
- import { withTheme } from "@draftbit/theme";
4
- const CONSTANTS = {
5
- baseHeight: 42,
6
- borderRadius: 4,
7
- padding: 8,
8
- icon: 24,
9
- };
10
- function Base({ Icon, icon, iconPosition = "left", iconSize = CONSTANTS.icon, title, loading, disabled, style, activeOpacity = 0.8, disabledOpacity = 0.8, ...props }) {
11
- const { color, fontFamily, fontWeight, fontSize, lineHeight, letterSpacing, textTransform, textAlign, textDecorationLine, textDecorationColor, textDecorationStyle, ...buttonStyles } = StyleSheet.flatten(style || {});
12
- const titleStyles = {
13
- color,
14
- fontFamily,
15
- fontWeight,
16
- fontSize,
17
- lineHeight,
18
- letterSpacing,
19
- textTransform,
20
- textAlign,
21
- textDecorationLine,
22
- textDecorationColor,
23
- textDecorationStyle,
24
- };
25
- if (textAlign === "left") {
26
- buttonStyles.justifyContent = "flex-start";
27
- }
28
- if (textAlign === "right") {
29
- buttonStyles.justifyContent = "flex-end";
30
- }
31
- return (React.createElement(Pressable, { disabled: disabled || loading, style: ({ pressed }) => {
32
- return [
33
- styles.base,
34
- {
35
- opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1,
36
- },
37
- buttonStyles,
38
- ];
39
- }, ...props },
40
- loading ? (React.createElement(ActivityIndicator, { size: "small", color: color, style: styles.loading })) : null,
41
- iconPosition === "left" && icon && !loading ? (React.createElement(Icon, { name: icon, color: color, style: styles.icon, size: iconSize })) : null,
42
- React.createElement(Text, { style: titleStyles }, title),
43
- iconPosition === "right" && icon && !loading ? (React.createElement(Icon, { name: icon, color: color, style: styles.icon, size: iconSize })) : null));
44
- }
45
- const Solid = ({ style, theme, ...props }) => {
46
- return (React.createElement(Base, { style: [
47
- {
48
- //@ts-ignore
49
- color: "#FFF",
50
- borderRadius: 8,
51
- backgroundColor: theme.colors.branding.primary,
52
- },
53
- style,
54
- ], ...props }));
55
- };
56
- /**
57
- * @deprecated DEPRECATED: Use Button
58
- */
59
- const ButtonSolid = withTheme(Solid);
60
- export { ButtonSolid };
61
- const Button = withTheme(Solid);
62
- export { Button };
63
- const Outline = ({ style, theme, ...props }) => {
64
- return (React.createElement(Base, { style: [
65
- styles.outline,
66
- {
67
- borderRadius: 8,
68
- borderColor: theme.colors.branding.primary,
69
- //@ts-ignore
70
- color: theme.colors.branding.primary,
71
- },
72
- style,
73
- ], ...props }));
74
- };
75
- /**
76
- * @deprecated DEPRECATED: Use Button
77
- */
78
- const ButtonOutline = withTheme(Outline);
79
- export { ButtonOutline };
80
- const styles = StyleSheet.create({
81
- base: {
82
- position: "relative",
83
- flexDirection: "row",
84
- alignItems: "center",
85
- justifyContent: "center",
86
- minHeight: CONSTANTS.baseHeight,
87
- paddingHorizontal: 12,
88
- fontFamily: "System",
89
- fontWeight: "700",
90
- ...Platform.select({
91
- web: {
92
- cursor: "pointer",
93
- userSelect: "none",
94
- },
95
- }),
96
- },
97
- outline: {
98
- backgroundColor: "transparent",
99
- borderWidth: 1,
100
- },
101
- loading: {
102
- marginRight: 6,
103
- },
104
- icon: {
105
- ...Platform.select({
106
- web: {
107
- marginTop: 1,
108
- marginRight: 4,
109
- alignSelf: "center",
110
- },
111
- default: {
112
- marginBottom: 2,
113
- marginRight: 4,
114
- alignSelf: "center",
115
- },
116
- }),
117
- },
118
- });
119
- //# sourceMappingURL=Button.js.map
@@ -1 +0,0 @@
1
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C;KACH;IACD,OAAO,EAAE;QACP,eAAe,EAAE,aAAa;QAC9B,WAAW,EAAE,CAAC;KACf;IACD,OAAO,EAAE;QACP,WAAW,EAAE,CAAC;KACf;IACD,IAAI,EAAE;QACJ,GAAG,QAAQ,CAAC,MAAM,CAAC;YACjB,GAAG,EAAE;gBACH,SAAS,EAAE,CAAC;gBACZ,WAAW,EAAE,CAAC;gBACd,SAAS,EAAE,QAAQ;aACpB;YACD,OAAO,EAAE;gBACP,YAAY,EAAE,CAAC;gBACf,WAAW,EAAE,CAAC;gBACd,SAAS,EAAE,QAAQ;aACpB;SACF,CAAC;KACH;CACF,CAAC,CAAC"}
@@ -1,63 +0,0 @@
1
- import * as React from "react";
2
- import { View, StyleSheet, Pressable, } from "react-native";
3
- import { useTheme } from "@draftbit/theme";
4
- import { usePrevious } from "../../hooks";
5
- const Checkbox = ({ Icon, status, disabled = false, onPress, onCheck, onUncheck, color, uncheckedColor, defaultValue, checkedIcon = "MaterialCommunityIcons/checkbox-marked", uncheckedIcon = "MaterialCommunityIcons/checkbox-blank-outline", size = 24, style, ...rest }) => {
6
- const [internalValue, setInternalValue] = React.useState(status || defaultValue || false);
7
- React.useEffect(() => {
8
- if (status != null) {
9
- setInternalValue(status);
10
- }
11
- }, [status]);
12
- // This special logic is to handle weird APIs like Airtable that return
13
- // true or undefined for a boolean
14
- const previousDefaultValue = usePrevious(defaultValue);
15
- React.useEffect(() => {
16
- if (defaultValue !== previousDefaultValue) {
17
- setInternalValue(Boolean(defaultValue));
18
- }
19
- }, [defaultValue, previousDefaultValue]);
20
- const { colors } = useTheme();
21
- const checkboxColor = internalValue
22
- ? color || colors.branding.primary
23
- : uncheckedColor || colors.branding.primary;
24
- const handlePress = () => {
25
- const newValue = !internalValue;
26
- setInternalValue(newValue);
27
- onPress === null || onPress === void 0 ? void 0 : onPress(newValue);
28
- if (newValue) {
29
- onCheck === null || onCheck === void 0 ? void 0 : onCheck();
30
- }
31
- if (!newValue) {
32
- onUncheck === null || onUncheck === void 0 ? void 0 : onUncheck();
33
- }
34
- };
35
- return (React.createElement(Pressable, { ...rest, onPress: handlePress, disabled: disabled, accessibilityState: { disabled }, accessibilityRole: "button", accessibilityLiveRegion: "polite", style: [styles.container, style, { width: size, height: size }] },
36
- React.createElement(Icon, { style: styles.icon, name: internalValue ? checkedIcon : uncheckedIcon, size: size, color: checkboxColor }),
37
- React.createElement(View, { style: [StyleSheet.absoluteFill, styles.fillContainer] },
38
- React.createElement(View, { style: [
39
- styles.fill,
40
- { opacity: disabled ? 0.5 : 1 },
41
- { borderColor: checkboxColor },
42
- ] }))));
43
- };
44
- const styles = StyleSheet.create({
45
- container: {
46
- borderRadius: 18,
47
- },
48
- fillContainer: {
49
- alignItems: "center",
50
- justifyContent: "center",
51
- },
52
- icon: {
53
- alignSelf: "center",
54
- },
55
- fill: {
56
- borderRadius: 5,
57
- width: 30,
58
- height: 30,
59
- alignSelf: "center",
60
- },
61
- });
62
- export default Checkbox;
63
- //# sourceMappingURL=Checkbox.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,IAAI,EACJ,UAAU,EACV,SAAS,GAIV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAG3C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAiB1C,MAAM,QAAQ,GAAwD,CAAC,EACrE,IAAI,EACJ,MAAM,EACN,QAAQ,GAAG,KAAK,EAChB,OAAO,EACP,OAAO,EACP,SAAS,EACT,KAAK,EACL,cAAc,EACd,YAAY,EACZ,WAAW,GAAG,wCAAwC,EACtD,aAAa,GAAG,+CAA+C,EAC/D,IAAI,GAAG,EAAE,EACT,KAAK,EACL,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,CAAC,aAAa,EAAE,gBA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,EAAE,WAAW,EACpB,QAAQ,EAAE,QAAQ,EAClB,kBAAkB,EAAE,EAAE,QAAQ,EAAE,EAChC,iBAAiB,EAAC,QAAQ,EAC1B,uBAAuB,EAAC,QAAQ,EAChC,KAAK,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QAE/D,oBAAC,IAAI,IACH,KAAK,EAAE,MAAM,CAAC,IAAI,EAClB,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,aAAa,EACjD,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,aAAa,GACpB;QACF,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,UAAU,CAAC,YAAY,EAAE,MAAM,CAAC,aAAa,CAAC;YAC1D,oBAAC,IAAI,IACH,KAAK,EAAE;oBACL,MAAM,CAAC,IAAI;oBACX,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE;oBAC/B,EAAE,WAAW,EAAE,aAAa,EAAE;iBAC/B,GACD,CACG,CACG,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,YAAY,EAAE,EAAE;KACjB;IACD,aAAa,EAAE;QACb,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;KACzB;IACD,IAAI,EAAE;QACJ,SAAS,EAAE,QAAQ;KACpB;IACD,IAAI,EAAE;QACJ,YAAY,EAAE,CAAC;QACf,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC"}
@@ -1,77 +0,0 @@
1
- import * as React from "react";
2
- import { StyleSheet, View, Platform, Pressable, } from "react-native";
3
- import Checkbox from "./Checkbox";
4
- import Text from "../Text";
5
- import { useCheckboxGroupContext } from "./context";
6
- import { Direction as GroupDirection } from "./context";
7
- import { extractStyles } from "../../utilities";
8
- export var Direction;
9
- (function (Direction) {
10
- Direction["Row"] = "row";
11
- Direction["RowReverse"] = "row-reverse";
12
- })(Direction || (Direction = {}));
13
- const getCheckboxAlignment = (parentDirection, direction) => {
14
- if (parentDirection === GroupDirection.Horizontal) {
15
- return direction === Direction.Row ? "flex-start" : "flex-end";
16
- }
17
- else if (direction === Direction.RowReverse) {
18
- return "flex-start";
19
- }
20
- else {
21
- return "flex-end";
22
- }
23
- };
24
- const renderLabel = (value, labelStyle, textStyle) => {
25
- if (typeof value === "string") {
26
- return React.createElement(Text, { style: [labelStyle, textStyle] }, value);
27
- }
28
- else {
29
- return React.createElement(React.Fragment, null, value);
30
- }
31
- };
32
- const CheckboxGroupRow = ({ Icon, label = "Label", status, value, onPress, labelContainerStyle, labelStyle, checkboxStyle, direction = Direction.Row, disabled, style, color, uncheckedColor, ...rest }) => {
33
- const { values: selectedValues, onValueChange, direction: parentDirection, } = useCheckboxGroupContext();
34
- const values = Array.isArray(selectedValues) ? selectedValues : [];
35
- const isChecked = status || values.includes(value);
36
- const handlePress = () => {
37
- if (!disabled) {
38
- onPress === null || onPress === void 0 ? void 0 : onPress(!isChecked);
39
- onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(value, !isChecked);
40
- }
41
- };
42
- const { textStyles, viewStyles } = extractStyles(style);
43
- return (React.createElement(Pressable, { onPress: handlePress, style: [styles.mainParent, { flexDirection: direction }, viewStyles], disabled: disabled, ...rest },
44
- React.createElement(View, { style: [
45
- styles.label,
46
- {
47
- alignItems: direction === Direction.Row ? "flex-start" : "flex-end",
48
- },
49
- labelContainerStyle,
50
- ] }, renderLabel(label, labelStyle, textStyles)),
51
- React.createElement(View, { style: {
52
- flex: 1,
53
- alignItems: getCheckboxAlignment(parentDirection, direction),
54
- } },
55
- React.createElement(Checkbox, { Icon: Icon, status: isChecked, onPress: handlePress, style: checkboxStyle, disabled: disabled, color: color, uncheckedColor: uncheckedColor }))));
56
- };
57
- const styles = StyleSheet.create({
58
- mainParent: {
59
- alignItems: "center",
60
- justifyContent: "space-around",
61
- paddingStart: 20,
62
- minHeight: 50,
63
- paddingEnd: 20,
64
- display: "flex",
65
- ...Platform.select({
66
- web: {
67
- cursor: "pointer",
68
- userSelect: "none",
69
- },
70
- }),
71
- },
72
- label: {
73
- flex: 3,
74
- },
75
- });
76
- export default CheckboxGroupRow;
77
- //# sourceMappingURL=CheckboxGroupRow.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CheckboxGroupRow.js","sourceRoot":"","sources":["CheckboxGroupRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,UAAU,EAEV,IAAI,EACJ,QAAQ,EACR,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,OAAO,QAA2B,MAAM,YAAY,CAAC;AACrD,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAEpD,OAAO,EAAE,SAAS,IAAI,cAAc,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,uCAA0B,CAAA;AAC5B,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AAcD,MAAM,oBAAoB,GAAG,CAC3B,eAA2C,EAC3C,SAAoB,EACpB,EAAE;IACF,IAAI,eAAe,KAAK,cAAc,CAAC,UAAU,EAAE,CAAC;QAClD,OAAO,SAAS,KAAK,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU,CAAC;IACjE,CAAC;SAAM,IAAI,SAAS,KAAK,SAAS,CAAC,UAAU,EAAE,CAAC;QAC9C,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