@draftbit/core 49.5.2-ace73d.2 → 49.5.2-e8f32c.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 +3 -4
  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 +5 -3
  223. package/lib/typescript/src/components/TabView/TabView.js +4 -4
  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 +3 -4
  330. package/src/components/Checkbox/CheckboxRow.js.map +1 -1
  331. package/src/components/Checkbox/CheckboxRow.tsx +2 -9
  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 +4 -4
  463. package/src/components/TabView/TabView.js.map +1 -1
  464. package/src/components/TabView/TabView.tsx +7 -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
@@ -26,37 +26,52 @@ export const SwipeableListContext =
26
26
  onStopSwiping: () => {},
27
27
  });
28
28
 
29
- const SwipeableList = <T extends object>({
30
- disableScrollWhenSwiping = true,
31
- listComponent = "FlatList",
32
- ...rest
33
- }: FlashListSwipeableListProps<T> | FlatListSwipeableListProps<T>) => {
34
- const [isSwiping, setIsSwiping] = React.useState(false);
35
-
36
- const onStartSwiping = () => {
37
- setIsSwiping(true);
38
- };
39
-
40
- const onStopSwiping = () => {
41
- setIsSwiping(false);
42
- };
43
-
44
- rest.scrollEnabled = disableScrollWhenSwiping ? !isSwiping : true;
45
-
46
- const renderListComponent = () => {
47
- switch (listComponent) {
48
- case "FlatList":
49
- return <FlatList {...(rest as FlatListProps<T>)} />;
50
- case "FlashList":
51
- return <FlashList {...(rest as FlashListProps<T>)} />;
52
- }
53
- };
54
-
55
- return (
56
- <SwipeableListContext.Provider value={{ onStartSwiping, onStopSwiping }}>
57
- <>{renderListComponent()}</>
58
- </SwipeableListContext.Provider>
59
- );
60
- };
29
+ const SwipeableList = React.forwardRef(
30
+ <T extends object>(
31
+ {
32
+ disableScrollWhenSwiping = true,
33
+ listComponent = "FlatList",
34
+ ...rest
35
+ }: FlashListSwipeableListProps<T> | FlatListSwipeableListProps<T>,
36
+ ref: React.Ref<FlatList | FlashList<any>>
37
+ ) => {
38
+ const [isSwiping, setIsSwiping] = React.useState(false);
39
+
40
+ const onStartSwiping = () => {
41
+ setIsSwiping(true);
42
+ };
43
+
44
+ const onStopSwiping = () => {
45
+ setIsSwiping(false);
46
+ };
47
+
48
+ rest.scrollEnabled = disableScrollWhenSwiping ? !isSwiping : true;
49
+
50
+ const renderListComponent = () => {
51
+ switch (listComponent) {
52
+ case "FlatList":
53
+ return (
54
+ <FlatList
55
+ ref={ref as React.Ref<FlatList>}
56
+ {...(rest as FlatListProps<T>)}
57
+ />
58
+ );
59
+ case "FlashList":
60
+ return (
61
+ <FlashList
62
+ ref={ref as React.Ref<FlashList<T>>}
63
+ {...(rest as FlashListProps<T>)}
64
+ />
65
+ );
66
+ }
67
+ };
68
+
69
+ return (
70
+ <SwipeableListContext.Provider value={{ onStartSwiping, onStopSwiping }}>
71
+ <>{renderListComponent()}</>
72
+ </SwipeableListContext.Provider>
73
+ );
74
+ }
75
+ );
61
76
 
62
77
  export default SwipeableList;
@@ -1,8 +1,7 @@
1
- import { withTheme } from "@draftbit/theme";
2
1
  import React from "react";
3
2
  import { View } from "react-native";
4
3
  import SwiperComponent from "react-native-web-swiper";
5
- const Swiper = ({ theme, vertical = false, loop = false, timeout = 0, from = 0, prevTitle = "", nextTitle = "", prevTitleColor, nextTitleColor, dotsTouchable = true, dotColor = theme.colors.foreground.brand, dotActiveColor = theme.colors.branding.primary, data, keyExtractor, renderItem, children: childrenProp, onIndexChanged: onIndexChangedProp, onSwipe, onSwipedNext, onSwipedPrevious, minDistanceForAction, minDistanceToCapture, style, }) => {
4
+ const Swiper = ({ vertical = false, loop = false, timeout = 0, from = 0, prevTitle = "", nextTitle = "", prevTitleColor, nextTitleColor, dotsTouchable = true, dotColor, dotActiveColor, data, keyExtractor, renderItem, children: childrenProp, onIndexChanged: onIndexChangedProp, onSwipe, onSwipedNext, onSwipedPrevious, minDistanceForAction, minDistanceToCapture, style, }) => {
6
5
  var _a;
7
6
  const [currentIndex, setCurrentIndex] = React.useState(0);
8
7
  const numberOfItems = (_a = data === null || data === void 0 ? void 0 : data.length) !== null && _a !== void 0 ? _a : React.Children.count(childrenProp);
@@ -71,5 +70,5 @@ const Swiper = ({ theme, vertical = false, loop = false, timeout = 0, from = 0,
71
70
  : {}),
72
71
  } }, children)));
