@draftbit/core 46.5.2-b58416.2 → 46.6.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 (311) hide show
  1. package/lib/commonjs/components/Accordion/AccordionItem.js +23 -4
  2. package/lib/commonjs/components/AvatarEdit.js +15 -4
  3. package/lib/commonjs/components/Banner.js +23 -4
  4. package/lib/commonjs/components/Button.js +36 -13
  5. package/lib/commonjs/components/Carousel.js +30 -8
  6. package/lib/commonjs/components/Checkbox/Checkbox.js +1 -3
  7. package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +23 -6
  8. package/lib/commonjs/components/Checkbox/CheckboxRow.js +1 -2
  9. package/lib/commonjs/components/Container.js +15 -4
  10. package/lib/commonjs/components/DatePicker/DatePicker.js +26 -13
  11. package/lib/commonjs/components/DeprecatedButton.js +3 -27
  12. package/lib/commonjs/components/DeprecatedCardWrapper.js +15 -1
  13. package/lib/commonjs/components/DeprecatedFAB.js +1 -2
  14. package/lib/commonjs/components/Divider.js +14 -1
  15. package/lib/commonjs/components/FAB.js +18 -4
  16. package/lib/commonjs/components/IconButton.js +19 -4
  17. package/lib/commonjs/components/Picker/PickerComponent.ios.js +36 -11
  18. package/lib/commonjs/components/Portal/Portal.js +27 -3
  19. package/lib/commonjs/components/Portal/PortalConsumer.js +22 -7
  20. package/lib/commonjs/components/Portal/PortalManager.js +34 -8
  21. package/lib/commonjs/components/Pressable.js +37 -0
  22. package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js +9 -1
  23. package/lib/commonjs/components/RadioButton/context.js +1 -1
  24. package/lib/commonjs/components/ScreenContainer.js +20 -4
  25. package/lib/commonjs/components/StarRating.js +23 -4
  26. package/lib/commonjs/components/Surface.js +14 -2
  27. package/lib/commonjs/components/Swiper/Swiper.js +2 -0
  28. package/lib/commonjs/components/TextField.js +76 -28
  29. package/lib/commonjs/components/ToggleButton.js +15 -2
  30. package/lib/commonjs/components/Touchable.js +8 -3
  31. package/lib/commonjs/constants.js +1 -1
  32. package/lib/commonjs/hooks.js +1 -2
  33. package/lib/commonjs/index.js +7 -0
  34. package/lib/commonjs/mappings/Button.js +39 -10
  35. package/lib/commonjs/mappings/FlashList.js +45 -2
  36. package/lib/commonjs/mappings/FlatList.js +12 -0
  37. package/lib/commonjs/mappings/StarRating.js +6 -2
  38. package/lib/commonjs/mappings/Swiper.js +2 -0
  39. package/lib/commonjs/mappings/Touchable.js +47 -7
  40. package/lib/commonjs/styles/overlay.js +1 -3
  41. package/lib/commonjs/utilities.js +1 -2
  42. package/lib/module/components/AnimatedCircularProgress.js +13 -1
  43. package/lib/module/components/AspectRatio.js +18 -1
  44. package/lib/module/components/AvatarEdit.js +15 -4
  45. package/lib/module/components/Banner.js +25 -4
  46. package/lib/module/components/Button.js +36 -13
  47. package/lib/module/components/CardBlock.js +14 -4
  48. package/lib/module/components/CardContainerRating.js +14 -4
  49. package/lib/module/components/CardContainerShortImage.js +18 -4
  50. package/lib/module/components/Checkbox/Checkbox.js +2 -3
  51. package/lib/module/components/Checkbox/CheckboxGroup.js +16 -2
  52. package/lib/module/components/Checkbox/CheckboxGroupRow.js +2 -3
  53. package/lib/module/components/Checkbox/CheckboxRow.js +2 -3
  54. package/lib/module/components/Container.js +17 -4
  55. package/lib/module/components/DeprecatedButton.js +4 -28
  56. package/lib/module/components/DeprecatedFAB.js +24 -5
  57. package/lib/module/components/Elevation.js +14 -2
  58. package/lib/module/components/FormRow.js +17 -2
  59. package/lib/module/components/Layout.js +42 -21
  60. package/lib/module/components/NumberInput.js +12 -3
  61. package/lib/module/components/Portal/Portal.js +28 -3
  62. package/lib/module/components/Portal/PortalConsumer.js +22 -7
  63. package/lib/module/components/Portal/PortalHost.js +45 -15
  64. package/lib/module/components/Portal/PortalManager.js +33 -7
  65. package/lib/module/components/Pressable.js +30 -0
  66. package/lib/module/components/ProgressBar.js +39 -7
  67. package/lib/module/components/RadioButton/RadioButton.js +13 -1
  68. package/lib/module/components/RadioButton/RadioButtonGroup.js +16 -2
  69. package/lib/module/components/RadioButton/RadioButtonRow.js +24 -5
  70. package/lib/module/components/RadioButton/context.js +1 -1
  71. package/lib/module/components/Slider.js +21 -4
  72. package/lib/module/components/StepIndicator.js +58 -18
  73. package/lib/module/components/Surface.js +15 -1
  74. package/lib/module/components/Swiper/Swiper.js +2 -0
  75. package/lib/module/components/Switch.js +21 -10
  76. package/lib/module/components/TextField.js +78 -28
  77. package/lib/module/components/Touchable.js +8 -3
  78. package/lib/module/constants.js +1 -2
  79. package/lib/module/index.js +1 -0
  80. package/lib/module/mappings/Button.js +40 -11
  81. package/lib/module/mappings/FieldSearchBarFull.js +4 -1
  82. package/lib/module/mappings/FlashList.js +46 -3
  83. package/lib/module/mappings/FlatList.js +13 -1
  84. package/lib/module/mappings/Swiper.js +3 -1
  85. package/lib/module/mappings/Touchable.js +49 -9
  86. package/lib/typescript/src/components/Button.d.ts.map +1 -1
  87. package/lib/typescript/src/components/Checkbox/Checkbox.d.ts +2 -2
  88. package/lib/typescript/src/components/Checkbox/Checkbox.d.ts.map +1 -1
  89. package/lib/typescript/src/components/Checkbox/CheckboxGroupRow.d.ts.map +1 -1
  90. package/lib/typescript/src/components/Checkbox/CheckboxRow.d.ts.map +1 -1
  91. package/lib/typescript/src/components/DeprecatedButton.d.ts +2 -2
  92. package/lib/typescript/src/components/DeprecatedButton.d.ts.map +1 -1
  93. package/lib/typescript/src/components/DeprecatedFAB.d.ts +2 -2
  94. package/lib/typescript/src/components/DeprecatedFAB.d.ts.map +1 -1
  95. package/lib/typescript/src/components/Pressable.d.ts +10 -0
  96. package/lib/typescript/src/components/Pressable.d.ts.map +1 -0
  97. package/lib/typescript/src/components/Swiper/Swiper.d.ts +2 -1
  98. package/lib/typescript/src/components/Swiper/Swiper.d.ts.map +1 -1
  99. package/lib/typescript/src/components/Touchable.d.ts +5 -6
  100. package/lib/typescript/src/components/Touchable.d.ts.map +1 -1
  101. package/lib/typescript/src/index.d.ts +1 -0
  102. package/lib/typescript/src/index.d.ts.map +1 -1
  103. package/lib/typescript/src/mappings/Button.d.ts +113 -4
  104. package/lib/typescript/src/mappings/Button.d.ts.map +1 -1
  105. package/lib/typescript/src/mappings/FlashList.d.ts +112 -2
  106. package/lib/typescript/src/mappings/FlashList.d.ts.map +1 -1
  107. package/lib/typescript/src/mappings/FlatList.d.ts +42 -0
  108. package/lib/typescript/src/mappings/FlatList.d.ts.map +1 -1
  109. package/lib/typescript/src/mappings/Swiper.d.ts +11 -0
  110. package/lib/typescript/src/mappings/Swiper.d.ts.map +1 -1
  111. package/lib/typescript/src/mappings/Touchable.d.ts +59 -5
  112. package/lib/typescript/src/mappings/Touchable.d.ts.map +1 -1
  113. package/lib/typescript/src/styles/overlay.d.ts +1 -1
  114. package/lib/typescript/src/styles/overlay.d.ts.map +1 -1
  115. package/lib/typescript/src/styles/shadow.d.ts +2 -2
  116. package/package.json +6 -6
  117. package/src/components/Button.tsx +14 -4
  118. package/src/components/Checkbox/Checkbox.tsx +5 -7
  119. package/src/components/Checkbox/CheckboxGroupRow.tsx +3 -3
  120. package/src/components/Checkbox/CheckboxRow.tsx +3 -3
  121. package/src/components/DeprecatedButton.tsx +7 -31
  122. package/src/components/DeprecatedFAB.tsx +5 -5
  123. package/src/components/Pressable.tsx +44 -0
  124. package/src/components/Swiper/Swiper.tsx +3 -0
  125. package/src/components/Touchable.tsx +11 -7
  126. package/src/index.tsx +1 -0
  127. package/src/mappings/Button.ts +41 -10
  128. package/src/mappings/FlashList.ts +82 -30
  129. package/src/mappings/FlatList.ts +16 -0
  130. package/src/mappings/Swiper.ts +4 -0
  131. package/src/mappings/Touchable.ts +53 -6
  132. package/src/styles/overlay.tsx +2 -2
  133. package/src/Provider.js +0 -9
  134. package/src/components/Accordion/AccordionGroup.js +0 -44
  135. package/src/components/Accordion/AccordionItem.js +0 -32
  136. package/src/components/Accordion/index.js +0 -2
  137. package/src/components/ActionSheet/ActionSheet.js +0 -45
  138. package/src/components/ActionSheet/ActionSheetCancel.js +0 -6
  139. package/src/components/ActionSheet/ActionSheetItem.js +0 -30
  140. package/src/components/ActionSheet/index.js +0 -3
  141. package/src/components/AnimatedCircularProgress.js +0 -43
  142. package/src/components/AspectRatio.js +0 -18
  143. package/src/components/AvatarEdit.js +0 -30
  144. package/src/components/Banner.js +0 -109
  145. package/src/components/Button.js +0 -114
  146. package/src/components/Card.js +0 -57
  147. package/src/components/CardBlock.js +0 -54
  148. package/src/components/CardContainer.js +0 -69
  149. package/src/components/CardContainerRating.js +0 -79
  150. package/src/components/CardContainerShortImage.js +0 -33
  151. package/src/components/CardInline.js +0 -36
  152. package/src/components/Carousel.js +0 -68
  153. package/src/components/Checkbox/Checkbox.js +0 -63
  154. package/src/components/Checkbox/CheckboxGroup.js +0 -21
  155. package/src/components/Checkbox/CheckboxGroupRow.js +0 -77
  156. package/src/components/Checkbox/CheckboxRow.js +0 -78
  157. package/src/components/Checkbox/context.js +0 -14
  158. package/src/components/Checkbox/index.js +0 -3
  159. package/src/components/CircleImage.js +0 -8
  160. package/src/components/CircularProgress.js +0 -81
  161. package/src/components/Config.js +0 -64
  162. package/src/components/Container.js +0 -43
  163. package/src/components/DatePicker/DatePicker.js +0 -377
  164. package/src/components/DatePicker/DatePickerComponent.js +0 -13
  165. package/src/components/DatePicker/DatePickerComponent.web.js +0 -30
  166. package/src/components/DatePicker/DatePickerComponentType.js +0 -1
  167. package/src/components/DeprecatedButton.js +0 -95
  168. package/src/components/DeprecatedCardWrapper.js +0 -18
  169. package/src/components/DeprecatedFAB.js +0 -115
  170. package/src/components/Divider.js +0 -13
  171. package/src/components/Elevation.js +0 -20
  172. package/src/components/FAB.js +0 -46
  173. package/src/components/FieldSearchBarFull.js +0 -53
  174. package/src/components/FormRow.js +0 -19
  175. package/src/components/Header.js +0 -44
  176. package/src/components/HeaderLarge.js +0 -7
  177. package/src/components/HeaderMedium.js +0 -7
  178. package/src/components/HeaderOverline.js +0 -7
  179. package/src/components/IconButton.js +0 -35
  180. package/src/components/Image.js +0 -47
  181. package/src/components/Justification.js +0 -1
  182. package/src/components/Layout.js +0 -50
  183. package/src/components/NumberInput.js +0 -49
  184. package/src/components/Picker/Picker.js +0 -267
  185. package/src/components/Picker/PickerComponent.android.js +0 -69
  186. package/src/components/Picker/PickerComponent.ios.js +0 -79
  187. package/src/components/Picker/PickerComponent.web.js +0 -70
  188. package/src/components/Picker/PickerTypes.js +0 -1
  189. package/src/components/Portal/Portal.js +0 -35
  190. package/src/components/Portal/PortalConsumer.js +0 -27
  191. package/src/components/Portal/PortalHost.js +0 -107
  192. package/src/components/Portal/PortalManager.js +0 -32
  193. package/src/components/ProgressBar.js +0 -118
  194. package/src/components/ProgressCircle.js +0 -13
  195. package/src/components/ProgressIndicator.js +0 -27
  196. package/src/components/RadioButton/RadioButton.js +0 -17
  197. package/src/components/RadioButton/RadioButtonFieldGroup.js +0 -17
  198. package/src/components/RadioButton/RadioButtonGroup.js +0 -43
  199. package/src/components/RadioButton/RadioButtonRow.js +0 -76
  200. package/src/components/RadioButton/context.js +0 -14
  201. package/src/components/RadioButton/index.js +0 -4
  202. package/src/components/ResizeMode.js +0 -1
  203. package/src/components/Row.js +0 -48
  204. package/src/components/RowBodyIcon.js +0 -8
  205. package/src/components/RowHeadlineImageCaption.js +0 -12
  206. package/src/components/RowHeadlineImageIcon.js +0 -14
  207. package/src/components/SVG.js +0 -13
  208. package/src/components/ScreenContainer.js +0 -34
  209. package/src/components/Slider.js +0 -63
  210. package/src/components/StarRating.js +0 -50
  211. package/src/components/StepIndicator.js +0 -346
  212. package/src/components/Stepper.js +0 -41
  213. package/src/components/Surface.js +0 -32
  214. package/src/components/Swiper/Swiper.js +0 -29
  215. package/src/components/Swiper/SwiperItem.js +0 -9
  216. package/src/components/Swiper/index.js +0 -2
  217. package/src/components/Switch.js +0 -56
  218. package/src/components/Text.js +0 -33
  219. package/src/components/TextField.js +0 -428
  220. package/src/components/ToggleButton.js +0 -39
  221. package/src/components/Touchable.js +0 -12
  222. package/src/components/Touchable.web.js +0 -2
  223. package/src/components/Typography.js +0 -36
  224. package/src/components/useAuthState.js +0 -31
  225. package/src/constants.js +0 -10
  226. package/src/hooks.js +0 -12
  227. package/src/index.js +0 -52
  228. package/src/interfaces/Icon.js +0 -8
  229. package/src/mappings/Accordion.js +0 -41
  230. package/src/mappings/AccordionItem.js +0 -16
  231. package/src/mappings/ActionSheet.js +0 -13
  232. package/src/mappings/ActionSheetCancel.js +0 -19
  233. package/src/mappings/ActionSheetItem.js +0 -23
  234. package/src/mappings/ActivityIndicator.js +0 -58
  235. package/src/mappings/AudioPlayer.js +0 -57
  236. package/src/mappings/AvatarEdit.js +0 -38
  237. package/src/mappings/Banner.js +0 -32
  238. package/src/mappings/BlurView.js +0 -42
  239. package/src/mappings/Button.js +0 -87
  240. package/src/mappings/Card.js +0 -52
  241. package/src/mappings/CardBlock.js +0 -123
  242. package/src/mappings/CardContainer.js +0 -104
  243. package/src/mappings/CardContainerRating.js +0 -126
  244. package/src/mappings/CardContainerShortImage.js +0 -120
  245. package/src/mappings/CardInline.js +0 -52
  246. package/src/mappings/Carousel.js +0 -19
  247. package/src/mappings/Checkbox.js +0 -46
  248. package/src/mappings/CheckboxGroup.js +0 -26
  249. package/src/mappings/CheckboxRow.js +0 -61
  250. package/src/mappings/CircleImage.js +0 -25
  251. package/src/mappings/Container.js +0 -30
  252. package/src/mappings/CustomCode.js +0 -8
  253. package/src/mappings/DatePicker.js +0 -176
  254. package/src/mappings/Divider.js +0 -27
  255. package/src/mappings/FAB.js +0 -37
  256. package/src/mappings/Fetch.js +0 -13
  257. package/src/mappings/FieldSearchBarFull.js +0 -50
  258. package/src/mappings/FlashList.js +0 -33
  259. package/src/mappings/FlatList.js +0 -24
  260. package/src/mappings/HeaderLarge.js +0 -29
  261. package/src/mappings/HeaderMedium.js +0 -55
  262. package/src/mappings/HeaderOverline.js +0 -55
  263. package/src/mappings/Icon.js +0 -32
  264. package/src/mappings/IconButton.js +0 -35
  265. package/src/mappings/Image.js +0 -35
  266. package/src/mappings/ImageBackground.js +0 -29
  267. package/src/mappings/KeyboardAvoidingView.js +0 -41
  268. package/src/mappings/KeyboardAwareScrollView.js +0 -50
  269. package/src/mappings/Layout.js +0 -200
  270. package/src/mappings/LinearGradient.js +0 -77
  271. package/src/mappings/MapCallout.js +0 -21
  272. package/src/mappings/MapMarker.js +0 -47
  273. package/src/mappings/MapView.js +0 -139
  274. package/src/mappings/Modal.js +0 -42
  275. package/src/mappings/NumberInput.js +0 -254
  276. package/src/mappings/Picker.js +0 -148
  277. package/src/mappings/ProgressBar.js +0 -101
  278. package/src/mappings/ProgressCircle.js +0 -109
  279. package/src/mappings/ProgressIndicator.js +0 -181
  280. package/src/mappings/RadioButton.js +0 -51
  281. package/src/mappings/RadioButtonGroup.js +0 -17
  282. package/src/mappings/RadioButtonRow.js +0 -42
  283. package/src/mappings/RowBodyIcon.js +0 -75
  284. package/src/mappings/RowHeadlineImageCaption.js +0 -167
  285. package/src/mappings/RowHeadlineImageIcon.js +0 -99
  286. package/src/mappings/SVG.js +0 -20
  287. package/src/mappings/SafeAreaView.js +0 -33
  288. package/src/mappings/ScrollView.js +0 -31
  289. package/src/mappings/Slider.js +0 -60
  290. package/src/mappings/StarRating.js +0 -43
  291. package/src/mappings/Stepper.js +0 -32
  292. package/src/mappings/Surface.js +0 -14
  293. package/src/mappings/Swiper.js +0 -60
  294. package/src/mappings/SwiperItem.js +0 -8
  295. package/src/mappings/Switch.js +0 -81
  296. package/src/mappings/Text.js +0 -251
  297. package/src/mappings/TextArea.js +0 -274
  298. package/src/mappings/TextField.js +0 -391
  299. package/src/mappings/TextInput.js +0 -402
  300. package/src/mappings/ToggleButton.js +0 -50
  301. package/src/mappings/Touchable.js +0 -17
  302. package/src/mappings/Video.js +0 -81
  303. package/src/mappings/View.js +0 -207
  304. package/src/mappings/WebView.js +0 -88
  305. package/src/styles/DarkTheme.js +0 -26
  306. package/src/styles/DefaultTheme.js +0 -111
  307. package/src/styles/fonts.js +0 -62
  308. package/src/styles/overlay.js +0 -60
  309. package/src/styles/shadow.js +0 -51
  310. package/src/theming.js +0 -3
  311. package/src/utilities.js +0 -102
