@draftbit/core 49.5.2-ff55cf.2 → 49.5.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 (552) hide show
  1. package/lib/commonjs/Provider.js +1 -1
  2. package/lib/commonjs/components/AccordionGroup.js +1 -1
  3. package/lib/commonjs/components/BottomSheet/BottomSheet.js +1 -1
  4. package/lib/commonjs/components/Button.js +1 -1
  5. package/lib/commonjs/components/Checkbox/Checkbox.js +1 -1
  6. package/lib/commonjs/components/Checkbox/CheckboxRow.js +1 -1
  7. package/lib/commonjs/components/DatePicker/DatePicker.js +1 -1
  8. package/lib/commonjs/components/DatePicker/DatePickerComponent.web.js +1 -1
  9. package/lib/commonjs/components/DeckSwiper/DeckSwiperCard.js +1 -1
  10. package/lib/commonjs/components/Divider.js +1 -1
  11. package/lib/commonjs/components/Elevation.js +1 -1
  12. package/lib/commonjs/components/IconButton.js +1 -1
  13. package/lib/commonjs/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js +1 -1
  14. package/lib/commonjs/components/MediaPlayer/AudioPlayer/index.js +1 -1
  15. package/lib/commonjs/components/Picker/NativePicker.js +1 -1
  16. package/lib/commonjs/components/Picker/dropdown/DropDownModalPicker.js +1 -1
  17. package/lib/commonjs/components/Picker/dropdown/DropDownPicker.js +1 -1
  18. package/lib/commonjs/components/Picker/dropdown/MultiSelectPicker.js +1 -1
  19. package/lib/commonjs/components/Picker/index.js +1 -1
  20. package/lib/commonjs/components/PinInput/PinInput.js +1 -1
  21. package/lib/commonjs/components/PinInput/PinInputText.js +1 -1
  22. package/lib/commonjs/components/Portal/Portal.js +1 -1
  23. package/lib/commonjs/components/Progress/CircularProgress/CircularProgress.js +1 -1
  24. package/lib/commonjs/components/Progress/CircularProgress/index.js +1 -1
  25. package/lib/commonjs/components/Progress/LinearProgress/LinearProgress.js +1 -1
  26. package/lib/commonjs/components/Progress/LinearProgress/index.js +1 -1
  27. package/lib/commonjs/components/ProgressIndicator.js +1 -1
  28. package/lib/commonjs/components/RadioButton/RadioButtonRow.js +1 -1
  29. package/lib/commonjs/components/Row.js +1 -1
  30. package/lib/commonjs/components/ScreenContainer.js +1 -1
  31. package/lib/commonjs/components/SectionList/SectionHeader.js +1 -1
  32. package/lib/commonjs/components/SectionList/SectionList.js +1 -1
  33. package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleFlashList.js +1 -1
  34. package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleFlatList.js +1 -1
  35. package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js +1 -1
  36. package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js +1 -1
  37. package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleScrollView.js +1 -1
  38. package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleSectionList.js +1 -1
  39. package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js +1 -1
  40. package/lib/commonjs/components/Slider.js +1 -1
  41. package/lib/commonjs/components/StarRating.js +1 -1
  42. package/lib/commonjs/components/Stepper.js +1 -1
  43. package/lib/commonjs/components/Surface.js +1 -1
  44. package/lib/commonjs/components/SwipeableItem/SwipeableItem.js +1 -1
  45. package/lib/commonjs/components/SwipeableItem/SwipeableList.js +1 -1
  46. package/lib/commonjs/components/Swiper/Swiper.js +1 -1
  47. package/lib/commonjs/components/Switch.js +1 -1
  48. package/lib/commonjs/components/TabView/TabView.js +1 -1
  49. package/lib/commonjs/components/Table/Table.js +1 -1
  50. package/lib/commonjs/components/Table/TableRow.js +1 -1
  51. package/lib/commonjs/components/Text.js +1 -1
  52. package/lib/commonjs/components/TextField.js +1 -1
  53. package/lib/commonjs/components/TextInput.js +1 -1
  54. package/lib/commonjs/components/Typography.js +1 -1
  55. package/lib/commonjs/deprecated-components/AccordionItem.js +1 -1
  56. package/lib/commonjs/deprecated-components/AvatarEdit.js +1 -1
  57. package/lib/commonjs/deprecated-components/Banner.js +1 -1
  58. package/lib/commonjs/deprecated-components/Card.js +1 -1
  59. package/lib/commonjs/deprecated-components/Container.js +1 -1
  60. package/lib/commonjs/deprecated-components/DeprecatedButton.js +1 -1
  61. package/lib/commonjs/deprecated-components/DeprecatedCardWrapper.js +1 -1
  62. package/lib/commonjs/deprecated-components/DeprecatedFAB.js +1 -1
  63. package/lib/commonjs/deprecated-components/FAB.js +1 -1
  64. package/lib/commonjs/deprecated-components/FieldSearchBarFull.js +1 -1
  65. package/lib/commonjs/deprecated-components/ProgressCircle.js +1 -1
  66. package/lib/commonjs/deprecated-components/RadioButtonFieldGroup.js +1 -1
  67. package/lib/commonjs/deprecated-components/RowBodyIcon.js +1 -1
  68. package/lib/commonjs/deprecated-components/RowHeadlineImageCaption.js +1 -1
  69. package/lib/commonjs/deprecated-components/RowHeadlineImageIcon.js +1 -1
  70. package/lib/commonjs/deprecated-components/ToggleButton.js +1 -1
  71. package/lib/commonjs/index.js +1 -1
  72. package/lib/commonjs/styles/DarkTheme.js +1 -0
  73. package/lib/commonjs/styles/DefaultTheme.js +1 -0
  74. package/lib/commonjs/styles/fonts.js +1 -0
  75. package/lib/commonjs/styles/overlay.js +1 -0
  76. package/lib/commonjs/styles/shadow.js +1 -0
  77. package/lib/commonjs/theming.js +1 -0
  78. package/lib/typescript/src/Provider.d.ts +5 -7
  79. package/lib/typescript/src/Provider.js +4 -4
  80. package/lib/typescript/src/Provider.js.map +1 -1
  81. package/lib/typescript/src/components/AccordionGroup.d.ts +5 -3
  82. package/lib/typescript/src/components/AccordionGroup.js +3 -3
  83. package/lib/typescript/src/components/AccordionGroup.js.map +1 -1
  84. package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts +5 -3
  85. package/lib/typescript/src/components/BottomSheet/BottomSheet.js +4 -4
  86. package/lib/typescript/src/components/BottomSheet/BottomSheet.js.map +1 -1
  87. package/lib/typescript/src/components/Button.js +6 -8
  88. package/lib/typescript/src/components/Button.js.map +1 -1
  89. package/lib/typescript/src/components/Checkbox/Checkbox.js +3 -3
  90. package/lib/typescript/src/components/Checkbox/Checkbox.js.map +1 -1
  91. package/lib/typescript/src/components/Checkbox/CheckboxRow.d.ts +2 -4
  92. package/lib/typescript/src/components/Checkbox/CheckboxRow.js +6 -7
  93. package/lib/typescript/src/components/Checkbox/CheckboxRow.js.map +1 -1
  94. package/lib/typescript/src/components/DatePicker/DatePicker.d.ts +5 -3
  95. package/lib/typescript/src/components/DatePicker/DatePicker.js +23 -24
  96. package/lib/typescript/src/components/DatePicker/DatePicker.js.map +1 -1
  97. package/lib/typescript/src/components/DatePicker/DatePickerComponent.web.d.ts +5010 -4
  98. package/lib/typescript/src/components/DatePicker/DatePickerComponent.web.js +6 -8
  99. package/lib/typescript/src/components/DatePicker/DatePickerComponent.web.js.map +1 -1
  100. package/lib/typescript/src/components/DatePicker/DatePickerComponentType.d.ts +2 -2
  101. package/lib/typescript/src/components/DeckSwiper/DeckSwiperCard.d.ts +5 -3
  102. package/lib/typescript/src/components/DeckSwiper/DeckSwiperCard.js +3 -3
  103. package/lib/typescript/src/components/DeckSwiper/DeckSwiperCard.js.map +1 -1
  104. package/lib/typescript/src/components/Divider.d.ts +5 -3
  105. package/lib/typescript/src/components/Divider.js +2 -2
  106. package/lib/typescript/src/components/Divider.js.map +1 -1
  107. package/lib/typescript/src/components/Elevation.d.ts +5 -3
  108. package/lib/typescript/src/components/Elevation.js +4 -3
  109. package/lib/typescript/src/components/Elevation.js.map +1 -1
  110. package/lib/typescript/src/components/FormRow.d.ts +2 -1
  111. package/lib/typescript/src/components/FormRow.js.map +1 -1
  112. package/lib/typescript/src/components/IconButton.d.ts +5 -3
  113. package/lib/typescript/src/components/IconButton.js +2 -2
  114. package/lib/typescript/src/components/IconButton.js.map +1 -1
  115. package/lib/typescript/src/components/MediaPlayer/AudioPlayer/AudioPlayerCommon.d.ts +2 -0
  116. package/lib/typescript/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.d.ts +4 -5
  117. package/lib/typescript/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js +13 -10
  118. package/lib/typescript/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js.map +1 -1
  119. package/lib/typescript/src/components/MediaPlayer/AudioPlayer/index.d.ts +4 -2
  120. package/lib/typescript/src/components/MediaPlayer/AudioPlayer/index.js +3 -1
  121. package/lib/typescript/src/components/MediaPlayer/AudioPlayer/index.js.map +1 -1
  122. package/lib/typescript/src/components/Picker/NativePicker.d.ts +3 -1
  123. package/lib/typescript/src/components/Picker/NativePicker.js +2 -5
  124. package/lib/typescript/src/components/Picker/NativePicker.js.map +1 -1
  125. package/lib/typescript/src/components/Picker/PickerCommon.d.ts +2 -2
  126. package/lib/typescript/src/components/Picker/dropdown/DropDownModalPicker.d.ts +3 -1
  127. package/lib/typescript/src/components/Picker/dropdown/DropDownModalPicker.js +2 -2
  128. package/lib/typescript/src/components/Picker/dropdown/DropDownModalPicker.js.map +1 -1
  129. package/lib/typescript/src/components/Picker/dropdown/DropDownPicker.d.ts +3 -1
  130. package/lib/typescript/src/components/Picker/dropdown/DropDownPicker.js +2 -2
  131. package/lib/typescript/src/components/Picker/dropdown/DropDownPicker.js.map +1 -1
  132. package/lib/typescript/src/components/Picker/dropdown/MultiSelectPicker.d.ts +3 -1
  133. package/lib/typescript/src/components/Picker/dropdown/MultiSelectPicker.js +1 -1
  134. package/lib/typescript/src/components/Picker/dropdown/MultiSelectPicker.js.map +1 -1
  135. package/lib/typescript/src/components/Picker/index.d.ts +3 -1
  136. package/lib/typescript/src/components/Picker/index.js +1 -1
  137. package/lib/typescript/src/components/Picker/index.js.map +1 -1
  138. package/lib/typescript/src/components/PinInput/PinInput.d.ts +5 -3
  139. package/lib/typescript/src/components/PinInput/PinInput.js +4 -4
  140. package/lib/typescript/src/components/PinInput/PinInput.js.map +1 -1
  141. package/lib/typescript/src/components/PinInput/PinInputText.d.ts +5 -3
  142. package/lib/typescript/src/components/PinInput/PinInputText.js +2 -2
  143. package/lib/typescript/src/components/PinInput/PinInputText.js.map +1 -1
  144. package/lib/typescript/src/components/Portal/Portal.d.ts +9 -1
  145. package/lib/typescript/src/components/Portal/Portal.js +5 -3
  146. package/lib/typescript/src/components/Portal/Portal.js.map +1 -1
  147. package/lib/typescript/src/components/Progress/CircularProgress/CircularProgress.js +1 -1
  148. package/lib/typescript/src/components/Progress/CircularProgress/CircularProgress.js.map +1 -1
  149. package/lib/typescript/src/components/Progress/CircularProgress/index.d.ts +3 -1
  150. package/lib/typescript/src/components/Progress/CircularProgress/index.js +1 -1
  151. package/lib/typescript/src/components/Progress/CircularProgress/index.js.map +1 -1
  152. package/lib/typescript/src/components/Progress/LinearProgress/LinearProgress.js +1 -1
  153. package/lib/typescript/src/components/Progress/LinearProgress/LinearProgress.js.map +1 -1
  154. package/lib/typescript/src/components/Progress/LinearProgress/index.d.ts +3 -1
  155. package/lib/typescript/src/components/Progress/LinearProgress/index.js +1 -1
  156. package/lib/typescript/src/components/Progress/LinearProgress/index.js.map +1 -1
  157. package/lib/typescript/src/components/Progress/ProgressCommon.d.ts +2 -2
  158. package/lib/typescript/src/components/ProgressIndicator.d.ts +13 -10
  159. package/lib/typescript/src/components/ProgressIndicator.js +1 -1
  160. package/lib/typescript/src/components/ProgressIndicator.js.map +1 -1
  161. package/lib/typescript/src/components/RadioButton/RadioButtonGroup.d.ts +2 -2
  162. package/lib/typescript/src/components/RadioButton/RadioButtonRow.d.ts +2 -4
  163. package/lib/typescript/src/components/RadioButton/RadioButtonRow.js +3 -4
  164. package/lib/typescript/src/components/RadioButton/RadioButtonRow.js.map +1 -1
  165. package/lib/typescript/src/components/Row.d.ts +5 -3
  166. package/lib/typescript/src/components/Row.js +1 -1
  167. package/lib/typescript/src/components/Row.js.map +1 -1
  168. package/lib/typescript/src/components/ScreenContainer.d.ts +6 -3
  169. package/lib/typescript/src/components/ScreenContainer.js +2 -3
  170. package/lib/typescript/src/components/ScreenContainer.js.map +1 -1
  171. package/lib/typescript/src/components/SectionList/SectionHeader.d.ts +5 -3
  172. package/lib/typescript/src/components/SectionList/SectionHeader.js +3 -3
  173. package/lib/typescript/src/components/SectionList/SectionHeader.js.map +1 -1
  174. package/lib/typescript/src/components/SectionList/SectionList.d.ts +6 -4
  175. package/lib/typescript/src/components/SectionList/SectionList.js +4 -4
  176. package/lib/typescript/src/components/SectionList/SectionList.js.map +1 -1
  177. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleFlashList.d.ts +2 -1
  178. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleFlashList.js +3 -3
  179. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleFlashList.js.map +1 -1
  180. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleFlatList.d.ts +2 -1
  181. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js +3 -3
  182. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js.map +1 -1
  183. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.d.ts +2 -1
  184. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js +3 -3
  185. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js.map +1 -1
  186. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.d.ts +2 -2
  187. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js +3 -3
  188. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js.map +1 -1
  189. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleScrollView.d.ts +2 -1
  190. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js +3 -3
  191. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js.map +1 -1
  192. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSectionList.d.ts +6 -2
  193. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js +3 -3
  194. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js.map +1 -1
  195. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.d.ts +6 -2
  196. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js +3 -3
  197. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js.map +1 -1
  198. package/lib/typescript/src/components/Slider.d.ts +6 -3
  199. package/lib/typescript/src/components/Slider.js +6 -6
  200. package/lib/typescript/src/components/Slider.js.map +1 -1
  201. package/lib/typescript/src/components/StarRating.d.ts +5 -3
  202. package/lib/typescript/src/components/StarRating.js +1 -1
  203. package/lib/typescript/src/components/StarRating.js.map +1 -1
  204. package/lib/typescript/src/components/Stepper.d.ts +5 -3
  205. package/lib/typescript/src/components/Stepper.js +2 -3
  206. package/lib/typescript/src/components/Stepper.js.map +1 -1
  207. package/lib/typescript/src/components/Surface.d.ts +5 -3
  208. package/lib/typescript/src/components/Surface.js +10 -3
  209. package/lib/typescript/src/components/Surface.js.map +1 -1
  210. package/lib/typescript/src/components/SwipeableItem/SwipeableItem.d.ts +5 -3
  211. package/lib/typescript/src/components/SwipeableItem/SwipeableItem.js +5 -10
  212. package/lib/typescript/src/components/SwipeableItem/SwipeableItem.js.map +1 -1
  213. package/lib/typescript/src/components/SwipeableItem/SwipeableList.d.ts +3 -3
  214. package/lib/typescript/src/components/SwipeableItem/SwipeableList.js +4 -4
  215. package/lib/typescript/src/components/SwipeableItem/SwipeableList.js.map +1 -1
  216. package/lib/typescript/src/components/Swiper/Swiper.d.ts +2 -4
  217. package/lib/typescript/src/components/Swiper/Swiper.js +2 -3
  218. package/lib/typescript/src/components/Swiper/Swiper.js.map +1 -1
  219. package/lib/typescript/src/components/Switch.d.ts +24 -7
  220. package/lib/typescript/src/components/Switch.js +4 -3
  221. package/lib/typescript/src/components/Switch.js.map +1 -1
  222. package/lib/typescript/src/components/TabView/TabView.d.ts +7 -3
  223. package/lib/typescript/src/components/TabView/TabView.js +21 -6
  224. package/lib/typescript/src/components/TabView/TabView.js.map +1 -1
  225. package/lib/typescript/src/components/Table/Table.d.ts +5 -3
  226. package/lib/typescript/src/components/Table/Table.js +2 -2
  227. package/lib/typescript/src/components/Table/Table.js.map +1 -1
  228. package/lib/typescript/src/components/Table/TableRow.d.ts +5 -3
  229. package/lib/typescript/src/components/Table/TableRow.js +2 -4
  230. package/lib/typescript/src/components/Table/TableRow.js.map +1 -1
  231. package/lib/typescript/src/components/Text.d.ts +9 -3
  232. package/lib/typescript/src/components/Text.js +2 -2
  233. package/lib/typescript/src/components/Text.js.map +1 -1
  234. package/lib/typescript/src/components/TextField.d.ts +41 -4
  235. package/lib/typescript/src/components/TextField.js +20 -22
  236. package/lib/typescript/src/components/TextField.js.map +1 -1
  237. package/lib/typescript/src/components/TextInput.js +0 -3
  238. package/lib/typescript/src/components/TextInput.js.map +1 -1
  239. package/lib/typescript/src/components/Typography.d.ts +11 -5
  240. package/lib/typescript/src/components/Typography.js +4 -4
  241. package/lib/typescript/src/components/Typography.js.map +1 -1
  242. package/lib/typescript/src/deprecated-components/AccordionItem.d.ts +5 -3
  243. package/lib/typescript/src/deprecated-components/AccordionItem.js +2 -2
  244. package/lib/typescript/src/deprecated-components/AccordionItem.js.map +1 -1
  245. package/lib/typescript/src/deprecated-components/AvatarEdit.d.ts +5 -3
  246. package/lib/typescript/src/deprecated-components/AvatarEdit.js +4 -4
  247. package/lib/typescript/src/deprecated-components/AvatarEdit.js.map +1 -1
  248. package/lib/typescript/src/deprecated-components/Banner.d.ts +5 -3
  249. package/lib/typescript/src/deprecated-components/Banner.js +5 -4
  250. package/lib/typescript/src/deprecated-components/Banner.js.map +1 -1
  251. package/lib/typescript/src/deprecated-components/Card.d.ts +18 -6
  252. package/lib/typescript/src/deprecated-components/Card.js +3 -3
  253. package/lib/typescript/src/deprecated-components/Card.js.map +1 -1
  254. package/lib/typescript/src/deprecated-components/CheckboxGroup.d.ts +2 -2
  255. package/lib/typescript/src/deprecated-components/Container.d.ts +5 -3
  256. package/lib/typescript/src/deprecated-components/Container.js +1 -1
  257. package/lib/typescript/src/deprecated-components/Container.js.map +1 -1
  258. package/lib/typescript/src/deprecated-components/DeprecatedButton.d.ts +5 -3
  259. package/lib/typescript/src/deprecated-components/DeprecatedButton.js +8 -8
  260. package/lib/typescript/src/deprecated-components/DeprecatedButton.js.map +1 -1
  261. package/lib/typescript/src/deprecated-components/DeprecatedCardWrapper.d.ts +5 -3
  262. package/lib/typescript/src/deprecated-components/DeprecatedCardWrapper.js +1 -1
  263. package/lib/typescript/src/deprecated-components/DeprecatedCardWrapper.js.map +1 -1
  264. package/lib/typescript/src/deprecated-components/DeprecatedFAB.d.ts +5 -3
  265. package/lib/typescript/src/deprecated-components/DeprecatedFAB.js +8 -8
  266. package/lib/typescript/src/deprecated-components/DeprecatedFAB.js.map +1 -1
  267. package/lib/typescript/src/deprecated-components/FAB.d.ts +8 -3
  268. package/lib/typescript/src/deprecated-components/FAB.js +2 -2
  269. package/lib/typescript/src/deprecated-components/FAB.js.map +1 -1
  270. package/lib/typescript/src/deprecated-components/FieldSearchBarFull.d.ts +5 -3
  271. package/lib/typescript/src/deprecated-components/FieldSearchBarFull.js +4 -4
  272. package/lib/typescript/src/deprecated-components/FieldSearchBarFull.js.map +1 -1
  273. package/lib/typescript/src/deprecated-components/ProgressCircle.d.ts +8 -5
  274. package/lib/typescript/src/deprecated-components/ProgressCircle.js +3 -3
  275. package/lib/typescript/src/deprecated-components/ProgressCircle.js.map +1 -1
  276. package/lib/typescript/src/deprecated-components/RadioButtonFieldGroup.d.ts +3 -1
  277. package/lib/typescript/src/deprecated-components/RadioButtonFieldGroup.js +1 -1
  278. package/lib/typescript/src/deprecated-components/RadioButtonFieldGroup.js.map +1 -1
  279. package/lib/typescript/src/deprecated-components/RowBodyIcon.d.ts +5 -3
  280. package/lib/typescript/src/deprecated-components/RowBodyIcon.js +2 -2
  281. package/lib/typescript/src/deprecated-components/RowBodyIcon.js.map +1 -1
  282. package/lib/typescript/src/deprecated-components/RowHeadlineImageCaption.d.ts +5 -3
  283. package/lib/typescript/src/deprecated-components/RowHeadlineImageCaption.js +3 -3
  284. package/lib/typescript/src/deprecated-components/RowHeadlineImageCaption.js.map +1 -1
  285. package/lib/typescript/src/deprecated-components/RowHeadlineImageIcon.d.ts +5 -3
  286. package/lib/typescript/src/deprecated-components/RowHeadlineImageIcon.js +3 -3
  287. package/lib/typescript/src/deprecated-components/RowHeadlineImageIcon.js.map +1 -1
  288. package/lib/typescript/src/deprecated-components/ToggleButton.d.ts +9 -6
  289. package/lib/typescript/src/deprecated-components/ToggleButton.js +5 -5
  290. package/lib/typescript/src/deprecated-components/ToggleButton.js.map +1 -1
  291. package/lib/typescript/src/index.d.ts +2 -0
  292. package/lib/typescript/src/index.js +2 -0
  293. package/lib/typescript/src/index.js.map +1 -1
  294. package/lib/typescript/src/styles/DarkTheme.d.ts +3 -0
  295. package/lib/typescript/src/styles/DarkTheme.js +27 -0
  296. package/lib/typescript/src/styles/DarkTheme.js.map +1 -0
  297. package/lib/typescript/src/styles/DefaultTheme.d.ts +1670 -0
  298. package/lib/typescript/src/styles/DefaultTheme.js +112 -0
  299. package/lib/typescript/src/styles/DefaultTheme.js.map +1 -0
  300. package/lib/typescript/src/styles/fonts.d.ts +5 -0
  301. package/lib/typescript/src/styles/fonts.js +63 -0
  302. package/lib/typescript/src/styles/fonts.js.map +1 -0
  303. package/lib/typescript/src/styles/overlay.d.ts +2 -0
  304. package/lib/typescript/src/styles/overlay.js +61 -0
  305. package/lib/typescript/src/styles/overlay.js.map +1 -0
  306. package/lib/typescript/src/styles/shadow.d.ts +23 -0
  307. package/lib/typescript/src/styles/shadow.js +52 -0
  308. package/lib/typescript/src/styles/shadow.js.map +1 -0
  309. package/lib/typescript/src/theming.d.ts +8 -0
  310. package/lib/typescript/src/theming.js +4 -0
  311. package/lib/typescript/src/theming.js.map +1 -0
  312. package/lib/typescript/tsconfig.tsbuildinfo +1 -1
  313. package/package.json +5 -4
  314. package/src/Provider.js +4 -4
  315. package/src/Provider.js.map +1 -1
  316. package/src/Provider.tsx +12 -15
  317. package/src/components/AccordionGroup.js +3 -3
  318. package/src/components/AccordionGroup.js.map +1 -1
  319. package/src/components/AccordionGroup.tsx +5 -5
  320. package/src/components/BottomSheet/BottomSheet.js +4 -4
  321. package/src/components/BottomSheet/BottomSheet.js.map +1 -1
  322. package/src/components/BottomSheet/BottomSheet.tsx +7 -7
  323. package/src/components/Button.js +6 -8
  324. package/src/components/Button.js.map +1 -1
  325. package/src/components/Button.tsx +10 -10
  326. package/src/components/Checkbox/Checkbox.js +3 -3
  327. package/src/components/Checkbox/Checkbox.js.map +1 -1
  328. package/src/components/Checkbox/Checkbox.tsx +3 -3
  329. package/src/components/Checkbox/CheckboxRow.js +6 -7
  330. package/src/components/Checkbox/CheckboxRow.js.map +1 -1
  331. package/src/components/Checkbox/CheckboxRow.tsx +5 -12
  332. package/src/components/DatePicker/DatePicker.js +23 -24
  333. package/src/components/DatePicker/DatePicker.js.map +1 -1
  334. package/src/components/DatePicker/DatePicker.tsx +24 -25
  335. package/src/components/DatePicker/DatePickerComponent.web.js +6 -8
  336. package/src/components/DatePicker/DatePickerComponent.web.js.map +1 -1
  337. package/src/components/DatePicker/DatePickerComponent.web.tsx +8 -15
  338. package/src/components/DatePicker/DatePickerComponentType.ts +3 -2
  339. package/src/components/DeckSwiper/DeckSwiperCard.js +3 -3
  340. package/src/components/DeckSwiper/DeckSwiperCard.js.map +1 -1
  341. package/src/components/DeckSwiper/DeckSwiperCard.tsx +5 -5
  342. package/src/components/Divider.js +2 -2
  343. package/src/components/Divider.js.map +1 -1
  344. package/src/components/Divider.tsx +4 -4
  345. package/src/components/Elevation.js +4 -3
  346. package/src/components/Elevation.js.map +1 -1
  347. package/src/components/Elevation.tsx +6 -5
  348. package/src/components/FormRow.js.map +1 -1
  349. package/src/components/FormRow.tsx +2 -1
  350. package/src/components/IconButton.js +2 -2
  351. package/src/components/IconButton.js.map +1 -1
  352. package/src/components/IconButton.tsx +4 -4
  353. package/src/components/MediaPlayer/AudioPlayer/AudioPlayerCommon.ts +2 -0
  354. package/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js +13 -10
  355. package/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js.map +1 -1
  356. package/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.tsx +19 -19
  357. package/src/components/MediaPlayer/AudioPlayer/index.js +3 -1
  358. package/src/components/MediaPlayer/AudioPlayer/index.js.map +1 -1
  359. package/src/components/MediaPlayer/AudioPlayer/index.tsx +3 -1
  360. package/src/components/Picker/NativePicker.js +2 -5
  361. package/src/components/Picker/NativePicker.js.map +1 -1
  362. package/src/components/Picker/NativePicker.tsx +2 -5
  363. package/src/components/Picker/PickerCommon.ts +2 -2
  364. package/src/components/Picker/dropdown/DropDownModalPicker.js +2 -2
  365. package/src/components/Picker/dropdown/DropDownModalPicker.js.map +1 -1
  366. package/src/components/Picker/dropdown/DropDownModalPicker.tsx +5 -5
  367. package/src/components/Picker/dropdown/DropDownPicker.js +2 -2
  368. package/src/components/Picker/dropdown/DropDownPicker.js.map +1 -1
  369. package/src/components/Picker/dropdown/DropDownPicker.tsx +5 -5
  370. package/src/components/Picker/dropdown/MultiSelectPicker.js +1 -1
  371. package/src/components/Picker/dropdown/MultiSelectPicker.js.map +1 -1
  372. package/src/components/Picker/dropdown/MultiSelectPicker.tsx +1 -1
  373. package/src/components/Picker/index.js +1 -1
  374. package/src/components/Picker/index.js.map +1 -1
  375. package/src/components/Picker/index.tsx +1 -1
  376. package/src/components/PinInput/PinInput.js +4 -4
  377. package/src/components/PinInput/PinInput.js.map +1 -1
  378. package/src/components/PinInput/PinInput.tsx +6 -6
  379. package/src/components/PinInput/PinInputText.js +2 -2
  380. package/src/components/PinInput/PinInputText.js.map +1 -1
  381. package/src/components/PinInput/PinInputText.tsx +4 -4
  382. package/src/components/Portal/Portal.js +5 -3
  383. package/src/components/Portal/Portal.js.map +1 -1
  384. package/src/components/Portal/Portal.tsx +10 -3
  385. package/src/components/Progress/CircularProgress/CircularProgress.js +1 -1
  386. package/src/components/Progress/CircularProgress/CircularProgress.js.map +1 -1
  387. package/src/components/Progress/CircularProgress/CircularProgress.tsx +2 -2
  388. package/src/components/Progress/CircularProgress/index.js +1 -1
  389. package/src/components/Progress/CircularProgress/index.js.map +1 -1
  390. package/src/components/Progress/CircularProgress/index.tsx +1 -1
  391. package/src/components/Progress/LinearProgress/LinearProgress.js +1 -1
  392. package/src/components/Progress/LinearProgress/LinearProgress.js.map +1 -1
  393. package/src/components/Progress/LinearProgress/LinearProgress.tsx +2 -2
  394. package/src/components/Progress/LinearProgress/index.js +1 -1
  395. package/src/components/Progress/LinearProgress/index.js.map +1 -1
  396. package/src/components/Progress/LinearProgress/index.tsx +1 -1
  397. package/src/components/Progress/ProgressCommon.ts +2 -2
  398. package/src/components/ProgressIndicator.js +1 -1
  399. package/src/components/ProgressIndicator.js.map +1 -1
  400. package/src/components/ProgressIndicator.tsx +11 -10
  401. package/src/components/RadioButton/RadioButtonGroup.tsx +2 -2
  402. package/src/components/RadioButton/RadioButtonRow.js +3 -4
  403. package/src/components/RadioButton/RadioButtonRow.js.map +1 -1
  404. package/src/components/RadioButton/RadioButtonRow.tsx +2 -9
  405. package/src/components/Row.js +1 -1
  406. package/src/components/Row.js.map +1 -1
  407. package/src/components/Row.tsx +3 -3
  408. package/src/components/ScreenContainer.js +2 -3
  409. package/src/components/ScreenContainer.js.map +1 -1
  410. package/src/components/ScreenContainer.tsx +4 -5
  411. package/src/components/SectionList/SectionHeader.js +3 -3
  412. package/src/components/SectionList/SectionHeader.js.map +1 -1
  413. package/src/components/SectionList/SectionHeader.tsx +5 -5
  414. package/src/components/SectionList/SectionList.js +4 -4
  415. package/src/components/SectionList/SectionList.js.map +1 -1
  416. package/src/components/SectionList/SectionList.tsx +152 -145
  417. package/src/components/SimpleStyleScrollables/SimpleStyleFlashList.js +3 -3
  418. package/src/components/SimpleStyleScrollables/SimpleStyleFlashList.js.map +1 -1
  419. package/src/components/SimpleStyleScrollables/SimpleStyleFlashList.tsx +22 -16
  420. package/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js +3 -3
  421. package/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js.map +1 -1
  422. package/src/components/SimpleStyleScrollables/SimpleStyleFlatList.tsx +22 -16
  423. package/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js +3 -3
  424. package/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js.map +1 -1
  425. package/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.tsx +20 -13
  426. package/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js +3 -3
  427. package/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js.map +1 -1
  428. package/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.tsx +27 -17
  429. package/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js +3 -3
  430. package/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js.map +1 -1
  431. package/src/components/SimpleStyleScrollables/SimpleStyleScrollView.tsx +20 -13
  432. package/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js +3 -3
  433. package/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js.map +1 -1
  434. package/src/components/SimpleStyleScrollables/SimpleStyleSectionList.tsx +28 -20
  435. package/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js +3 -3
  436. package/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js.map +1 -1
  437. package/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.tsx +28 -20
  438. package/src/components/Slider.js +6 -6
  439. package/src/components/Slider.js.map +1 -1
  440. package/src/components/Slider.tsx +8 -8
  441. package/src/components/StarRating.js +1 -1
  442. package/src/components/StarRating.js.map +1 -1
  443. package/src/components/StarRating.tsx +3 -3
  444. package/src/components/Stepper.js +2 -3
  445. package/src/components/Stepper.js.map +1 -1
  446. package/src/components/Stepper.tsx +4 -5
  447. package/src/components/Surface.js +10 -3
  448. package/src/components/Surface.js.map +1 -1
  449. package/src/components/Surface.tsx +12 -5
  450. package/src/components/SwipeableItem/SwipeableItem.js +5 -10
  451. package/src/components/SwipeableItem/SwipeableItem.js.map +1 -1
  452. package/src/components/SwipeableItem/SwipeableItem.tsx +7 -13
  453. package/src/components/SwipeableItem/SwipeableList.js +4 -4
  454. package/src/components/SwipeableItem/SwipeableList.js.map +1 -1
  455. package/src/components/SwipeableItem/SwipeableList.tsx +47 -32
  456. package/src/components/Swiper/Swiper.js +2 -3
  457. package/src/components/Swiper/Swiper.js.map +1 -1
  458. package/src/components/Swiper/Swiper.tsx +3 -6
  459. package/src/components/Switch.js +4 -3
  460. package/src/components/Switch.js.map +1 -1
  461. package/src/components/Switch.tsx +7 -7
  462. package/src/components/TabView/TabView.js +21 -6
  463. package/src/components/TabView/TabView.js.map +1 -1
  464. package/src/components/TabView/TabView.tsx +26 -7
  465. package/src/components/Table/Table.js +2 -2
  466. package/src/components/Table/Table.js.map +1 -1
  467. package/src/components/Table/Table.tsx +4 -4
  468. package/src/components/Table/TableRow.js +2 -4
  469. package/src/components/Table/TableRow.js.map +1 -1
  470. package/src/components/Table/TableRow.tsx +4 -6
  471. package/src/components/Text.js +2 -2
  472. package/src/components/Text.js.map +1 -1
  473. package/src/components/Text.tsx +4 -4
  474. package/src/components/TextField.js +20 -22
  475. package/src/components/TextField.js.map +1 -1
  476. package/src/components/TextField.tsx +23 -26
  477. package/src/components/TextInput.js +0 -3
  478. package/src/components/TextInput.js.map +1 -1
  479. package/src/components/TextInput.tsx +0 -3
  480. package/src/components/Typography.js +4 -4
  481. package/src/components/Typography.js.map +1 -1
  482. package/src/components/Typography.tsx +6 -6
  483. package/src/deprecated-components/AccordionItem.js +2 -2
  484. package/src/deprecated-components/AccordionItem.js.map +1 -1
  485. package/src/deprecated-components/AccordionItem.tsx +4 -4
  486. package/src/deprecated-components/AvatarEdit.js +4 -4
  487. package/src/deprecated-components/AvatarEdit.js.map +1 -1
  488. package/src/deprecated-components/AvatarEdit.tsx +6 -6
  489. package/src/deprecated-components/Banner.js +5 -4
  490. package/src/deprecated-components/Banner.js.map +1 -1
  491. package/src/deprecated-components/Banner.tsx +10 -6
  492. package/src/deprecated-components/Card.js +3 -3
  493. package/src/deprecated-components/Card.js.map +1 -1
  494. package/src/deprecated-components/Card.tsx +6 -10
  495. package/src/deprecated-components/CheckboxGroup.tsx +2 -2
  496. package/src/deprecated-components/Container.js +1 -1
  497. package/src/deprecated-components/Container.js.map +1 -1
  498. package/src/deprecated-components/Container.tsx +3 -3
  499. package/src/deprecated-components/DeprecatedButton.js +8 -8
  500. package/src/deprecated-components/DeprecatedButton.js.map +1 -1
  501. package/src/deprecated-components/DeprecatedButton.tsx +10 -10
  502. package/src/deprecated-components/DeprecatedCardWrapper.js +1 -1
  503. package/src/deprecated-components/DeprecatedCardWrapper.js.map +1 -1
  504. package/src/deprecated-components/DeprecatedCardWrapper.tsx +3 -3
  505. package/src/deprecated-components/DeprecatedFAB.js +8 -8
  506. package/src/deprecated-components/DeprecatedFAB.js.map +1 -1
  507. package/src/deprecated-components/DeprecatedFAB.tsx +10 -10
  508. package/src/deprecated-components/FAB.js +2 -2
  509. package/src/deprecated-components/FAB.js.map +1 -1
  510. package/src/deprecated-components/FAB.tsx +4 -4
  511. package/src/deprecated-components/FieldSearchBarFull.js +4 -4
  512. package/src/deprecated-components/FieldSearchBarFull.js.map +1 -1
  513. package/src/deprecated-components/FieldSearchBarFull.tsx +6 -6
  514. package/src/deprecated-components/ProgressCircle.js +3 -3
  515. package/src/deprecated-components/ProgressCircle.js.map +1 -1
  516. package/src/deprecated-components/ProgressCircle.tsx +8 -7
  517. package/src/deprecated-components/RadioButtonFieldGroup.js +1 -1
  518. package/src/deprecated-components/RadioButtonFieldGroup.js.map +1 -1
  519. package/src/deprecated-components/RadioButtonFieldGroup.tsx +1 -1
  520. package/src/deprecated-components/RowBodyIcon.js +2 -2
  521. package/src/deprecated-components/RowBodyIcon.js.map +1 -1
  522. package/src/deprecated-components/RowBodyIcon.tsx +6 -6
  523. package/src/deprecated-components/RowHeadlineImageCaption.js +3 -3
  524. package/src/deprecated-components/RowHeadlineImageCaption.js.map +1 -1
  525. package/src/deprecated-components/RowHeadlineImageCaption.tsx +6 -6
  526. package/src/deprecated-components/RowHeadlineImageIcon.js +3 -3
  527. package/src/deprecated-components/RowHeadlineImageIcon.js.map +1 -1
  528. package/src/deprecated-components/RowHeadlineImageIcon.tsx +6 -6
  529. package/src/deprecated-components/ToggleButton.js +5 -5
  530. package/src/deprecated-components/ToggleButton.js.map +1 -1
  531. package/src/deprecated-components/ToggleButton.tsx +11 -12
  532. package/src/index.js +2 -0
  533. package/src/index.js.map +1 -1
  534. package/src/index.tsx +2 -0
  535. package/src/styles/DarkTheme.js +27 -0
  536. package/src/styles/DarkTheme.js.map +1 -0
  537. package/src/styles/DarkTheme.tsx +30 -0
  538. package/src/styles/DefaultTheme.js +112 -0
  539. package/src/styles/DefaultTheme.js.map +1 -0
  540. package/src/styles/DefaultTheme.tsx +114 -0
  541. package/src/styles/fonts.js +63 -0
  542. package/src/styles/fonts.js.map +1 -0
  543. package/src/styles/fonts.tsx +67 -0
  544. package/src/styles/overlay.js +61 -0
  545. package/src/styles/overlay.js.map +1 -0
  546. package/src/styles/overlay.tsx +69 -0
  547. package/src/styles/shadow.js +52 -0
  548. package/src/styles/shadow.js.map +1 -0
  549. package/src/styles/shadow.tsx +55 -0
  550. package/src/theming.js +4 -0
  551. package/src/theming.js.map +1 -0
  552. package/src/theming.tsx +6 -0
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { View, StyleProp, ViewStyle, Text } from "react-native";
3
- import { withTheme } from "@draftbit/theme";
4
- import type { ReadTheme } from "@draftbit/theme";
3
+ import { withTheme } from "../../theming";
4
+ import type { Theme } from "../../styles/DefaultTheme";
5
5
 