73
72
  };
74
- export default withTheme(Swiper);
73
+ export default Swiper;
75
74
  //# sourceMappingURL=Swiper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Swiper.js","sourceRoot":"","sources":["Swiper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAwB,MAAM,cAAc,CAAC;AAC1D,OAAO,eAAe,MAAM,yBAAyB,CAAC;AA4BtD,MAAM,MAAM,GAAG,CAAC,EACd,KAAK,EACL,QAAQ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,QAAQ,CACnC,CAAC;QACF,IAAI,SAAS,CAAC,OAAO,EAAE;YACrB,SAAS,CAAC,OAAO,CAAC,QAAQ,GAAG,aAAa,CAAC;YAC3C,SAAS,CAAC,OAAO,CAAC,KAAK,GAAG,aAAa,CAAC,MAAM,CAAC;YAC/C,SAAS,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;SACjC;IACH,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,CACL,oBAAC,IAAI,IAAC,KAAK,EAAE,KAAK;QAEhB,oBAAC,eAAe,IACd,GAAG,EAAE,SAAS,EACd,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,EAC9B,oBAAoB,EAAE,oBAAoB,EAC1C,oBAAoB,EAAE,oBAAoB,EAC1C,aAAa,EAAE;gBACb,SAAS;gBACT,SAAS;gBACT,cAAc,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE;gBACzC,cAAc,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE;gBACzC,aAAa;gBACb,GAAG,CAAC,QAAQ;oBACV,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,UAAU,EAAE,EAAE,eAAe,EAAE,QAAQ,EAAE,EAAE,EAAE;oBAC7D,CAAC,CAAC,EAAE,CAAC;gBACP,GAAG,CAAC,cAAc;oBAChB,CAAC,CAAC,EAAE,cAAc,EAAE,EAAE,eAAe,EAAE,cAAc,EAAE,EAAE;oBACzD,CAAC,CAAC,EAAE,CAAC;aACR,IAEA,QAAQ,CACO,CACb,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -1,4 +1,3 @@
1
- import { ReadTheme, withTheme } from "@draftbit/theme";
2
1
  import React from "react";
3
2
  import { View, StyleProp, ViewStyle } from "react-native";
4
3
  import SwiperComponent from "react-native-web-swiper";
@@ -26,11 +25,9 @@ export interface SwiperProps<T> {
26
25
  onIndexChanged?: (index: number) => void;
27
26
  minDistanceForAction?: number;
28
27
  minDistanceToCapture?: number;
29
- theme: ReadTheme;
30
28
  }
31
29
 