@@ -1,6 +1,3 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
4
1
  // @ts-nocheck
5
2
  import React, { Component } from "react";
6
3
  import { View, Text, StyleSheet, Animated, TouchableWithoutFeedback } from "react-native";
@@ -12,7 +9,7 @@ const STEP_STATUS = {
12
9
  export default class StepIndicator extends Component {
13
10
  constructor(props) {
14
11
  super(props);
15
- _defineProperty(this, "renderProgressBarBackground", () => {
12
+ this.renderProgressBarBackground = () => {
16
13
  const {
17
14
  stepCount,
18
15
  direction
@@ -55,8 +52,8 @@ export default class StepIndicator extends Component {
55
52
  },
56
53
  style: progressBarBackgroundStyle
57
54
  });
58
- });
59
- _defineProperty(this, "renderProgressBar", () => {
55
+ };
56
+ this.renderProgressBar = () => {
60
57
  const {
61
58
  stepCount,
62
59
  direction
@@ -86,8 +83,8 @@ export default class StepIndicator extends Component {
86
83
  return /*#__PURE__*/React.createElement(Animated.View, {
87
84
  style: progressBarStyle
88
85
  });
89
- });
90
- _defineProperty(this, "renderStepIndicator", () => {
86
+ };
87
+ this.renderStepIndicator = () => {
91
88
  let steps = [];
92
89
  const {
93
90
  stepCount,
@@ -118,8 +115,8 @@ export default class StepIndicator extends Component {
118
115
  height: this.state.customStyles.currentStepIndicatorSize
119
116
  }]
120
117
  }, steps);
121
- });
122
- _defineProperty(this, "renderStepLabels", () => {
118
+ };
119
+ this.renderStepLabels = () => {
123
120
  const {
124
121
  labels,
125
122
  direction,
@@ -161,8 +158,8 @@ export default class StepIndicator extends Component {
161
158
  alignItems: this.state.customStyles.labelAlign
162
159
  }]
163
160
  }, labelViews);
164
- });
165
- _defineProperty(this, "renderStep", position => {
161
+ };
162
+ this.renderStep = position => {
166
163
  const {
167
164
  renderStepIndicator
168
165
  } = this.props;
@@ -229,8 +226,8 @@ export default class StepIndicator extends Component {
229
226
  }) : /*#__PURE__*/React.createElement(Text, {
230
227
  style: indicatorLabelStyle
231
228
  }, "".concat(position + 1)));
232
- });
233
- _defineProperty(this, "getStepStatus", stepPosition => {
229
+ };
230
+ this.getStepStatus = stepPosition => {
234
231
  const {
235
232
  currentPosition
236
233
  } = this.props;
@@ -241,8 +238,8 @@ export default class StepIndicator extends Component {
241
238
  } else {
242
239
  return STEP_STATUS.UNFINISHED;
243
240
  }
244
- });
245
- _defineProperty(this, "onCurrentPositionChanged", position => {
241
+ };
242
+ this.onCurrentPositionChanged = position => {
246
243
  let {
247
244
  stepCount
248
245
  } = this.props;
@@ -262,7 +259,7 @@ export default class StepIndicator extends Component {
262
259
  toValue: this.state.customStyles.currentStepIndicatorSize / 2,
263
260
  duration: 100
264
261
  })])]).start();
