@draftbit/core 46.4.4-808a01.2 → 46.4.4-86483e.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 (313) hide show
  1. package/lib/commonjs/Provider.js +0 -9
  2. package/lib/commonjs/components/Accordion/AccordionGroup.js +0 -14
  3. package/lib/commonjs/components/Accordion/AccordionItem.js +23 -17
  4. package/lib/commonjs/components/Accordion/index.js +0 -3
  5. package/lib/commonjs/components/ActionSheet/ActionSheet.js +0 -9
  6. package/lib/commonjs/components/ActionSheet/ActionSheetCancel.js +0 -5
  7. package/lib/commonjs/components/ActionSheet/ActionSheetItem.js +0 -7
  8. package/lib/commonjs/components/ActionSheet/index.js +0 -4
  9. package/lib/commonjs/components/AnimatedCircularProgress.js +1 -26
  10. package/lib/commonjs/components/AspectRatio.js +1 -28
  11. package/lib/commonjs/components/AvatarEdit.js +4 -28
  12. package/lib/commonjs/components/Banner.js +12 -46
  13. package/lib/commonjs/components/Button.js +12 -50
  14. package/lib/commonjs/components/Card.js +0 -14
  15. package/lib/commonjs/components/CardBlock.js +4 -29
  16. package/lib/commonjs/components/CardContainer.js +4 -32
  17. package/lib/commonjs/components/CardContainerRating.js +6 -34
  18. package/lib/commonjs/components/CardContainerShortImage.js +4 -28
  19. package/lib/commonjs/components/CardInline.js +1 -14
  20. package/lib/commonjs/components/Carousel.js +9 -51
  21. package/lib/commonjs/components/Checkbox/Checkbox.js +3 -18
  22. package/lib/commonjs/components/Checkbox/CheckboxGroup.js +0 -11
  23. package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +0 -20
  24. package/lib/commonjs/components/Checkbox/CheckboxRow.js +8 -47
  25. package/lib/commonjs/components/Checkbox/context.js +1 -6
  26. package/lib/commonjs/components/Checkbox/index.js +0 -4
  27. package/lib/commonjs/components/CircleImage.js +1 -24
  28. package/lib/commonjs/components/CircularProgress.js +8 -26
  29. package/lib/commonjs/components/Config.js +5 -13
  30. package/lib/commonjs/components/Container.js +4 -27
  31. package/lib/commonjs/components/DatePicker/DatePicker.js +16 -48
  32. package/lib/commonjs/components/DatePicker/DatePickerComponent.js +0 -7
  33. package/lib/commonjs/components/DatePicker/DatePickerComponent.web.js +0 -10
  34. package/lib/commonjs/components/DeprecatedButton.js +0 -23
  35. package/lib/commonjs/components/DeprecatedCardWrapper.js +1 -27
  36. package/lib/commonjs/components/DeprecatedFAB.js +3 -47
  37. package/lib/commonjs/components/Divider.js +1 -24
  38. package/lib/commonjs/components/Elevation.js +0 -11
  39. package/lib/commonjs/components/FAB.js +4 -29
  40. package/lib/commonjs/components/FieldSearchBarFull.js +0 -18
  41. package/lib/commonjs/components/FormRow.js +2 -26
  42. package/lib/commonjs/components/Header.js +0 -13
  43. package/lib/commonjs/components/HeaderLarge.js +0 -9
  44. package/lib/commonjs/components/HeaderMedium.js +0 -9
  45. package/lib/commonjs/components/HeaderOverline.js +0 -9
  46. package/lib/commonjs/components/IconButton.js +4 -31
  47. package/lib/commonjs/components/Image.js +0 -17
  48. package/lib/commonjs/components/Layout.js +19 -50
  49. package/lib/commonjs/components/Markdown.js +27 -0
  50. package/lib/commonjs/components/NumberInput.js +9 -33
  51. package/lib/commonjs/components/Picker/Picker.js +6 -39
  52. package/lib/commonjs/components/Picker/PickerComponent.android.js +6 -23
  53. package/lib/commonjs/components/Picker/PickerComponent.ios.js +8 -27
  54. package/lib/commonjs/components/Picker/PickerComponent.web.js +7 -43
  55. package/lib/commonjs/components/Portal/Portal.js +4 -14
  56. package/lib/commonjs/components/Portal/PortalConsumer.js +9 -21
  57. package/lib/commonjs/components/Portal/PortalHost.js +15 -54
  58. package/lib/commonjs/components/Portal/PortalManager.js +14 -34
  59. package/lib/commonjs/components/ProgressBar.js +9 -45
  60. package/lib/commonjs/components/ProgressCircle.js +0 -10
  61. package/lib/commonjs/components/ProgressIndicator.js +0 -9
  62. package/lib/commonjs/components/RadioButton/RadioButton.js +3 -27
  63. package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js +0 -10
  64. package/lib/commonjs/components/RadioButton/RadioButtonGroup.js +0 -14
  65. package/lib/commonjs/components/RadioButton/RadioButtonRow.js +6 -44
  66. package/lib/commonjs/components/RadioButton/context.js +0 -5
  67. package/lib/commonjs/components/RadioButton/index.js +0 -5
  68. package/lib/commonjs/components/Row.js +0 -11
  69. package/lib/commonjs/components/RowBodyIcon.js +0 -10
  70. package/lib/commonjs/components/RowHeadlineImageCaption.js +2 -11
  71. package/lib/commonjs/components/RowHeadlineImageIcon.js +0 -10
  72. package/lib/commonjs/components/SVG.js +0 -9
  73. package/lib/commonjs/components/ScreenContainer.js +4 -36
  74. package/lib/commonjs/components/Slider.js +4 -44
  75. package/lib/commonjs/components/StarRating.js +4 -34
  76. package/lib/commonjs/components/StepIndicator.js +19 -71
  77. package/lib/commonjs/components/Stepper.js +4 -18
  78. package/lib/commonjs/components/Surface.js +2 -27
  79. package/lib/commonjs/components/Swiper/Swiper.js +0 -8
  80. package/lib/commonjs/components/Swiper/SwiperItem.js +0 -6
  81. package/lib/commonjs/components/Swiper/index.js +0 -3
  82. package/lib/commonjs/components/Switch.js +5 -18
  83. package/lib/commonjs/components/Text.js +13 -50
  84. package/lib/commonjs/components/TextField.js +39 -118
  85. package/lib/commonjs/components/ToggleButton.js +2 -31
  86. package/lib/commonjs/components/Touchable.js +1 -20
  87. package/lib/commonjs/components/Touchable.web.js +0 -2
  88. package/lib/commonjs/components/Typography.js +0 -5
  89. package/lib/commonjs/components/useAuthState.js +0 -9
  90. package/lib/commonjs/constants.js +0 -4
  91. package/lib/commonjs/hooks.js +4 -7
  92. package/lib/commonjs/index.js +7 -52
  93. package/lib/commonjs/interfaces/Icon.js +3 -5
  94. package/lib/commonjs/mappings/Accordion.js +0 -2
  95. package/lib/commonjs/mappings/AccordionItem.js +0 -2
  96. package/lib/commonjs/mappings/ActionSheet.js +0 -2
  97. package/lib/commonjs/mappings/ActionSheetCancel.js +0 -2
  98. package/lib/commonjs/mappings/ActionSheetItem.js +0 -2
  99. package/lib/commonjs/mappings/ActivityIndicator.js +0 -2
  100. package/lib/commonjs/mappings/AudioPlayer.js +2 -34
  101. package/lib/commonjs/mappings/AvatarEdit.js +0 -2
  102. package/lib/commonjs/mappings/Banner.js +0 -2
  103. package/lib/commonjs/mappings/BlurView.js +0 -2
  104. package/lib/commonjs/mappings/Button.js +6 -5
  105. package/lib/commonjs/mappings/Card.js +3 -4
  106. package/lib/commonjs/mappings/CardBlock.js +6 -5
  107. package/lib/commonjs/mappings/CardContainer.js +5 -7
  108. package/lib/commonjs/mappings/CardContainerRating.js +4 -4
  109. package/lib/commonjs/mappings/CardContainerShortImage.js +0 -2
  110. package/lib/commonjs/mappings/CardInline.js +0 -2
  111. package/lib/commonjs/mappings/Carousel.js +0 -2
  112. package/lib/commonjs/mappings/Checkbox.js +0 -2
  113. package/lib/commonjs/mappings/CheckboxGroup.js +0 -2
  114. package/lib/commonjs/mappings/CheckboxRow.js +0 -2
  115. package/lib/commonjs/mappings/CircleImage.js +0 -2
  116. package/lib/commonjs/mappings/Container.js +0 -2
  117. package/lib/commonjs/mappings/CustomCode.js +0 -2
  118. package/lib/commonjs/mappings/DatePicker.js +4 -4
  119. package/lib/commonjs/mappings/Divider.js +0 -2
  120. package/lib/commonjs/mappings/FAB.js +0 -2
  121. package/lib/commonjs/mappings/Fetch.js +0 -2
  122. package/lib/commonjs/mappings/FieldSearchBarFull.js +2 -3
  123. package/lib/commonjs/mappings/FlashList.js +0 -2
  124. package/lib/commonjs/mappings/FlatList.js +0 -2
  125. package/lib/commonjs/mappings/HeaderLarge.js +0 -2
  126. package/lib/commonjs/mappings/HeaderMedium.js +0 -2
  127. package/lib/commonjs/mappings/HeaderOverline.js +0 -2
  128. package/lib/commonjs/mappings/Icon.js +2 -3
  129. package/lib/commonjs/mappings/IconButton.js +0 -2
  130. package/lib/commonjs/mappings/Image.js +0 -2
  131. package/lib/commonjs/mappings/ImageBackground.js +0 -2
  132. package/lib/commonjs/mappings/KeyboardAvoidingView.js +0 -2
  133. package/lib/commonjs/mappings/KeyboardAwareScrollView.js +0 -2
  134. package/lib/commonjs/mappings/Layout.js +0 -2
  135. package/lib/commonjs/mappings/LinearGradient.js +0 -2
  136. package/lib/commonjs/mappings/MapCallout.js +0 -2
  137. package/lib/commonjs/mappings/MapMarker.js +0 -2
  138. package/lib/commonjs/mappings/MapView.js +0 -2
  139. package/lib/commonjs/mappings/Markdown.js +21 -0
  140. package/lib/commonjs/mappings/Modal.js +0 -2
  141. package/lib/commonjs/mappings/NumberInput.js +4 -4
  142. package/lib/commonjs/mappings/Picker.js +4 -4
  143. package/lib/commonjs/mappings/ProgressBar.js +0 -2
  144. package/lib/commonjs/mappings/ProgressCircle.js +0 -2
  145. package/lib/commonjs/mappings/ProgressIndicator.js +0 -2
  146. package/lib/commonjs/mappings/RadioButton.js +0 -2
  147. package/lib/commonjs/mappings/RadioButtonGroup.js +0 -2
  148. package/lib/commonjs/mappings/RadioButtonRow.js +0 -2
  149. package/lib/commonjs/mappings/RowBodyIcon.js +0 -2
  150. package/lib/commonjs/mappings/RowHeadlineImageCaption.js +0 -2
  151. package/lib/commonjs/mappings/RowHeadlineImageIcon.js +12 -8
  152. package/lib/commonjs/mappings/SVG.js +0 -2
  153. package/lib/commonjs/mappings/SafeAreaView.js +0 -2
  154. package/lib/commonjs/mappings/ScrollView.js +0 -2
  155. package/lib/commonjs/mappings/Slider.js +0 -2
  156. package/lib/commonjs/mappings/StarRating.js +1 -3
  157. package/lib/commonjs/mappings/Stepper.js +0 -2
  158. package/lib/commonjs/mappings/Surface.js +0 -2
  159. package/lib/commonjs/mappings/Swiper.js +0 -2
  160. package/lib/commonjs/mappings/SwiperItem.js +0 -2
  161. package/lib/commonjs/mappings/Switch.js +0 -2
  162. package/lib/commonjs/mappings/Text.js +5 -5
  163. package/lib/commonjs/mappings/TextArea.js +2 -3
  164. package/lib/commonjs/mappings/TextField.js +8 -9
  165. package/lib/commonjs/mappings/TextInput.js +3 -4
  166. package/lib/commonjs/mappings/ToggleButton.js +0 -2
  167. package/lib/commonjs/mappings/Touchable.js +0 -2
  168. package/lib/commonjs/mappings/Video.js +0 -2
  169. package/lib/commonjs/mappings/View.js +0 -2
  170. package/lib/commonjs/mappings/WebView.js +0 -2
  171. package/lib/commonjs/styles/DarkTheme.js +5 -6
  172. package/lib/commonjs/styles/DefaultTheme.js +26 -17
  173. package/lib/commonjs/styles/fonts.js +3 -5
  174. package/lib/commonjs/styles/overlay.js +5 -14
  175. package/lib/commonjs/styles/shadow.js +0 -9
  176. package/lib/commonjs/theming.js +0 -4
  177. package/lib/commonjs/utilities.js +2 -14
  178. package/lib/module/Provider.js +0 -1
  179. package/lib/module/components/Accordion/AccordionGroup.js +0 -4
  180. package/lib/module/components/Accordion/AccordionItem.js +0 -3
  181. package/lib/module/components/ActionSheet/ActionSheet.js +0 -2
  182. package/lib/module/components/ActionSheet/ActionSheetCancel.js +0 -2
  183. package/lib/module/components/ActionSheet/ActionSheetItem.js +0 -2
  184. package/lib/module/components/AnimatedCircularProgress.js +0 -6
  185. package/lib/module/components/AspectRatio.js +0 -6
  186. package/lib/module/components/AvatarEdit.js +0 -3
  187. package/lib/module/components/Banner.js +9 -10
  188. package/lib/module/components/Button.js +2 -10
  189. package/lib/module/components/Card.js +0 -2
  190. package/lib/module/components/CardBlock.js +0 -6
  191. package/lib/module/components/CardContainer.js +0 -7
  192. package/lib/module/components/CardContainerRating.js +2 -8
  193. package/lib/module/components/CardContainerShortImage.js +0 -3
  194. package/lib/module/components/CardInline.js +0 -2
  195. package/lib/module/components/Carousel.js +3 -9
  196. package/lib/module/components/Checkbox/Checkbox.js +3 -9
  197. package/lib/module/components/Checkbox/CheckboxGroup.js +0 -5
  198. package/lib/module/components/Checkbox/CheckboxGroupRow.js +0 -8
  199. package/lib/module/components/Checkbox/CheckboxRow.js +3 -11
  200. package/lib/module/components/Checkbox/context.js +1 -3
  201. package/lib/module/components/CircleImage.js +0 -3
  202. package/lib/module/components/CircularProgress.js +3 -9
  203. package/lib/module/components/Config.js +5 -11
  204. package/lib/module/components/Container.js +0 -3
  205. package/lib/module/components/DatePicker/DatePicker.js +16 -33
  206. package/lib/module/components/DatePicker/DatePickerComponent.js +0 -2
  207. package/lib/module/components/DatePicker/DatePickerComponent.web.js +0 -2
  208. package/lib/module/components/DeprecatedButton.js +0 -9
  209. package/lib/module/components/DeprecatedCardWrapper.js +0 -6
  210. package/lib/module/components/DeprecatedFAB.js +0 -13
  211. package/lib/module/components/Divider.js +0 -3
  212. package/lib/module/components/Elevation.js +0 -3
  213. package/lib/module/components/FAB.js +0 -3
  214. package/lib/module/components/FieldSearchBarFull.js +0 -9
  215. package/lib/module/components/FormRow.js +0 -1
  216. package/lib/module/components/Header.js +0 -2
  217. package/lib/module/components/HeaderLarge.js +0 -2
  218. package/lib/module/components/HeaderMedium.js +0 -2
  219. package/lib/module/components/HeaderOverline.js +0 -2
  220. package/lib/module/components/IconButton.js +0 -3
  221. package/lib/module/components/Image.js +0 -10
  222. package/lib/module/components/Layout.js +4 -3
  223. package/lib/module/components/Markdown.js +16 -0
  224. package/lib/module/components/NumberInput.js +8 -16
  225. package/lib/module/components/Picker/Picker.js +6 -23
  226. package/lib/module/components/Picker/PickerComponent.android.js +6 -10
  227. package/lib/module/components/Picker/PickerComponent.ios.js +8 -11
  228. package/lib/module/components/Picker/PickerComponent.web.js +6 -10
  229. package/lib/module/components/Portal/Portal.js +4 -6
  230. package/lib/module/components/Portal/PortalConsumer.js +5 -10
  231. package/lib/module/components/Portal/PortalHost.js +4 -22
  232. package/lib/module/components/Portal/PortalManager.js +7 -14
  233. package/lib/module/components/ProgressBar.js +5 -17
  234. package/lib/module/components/ProgressCircle.js +0 -2
  235. package/lib/module/components/ProgressIndicator.js +0 -2
  236. package/lib/module/components/RadioButton/RadioButton.js +12 -7
  237. package/lib/module/components/RadioButton/RadioButtonFieldGroup.js +0 -3
  238. package/lib/module/components/RadioButton/RadioButtonGroup.js +0 -7
  239. package/lib/module/components/RadioButton/RadioButtonRow.js +1 -9
  240. package/lib/module/components/RadioButton/context.js +0 -2
  241. package/lib/module/components/Row.js +0 -2
  242. package/lib/module/components/RowBodyIcon.js +0 -2
  243. package/lib/module/components/RowHeadlineImageCaption.js +2 -3
  244. package/lib/module/components/RowHeadlineImageIcon.js +0 -2
  245. package/lib/module/components/SVG.js +0 -2
  246. package/lib/module/components/ScreenContainer.js +0 -6
  247. package/lib/module/components/Slider.js +0 -10
  248. package/lib/module/components/StarRating.js +0 -3
  249. package/lib/module/components/StepIndicator.js +5 -29
  250. package/lib/module/components/Stepper.js +6 -9
  251. package/lib/module/components/Surface.js +0 -5
  252. package/lib/module/components/Swiper/Swiper.js +0 -4
  253. package/lib/module/components/Swiper/SwiperItem.js +0 -2
  254. package/lib/module/components/Switch.js +5 -7
  255. package/lib/module/components/Text.js +8 -11
  256. package/lib/module/components/TextField.js +16 -50
  257. package/lib/module/components/ToggleButton.js +0 -5
  258. package/lib/module/components/Touchable.js +0 -1
  259. package/lib/module/components/useAuthState.js +0 -4
  260. package/lib/module/constants.js +2 -1
  261. package/lib/module/hooks.js +4 -2
  262. package/lib/module/index.js +5 -2
  263. package/lib/module/interfaces/Icon.js +2 -1
  264. package/lib/module/mappings/AudioPlayer.js +3 -33
  265. package/lib/module/mappings/Button.js +6 -3
  266. package/lib/module/mappings/Card.js +3 -2
  267. package/lib/module/mappings/CardBlock.js +6 -3
  268. package/lib/module/mappings/CardContainer.js +5 -5
  269. package/lib/module/mappings/CardContainerRating.js +4 -2
  270. package/lib/module/mappings/DatePicker.js +4 -2
  271. package/lib/module/mappings/Fetch.js +0 -1
  272. package/lib/module/mappings/FieldSearchBarFull.js +2 -1
  273. package/lib/module/mappings/Icon.js +2 -1
  274. package/lib/module/mappings/Markdown.js +14 -0
  275. package/lib/module/mappings/NumberInput.js +4 -2
  276. package/lib/module/mappings/Picker.js +4 -2
  277. package/lib/module/mappings/RowHeadlineImageIcon.js +12 -6
  278. package/lib/module/mappings/StarRating.js +1 -1
  279. package/lib/module/mappings/Text.js +5 -3
  280. package/lib/module/mappings/TextArea.js +2 -1
  281. package/lib/module/mappings/TextField.js +8 -7
  282. package/lib/module/mappings/TextInput.js +3 -2
  283. package/lib/module/styles/DarkTheme.js +4 -2
  284. package/lib/module/styles/DefaultTheme.js +26 -13
  285. package/lib/module/styles/fonts.js +2 -1
  286. package/lib/module/styles/overlay.js +4 -10
  287. package/lib/module/styles/shadow.js +0 -6
  288. package/lib/module/utilities.js +2 -5
  289. package/lib/typescript/src/components/Markdown.d.ts +6 -0
  290. package/lib/typescript/src/components/Text.d.ts +2 -1
  291. package/lib/typescript/src/components/TextField.d.ts +2 -1
  292. package/lib/typescript/src/index.d.ts +1 -0
  293. package/lib/typescript/src/mappings/AudioPlayer.d.ts +1 -62
  294. package/lib/typescript/src/mappings/Markdown.d.ts +9 -0
  295. package/lib/typescript/src/mappings/TextField.d.ts +2 -2
  296. package/lib/typescript/src/mappings/TextInput.d.ts +1 -1
  297. package/package.json +5 -3
  298. package/src/components/Markdown.js +12 -0
  299. package/src/components/Markdown.tsx +25 -0
  300. package/src/components/Text.js +8 -2
  301. package/src/components/Text.tsx +6 -1
  302. package/src/components/TextField.js +6 -1
  303. package/src/components/TextField.tsx +7 -1
  304. package/src/index.js +1 -0
  305. package/src/index.tsx +1 -0
  306. package/src/mappings/AudioPlayer.js +2 -39
  307. package/src/mappings/AudioPlayer.ts +1 -41
  308. package/src/mappings/Markdown.js +14 -0
  309. package/src/mappings/Markdown.ts +15 -0
  310. package/src/mappings/TextField.js +1 -1
  311. package/src/mappings/TextField.ts +1 -1
  312. package/src/mappings/TextInput.js +1 -1
  313. package/src/mappings/TextInput.ts +1 -1
