@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
@@ -10,10 +10,6 @@ var _theming = require("../theming");
10
10
  var _utilities = require("../utilities");
11
11
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
12
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
- 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); }
14
- 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; }
15
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
16
- 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); }
17
13
  const AnimatedText = _reactNative.Animated.createAnimatedComponent(_reactNative.Text);
18
14
  const FOCUS_ANIMATION_DURATION = 150;
19
15
  const BLUR_ANIMATION_DURATION = 180;
@@ -21,7 +17,7 @@ const ICON_SIZE = 24;
21
17
  class TextField extends React.Component {
22
18
  constructor() {
23
19
  super(...arguments);
24
- _defineProperty(this, "state", {
20
+ this.state = {
25
21
  nativeProps: {},
26
22
  labeled: new _reactNative.Animated.Value(this.props.value || this.props.error ? 0 : 1),
27
23
  focused: false,
@@ -30,47 +26,46 @@ class TextField extends React.Component {
30
26
  measured: false,
31
27
  width: 0
32
28
  }
33
- });
34
- _defineProperty(this, "_timer", setTimeout(() => {}, 0));
35
- _defineProperty(this, "_showPlaceholder", () => {
29
+ };
30
+ this._timer = setTimeout(() => {}, 0);
31
+ this._showPlaceholder = () => {
36
32
  clearTimeout(this._timer);
37
-
38
33
  // Set the placeholder in a delay to offset the label animation
39
34
  // If we show it immediately, they'll overlap and look ugly
40
35
  this._timer = setTimeout(() => this.setState({
41
36
  placeholder: this.props.placeholder
42
37
  }), 50);
43
- });
44
- _defineProperty(this, "_hidePlaceholder", () => this.setState({
38
+ };
39
+ this._hidePlaceholder = () => this.setState({
45
40
  placeholder: ""
46
- }));
47
- _defineProperty(this, "_restoreLabel", () => _reactNative.Animated.timing(this.state.labeled, {
41
+ });
42
+ this._restoreLabel = () => _reactNative.Animated.timing(this.state.labeled, {
48
43
  toValue: 1,
49
44
  duration: FOCUS_ANIMATION_DURATION,
50
45
  useNativeDriver: true
51
- }).start());
52
- _defineProperty(this, "_minmizeLabel", () => _reactNative.Animated.timing(this.state.labeled, {
46
+ }).start();
47
+ this._minmizeLabel = () => _reactNative.Animated.timing(this.state.labeled, {
53
48
  toValue: 0,
54
49
  duration: BLUR_ANIMATION_DURATION,
55
50
  useNativeDriver: true
56
- }).start());
57
- _defineProperty(this, "_handleFocus", () => {
51
+ }).start();
52
+ this._handleFocus = () => {
58
53
  if (this.props.disabled) {
59
54
  return;
60
55
  }
61
56
  this.setState({
62
57
  focused: true
63
58
  });
64
- });
65
- _defineProperty(this, "_handleBlur", () => {
59
+ };
60
+ this._handleBlur = () => {
66
61
  if (this.props.disabled) {
67
62
  return;
68
63
  }
69
64
  this.setState({
70
65
  focused: false
71
66
  });
72
- });
73
- _defineProperty(this, "_handleChangeText", value => {
67
+ };
68
+ this._handleChangeText = value => {
74
69
  if (this.props.disabled) {
75
70
  return;
76
71
  }
@@ -85,8 +80,8 @@ class TextField extends React.Component {
85
80
  });
86
81
  this.props.onChangeText && this.props.onChangeText(value.nativeEvent.text);
87
82
  }
88
- });
89
- _defineProperty(this, "_root", undefined);
83
+ };
84
+ this._root = undefined;
90
85
  }
