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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (326) hide show
  1. package/lib/typescript/tsconfig.tsbuildinfo +1 -1
  2. package/package.json +6 -4
  3. package/src/Provider.js +0 -10
  4. package/src/Provider.js.map +0 -1
  5. package/src/components/AccordionGroup.js +0 -51
  6. package/src/components/AccordionGroup.js.map +0 -1
  7. package/src/components/ActionSheet/ActionSheet.js +0 -46
  8. package/src/components/ActionSheet/ActionSheet.js.map +0 -1
  9. package/src/components/ActionSheet/ActionSheetCancel.js +0 -7
  10. package/src/components/ActionSheet/ActionSheetCancel.js.map +0 -1
  11. package/src/components/ActionSheet/ActionSheetItem.js +0 -31
  12. package/src/components/ActionSheet/ActionSheetItem.js.map +0 -1
  13. package/src/components/ActionSheet/index.js +0 -4
  14. package/src/components/ActionSheet/index.js.map +0 -1
  15. package/src/components/AspectRatio.js +0 -19
  16. package/src/components/AspectRatio.js.map +0 -1
  17. package/src/components/BottomSheet/BottomSheet.js +0 -76
  18. package/src/components/BottomSheet/BottomSheet.js.map +0 -1
  19. package/src/components/BottomSheet/index.js +0 -2
  20. package/src/components/BottomSheet/index.js.map +0 -1
  21. package/src/components/Button.js +0 -119
  22. package/src/components/Button.js.map +0 -1
  23. package/src/components/Checkbox/Checkbox.js +0 -63
  24. package/src/components/Checkbox/Checkbox.js.map +0 -1
  25. package/src/components/Checkbox/CheckboxGroupRow.js +0 -77
  26. package/src/components/Checkbox/CheckboxGroupRow.js.map +0 -1
  27. package/src/components/Checkbox/CheckboxRow.js +0 -79
  28. package/src/components/Checkbox/CheckboxRow.js.map +0 -1
  29. package/src/components/Checkbox/context.js +0 -15
  30. package/src/components/Checkbox/context.js.map +0 -1
  31. package/src/components/Checkbox/index.js +0 -3
  32. package/src/components/Checkbox/index.js.map +0 -1
  33. package/src/components/Config.js +0 -65
  34. package/src/components/Config.js.map +0 -1
  35. package/src/components/DatePicker/DatePicker.js +0 -418
  36. package/src/components/DatePicker/DatePicker.js.map +0 -1
  37. package/src/components/DatePicker/DatePickerComponent.js +0 -17
  38. package/src/components/DatePicker/DatePickerComponent.js.map +0 -1
  39. package/src/components/DatePicker/DatePickerComponent.web.js +0 -57
  40. package/src/components/DatePicker/DatePickerComponent.web.js.map +0 -1
  41. package/src/components/DatePicker/DatePickerComponentType.js +0 -2
  42. package/src/components/DatePicker/DatePickerComponentType.js.map +0 -1
  43. package/src/components/DatePicker/parseDate.js +0 -12
  44. package/src/components/DatePicker/parseDate.js.map +0 -1
  45. package/src/components/DeckSwiper/DeckSwiper.js +0 -116
  46. package/src/components/DeckSwiper/DeckSwiper.js.map +0 -1
  47. package/src/components/DeckSwiper/DeckSwiperCard.js +0 -21
  48. package/src/components/DeckSwiper/DeckSwiperCard.js.map +0 -1
  49. package/src/components/DeckSwiper/index.js +0 -3
  50. package/src/components/DeckSwiper/index.js.map +0 -1
  51. package/src/components/Divider.js +0 -14
  52. package/src/components/Divider.js.map +0 -1
  53. package/src/components/Elevation.js +0 -20
  54. package/src/components/Elevation.js.map +0 -1
  55. package/src/components/ExpoImage.js +0 -44
  56. package/src/components/ExpoImage.js.map +0 -1
  57. package/src/components/FlatList.js +0 -7
  58. package/src/components/FlatList.js.map +0 -1
  59. package/src/components/FormRow.js +0 -20
  60. package/src/components/FormRow.js.map +0 -1
  61. package/src/components/IconButton.js +0 -36
  62. package/src/components/IconButton.js.map +0 -1
  63. package/src/components/Image.js +0 -48
  64. package/src/components/Image.js.map +0 -1
  65. package/src/components/KeyboardAvoidingView.js +0 -29
  66. package/src/components/KeyboardAvoidingView.js.map +0 -1
  67. package/src/components/Layout/AspectRatio.js +0 -7
  68. package/src/components/Layout/AspectRatio.js.map +0 -1
  69. package/src/components/Layout/Center.js +0 -15
  70. package/src/components/Layout/Center.js.map +0 -1
  71. package/src/components/Layout/Circle.js +0 -16
  72. package/src/components/Layout/Circle.js.map +0 -1
  73. package/src/components/Layout/HStack.js +0 -12
  74. package/src/components/Layout/HStack.js.map +0 -1
  75. package/src/components/Layout/LayoutCommon.js +0 -8
  76. package/src/components/Layout/LayoutCommon.js.map +0 -1
  77. package/src/components/Layout/Spacer.js +0 -15
  78. package/src/components/Layout/Spacer.js.map +0 -1
  79. package/src/components/Layout/Square.js +0 -25
  80. package/src/components/Layout/Square.js.map +0 -1
  81. package/src/components/Layout/VStack.js +0 -12
  82. package/src/components/Layout/VStack.js.map +0 -1
  83. package/src/components/Layout/ZStack.js +0 -58
  84. package/src/components/Layout/ZStack.js.map +0 -1
  85. package/src/components/Layout/index.js +0 -9
  86. package/src/components/Layout/index.js.map +0 -1
  87. package/src/components/LoadingIndicator.js +0 -38
  88. package/src/components/LoadingIndicator.js.map +0 -1
  89. package/src/components/LottieAnimation.js +0 -12
  90. package/src/components/LottieAnimation.js.map +0 -1
  91. package/src/components/Markdown.js +0 -33
  92. package/src/components/Markdown.js.map +0 -1
  93. package/src/components/MediaPlayer/AudioPlayer/AudioPlayerCommon.js +0 -2
  94. package/src/components/MediaPlayer/AudioPlayer/AudioPlayerCommon.js.map +0 -1
  95. package/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js +0 -123
  96. package/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js.map +0 -1
  97. package/src/components/MediaPlayer/AudioPlayer/HeadlessAudioPlayer.js +0 -90
  98. package/src/components/MediaPlayer/AudioPlayer/HeadlessAudioPlayer.js.map +0 -1
  99. package/src/components/MediaPlayer/AudioPlayer/index.js +0 -13
  100. package/src/components/MediaPlayer/AudioPlayer/index.js.map +0 -1
  101. package/src/components/MediaPlayer/MediaPlaybackWrapper.js +0 -42
  102. package/src/components/MediaPlayer/MediaPlaybackWrapper.js.map +0 -1
  103. package/src/components/MediaPlayer/MediaPlayerCommon.js +0 -71
  104. package/src/components/MediaPlayer/MediaPlayerCommon.js.map +0 -1
  105. package/src/components/MediaPlayer/VideoPlayer/VideoPlayer.js +0 -109
  106. package/src/components/MediaPlayer/VideoPlayer/VideoPlayer.js.map +0 -1
  107. package/src/components/MediaPlayer/VideoPlayer/index.js +0 -2
  108. package/src/components/MediaPlayer/VideoPlayer/index.js.map +0 -1
  109. package/src/components/NumberInput.js +0 -63
  110. package/src/components/NumberInput.js.map +0 -1
  111. package/src/components/Picker/NativePicker.ios.js +0 -77
  112. package/src/components/Picker/NativePicker.ios.js.map +0 -1
  113. package/src/components/Picker/NativePicker.js +0 -73
  114. package/src/components/Picker/NativePicker.js.map +0 -1
  115. package/src/components/Picker/PickerCommon.js +0 -36
  116. package/src/components/Picker/PickerCommon.js.map +0 -1
  117. package/src/components/Picker/PickerInputContainer.js +0 -36
  118. package/src/components/Picker/PickerInputContainer.js.map +0 -1
  119. package/src/components/Picker/dropdown/DropDownModalPicker.js +0 -70
  120. package/src/components/Picker/dropdown/DropDownModalPicker.js.map +0 -1
  121. package/src/components/Picker/dropdown/DropDownPicker.js +0 -61
  122. package/src/components/Picker/dropdown/DropDownPicker.js.map +0 -1
  123. package/src/components/Picker/dropdown/MultiSelectPicker.js +0 -9
  124. package/src/components/Picker/dropdown/MultiSelectPicker.js.map +0 -1
  125. package/src/components/Picker/dropdown/PickerItem.js +0 -9
  126. package/src/components/Picker/dropdown/PickerItem.js.map +0 -1
  127. package/src/components/Picker/index.js +0 -22
  128. package/src/components/Picker/index.js.map +0 -1
  129. package/src/components/PinInput/CustomPinInputCell.js +0 -11
  130. package/src/components/PinInput/CustomPinInputCell.js.map +0 -1
  131. package/src/components/PinInput/PinInput.js +0 -89
  132. package/src/components/PinInput/PinInput.js.map +0 -1
  133. package/src/components/PinInput/PinInputText.js +0 -14
  134. package/src/components/PinInput/PinInputText.js.map +0 -1
  135. package/src/components/PinInput/index.js +0 -4
  136. package/src/components/PinInput/index.js.map +0 -1
  137. package/src/components/Portal/Portal.js +0 -34
  138. package/src/components/Portal/Portal.js.map +0 -1
  139. package/src/components/Portal/PortalConsumer.js +0 -28
  140. package/src/components/Portal/PortalConsumer.js.map +0 -1
  141. package/src/components/Portal/PortalHost.js +0 -109
  142. package/src/components/Portal/PortalHost.js.map +0 -1
  143. package/src/components/Portal/PortalManager.js +0 -33
  144. package/src/components/Portal/PortalManager.js.map +0 -1
  145. package/src/components/Pressable.js +0 -23
  146. package/src/components/Pressable.js.map +0 -1
  147. package/src/components/Progress/CircularProgress/CircularProgress.js +0 -103
  148. package/src/components/Progress/CircularProgress/CircularProgress.js.map +0 -1
  149. package/src/components/Progress/CircularProgress/index.js +0 -14
  150. package/src/components/Progress/CircularProgress/index.js.map +0 -1
  151. package/src/components/Progress/IndeterminateProgress.js +0 -39
  152. package/src/components/Progress/IndeterminateProgress.js.map +0 -1
  153. package/src/components/Progress/LinearProgress/LinearProgress.js +0 -57
  154. package/src/components/Progress/LinearProgress/LinearProgress.js.map +0 -1
  155. package/src/components/Progress/LinearProgress/index.js +0 -14
  156. package/src/components/Progress/LinearProgress/index.js.map +0 -1
  157. package/src/components/Progress/ProgressCommon.js +0 -2
  158. package/src/components/Progress/ProgressCommon.js.map +0 -1
  159. package/src/components/ProgressIndicator.js +0 -28
  160. package/src/components/ProgressIndicator.js.map +0 -1
  161. package/src/components/RadioButton/RadioButton.js +0 -18
  162. package/src/components/RadioButton/RadioButton.js.map +0 -1
  163. package/src/components/RadioButton/RadioButtonGroup.js +0 -44
  164. package/src/components/RadioButton/RadioButtonGroup.js.map +0 -1
  165. package/src/components/RadioButton/RadioButtonRow.js +0 -79
  166. package/src/components/RadioButton/RadioButtonRow.js.map +0 -1
  167. package/src/components/RadioButton/context.js +0 -15
  168. package/src/components/RadioButton/context.js.map +0 -1
  169. package/src/components/RadioButton/index.js +0 -4
  170. package/src/components/RadioButton/index.js.map +0 -1
  171. package/src/components/Row.js +0 -49
  172. package/src/components/Row.js.map +0 -1
  173. package/src/components/SVG.js +0 -8
  174. package/src/components/SVG.js.map +0 -1
  175. package/src/components/SVG.native.js +0 -10
  176. package/src/components/SVG.native.js.map +0 -1
  177. package/src/components/ScreenContainer.js +0 -42
  178. package/src/components/ScreenContainer.js.map +0 -1
  179. package/src/components/SectionList/SectionHeader.js +0 -14
  180. package/src/components/SectionList/SectionHeader.js.map +0 -1
  181. package/src/components/SectionList/SectionList.js +0 -111
  182. package/src/components/SectionList/SectionList.js.map +0 -1
  183. package/src/components/SectionList/index.js +0 -3
  184. package/src/components/SectionList/index.js.map +0 -1
  185. package/src/components/Shadow.js +0 -26
  186. package/src/components/Shadow.js.map +0 -1
  187. package/src/components/SimpleStyleScrollables/SimpleStyleFlashList.js +0 -13
  188. package/src/components/SimpleStyleScrollables/SimpleStyleFlashList.js.map +0 -1
  189. package/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js +0 -13
  190. package/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js.map +0 -1
  191. package/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js +0 -13
  192. package/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js.map +0 -1
  193. package/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js +0 -13
  194. package/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js.map +0 -1
  195. package/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js +0 -13
  196. package/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js.map +0 -1
  197. package/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js +0 -15
  198. package/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js.map +0 -1
  199. package/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js +0 -15
  200. package/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js.map +0 -1
  201. package/src/components/SimpleStyleScrollables/useSplitContentContainerStyles.js +0 -91
  202. package/src/components/SimpleStyleScrollables/useSplitContentContainerStyles.js.map +0 -1
  203. package/src/components/Slider.js +0 -84
  204. package/src/components/Slider.js.map +0 -1
  205. package/src/components/StarRating.js +0 -51
  206. package/src/components/StarRating.js.map +0 -1
  207. package/src/components/StepIndicator.js +0 -347
  208. package/src/components/StepIndicator.js.map +0 -1
  209. package/src/components/Stepper.js +0 -43
  210. package/src/components/Stepper.js.map +0 -1
  211. package/src/components/Surface.js +0 -55
  212. package/src/components/Surface.js.map +0 -1
  213. package/src/components/SwipeableItem/SwipeableItem.js +0 -124
  214. package/src/components/SwipeableItem/SwipeableItem.js.map +0 -1
  215. package/src/components/SwipeableItem/SwipeableItemButton.js +0 -6
  216. package/src/components/SwipeableItem/SwipeableItemButton.js.map +0 -1
  217. package/src/components/SwipeableItem/SwipeableItemCommon.js +0 -44
  218. package/src/components/SwipeableItem/SwipeableItemCommon.js.map +0 -1
  219. package/src/components/SwipeableItem/SwipeableList.js +0 -29
  220. package/src/components/SwipeableItem/SwipeableList.js.map +0 -1
  221. package/src/components/SwipeableItem/index.js +0 -4
  222. package/src/components/SwipeableItem/index.js.map +0 -1
  223. package/src/components/Swiper/Swiper.js +0 -99
  224. package/src/components/Swiper/Swiper.js.map +0 -1
  225. package/src/components/Swiper/SwiperItem.js +0 -10
  226. package/src/components/Swiper/SwiperItem.js.map +0 -1
  227. package/src/components/Swiper/index.js +0 -3
  228. package/src/components/Swiper/index.js.map +0 -1
  229. package/src/components/Switch.js +0 -56
  230. package/src/components/Switch.js.map +0 -1
  231. package/src/components/TabView/TabView.js +0 -65
  232. package/src/components/TabView/TabView.js.map +0 -1
  233. package/src/components/TabView/TabViewItem.js +0 -12
  234. package/src/components/TabView/TabViewItem.js.map +0 -1
  235. package/src/components/TabView/index.js +0 -3
  236. package/src/components/TabView/index.js.map +0 -1
  237. package/src/components/Table/Table.js +0 -94
  238. package/src/components/Table/Table.js.map +0 -1
  239. package/src/components/Table/TableCell.js +0 -34
  240. package/src/components/Table/TableCell.js.map +0 -1
  241. package/src/components/Table/TableCommon.js +0 -13
  242. package/src/components/Table/TableCommon.js.map +0 -1
  243. package/src/components/Table/TableRow.js +0 -42
  244. package/src/components/Table/TableRow.js.map +0 -1
  245. package/src/components/Table/index.js +0 -4
  246. package/src/components/Table/index.js.map +0 -1
  247. package/src/components/Text.js +0 -25
  248. package/src/components/Text.js.map +0 -1
  249. package/src/components/TextField.js +0 -411
  250. package/src/components/TextField.js.map +0 -1
  251. package/src/components/TextInput.js +0 -25
  252. package/src/components/TextInput.js.map +0 -1
  253. package/src/components/Timer.js +0 -87
  254. package/src/components/Timer.js.map +0 -1
  255. package/src/components/Touchable.js +0 -13
  256. package/src/components/Touchable.js.map +0 -1
  257. package/src/components/Touchable.web.js +0 -3
  258. package/src/components/Touchable.web.js.map +0 -1
  259. package/src/components/Typography.js +0 -37
  260. package/src/components/Typography.js.map +0 -1
  261. package/src/components/YoutubePlayer/YoutubePlayer.js +0 -21
  262. package/src/components/YoutubePlayer/YoutubePlayer.js.map +0 -1
  263. package/src/components/YoutubePlayer/YoutubePlayer.native.js +0 -36
  264. package/src/components/YoutubePlayer/YoutubePlayer.native.js.map +0 -1
  265. package/src/components/YoutubePlayer/YoutubePlayerProps.js +0 -2
  266. package/src/components/YoutubePlayer/YoutubePlayerProps.js.map +0 -1
  267. package/src/components/YoutubePlayer/index.js +0 -2
  268. package/src/components/YoutubePlayer/index.js.map +0 -1
  269. package/src/components/useAuthState.js +0 -35
  270. package/src/components/useAuthState.js.map +0 -1
  271. package/src/constants.js +0 -11
  272. package/src/constants.js.map +0 -1
  273. package/src/deprecated-components/AccordionItem.js +0 -36
  274. package/src/deprecated-components/AccordionItem.js.map +0 -1
  275. package/src/deprecated-components/AnimatedCircularProgress.js +0 -47
  276. package/src/deprecated-components/AnimatedCircularProgress.js.map +0 -1
  277. package/src/deprecated-components/AvatarEdit.js +0 -34
  278. package/src/deprecated-components/AvatarEdit.js.map +0 -1
  279. package/src/deprecated-components/AvoidKeyboardView.js +0 -36
  280. package/src/deprecated-components/AvoidKeyboardView.js.map +0 -1
  281. package/src/deprecated-components/Banner.js +0 -112
  282. package/src/deprecated-components/Banner.js.map +0 -1
  283. package/src/deprecated-components/Card.js +0 -61
  284. package/src/deprecated-components/Card.js.map +0 -1
  285. package/src/deprecated-components/CheckboxGroup.js +0 -25
  286. package/src/deprecated-components/CheckboxGroup.js.map +0 -1
  287. package/src/deprecated-components/CircleImage.js +0 -12
  288. package/src/deprecated-components/CircleImage.js.map +0 -1
  289. package/src/deprecated-components/CircularProgress.js +0 -85
  290. package/src/deprecated-components/CircularProgress.js.map +0 -1
  291. package/src/deprecated-components/Container.js +0 -46
  292. package/src/deprecated-components/Container.js.map +0 -1
  293. package/src/deprecated-components/DeprecatedButton.js +0 -87
  294. package/src/deprecated-components/DeprecatedButton.js.map +0 -1
  295. package/src/deprecated-components/DeprecatedCardWrapper.js +0 -22
  296. package/src/deprecated-components/DeprecatedCardWrapper.js.map +0 -1
  297. package/src/deprecated-components/DeprecatedFAB.js +0 -111
  298. package/src/deprecated-components/DeprecatedFAB.js.map +0 -1
  299. package/src/deprecated-components/FAB.js +0 -50
  300. package/src/deprecated-components/FAB.js.map +0 -1
  301. package/src/deprecated-components/FieldSearchBarFull.js +0 -57
  302. package/src/deprecated-components/FieldSearchBarFull.js.map +0 -1
  303. package/src/deprecated-components/Layout.js +0 -69
  304. package/src/deprecated-components/Layout.js.map +0 -1
  305. package/src/deprecated-components/ProgressBar.js +0 -122
  306. package/src/deprecated-components/ProgressBar.js.map +0 -1
  307. package/src/deprecated-components/ProgressCircle.js +0 -17
  308. package/src/deprecated-components/ProgressCircle.js.map +0 -1
  309. package/src/deprecated-components/RadioButtonFieldGroup.js +0 -21
  310. package/src/deprecated-components/RadioButtonFieldGroup.js.map +0 -1
  311. package/src/deprecated-components/RowBodyIcon.js +0 -12
  312. package/src/deprecated-components/RowBodyIcon.js.map +0 -1
  313. package/src/deprecated-components/RowHeadlineImageCaption.js +0 -16
  314. package/src/deprecated-components/RowHeadlineImageCaption.js.map +0 -1
  315. package/src/deprecated-components/RowHeadlineImageIcon.js +0 -18
  316. package/src/deprecated-components/RowHeadlineImageIcon.js.map +0 -1
  317. package/src/deprecated-components/ToggleButton.js +0 -43
  318. package/src/deprecated-components/ToggleButton.js.map +0 -1
  319. package/src/hooks.js +0 -35
  320. package/src/hooks.js.map +0 -1
  321. package/src/index.js +0 -77
  322. package/src/index.js.map +0 -1
  323. package/src/interfaces/Icon.js +0 -9
  324. package/src/interfaces/Icon.js.map +0 -1
  325. package/src/utilities.js +0 -223
  326. package/src/utilities.js.map +0 -1