@@ -4,33 +4,27 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = _interopRequireWildcard(require("react"));
9
-
10
8
  var _reactNative = require("react-native");
11
-
12
9
  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
-
14
10
  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; }
15
-
16
- // @ts-nocheck
11
+ 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; }
12
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
13
+ 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
14
  const STEP_STATUS = {
18
15
  CURRENT: "current",
19
16
  FINISHED: "finished",
20
17
  UNFINISHED: "unfinished"
21
18
  };
22
-
23
19
  class StepIndicator extends _react.Component {
24
20
  constructor(props) {
25
21
  super(props);
26
-
27
- this.renderProgressBarBackground = () => {
22
+ _defineProperty(this, "renderProgressBarBackground", () => {
28
23
  const {
29
24
  stepCount,
30
25
  direction
31
26
  } = this.props;
32
27
  let progressBarBackgroundStyle;
33
-
34
28
  if (direction === "vertical") {
35
29
  progressBarBackgroundStyle = {
36
30
  backgroundColor: this.state.customStyles.separatorUnFinishedColor,
@@ -50,7 +44,6 @@ class StepIndicator extends _react.Component {
50
44
  height: this.state.customStyles.separatorStrokeUnfinishedWidth === 0 ? this.state.customStyles.separatorStrokeWidth : this.state.customStyles.separatorStrokeUnfinishedWidth
51
45
  };
52
46
  }
53
-
54
47
  return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
55
48
  onLayout: event => {
56
49
  if (direction === "vertical") {
@@ -69,15 +62,13 @@ class StepIndicator extends _react.Component {
69
62
  },
70
63
  style: progressBarBackgroundStyle
71
64
  });
72
- };
73
-
74
- this.renderProgressBar = () => {
65
+ });
66
+ _defineProperty(this, "renderProgressBar", () => {
75
67
  const {
76
68
  stepCount,
77
69
  direction
78
70
  } = this.props;
79
71
  let progressBarStyle;
80
-
81
72
  if (direction === "vertical") {
82
73
  progressBarStyle = {
83
74
  backgroundColor: this.state.customStyles.separatorFinishedColor,
@@ -99,19 +90,16 @@ class StepIndicator extends _react.Component {
99
90
  width: this.progressAnim
100
91
  };
101
92
  }
102
-
103
93
  return /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
104
94
  style: progressBarStyle
105
95
  });
106
- };
107
-
108
- this.renderStepIndicator = () => {
96
+ });
97
+ _defineProperty(this, "renderStepIndicator", () => {
109
98
  let steps = [];
110
99
  const {
111
100
  stepCount,
112
101
  direction
113
102
  } = this.props;
114
-
115
103
  for (let position = 0; position < stepCount; position++) {
116
104
  steps.push( /*#__PURE__*/_react.default.createElement(_reactNative.TouchableWithoutFeedback, {
117
105
  key: position,
@@ -124,7 +112,6 @@ class StepIndicator extends _react.Component {
124
112
  }]
125
113
  }, this.renderStep(position))));
126
114
  }
127
-
128
115
  return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
129
116
  onLayout: event => this.setState({
130
117
  width: event.nativeEvent.layout.width,
@@ -138,9 +125,8 @@ class StepIndicator extends _react.Component {
138
125
  height: this.state.customStyles.currentStepIndicatorSize
139
126
  }]
140
127
  }, steps);
141
- };
142
-
143
- this.renderStepLabels = () => {
128
+ });
129
+ _defineProperty(this, "renderStepLabels", () => {
144
130
  const {
145
131
  labels,
146
132
  direction,
@@ -182,15 +168,13 @@ class StepIndicator extends _react.Component {
182
168
  alignItems: this.state.customStyles.labelAlign
183
169
  }]
184
170
  }, labelViews);