265
- });
262
+ };
266
263
  const defaultStyles = {
267
264
  stepIndicatorSize: 30,
268
265
  currentStepIndicatorSize: 40,
@@ -328,7 +325,6 @@ export default class StepIndicator extends Component {
328
325
  // ),
329
326
  // }));
330
327
  // }
331
-
332
328
  if (prevProps.currentPosition !== this.props.currentPosition) {
333
329
  this.onCurrentPositionChanged(this.props.currentPosition);
334
330
  }
@@ -369,6 +365,50 @@ const styles = StyleSheet.create({
369
365
  justifyContent: "center"
370
366
  }
371
367
  });
368
+ StepIndicator.defaultProps = {
369
+ currentPosition: 0,
370
+ stepCount: 5,
371
+ customStyles: {},
372
+ direction: "horizontal"
373
+ };rrentPositionChanged(this.props.currentPosition);
374
+ }
375
+ }
376
+ }
377
+ const styles = StyleSheet.create({
378
+ container: {
379
+ backgroundColor: "transparent"
380
+ },
381
+ stepIndicatorContainer: {
382
+ flexDirection: "row",
383
+ alignItems: "center",
384
+ justifyContent: "space-around",
385
+ backgroundColor: "transparent"
386
+ },
387
+ stepLabelsContainer: {
388
+ justifyContent: "space-around"
389
+ },
390
+ step: {
391
+ alignItems: "center",
392
+ justifyContent: "center",
393
+ zIndex: 2
394
+ },
395
+ stepContainer: {
396
+ flex: 1,
397
+ flexDirection: "row",
398
+ alignItems: "center",
399
+ justifyContent: "center"
400
+ },
401
+ stepLabel: {
402
+ fontSize: 12,
403
+ textAlign: "center",
404
+ fontWeight: "500"
405
+ },
406
+ stepLabelItem: {
407
+ flex: 1,
408
+ alignItems: "center",
409
+ justifyContent: "center"
410
+ }
411
+ });
372
412
  StepIndicator.defaultProps = {
373
413
  currentPosition: 0,
374
414
  stepCount: 5,
@@ -1,4 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
1
  /* Copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx */
3
2
  import * as React from "react";
4
3
  import { Animated, StyleSheet } from "react-native";
@@ -34,6 +33,21 @@ const Surface = _ref => {
34
33
  return colors.surface;
35
34
  }
36
35
  };