32
30
  const Swiper = ({
33
- theme,
34
31
  vertical = false,
35
32
  loop = false,
36
33
  timeout = 0,
@@ -40,8 +37,8 @@ const Swiper = ({
40
37
  prevTitleColor,
41
38
  nextTitleColor,
42
39
  dotsTouchable = true,
43
- dotColor = theme.colors.foreground.brand,
44
- dotActiveColor = theme.colors.branding.primary,
40
+ dotColor,
41
+ dotActiveColor,
45
42
  data,
46
43
  keyExtractor,
47
44
  renderItem,
@@ -148,4 +145,4 @@ const Swiper = ({
148
145
  );
149
146
  };
150
147
 
151
- export default withTheme(Swiper);
148
+ export default Swiper;
@@ -1,10 +1,11 @@
1
1
  import * as React from "react";
2
2
  import { Switch as NativeSwitch, } from "react-native";
3
- import { withTheme } from "@draftbit/theme";
3
+ import { withTheme } from "../theming";
4
4
  import FormRow from "./FormRow";
5
+ import { RowDirection } from "@draftbit/types";
5
6
  import { usePrevious } from "../hooks";
6
7
  function Switch({ value, defaultValue, disabled, onValueChange, activeTrackColor, inactiveTrackColor, activeThumbColor, inactiveThumbColor, theme, style, ...rest }) {
7
- const activeTrackThemeColor = activeTrackColor || theme.colors.branding.primary;
8
+ const activeTrackThemeColor = activeTrackColor || theme.colors.primary;
8
9
  const inactiveTrackThemeColor = inactiveTrackColor || "#EEE";
9
10
  const activeThumbThemeColor = activeThumbColor || "#FFF";
10
11
  const inactiveThumbThemeColor = inactiveThumbColor || "#FFF";
@@ -32,7 +33,7 @@ function Switch({ value, defaultValue, disabled, onValueChange, activeTrackColor
32
33
  onValueChange && onValueChange(bool);
33
34
  }, ...rest }));
34
35
  }
35
- function Row({ label = "Label", direction = "row", style, value, defaultValue, disabled, onValueChange, activeTrackColor, inactiveTrackColor, activeThumbColor, inactiveThumbColor, theme, ...rest }) {
36
+ function Row({ label = "Label", direction = RowDirection.Row, style, value, defaultValue, disabled, onValueChange, activeTrackColor, inactiveTrackColor, activeThumbColor, inactiveThumbColor, theme, ...rest }) {
36
37
  const [checked, setChecked] = React.useState(value != null ? value : defaultValue);
37
38
  React.useEffect(() => {
38
39
  if (value != null) {
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.js","sourceRoot":"","sources":["Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,MAAM,IAAI,YAAY,GAIvB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAcvC,SAAS,MAAM,CAAC,EACd,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,EACL,KAAK,EACL,GAAG,IAAI,EACD;IACN,MAAM,qBAAqB,GACzB,gBAAgB,IAAI,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC;IACpD,MAAM,uBAAuB,GAAG,kBAAkB,IAAI,MAAM,CAAC;IAE7D,MAAM,qBAAqB,GAAG,gBAAgB,IAAI,MAAM,CAAC;IACzD,MAAM,uBAAuB,GAAG,kBAAkB,IAAI,MAAM,CAAC;IAE7D,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,IAAI,YAAY,CAAC,CAAC;IAEpE,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,KAAK,OAAO,EAAE;YACtC,UAAU,CAAC,KAAK,CAAC,CAAC;SACnB;IACH,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;IAErB,uEAAuE;IACvE,kCAAkC;IACl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AC,EACD,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,KACR,IAAI;QAER,oBAAC,MAAM,IACL,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,gBAAgB,EAClC,kBAAkB,EAAE,kBAAkB,EACtC,gBAAgB,EAAE,gBAAgB,EAClC,kBAAkB,EAAE,kBAAkB,GACtC,CACM,CACX,CAAC;AACJ,CAAC;AAED,MAAM,SAAS,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,eAAe,SAAS,CAAC,MAAM,CAAC,CAAC"}
@@ -5,9 +5,10 @@ import {
5
5
  StyleProp,
6
6
  ViewStyle,
7
7
  } from "react-native";
8
- import { withTheme } from "@draftbit/theme";
8
+ import { withTheme } from "../theming";
9
9
  import FormRow from "./FormRow";
10
- import type { ReadTheme } from "@draftbit/theme";
10
+ import { RowDirection } from "@draftbit/types";
11
+ import type { Theme } from "../styles/DefaultTheme";
11
12
  import { usePrevious } from "../hooks";
12
13
 
13
14
  type Props = {
@@ -15,7 +16,7 @@ type Props = {
15
16
  disabled?: boolean;
16
17
  onValueChange?: (value: boolean) => void;
17
18
  defaultValue?: boolean;
18
- theme: ReadTheme;
19
+ theme: Theme;
19
20
  activeTrackColor: string;
20
21
  inactiveTrackColor: string;
21
22
  activeThumbColor: string;
@@ -35,8 +36,7 @@ function Switch({
35
36
  style,
36
37
  ...rest
37
38
  }: Props) {
38
- const activeTrackThemeColor =
39
- activeTrackColor || theme.colors.branding.primary;
39
+ const activeTrackThemeColor = activeTrackColor || theme.colors.primary;
40
40
  const inactiveTrackThemeColor = inactiveTrackColor || "#EEE";
41
41
 
42
42
  const activeThumbThemeColor = activeThumbColor || "#FFF";
@@ -83,13 +83,13 @@ function Switch({
83
83
 
84
84
  type RowProps = {
85
85
  label: string;
86
- direction: "row" | "column";
86
+ direction: RowDirection;
87
87
  style?: StyleProp<ViewStyle>;
88
88
  };
89
89
 
90
90
  function Row({
91
91
  label = "Label",
92
- direction = "row",
92
+ direction = RowDirection.Row,
93
93
  style,
94
94
  value,
95
95
  defaultValue,
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { TabView, TabBar, } from "react-native-tab-view";
3
3
  import TabViewItem from "./TabViewItem";
4
- import { withTheme } from "@draftbit/theme";
4
+ import { withTheme } from "../../theming";
5
5
  import { flattenReactFragments, extractStyles } from "../../utilities";
6
6
  const TabViewComponent = ({ Icon, onIndexChanged, onEndReached, initialTabIndex = 0, tabBarPosition, keyboardDismissMode, swipeEnabled, scrollEnabled, activeColor, inactiveColor, pressColor, indicatorColor, tabsBackgroundColor, iconSize = 16, style, theme, children: childrenProp, }) => {
7
7
  const [index, setIndex] = React.useState(initialTabIndex);
@@ -30,10 +30,10 @@ const TabViewComponent = ({ Icon, onIndexChanged, onEndReached, initialTabIndex
30
30
  }
31
31
  };
32
32
  const renderTabBar = (props) => {
33
- return (React.createElement(TabBar, { ...props, activeColor: activeColor || theme.colors.branding.primary, inactiveColor: inactiveColor || "rgb(200,200,200)", pressColor: pressColor || theme.colors.branding.primary, scrollEnabled: scrollEnabled, indicatorStyle: {
34
- backgroundColor: indicatorColor || theme.colors.branding.primary,
33
+ return (React.createElement(TabBar, { ...props, activeColor: activeColor || theme.colors.primary, inactiveColor: inactiveColor || "rgb(200,200,200)", pressColor: pressColor || theme.colors.primary, scrollEnabled: scrollEnabled, indicatorStyle: {
34
+ backgroundColor: indicatorColor || theme.colors.primary,
35
35
  }, labelStyle: [{ textTransform: "none" }, textStyles], renderIcon: ({ route, color }) => (route === null || route === void 0 ? void 0 : route.icon) ? (React.createElement(Icon, { name: route.icon, color: color, size: iconSize })) : null, style: {
36
- backgroundColor: tabsBackgroundColor || theme.colors.background.brand,
36
+ backgroundColor: tabsBackgroundColor || theme.colors.background,
37
37
  } }));
38
38
  };
39
39
  const renderScene = ({ route }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"TabView.js","sourceRoot":"","sources":["TabView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,OAAO,EACP,MAAM,GAIP,MAAM,uBAAuB,CAAC;AAE/B,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AA6BvE,MAAM,gBAAgB,GAAoD,CAAC,EACzE,IAAI,EACJ,cAAc,EACd,YAAY,EACZ,eAAe,GAAG,CAAC,EACnB,cAAc,EACd,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,WAAW,EACX,aAAa,EACb,UAAU,EACV,cAAc,EACd,mBAAmB,EACnB,QAAQ,GAAG,EAAE,EACb,KAAK,EACL,KAAK,EACL,QAAQ,EAAE,YAAY,GACvB,EAAE,EAAE;IACH,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;IAC1D,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAU,EAAE,CAAC,CAAC;IAExD,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IAExD,MAAM,QAAQ,GAAsB,KAAK,CAAC,OAAO,CAC/C,GAAG,EAAE,CACH,qBAAqB,CACnB,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAyB,CAC7D,CAAC,MAAM,CACN,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,WAAW,CACrE,EACH,CAAC,YAAY,CAAC,CACf,CAAC;IAEF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IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,GAAI,CACzD,CAAC,CAAC,CAAC,IAAI,EAEV,KAAK,EAAE;gBACL,eAAe,EAAE,mBAAmB,IAAI,KAAK,CAAC,MAAM,CAAC,UAAU;aAChE,GACD,CACH,CAAC;IACJ,CAAC,CAAC;IAEF,MAAM,WAAW,GAAG,CAAC,EAAE,KAAK,EAAc,EAAE,EAAE;QAC5C,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAChC,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;IACzB,CAAC,CAAC;IAEF,gDAAgD;IAChD,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;QAClB,OAAO,yCAAK,CAAC;KACd;IAED,OAAO,CACL,oBAAC,OAAO,IACN,KAAK,EAAE,UAAU,EACjB,eAAe,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAClC,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,kBAAkB,EACjC,cAAc,EAAE,cAAc,EAC9B,mBAAmB,EAAE,mBAAmB,EACxC,YAAY,EAAE,YAAY,GAC1B,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC,gBAAgB,CAAC,CAAC"}
@@ -10,8 +10,8 @@ import {
10
10
 
11
11
  import TabViewItem from "./TabViewItem";
12
12
  import type { IconSlot } from "../../interfaces/Icon";
13
- import { withTheme } from "@draftbit/theme";
14
- import type { ReadTheme } from "@draftbit/theme";
13
+ import { withTheme } from "../../theming";
14
+ import type { Theme } from "../../styles/DefaultTheme";
15
15
  import { flattenReactFragments, extractStyles } from "../../utilities";
16
16
 
17
17
  type SceneProps = SceneRendererProps & {
@@ -38,7 +38,7 @@ type TabViewProps = {
38
38
  tabsBackgroundColor?: string;
39
39
  iconSize?: number;
40
40
  style?: StyleProp<ViewStyle | TextStyle>;
41
- theme: ReadTheme;
41
+ theme: Theme;
42
42
  } & IconSlot;
43
43
 
44
44
  const TabViewComponent: React.FC<React.PropsWithChildren<TabViewProps>> = ({
@@ -104,12 +104,12 @@ const TabViewComponent: React.FC<React.PropsWithChildren<TabViewProps>> = ({
104
104
  return (
105
105
  <TabBar
106
106
  {...props}
107
- activeColor={activeColor || theme.colors.branding.primary}
107
+ activeColor={activeColor || theme.colors.primary}
108
108
  inactiveColor={inactiveColor || "rgb(200,200,200)"}
109
- pressColor={pressColor || theme.colors.branding.primary}
109
+ pressColor={pressColor || theme.colors.primary}
110
110
  scrollEnabled={scrollEnabled}
111
111
  indicatorStyle={{
112
- backgroundColor: indicatorColor || theme.colors.branding.primary,
112
+ backgroundColor: indicatorColor || theme.colors.primary,
113
113
  }}
114
114
  labelStyle={[{ textTransform: "none" }, textStyles]}
115
115
  renderIcon={({ route, color }) =>
@@ -118,7 +118,7 @@ const TabViewComponent: React.FC<React.PropsWithChildren<TabViewProps>> = ({
118
118
  ) : null
119
119
  }
120
120
  style={{
121
- backgroundColor: tabsBackgroundColor || theme.colors.background.brand,
121
+ backgroundColor: tabsBackgroundColor || theme.colors.background,
122
122
  }}
123
123
  />
124
124
  );
@@ -1,8 +1,8 @@
1
1
  import React from "react";
2
2
  import { ScrollView, View, StyleSheet, } from "react-native";
3
- import { withTheme } from "@draftbit/theme";
3
+ import { withTheme } from "../../theming";
4
4
  import { generateBorderStyles, TableStyleContext, } from "./TableCommon";
5
- const Table = ({ theme, borderWidth = 1, borderColor = theme.colors.border.brand, borderStyle = "solid", drawTopBorder = true, drawBottomBorder = false, drawStartBorder = false, drawEndBorder = false, cellVerticalPadding = 10, cellHorizontalPadding = 10, data, keyExtractor, renderItem, children: childrenProp, style, ...rest }) => {
5
+ const Table = ({ theme, borderWidth = 1, borderColor = theme.colors.divider, borderStyle = "solid", drawTopBorder = true, drawBottomBorder = false, drawStartBorder = false, drawEndBorder = false, cellVerticalPadding = 10, cellHorizontalPadding = 10, data, keyExtractor, renderItem, children: childrenProp, style, ...rest }) => {
6
6
  //Both 'renderItem' and 'data' are optional to allow direct children. But if one is included, both need to be included
7
7
  if ((data && !renderItem) || (renderItem && !data)) {
8
8
  throw new Error("'renderItem' and 'data' need to both be provided to render from 'data'. Either remove them entirley or include both");
@@ -1 +1 @@
1
- {"version":3,"file":"Table.js","sourceRoot":"","sources":["Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,UAAU,EAGV,IAAI,EACJ,UAAU,GAEX,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EACL,oBAAoB,EAEpB,iBAAiB,GAElB,MAAM,eAAe,CAAC;AAUvB,MAAM,KAAK,GAAG,CAAmB,EAC/B,KAAK,EACL,WAAW,GAAG,CAAC,EACf,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,EACvC,WAAW,GAAG,OAAO,EACrB,aAAa,GAAG,IAAI,EACpB,gBAAgB,GAAG,KAAK,EACxB,eAAe,GAAG,KAAK,EACvB,aAAa,GAAG,KAAK,EACrB,mBAAmB,GAAG,EAAE,EACxB,qBAAqB,GAAG,EAAE,EAC1B,IAAI,EACJ,YAAY,EACZ,UAAU,EACV,QAAQ,EAAE,YAAY,EACtB,KAAK,EACL,GAAG,IAAI,EAC2B,EAAE,EAAE;IACtC,sHAAsH;IACtH,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,EAAE;QAClD,MAAM,IAAI,KAAK,CACb,qHAAqH,CACtH,CAAC;KACH;IAED,IAAI,IAAI,IAAI,UAAU,IAAI,YAAY,EAAE;QACtC,OAAO,CAAC,IAAI,CACV,qEAAqE,CACtE,CAAC;KACH;IAED,MAAM,aAAa,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,MAAW,EAAW,EAAE;QAC/D,OAAO,MAAM,CAAC,a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,aAAa,EAAE,aAAa,CAAC,CAAC,CAAC;IAEnC,MAAM,YAAY,GAAoB;QACpC,WAAW;QACX,WAAW;QACX,WAAW;QACX,qBAAqB;QACrB,mBAAmB;KACpB,CAAC;IAEF,MAAM,eAAe,GAAG,oBAAoB,CAAC;QAC3C,WAAW;QACX,WAAW;QACX,WAAW;QACX,aAAa;QACb,gBAAgB;QAChB,eAAe;QACf,aAAa;KACd,CAAC,CAAC;IAEH,OAAO,CACL,oBAAC,iBAAiB,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY;QAC7C,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,eAAe,EAAE,KAAK,CAAC;YACrD,0CAAG,MAAM,CAAI;YACb,oBAAC,UAAU,OAAK,IAAI,IAAG,qBAAqB,CAAc,CACrD,CACoB,CAC9B,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,IAAI,EAAE,CAAC;KACR;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC,KAAK,CAAC,CAAC"}
@@ -7,8 +7,8 @@ import {
7
7
  StyleSheet,
8
8
  ScrollViewProps,
9
9
  } from "react-native";
10
- import type { ReadTheme } from "@draftbit/theme";
11
- import { withTheme } from "@draftbit/theme";
10
+ import { Theme } from "../../styles/DefaultTheme";
11
+ import { withTheme } from "../../theming";
12
12
  import {
13
13
  generateBorderStyles,
14
14
  TableProps,
@@ -21,13 +21,13 @@ export interface Props<T> extends TableProps, ScrollViewProps {
21
21
  keyExtractor?: (item: T, index: number) => string;
22
22
  renderItem?: ({ item, index }: { item: T; index: number }) => JSX.Element;
23
23
  style?: StyleProp<ViewStyle>;
24
- theme: ReadTheme;
24
+ theme: Theme;
25
25
  }
26
26
 
27
27
  const Table = <T extends object>({
28
28
  theme,
29
29
  borderWidth = 1,
30
- borderColor = theme.colors.border.brand,
30
+ borderColor = theme.colors.divider,
31
31
  borderStyle = "solid",
32
32
  drawTopBorder = true,
33
33
  drawBottomBorder = false,
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { View, StyleSheet } from "react-native";
3
3
  import { generateBorderStyles, TableStyleContext, } from "./TableCommon";
4
- import { withTheme } from "@draftbit/theme";
4
+ import { withTheme } from "../../theming";
5
5
  import Pressable from "../Pressable";
6
6
  const TableRow = ({ borderWidth, borderColor, borderStyle, drawTopBorder = false, drawBottomBorder = true, drawStartBorder = true, drawEndBorder = false, cellVerticalPadding, cellHorizontalPadding, isTableHeader = false, children, onPress, style, theme, }) => {
7
7
  const parentContextValue = React.useContext(TableStyleContext);
@@ -26,9 +26,7 @@ const TableRow = ({ borderWidth, borderColor, borderStyle, drawTopBorder = false
26
26
  return (React.createElement(TableStyleContext.Provider, { value: contextValue },
27
27
  React.createElement(ContainerComponent, { onPress: onPress, style: [
28
28
  borderViewStyle,
29
- isTableHeader
30
- ? { backgroundColor: theme.colors.branding.primary }
31
- : {},
29
+ isTableHeader ? { backgroundColor: theme.colors.primary } : {},
32
30
  style,
33
31
  styles.cellsContainer,
34
32
  ] }, children)));
@@ -1 +1 @@
1
- {"version":3,"file":"TableRow.js","sourceRoot":"","sources":["TableRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAwB,UAAU,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EACL,oBAAoB,EAEpB,iBAAiB,GAElB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,SAAS,MAAM,cAAc,CAAC;AASrC,MAAM,QAAQ,GAA6C,CAAC,EAC1D,WAAW,EACX,WAAW,EACX,WAAW,EACX,aAAa,GAAG,KAAK,EACrB,gBAAgB,GAAG,IAAI,EACvB,eAAe,GAAG,IAAI,EACtB,aAAa,GAAG,KAAK,EACrB,mBAAmB,EACnB,qBAAqB,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gB;QAChB,eAAe;QACf,aAAa;KACd,CAAC,CAAC;IAEH,MAAM,kBAAkB,GAAG,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;IACtD,OAAO,CACL,oBAAC,iBAAiB,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY;QAC7C,oBAAC,kBAAkB,IACjB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE;gBACL,eAAe;gBACf,aAAa,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE;gBAC9D,KAAK;gBACL,MAAM,CAAC,cAAc;aACtB,IAEA,QAAQ,CACU,CACM,CAC9B,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,cAAc,EAAE;QACd,aAAa,EAAE,KAAK;KACrB;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC,QAAQ,CAAC,CAAC"}
@@ -6,15 +6,15 @@ import {
6
6
  TableStyleContext,
7
7
  TableStyleProps,
8
8
  } from "./TableCommon";
9
- import type { ReadTheme } from "@draftbit/theme";
10
- import { withTheme } from "@draftbit/theme";
9
+ import { Theme } from "../../styles/DefaultTheme";
10
+ import { withTheme } from "../../theming";
11
11
  import Pressable from "../Pressable";
12
12
 
13
13
  export interface Props extends TableProps {
14
14
  onPress?: () => void;
15
15
  isTableHeader?: boolean;
16
16
  style?: StyleProp<ViewStyle>;
17
- theme: ReadTheme;
17
+ theme: Theme;
18
18
  }
19
19
 
20
20
  const TableRow: React.FC<React.PropsWithChildren<Props>> = ({
@@ -63,9 +63,7 @@ const TableRow: React.FC<React.PropsWithChildren<Props>> = ({
63
63
  onPress={onPress}
64
64
  style={[
65
65
  borderViewStyle,
66
- isTableHeader
67
- ? { backgroundColor: theme.colors.branding.primary }
68
- : {},
66
+ isTableHeader ? { backgroundColor: theme.colors.primary } : {},
69
67
  style,
70
68
  styles.cellsContainer,
71
69
  ]}
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { Text as NativeText, I18nManager } from "react-native";
3
- import { withTheme } from "@draftbit/theme";
3
+ import { withTheme } from "../theming";
4
4
  class Text extends React.Component {
5
5
  render() {
6
6
  const { style, ...rest } = this.props;
@@ -17,7 +17,7 @@ class Text extends React.Component {
17
17
  }
18
18
  }
19
19
  export const BaseLink = ({ style, theme, title, ...props }) => {
20
- return (React.createElement(Text, { hitSlop: 8, style: [{ color: theme.colors.branding.primary }, style], theme: theme, ...props }, title));
20
+ return (React.createElement(Text, { hitSlop: 8, style: [{ color: theme.colors.primary }, style], theme: theme, ...props }, title));
21
21
  };
22
22
  const Link = withTheme(BaseLink);
23
23
  export { Link };
@@ -1 +1 @@
1
- {"version":3,"file":"Text.js","sourceRoot":"","sources":["Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,WAAW,EAAa,MAAM,cAAc,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAO5C,MAAM,IAAK,SAAQ,KAAK,CAAC,SAAgB;IAGvC,MAAM;QACJ,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACtC,MAAM,gBAAgB,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;QAE3D,OAAO,CACL,oBAAC,UAAU,OACL,IAAI,EACR,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE;gBACT,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;YACjB,CAAC,EACD,KAAK,EAAE;gBACL;oBACE,SAAS,EAAE,MAAM;oBACjB,gBAAgB;iBACjB;gBACD,KAAK;aACN,GACD,CACH,CAAC;IACJ,CAAC;CACF;AAED,MAAM,CAA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AC,EACvB,KAAK,EACL,KAAK,EACL,KAAK,EACL,GAAG,KAAK,EACJ,EAAe,EAAE;IACrB,OAAO,CACL,oBAAC,IAAI,IACH,OAAO,EAAE,CAAC,EACV,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,KAAK,CAAC,EAC/C,KAAK,EAAE,KAAK,KACR,KAAK,IAER,KAAK,CACD,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,IAAI,GAAQ,SAAS,CAAC,QAAQ,CAAC,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,CAAC;AAEhB,eAAe,SAAS,CAAC,IAAI,CAAC,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import * as React from "react";
2
2
  import { Text as NativeText, I18nManager, TextProps } 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
  type Props = {
7
- theme: ReadTheme;
7
+ theme: Theme;
8
8
  } & TextProps;
9
9
 
10
10
  class Text extends React.Component<Props> {
@@ -41,7 +41,7 @@ export const BaseLink = ({
41
41
  return (
42
42
  <Text
43
43
  hitSlop={8}
44
- style={[{ color: theme.colors.branding.primary }, style]}
44
+ style={[{ color: theme.colors.primary }, style]}
45
45
  theme={theme}
46
46
  {...props}
47
47
  >
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { View, Animated, StyleSheet, Text, I18nManager, Platform, } from "react-native";
3
- import { withTheme } from "@draftbit/theme";
3
+ import { withTheme } from "../theming";
4
4
  import { applyStyles, extractStyles } from "../utilities";
5
5
  import TextInput from "./TextInput";
6
6
  const AnimatedText = Animated.createAnimatedComponent(Text);
@@ -131,26 +131,25 @@ class TextField extends React.Component {
131
131
  return this._root && this._root.blur();
132
132
  }
133
133
  render() {
134
- const { theme, Icon, type = "underline", disabled = false, editable = true, label, error = false, leftIconName, leftIconMode, rightIconName, iconColor, iconSize, assistiveText, underlineColor: underlineColorProp, activeBorderColor: activeBorderColorProp = theme.colors.branding.primary, multiline = false, numberOfLines = 4, style, render = (props) => React.createElement(TextInput, { ...props }), ...rest } = this.props;
135
- const { colors, typography } = theme;
134
+ const { theme: { colors, typography, roundness, disabledOpacity }, Icon, type = "underline", disabled = false, editable = true, label, error = false, leftIconName, leftIconMode, rightIconName, iconColor, iconSize, assistiveText, underlineColor: underlineColorProp, activeBorderColor: activeBorderColorProp = colors.primary, multiline = false, numberOfLines = 4, style, render = (props) => React.createElement(TextInput, { ...props }), ...rest } = this.props;
136
135
  const MINIMIZED_LABEL_Y_OFFSET = -(typography.caption.lineHeight + 4);
137
136
  const OUTLINE_MINIMIZED_LABEL_Y_OFFSET = -(16 * 0.5 + 4);
138
137
  const MAXIMIZED_LABEL_FONT_SIZE = typography.subtitle1.fontSize;
139
138
  const MINIMIZED_LABEL_FONT_SIZE = typography.caption.fontSize;
140
139
  const hasActiveOutline = this.state.focused || error;
141
140
  let inputTextColor, activeColor, underlineColor, borderColor, placeholderColor, containerStyle, backgroundColor, inputStyle;
142
- inputTextColor = colors.text.strong;
141
+ inputTextColor = colors.strong;
143
142
  if (disabled) {
144
- activeColor = colors.text.light;
145
- placeholderColor = colors.text.light;
143
+ activeColor = colors.light;
144
+ placeholderColor = colors.light;
146
145
  borderColor = "transparent";
147
146
  underlineColor = "transparent";
148
- backgroundColor = colors.border.brand;
147
+ backgroundColor = colors.divider;
149
148
  }
150
149
  else {
151
- activeColor = error ? colors.text.danger : activeBorderColorProp;
152
- placeholderColor = borderColor = colors.text.light;
153
- underlineColor = underlineColorProp || colors.text.light;
150
+ activeColor = error ? colors.error : activeBorderColorProp;
151
+ placeholderColor = borderColor = colors.light;
152
+ underlineColor = underlineColorProp || colors.light;
154
153
  backgroundColor = colors.background;
155
154
  }
156
155
  if (rest.placeholderTextColor) {
@@ -165,14 +164,13 @@ class TextField extends React.Component {
165
164
  ...subtitle1,
166
165
  };
167
166
  if (!multiline) {
168
- //@ts-ignore
169
167
  inputStyle.height = lineHeight;
170
168
  }
171
169
  let assistiveTextLeftMargin;
172
170
  if (type === "underline") {
173
171
  containerStyle = {
174
- borderTopLeftRadius: 8,
175
- borderTopRightRadius: 8,
172
+ borderTopLeftRadius: roundness,
173
+ borderTopRightRadius: roundness,
176
174
  paddingBottom: 12,
177
175
  marginTop: 16,
178
176
  };
@@ -185,12 +183,12 @@ class TextField extends React.Component {
185
183
  }
186
184
  else {
187
185
  containerStyle = {
188
- borderRadius: 8,
186
+ borderRadius: roundness,
189
187
  borderColor: hasActiveOutline ? activeColor : borderColor,
190
188
  borderWidth: 1,
191
189
  paddingTop: label ? 16 * 1.5 : 16,
192
190
  paddingBottom: label ? 16 * 0.5 : 16,
193
- opacity: disabled ? 0.5 : 1,
191
+ opacity: disabled ? disabledOpacity : 1,
194
192
  backgroundColor,
195
193
  };
196
194
  if (leftIconName && leftIconMode === "inset") {
@@ -211,13 +209,13 @@ class TextField extends React.Component {
211
209
  leftIconColor = iconColor;
212
210
  }
213
211
  else if (error) {
214
- leftIconColor = colors.text.danger;
212
+ leftIconColor = colors.error;
215
213
  }
216
214
  else if (this.state.focused) {
217
- leftIconColor = colors.branding.primary;
215
+ leftIconColor = colors.primary;
218
216
  }
219
217
  else {
220
- leftIconColor = colors.text.light;
218
+ leftIconColor = colors.light;
221
219
  }
222
220
  const labelStyle = {
223
221
  ...typography.subtitle1,
@@ -291,7 +289,7 @@ class TextField extends React.Component {
291
289
  {
292
290
  backgroundColor: bgColor ||
293
291
  (error
294
- ? colors.background.danger
292
+ ? colors.error
295
293
  : this.state.focused
296
294
  ? activeColor
297
295
  : underlineColor),
@@ -358,19 +356,19 @@ class TextField extends React.Component {
358
356
  ...rest,
359
357
  value: this.state.value,
360
358
  })),
361
- leftIconName ? (React.createElement(Icon, { size: iconSize || ICON_SIZE, color: leftIconColor || colors.text.light, name: leftIconName, style: {
359
+ leftIconName ? (React.createElement(Icon, { size: iconSize || ICON_SIZE, color: leftIconColor || colors.light, name: leftIconName, style: {
362
360
  position: "absolute",
363
361
  left: leftIconMode === "inset" && type === "solid" ? 16 : 0,
364
362
  marginTop: type === "solid" ? MINIMIZED_LABEL_FONT_SIZE + 4 : 16,
365
363
  } })) : null,
366
- rightIconName ? (React.createElement(Icon, { name: rightIconName, size: iconSize || ICON_SIZE, color: iconColor || colors.text.light, style: {
364
+ rightIconName ? (React.createElement(Icon, { name: rightIconName, size: iconSize || ICON_SIZE, color: iconColor || colors.light, style: {
367
365
  position: "absolute",
368
366
  right: 16,
369
367
  marginTop: type === "solid" ? MINIMIZED_LABEL_FONT_SIZE + 4 : 16,
370
368
  } })) : null,
371
369
  assistiveText ? (React.createElement(Text, { style: [
372
370
  {
373
- color: error ? colors.text.danger : colors.text.light,
371
+ color: error ? colors.error : colors.light,
374
372
  marginTop: 8,
375
373
  marginLeft: assistiveTextLeftMargin,
376
374
  },