185
- };
186
-
187
- this.renderStep = position => {
171
+ });
172
+ _defineProperty(this, "renderStep", position => {
188
173
  const {
189
174
  renderStepIndicator
190
175
  } = this.props;
191
176
  let stepStyle;
192
177
  let indicatorLabelStyle;
193
-
194
178
  switch (this.getStepStatus(position)) {
195
179
  case STEP_STATUS.CURRENT:
196
180
  {
@@ -208,7 +192,6 @@ class StepIndicator extends _react.Component {
208
192
  };
209
193
  break;
210
194
  }
211
-
212
195
  case STEP_STATUS.FINISHED:
213
196
  {
214
197
  stepStyle = {
@@ -225,7 +208,6 @@ class StepIndicator extends _react.Component {
225
208
  };
226
209
  break;
227
210
  }
228
-
229
211
  case STEP_STATUS.UNFINISHED:
230
212
  {
231
213
  stepStyle = {
@@ -243,10 +225,8 @@ class StepIndicator extends _react.Component {
243
225
  };
244
226
  break;
245
227
  }
246
-
247
228
  default:
248
229
  }
249
-
250
230
  return /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
251
231
  key: "step-indicator",
252
232
  style: [styles.step, stepStyle]
@@ -255,14 +235,12 @@ class StepIndicator extends _react.Component {
255
235
  stepStatus: this.getStepStatus(position)
256
236
  }) : /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
257
237
  style: indicatorLabelStyle
258
- }, "".concat(position + 1)));
259
- };
260
-
261
- this.getStepStatus = stepPosition => {
238
+ }, `${position + 1}`));
239
+ });
240
+ _defineProperty(this, "getStepStatus", stepPosition => {
262
241
  const {
263
242
  currentPosition
264
243
  } = this.props;
265
-
266
244
  if (stepPosition === currentPosition) {
267
245
  return STEP_STATUS.CURRENT;
268
246
  } else if (stepPosition < currentPosition) {
@@ -270,21 +248,17 @@ class StepIndicator extends _react.Component {
270
248
  } else {
271
249
  return STEP_STATUS.UNFINISHED;
272
250
  }
273
- };
274
-
275
- this.onCurrentPositionChanged = position => {
251
+ });
252
+ _defineProperty(this, "onCurrentPositionChanged", position => {
276
253
  let {
277
254
  stepCount
278
255
  } = this.props;
279
-
280
256
  if (position > stepCount - 1) {
281
257
  position = stepCount - 1;
282
258
  }
283
-
284
259
  const animateToPosition = this.state.progressBarSize / (stepCount - 1) * position;
285
260
  this.sizeAnim.setValue(this.state.customStyles.stepIndicatorSize);
286
261
  this.borderRadiusAnim.setValue(this.state.customStyles.stepIndicatorSize / 2);
287
-
288
262
  _reactNative.Animated.sequence([_reactNative.Animated.timing(this.progressAnim, {
289
263
  toValue: animateToPosition,
290
264
  duration: 200
@@ -295,8 +269,7 @@ class StepIndicator extends _react.Component {
295
269
  toValue: this.state.customStyles.currentStepIndicatorSize / 2,
296
270
  duration: 100
297
271
  })])]).start();
298
- };
299
-
272
+ });
300
273
  const defaultStyles = {
301
274
  stepIndicatorSize: 30,
302
275
  currentStepIndicatorSize: 40,
@@ -334,13 +307,11 @@ class StepIndicator extends _react.Component {
334
307
  this.sizeAnim = new _reactNative.Animated.Value(this.state.customStyles.stepIndicatorSize);
335
308
  this.borderRadiusAnim = new _reactNative.Animated.Value(this.state.customStyles.stepIndicatorSize / 2);
336
309
  }
337
-
338
310
  stepPressed(position) {
339
311
  if (this.props.onPress) {
340
312
  this.props.onPress(position);
341
313
  }
342
314
  }
343
-
344
315
  render() {
345
316
  const {
346
317
  labels,
@@ -355,7 +326,6 @@ class StepIndicator extends _react.Component {
355
326
  }]
356
327
  }, this.state.width !== 0 && this.renderProgressBarBackground(), this.state.width !== 0 && this.renderProgressBar(), this.renderStepIndicator(), labels && this.renderStepLabels());