36
+ return /*#__PURE__*/React.createElement(Animated.View, {
37
+ ...rest,
38
+ style: [{
39
+ backgroundColor: getBackgroundColor(),
40
+ elevation,
41
+ ...evalationStyles,
42
+ ...restStyle
43
+ }]
44
+ }, children);
45
+ };
46
+ export default withTheme(Surface);erlay(elevation, colors.surface);
47
+ } else {
48
+ return colors.surface;
49
+ }
50
+ };
37
51
  return /*#__PURE__*/React.createElement(Animated.View, _extends({}, rest, {
38
52
  style: [{
39
53
  backgroundColor: getBackgroundColor(),
@@ -18,6 +18,7 @@ const Swiper = _ref => {
18
18
  keyExtractor,
19
19
  renderItem,
20
20
  children,
21
+ onIndexChanged,
21
22
  style
22
23
  } = _ref;
23
24
  return /*#__PURE__*/React.createElement(View, {
@@ -27,6 +28,7 @@ const Swiper = _ref => {
27
28
  loop: loop,
28
29
  timeout: timeout,
29
30
  vertical: vertical,
31
+ onIndexChanged: onIndexChanged,
30
32
  controlsProps: {
31
33
  prevTitle,
32
34
  nextTitle,
@@ -1,4 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
1
  import * as React from "react";
3
2
  import { Switch as NativeSwitch } from "react-native";
4
3
  import { withTheme } from "../theming";
@@ -29,7 +28,6 @@ function Switch(_ref) {
29
28
  setChecked(value);
30
29
  }
31
30
  }, [value, checked]);
32
-
33
31
  // This special logic is to handle weird APIs like Airtable that return
34
32
  // true or undefined for a boolean
35
33
  const previousDefaultValue = usePrevious(defaultValue);
@@ -38,24 +36,24 @@ function Switch(_ref) {
38
36
  setChecked(Boolean(defaultValue));
39
37
  }
40
38
  }, [defaultValue, previousDefaultValue]);
41
- return /*#__PURE__*/React.createElement(NativeSwitch, _extends({
39
+ return /*#__PURE__*/React.createElement(NativeSwitch, {
42
40
  value: checked,
43
41
  disabled: disabled,
44
42
  trackColor: {
45
43
  false: inactiveTrackThemeColor,
46
44
  true: activeTrackThemeColor
47
45
  },
48
- thumbColor: value ? activeThumbThemeColor : inactiveThumbThemeColor
46
+ thumbColor: value ? activeThumbThemeColor : inactiveThumbThemeColor,
49
47
  // @ts-ignore react-native-web only
50
- ,
51
48
  activeThumbColor: activeThumbThemeColor,
52
49
  ios_backgroundColor: inactiveTrackThemeColor,
53
50
  style: style,
54
51
  onValueChange: bool => {
55
52
  setChecked(bool);
56
53
  onValueChange && onValueChange(bool);
57
- }
58
- }, rest));
54
+ },
55
+ ...rest
56
+ });
59
57
  }
60
58
  function Row(_ref2) {
61
59
  let {
@@ -84,7 +82,7 @@ function Row(_ref2) {
84
82
  setChecked(defaultValue);
85
83
  }
86
84
  }, [defaultValue]);
87
- return /*#__PURE__*/React.createElement(FormRow, _extends({
85
+ return /*#__PURE__*/React.createElement(FormRow, {
88
86
  disabled: disabled,
89
87
  onPress: () => {
90
88
  setChecked(!checked);
@@ -92,8 +90,9 @@ function Row(_ref2) {
92
90
  },
93
91
  label: label,
94
92
  direction: direction,
95
- style: style
96
- }, rest), /*#__PURE__*/React.createElement(Switch, {
93
+ style: style,
94
+ ...rest
95
+ }, /*#__PURE__*/React.createElement(Switch, {
97
96
  theme: theme,
98
97
  value: checked,
99
98
  disabled: disabled,
@@ -106,4 +105,16 @@ function Row(_ref2) {
106
105
  }
107
106
  const SwitchRow = withTheme(Row);
108
107
  export { SwitchRow };
108
+ export default withTheme(Switch);: theme,
109
+ value: checked,
110
+ disabled: disabled,
111
+ onValueChange: onValueChange,
112
+ activeTrackColor: activeTrackColor,
113
+ inactiveTrackColor: inactiveTrackColor,
114
+ activeThumbColor: activeThumbColor,
115
+ inactiveThumbColor: inactiveThumbColor
116
+ }));
117
+ }
118
+ const SwitchRow = withTheme(Row);
119
+ export { SwitchRow };
109
120
  export default withTheme(Switch);
@@ -1,7 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
4
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
5
1
  import * as React from "react";
6
2
  import { View, Animated, TextInput as NativeTextInput, StyleSheet, Text, I18nManager } from "react-native";
7
3
  import { withTheme } from "../theming";
@@ -13,7 +9,7 @@ const ICON_SIZE = 24;
13
9
  class TextField extends React.Component {
14
10
  constructor() {
15
11
  super(...arguments);
16
- _defineProperty(this, "state", {
12
+ this.state = {
17
13
  nativeProps: {},
18
14
  labeled: new Animated.Value(this.props.value || this.props.error ? 0 : 1),
19
15
  focused: false,
@@ -22,47 +18,46 @@ class TextField extends React.Component {
22
18
  measured: false,
23
19
  width: 0
24
20
  }
25
- });
26
- _defineProperty(this, "_timer", setTimeout(() => {}, 0));
27
- _defineProperty(this, "_showPlaceholder", () => {
21
+ };
22
+ this._timer = setTimeout(() => {}, 0);
23
+ this._showPlaceholder = () => {
28
24
  clearTimeout(this._timer);
29
-
30
25
  // Set the placeholder in a delay to offset the label animation
31
26
  // If we show it immediately, they'll overlap and look ugly
32
27
  this._timer = setTimeout(() => this.setState({
33
28
  placeholder: this.props.placeholder
34
29
  }), 50);
35
- });
36
- _defineProperty(this, "_hidePlaceholder", () => this.setState({
30
+ };
31
+ this._hidePlaceholder = () => this.setState({
37
32
  placeholder: ""
38
- }));
39
- _defineProperty(this, "_restoreLabel", () => Animated.timing(this.state.labeled, {
33
+ });
34
+ this._restoreLabel = () => Animated.timing(this.state.labeled, {
40
35
  toValue: 1,
41
36
  duration: FOCUS_ANIMATION_DURATION,
42
37
  useNativeDriver: true
43
- }).start());
44
- _defineProperty(this, "_minmizeLabel", () => Animated.timing(this.state.labeled, {
38
+ }).start();
39
+ this._minmizeLabel = () => Animated.timing(this.state.labeled, {
45
40
  toValue: 0,
46
41
  duration: BLUR_ANIMATION_DURATION,
47
42
  useNativeDriver: true
48
- }).start());
49
- _defineProperty(this, "_handleFocus", () => {
43
+ }).start();
44
+ this._handleFocus = () => {
50
45
  if (this.props.disabled) {
51
46
  return;
52
47
  }
53
48
  this.setState({
54
49
  focused: true
55
50
  });
56
- });
57
- _defineProperty(this, "_handleBlur", () => {
51
+ };
52
+ this._handleBlur = () => {
58
53
  if (this.props.disabled) {
59
54
  return;
60
55
  }
61
56
  this.setState({
62
57
  focused: false
63
58
  });
64
- });
65
- _defineProperty(this, "_handleChangeText", value => {
59
+ };
60
+ this._handleChangeText = value => {
66
61
  if (this.props.disabled) {
67
62
  return;
68
63
  }
@@ -77,8 +72,8 @@ class TextField extends React.Component {
77
72
  });
78
73
  this.props.onChangeText && this.props.onChangeText(value.nativeEvent.text);
79
74
  }
80
- });
81
- _defineProperty(this, "_root", undefined);
75
+ };
76
+ this._root = undefined;
82
77
  }
83
78
  static getDerivedStateFromProps(nextProps, prevState) {
84
79
  return {
@@ -165,7 +160,9 @@ class TextField extends React.Component {
165
160
  roundness,
166
161
  disabledOpacity
167
162
  },
168
- render = props => /*#__PURE__*/React.createElement(NativeTextInput, props),
163
+ render = props => /*#__PURE__*/React.createElement(NativeTextInput, {
164
+ ...props
165
+ }),
169
166
  ...rest
170
167
  } = this.props;
171
168
  const MINIMIZED_LABEL_Y_OFFSET = -(typography.caption.lineHeight + 4);
@@ -305,9 +302,10 @@ class TextField extends React.Component {
305
302
  } = StyleSheet.flatten(style || {});
306
303
  return /*#__PURE__*/React.createElement(View, {
307
304
  style: [styles.container, styleProp]
308
- }, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon, _extends({}, leftIconProps, {
305
+ }, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon, {
306
+ ...leftIconProps,
309
307
  style: leftIconStyle
310
- })) : null, /*#__PURE__*/React.createElement(View, {
308
+ }) : null, /*#__PURE__*/React.createElement(View, {
311
309
  style: applyStyles([containerStyle], {
312
310
  height: style === null || style === void 0 ? void 0 : style.height,
313
311
  backgroundColor: bgColor,
@@ -375,9 +373,10 @@ class TextField extends React.Component {
375
373
  style: {
376
374
  justifyContent: type === "solid" ? "center" : undefined
377
375
  }
378
- }, /*#__PURE__*/React.createElement(Icon, _extends({}, leftIconProps, {
376
+ }, /*#__PURE__*/React.createElement(Icon, {
377
+ ...leftIconProps,
379
378
  style: leftIconStyle
380
- }))) : null, render({
379
+ })) : null, render({
381
380
  ref: c => {
382
381
  this._root = c;
383
382
  },
@@ -414,6 +413,57 @@ class TextField extends React.Component {
414
413
  }
415
414
  }
416
415
  export default withTheme(TextField);
416
+ const styles = StyleSheet.create({
417
+ container: {
418
+ alignSelf: "stretch"
419
+ },
420
+ placeholder: {
421
+ position: "absolute",
422
+ left: 0
423
+ },
424
+ underline: {
425
+ position: "absolute",
426
+ left: 0,
427
+ right: 0,
428
+ bottom: 0,
429
+ height: 2
430
+ },
431
+ input: {
432
+ flexGrow: 1,
433
+ justifyContent: "center",
434
+ textAlignVertical: "center",
435
+ margin: 0,
436
+ textAlign: I18nManager.isRTL ? "right" : "left"
437
+ }
438
+ });ionColor: activeColor,
439
+ multiline,
440
+ numberOfLines,
441
+ onFocus: this._handleFocus,
442
+ onBlur: this._handleBlur,
443
+ underlineColorAndroid: "transparent",
444
+ style: inputStyles,
445
+ ...rest,
446
+ ...this.state.nativeProps,
447
+ value: this.state.value
448
+ })), rightIconName ? /*#__PURE__*/React.createElement(Icon, {
449
+ name: rightIconName,
450
+ size: ICON_SIZE,
451
+ color: colors.light,
452
+ style: {
453
+ position: "absolute",
454
+ right: 16,
455
+ marginTop: type === "solid" ? MINIMIZED_LABEL_FONT_SIZE + 4 : 16
456
+ }
457
+ }) : null, assistiveText ? /*#__PURE__*/React.createElement(Text, {
458
+ style: [{
459
+ color: error ? colors.error : colors.light,
460
+ marginTop: 8,
461
+ marginLeft: assistiveTextLeftMargin
462
+ }]
463
+ }, assistiveText) : null);
464
+ }
465
+ }
466
+ export default withTheme(TextField);
417
467
  const styles = StyleSheet.create({
418
468
  container: {
419
469
  alignSelf: "stretch"
@@ -6,19 +6,24 @@ export default function Touchable(_ref) {
6
6
  children,
7
7
  disabled,
8
8
  onPress,
9
+ activeOpacity,
10
+ disabledOpacity,
11
+ delayLongPress,
12
+ hitSlop,
9
13
  style,
10
14
  ...props
11
15
  } = _ref;
12
16
  return /*#__PURE__*/React.createElement(Pressable, _extends({
13
- onPress: onPress,
14
17
  disabled: disabled,
15
- hitSlop: 8,
18
+ onPress: onPress,
19
+ delayLongPress: delayLongPress ? delayLongPress : 500,
20
+ hitSlop: hitSlop ? hitSlop : 8,
16
21
  style: _ref2 => {
17
22
  let {
18
23
  pressed
19
24
  } = _ref2;
20
25
  return [{
21
- opacity: pressed || disabled ? 0.75 : 1
26
+ opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1
22
27
  }, style];
23
28
  }
24
29
  }, props), children);
@@ -1,8 +1,7 @@
1
1
  import { Platform } from "react-native";
2
-
3
2
  // @ts-ignore
4
3
  const expo = global.__expo;
5
- const DEFAULT_STATUSBAR_HEIGHT_EXPO = expo !== null && expo !== void 0 && expo.Constants ? expo.Constants.statusBarHeight : 0;
4
+ const DEFAULT_STATUSBAR_HEIGHT_EXPO = (expo === null || expo === void 0 ? void 0 : expo.Constants) ? expo.Constants.statusBarHeight : 0;
6
5
  export const APPROX_STATUSBAR_HEIGHT = Platform.select({
7
6
  android: DEFAULT_STATUSBAR_HEIGHT_EXPO,
8
7
  ios: Platform.Version < 11 ? DEFAULT_STATUSBAR_HEIGHT_EXPO : 0
@@ -26,6 +26,7 @@ export { default as Switch, SwitchRow } from "./components/Switch";
26
26
  export { default as TextField } from "./components/TextField";
27
27
  export { default as ToggleButton } from "./components/ToggleButton";
28
28
  export { default as Touchable } from "./components/Touchable";
29
+ export { default as Pressable } from "./components/Pressable";
29
30
  export { AccordionGroup, AccordionItem } from "./components/Accordion";
30
31
  export { ActionSheet, ActionSheetItem, ActionSheetCancel } from "./components/ActionSheet";
31
32
  export { Swiper, SwiperItem } from "./components/Swiper";
@@ -1,7 +1,8 @@
1
- import { COMPONENT_TYPES, createIconProp, createTextProp, createDisabledProp, createLoadingProp, createActionProp, Triggers, StylesPanelSections } from "@draftbit/types";
2
- const SEED_DATA_TRIGGERS = [Triggers.OnPress];
1
+ import { COMPONENT_TYPES, createIconProp, createTextProp, createDisabledProp, createLoadingProp, createActionProp, Triggers, StylesPanelSections, createStaticNumberProp } from "@draftbit/types";
2
+ const SEED_DATA_TRIGGERS = [Triggers.OnPress, Triggers.OnLongPress];
3
3
  const SEED_DATA_PROPS = {
4
4
  onPress: createActionProp(),
5
+ onLongPress: createActionProp(),
5
6
  icon: createIconProp({
6
7
  defaultValue: null,
7
8
  required: false
@@ -12,12 +13,37 @@ const SEED_DATA_PROPS = {
12
13
  defaultValue: "Get Started"
13
14
  }),
14
15
  disabled: createDisabledProp(),
15
- loading: createLoadingProp()
16
- };
17
- const LAYOUT = {
18
- backgroundColor: "transparent",
19
- borderRadius: 8,
20
- fontFamily: "system-700"
16
+ loading: createLoadingProp(),
17
+ activeOpacity: createStaticNumberProp({
18
+ label: "Active Opacity",
19
+ description: "Opacity of the button when active.",
20
+ defaultValue: 0.8,
21
+ min: 0,
22
+ max: 1,
23
+ step: 0.01,
24
+ precision: 2,
25
+ required: false
26
+ }),
27
+ disabledOpacity: createStaticNumberProp({
28
+ label: "Disabled Opacity",
29
+ description: "Opacity of the button when disabled.",
30
+ defaultValue: 0.8,
31
+ min: 0,
32
+ max: 1,
33
+ step: 0.01,
34
+ precision: 2,
35
+ required: false
36
+ }),
37
+ delayLongPress: createStaticNumberProp({
38
+ label: "Delay Long Press",
39
+ description: "Duration (in milliseconds) from onPressIn before onLongPress is called.",
40
+ required: false
41
+ }),
42
+ hitSlop: createStaticNumberProp({
43
+ label: "Hit Slop",
44
+ description: "Sets additional distance outside of element in which a press can be detected",
45
+ required: false
46
+ })
21
47
  };
22
48
  export const SEED_DATA = [{
23
49
  name: "Button Outline",
@@ -25,7 +51,8 @@ export const SEED_DATA = [{
25
51
  category: COMPONENT_TYPES.deprecated,
26
52
  stylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.Background, StylesPanelSections.Borders, StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position, StylesPanelSections.Effects],
27
53
  layout: {
28
- ...LAYOUT,
54
+ borderRadius: 8,
55
+ fontFamily: "system-700",
29
56
  backgroundColor: "transparent",
30
57
  borderWidth: 1,
31
58
  textAlign: "center"
@@ -38,7 +65,8 @@ export const SEED_DATA = [{
38
65
  category: COMPONENT_TYPES.deprecated,
39
66
  stylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.Background, StylesPanelSections.Borders, StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position, StylesPanelSections.Effects],
40
67
  layout: {
41
- ...LAYOUT,
68
+ borderRadius: 8,
69
+ fontFamily: "system-700",
42
70
  backgroundColor: "primary",
43
71
  textAlign: "center"
44
72
  },
@@ -50,7 +78,8 @@ export const SEED_DATA = [{
50
78
  category: COMPONENT_TYPES.button,
51
79
  stylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.Background, StylesPanelSections.Borders, StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position, StylesPanelSections.Effects],
52
80
  layout: {
53
- ...LAYOUT,
81
+ borderRadius: 8,
82
+ fontFamily: "system-700",
54
83
  backgroundColor: "primary",
55
84
  textAlign: "center"
56
85
  },
@@ -8,7 +8,6 @@ export const SEED_DATA = [{
8
8
  preview_image_url: "{CLOUDINARY_URL}/Field_SearchBar_Full.png",
9
9
  supports_list_render: false,
10
10
  triggers: [Triggers.OnChange],
11
- // TODO Triggers.OnSubmit for multiple triggers
12
11
  props: {
13
12
  icon: {
14
13
  group: GROUPS.basic,
@@ -46,4 +45,8 @@ export const SEED_DATA = [{
46
45
  }
47
46
  },
48
47
  layout: {}
48
+ }];alue: "searchBarValue"
49
+ }
50
+ },
51
+ layout: {}
49
52
  }];
@@ -1,5 +1,40 @@
1
- import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS } from "@draftbit/types";
2
- export const SEED_DATA = {
1
+ import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS, Triggers, createActionProp, createStaticNumberProp } from "@draftbit/types";
2
+ export const SEED_DATA = [{
3
+ name: "Masonry List",
4
+ tag: "MasonryFlashList",
5
+ description: "Masonry Flashlist by Shopify",
6
+ packageName: "@shopify/flash-list",
7
+ category: COMPONENT_TYPES.data,
8
+ stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
9
+ layout: {
10
+ flex: 1
11
+ },
12
+ triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
13
+ props: {
14
+ onRefresh: createActionProp(),
15
+ onEndReached: createActionProp(),
16
+ numColumns: createNumColumnsType({
17
+ editable: true
18
+ }),
19
+ estimatedItemSize: createNumberProp({
20
+ group: GROUPS.basic,
21
+ label: "Est. Item Size",
22
+ description: "Approximate size of the items before rendering.",
23
+ defaultValue: 50,
24
+ step: 1,
25
+ precision: 0
26
+ }),
27
+ optimizeItemArrangement: createStaticBoolProp({
28
+ label: "Optimize Item Arrangement",
29
+ description: "If enabled, MasonryFlashList will try to reduce difference in column height by modifying item order. If true, specifying overrideItemLayout is required. Default value is false."
30
+ }),
31
+ onEndReachedThreshold: createStaticNumberProp({
32
+ label: "End Reached Threshold",
33
+ description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
34
+ defaultValue: 0.5
35
+ })
36
+ }
37
+ }, {
3
38
  name: "FlashList",
4
39
  tag: "FlashList",
5
40
  description: "Flashlist by Shopify",
@@ -9,7 +44,10 @@ export const SEED_DATA = {
9
44
  layout: {
10
45
  flex: 1
11
46
  },
47
+ triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
12
48
  props: {
49
+ onRefresh: createActionProp(),
50
+ onEndReached: createActionProp(),
13
51
  estimatedItemSize: createNumberProp({
14
52
  group: GROUPS.basic,
15
53
  label: "Est. Item Size",
@@ -28,6 +66,11 @@ export const SEED_DATA = {
28
66
  }),
29
67
  numColumns: createNumColumnsType({
30
68
  editable: true
69
+ }),
70
+ onEndReachedThreshold: createStaticNumberProp({
71
+ label: "End Reached Threshold",
72
+ description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
73
+ defaultValue: 0.5
31
74
  })
32
75
  }
33
- };
76
+ }];