@draftbit/core 46.7.3 → 46.7.4

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 (287) hide show
  1. package/lib/commonjs/components/Accordion/AccordionItem.js +4 -23
  2. package/lib/commonjs/components/AnimatedCircularProgress.js +1 -12
  3. package/lib/commonjs/components/AvatarEdit.js +4 -15
  4. package/lib/commonjs/components/Button.js +10 -33
  5. package/lib/commonjs/components/Checkbox/Checkbox.js +4 -22
  6. package/lib/commonjs/components/Container.js +4 -15
  7. package/lib/commonjs/components/DeprecatedButton.js +3 -20
  8. package/lib/commonjs/components/DeprecatedCardWrapper.js +1 -15
  9. package/lib/commonjs/components/Divider.js +1 -14
  10. package/lib/commonjs/components/Image.js +2 -17
  11. package/lib/commonjs/components/Justification.js +1 -5
  12. package/lib/commonjs/components/Picker/Picker.js +4 -9
  13. package/lib/commonjs/components/Portal/PortalHost.js +15 -44
  14. package/lib/commonjs/components/Portal/PortalManager.js +8 -34
  15. package/lib/commonjs/components/ProgressBar.js +7 -37
  16. package/lib/commonjs/components/ResizeMode.js +1 -5
  17. package/lib/commonjs/components/Slider.js +4 -21
  18. package/lib/commonjs/components/Surface.js +2 -14
  19. package/lib/commonjs/components/TextField.js +28 -76
  20. package/lib/commonjs/components/Touchable.js +2 -15
  21. package/lib/commonjs/hooks.js +2 -1
  22. package/lib/commonjs/index.js +0 -56
  23. package/lib/commonjs/mappings/StarRating.js +2 -6
  24. package/lib/commonjs/utilities.js +2 -1
  25. package/lib/module/components/Button.js +10 -33
  26. package/lib/module/components/Checkbox/CheckboxGroupRow.js +5 -24
  27. package/lib/module/components/Checkbox/context.js +1 -1
  28. package/lib/module/components/CircleImage.js +1 -16
  29. package/lib/module/components/DeprecatedCardWrapper.js +1 -18
  30. package/lib/module/components/Divider.js +1 -18
  31. package/lib/module/components/Elevation.js +2 -14
  32. package/lib/module/components/FieldSearchBarFull.js +2 -1
  33. package/lib/module/components/FormRow.js +2 -17
  34. package/lib/module/components/Image.js +2 -18
  35. package/lib/module/components/Justification.js +0 -1
  36. package/lib/module/components/Layout.js +21 -42
  37. package/lib/module/components/NumberInput.js +3 -12
  38. package/lib/module/components/Picker/PickerComponent.ios.js +11 -36
  39. package/lib/module/components/Portal/PortalConsumer.js +7 -22
  40. package/lib/module/components/RadioButton/RadioButton.js +1 -13
  41. package/lib/module/components/RadioButton/RadioButtonGroup.js +2 -16
  42. package/lib/module/components/RadioButton/RadioButtonRow.js +5 -24
  43. package/lib/module/components/ResizeMode.js +0 -1
  44. package/lib/module/components/Slider.js +4 -21
  45. package/lib/module/components/StepIndicator.js +18 -58
  46. package/lib/module/components/TextField.js +28 -78
  47. package/lib/module/components/ToggleButton.js +2 -16
  48. package/lib/module/components/Touchable.js +2 -15
  49. package/lib/module/constants.js +2 -1
  50. package/lib/module/index.js +0 -8
  51. package/lib/module/mappings/FieldSearchBarFull.js +1 -4
  52. package/lib/module/styles/overlay.js +3 -1
  53. package/lib/module/utilities.js +2 -1
  54. package/lib/typescript/src/index.d.ts +0 -8
  55. package/lib/typescript/src/index.d.ts.map +1 -1
  56. package/package.json +3 -3
  57. package/src/index.tsx +0 -8
  58. package/lib/commonjs/components/CardBlock.js +0 -115
  59. package/lib/commonjs/components/CardContainer.js +0 -138
  60. package/lib/commonjs/components/CardContainerRating.js +0 -133
  61. package/lib/commonjs/components/CardContainerShortImage.js +0 -84
  62. package/lib/commonjs/components/CardInline.js +0 -91
  63. package/lib/commonjs/components/Carousel.js +0 -130
  64. package/lib/commonjs/components/Header.js +0 -82
  65. package/lib/commonjs/components/HeaderLarge.js +0 -38
  66. package/lib/commonjs/components/HeaderMedium.js +0 -38
  67. package/lib/commonjs/components/HeaderOverline.js +0 -39
  68. package/lib/module/components/CardBlock.js +0 -108
  69. package/lib/module/components/CardContainer.js +0 -121
  70. package/lib/module/components/CardContainerRating.js +0 -135
  71. package/lib/module/components/CardContainerShortImage.js +0 -90
  72. package/lib/module/components/CardInline.js +0 -82
  73. package/lib/module/components/Carousel.js +0 -120
  74. package/lib/module/components/Header.js +0 -72
  75. package/lib/module/components/HeaderLarge.js +0 -28
  76. package/lib/module/components/HeaderMedium.js +0 -28
  77. package/lib/module/components/HeaderOverline.js +0 -29
  78. package/lib/typescript/src/components/CardBlock.d.ts +0 -21
  79. package/lib/typescript/src/components/CardBlock.d.ts.map +0 -1
  80. package/lib/typescript/src/components/CardContainer.d.ts +0 -23
  81. package/lib/typescript/src/components/CardContainer.d.ts.map +0 -1
  82. package/lib/typescript/src/components/CardContainerRating.d.ts +0 -24
  83. package/lib/typescript/src/components/CardContainerRating.d.ts.map +0 -1
  84. package/lib/typescript/src/components/CardContainerShortImage.d.ts +0 -19
  85. package/lib/typescript/src/components/CardContainerShortImage.d.ts.map +0 -1
  86. package/lib/typescript/src/components/CardInline.d.ts +0 -20
  87. package/lib/typescript/src/components/CardInline.d.ts.map +0 -1
  88. package/lib/typescript/src/components/Carousel.d.ts +0 -15
  89. package/lib/typescript/src/components/Carousel.d.ts.map +0 -1
  90. package/lib/typescript/src/components/Header.d.ts +0 -20
  91. package/lib/typescript/src/components/Header.d.ts.map +0 -1
  92. package/lib/typescript/src/components/HeaderLarge.d.ts +0 -17
  93. package/lib/typescript/src/components/HeaderLarge.d.ts.map +0 -1
  94. package/lib/typescript/src/components/HeaderMedium.d.ts +0 -17
  95. package/lib/typescript/src/components/HeaderMedium.d.ts.map +0 -1
  96. package/lib/typescript/src/components/HeaderOverline.d.ts +0 -17
  97. package/lib/typescript/src/components/HeaderOverline.d.ts.map +0 -1
  98. package/src/Provider.js +0 -9
  99. package/src/components/Accordion/AccordionGroup.js +0 -44
  100. package/src/components/Accordion/AccordionItem.js +0 -32
  101. package/src/components/Accordion/index.js +0 -2
  102. package/src/components/ActionSheet/ActionSheet.js +0 -45
  103. package/src/components/ActionSheet/ActionSheetCancel.js +0 -6
  104. package/src/components/ActionSheet/ActionSheetItem.js +0 -30
  105. package/src/components/ActionSheet/index.js +0 -3
  106. package/src/components/AnimatedCircularProgress.js +0 -43
  107. package/src/components/AspectRatio.js +0 -18
  108. package/src/components/AvatarEdit.js +0 -30
  109. package/src/components/Banner.js +0 -109
  110. package/src/components/Button.js +0 -114
  111. package/src/components/Card.js +0 -57
  112. package/src/components/CardBlock.js +0 -54
  113. package/src/components/CardBlock.tsx +0 -127
  114. package/src/components/CardContainer.js +0 -69
  115. package/src/components/CardContainer.tsx +0 -165
  116. package/src/components/CardContainerRating.js +0 -79
  117. package/src/components/CardContainerRating.tsx +0 -175
  118. package/src/components/CardContainerShortImage.js +0 -33
  119. package/src/components/CardContainerShortImage.tsx +0 -101
  120. package/src/components/CardInline.js +0 -36
  121. package/src/components/CardInline.tsx +0 -93
  122. package/src/components/Carousel.js +0 -68
  123. package/src/components/Carousel.tsx +0 -134
  124. package/src/components/Checkbox/Checkbox.js +0 -62
  125. package/src/components/Checkbox/CheckboxGroup.js +0 -21
  126. package/src/components/Checkbox/CheckboxGroupRow.js +0 -76
  127. package/src/components/Checkbox/CheckboxRow.js +0 -77
  128. package/src/components/Checkbox/context.js +0 -14
  129. package/src/components/Checkbox/index.js +0 -3
  130. package/src/components/CircleImage.js +0 -8
  131. package/src/components/CircularProgress.js +0 -81
  132. package/src/components/Config.js +0 -64
  133. package/src/components/Container.js +0 -43
  134. package/src/components/DatePicker/DatePicker.js +0 -377
  135. package/src/components/DatePicker/DatePickerComponent.js +0 -13
  136. package/src/components/DatePicker/DatePickerComponent.web.js +0 -30
  137. package/src/components/DatePicker/DatePickerComponentType.js +0 -1
  138. package/src/components/DeprecatedButton.js +0 -83
  139. package/src/components/DeprecatedCardWrapper.js +0 -18
  140. package/src/components/DeprecatedFAB.js +0 -114
  141. package/src/components/Divider.js +0 -13
  142. package/src/components/Elevation.js +0 -20
  143. package/src/components/FAB.js +0 -46
  144. package/src/components/FieldSearchBarFull.js +0 -53
  145. package/src/components/FormRow.js +0 -19
  146. package/src/components/Header.js +0 -44
  147. package/src/components/Header.tsx +0 -105
  148. package/src/components/HeaderLarge.js +0 -7
  149. package/src/components/HeaderLarge.tsx +0 -40
  150. package/src/components/HeaderMedium.js +0 -7
  151. package/src/components/HeaderMedium.tsx +0 -41
  152. package/src/components/HeaderOverline.js +0 -7
  153. package/src/components/HeaderOverline.tsx +0 -42
  154. package/src/components/IconButton.js +0 -35
  155. package/src/components/Image.js +0 -47
  156. package/src/components/Justification.js +0 -1
  157. package/src/components/Layout.js +0 -50
  158. package/src/components/NumberInput.js +0 -49
  159. package/src/components/Picker/Picker.js +0 -267
  160. package/src/components/Picker/PickerComponent.android.js +0 -69
  161. package/src/components/Picker/PickerComponent.ios.js +0 -79
  162. package/src/components/Picker/PickerComponent.web.js +0 -70
  163. package/src/components/Picker/PickerTypes.js +0 -1
  164. package/src/components/Portal/Portal.js +0 -35
  165. package/src/components/Portal/PortalConsumer.js +0 -27
  166. package/src/components/Portal/PortalHost.js +0 -107
  167. package/src/components/Portal/PortalManager.js +0 -32
  168. package/src/components/Pressable.js +0 -12
  169. package/src/components/ProgressBar.js +0 -118
  170. package/src/components/ProgressCircle.js +0 -13
  171. package/src/components/ProgressIndicator.js +0 -27
  172. package/src/components/RadioButton/RadioButton.js +0 -17
  173. package/src/components/RadioButton/RadioButtonFieldGroup.js +0 -17
  174. package/src/components/RadioButton/RadioButtonGroup.js +0 -43
  175. package/src/components/RadioButton/RadioButtonRow.js +0 -76
  176. package/src/components/RadioButton/context.js +0 -14
  177. package/src/components/RadioButton/index.js +0 -4
  178. package/src/components/ResizeMode.js +0 -1
  179. package/src/components/Row.js +0 -48
  180. package/src/components/RowBodyIcon.js +0 -8
  181. package/src/components/RowHeadlineImageCaption.js +0 -12
  182. package/src/components/RowHeadlineImageIcon.js +0 -14
  183. package/src/components/SVG.js +0 -13
  184. package/src/components/ScreenContainer.js +0 -34
  185. package/src/components/Slider.js +0 -63
  186. package/src/components/StarRating.js +0 -50
  187. package/src/components/StepIndicator.js +0 -346
  188. package/src/components/Stepper.js +0 -41
  189. package/src/components/Surface.js +0 -32
  190. package/src/components/Swiper/Swiper.js +0 -29
  191. package/src/components/Swiper/SwiperItem.js +0 -9
  192. package/src/components/Swiper/index.js +0 -2
  193. package/src/components/Switch.js +0 -56
  194. package/src/components/Text.js +0 -33
  195. package/src/components/TextField.js +0 -428
  196. package/src/components/ToggleButton.js +0 -39
  197. package/src/components/Touchable.js +0 -12
  198. package/src/components/Touchable.web.js +0 -2
  199. package/src/components/Typography.js +0 -36
  200. package/src/components/useAuthState.js +0 -31
  201. package/src/constants.js +0 -10
  202. package/src/hooks.js +0 -12
  203. package/src/index.js +0 -53
  204. package/src/interfaces/Icon.js +0 -8
  205. package/src/mappings/Accordion.js +0 -41
  206. package/src/mappings/AccordionItem.js +0 -16
  207. package/src/mappings/ActionSheet.js +0 -13
  208. package/src/mappings/ActionSheetCancel.js +0 -19
  209. package/src/mappings/ActionSheetItem.js +0 -23
  210. package/src/mappings/ActivityIndicator.js +0 -58
  211. package/src/mappings/AudioPlayer.js +0 -57
  212. package/src/mappings/AvatarEdit.js +0 -38
  213. package/src/mappings/Banner.js +0 -32
  214. package/src/mappings/BlurView.js +0 -42
  215. package/src/mappings/Button.js +0 -116
  216. package/src/mappings/Card.js +0 -52
  217. package/src/mappings/CardBlock.js +0 -123
  218. package/src/mappings/CardContainer.js +0 -104
  219. package/src/mappings/CardContainerRating.js +0 -126
  220. package/src/mappings/CardContainerShortImage.js +0 -120
  221. package/src/mappings/CardInline.js +0 -52
  222. package/src/mappings/Carousel.js +0 -19
  223. package/src/mappings/Checkbox.js +0 -46
  224. package/src/mappings/CheckboxGroup.js +0 -26
  225. package/src/mappings/CheckboxRow.js +0 -61
  226. package/src/mappings/CircleImage.js +0 -25
  227. package/src/mappings/Container.js +0 -30
  228. package/src/mappings/CustomCode.js +0 -8
  229. package/src/mappings/DatePicker.js +0 -176
  230. package/src/mappings/Divider.js +0 -27
  231. package/src/mappings/FAB.js +0 -37
  232. package/src/mappings/Fetch.js +0 -13
  233. package/src/mappings/FieldSearchBarFull.js +0 -50
  234. package/src/mappings/FlashList.js +0 -85
  235. package/src/mappings/FlatList.js +0 -37
  236. package/src/mappings/HeaderLarge.js +0 -29
  237. package/src/mappings/HeaderMedium.js +0 -55
  238. package/src/mappings/HeaderOverline.js +0 -55
  239. package/src/mappings/Icon.js +0 -32
  240. package/src/mappings/IconButton.js +0 -35
  241. package/src/mappings/Image.js +0 -35
  242. package/src/mappings/ImageBackground.js +0 -29
  243. package/src/mappings/KeyboardAvoidingView.js +0 -41
  244. package/src/mappings/KeyboardAwareScrollView.js +0 -50
  245. package/src/mappings/Layout.js +0 -200
  246. package/src/mappings/LinearGradient.js +0 -77
  247. package/src/mappings/MapCallout.js +0 -21
  248. package/src/mappings/MapMarker.js +0 -47
  249. package/src/mappings/MapView.js +0 -139
  250. package/src/mappings/Modal.js +0 -42
  251. package/src/mappings/NumberInput.js +0 -254
  252. package/src/mappings/Picker.js +0 -148
  253. package/src/mappings/ProgressBar.js +0 -101
  254. package/src/mappings/ProgressCircle.js +0 -109
  255. package/src/mappings/ProgressIndicator.js +0 -181
  256. package/src/mappings/RadioButton.js +0 -51
  257. package/src/mappings/RadioButtonGroup.js +0 -17
  258. package/src/mappings/RadioButtonRow.js +0 -42
  259. package/src/mappings/RowBodyIcon.js +0 -75
  260. package/src/mappings/RowHeadlineImageCaption.js +0 -167
  261. package/src/mappings/RowHeadlineImageIcon.js +0 -99
  262. package/src/mappings/SVG.js +0 -20
  263. package/src/mappings/SafeAreaView.js +0 -33
  264. package/src/mappings/ScrollView.js +0 -31
  265. package/src/mappings/Slider.js +0 -60
  266. package/src/mappings/StarRating.js +0 -43
  267. package/src/mappings/Stepper.js +0 -32
  268. package/src/mappings/Surface.js +0 -14
  269. package/src/mappings/Swiper.js +0 -62
  270. package/src/mappings/SwiperItem.js +0 -8
  271. package/src/mappings/Switch.js +0 -81
  272. package/src/mappings/Text.js +0 -251
  273. package/src/mappings/TextArea.js +0 -274
  274. package/src/mappings/TextField.js +0 -391
  275. package/src/mappings/TextInput.js +0 -402
  276. package/src/mappings/ToggleButton.js +0 -50
  277. package/src/mappings/Touchable.js +0 -60
  278. package/src/mappings/Video.js +0 -81
  279. package/src/mappings/View.js +0 -207
  280. package/src/mappings/WebView.js +0 -88
  281. package/src/styles/DarkTheme.js +0 -26
  282. package/src/styles/DefaultTheme.js +0 -111
  283. package/src/styles/fonts.js +0 -62
  284. package/src/styles/overlay.js +0 -60
  285. package/src/styles/shadow.js +0 -51
  286. package/src/theming.js +0 -3
  287. package/src/utilities.js +0 -102