357
328
  }
358
-
359
329
  componentDidUpdate(prevProps) {
360
330
  // if (prevProps.customStyles !== this.props.customStyles) {
361
331
  // this.setState((state) => ({
@@ -365,15 +335,13 @@ class StepIndicator extends _react.Component {
365
335
  // ),
366
336
  // }));
367
337
  // }
338
+
368
339
  if (prevProps.currentPosition !== this.props.currentPosition) {
369
340
  this.onCurrentPositionChanged(this.props.currentPosition);
370
341
  }
371
342
  }
372
-
373
343
  }
374
-
375
344
  exports.default = StepIndicator;
376
-
377
345
  const styles = _reactNative.StyleSheet.create({
378
346
  container: {
379
347
  backgroundColor: "transparent"
@@ -409,26 +377,6 @@ const styles = _reactNative.StyleSheet.create({
409
377
  justifyContent: "center"
410
378
  }
411
379
  });
412
-
413
- StepIndicator.defaultProps = {
414
- currentPosition: 0,
415
- stepCount: 5,
416
- customStyles: {},
417
- direction: "horizontal"
418
- }; justifyContent: "center"
419
- },
420
- stepLabel: {
421
- fontSize: 12,
422
- textAlign: "center",
423
- fontWeight: "500"
424
- },
425
- stepLabelItem: {
426
- flex: 1,
427
- alignItems: "center",
428
- justifyContent: "center"
429
- }
430
- });
431
-
432
380
  StepIndicator.defaultProps = {
433
381
  currentPosition: 0,
434
382
  stepCount: 5,
@@ -4,23 +4,14 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = _interopRequireWildcard(require("react"));
9
-
10
8
  var _reactNative = require("react-native");
11
-
12
9
  var _lodash = require("lodash");
13
-
14
10
  var _theming = require("../theming");
15
-
16
11
  var _IconButton = _interopRequireDefault(require("./IconButton"));
17
-
18
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
-
20
13
  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); }