@@ -1,25 +0,0 @@
1
- import * as React from "react";
2
- import { Text as NativeText, I18nManager } from "react-native";
3
- import { withTheme } from "@draftbit/theme";
4
- class Text extends React.Component {
5
- render() {
6
- const { style, ...rest } = this.props;
7
- const writingDirection = I18nManager.isRTL ? "rtl" : "ltr";
8
- return (React.createElement(NativeText, { ...rest, ref: (c) => {
9
- this._root = c;
10
- }, style: [
11
- {
12
- textAlign: "left",
13
- writingDirection,
14
- },
15
- style,
16
- ] }));
17
- }
18
- }
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));
21
- };
22
- const Link = withTheme(BaseLink);
23
- export { Link };
24
- export default withTheme(Text);
25
- //# sourceMappingURL=Text.js.map
@@ -1 +0,0 @@
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,CAAC,MAAM,QAAQ,GAAG,CAAC,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,QAAQ,CAAC,OAAO,EAAE,EAAE,KAAK,CAAC,EACxD,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,411 +0,0 @@
1
- /* eslint-disable prefer-const */
2
- import * as React from "react";
3
- import { View, Animated, StyleSheet, Text, I18nManager, Platform, } from "react-native";
4
- import { withTheme } from "@draftbit/theme";
5
- import { applyStyles, extractStyles } from "../utilities";
6
- import TextInput from "./TextInput";
7
- const AnimatedText = Animated.createAnimatedComponent(Text);
8
- const FOCUS_ANIMATION_DURATION = 150;
9
- const BLUR_ANIMATION_DURATION = 180;
10
- const ICON_SIZE = 24;
11
- class TextField extends React.Component {
12
- constructor() {
13
- super(...arguments);
14
- this.state = {
15
- labeled: new Animated.Value(this.props.value || this.props.error ? 0 : 1),
16
- focused: false,
17
- placeholder: this.props.error ? this.props.placeholder : "",
18
- labelLayout: {
19
- measured: false,
20
- width: 0,
21
- },
22
- };
23
- this._timer = setTimeout(() => { }, 0);
24
- this._showPlaceholder = () => {
25
- clearTimeout(this._timer);
26
- // Set the placeholder in a delay to offset the label animation
27
- // If we show it immediately, they'll overlap and look ugly
28
- this._timer = setTimeout(() => this.setState({
29
- placeholder: this.props.placeholder,
30
- }), 50);
31
- };
32
- this._hidePlaceholder = () => this.setState({
33
- placeholder: "",
34
- });
35
- this._restoreLabel = () => Animated.timing(this.state.labeled, {
36
- toValue: 1,
37
- duration: FOCUS_ANIMATION_DURATION,
38
- useNativeDriver: Platform.OS !== "web",
39
- }).start();
40
- this._minmizeLabel = () => Animated.timing(this.state.labeled, {
41
- toValue: 0,
42
- duration: BLUR_ANIMATION_DURATION,
43
- useNativeDriver: Platform.OS !== "web",
44
- }).start();
45
- this._handleFocus = () => {
46
- if (this.props.disabled) {
47
- return;
48
- }
49
- this.setState({ focused: true });
50
- };
51
- this._handleBlur = () => {
52
- if (this.props.disabled) {
53
- return;
54
- }
55
- this.setState({ focused: false });
56
- };
57
- this._handleChangeText = (value) => {
58
- if (this.props.disabled) {
59
- return;
60
- }
61
- if (typeof value === "string") {
62
- this.setState({ value });
63
- this.props.onChangeText && this.props.onChangeText(value);
64
- }
65
- else {
66
- this.setState({ value: value.nativeEvent.text });
67
- this.props.onChangeText &&
68
- this.props.onChangeText(value.nativeEvent.text);
69
- }
70
- };
71
- this._root = undefined;
72
- }
73
- static getDerivedStateFromProps(nextProps, prevState) {
74
- return {
75
- value: typeof nextProps.value !== "undefined"
76
- ? nextProps.value
77
- : prevState.value,
78
- };
79
- }
80
- componentDidMount() {
81
- if (this.props.defaultValue) {
82
- this._handleChangeText(this.props.defaultValue);
83
- }
84
- if (this.props.placeholder) {
85
- this._minmizeLabel();
86
- }
87
- }
88
- componentDidUpdate(prevProps, prevState) {
89
- if (prevState.focused !== this.state.focused ||
90
- prevState.value !== this.state.value) {
91
- // The label should be minimized if the text input is focused, or has text
92
- // In minimized mode, the label moves up and becomes small
93
- if (this.state.value ||
94
- this.state.focused ||
95
- this.props.error ||
96
- this.props.placeholder) {
97
- this._minmizeLabel();
98
- }
99
- else {
100
- this._restoreLabel();
101
- }
102
- }
103
- if (prevState.focused !== this.state.focused ||
104
- prevProps.label !== this.props.label) {
105
- // Show placeholder text only if the input is focused, or has error, or there's no label
106
- // We don't show placeholder if there's a label because the label acts as placeholder
107
- // When focused, the label moves up, so we can show a placeholder
108
- if (this.state.focused || this.props.error || !this.props.label) {
109
- this._showPlaceholder();
110
- }
111
- else {
112
- this._hidePlaceholder();
113
- }
114
- }
115
- }
116
- componentWillUnmount() {
117
- clearTimeout(this._timer);
118
- }
119
- toggleFocus() {
120
- this.setState((prevState) => ({ focused: !prevState.focused }));
121
- }
122
- isFocused() {
123
- return this._root && this._root.isFocused();
124
- }
125
- clear() {
126
- return this._root && this._root.clear();
127
- }
128
- focus() {
129
- return this._root && this._root.focus();
130
- }
131
- blur() {
132
- return this._root && this._root.blur();
133
- }
134
- render() {
135
- const { theme, Icon, type = "underline", disabled = false, editable = true, label, error = false, leftIconName, leftIconMode = "inset", 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;
136
- const { colors, typography } = theme;
137
- const MINIMIZED_LABEL_Y_OFFSET = -(typography.caption.lineHeight + 4);
138
- const OUTLINE_MINIMIZED_LABEL_Y_OFFSET = -(16 * 0.5 + 4);
139
- const MAXIMIZED_LABEL_FONT_SIZE = typography.subtitle1.fontSize;
140
- const MINIMIZED_LABEL_FONT_SIZE = typography.caption.fontSize;
141
- const hasActiveOutline = this.state.focused || error;
142
- let inputTextColor, activeColor, underlineColor, borderColor, placeholderColor, containerStyle, backgroundColor, inputStyle;
143
- inputTextColor = colors.text.strong;
144
- if (disabled) {
145
- activeColor = colors.text.light;
146
- placeholderColor = colors.text.light;
147
- borderColor = "transparent";
148
- underlineColor = "transparent";
149
- backgroundColor = colors.border.base;
150
- }
151
- else {
152
- activeColor = error ? colors.text.danger : activeBorderColorProp;
153
- placeholderColor = borderColor = colors.text.light;
154
- underlineColor = underlineColorProp || colors.text.light;
155
- backgroundColor = colors.background;
156
- }
157
- if (rest.placeholderTextColor) {
158
- placeholderColor = rest.placeholderTextColor;
159
- }
160
- const { lineHeight, ...subtitle1 } = typography.subtitle1;
161
- inputStyle = {
162
- paddingVertical: 0,
163
- color: inputTextColor,
164
- paddingLeft: leftIconName && leftIconMode === "inset" ? ICON_SIZE + 12 : 0,
165
- paddingRight: rightIconName ? ICON_SIZE + 16 + 4 : 12,
166
- ...subtitle1,
167
- };
168
- if (!multiline) {
169
- //@ts-ignore
170
- inputStyle.height = lineHeight;
171
- }
172
- let assistiveTextLeftMargin;
173
- if (type === "underline") {
174
- containerStyle = {
175
- borderTopLeftRadius: 8,
176
- borderTopRightRadius: 8,
177
- paddingBottom: 12,
178
- marginTop: 16,
179
- };
180
- if (leftIconName && leftIconMode === "outset") {
181
- assistiveTextLeftMargin = ICON_SIZE + 8;
182
- }
183
- else {
184
- assistiveTextLeftMargin = 0;
185
- }
186
- }
187
- else {
188
- containerStyle = {
189
- borderRadius: 8,
190
- borderColor: hasActiveOutline ? activeColor : borderColor,
191
- borderWidth: 1,
192
- paddingTop: label ? 16 * 1.5 : 16,
193
- paddingBottom: label ? 16 * 0.5 : 16,
194
- opacity: disabled ? 0.5 : 1,
195
- backgroundColor,
196
- };
197
- if (leftIconName && leftIconMode === "inset") {
198
- assistiveTextLeftMargin = 16 + 4;
199
- }
200
- else if (leftIconName && leftIconMode === "outset") {
201
- assistiveTextLeftMargin = ICON_SIZE + 8 + 12;
202
- }
203
- else {
204
- assistiveTextLeftMargin = 12;
205
- }
206
- }
207
- if (leftIconName && leftIconMode === "outset") {
208
- containerStyle.marginLeft = ICON_SIZE + 8;
209
- }
210
- let leftIconColor;
211
- if (iconColor) {
212
- leftIconColor = iconColor;
213
- }
214
- else if (error) {
215
- leftIconColor = colors.text.danger;
216
- }
217
- else if (this.state.focused) {
218
- leftIconColor = colors.branding.primary;
219
- }
220
- else {
221
- leftIconColor = colors.text.light;
222
- }
223
- const labelStyle = {
224
- ...typography.subtitle1,
225
- ...(type === "solid" ? { marginHorizontal: 12 } : {}),
226
- top: type === "solid" ? 16 : 0,
227
- left: leftIconName && leftIconMode === "inset" ? ICON_SIZE + 12 : 0,
228
- transform: [
229
- {
230
- // Move label to top
231
- translateY: this.state.labeled.interpolate({
232
- inputRange: [0, 1],
233
- outputRange: [
234
- type === "solid"
235
- ? OUTLINE_MINIMIZED_LABEL_Y_OFFSET
236
- : MINIMIZED_LABEL_Y_OFFSET,
237
- 0,
238
- ],
239
- }),
240
- },
241
- {
242
- // Make label smaller
243
- scale: this.state.labeled.interpolate({
244
- inputRange: [0, 1],
245
- outputRange: [
246
- MINIMIZED_LABEL_FONT_SIZE / MAXIMIZED_LABEL_FONT_SIZE,
247
- 1,
248
- ],
249
- }),
250
- },
251
- {
252
- // Offset label scale since RN doesn't support transform origin
253
- translateX: this.state.labeled.interpolate({
254
- inputRange: [0, 1],
255
- outputRange: [
256
- -(1 - MINIMIZED_LABEL_FONT_SIZE / MAXIMIZED_LABEL_FONT_SIZE) *
257
- (this.state.labelLayout.width / 2),
258
- 0,
259
- ],
260
- }),
261
- },
262
- ],
263
- };
264
- const { textStyles } = extractStyles(style);
265
- const inputStyles = applyStyles([
266
- styles.input,
267
- inputStyle,
268
- type === "solid" ? { marginHorizontal: 16 } : { marginHorizontal: 6 },
269
- ], textStyles);
270
- const { backgroundColor: bgColor, padding, paddingTop, paddingBottom, paddingLeft, paddingRight, borderRadius, borderTopLeftRadius, borderTopRightRadius, borderBottomLeftRadius, borderBottomRightRadius, borderWidth, borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth, borderStyle, borderColor: borderCol, ...styleProp } = StyleSheet.flatten(style || {});
271
- return (React.createElement(View, { style: [styles.container, styleProp] },
272
- React.createElement(View, { style: applyStyles([containerStyle], {
273
- height: styleProp.height,
274
- backgroundColor: bgColor,
275
- padding,
276
- paddingTop,
277
- paddingBottom,
278
- paddingLeft,
279
- paddingRight,
280
- borderRadius,
281
- borderTopLeftRadius,
282
- borderTopRightRadius,
283
- borderBottomLeftRadius,
284
- borderBottomRightRadius,
285
- borderWidth,
286
- borderTopWidth,
287
- borderRightWidth,
288
- borderBottomWidth,
289
- borderLeftWidth,
290
- borderStyle,
291
- borderColor: borderCol,
292
- }) },
293
- type === "underline" ? (
294
- // When type === 'flat', render an underline
295
- React.createElement(Animated.View, { style: [
296
- styles.underline,
297
- {
298
- backgroundColor: bgColor ||
299
- (error
300
- ? colors.background.danger
301
- : this.state.focused
302
- ? activeColor
303
- : underlineColor),
304
- // Underlines is thinner when input is not focused
305
- transform: [{ scaleY: this.state.focused ? 1 : 0.5 }],
306
- },
307
- ] })) : null,
308
- label ? (
309
- // Position colored placeholder and gray placeholder on top of each other and crossfade them
310
- // This gives the effect of animating the color, but allows us to use native driver
311
- React.createElement(View, { pointerEvents: "none", style: [
312
- StyleSheet.absoluteFill,
313
- {
314
- opacity:
315
- // Hide the label in minimized state until we measure its width
316
- this.state.value || this.state.focused
317
- ? this.state.labelLayout.measured
318
- ? 1
319
- : 0
320
- : 1,
321
- },
322
- ] },
323
- React.createElement(AnimatedText, { onLayout: (e) => this.setState({
324
- labelLayout: {
325
- width: e.nativeEvent.layout.width,
326
- measured: true,
327
- },
328
- }), style: [
329
- styles.placeholder,
330
- labelStyle,
331
- {
332
- color: placeholderColor,
333
- opacity: this.state.labeled.interpolate({
334
- inputRange: [0, 1],
335
- outputRange: [hasActiveOutline ? 1 : 0, 0],
336
- }),
337
- },
338
- ], numberOfLines: 1 }, label),
339
- React.createElement(AnimatedText, { style: [
340
- styles.placeholder,
341
- labelStyle,
342
- {
343
- color: placeholderColor,
344
- opacity: hasActiveOutline ? this.state.labeled : 1,
345
- },
346
- ], numberOfLines: 1 }, label))) : null,
347
- render({
348
- ref: (c) => {
349
- this._root = c;
350
- },
351
- onChange: this._handleChangeText,
352
- placeholder: label
353
- ? this.state.placeholder
354
- : this.props.placeholder,
355
- placeholderTextColor: placeholderColor,
356
- editable: !disabled && editable,
357
- selectionColor: activeColor,
358
- multiline,
359
- numberOfLines,
360
- onFocus: this._handleFocus,
361
- onBlur: this._handleBlur,
362
- underlineColorAndroid: "transparent",
363
- style: inputStyles,
364
- ...rest,
365
- value: this.state.value,
366
- })),
367
- leftIconName ? (React.createElement(View, { style: [
368
- styles.iconWrapper,
369
- { left: leftIconMode === "inset" && type === "solid" ? 16 : 0 },
370
- ] },
371
- React.createElement(Icon, { size: iconSize || ICON_SIZE, color: leftIconColor || colors.text.light, name: leftIconName }))) : null,
372
- rightIconName ? (React.createElement(View, { style: [styles.iconWrapper, { right: 16 }] },
373
- React.createElement(Icon, { name: rightIconName, size: iconSize || ICON_SIZE, color: iconColor || colors.text.light }))) : null,
374
- assistiveText ? (React.createElement(Text, { style: {
375
- color: error ? colors.text.danger : colors.text.light,
376
- marginTop: 8,
377
- marginLeft: assistiveTextLeftMargin,
378
- } }, assistiveText)) : null));
379
- }
380
- }
381
- export default withTheme(TextField);
382
- const styles = StyleSheet.create({
383
- container: {
384
- alignSelf: "stretch",
385
- },
386
- placeholder: {
387
- position: "absolute",
388
- left: 0,
389
- },
390
- underline: {
391
- position: "absolute",
392
- left: 0,
393
- right: 0,
394
- bottom: 0,
395
- height: 2,
396
- },
397
- input: {
398
- flexGrow: 1,
399
- justifyContent: "center",
400
- textAlignVertical: "center",
401
- margin: 0,
402
- textAlign: I18nManager.isRTL ? "right" : "left",
403
- },
404
- iconWrapper: {
405
- height: "100%",
406
- justifyContent: "center",
407
- alignItems: "center",
408
- position: "absolute",
409
- },
410
- });
411
- //# sourceMappingURL=TextField.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextField.js","sourceRoot":"","sources":["TextField.tsx"],"names":[],"mappings":"AAAA,iCAAiC;AAEjC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,IAAI,EACJ,QA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CAAC;IAC/B,SAAS,EAAE;QACT,SAAS,EAAE,SAAS;KACrB;IACD,WAAW,EAAE;QACX,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,CAAC;KACR;IACD,SAAS,EAAE;QACT,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,CAAC;QACT,MAAM,EAAE,CAAC;KACV;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,CAAC;QACX,cAAc,EAAE,QAAQ;QACxB,iBAAiB,EAAE,QAAQ;QAC3B,MAAM,EAAE,CAAC;QACT,SAAS,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM;KAChD;IACD,WAAW,EAAE;QACX,MAAM,EAAE,MAAM;QACd,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,QAAQ,EAAE,UAAU;KACrB;CACF,CAAC,CAAC"}
@@ -1,25 +0,0 @@
1
- import React from "react";
2
- import { TextInput as NativeTextInput, Platform, } from "react-native";
3
- import { useDebounce, useOnUpdate } from "../hooks";
4
- import { useTheme } from "@draftbit/theme";
5
- const TextInput = React.forwardRef(({ onChangeTextDelayed, changeTextDelay = 500, webShowOutline = true, style, disabled = false, editable = true, value, onChangeText, ...rest }, ref) => {
6
- const theme = useTheme();
7
- const [valueToDebounce, setValueToDebounce] = React.useState(value);
8
- const delayedValue = useDebounce(valueToDebounce, changeTextDelay);
9
- useOnUpdate(() => {
10
- if (delayedValue !== undefined) {
11
- onChangeTextDelayed === null || onChangeTextDelayed === void 0 ? void 0 : onChangeTextDelayed(delayedValue);
12
- }
13
- }, [delayedValue]);
14
- return (React.createElement(NativeTextInput, { testID: "native-text-input", ref: ref, value: value, editable: !disabled && editable, style: [
15
- //@ts-ignore Web specific prop. Removes default blue outline that appears on the hidden TextInput
16
- Platform.OS === "web" && !webShowOutline ? { outlineWidth: 0 } : {},
17
- { color: theme.colors.text.strong },
18
- style,
19
- ], onChangeText: (newValue) => {
20
- onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(newValue);
21
- setValueToDebounce(newValue);
22
- }, ...rest }));
23
- });
24
- export default TextInput;
25
- //# sourceMappingURL=TextInput.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextInput.js","sourceRoot":"","sources":["TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,SAAS,IAAI,eAAe,EAE5B,QAAQ,GACT,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAS3C,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAChC,CACE,EACE,mBAAmB,EACnB,eAAe,GAAG,GAAG,EACrB,cAAc,GAAG,IAAI,EACrB,KAAK,EACL,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,IAAI,EACf,KAAK,EACL,YAAY,EACZ,GAAG,IAAI,EACR,EACD,GAAG,EACH,EAAE;IACF,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpE,MAAM,YAAY,GAAG,WAAW,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;IAEnE,WAAW,CAAC,GAAG,EAAE;QACf,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;YAC/B,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAG,YAAY,CAAC,CAAC;QACtC,CAAC;IACH,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAEnB,OAAO,CACL,oBAAC,eAAe,IACd,MAAM,EAAC,mBAAmB,EAC1B,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,QAAQ,IAAI,QAAQ,EAC/B,KAAK,EAAE;YACL,iGAAiG;YACjG,QAAQ,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;YACnE,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE;YACnC,KAAK;SACN,EACD,YAAY,EAAE,CAAC,QAAQ,EAAE,EAAE;YACzB,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAG,QAAQ,CAAC,CAAC;YACzB,kBAAkB,CAAC,QAAQ,CAAC,CAAC;QAC/B,CAAC,KACG,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,87 +0,0 @@
1
- import React, { useState, useEffect, useRef, useImperativeHandle, forwardRef, } from "react";
2
- import { Text, StyleSheet, } from "react-native";
3
- const Timer = forwardRef(({ style, initialTime, updateInterval = 1000, format = "mm:ss", onTimerChange, onTimerEnd, countDirection = "up", timerEndTime, ...rest }, ref) => {
4
- const defaultInitialTime = 0;
5
- const [time, setTime] = useState(initialTime !== null && initialTime !== void 0 ? initialTime : defaultInitialTime);
6
- const timerRef = useRef(null);
7
- useEffect(() => {
8
- onTimerChange === null || onTimerChange === void 0 ? void 0 : onTimerChange(time);
9
- // eslint-disable-next-line react-hooks/exhaustive-deps
10
- }, [time]);
11
- useImperativeHandle(ref, () => ({
12
- start: startTimer,
13
- stop: stopTimer,
14
- reset: resetTimer,
15
- }));
16
- const startTimer = () => {
17
- if (timerRef.current)
18
- return;
19
- timerRef.current = setInterval(() => {
20
- setTime((prevTime) => {
21
- const newTime = countDirection === "up"
22
- ? prevTime + updateInterval
23
- : prevTime - updateInterval;
24
- // Count down
25
- if (newTime <= 0 && countDirection === "down") {
26
- clearTimer();
27
- // Delay the onTimerEnd callback to ensure it triggers after the final time update
28
- setTimeout(() => {
29
- onTimerEnd === null || onTimerEnd === void 0 ? void 0 : onTimerEnd();
30
- }, updateInterval);
31
- return 0;
32
- }
33
- // Count up
34
- if (countDirection === "up" &&
35
- timerEndTime !== undefined &&
36
- newTime >= timerEndTime) {
37
- clearTimer();
38
- // Delay the onTimerEnd callback to ensure it triggers after the final time update
39
- setTimeout(() => {
40
- onTimerEnd === null || onTimerEnd === void 0 ? void 0 : onTimerEnd();
41
- }, updateInterval);
42
- return timerEndTime;
43
- }
44
- return newTime;
45
- });
46
- }, updateInterval);
47
- };
48
- const stopTimer = () => clearTimer();
49
- const resetTimer = (newTime = initialTime !== null && initialTime !== void 0 ? initialTime : defaultInitialTime) => {
50
- clearTimer();
51
- setTime(newTime);
52
- };
53
- const clearTimer = () => {
54
- if (timerRef.current) {
55
- clearInterval(timerRef.current);
56
- timerRef.current = null;
57
- }
58
- };
59
- useEffect(() => {
60
- return () => clearTimer();
61
- }, []);
62
- const formatTime = (milliseconds) => {
63
- const totalSeconds = Math.floor(milliseconds / 1000);
64
- const hours = Math.floor(totalSeconds / 3600);
65
- const minutes = Math.floor((totalSeconds - hours * 3600) / 60);
66
- const seconds = totalSeconds - hours * 3600 - minutes * 60;
67
- const ms = milliseconds % 1000;
68
- const formattedHours = String(hours).padStart(2, "0");
69
- const formattedMinutes = String(minutes).padStart(2, "0");
70
- const formattedSeconds = String(seconds).padStart(2, "0");
71
- const formattedMs = String(ms).padStart(3, "0");
72
- return format
73
- .replace("hh", formattedHours)
74
- .replace("mm", formattedMinutes)
75
- .replace("ss", formattedSeconds)
76
- .replace("ms", formattedMs);
77
- };
78
- return (React.createElement(Text, { ...rest, style: [styles.defaultTimerStyle, style] }, formatTime(time)));
79
- });
80
- const styles = StyleSheet.create({
81
- defaultTimerStyle: {
82
- fontSize: 24,
83
- textAlign: "left",
84
- },
85
- });
86
- export default Timer;
87
- //# sourceMappingURL=Timer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Timer.js","sourceRoot":"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F,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,iBAAiB,EAAE;QACjB,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,MAAM;KAClB;CACF,CAAC,CAAC;AAEH,eAAe,KAAK,CAAC"}
@@ -1,13 +0,0 @@
1
- import React from "react";
2
- import { Pressable } from "react-native";
3
- export default function Touchable({ children, disabled, onPress, activeOpacity = 0.8, disabledOpacity = 0.8, delayLongPress, hitSlop, style, ...props }) {
4
- return (React.createElement(Pressable, { disabled: disabled, onPress: onPress, delayLongPress: delayLongPress ? delayLongPress : 500, hitSlop: hitSlop ? hitSlop : 8, style: ({ pressed }) => {
5
- return [
6
- {
7
- opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1,
8
- },
9
- style,
10
- ];
11
- }, ...props }, children));
12
- }
13
- //# sourceMappingURL=Touchable.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Touchable.js","sourceRoot":"","sources":["Touchable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAwC,MAAM,cAAc,CAAC;AAQ/E,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,aAAa,GAAG,GAAG,EACnB,eAAe,GAAG,GAAG,EACrB,cAAc,EACd,OAAO,EACP,KAAK,EACL,GAAG,KAAK,EACF;IACN,OAAO,CACL,oBAAC,SAAS,IACR,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,EACrD,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAC9B,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;YACrB,OAAO;gBACL;oBACE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;iBAClE;gBACD,KAAK;aACN,CAAC;QACJ,CAAC,KACG,KAAK,IAER,QAAQ,CACC,CACb,CAAC;AACJ,CAAC"}
@@ -1,3 +0,0 @@
1
- import { TouchableOpacity } from "react-native";
2
- export default TouchableOpacity;
3
- //# sourceMappingURL=Touchable.web.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Touchable.web.js","sourceRoot":"","sources":["Touchable.web.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,eAAe,gBAAgB,CAAC"}
@@ -1,37 +0,0 @@
1
- import React from "react";
2
- import { Text } from "react-native";
3
- import { withTheme } from "@draftbit/theme";
4
- export const Title = withTheme(({ text, theme, style }) => {
5
- return (React.createElement(Text, { style: [
6
- {
7
- fontSize: 20,
8
- letterSpacing: 0,
9
- lineHeight: 26,
10
- color: theme.colors.text.normal,
11
- },
12
- style,
13
- ] }, text));
14
- });
15
- export const Subtitle = withTheme(({ text, theme, style }) => {
16
- return (React.createElement(Text, { style: [
17
- {
18
- fontSize: 14,
19
- letterSpacing: 0,
20
- lineHeight: 16,
21
- color: theme.colors.text.medium,
22
- },
23
- style,
24
- ] }, text));
25
- });
26
- export const Caption = withTheme(({ text, theme, style }) => {
27
- return (React.createElement(Text, { style: [
28
- {
29
- fontSize: 12,
30
- letterSpacing: 0,
31
- lineHeight: 14,
32
- color: theme.colors.text.light,
33
- },
34
- style,
35
- ] }, text));
36
- });
37
- //# sourceMappingURL=Typography.js.map