@@ -1,82 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var React = _interopRequireWildcard(require("react"));
8
- var _reactNative = require("react-native");
9
- var _theming = require("../theming");
10
- var _Divider = _interopRequireDefault(require("./Divider"));
11
- var _Touchable = _interopRequireDefault(require("./Touchable"));
12
- var _Config = _interopRequireDefault(require("./Config"));
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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); }
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; }
16
- const Header = _ref => {
17
- let {
18
- Icon,
19
- titleTypeStyle,
20
- titleColor,
21
- title,
22
- buttonText,
23
- dividerTopMargin,
24
- icon,
25
- onPress,
26
- style,
27
- theme: {
28
- colors,
29
- typography
30
- }
31
- } = _ref;
32
- return /*#__PURE__*/React.createElement(_reactNative.View, {
33
- style: [styles.container, style]
34
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
35
- style: styles.topContainer
36
- }, /*#__PURE__*/React.createElement(_reactNative.Text, {
37
- style: [titleTypeStyle, {
38
- color: titleColor,
39
- flex: 1
40
- }],
41
- numberOfLines: 1
42
- }, title), onPress && /*#__PURE__*/React.createElement(_Touchable.default, {
43
- style: {
44
- alignSelf: "center",
45
- marginLeft: 12
46
- },
47
- onPress: onPress
48
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
49
- style: styles.buttonContainer
50
- }, /*#__PURE__*/React.createElement(_reactNative.Text, {
51
- style: [typography.subtitle2, {
52
- color: colors.light,
53
- marginRight: 8
54
- }],
55
- numberOfLines: 1
56
- }, buttonText), /*#__PURE__*/React.createElement(Icon, {
57
- name: icon,
58
- size: _Config.default.headerIconSize,
59
- color: colors.light
60
- })))), /*#__PURE__*/React.createElement(_Divider.default, {
61
- style: {
62
- marginTop: dividerTopMargin || 16
63
- }
64
- }));
65
- };
66
- const styles = _reactNative.StyleSheet.create({
67
- container: {
68
- alignSelf: "stretch"
69
- },
70
- topContainer: {
71
- flexDirection: "row",
72
- justifyContent: "space-between",
73
- alignItems: "center"
74
- },
75
- buttonContainer: {
76
- flexDirection: "row",
77
- justifyContent: "center",
78
- alignItems: "center"
79
- }
80
- });
81
- var _default = (0, _theming.withTheme)(Header);
82
- exports.default = _default;
@@ -1,38 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var React = _interopRequireWildcard(require("react"));
8
- var _theming = require("../theming");
9
- var _Header = _interopRequireDefault(require("./Header"));
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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
- 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
- const HeaderLarge = _ref => {
14
- let {
15
- Icon,
16
- title,
17
- buttonText,
18
- icon,
19
- onPress = () => {},
20
- style,
21
- theme: {
22
- colors,
23
- typography
24
- }
25
- } = _ref;
26
- return /*#__PURE__*/React.createElement(_Header.default, {
27
- Icon: Icon,
28
- titleTypeStyle: typography.headline4,
29
- titleColor: colors.strong,
30
- title: title,
31
- buttonText: buttonText,
32
- icon: icon,
33
- onPress: onPress,
34
- style: style
35
- });
36
- };
37
- var _default = (0, _theming.withTheme)(HeaderLarge);
38
- exports.default = _default;
@@ -1,38 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var React = _interopRequireWildcard(require("react"));
8
- var _theming = require("../theming");
9
- var _Header = _interopRequireDefault(require("./Header"));
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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
- 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
- const HeaderMedium = _ref => {
14
- let {
15
- Icon,
16
- title,
17
- buttonText,
18
- icon,
19
- onPress = () => {},
20
- style,
21
- theme: {
22
- colors,
23
- typography
24
- }
25
- } = _ref;
26
- return /*#__PURE__*/React.createElement(_Header.default, {
27
- Icon: Icon,
28
- titleTypeStyle: typography.headline6,
29
- titleColor: colors.strong,
30
- title: title,
31
- buttonText: buttonText,
32
- icon: icon,
33
- onPress: onPress,
34
- style: style
35
- });
36
- };
37
- var _default = (0, _theming.withTheme)(HeaderMedium);
38
- exports.default = _default;
@@ -1,39 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var React = _interopRequireWildcard(require("react"));
8
- var _theming = require("../theming");
9
- var _Header = _interopRequireDefault(require("./Header"));
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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
- 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
- const HeaderOverline = _ref => {
14
- let {
15
- Icon,
16
- title,
17
- buttonText,
18
- icon,
19
- onPress = () => {},
20
- style,
21
- theme: {
22
- colors,
23
- typography
24
- }
25
- } = _ref;
26
- return /*#__PURE__*/React.createElement(_Header.default, {
27
- Icon: Icon,
28
- titleTypeStyle: typography.overline,
29
- titleColor: colors.light,
30
- title: title && title.toUpperCase(),
31
- buttonText: buttonText,
32
- icon: icon,
33
- dividerTopMargin: 12,
34
- onPress: onPress,
35
- style: style
36
- });
37
- };
38
- var _default = (0, _theming.withTheme)(HeaderOverline);
39
- exports.default = _default;
@@ -1,108 +0,0 @@
1
- import React from "react";
2
- import { View, Text } from "react-native";
3
- import Image from "./Image";
4
- import Card from "./DeprecatedCardWrapper";
5
- import Elevation from "./Elevation";
6
- import { withTheme } from "../theming";
7
- import Config from "./Config";
8
- const CardBlock = _ref => {
9
- let {
10
- image = Config.cardImageUrl,
11
- title,
12
- leftDescription,
13
- rightDescription,
14
- titleCentered,
15
- aspectRatio = 1.5,
16
- elevation = 2,
17
- numColumns = 3,
18
- theme: {
19
- colors,
20
- roundness,
21
- typography
22
- },
23
- style,
24
- onPress,
25
- ...rest
26
- } = _ref;
27
- let titleJustification;
28
- let titleStyle;
29
- if (titleCentered && !leftDescription && !rightDescription) {
30
- titleJustification = "center";
31
- } else {
32
- titleJustification = "space-between";
33
- }
34
- if (numColumns === 1) {
35
- titleStyle = typography.button;
36
- } else if (numColumns === 2) {
37
- titleStyle = typography.headline6;
38
- } else {
39
- titleStyle = typography.headline5;
40
- }
41
- const rightDescriptionStyles = [typography.subtitle2, {
42
- color: colors.light
43
- }];
44
- return /*#__PURE__*/React.createElement(Card, {
45
- style: style,
46
- onPress: onPress,
47
- numColumns: numColumns,
48
- ...rest
49
- }, /*#__PURE__*/React.createElement(View, {
50
- style: {
51
- backgroundColor: colors.background
52
- }
53
- }, /*#__PURE__*/React.createElement(Elevation, {
54
- style: {
55
- elevation,
56
- borderRadius: roundness
57
- }
58
- }, /*#__PURE__*/React.createElement(Image, {
59
- style: {
60
- borderRadius: roundness,
61
- aspectRatio
62
- },
63
- source: typeof image === "string" ? {
64
- uri: image
65
- } : image,
66
- resizeMode: "cover"
67
- })), title ? /*#__PURE__*/React.createElement(View, {
68
- style: {
69
- flexDirection: "row",
70
- alignItems: "center",
71
- justifyContent: titleJustification,
72
- marginTop: numColumns === 3 ? 16 : 12
73
- }
74
- }, /*#__PURE__*/React.createElement(Text, {
75
- numberOfLines: 1,
76
- style: [titleStyle, {
77
- color: colors.strong
78
- }]
79
- }, title), !leftDescription && rightDescription ? /*#__PURE__*/React.createElement(Text, {
80
- style: rightDescriptionStyles
81
- }, rightDescription) : null) : null, leftDescription ? /*#__PURE__*/React.createElement(View, {
82
- style: {
83
- flexDirection: "row",
84
- justifyContent: "space-between",
85
- alignItems: "center",
86
- marginTop: numColumns === 3 ? 4 : 4 / 2
87
- }
88
- }, /*#__PURE__*/React.createElement(Text, {
89
- numberOfLines: 1,
90
- style: [typography.body2, {
91
- color: colors.medium
92
- }]
93
- }, leftDescription), rightDescription ? /*#__PURE__*/React.createElement(Text, {
94
- numberOfLines: 1,
95
- style: rightDescriptionStyles
96
- }, rightDescription) : null) : null));
97
- };
98
- export default withTheme(CardBlock);PURE__*/React.createElement(Text, {
99
- numberOfLines: 1,
100
- style: [typography.body2, {
101
- color: colors.medium
102
- }]
103
- }, leftDescription), rightDescription ? /*#__PURE__*/React.createElement(Text, {
104
- numberOfLines: 1,
105
- style: rightDescriptionStyles
106
- }, rightDescription) : null) : null));
107
- };
108
- export default withTheme(CardBlock);
@@ -1,121 +0,0 @@
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
- import React from "react";
3
- import { View, Text } from "react-native";
4
- import color from "color";
5
- import Image from "./Image";
6
- import Card from "./DeprecatedCardWrapper";
7
- import Elevation from "./Elevation";
8
- import { withTheme } from "../theming";
9
- import Config from "./Config";
10
- const ICON_CONTAINER_SIZE = Config.cardIconSize * 2;
11
- const ICON_CONTAINER_PADDING = Config.cardIconSize / 2 - 1;
12
- const CardContainer = _ref => {
13
- let {
14
- Icon,
15
- icon,
16
- image = Config.cardImageUrl,
17
- title,
18
- leftDescription,
19
- rightDescription,
20
- textCentered,
21
- aspectRatio = 1.5,
22
- elevation = 2,
23
- numColumns = 3,
24
- theme: {
25
- colors,
26
- roundness,
27
- typography
28
- },
29
- style,
30
- onPress,
31
- ...rest
32
- } = _ref;
33
- let textJustification;
34
- let titleStyle;
35
- if (textCentered && !rightDescription) {
36
- textJustification = "center";
37
- } else {
38
- textJustification = "space-between";
39
- }
40
- switch (numColumns) {
41
- case 2:
42
- titleStyle = typography.headline6;
43
- break;
44
- case 3:
45
- titleStyle = typography.headline5;
46
- break;
47
- }
48
- return /*#__PURE__*/React.createElement(Card, _extends({
49
- style: style,
50
- onPress: onPress,
51
- numColumns: numColumns
52
- }, rest), /*#__PURE__*/React.createElement(Elevation, {
53
- style: {
54
- elevation,
55
- borderRadius: roundness
56
- }
57
- }, /*#__PURE__*/React.createElement(View, {
58
- style: {
59
- borderRadius: roundness,
60
- overflow: "hidden",
61
- backgroundColor: colors.surface
62
- }
63
- }, /*#__PURE__*/React.createElement(Image, {
64
- style: {
65
- aspectRatio
66
- },
67
- source: typeof image === "string" ? {
68
- uri: image
69
- } : image,
70
- resizeMode: "cover"
71
- }), /*#__PURE__*/React.createElement(View, {
72
- style: {
73
- padding: numColumns === 1 ? 8 : 16
74
- }
75
- }, title ? /*#__PURE__*/React.createElement(View, {
76
- style: {
77
- flexDirection: "row",
78
- alignItems: "center",
79
- justifyContent: textJustification
80
- }
81
- }, /*#__PURE__*/React.createElement(Text, {
82
- numberOfLines: 1,
83
- style: [titleStyle, {
84
- color: colors.strong
85
- }]
86
- }, title)) : null, leftDescription ? /*#__PURE__*/React.createElement(View, {
87
- style: {
88
- flexDirection: "row",
89
- justifyContent: textJustification,
90
- alignItems: "center",
91
- marginTop: numColumns === 3 ? 4 : 4 / 2
92
- }
93
- }, /*#__PURE__*/React.createElement(Text, {
94
- numberOfLines: 1,
95
- style: [typography.body2, {
96
- color: colors.medium
97
- }]
98
- }, leftDescription), rightDescription ? /*#__PURE__*/React.createElement(Text, {
99
- numberOfLines: 1,
100
- style: [typography.subtitle2, {
101
- color: colors.light
102
- }]
103
- }, rightDescription) : null) : null), icon ? /*#__PURE__*/React.createElement(Elevation, {
104
- style: {
105
- elevation: Config.cardIconElevation,
106
- position: "absolute",
107
- top: 12,
108
- right: 12,
109
- width: ICON_CONTAINER_SIZE,
110
- height: ICON_CONTAINER_SIZE,
111
- padding: ICON_CONTAINER_PADDING,
112
- borderRadius: ICON_CONTAINER_SIZE,
113
- backgroundColor: color(colors.strong).alpha(Config.cardIconBackgroundOpacity).rgb().string()
114
- }
115
- }, /*#__PURE__*/React.createElement(Icon, {
116
- name: icon,
117
- size: Config.cardIconSize,
118
- color: colors.surface
119
- })) : null)));
120
- };
121
- export default withTheme(CardContainer);
@@ -1,135 +0,0 @@
1
- import React from "react";
2
- import { View, Text } from "react-native";
3
- import color from "color";
4
- import Image from "./Image";
5
- import Card from "./DeprecatedCardWrapper";
6
- import Elevation from "./Elevation";
7
- import StarRating from "./StarRating";
8
- import { withTheme } from "../theming";
9
- import Config from "./Config";
10
- const ICON_CONTAINER_SIZE = Config.cardIconSize * 2;
11
- const ICON_CONTAINER_PADDING = Config.cardIconSize / 2 - 1;
12
- const CardContainerRating = _ref => {
13
- let {
14
- Icon,
15
- icon,
16
- image = Config.cardImageUrl,
17
- title,
18
- leftDescription,
19
- rightDescription,
20
- rating,
21
- aspectRatio = 1.5,
22
- elevation = 2,
23
- numColumns = 3,
24
- theme: {
25
- colors,
26
- roundness,
27
- typography
28
- },
29
- style,
30
- onPress,
31
- ...rest
32
- } = _ref;
33
- let titleStyle, rightDescriptionStyle;
34
- switch (numColumns) {
35
- case 2:
36
- titleStyle = typography.headline6;
37
- rightDescriptionStyle = typography.body2;
38
- break;
39
- case 3:
40
- titleStyle = typography.headline5;
41
- rightDescriptionStyle = typography.caption;
42
- break;
43
- }
44
- return /*#__PURE__*/React.createElement(Card, {
45
- style: style,
46
- onPress: onPress,
47
- numColumns: numColumns,
48
- ...rest
49
- }, /*#__PURE__*/React.createElement(Elevation, {
50
- style: {
51
- elevation,
52
- borderRadius: roundness
53
- }
54
- }, /*#__PURE__*/React.createElement(View, {
55
- style: {
56
- borderRadius: roundness,
57
- overflow: "hidden",
58
- backgroundColor: colors.background
59
- //background color is needed for bug on android 9 - https://github.com/facebook/react-native/issues/25093
60
- }
61
- }, /*#__PURE__*/React.createElement(Image, {
62
- style: {
63
- aspectRatio
64
- },
65
- source: typeof image === "string" ? {
66
- uri: image
67
- } : image,
68
- resizeMode: "cover"
69
- }), /*#__PURE__*/React.createElement(View, {
70
- style: {
71
- padding: numColumns === 1 ? 8 : 16
72
- }
73
- }, title ? /*#__PURE__*/React.createElement(View, {
74
- style: {
75
- flexDirection: "row",
76
- alignItems: "center",
77
- justifyContent: "space-between"
78
- }
79
- }, /*#__PURE__*/React.createElement(Text, {
80
- numberOfLines: 1,
81
- style: [titleStyle, {
82
- color: colors.strong
83
- }]
84
- }, title)) : null, leftDescription ? /*#__PURE__*/React.createElement(Text, {
85
- numberOfLines: 1,
86
- style: [typography.body2, {
87
- color: colors.medium,
88
- marginTop: numColumns === 3 ? 4 : 4 / 2
89
- }]
90
- }, leftDescription) : null, /*#__PURE__*/React.createElement(View, {
91
- style: {
92
- flexDirection: "row",
93
- justifyContent: "space-between",
94
- alignItems: "center",
95
- marginTop: numColumns === 3 ? 16 : 12
96
- }
97
- }, /*#__PURE__*/React.createElement(StarRating, {
98
- Icon: Icon,
99
- starSize: numColumns === 1 ? 10 : 16,
100
- rating: rating
101
- }), /*#__PURE__*/React.createElement(Text, {
102
- style: [rightDescriptionStyle, {
103
- color: colors.medium,
104
- marginLeft: 8
105
- }],
106
- numberOfLines: 1
107
- }, rightDescription))), icon ? /*#__PURE__*/React.createElement(Elevation, {
108
- style: {
109
- elevation: Config.cardIconElevation,
110
- position: "absolute",
111
- top: 12,
112
- right: 12,
113
- width: ICON_CONTAINER_SIZE,
114
- height: ICON_CONTAINER_SIZE,
115
- padding: ICON_CONTAINER_PADDING,
116
- borderRadius: ICON_CONTAINER_SIZE,
117
- backgroundColor: color(colors.strong).alpha(Config.cardIconBackgroundOpacity).rgb().string()
118
- }
119
- }, /*#__PURE__*/React.createElement(Icon, {
120
- name: icon,
121
- size: Config.cardIconSize,
122
- color: colors.surface
123
- })) : null)));
124
- };
125
- export default withTheme(CardContainerRating);ER_PADDING,
126
- borderRadius: ICON_CONTAINER_SIZE,
127
- backgroundColor: color(colors.strong).alpha(Config.cardIconBackgroundOpacity).rgb().string()
128
- }
129
- }, /*#__PURE__*/React.createElement(Icon, {
130
- name: icon,
131
- size: Config.cardIconSize,
132
- color: colors.surface
133
- })) : null)));
134
- };
135
- export default withTheme(CardContainerRating);
@@ -1,90 +0,0 @@
1
- import React from "react";
2
- import { View, Text } from "react-native";
3
- import Image from "./Image";
4
- import Card from "./DeprecatedCardWrapper";
5
- import Elevation from "./Elevation";
6
- import { withTheme } from "../theming";
7
- import Config from "./Config";
8
- const CardContainerShortImage = _ref => {
9
- let {
10
- image = Config.squareImageUrl,
11
- title,
12
- subtitle,
13
- mode = "left",
14
- aspectRatio = 1,
15
- elevation = 2,
16
- theme: {
17
- colors,
18
- roundness,
19
- typography
20
- },
21
- style,
22
- onPress,
23
- ...rest
24
- } = _ref;
25
- return /*#__PURE__*/React.createElement(Card, {
26
- style: style,
27
- onPress: onPress,
28
- ...rest
29
- }, /*#__PURE__*/React.createElement(Elevation, {
30
- style: {
31
- elevation,
32
- borderRadius: roundness
33
- }
34
- }, /*#__PURE__*/React.createElement(View, {
35
- style: {
36
- overflow: "hidden",
37
- flexDirection: "row",
38
- justifyContent: mode === "right" ? "space-between" : "flex-start",
39
- borderRadius: roundness
40
- }
41
- }, mode === "left" && /*#__PURE__*/React.createElement(Image, {
42
- style: {
43
- aspectRatio
44
- },
45
- source: typeof image === "string" ? {
46
- uri: image
47
- } : image,
48
- resizeMode: "cover"
49
- }), /*#__PURE__*/React.createElement(View, {
50
- style: {
51
- padding: 16,
52
- backgroundColor: colors.surface,
53
- flex: 1
54
- }
55
- }, /*#__PURE__*/React.createElement(Text, {
56
- numberOfLines: 1,
57
- style: [typography.headline5, {
58
- color: colors.strong
59
- }]
60
- }, title), subtitle ? /*#__PURE__*/React.createElement(Text, {
61
- numberOfLines: 1,
62
- style: [typography.body2, {
63
- color: colors.medium,
64
- marginTop: 4
65
- }]
66
- }, subtitle) : null), mode === "right" && /*#__PURE__*/React.createElement(Image, {
67
- style: {
68
- aspectRatio
69
- },
70
- source: typeof image === "string" ? {
71
- uri: image
72
- } : image,
73
- resizeMode: "cover"
74
- }))));
75
- };
76
- export default withTheme(CardContainerShortImage);2, {
77
- color: colors.medium,
78
- marginTop: 4
79
- }]
80
- }, subtitle) : null), mode === "right" && /*#__PURE__*/React.createElement(Image, {
81
- style: {
82
- aspectRatio
83
- },
84
- source: typeof image === "string" ? {
85
- uri: image
86
- } : image,
87
- resizeMode: "cover"
88
- }))));
89
- };
90
- export default withTheme(CardContainerShortImage);