21
-
22
14
  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; }
23
-
24
15
  const Stepper = _ref => {
25
16
  let {
26
17
  min = -Infinity,
@@ -38,24 +29,20 @@ const Stepper = _ref => {
38
29
  },
39
30
  Icon
40
31
  } = _ref;
41
- const [value, setValue] = (0, _react.useState)(defaultValue !== null && defaultValue !== void 0 ? defaultValue : 0);
42
-
32
+ const [value, setValue] = (0, _react.useState)(defaultValue ?? 0);
43
33
  const isValidValue = valueArg => valueArg >= min && valueArg <= max;
44
-
45
34
  const handlePlusOrMinus = type => {
46
35
  const newValue = type === "plus" ? value + 1 : value - 1;
47
-
48
36
  if (isValidValue(newValue)) {
49
37
  setValue(newValue);
50
38
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
51
39
  }
52
40
  };
53
-
54
41
  (0, _react.useEffect)(() => {
55
42
  if (valueProp != null && (0, _lodash.isNumber)(valueProp) && valueProp !== value && isValidValue(valueProp)) {
56
43
  setValue(valueProp);
57
- } // eslint-disable-next-line react-hooks/exhaustive-deps
58
-
44
+ }
45
+ // eslint-disable-next-line react-hooks/exhaustive-deps
59
46
  }, [valueProp]);