91
86
  static getDerivedStateFromProps(nextProps, prevState) {
92
87
  return {
@@ -173,7 +168,9 @@ class TextField extends React.Component {
173
168
  roundness,
174
169
  disabledOpacity
175
170
  },
176
- render = props => /*#__PURE__*/React.createElement(_reactNative.TextInput, props),
171
+ render = props => /*#__PURE__*/React.createElement(_reactNative.TextInput, {
172
+ ...props
173
+ }),
177
174
  ...rest
178
175
  } = this.props;
179
176
  const MINIMIZED_LABEL_Y_OFFSET = -(typography.caption.lineHeight + 4);
@@ -313,9 +310,10 @@ class TextField extends React.Component {
313
310
  } = _reactNative.StyleSheet.flatten(style || {});
314
311
  return /*#__PURE__*/React.createElement(_reactNative.View, {
315
312
  style: [styles.container, styleProp]
316
- }, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon, _extends({}, leftIconProps, {
313
+ }, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon, {
314
+ ...leftIconProps,
317
315
  style: leftIconStyle
318
- })) : null, /*#__PURE__*/React.createElement(_reactNative.View, {
316
+ }) : null, /*#__PURE__*/React.createElement(_reactNative.View, {
319
317
  style: (0, _utilities.applyStyles)([containerStyle], {
320
318
  height: style === null || style === void 0 ? void 0 : style.height,
321
319
  backgroundColor: bgColor,
@@ -383,9 +381,10 @@ class TextField extends React.Component {
383
381
  style: {
384
382
  justifyContent: type === "solid" ? "center" : undefined
385
383
  }
386
- }, /*#__PURE__*/React.createElement(Icon, _extends({}, leftIconProps, {
384
+ }, /*#__PURE__*/React.createElement(Icon, {
385
+ ...leftIconProps,
387
386
  style: leftIconStyle
388
- }))) : null, render({
387
+ })) : null, render({
389
388
  ref: c => {
390
389
  this._root = c;
391
390
  },
@@ -423,6 +422,55 @@ class TextField extends React.Component {
423
422
  }
424
423
  var _default = (0, _theming.withTheme)(TextField);
425
424
  exports.default = _default;
425
+ const styles = _reactNative.StyleSheet.create({
426
+ container: {
427
+ alignSelf: "stretch"
428
+ },
429
+ placeholder: {
430
+ position: "absolute",
431
+ left: 0
432
+ },
433
+ underline: {
434
+ position: "absolute",
435
+ left: 0,
436
+ right: 0,
437
+ bottom: 0,
438
+ height: 2
439
+ },
440
+ input: {
441
+ flexGrow: 1,
442
+ justifyContent: "center",
443
+ textAlignVertical: "center",
444
+ margin: 0,
445
+ textAlign: _reactNative.I18nManager.isRTL ? "right" : "left"
446
+ }
447
+ });_handleFocus,
448
+ onBlur: this._handleBlur,
449
+ underlineColorAndroid: "transparent",
450
+ style: inputStyles,
451
+ ...rest,
452
+ ...this.state.nativeProps,
453
+ value: this.state.value
454
+ })), rightIconName ? /*#__PURE__*/React.createElement(Icon, {
455
+ name: rightIconName,
456
+ size: ICON_SIZE,
457
+ color: colors.light,
458
+ style: {
459
+ position: "absolute",
460
+ right: 16,
461
+ marginTop: type === "solid" ? MINIMIZED_LABEL_FONT_SIZE + 4 : 16
462
+ }
463
+ }) : null, assistiveText ? /*#__PURE__*/React.createElement(_reactNative.Text, {
464
+ style: [{
465
+ color: error ? colors.error : colors.light,
466
+ marginTop: 8,
467
+ marginLeft: assistiveTextLeftMargin
468
+ }]
469
+ }, assistiveText) : null);
470
+ }
471
+ }
472
+ var _default = (0, _theming.withTheme)(TextField);
473
+ exports.default = _default;
426
474
  const styles = _reactNative.StyleSheet.create({
427
475
  container: {
428
476
  alignSelf: "stretch"
@@ -11,7 +11,6 @@ var _IconButton = _interopRequireDefault(require("./IconButton"));
11
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
12
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
13
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
- 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); }
15
14
  const ToggleButton = _ref => {
16
15
  let {
17
16
  Icon,
@@ -47,7 +46,7 @@ const ToggleButton = _ref => {
47
46
  setInternalValue(!internalValue);
48
47
  onPress(!internalValue);
49
48
  };
50
- return /*#__PURE__*/React.createElement(_IconButton.default, _extends({
49
+ return /*#__PURE__*/React.createElement(_IconButton.default, {
51
50
  Icon: Icon,
52
51
  icon: icon,
53
52
  size: iconSize,
@@ -59,6 +58,20 @@ const ToggleButton = _ref => {
59
58
  height,
60
59
  backgroundColor: internalValue ? colors[colorSecondary] : colors[color],
61
60
  borderColor: colors[borderColor]
61
+ }, style],
62
+ ...rest
63
+ });
64
+ };
65
+ const styles = _reactNative.StyleSheet.create({
66
+ mainContainer: {
67
+ borderWidth: 1
68
+ }
69
+ });
70
+ var _default = (0, _theming.withTheme)(ToggleButton);
71
+ exports.default = _default;idth,
72
+ height,
73
+ backgroundColor: internalValue ? colors[colorSecondary] : colors[color],
74
+ borderColor: colors[borderColor]
62
75
  }, style]
63
76
  }, rest));