6
6
  interface SectionHeaderProps {
7
7
  style?: StyleProp<ViewStyle>;
@@ -14,7 +14,7 @@ const SectionHeader: React.FC<React.PropsWithChildren<SectionHeaderProps>> = ({
14
14
 
15
15
  interface DefaultSectionHeaderProps {
16
16
  title: string;
17
- theme: ReadTheme;
17
+ theme: Theme;
18
18
  }
19
19
  export const DefaultSectionHeader = withTheme(
20
20
  ({ title, theme }: DefaultSectionHeaderProps) => {
@@ -22,8 +22,8 @@ export const DefaultSectionHeader = withTheme(
22
22
  <Text
23
23
  testID="default-section-header"
24
24
  style={{
25
- color: theme.colors.background.brand,
26
- backgroundColor: theme.colors.branding.primary,
25
+ color: theme.colors.background,
26
+ backgroundColor: theme.colors.primary,
27
27
  fontSize: 16,
28
28
  padding: 10,
29
29
  }}
@@ -4,7 +4,7 @@ import { FlatList } from "react-native";
4
4
  import SectionHeader, { DefaultSectionHeader } from "./SectionHeader";
5
5
  import { flattenReactFragments } from "../../utilities";
6
6
  export const DEFAULT_SECTION = "Uncategorized";
7
- const SectionList = ({ sectionKey, stickyHeader = false, listComponent = "FlatList", data: dataProp, renderItem: renderItemProp, keyExtractor: keyExtractorProp, ...rest }) => {
7
+ const SectionList = React.forwardRef(({ sectionKey, stickyHeader = false, listComponent = "FlatList", data: dataProp, renderItem: renderItemProp, keyExtractor: keyExtractorProp, ...rest }, ref) => {
8
8
  const data = React.useMemo(() => (Array.isArray(dataProp) ? dataProp : []), [dataProp]);
9
9
  const dataWithSections = React.useMemo(() => {
10
10
  var _a;
@@ -102,10 +102,10 @@ const SectionList = ({ sectionKey, stickyHeader = false, listComponent = "FlatLi
102
102
  };
103
103
  switch (listComponent) {
104
104
  case "FlatList":
105
- return (React.createElement(FlatList, { stickyHeaderIndices: sectionHeaderIndicies, ...rest, data: dataWithSections, renderItem: renderItem, keyExtractor: keyExtractor }));
105
+ return (React.createElement(FlatList, { ref: ref, stickyHeaderIndices: sectionHeaderIndicies, ...rest, data: dataWithSections, renderItem: renderItem, keyExtractor: keyExtractor }));
106
106
  case "FlashList":
107
- return (React.createElement(FlashList, { stickyHeaderIndices: sectionHeaderIndicies, ...rest, data: dataWithSections, renderItem: renderItem, keyExtractor: keyExtractor }));
107
+ return (React.createElement(FlashList, { ref: ref, stickyHeaderIndices: sectionHeaderIndicies, ...rest, data: dataWithSections, renderItem: renderItem, keyExtractor: keyExtractor }));
108
108
  }
109
- };
109
+ });
110
110
  export default SectionList;
111
111
  //# sourceMappingURL=SectionList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SectionList.js","sourceRoot":"","sources":["SectionList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAkB,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAiB,QAAQ,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,aAAa,EAAE,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAqCxD,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC;AAE/C,MAAM,WAAW,GAAG,CAAmC,EACrD,UAAU,EACV,YAAY,GAAG,KAAK,EACpB,aAAa,GAAG,UAAU,EAC1B,IAAI,EAAE,QAAQ,EACd,UAAU,EAAE,cAAc,EAC1B,YAAY,EAAE,gBAAgB,EAC9B,GAAG,IAAI,EACoD,EAAE,EAAE;IAC/D,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CACxB,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAQ,EACtD,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,MAAM,gBAAgB,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;;QAC1C,MAAM,MAAM,GAAyB,EAAE,CAAC;QACxC,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,KACrC,IAA2C,EAChD,IAAI,EAAE,gBAAgB,EACtB,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,YAAY,GAC1B,CACH,CAAC;KACL;AACH,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -41,168 +41,175 @@ type SectionListItem<T> = SectionListDataItem<T> | SectionListSectionItem;
41
41
 
42
42
  export const DEFAULT_SECTION = "Uncategorized";
43
43
 
44
- const SectionList = <T extends { [key: string]: any }>({
45
- sectionKey,
46
- stickyHeader = false,
47
- listComponent = "FlatList",
48
- data: dataProp,
49
- renderItem: renderItemProp,
50
- keyExtractor: keyExtractorProp,
51
- ...rest
52
- }: FlatListSectionListProps<T> | FlashListSectionListProps<T>) => {
53
- const data = React.useMemo(
54
- () => (Array.isArray(dataProp) ? dataProp : []) as T[],
55
- [dataProp]
56
- );
57
-
58
- const dataWithSections = React.useMemo(() => {
59
- const result: SectionListItem<T>[] = [];
60
- const sectionDataItems: { [key: string]: T[] } = {};
61
-
62
- for (const item of data) {
63
- const section = item[sectionKey]?.toString() || DEFAULT_SECTION;
64
- if (sectionDataItems[section]) {
65
- sectionDataItems[section].push(item);
66
- } else {
67
- sectionDataItems[section] = [item];
68
- }
69
- }
44
+ const SectionList = React.forwardRef(
45
+ <T extends { [key: string]: any }>(
46
+ {
47
+ sectionKey,
48
+ stickyHeader = false,
49
+ listComponent = "FlatList",
50
+ data: dataProp,
51
+ renderItem: renderItemProp,
52
+ keyExtractor: keyExtractorProp,
53
+ ...rest
54
+ }: FlatListSectionListProps<T> | FlashListSectionListProps<T>,
55
+ ref: React.Ref<FlatList | FlashList<any>>
56
+ ) => {
57
+ const data = React.useMemo(
58
+ () => (Array.isArray(dataProp) ? dataProp : []) as T[],
59
+ [dataProp]
60
+ );
70
61
 
71
- for (const section in sectionDataItems) {
72
- result.push({ type: "SECTION_ITEM", title: section });
73
- const sectionItems: SectionListDataItem<T>[] = sectionDataItems[
74
- section
75
- ].map((item) => ({ type: "DATA_ITEM", data: item }));
76
- result.push(...sectionItems);
77
- }
62
+ const dataWithSections = React.useMemo(() => {
63
+ const result: SectionListItem<T>[] = [];
64
+ const sectionDataItems: { [key: string]: T[] } = {};
78
65
 
79
- return result;
80
- }, [data, sectionKey]);
81
-
82
- const sectionHeaderIndicies = React.useMemo(
83
- () =>
84
- stickyHeader
85
- ? dataWithSections
86
- .filter((item) => item.type === "SECTION_ITEM")
87
- .map((item) => dataWithSections.indexOf(item))
88
- : undefined,
89
- [dataWithSections, stickyHeader]
90
- );
91
-
92
- const extractSectionHeader = (
93
- element: JSX.Element | null
94
- ): JSX.Element | null => {
95
- if (!element) {
96
- return null;
97
- }
66
+ for (const item of data) {
67
+ const section = item[sectionKey]?.toString() || DEFAULT_SECTION;
68
+ if (sectionDataItems[section]) {
69
+ sectionDataItems[section].push(item);
70
+ } else {
71
+ sectionDataItems[section] = [item];
72
+ }
73
+ }
74
+
75
+ for (const section in sectionDataItems) {
76
+ result.push({ type: "SECTION_ITEM", title: section });
77
+ const sectionItems: SectionListDataItem<T>[] = sectionDataItems[
78
+ section
79
+ ].map((item) => ({ type: "DATA_ITEM", data: item }));
80
+ result.push(...sectionItems);
81
+ }
98
82
 
99
- const props = element.props || {};
100
- const children = flattenReactFragments(
101
- React.Children.toArray(props.children) as React.ReactElement[]
83
+ return result;
84
+ }, [data, sectionKey]);
85
+
86
+ const sectionHeaderIndicies = React.useMemo(
87
+ () =>
88
+ stickyHeader
89
+ ? dataWithSections
90
+ .filter((item) => item.type === "SECTION_ITEM")
91
+ .map((item) => dataWithSections.indexOf(item))
92
+ : undefined,
93
+ [dataWithSections, stickyHeader]
102
94
  );
103
95
 
104
- if (element.type === SectionHeader) {
105
- return element;
106
- } else {
107
- for (const child of children) {
108
- if (child.type === SectionHeader) {
109
- return child;
110
- }
96
+ const extractSectionHeader = (
97
+ element: JSX.Element | null
98
+ ): JSX.Element | null => {
99
+ if (!element) {
100
+ return null;
111
101
  }
112
- }
113
- return null;
114
- };
115
102
 
116
- const extractRemainingNonSectionHeader = (
117
- element: JSX.Element | null
118
- ): JSX.Element | null => {
119
- if (!element) {
120
- return null;
121
- }
103
+ const props = element.props || {};
104
+ const children = flattenReactFragments(
105
+ React.Children.toArray(props.children) as React.ReactElement[]
106
+ );
122
107
 
123
- const props = element.props || {};
124
- const children = flattenReactFragments(
125
- React.Children.toArray(props.children) as React.ReactElement[]
126
- );
127
- if (element.type === SectionHeader) {
128
- return null;
129
- } else {
130
- const newChildren = [];
131
- for (const child of children) {
132
- if (child.type !== SectionHeader) {
133
- newChildren.push(child);
108
+ if (element.type === SectionHeader) {
109
+ return element;
110
+ } else {
111
+ for (const child of children) {
112
+ if (child.type === SectionHeader) {
113
+ return child;
114
+ }
134
115
  }
135
116
  }
136
- return React.cloneElement(element, {
137
- ...props,
138
- children: newChildren,
139
- });
140
- }
141
- };
117
+ return null;
118
+ };
142
119
 
143
- const renderItem = ({
144
- item,
145
- index,
146
- }: {
147
- item: SectionListItem<T>;
148
- index: number;
149
- }) => {
150
- switch (item.type) {
151
- case "SECTION_ITEM": {
152
- const renderedItem = renderItemProp({
153
- index,
154
- section: item.title,
155
- });
156
- return (
157
- extractSectionHeader(renderedItem) || (
158
- <DefaultSectionHeader title={item.title} />
159
- )
160
- );
120
+ const extractRemainingNonSectionHeader = (
121
+ element: JSX.Element | null
122
+ ): JSX.Element | null => {
123
+ if (!element) {
124
+ return null;
161
125
  }
162
- case "DATA_ITEM": {
163
- const renderedItem = renderItemProp({
164
- item: item.data,
165
- index,
166
- section: item.data[sectionKey] || DEFAULT_SECTION,
126
+
127
+ const props = element.props || {};
128
+ const children = flattenReactFragments(
129
+ React.Children.toArray(props.children) as React.ReactElement[]
130
+ );
131
+ if (element.type === SectionHeader) {
132
+ return null;
133
+ } else {
134
+ const newChildren = [];
135
+ for (const child of children) {
136
+ if (child.type !== SectionHeader) {
137
+ newChildren.push(child);
138
+ }
139
+ }
140
+ return React.cloneElement(element, {
141
+ ...props,
142
+ children: newChildren,
167
143
  });
168
- return extractRemainingNonSectionHeader(renderedItem);
169
144
  }
170
- }
171
- };
172
-
173
- const keyExtractor = (item: SectionListItem<T>, index: number) => {
174
- switch (item.type) {
175
- case "SECTION_ITEM": {
176
- return `section_${index.toString()}`;
145
+ };
146
+
147
+ const renderItem = ({
148
+ item,
149
+ index,
150
+ }: {
151
+ item: SectionListItem<T>;
152
+ index: number;
153
+ }) => {
154
+ switch (item.type) {
155
+ case "SECTION_ITEM": {
156
+ const renderedItem = renderItemProp({
157
+ index,
158
+ section: item.title,
159
+ });
160
+ return (
161
+ extractSectionHeader(renderedItem) || (
162
+ <DefaultSectionHeader title={item.title} />
163
+ )
164
+ );
165
+ }
166
+ case "DATA_ITEM": {
167
+ const renderedItem = renderItemProp({
168
+ item: item.data,
169
+ index,
170
+ section: item.data[sectionKey] || DEFAULT_SECTION,
171
+ });
172
+ return extractRemainingNonSectionHeader(renderedItem);
173
+ }
177
174
  }
178
- case "DATA_ITEM": {
179
- return keyExtractorProp?.(item.data, index) || index.toString();
175
+ };
176
+
177
+ const keyExtractor = (item: SectionListItem<T>, index: number) => {
178
+ switch (item.type) {
179
+ case "SECTION_ITEM": {
180
+ return `section_${index.toString()}`;
181
+ }
182
+ case "DATA_ITEM": {
183
+ return keyExtractorProp?.(item.data, index) || index.toString();
184
+ }
180
185
  }
186
+ };
187
+
188
+ switch (listComponent) {
189
+ case "FlatList":
190
+ return (
191
+ <FlatList
192
+ ref={ref as React.Ref<FlatList>}
193
+ stickyHeaderIndices={sectionHeaderIndicies}
194
+ {...(rest as FlatListProps<SectionListItem<T>>)}
195
+ data={dataWithSections}
196
+ renderItem={renderItem}
197
+ keyExtractor={keyExtractor}
198
+ />
199
+ );
200
+ case "FlashList":
201
+ return (
202
+ <FlashList
203
+ ref={ref as React.Ref<FlashList<SectionListItem<T>>>}
204
+ stickyHeaderIndices={sectionHeaderIndicies}
205
+ {...(rest as FlashListProps<SectionListItem<T>>)}
206
+ data={dataWithSections}
207
+ renderItem={renderItem}
208
+ keyExtractor={keyExtractor}
209
+ />
210
+ );
181
211
  }
182
- };
183
-
184
- switch (listComponent) {
185
- case "FlatList":
186
- return (
187
- <FlatList
188
- stickyHeaderIndices={sectionHeaderIndicies}
189
- {...(rest as FlatListProps<SectionListItem<T>>)}
190
- data={dataWithSections}
191
- renderItem={renderItem}
192
- keyExtractor={keyExtractor}
193
- />
194
- );
195
- case "FlashList":
196
- return (
197
- <FlashList
198
- stickyHeaderIndices={sectionHeaderIndicies}
199
- {...(rest as FlashListProps<SectionListItem<T>>)}
200
- data={dataWithSections}
201
- renderItem={renderItem}
202
- keyExtractor={keyExtractor}
203
- />
204
- );
205
212
  }
206
- };
213
+ );
207
214
 
208
215
  export default SectionList;
@@ -5,9 +5,9 @@ import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
5
5
  * A FlashList wrapper that takes a single `style` prop and internally extracts
6
6
  * the appropriate style keys into the `contentContainerStyle`
7
7
  */
8
- const SimpleStyleFlashList = ({ style: styleProp, data, ...rest }) => {
8
+ const SimpleStyleFlashList = React.forwardRef(({ style: styleProp, data, ...rest }, ref) => {
9
9
  const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp);
10
- return (React.createElement(FlashList, { style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
11
- };
10
+ return (React.createElement(FlashList, { ref: ref, style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
11
+ });
12
12
  export default SimpleStyleFlashList;
13
13
  //# sourceMappingURL=SimpleStyleFlashList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SimpleStyleFlashList.js","sourceRoot":"","sources":["SimpleStyleFlashList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,oBAAoB,GAAG,CAAgB,EAC3C,KAAK,EAAE,SAAS,EAChB,IAAI,EACJ,GAAG,IAAI,EAC0C,EAAE,EAAE;IACrD,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,SAAS,IACR,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqC,EAC5D,IAAI,EAAE,IAAI,KACN,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"SimpleStyleFlashList.js","sourceRoot":"","sources":["SimpleStyleFlashList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,oBAAoB,GAAG,KAAK,CAAC,UAAU,CAC3C,CACE,EACE,KAAK,EAAE,SAAS,EAChB,IAAI,EACJ,GAAG,IAAI,EAC0C,EACnD,GAA8B,EAC9B,EAAE;IACF,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,SAAS,IACR,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqC,EAC5D,IAAI,EAAE,IAAI,KACN,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -7,22 +7,28 @@ import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
7
7
  * A FlashList wrapper that takes a single `style` prop and internally extracts
8
8
  * the appropriate style keys into the `contentContainerStyle`
9
9
  */
10
- const SimpleStyleFlashList = <T extends any>({
11
- style: styleProp,
12
- data,
13
- ...rest
14
- }: Omit<FlashListProps<T>, "contentContainerStyle">) => {
15
- const { style, contentContainerStyle } =
16
- useSplitContentContainerStyles(styleProp);
10
+ const SimpleStyleFlashList = React.forwardRef(
11
+ <T extends any>(
12
+ {
13
+ style: styleProp,
14
+ data,
15
+ ...rest
16
+ }: Omit<FlashListProps<T>, "contentContainerStyle">,
17
+ ref: React.Ref<FlashList<any>>
18
+ ) => {
19
+ const { style, contentContainerStyle } =
20
+ useSplitContentContainerStyles(styleProp);
17
21
 
18
- return (
19
- <FlashList
20
- style={style}
21
- contentContainerStyle={contentContainerStyle as ContentStyle}
22
- data={data}
23
- {...rest}
24
- />
25
- );
26
- };
22
+ return (
23
+ <FlashList
24
+ ref={ref}
25
+ style={style}
26
+ contentContainerStyle={contentContainerStyle as ContentStyle}
27
+ data={data}
28
+ {...rest}
29
+ />
30
+ );
31
+ }
32
+ );
27
33
 
28
34
  export default SimpleStyleFlashList;
@@ -5,9 +5,9 @@ import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
5
5
  * A FlatList wrapper that takes a single `style` prop and internally extracts
6
6
  * the appropriate style keys into the `contentContainerStyle`
7
7
  */
8
- const SimpleStyleFlatList = ({ style: styleProp, data, ...rest }) => {
8
+ const SimpleStyleFlatList = React.forwardRef(({ style: styleProp, data, ...rest }, ref) => {
9
9
  const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp);
10
- return (React.createElement(FlatList, { style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
11
- };
10
+ return (React.createElement(FlatList, { ref: ref, style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
11
+ });
12
12
  export default SimpleStyleFlatList;
13
13
  //# sourceMappingURL=SimpleStyleFlatList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SimpleStyleFlatList.js","sourceRoot":"","sources":["SimpleStyleFlatList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,mBAAmB,GAAG,CAAgB,EAC1C,KAAK,EAAE,SAAS,EAChB,IAAI,EACJ,GAAG,IAAI,EACyC,EAAE,EAAE;IACpD,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,QAAQ,IACP,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,EAC5C,IAAI,EAAE,IAAI,KACN,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"SimpleStyleFlatList.js","sourceRoot":"","sources":["SimpleStyleFlatList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,mBAAmB,GAAG,KAAK,CAAC,UAAU,CAC1C,CACE,EACE,KAAK,EAAE,SAAS,EAChB,IAAI,EACJ,GAAG,IAAI,EACyC,EAClD,GAAwB,EACxB,EAAE;IACF,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,QAAQ,IACP,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,EAC5C,IAAI,EAAE,IAAI,KACN,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -7,22 +7,28 @@ import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
7
7
  * A FlatList wrapper that takes a single `style` prop and internally extracts
8
8
  * the appropriate style keys into the `contentContainerStyle`
9
9
  */
10
- const SimpleStyleFlatList = <T extends any>({
11
- style: styleProp,
12
- data,
13
- ...rest
14
- }: Omit<FlatListProps<T>, "contentContainerStyle">) => {
15
- const { style, contentContainerStyle } =
16
- useSplitContentContainerStyles(styleProp);
10
+ const SimpleStyleFlatList = React.forwardRef(
11
+ <T extends any>(
12
+ {
13
+ style: styleProp,
14
+ data,
15
+ ...rest
16
+ }: Omit<FlatListProps<T>, "contentContainerStyle">,
17
+ ref: React.Ref<FlatList>
18
+ ) => {
19
+ const { style, contentContainerStyle } =
20
+ useSplitContentContainerStyles(styleProp);
17
21
 
18
- return (
19
- <FlatList
20
- style={style}
21
- contentContainerStyle={contentContainerStyle}
22
- data={data}
23
- {...rest}
24
- />
25
- );
26
- };
22
+ return (
23
+ <FlatList
24
+ ref={ref}
25
+ style={style}
26
+ contentContainerStyle={contentContainerStyle}
27
+ data={data}
28
+ {...rest}
29
+ />
30
+ );
31
+ }
32
+ );
27
33
 
28
34
  export default SimpleStyleFlatList;
@@ -5,9 +5,9 @@ import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
5
5
  * A KeyboardAwareScrollView wrapper that takes a single `style` prop and internally extracts
6
6
  * the appropriate style keys into the `contentContainerStyle`
7
7
  */
8
- const SimpleStyleKeyboardAwareScrollView = ({ style: styleProp, ...rest }) => {
8
+ const SimpleStyleKeyboardAwareScrollView = React.forwardRef(({ style: styleProp, ...rest }, ref) => {
9
9
  const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp);
10
- return (React.createElement(KeyboardAwareScrollView, { style: style, contentContainerStyle: contentContainerStyle, ...rest }));
11
- };
10
+ return (React.createElement(KeyboardAwareScrollView, { ref: ref, style: style, contentContainerStyle: contentContainerStyle, ...rest }));
11
+ });
12
12
  export default SimpleStyleKeyboardAwareScrollView;
13
13
  //# sourceMappingURL=SimpleStyleKeyboardAwareScrollView.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SimpleStyleKeyboardAwareScrollView.js","sourceRoot":"","sources":["SimpleStyleKeyboardAwareScrollView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAElF,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,kCAAkC,GAEpC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IACpC,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,uBAAuB,IACtB,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,KACxC,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,kCAAkC,CAAC"}
1
+ {"version":3,"file":"SimpleStyleKeyboardAwareScrollView.js","sourceRoot":"","sources":["SimpleStyleKeyboardAwareScrollView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAElF,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,kCAAkC,GAAG,KAAK,CAAC,UAAU,CACzD,CACE,EACE,KAAK,EAAE,SAAS,EAChB,GAAG,IAAI,EACqD,EAC9D,GAAuC,EACvC,EAAE;IACF,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,uBAAuB,IACtB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,KACxC,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,kCAAkC,CAAC"}
@@ -7,19 +7,26 @@ import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
7
7
  * A KeyboardAwareScrollView wrapper that takes a single `style` prop and internally extracts
8
8
  * the appropriate style keys into the `contentContainerStyle`
9
9
  */
10
- const SimpleStyleKeyboardAwareScrollView: React.FC<
11
- Omit<KeyboardAwareScrollViewProps, "contentContainerStyle">
12
- > = ({ style: styleProp, ...rest }) => {
13
- const { style, contentContainerStyle } =
14
- useSplitContentContainerStyles(styleProp);
10
+ const SimpleStyleKeyboardAwareScrollView = React.forwardRef(
11
+ (
12
+ {
13
+ style: styleProp,
14
+ ...rest
15
+ }: Omit<KeyboardAwareScrollViewProps, "contentContainerStyle">,
16
+ ref: React.Ref<KeyboardAwareScrollView>
17
+ ) => {
18
+ const { style, contentContainerStyle } =
19
+ useSplitContentContainerStyles(styleProp);
15
20
 
16
- return (
17
- <KeyboardAwareScrollView
18
- style={style}
19
- contentContainerStyle={contentContainerStyle}
20
- {...rest}
21
- />
22
- );
23
- };
21
+ return (
22
+ <KeyboardAwareScrollView
23
+ ref={ref}
24
+ style={style}
25
+ contentContainerStyle={contentContainerStyle}
26
+ {...rest}
27
+ />
28
+ );
29
+ }
30
+ );
24
31
 
25
32
  export default SimpleStyleKeyboardAwareScrollView;
@@ -5,9 +5,9 @@ import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
5
5
  * A MasonryFlashList wrapper that takes a single `style` prop and internally extracts
6
6
  * the appropriate style keys into the `contentContainerStyle`
7
7
  */
8
- const SimpleStyleMasonryFlashList = ({ style: styleProp, data, ...rest }) => {
8
+ const SimpleStyleMasonryFlashList = React.forwardRef(({ style: styleProp, data, ...rest }, ref) => {
9
9
  const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp);
10
- return (React.createElement(MasonryFlashList, { style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
11
- };
10
+ return (React.createElement(MasonryFlashList, { ref: ref, style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
11
+ });
12
12
  export default SimpleStyleMasonryFlashList;
13
13
  //# sourceMappingURL=SimpleStyleMasonryFlashList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SimpleStyleMasonryFlashList.js","sourceRoot":"","sources":["SimpleStyleMasonryFlashList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,2BAA2B,GAAG,CAAgB,EAClD,KAAK,EAAE,SAAS,EAChB,IAAI,EACJ,GAAG,IAAI,EACiD,EAAE,EAAE;IAC5D,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,gBAAgB,IACf,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqC,EAC5D,IAAI,EAAE,IAAI,KACN,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
1
+ {"version":3,"file":"SimpleStyleMasonryFlashList.js","sourceRoot":"","sources":["SimpleStyleMasonryFlashList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAMvD,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,2BAA2B,GAAG,KAAK,CAAC,UAAU,CAClD,CACE,EACE,KAAK,EAAE,SAAS,EAChB,IAAI,EACJ,GAAG,IAAI,EACiD,EAC1D,GAAwC,EACxC,EAAE;IACF,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,gBAAgB,IACf,GAAG,EAAE,GAAU,EACf,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqC,EAC5D,IAAI,EAAE,IAAI,KACN,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,2BAA2B,CAAC"}