60
47
  return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
61
48
  style: [{
@@ -90,7 +77,6 @@ const Stepper = _ref => {
90
77
  }
91
78
  }));
92
79
  };
93
-
94
80
  var _default = (0, _theming.withTheme)(Stepper);
95
-
81
+ exports.default = _default;g.withTheme)(Stepper);
96
82
  exports.default = _default;
@@ -4,24 +4,15 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var React = _interopRequireWildcard(require("react"));
9
-
10
8
  var _reactNative = require("react-native");
11
-
12
9
  var _shadow = _interopRequireDefault(require("../styles/shadow"));
13
-
14
10
  var _overlay = _interopRequireDefault(require("../styles/overlay"));
15
-
16
11
  var _theming = require("../theming");
17
-
18
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
-
20
13
  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); }
21
-
22
14
  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; }
23
-
24
- /* Copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx */
15
+ 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); }
25
16
  const Surface = _ref => {
26
17
  let {
27
18
  elevation: propElevation,
@@ -42,7 +33,6 @@ const Surface = _ref => {
42
33
  } = theme;
43
34
  const elevation = propElevation || styleElevation;
44
35
  const evalationStyles = elevation ? (0, _shadow.default)(elevation) : {};
45
-
46
36
  const getBackgroundColor = () => {
47
37
  if (backgroundColor) {
48
38
  return backgroundColor;
@@ -52,20 +42,7 @@ const Surface = _ref => {
52
42
  return colors.surface;
53
43
  }
54
44
  };
55
-
56
- return /*#__PURE__*/React.createElement(_reactNative.Animated.View, { ...rest,
57
- style: [{
58
- backgroundColor: getBackgroundColor(),
59
- elevation,
60
- ...evalationStyles,
61
- ...restStyle
62
- }]
63
- }, children);
64
- };
65
-
66
- var _default = (0, _theming.withTheme)(Surface);
67
-
68
- exports.default = _default;, _extends({}, rest, {
45
+ return /*#__PURE__*/React.createElement(_reactNative.Animated.View, _extends({}, rest, {
69
46
  style: [{
70
47
  backgroundColor: getBackgroundColor(),
71
48
  elevation,
@@ -74,7 +51,5 @@ exports.default = _default;, _extends({}, rest, {
74
51
  }]
75
52
  }), children);
76
53
  };
77
-
78
54
  var _default = (0, _theming.withTheme)(Surface);
79
-
80
55
  exports.default = _default;
@@ -4,15 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = _interopRequireDefault(require("react"));
9
-
10
8
  var _reactNative = require("react-native");
11
-
12
9
  var _reactNativeWebSwiper = _interopRequireDefault(require("react-native-web-swiper"));
13
-
14
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
11
  const Swiper = _ref => {
17
12
  let {
18
13
  vertical = false,
@@ -67,17 +62,14 @@ const Swiper = _ref => {
67
62
  item,
68
63
  index
69
64
  });
70
-
71
65
  if (!component) {
72
66
  return null;
73
67
  }
74
-
75
68
  const key = keyExtractor ? keyExtractor(item, index) : index;
76
69
  return /*#__PURE__*/_react.default.cloneElement(component, {
77
70
  key
78
71
  });
79
72
  }) : children));
80
73
  };
81
-
82
74
  var _default = Swiper;
83
75
  exports.default = _default;
@@ -4,19 +4,14 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = _interopRequireDefault(require("react"));
9
-
10
8
  var _reactNative = require("react-native");
11
-
12
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
10
  const styles = _reactNative.StyleSheet.create({
15
11
  wrapper: {
16
12
  flex: 1
17
13
  }
18
14
  });
19
-
20
15
  const SwiperItem = _ref => {
21
16
  let {
22
17
  children,
@@ -26,6 +21,5 @@ const SwiperItem = _ref => {
26
21
  style: [styles.wrapper, style]
27
22
  }, children);
28
23
  };
29
-
30
24
  var _default = SwiperItem;
31
25
  exports.default = _default;
@@ -15,9 +15,6 @@ Object.defineProperty(exports, "SwiperItem", {
15
15
  return _SwiperItem.default;
16
16
  }
17
17
  });