64
77
  };
@@ -13,19 +13,24 @@ function Touchable(_ref) {
13
13
  children,
14
14
  disabled,
15
15
  onPress,
16
+ activeOpacity,
17
+ disabledOpacity,
18
+ delayLongPress,
19
+ hitSlop,
16
20
  style,
17
21
  ...props
18
22
  } = _ref;
19
23
  return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, _extends({
20
- onPress: onPress,
21
24
  disabled: disabled,
22
- hitSlop: 8,
25
+ onPress: onPress,
26
+ delayLongPress: delayLongPress ? delayLongPress : 500,
27
+ hitSlop: hitSlop ? hitSlop : 8,
23
28
  style: _ref2 => {
24
29
  let {
25
30
  pressed
26
31
  } = _ref2;
27
32
  return [{
28
- opacity: pressed || disabled ? 0.75 : 1
33
+ opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1
29
34
  }, style];
30
35
  }
31
36
  }, props), children);
@@ -12,4 +12,4 @@ const APPROX_STATUSBAR_HEIGHT = _reactNative.Platform.select({
12
12
  android: DEFAULT_STATUSBAR_HEIGHT_EXPO,
13
13
  ios: _reactNative.Platform.Version < 11 ? DEFAULT_STATUSBAR_HEIGHT_EXPO : 0
14
14
  });
15
- exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;
15
+ exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;AR_HEIGHT;
@@ -10,12 +10,11 @@ function usePrevious(value) {
10
10
  // The ref object is a generic container whose current property is mutable
11
11
  // and can hold any value, similar to an instance property on a class
12
12
  const ref = _react.default.useRef();
13
-
14
13
  // Store current value in ref
15
14
  _react.default.useEffect(() => {
16
15
  ref.current = value;
17
16
  }, [value]);
18
-
19
17
  // Return previous value (happens before update in useEffect above)
20
18
  return ref.current;
19
+ }
21
20
  }
@@ -225,6 +225,12 @@ Object.defineProperty(exports, "Picker", {
225
225
  return _Picker.default;
226
226
  }
227
227
  });
