@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,57 +0,0 @@
1
- import React from "react";
2
- import Svg, { Line } from "react-native-svg";
3
- import { View } from "react-native";
4
- import Animated, { useAnimatedProps, useSharedValue, withTiming, } from "react-native-reanimated";
5
- import { DEFAULT_ANIMATION_DURATION, } from "../ProgressCommon";
6
- export const AnimatedLine = Animated.createAnimatedComponent(Line);
7
- export const LinearProgress = ({ theme, minimumValue = 0, maximumValue = 100, value = minimumValue, thickness = 10, trackThickness = thickness, color = theme.colors.branding.primary, trackColor = theme.colors.border.base, trackOpacity = 1, showTrack = true, animationDuration = DEFAULT_ANIMATION_DURATION, isAnimated = true, lineCap = "round", trackLineCap = lineCap, dashWidth, trackDashWidth, dashGap, trackDashGap, dashOffset, trackDashOffset, customDashArray, trackCustomDashArray, onFullPathWidth, style, testID, }) => {
8
- const [svgContainerWidth, setSvgContainerWidth] = React.useState(0);
9
- const dashArray = dashWidth !== undefined
10
- ? `${dashWidth} ${dashGap || dashWidth}`
11
- : undefined;
12
- const trackDashArray = trackDashWidth !== undefined
13
- ? `${trackDashWidth} ${trackDashGap || trackDashWidth}`
14
- : undefined;
15
- const maxThickness = Math.max(thickness, trackThickness);
16
- const thicknessOffset = maxThickness / 2; // This offset guarantees nothing is cut off by view bounds
17
- const progressLineWidth = svgContainerWidth - thicknessOffset;
18
- const trackProgressLineWidth = svgContainerWidth - thicknessOffset;
19
- const currentFillPercentage = (value - minimumValue) / (maximumValue - minimumValue);
20
- const currentProgressLineWidth = useSharedValue(0);
21
- const progressLineAnimatedProps = useAnimatedProps(() => {
22
- const isBelowMinWidth = currentProgressLineWidth.value <= thicknessOffset;
23
- return {
24
- x2: Math.min(progressLineWidth, currentProgressLineWidth.value), //Prevents going beyond the max width
25
- strokeOpacity: isBelowMinWidth ? 0.0 : 1.0,
26
- };
27
- });
28
- React.useEffect(() => {
29
- currentProgressLineWidth.value = withTiming(progressLineWidth * currentFillPercentage, {
30
- duration: isAnimated ? animationDuration : 0,
31
- });
32
- }, [
33
- value,
34
- progressLineWidth,
35
- currentFillPercentage,
36
- animationDuration,
37
- currentProgressLineWidth,
38
- maximumValue,
39
- minimumValue,
40
- isAnimated,
41
- ]);
42
- return (React.createElement(View, { onLayout: (event) => {
43
- const width = event.nativeEvent.layout.width;
44
- setSvgContainerWidth(width);
45
- onFullPathWidth === null || onFullPathWidth === void 0 ? void 0 : onFullPathWidth(width);
46
- }, style: [
47
- {
48
- height: maxThickness,
49
- width: "100%",
50
- },
51
- style,
52
- ] },
53
- React.createElement(Svg, { testID: testID !== null && testID !== void 0 ? testID : "linear-progress-component", style: { flex: 1 } },
54
- showTrack && (React.createElement(Line, { x1: thicknessOffset, y1: thicknessOffset, x2: trackProgressLineWidth, y2: thicknessOffset, stroke: trackColor, strokeWidth: trackThickness, strokeOpacity: trackOpacity, strokeLinecap: trackLineCap, strokeDasharray: trackCustomDashArray || trackDashArray, strokeDashoffset: trackDashOffset })),
55
- React.createElement(AnimatedLine, { animatedProps: progressLineAnimatedProps, x1: thicknessOffset, y1: thicknessOffset, y2: thicknessOffset, stroke: color, strokeWidth: thickness, strokeLinecap: lineCap, strokeDasharray: customDashArray || dashArray, strokeDashoffset: dashOffset, onPress: () => { } }))));
56
- };
57
- //# sourceMappingURL=LinearProgress.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LinearProgress.js","sourceRoot":"","sources":["LinearProgress.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,EAAE,EAAE,IAAI,EAAa,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,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,uBAAf,eAAe,CAAG,KAAK,CAAC,CAAC;QAC3B,CAAC,EACD,KAAK,EAAE;YACL;gBACE,MAAM,EAAE,YAAY;gBACpB,KAAK,EAAE,MAAM;aACd;YACD,KAAK;SACN;QAED,oBAAC,GAAG,IAAC,MAAM,EAAE,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,2BAA2B,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;YACnE,SAAS,IAAI,CACZ,oBAAC,IAAI,IACH,EAAE,EAAE,eAAe,EACnB,EAAE,EAAE,eAAe,EACnB,EAAE,EAAE,sBAAsB,EAC1B,EAAE,EAAE,eAAe,EACnB,MAAM,EAAE,UAAU,EAClB,WAAW,EAAE,cAAc,EAC3B,aAAa,EAAE,YAAY,EAC3B,aAAa,EAAE,YAAY,EAC3B,eAAe,EAAE,oBAAoB,IAAI,cAAc,EACvD,gBAAgB,EAAE,eAAe,GACjC,CACH;YACD,oBAAC,YAAY,IACX,aAAa,EAAE,yBAAyB,EACxC,EAAE,EAAE,eAAe,EACnB,EAAE,EAAE,eAAe,EACnB,EAAE,EAAE,eAAe,EACnB,MAAM,EAAE,KAAK,EACb,WAAW,EAAE,SAAS,EACtB,aAAa,EAAE,OAAO,EACtB,eAAe,EAAE,eAAe,IAAI,SAAS,EAC7C,gBAAgB,EAAE,UAAU,EAC5B,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC,GACjB,CACE,CACD,CACR,CAAC;AACJ,CAAC,CAAC"}
@@ -1,14 +0,0 @@
1
- import React from "react";
2
- import IndeterminateProgress from "../IndeterminateProgress";
3
- import { LinearProgress as LinearProgressComponent } from "./LinearProgress";
4
- import { withTheme } from "@draftbit/theme";
5
- const LinearProgress = (props) => {
6
- if (props.indeterminate) {
7
- return (React.createElement(IndeterminateProgress, { ProgressComponent: LinearProgressComponent, ...props }));
8
- }
9
- else {
10
- return React.createElement(LinearProgressComponent, { ...props });
11
- }
12
- };
13
- export default withTheme(LinearProgress);
14
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,qBAAqB,MAAM,0BAA0B,CAAC;AAK7D,OAAO,EAAE,cAAc,IAAI,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,cAAc,GAEhB,CAAC,KAAK,EAAE,EAAE;IACZ,IAAI,KAAK,CAAC,aAAa,EAAE,CAAC;QACxB,OAAO,CACL,oBAAC,qBAAqB,IACpB,iBAAiB,EAAE,uBAAuB,KACtC,KAAK,GACT,CACH,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,OAAO,oBAAC,uBAAuB,OAAK,KAAK,GAAI,CAAC;IAChD,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC,cAAc,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export const DEFAULT_ANIMATION_DURATION = 500;
2
- //# sourceMappingURL=ProgressCommon.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProgressCommon.js","sourceRoot":"","sources":["ProgressCommon.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,CAAC"}
@@ -1,28 +0,0 @@
1
- import * as React from "react";
2
- import StepIndicator from "./StepIndicator";
3
- import { withTheme } from "@draftbit/theme";
4
- const ProgressIndicator = ({ numberOfSteps, currentStep, currentStepStrokeWidth = 3, stepStrokeCurrentColor = "primary", stepIndicatorSize, currentStepIndicatorSize, stepIndicatorCurrentColor, stepIndicatorLabelCurrentColor, stepIndicatorLabelFontSize = 12, stepNumberFinishedColor = "strongInverse", stepNumberUnfinishedColor = "primary", unfinishedColor = "light", finishedColor = "primary", theme, }) => {
5
- const currentPosition = currentStep - 1;
6
- return (React.createElement(StepIndicator, { stepCount: numberOfSteps, currentPosition: currentPosition, customStyles: {
7
- stepIndicatorSize,
8
- currentStepIndicatorSize: currentStepIndicatorSize
9
- ? currentStepIndicatorSize
10
- : stepIndicatorSize,
11
- stepStrokeFinishedColor: finishedColor,
12
- stepStrokeUnFinishedColor: unfinishedColor,
13
- separatorFinishedColor: finishedColor,
14
- separatorUnFinishedColor: unfinishedColor,
15
- stepIndicatorFinishedColor: finishedColor,
16
- stepIndicatorUnFinishedColor: unfinishedColor,
17
- currentStepStrokeWidth,
18
- stepStrokeCurrentColor: stepStrokeCurrentColor || stepIndicatorCurrentColor,
19
- stepIndicatorLabelUnFinishedColor: stepNumberUnfinishedColor,
20
- stepIndicatorLabelFinishedColor: stepNumberFinishedColor,
21
- stepIndicatorCurrentColor: stepIndicatorCurrentColor || unfinishedColor,
22
- stepIndicatorLabelCurrentColor: stepIndicatorLabelCurrentColor || stepNumberUnfinishedColor,
23
- stepIndicatorLabelFontSize,
24
- labelFontFamily: theme.typography.body1.fontFamily,
25
- } }));
26
- };
27
- export default withTheme(ProgressIndicator);
28
- //# sourceMappingURL=ProgressIndicator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProgressIndicator.js","sourceRoot":"","sources":["ProgressIndicator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAoB5C,MAAM,iBAAiB,GAA6C,CAAC,EACnE,aAAa,EACb,WAAW,EACX,sBAAsB,GAAG,CAAC,EAC1B,sBAAsB,GAAG,SAAS,EAClC,iBAAiB,EACjB,wBAAwB,EACxB,yBAAyB,EACzB,8BAA8B,EAC9B,0BAA0B,GAAG,EAAE,EAC/B,uBAAuB,GAAG,eAAe,EACzC,yBAAyB,GAAG,SAAS,EACrC,eAAe,GAAG,OAAO,EACzB,aAAa,GAAG,SAAS,EACzB,KAAK,GACN,EAAE,EAAE;IACH,MAAM,eAAe,GAAG,WAAW,GAAG,CAAC,CAAC;IACxC,OAAO,CACL,oBAAC,aAAa,IACZ,SAAS,EAAE,aAAa,EACxB,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE;YACZ,iBAAiB;YACjB,wBAAwB,EAAE,wBAAwB;gBAChD,CAAC,CAAC,wBAAwB;gBAC1B,CAAC,CAAC,iBAAiB;YACrB,uBAAuB,EAAE,aAAa;YACtC,yBAAyB,EAAE,eAAe;YAC1C,sBAAsB,EAAE,aAAa;YACrC,wBAAwB,EAAE,eAAe;YACzC,0BAA0B,EAAE,aAAa;YACzC,4BAA4B,EAAE,eAAe;YAC7C,sBAAsB;YACtB,sBAAsB,EACpB,sBAAsB,IAAI,yBAAyB;YACrD,iCAAiC,EAAE,yBAAyB;YAC5D,+BAA+B,EAAE,uBAAuB;YACxD,yBAAyB,EAAE,yBAAyB,IAAI,eAAe;YACvE,8BAA8B,EAC5B,8BAA8B,IAAI,yBAAyB;YAC7D,0BAA0B;YAC1B,eAAe,EAAE,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,UAAU;SACnD,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC,iBAAiB,CAAC,CAAC"}
@@ -1,18 +0,0 @@
1
- import * as React from "react";
2
- import Config from "../Config";
3
- import IconButton from "../IconButton";
4
- import { getValueForRadioButton } from "../../utilities";
5
- import { useRadioButtonGroupContext } from "./context";
6
- const RadioButton = ({ Icon, disabled = false, color, value = "", selected, unselectedColor, onPress, size = Config.radioButtonSize, selectedIcon = "MaterialIcons/radio-button-checked", unselectedIcon = "MaterialIcons/radio-button-unchecked", style, ...rest }) => {
7
- const { value: contextValue, onValueChange } = useRadioButtonGroupContext();
8
- const realValue = getValueForRadioButton(value);
9
- const realContextValue = getValueForRadioButton(contextValue);
10
- const isSelected = selected !== null && selected !== void 0 ? selected : realContextValue === realValue;
11
- const handlePress = () => {
12
- onPress === null || onPress === void 0 ? void 0 : onPress(realValue);
13
- onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(realValue);
14
- };
15
- return (React.createElement(IconButton, { Icon: Icon, icon: isSelected ? selectedIcon : unselectedIcon, color: isSelected ? color : unselectedColor, disabled: disabled, onPress: handlePress, size: size, style: style, ...rest }));
16
- };
17
- export default RadioButton;
18
- //# sourceMappingURL=RadioButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RadioButton.js","sourceRoot":"","sources":["RadioButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AAiBvD,MAAM,WAAW,GAA+B,CAAC,EAC/C,IAAI,EACJ,QAAQ,GAAG,KAAK,EAChB,KAAK,EACL,KAAK,GAAG,EAAE,EACV,QAAQ,EACR,eAAe,EACf,OAAO,EACP,IAAI,GAAG,MAAM,CAAC,eAAe,EAC7B,YAAY,GAAG,oCAAoC,EACnD,cAAc,GAAG,sCAAsC,EACvD,KAAK,EACL,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,GAAG,0BAA0B,EAAE,CAAC;IAE5E,MAAM,SAAS,GAAG,sBAAsB,CAAC,KAAK,CAAC,CAAC;IAChD,MAAM,gBAAgB,GAAG,sBAAsB,CAAC,YAAY,CAAC,CAAC;IAC9D,MAAM,UAAU,GAAG,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,gBAAgB,KAAK,SAAS,CAAC;IAE9D,MAAM,WAAW,GAAG,GAAG,EAAE;QACvB,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAG,SAAS,CAAC,CAAC;QACrB,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAG,SAAS,CAAC,CAAC;IAC7B,CAAC,CAAC;IAEF,OAAO,CACL,oBAAC,UAAU,IACT,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,cAAc,EAChD,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,eAAe,EAC3C,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,KACR,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1,44 +0,0 @@
1
- import * as React from "react";
2
- import { View } from "react-native";
3
- import { getValueForRadioButton } from "../../utilities";
4
- import { radioButtonGroupContext, Direction } from "./context";
5
- const { Provider } = radioButtonGroupContext;
6
- const RadioButtonGroup = ({ direction = Direction.Vertical, value = "", onValueChange, defaultValue, style, children, ...rest }) => {
7
- const [internalValue, setInternalValue] = React.useState("");
8
- React.useEffect(() => {
9
- if (value != null) {
10
- const realValue = getValueForRadioButton(value);
11
- setInternalValue(realValue);
12
- }
13
- }, [value]);
14
- React.useEffect(() => {
15
- if (defaultValue != null) {
16
- const realDefaultValue = getValueForRadioButton(defaultValue);
17
- setInternalValue(realDefaultValue);
18
- }
19
- }, [defaultValue]);
20
- const handleValueChange = (newValue) => {
21
- const realNewValue = getValueForRadioButton(newValue);
22
- setInternalValue(realNewValue);
23
- onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(realNewValue);
24
- };
25
- const _containerStyle = [
26
- {
27
- flexDirection: direction === Direction.Horizontal ? "row" : "column",
28
- },
29
- ];
30
- if (direction !== Direction.Vertical) {
31
- _containerStyle.push({
32
- alignItems: "center",
33
- });
34
- }
35
- return (React.createElement(View, { style: [{ minHeight: 40 }, style], ...rest },
36
- React.createElement(Provider, { value: {
37
- value: internalValue,
38
- onValueChange: handleValueChange,
39
- direction,
40
- } },
41
- React.createElement(View, { style: _containerStyle }, children))));
42
- };
43
- export default RadioButtonGroup;
44
- //# sourceMappingURL=RadioButtonGroup.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RadioButtonGroup.js","sourceRoot":"","sources":["RadioButtonGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAwB,MAAM,cAAc,CAAC;AAE1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAW/D,MAAM,EAAE,QAAQ,EAAE,GAAG,uBAAuB,CAAC;AAE7C,MAAM,gBAAgB,GAAoC,CAAC,EACzD,SAAS,GAAG,SAAS,CAAC,QAAQ,EAC9B,KAAK,GAAG,EAAE,EACV,aAAa,EACb,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAE7D,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YAClB,MAAM,SAAS,GAAG,sBAAsB,CAAC,KAAK,CAAC,CAAC;YAEhD,gBAAgB,CAAC,SAAS,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,YAAY,IAAI,IAAI,EAAE,CAAC;YACzB,MAAM,gBAAgB,GAAG,sBAAsB,CAAC,YAAY,CAAC,CAAC;YAE9D,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;QACrC,CAAC;IACH,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAEnB,MAAM,iBAAiB,GAAG,CAAC,QAAyB,EAAE,EAAE;QACtD,MAAM,YAAY,GAAG,sBAAsB,CAAC,QAAQ,CAAC,CAAC;QAEtD,gBAAgB,CAAC,YAAY,CAAC,CAAC;QAC/B,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAG,YAAY,CAAC,CAAC;IAChC,CAAC,CAAC;IAEF,MAAM,eAAe,GAAyB;QAC5C;YACE,aAAa,EAAE,SAAS,KAAK,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ;SACrE;KACF,CAAC;IAEF,IAAI,SAAS,KAAK,SAAS,CAAC,QAAQ,EAAE,CAAC;QACrC,eAAe,CAAC,IAAI,CAAC;YACnB,UAAU,EAAE,QAAQ;SACrB,CAAC,CAAC;IACL,CAAC;IAED,OAAO,CACL,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,KAAM,IAAI;QAC/C,oBAAC,QAAQ,IACP,KAAK,EAAE;gBACL,KAAK,EAAE,aAAa;gBACpB,aAAa,EAAE,iBAAiB;gBAChC,SAAS;aACV;YAED,oBAAC,IAAI,IAAC,KAAK,EAAE,eAAe,IAAG,QAAQ,CAAQ,CACtC,CACN,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -1,79 +0,0 @@
1
- import * as React from "react";
2
- import { StyleSheet, View, Platform, } from "react-native";
3
- import RadioButton from "./RadioButton";
4
- import Text from "../Text";
5
- import { useRadioButtonGroupContext } from "./context";
6
- import { Direction as GroupDirection } from "./context";
7
- import Touchable from "../Touchable";
8
- import { extractStyles, getValueForRadioButton } from "../../utilities";
9
- import { withTheme } from "@draftbit/theme";
10
- export var Direction;
11
- (function (Direction) {
12
- Direction["Row"] = "row";
13
- Direction["RowReverse"] = "row-reverse";
14
- })(Direction || (Direction = {}));
15
- const getRadioButtonAlignment = (parentDirection, direction) => {
16
- if (parentDirection === GroupDirection.Horizontal) {
17
- return direction === Direction.Row ? "flex-start" : "flex-end";
18
- }
19
- else if (direction === Direction.RowReverse) {
20
- return "flex-start";
21
- }
22
- else {
23
- return "flex-end";
24
- }
25
- };
26
- const renderLabel = (value, labelStyle, textStyle) => {
27
- if (typeof value === "string") {
28
- return React.createElement(Text, { style: [labelStyle, textStyle] }, value);
29
- }
30
- else {
31
- return React.createElement(React.Fragment, null, value);
32
- }
33
- };
34
- const RadioButtonRow = ({ Icon, label, value = "", color, unselectedColor, onPress, labelContainerStyle, labelStyle, radioButtonStyle, direction = Direction.Row, selected, disabled, style, theme, ...rest }) => {
35
- const { value: contextValue, onValueChange, direction: parentDirection, } = useRadioButtonGroupContext();
36
- const realValue = getValueForRadioButton(value);
37
- const realContextValue = getValueForRadioButton(contextValue);
38
- const isSelected = selected !== null && selected !== void 0 ? selected : realContextValue === realValue;
39
- const handlePress = () => {
40
- onPress === null || onPress === void 0 ? void 0 : onPress(realValue);
41
- onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(realValue);
42
- };
43
- const { textStyles, viewStyles } = extractStyles(style);
44
- return (React.createElement(Touchable, { onPress: handlePress, style: [styles.mainParent, { flexDirection: direction }, viewStyles], disabled: disabled, ...rest },
45
- React.createElement(View, { style: [
46
- styles.label,
47
- {
48
- alignItems: direction === Direction.Row ? "flex-start" : "flex-end",
49
- },
50
- labelContainerStyle,
51
- ] }, renderLabel(label, labelStyle, StyleSheet.flatten([{ color: theme.colors.text.strong }, textStyles]))),
52
- React.createElement(View, { style: {
53
- flex: 1,
54
- alignItems: getRadioButtonAlignment(parentDirection, direction),
55
- } },
56
- React.createElement(RadioButton, { Icon: Icon, selected: isSelected, value: realValue, color: color, unselectedColor: unselectedColor, style: radioButtonStyle }))));
57
- };
58
- const styles = StyleSheet.create({
59
- mainParent: {
60
- flex: 1,
61
- alignItems: "center",
62
- justifyContent: "space-around",
63
- paddingStart: 20,
64
- minHeight: 50,
65
- paddingEnd: 20,
66
- display: "flex",
67
- ...Platform.select({
68
- web: {
69
- cursor: "pointer",
70
- userSelect: "none",
71
- },
72
- }),
73
- },
74
- label: {
75
- flex: 3,
76
- },
77
- });
78
- export default withTheme(RadioButtonRow);
79
- //# sourceMappingURL=RadioButtonRow.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RadioButtonRow.js","sourceRoot":"","sources":["RadioButtonRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,UAAU,EAEV,IAAI,EACJ,QAAQ,GACT,MAAM,cAAc,CAAC;AACtB,OAAO,WAAiC,MAAM,eAAe,CAAC;AAC9D,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AAEvD,OAAO,EAAE,SAAS,IAAI,cAAc,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAa,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEvD,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,uCAA0B,CAAA;AAC5B,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AAeD,MAAM,uBAAuB,GAAG,CAC9B,eAA2C,EAC3C,SAAoB,EACpB,EAAE;IACF,IAAI,eAAe,KAAK,cAAc,CAAC,UAAU,EAAE,CAAC;QAClD,OAAO,SAAS,KAAK,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU,CAAC;IACjE,CAAC;SAAM,IAAI,SAAS,KAAK,SAAS,CAAC,UAAU,EAAE,CAAC;QAC9C,OAAO,YAAY,CAAC;IACtB,CAAC;SAAM,CAAC;QACN,OAAO,UAAU,CAAC;IACpB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,WAA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AC,CAAC"}
@@ -1,15 +0,0 @@
1
- import { createContext, useContext } from "react";
2
- export var Direction;
3
- (function (Direction) {
4
- Direction["Horizontal"] = "horizontal";
5
- Direction["Vertical"] = "vertical";
6
- })(Direction || (Direction = {}));
7
- export const radioButtonGroupContext = createContext({
8
- onValueChange: () => { },
9
- value: "",
10
- direction: undefined,
11
- });
12
- export function useRadioButtonGroupContext() {
13
- return useContext(radioButtonGroupContext);
14
- }
15
- //# sourceMappingURL=context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAElD,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,sCAAyB,CAAA;IACzB,kCAAqB,CAAA;AACvB,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AAOD,MAAM,CAAC,MAAM,uBAAuB,GAAG,aAAa,CAA0B;IAC5E,aAAa,EAAE,GAAG,EAAE,GAAE,CAAC;IACvB,KAAK,EAAE,EAAE;IACT,SAAS,EAAE,SAAS;CACrB,CAAC,CAAC;AAEH,MAAM,UAAU,0BAA0B;IACxC,OAAO,UAAU,CAAC,uBAAuB,CAAC,CAAC;AAC7C,CAAC"}
@@ -1,4 +0,0 @@
1
- export { default as RadioButton } from "./RadioButton";
2
- export { default as RadioButtonGroup } from "./RadioButtonGroup";
3
- export { default as RadioButtonRow } from "./RadioButtonRow";
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,49 +0,0 @@
1
- import * as React from "react";
2
- import { View, Text, Image, StyleSheet, } from "react-native";
3
- import { withTheme } from "@draftbit/theme";
4
- import Config from "./Config";
5
- const Row = ({ titleTypeStyle, titleColor, subtitleTypeStyle, subtitleColor, title, subtitle, multilineSubtitle, image, right, style, }) => {
6
- return (React.createElement(View, { style: [styles.container, { padding: 16 }, style] },
7
- React.createElement(View, { style: styles.leftContainer },
8
- image && (React.createElement(Image, { source: typeof image === "string" ? { uri: image } : image, style: {
9
- marginRight: 12,
10
- width: subtitle
11
- ? Config.rowMultiLineImageSize
12
- : Config.rowSingleLineImageSize,
13
- height: subtitle
14
- ? Config.rowMultiLineImageSize
15
- : Config.rowSingleLineImageSize,
16
- } })),
17
- React.createElement(View, { style: styles.textContainer },
18
- React.createElement(Text, { style: [
19
- titleTypeStyle,
20
- {
21
- color: titleColor,
22
- },
23
- ], numberOfLines: 1 }, title),
24
- subtitle ? (React.createElement(Text, { style: [
25
- subtitleTypeStyle,
26
- {
27
- color: subtitleColor,
28
- marginTop: 4,
29
- },
30
- ], numberOfLines: multilineSubtitle ? undefined : 1 }, subtitle)) : null)),
31
- right && right()));
32
- };
33
- const styles = StyleSheet.create({
34
- leftContainer: {
35
- flexDirection: "row",
36
- flex: 1,
37
- },
38
- container: {
39
- flexDirection: "row",
40
- justifyContent: "space-between",
41
- alignItems: "center",
42
- },
43
- textContainer: {
44
- flex: 1,
45
- justifyContent: "center",
46
- },
47
- });
48
- export default withTheme(Row);
49
- //# sourceMappingURL=Row.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Row.js","sourceRoot":"","sources":["Row.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,IAAI,EACJ,IAAI,EACJ,KAAK,EAEL,UAAU,GAIX,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,MAAM,MAAM,UAAU,CAAC;A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ACH,CACF;QACN,KAAK,IAAI,KAAK,EAAE,CACZ,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,aAAa,EAAE;QACb,aAAa,EAAE,KAAK;QACpB,IAAI,EAAE,CAAC;KACR;IACD,SAAS,EAAE;QACT,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,eAAe;QAC/B,UAAU,EAAE,QAAQ;KACrB;IACD,aAAa,EAAE;QACb,IAAI,EAAE,CAAC;QACP,cAAc,EAAE,QAAQ;KACzB;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC,GAAG,CAAC,CAAC"}
@@ -1,8 +0,0 @@
1
- import * as React from "react";
2
- import { Image } from "react-native";
3
- import Config from "./Config";
4
- const SVG = ({ source = Config.placeholderSvgURL, style, }) => {
5
- return React.createElement(Image, { style: style, source: { uri: source } });
6
- };
7
- export default SVG;
8
- //# sourceMappingURL=SVG.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SVG.js","sourceRoot":"","sources":["SVG.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAyB,MAAM,cAAc,CAAC;AAE5D,OAAO,MAAM,MAAM,UAAU,CAAC;AAO9B,MAAM,GAAG,GAAyD,CAAC,EACjE,MAAM,GAAG,MAAM,CAAC,iBAAiB,EACjC,KAAK,GACN,EAAE,EAAE;IACH,OAAO,oBAAC,KAAK,IAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,GAAI,CAAC;AAC1D,CAAC,CAAC;AAEF,eAAe,GAAG,CAAC"}
@@ -1,10 +0,0 @@
1
- import * as React from "react";
2
- import { View } from "react-native";
3
- import { SvgUri } from "react-native-svg";
4
- import Config from "./Config";
5
- const SVG = ({ source = Config.placeholderSvgURL, style, }) => {
6
- return (React.createElement(View, { style: style },
7
- React.createElement(SvgUri, { width: "100%", height: "100%", uri: source })));
8
- };
9
- export default SVG;
10
- //# sourceMappingURL=SVG.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SVG.native.js","sourceRoot":"","sources":["SVG.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAoC,MAAM,cAAc,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,MAAM,MAAM,UAAU,CAAC;AAO9B,MAAM,GAAG,GAAyD,CAAC,EACjE,MAAM,GAAG,MAAM,CAAC,iBAAiB,EACjC,KAAK,GACN,EAAE,EAAE;IACH,OAAO,CACL,oBAAC,IAAI,IAAC,KAAK,EAAE,KAA6B;QACxC,oBAAC,MAAM,IAAC,KAAK,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM,EAAC,GAAG,EAAE,MAAM,GAAI,CAC7C,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,GAAG,CAAC"}
@@ -1,42 +0,0 @@
1
- import * as React from "react";
2
- import { StyleSheet, ScrollView, View, } from "react-native";
3
- import { SafeAreaView } from "react-native-safe-area-context";
4
- import { withTheme } from "@draftbit/theme";
5
- function ScreenContainer({ scrollable = false, hasSafeArea = false, hasBottomSafeArea = false, hasTopSafeArea = false, hasLeftSafeArea = true, hasRightSafeArea = true, theme, style, children, ...rest }) {
6
- var _a;
7
- const backgroundColor = ((_a = StyleSheet.flatten(style)) === null || _a === void 0 ? void 0 : _a.backgroundColor) || theme.colors.background.base;
8
- const edges = [];
9
- if (hasSafeArea || hasTopSafeArea) {
10
- edges.push("top");
11
- }
12
- if (hasSafeArea || hasBottomSafeArea) {
13
- edges.push("bottom");
14
- }
15
- if (hasSafeArea || hasLeftSafeArea) {
16
- edges.push("left");
17
- }
18
- if (hasSafeArea || hasRightSafeArea) {
19
- edges.push("right");
20
- }
21
- return (React.createElement(SafeAreaView, { edges: edges, style: [
22
- styles.container,
23
- {
24
- backgroundColor,
25
- },
26
- ], ...rest }, scrollable ? (React.createElement(ScrollView, { contentContainerStyle: [
27
- styles.scrollViewContainer,
28
- { backgroundColor },
29
- style,
30
- ] }, children)) : (React.createElement(View, { style: [styles.container, { backgroundColor }, style] }, children))));
31
- }
32
- const styles = StyleSheet.create({
33
- container: {
34
- flex: 1,
35
- },
36
- scrollViewContainer: {
37
- flexGrow: 1,
38
- flex: undefined,
39
- },
40
- });
41
- export default withTheme(ScreenContainer);
42
- //# sourceMappingURL=ScreenContainer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ScreenContainer.js","sourceRoot":"","sources":["ScreenContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,UAAU,EACV,UAAU,EAGV,IAAI,GACL,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAe5C,SAAS,eAAe,CAAC,EACvB,UAAU,GAAG,KAAK,EAClB,WAAW,GAAG,KAAK,EACnB,iBAAiB,GAAG,KAAK,EACzB,cAAc,GAAG,KAAK,EACtB,eAAe,GAAG,IAAI,EACtB,gBAAgB,GAAG,IAAI,EACvB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,GAAG,IAAI,EACc;;IACrB,MAAM,eAAe,GACnB,CAAA,MAAA,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,0CAAE,eAAe,KAAI,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC;IAE7E,MAAM,KAAK,GAAW,EAAE,CAAC;IACzB,IAAI,WAAW,IAAI,cAAc,EAAE,CAAC;QAClC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACpB,CAAC;IAED,IAAI,WAAW,IAAI,iBAAiB,EAAE,CAAC;QACrC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACvB,CAAC;IAED,IAAI,WAAW,IAAI,eAAe,EAAE,CAAC;QACnC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACrB,CAAC;IAED,IAAI,WAAW,IAAI,gBAAgB,EAAE,CAAC;QACpC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACtB,CAAC;IAED,OAAO,CACL,oBAAC,YAAY,IACX,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE;YACL,MAAM,CAAC,SAAS;YAChB;gBACE,eAAe;aAChB;SACF,KACG,IAAI,IAEP,UAAU,CAAC,CAAC,CAAC,CACZ,oBAAC,UAAU,IACT,qBAAqB,EAAE;YACrB,MAAM,CAAC,mBAAmB;YAC1B,EAAE,eAAe,EAAE;YACnB,KAAK;SACN,IAEA,QAAQ,CACE,CACd,CAAC,CAAC,CAAC,CACF,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,eAAe,EAAE,EAAE,KAAK,CAAC,IACxD,QAAQ,CACJ,CACR,CACY,CAChB,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,IAAI,EAAE,CAAC;KACR;IACD,mBAAmB,EAAE;QACnB,QAAQ,EAAE,CAAC;QACX,IAAI,EAAE,SAAS;KAChB;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC,eAAe,CAAC,CAAC"}
@@ -1,14 +0,0 @@
1
- import React from "react";
2
- import { View, Text } from "react-native";
3
- import { withTheme } from "@draftbit/theme";
4
- const SectionHeader = ({ style, children, }) => React.createElement(View, { style: style }, children);
5
- export const DefaultSectionHeader = withTheme(({ title, theme, backgroundColor, textColor }) => {
6
- return (React.createElement(Text, { testID: "default-section-header", style: {
7
- color: textColor !== null && textColor !== void 0 ? textColor : theme.colors.background.base,
8
- backgroundColor: backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : theme.colors.branding.primary,
9
- fontSize: 16,
10
- padding: 10,
11
- } }, title));
12
- });
13
- export default SectionHeader;
14
- //# sourceMappingURL=SectionHeader.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SectionHeader.js","sourceRoot":"","sources":["SectionHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAwB,IAAI,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAO5C,MAAM,aAAa,GAA0D,CAAC,EAC5E,KAAK,EACL,QAAQ,GACT,EAAE,EAAE,CAAC,oBAAC,IAAI,IAAC,KAAK,EAAE,KAAK,IAAG,QAAQ,CAAQ,CAAC;AAQ5C,MAAM,CAAC,MAAM,oBAAoB,GAAG,SAAS,CAC3C,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,SAAS,EAA6B,EAAE,EAAE;IAC1E,OAAO,CACL,oBAAC,IAAI,IACH,MAAM,EAAC,wBAAwB,EAC/B,KAAK,EAAE;YACL,KAAK,EAAE,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI;YAChD,eAAe,EAAE,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO;YACjE,QAAQ,EAAE,EAAE;YACZ,OAAO,EAAE,EAAE;SACZ,IAEA,KAAK,CACD,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,111 +0,0 @@
1
- import React from "react";
2
- import { FlashList } from "@shopify/flash-list";
3
- import SectionHeader, { DefaultSectionHeader } from "./SectionHeader";
4
- import { flattenReactFragments } from "../../utilities";
5
- import FlatList from "../FlatList";
6
- export const DEFAULT_SECTION = "Uncategorized";
7
- const SectionList = React.forwardRef(({ sectionKey, stickyHeader = false, listComponent = "FlatList", data: dataProp, renderItem: renderItemProp, keyExtractor: keyExtractorProp, sectionHeaderBackgroundColor, sectionHeaderTextColor, ...rest }, ref) => {
8
- const data = React.useMemo(() => (Array.isArray(dataProp) ? dataProp : []), [dataProp]);
9
- const dataWithSections = React.useMemo(() => {
10
- var _a;
11
- const result = [];
12
- const sectionDataItems = {};
13
- for (const item of data) {
14
- const section = ((_a = item[sectionKey]) === null || _a === void 0 ? void 0 : _a.toString()) || DEFAULT_SECTION;
15
- if (sectionDataItems[section]) {
16
- sectionDataItems[section].push(item);
17
- }
18
- else {
19
- sectionDataItems[section] = [item];
20
- }
21
- }
22
- for (const section in sectionDataItems) {
23
- result.push({ type: "SECTION_ITEM", title: section });
24
- const sectionItems = sectionDataItems[section].map((item) => ({ type: "DATA_ITEM", data: item }));
25
- result.push(...sectionItems);
26
- }
27
- return result;
28
- }, [data, sectionKey]);
29
- const sectionHeaderIndicies = React.useMemo(() => stickyHeader
30
- ? dataWithSections
31
- .filter((item) => item.type === "SECTION_ITEM")
32
- .map((item) => dataWithSections.indexOf(item))
33
- : undefined, [dataWithSections, stickyHeader]);
34
- const extractSectionHeader = (element) => {
35
- if (!element) {
36
- return null;
37
- }
38
- const props = element.props || {};
39
- const children = flattenReactFragments(React.Children.toArray(props.children));
40
- if (element.type === SectionHeader) {
41
- return element;
42
- }
43
- else {
44
- for (const child of children) {
45
- if (child.type === SectionHeader) {
46
- return child;
47
- }
48
- }
49
- }
50
- return null;
51
- };
52
- const extractRemainingNonSectionHeader = (element) => {
53
- if (!element) {
54
- return null;
55
- }
56
- const props = element.props || {};
57
- const children = flattenReactFragments(React.Children.toArray(props.children));
58
- if (element.type === SectionHeader) {
59
- return null;
60
- }
61
- else {
62
- const newChildren = [];
63
- for (const child of children) {
64
- if (child.type !== SectionHeader) {
65
- newChildren.push(child);
66
- }
67
- }
68
- return React.cloneElement(element, {
69
- ...props,
70
- children: newChildren,
71
- });
72
- }
73
- };
74
- const renderItem = ({ item, index, }) => {
75
- switch (item.type) {
76
- case "SECTION_ITEM": {
77
- const renderedItem = renderItemProp({
78
- index,
79
- section: item.title,
80
- });
81
- return (extractSectionHeader(renderedItem) || (React.createElement(DefaultSectionHeader, { title: item.title, backgroundColor: sectionHeaderBackgroundColor, textColor: sectionHeaderTextColor })));
82
- }
83
- case "DATA_ITEM": {
84
- const renderedItem = renderItemProp({
85
- item: item.data,
86
- index,
87
- section: item.data[sectionKey] || DEFAULT_SECTION,
88
- });
89
- return extractRemainingNonSectionHeader(renderedItem);
90
- }
91
- }
92
- };
93
- const keyExtractor = (item, index) => {
94
- switch (item.type) {
95
- case "SECTION_ITEM": {
96
- return `section_${index.toString()}`;
97
- }
98
- case "DATA_ITEM": {
99
- return (keyExtractorProp === null || keyExtractorProp === void 0 ? void 0 : keyExtractorProp(item.data, index)) || index.toString();
100
- }
101
- }
102
- };
103
- switch (listComponent) {
104
- case "FlatList":
105
- return (React.createElement(FlatList, { ref: ref, stickyHeaderIndices: sectionHeaderIndicies, ...rest, data: dataWithSections, renderItem: renderItem, keyExtractor: keyExtractor }));
106
- case "FlashList":
107
- return (React.createElement(FlashList, { ref: ref, stickyHeaderIndices: sectionHeaderIndicies, ...rest, data: dataWithSections, renderItem: renderItem, keyExtractor: keyExtractor }));
108
- }
109
- });
110
- export default SectionList;
111
- //# sourceMappingURL=SectionList.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SectionList.js","sourceRoot":"","sources":["SectionList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAkB,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGhE,OAAO,aAAa,EAAE,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,QAAQ,MAAM,aAAa,CAAC;AAuCnC,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC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AClC,IAAI,EAAE,IAAI,CAAC,IAAI;oBACf,KAAK;oBACL,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,eAAe;iBAClD,CAAC,CAAC;gBACH,OAAO,gCAAgC,CAAC,YAAY,CAAC,CAAC;YACxD,CAAC;QACH,CAAC;IACH,CAAC,CAAC;IAEF,MAAM,YAAY,GAAG,CAAC,IAAwB,EAAE,KAAa,EAAE,EAAE;QAC/D,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;YAClB,KAAK,cAAc,CAAC,CAAC,CAAC;gBACpB,OAAO,WAAW,KAAK,CAAC,QAAQ,EAAE,EAAE,CAAC;YACvC,CAAC;YACD,KAAK,WAAW,CAAC,CAAC,CAAC;gBACjB,OAAO,CAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAG,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,KAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;YAClE,CAAC;QACH,CAAC;IACH,CAAC,CAAC;IAEF,QAAQ,aAAa,EAAE,CAAC;QACtB,KAAK,UAAU;YACb,OAAO,CACL,oBAAC,QAAQ,IACP,GAAG,EAAE,GAAmC,EACxC,mBAAmB,EAAE,qBAAqB,KACrC,IAA0C,EAC/C,IAAI,EAAE,gBAAgB,EACtB,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,YAAY,GAC1B,CACH,CAAC;QACJ,KAAK,WAAW;YACd,OAAO,CACL,oBAAC,SAAS,IACR,GAAG,EAAE,GAAU,EACf,mBAAmB,EAAE,qBAAqB,KACrC,IAA2C,EAChD,IAAI,EAAE,gBAAgB,EACtB,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,YAAY,GAC1B,CACH,CAAC;IACN,CAAC;AACH,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1,3 +0,0 @@
1
- export { default as SectionList } from "./SectionList";
2
- export { default as SectionHeader } from "./SectionHeader";
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC"}