18
-
19
18
  var _Swiper = _interopRequireDefault(require("./Swiper"));
20
-
21
19
  var _SwiperItem = _interopRequireDefault(require("./SwiperItem"));
22
-
23
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -4,27 +4,16 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = exports.SwitchRow = void 0;
7
-
8
7
  var React = _interopRequireWildcard(require("react"));
9
-
10
8
  var _reactNative = require("react-native");
11
-
12
9
  var _theming = require("../theming");
13
-
14
10
  var _FormRow = _interopRequireDefault(require("./FormRow"));
15
-
16
11
  var _types = require("@draftbit/types");
17
-
18
12
  var _hooks = require("../hooks");
19
-
20
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
-
22
14
  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); }
23
-
24
15
  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; }
25
-
26
16
  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); }
27
-
28
17
  function Switch(_ref) {
29
18
  let {
30
19
  value,
@@ -48,9 +37,10 @@ function Switch(_ref) {
48
37
  if (value != null && value !== checked) {
49
38
  setChecked(value);
50
39
  }
51
- }, [value, checked]); // This special logic is to handle weird APIs like Airtable that return
52
- // true or undefined for a boolean
40
+ }, [value, checked]);
53
41
 
42
+ // This special logic is to handle weird APIs like Airtable that return
43
+ // true or undefined for a boolean
54
44
  const previousDefaultValue = (0, _hooks.usePrevious)(defaultValue);