228
+ Object.defineProperty(exports, "Pressable", {
229
+ enumerable: true,
230
+ get: function () {
231
+ return _Pressable.default;
232
+ }
233
+ });
228
234
  Object.defineProperty(exports, "ProgressBar", {
229
235
  enumerable: true,
230
236
  get: function () {
@@ -438,6 +444,7 @@ var _Switch = _interopRequireWildcard(require("./components/Switch"));
438
444
  var _TextField = _interopRequireDefault(require("./components/TextField"));
439
445
  var _ToggleButton = _interopRequireDefault(require("./components/ToggleButton"));
440
446
  var _Touchable = _interopRequireDefault(require("./components/Touchable"));
447
+ var _Pressable = _interopRequireDefault(require("./components/Pressable"));
441
448
  var _Accordion = require("./components/Accordion");
442
449
  var _ActionSheet = require("./components/ActionSheet");
443
450
  var _Swiper = require("./components/Swiper");
@@ -5,9 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.SEED_DATA = void 0;
7
7
  var _types = require("@draftbit/types");
8
- const SEED_DATA_TRIGGERS = [_types.Triggers.OnPress];
8
+ const SEED_DATA_TRIGGERS = [_types.Triggers.OnPress, _types.Triggers.OnLongPress];
9
9
  const SEED_DATA_PROPS = {
10
10
  onPress: (0, _types.createActionProp)(),
11
+ onLongPress: (0, _types.createActionProp)(),
11
12
  icon: (0, _types.createIconProp)({
12
13
  defaultValue: null,
13
14
  required: false
@@ -18,12 +19,37 @@ const SEED_DATA_PROPS = {
18
19
  defaultValue: "Get Started"
19
20
  }),
20
21
  disabled: (0, _types.createDisabledProp)(),
21
- loading: (0, _types.createLoadingProp)()
22
- };
23
- const LAYOUT = {
24
- backgroundColor: "transparent",
25
- borderRadius: 8,
26
- fontFamily: "system-700"
22
+ loading: (0, _types.createLoadingProp)(),
23
+ activeOpacity: (0, _types.createStaticNumberProp)({
24
+ label: "Active Opacity",
25
+ description: "Opacity of the button when active.",
26
+ defaultValue: 0.8,
27
+ min: 0,
28
+ max: 1,
29
+ step: 0.01,
30
+ precision: 2,
31
+ required: false
32
+ }),
33
+ disabledOpacity: (0, _types.createStaticNumberProp)({
34
+ label: "Disabled Opacity",
35
+ description: "Opacity of the button when disabled.",
36
+ defaultValue: 0.8,
37
+ min: 0,
38
+ max: 1,
39
+ step: 0.01,
40
+ precision: 2,
41
+ required: false
42
+ }),
43
+ delayLongPress: (0, _types.createStaticNumberProp)({
44
+ label: "Delay Long Press",
45
+ description: "Duration (in milliseconds) from onPressIn before onLongPress is called.",
46
+ required: false
47
+ }),
48
+ hitSlop: (0, _types.createStaticNumberProp)({
49
+ label: "Hit Slop",
50
+ description: "Sets additional distance outside of element in which a press can be detected",
51
+ required: false
52
+ })
27
53
  };
28
54
  const SEED_DATA = [{
29
55
  name: "Button Outline",
@@ -31,7 +57,8 @@ const SEED_DATA = [{
31
57
  category: _types.COMPONENT_TYPES.deprecated,
32
58
  stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.Background, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
33
59
  layout: {
34
- ...LAYOUT,
60
+ borderRadius: 8,
61
+ fontFamily: "system-700",
35
62
  backgroundColor: "transparent",
36
63
  borderWidth: 1,
37
64
  textAlign: "center"
@@ -44,7 +71,8 @@ const SEED_DATA = [{
44
71
  category: _types.COMPONENT_TYPES.deprecated,
45
72
  stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.Background, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
46
73
  layout: {
47
- ...LAYOUT,
74
+ borderRadius: 8,
75
+ fontFamily: "system-700",
48
76
  backgroundColor: "primary",
49
77
  textAlign: "center"
50
78
  },
@@ -56,7 +84,8 @@ const SEED_DATA = [{
56
84
  category: _types.COMPONENT_TYPES.button,
57
85
  stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.Background, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
58
86
  layout: {
59
- ...LAYOUT,
87
+ borderRadius: 8,
88
+ fontFamily: "system-700",
60
89
  backgroundColor: "primary",
61
90
  textAlign: "center"
62
91
  },
@@ -5,7 +5,42 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.SEED_DATA = void 0;
7
7
  var _types = require("@draftbit/types");
8
- const SEED_DATA = {
8
+ const SEED_DATA = [{
9
+ name: "Masonry List",
10
+ tag: "MasonryFlashList",
11
+ description: "Masonry Flashlist by Shopify",
12
+ packageName: "@shopify/flash-list",
13
+ category: _types.COMPONENT_TYPES.data,
14
+ stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS,
15
+ layout: {
16
+ flex: 1
17
+ },
18
+ triggers: [_types.Triggers.OnRefresh, _types.Triggers.OnEndReached],
19
+ props: {
20
+ onRefresh: (0, _types.createActionProp)(),
21
+ onEndReached: (0, _types.createActionProp)(),
22
+ numColumns: (0, _types.createNumColumnsType)({
23
+ editable: true
24
+ }),
25
+ estimatedItemSize: (0, _types.createNumberProp)({
26
+ group: _types.GROUPS.basic,
27
+ label: "Est. Item Size",
28
+ description: "Approximate size of the items before rendering.",
29
+ defaultValue: 50,
30
+ step: 1,
31
+ precision: 0
32
+ }),
33
+ optimizeItemArrangement: (0, _types.createStaticBoolProp)({
34
+ label: "Optimize Item Arrangement",
35
+ 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."
36
+ }),
37
+ onEndReachedThreshold: (0, _types.createStaticNumberProp)({
38
+ label: "End Reached Threshold",
39
+ 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.",
40
+ defaultValue: 0.5
41
+ })
42
+ }
43
+ }, {
9
44
  name: "FlashList",
10
45
  tag: "FlashList",
11
46
  description: "Flashlist by Shopify",
@@ -15,7 +50,10 @@ const SEED_DATA = {
15
50
  layout: {
16
51
  flex: 1
17
52
  },
53
+ triggers: [_types.Triggers.OnRefresh, _types.Triggers.OnEndReached],
18
54
  props: {
55
+ onRefresh: (0, _types.createActionProp)(),
56
+ onEndReached: (0, _types.createActionProp)(),
19
57
  estimatedItemSize: (0, _types.createNumberProp)({
20
58
  group: _types.GROUPS.basic,
21
59
  label: "Est. Item Size",
@@ -34,7 +72,12 @@ const SEED_DATA = {
34
72
  }),
35
73
  numColumns: (0, _types.createNumColumnsType)({
36
74
  editable: true
75
+ }),
76
+ onEndReachedThreshold: (0, _types.createStaticNumberProp)({
77
+ label: "End Reached Threshold",
78
+ 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.",
79
+ defaultValue: 0.5
37
80
  })
38
81
  }
39
- };
82
+ }];
40
83
  exports.SEED_DATA = SEED_DATA;
@@ -14,7 +14,10 @@ const SEED_DATA = {
14
14
  layout: {
15
15
  flex: 1
16
16
  },
17
+ triggers: [_types.Triggers.OnRefresh, _types.Triggers.OnEndReached],
17
18
  props: {
19
+ onRefresh: (0, _types.createActionProp)(),
20
+ onEndReached: (0, _types.createActionProp)(),
18
21
  horizontal: (0, _types.createStaticBoolProp)({
19
22
  label: "Horizontal",
20
23
  description: "Render list horizontally"
@@ -25,6 +28,15 @@ const SEED_DATA = {
25
28
  }),
26
29
  numColumns: (0, _types.createNumColumnsType)({
27
30
  editable: true
31
+ }),
32
+ initialNumToRender: (0, _types.createStaticBoolProp)({
33
+ label: "Initial Num To Render",
34
+ descriprion: "How many items to render in the initial batch"
35
+ }),
36
+ onEndReachedThreshold: (0, _types.createStaticNumberProp)({
37
+ label: "End Reached Threshold",
38
+ 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.",
39
+ defaultValue: 0.5
28
40
  })
29
41
  }
30
42
  };
@@ -23,9 +23,7 @@ const SEED_DATA = {
23
23
  }),
24
24
  fieldName: (0, _types.createFieldNameProp)({
25
25
  defaultValue: "ratingValue",
26
- // this is the name of the variable declared on the screen in Draftbit
27
26
  handlerPropName: "onPress",
28
- // the change handler prop in this component
29
27
  valuePropName: "rating" // the value prop in this component
30
28
  }),
31
29
 
@@ -50,4 +48,10 @@ const SEED_DATA = {
50
48
  })
51
49
  }
52
50
  };
51
+ exports.SEED_DATA = SEED_DATA;pes.createColorProp)({
52
+ label: "Inactive Color",
53
+ defaultValue: "divider"
54
+ })
55
+ }
56
+ };
53
57
  exports.SEED_DATA = SEED_DATA;
@@ -14,7 +14,9 @@ const SEED_DATA = {
14
14
  height: 300,
15
15
  width: "100%"
16
16
  },
17
+ triggers: [_types.Triggers.OnIndexChanged],
17
18
  props: {
19
+ onIndexChanged: (0, _types.createActionProp)(),
18
20
  from: (0, _types.createNumberProp)({
19
21
  group: _types.GROUPS.basic,
20
22
  label: "Initial Slide"
@@ -5,16 +5,56 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.SEED_DATA = void 0;
7
7
  var _types = require("@draftbit/types");
8
- const SEED_DATA = {
9
- name: "Touchable",
10
- tag: "Touchable",
11
- description: "Simple button with no styles",
12
- category: _types.COMPONENT_TYPES.button,
8
+ const SEED_DATA_PROPS = {
13
9
  stylesPanelSections: [_types.StylesPanelSections.Size, _types.StylesPanelSections.Margins, _types.StylesPanelSections.Borders],
14
10
  layout: {},
15
- triggers: [_types.Triggers.OnPress],
11
+ triggers: [_types.Triggers.OnPress, _types.Triggers.OnLongPress],
16
12
  props: {
17
- onPress: (0, _types.createActionProp)()
13
+ onPress: (0, _types.createActionProp)(),
14
+ onLongPress: (0, _types.createActionProp)(),
15
+ activeOpacity: (0, _types.createStaticNumberProp)({
16
+ label: "Active Opacity",
17
+ description: "The opacity when the button is pressed.",
18
+ defaultValue: 0.8,
19
+ min: 0,
20
+ max: 1,
21
+ step: 0.01,
22
+ precision: 2,
23
+ required: false
24
+ }),
25
+ disabledOpacity: (0, _types.createStaticNumberProp)({
26
+ label: "Disabled Opacity",
27
+ description: "The opacity when the button is disabled.",
28
+ defaultValue: 0.8,
29
+ min: 0,
30
+ max: 1,
31
+ step: 0.01,
32
+ precision: 2,
33
+ required: false
34
+ }),
35
+ delayLongPress: (0, _types.createStaticNumberProp)({
36
+ label: "Delay Long Press",
37
+ description: "Duration (in milliseconds) from onPressIn before onLongPress is called.",
38
+ required: false
39
+ }),
40
+ hitSlop: (0, _types.createStaticNumberProp)({
41
+ label: "Hit Slop",
42
+ description: "Sets additional distance outside of element in which a press can be detected.",
43
+ required: false
44
+ })
18
45
  }
19
46
  };
47
+ const SEED_DATA = [{
48
+ name: "Touchable",
49
+ tag: "Touchable",
50
+ description: "An interactive view with no styles",
51
+ category: _types.COMPONENT_TYPES.button,
52
+ ...SEED_DATA_PROPS
53
+ }, {
54
+ name: "Pressable",
55
+ tag: "Pressable",
56
+ description: "An interactive view with no styles",
57
+ category: _types.COMPONENT_TYPES.button,
58
+ ...SEED_DATA_PROPS
59
+ }];
20
60
  exports.SEED_DATA = SEED_DATA;
@@ -15,7 +15,6 @@ function overlay(elevation) {
15
15
  let surfaceColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _DarkTheme.default.colors.surface;
16
16
  if (isAnimatedValue(elevation)) {
17
17
  const inputRange = [0, 1, 2, 3, 8, 24];
18
-
19
18
  // @ts-expect-error: TS doesn't seem to refine the type correctly
20
19
  return elevation.interpolate({
21
20
  inputRange,
@@ -24,7 +23,6 @@ function overlay(elevation) {
24
23
  })
25
24
  });
26
25
  }
27
-
28
26
  // @ts-expect-error: TS doesn't seem to refine the type correctly
29
27
  return calculateColor(surfaceColor, elevation);
30
28
  }
@@ -65,4 +63,4 @@ const elevationOverlayTransparency = {
65
63
  22: 15.72,
66
64
  23: 15.84,
67
65
  24: 16
68
- };
66
+ };};
@@ -57,7 +57,6 @@ function extractBorderAndMarginStyles(style, additionalBorderStyles, additionalM
57
57
  marginStyles
58
58
  };
59
59
  }
60
-
61
60
  /**
62
61
  * Merges a style object on top of another style object. In React Native,
63
62
  * keys with undefined values in a style object will still override styles
@@ -90,4 +89,4 @@ function getValueForRadioButton(value) {
90
89
  } else {
91
90
  throw new Error("Invalid value: ".concat(value));
92
91
  }
93
- }
92
+ }}
@@ -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 { Animated, Easing } from "react-native";
4
3
  import CircularProgress from "./CircularProgress";
@@ -46,6 +45,19 @@ const AnimatedCircularProgress = _ref => {
46
45
  React.useEffect(() => {
47
46
  animate();
48
47
  }, [fill, animate]);
48
+ return /*#__PURE__*/React.createElement(AnimatedProgress, {
49
+ ...other,
50
+ style: other.style,
51
+ childrenContainerStyle: other.childrenContainerStyle,
52
+ fill: fillAnimation,
53
+ tintColor: animateColor()
54
+ });
55
+ };
56
+ export default AnimatedCircularProgress;imation;
57
+ };
58
+ React.useEffect(() => {
59
+ animate();
60
+ }, [fill, animate]);
49
61
  return /*#__PURE__*/React.createElement(AnimatedProgress, _extends({}, other, {
50
62
  style: other.style,
51
63
  childrenContainerStyle: other.childrenContainerStyle,
@@ -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 React from "react";
3
2
  import { View, StyleSheet } from "react-native";
4
3
  const AspectRatio = props => {
@@ -27,6 +26,24 @@ const AspectRatio = props => {
27
26
  });
28
27
  }
29
28
  }
29
+ return /*#__PURE__*/React.createElement(View, {
30
+ ...props,
31
+ style: style,
32
+ onLayout: _ref => {
33
+ let {
34
+ nativeEvent: {
35
+ layout: l
36
+ }
37
+ } = _ref;
38
+ return setLayout(l);
39
+ }
40
+ }, props.children);
41
+ };
42
+ export default AspectRatio;idth,
43
+ height: width * (1 / aspectRatio)
44
+ });
45
+ }
46
+ }
30
47
  return /*#__PURE__*/React.createElement(View, _extends({}, props, {
31
48
  style: style,
32
49
  onLayout: _ref => {