55
45
  React.useEffect(() => {
56
46
  if (defaultValue !== previousDefaultValue) {
@@ -64,7 +54,8 @@ function Switch(_ref) {
64
54
  false: inactiveTrackThemeColor,
65
55
  true: activeTrackThemeColor
66
56
  },
67
- thumbColor: value ? activeThumbThemeColor : inactiveThumbThemeColor // @ts-ignore react-native-web only
57
+ thumbColor: value ? activeThumbThemeColor : inactiveThumbThemeColor
58
+ // @ts-ignore react-native-web only
68
59
  ,
69
60
  activeThumbColor: activeThumbThemeColor,
70
61
  ios_backgroundColor: inactiveTrackThemeColor,
@@ -75,7 +66,6 @@ function Switch(_ref) {
75
66
  }
76
67
  }, rest));
77
68
  }
78
-
79
69
  function Row(_ref2) {
80
70
  let {
81
71
  label = "Label",
@@ -123,10 +113,7 @@ function Row(_ref2) {
123
113
  inactiveThumbColor: inactiveThumbColor
124
114
  }));
125
115
  }
126
-
127
116
  const SwitchRow = (0, _theming.withTheme)(Row);
128
117
  exports.SwitchRow = SwitchRow;
129
-
130
118
  var _default = (0, _theming.withTheme)(Switch);
131
-
132
119
  exports.default = _default;
@@ -4,65 +4,33 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = exports.Link = exports.BaseLink = void 0;
7
-
8
7
  var React = _interopRequireWildcard(require("react"));
9
-
10
8
  var _reactNative = require("react-native");
11
-
12
9
  var _theming = require("../theming");
13
-
14
10
  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); }
15
-
16
11
  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; }
17
-
12
+ 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); }
13
+ 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; }
14
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
15
+ 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); }
18
16
  class Text extends React.Component {
17
+ constructor() {
18
+ super(...arguments);
19
+ _defineProperty(this, "_root", void 0);
20
+ _defineProperty(this, "state", {
21
+ nativeProps: {}
22
+ });
23
+ }
19
24
  setNativeProps(args) {
20
- return this._root && this._root.setNativeProps(args);
25
+ this.state.nativeProps = args || {};
21
26
  }
22
-
23
27
  render() {
24
28
  const {
25
29
  style,
26
30
  ...rest
27
31
  } = this.props;
28
32
  const writingDirection = _reactNative.I18nManager.isRTL ? "rtl" : "ltr";
29
- return /*#__PURE__*/React.createElement(_reactNative.Text, { ...rest,
30
- ref: c => {
31
- this._root = c;
32
- },
33
- style: [{
34
- textAlign: "left",
35
- writingDirection
36
- }, style]
37
- });
38
- }
39
-
40
- }
41
-
42
- const BaseLink = _ref => {
43
- let {
44
- style,
45
- theme,
46
- title,
47
- ...props
48
- } = _ref;
49
- return /*#__PURE__*/React.createElement(Text, {
50
- hitSlop: 8,
51
- style: [{
52
- color: theme.colors.primary
53
- }, style],
54
- theme: theme,
55
- ...props
56
- }, title);
57
- };
58
-
59
- exports.BaseLink = BaseLink;
60
- const Link = (0, _theming.withTheme)(BaseLink);
61
- exports.Link = Link;
62
-
63
- var _default = (0, _theming.withTheme)(Text);
64
-
65
- exports.default = _default;/React.createElement(_reactNative.Text, _extends({}, rest, {
33
+ return /*#__PURE__*/React.createElement(_reactNative.Text, _extends({}, rest, this.state.nativeProps, {
66
34
  ref: c => {
67
35
  this._root = c;
68
36
  },
@@ -72,9 +40,7 @@ exports.default = _default;/React.createElement(_reactNative.Text, _extends({},
72
40
  }, style]
73
41
  }));
74
42
  }
75
-
76
43
  }
77
-
78
44
  const BaseLink = _ref => {
79
45
  let {
80
46
  style,
@@ -90,11 +56,8 @@ const BaseLink = _ref => {
90
56
  theme: theme
91
57
  }, props), title);
92
58
  };
93
-
94
59
  exports.BaseLink = BaseLink;
95
60
  const Link = (0, _theming.withTheme)(BaseLink);
96
61
  exports.Link = Link;
97
-
98
62
  var _default = (0, _theming.withTheme)(Text);
99
-
100
63
  exports.default = _default;