@draftbit/core 46.7.3 → 46.7.5

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 (174) 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 +12 -35
  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/Elevation.js +14 -2
  10. package/lib/commonjs/components/IconButton.js +4 -2
  11. package/lib/commonjs/components/Image.js +2 -17
  12. package/lib/commonjs/components/NumberInput.js +1 -1
  13. package/lib/commonjs/components/Picker/Picker.js +4 -9
  14. package/lib/commonjs/components/Portal/PortalHost.js +15 -44
  15. package/lib/commonjs/components/Portal/PortalManager.js +8 -34
  16. package/lib/commonjs/components/Pressable.js +2 -2
  17. package/lib/commonjs/components/ProgressBar.js +7 -37
  18. package/lib/commonjs/components/Slider.js +4 -21
  19. package/lib/commonjs/components/Surface.js +2 -14
  20. package/lib/commonjs/components/TextField.js +28 -76
  21. package/lib/commonjs/components/Touchable.js +4 -17
  22. package/lib/commonjs/constants.js +1 -1
  23. package/lib/commonjs/hooks.js +2 -1
  24. package/lib/commonjs/index.js +0 -56
  25. package/lib/commonjs/mappings/Button.js +2 -2
  26. package/lib/commonjs/mappings/FlashList.js +28 -0
  27. package/lib/commonjs/mappings/FlatList.js +14 -0
  28. package/lib/commonjs/mappings/IconButton.js +4 -6
  29. package/lib/commonjs/mappings/MapView.js +3 -1
  30. package/lib/commonjs/mappings/ScrollView.js +7 -1
  31. package/lib/commonjs/mappings/Touchable.js +9 -2
  32. package/lib/commonjs/styles/overlay.js +1 -3
  33. package/lib/commonjs/utilities.js +2 -1
  34. package/lib/module/components/Button.js +12 -35
  35. package/lib/module/components/Checkbox/CheckboxGroupRow.js +5 -24
  36. package/lib/module/components/Checkbox/context.js +1 -1
  37. package/lib/module/components/CircleImage.js +1 -16
  38. package/lib/module/components/DeprecatedCardWrapper.js +1 -18
  39. package/lib/module/components/Divider.js +1 -18
  40. package/lib/module/components/Elevation.js +2 -14
  41. package/lib/module/components/FieldSearchBarFull.js +2 -1
  42. package/lib/module/components/FormRow.js +2 -17
  43. package/lib/module/components/IconButton.js +4 -2
  44. package/lib/module/components/Image.js +2 -18
  45. package/lib/module/components/Layout.js +21 -42
  46. package/lib/module/components/NumberInput.js +4 -13
  47. package/lib/module/components/Picker/PickerComponent.ios.js +11 -36
  48. package/lib/module/components/Portal/PortalConsumer.js +7 -22
  49. package/lib/module/components/Pressable.js +2 -2
  50. package/lib/module/components/RadioButton/RadioButton.js +1 -13
  51. package/lib/module/components/RadioButton/RadioButtonGroup.js +2 -16
  52. package/lib/module/components/RadioButton/RadioButtonRow.js +5 -24
  53. package/lib/module/components/Slider.js +4 -21
  54. package/lib/module/components/StepIndicator.js +18 -58
  55. package/lib/module/components/TextField.js +28 -78
  56. package/lib/module/components/ToggleButton.js +2 -16
  57. package/lib/module/components/Touchable.js +4 -17
  58. package/lib/module/constants.js +2 -1
  59. package/lib/module/index.js +0 -8
  60. package/lib/module/mappings/Button.js +2 -2
  61. package/lib/module/mappings/FieldSearchBarFull.js +1 -4
  62. package/lib/module/mappings/FlashList.js +29 -1
  63. package/lib/module/mappings/FlatList.js +15 -1
  64. package/lib/module/mappings/IconButton.js +5 -7
  65. package/lib/module/mappings/MapView.js +3 -1
  66. package/lib/module/mappings/ScrollView.js +8 -2
  67. package/lib/module/mappings/Touchable.js +10 -3
  68. package/lib/module/styles/overlay.js +3 -1
  69. package/lib/module/utilities.js +2 -1
  70. package/lib/typescript/src/components/IconButton.d.ts +2 -0
  71. package/lib/typescript/src/components/IconButton.d.ts.map +1 -1
  72. package/lib/typescript/src/components/Pressable.d.ts.map +1 -1
  73. package/lib/typescript/src/components/Touchable.d.ts.map +1 -1
  74. package/lib/typescript/src/index.d.ts +0 -8
  75. package/lib/typescript/src/index.d.ts.map +1 -1
  76. package/lib/typescript/src/mappings/FlashList.d.ts +60 -0
  77. package/lib/typescript/src/mappings/FlashList.d.ts.map +1 -1
  78. package/lib/typescript/src/mappings/FlatList.d.ts +30 -0
  79. package/lib/typescript/src/mappings/FlatList.d.ts.map +1 -1
  80. package/lib/typescript/src/mappings/IconButton.d.ts +20 -10
  81. package/lib/typescript/src/mappings/IconButton.d.ts.map +1 -1
  82. package/lib/typescript/src/mappings/MapView.d.ts +2 -0
  83. package/lib/typescript/src/mappings/MapView.d.ts.map +1 -1
  84. package/lib/typescript/src/mappings/ScrollView.d.ts +21 -0
  85. package/lib/typescript/src/mappings/ScrollView.d.ts.map +1 -1
  86. package/lib/typescript/src/mappings/Touchable.d.ts +20 -0
  87. package/lib/typescript/src/mappings/Touchable.d.ts.map +1 -1
  88. package/package.json +3 -3
  89. package/src/components/Button.js +1 -1
  90. package/src/components/Button.tsx +2 -2
  91. package/src/components/IconButton.js +2 -2
  92. package/src/components/IconButton.tsx +6 -2
  93. package/src/components/NumberInput.js +1 -1
  94. package/src/components/NumberInput.tsx +1 -1
  95. package/src/components/Pressable.js +1 -1
  96. package/src/components/Pressable.tsx +2 -2
  97. package/src/components/Touchable.js +1 -1
  98. package/src/components/Touchable.tsx +2 -2
  99. package/src/index.js +0 -8
  100. package/src/index.tsx +0 -8
  101. package/src/mappings/Button.js +2 -2
  102. package/src/mappings/Button.ts +2 -2
  103. package/src/mappings/FlashList.js +29 -1
  104. package/src/mappings/FlashList.ts +33 -0
  105. package/src/mappings/FlatList.js +15 -1
  106. package/src/mappings/FlatList.ts +17 -0
  107. package/src/mappings/IconButton.js +5 -7
  108. package/src/mappings/IconButton.ts +5 -7
  109. package/src/mappings/MapView.js +2 -0
  110. package/src/mappings/MapView.ts +2 -0
  111. package/src/mappings/ScrollView.js +8 -2
  112. package/src/mappings/ScrollView.ts +10 -1
  113. package/src/mappings/Touchable.js +10 -3
  114. package/src/mappings/Touchable.ts +12 -2
  115. package/lib/commonjs/components/CardBlock.js +0 -115
  116. package/lib/commonjs/components/CardContainer.js +0 -138
  117. package/lib/commonjs/components/CardContainerRating.js +0 -133
  118. package/lib/commonjs/components/CardContainerShortImage.js +0 -84
  119. package/lib/commonjs/components/CardInline.js +0 -91
  120. package/lib/commonjs/components/Carousel.js +0 -130
  121. package/lib/commonjs/components/Header.js +0 -82
  122. package/lib/commonjs/components/HeaderLarge.js +0 -38
  123. package/lib/commonjs/components/HeaderMedium.js +0 -38
  124. package/lib/commonjs/components/HeaderOverline.js +0 -39
  125. package/lib/module/components/CardBlock.js +0 -108
  126. package/lib/module/components/CardContainer.js +0 -121
  127. package/lib/module/components/CardContainerRating.js +0 -135
  128. package/lib/module/components/CardContainerShortImage.js +0 -90
  129. package/lib/module/components/CardInline.js +0 -82
  130. package/lib/module/components/Carousel.js +0 -120
  131. package/lib/module/components/Header.js +0 -72
  132. package/lib/module/components/HeaderLarge.js +0 -28
  133. package/lib/module/components/HeaderMedium.js +0 -28
  134. package/lib/module/components/HeaderOverline.js +0 -29
  135. package/lib/typescript/src/components/CardBlock.d.ts +0 -21
  136. package/lib/typescript/src/components/CardBlock.d.ts.map +0 -1
  137. package/lib/typescript/src/components/CardContainer.d.ts +0 -23
  138. package/lib/typescript/src/components/CardContainer.d.ts.map +0 -1
  139. package/lib/typescript/src/components/CardContainerRating.d.ts +0 -24
  140. package/lib/typescript/src/components/CardContainerRating.d.ts.map +0 -1
  141. package/lib/typescript/src/components/CardContainerShortImage.d.ts +0 -19
  142. package/lib/typescript/src/components/CardContainerShortImage.d.ts.map +0 -1
  143. package/lib/typescript/src/components/CardInline.d.ts +0 -20
  144. package/lib/typescript/src/components/CardInline.d.ts.map +0 -1
  145. package/lib/typescript/src/components/Carousel.d.ts +0 -15
  146. package/lib/typescript/src/components/Carousel.d.ts.map +0 -1
  147. package/lib/typescript/src/components/Header.d.ts +0 -20
  148. package/lib/typescript/src/components/Header.d.ts.map +0 -1
  149. package/lib/typescript/src/components/HeaderLarge.d.ts +0 -17
  150. package/lib/typescript/src/components/HeaderLarge.d.ts.map +0 -1
  151. package/lib/typescript/src/components/HeaderMedium.d.ts +0 -17
  152. package/lib/typescript/src/components/HeaderMedium.d.ts.map +0 -1
  153. package/lib/typescript/src/components/HeaderOverline.d.ts +0 -17
  154. package/lib/typescript/src/components/HeaderOverline.d.ts.map +0 -1
  155. package/src/components/CardBlock.js +0 -54
  156. package/src/components/CardBlock.tsx +0 -127
  157. package/src/components/CardContainer.js +0 -69
  158. package/src/components/CardContainer.tsx +0 -165
  159. package/src/components/CardContainerRating.js +0 -79
  160. package/src/components/CardContainerRating.tsx +0 -175
  161. package/src/components/CardContainerShortImage.js +0 -33
  162. package/src/components/CardContainerShortImage.tsx +0 -101
  163. package/src/components/CardInline.js +0 -36
  164. package/src/components/CardInline.tsx +0 -93
  165. package/src/components/Carousel.js +0 -68
  166. package/src/components/Carousel.tsx +0 -134
  167. package/src/components/Header.js +0 -44
  168. package/src/components/Header.tsx +0 -105
  169. package/src/components/HeaderLarge.js +0 -7
  170. package/src/components/HeaderLarge.tsx +0 -40
  171. package/src/components/HeaderMedium.js +0 -7
  172. package/src/components/HeaderMedium.tsx +0 -41
  173. package/src/components/HeaderOverline.js +0 -7
  174. package/src/components/HeaderOverline.tsx +0 -42
@@ -10,26 +10,24 @@ const SEED_DATA = {
10
10
  tag: "IconButton",
11
11
  category: _types.COMPONENT_TYPES.button,
12
12
  layout: {},
13
- triggers: [_types.Triggers.OnPress],
13
+ triggers: [_types.Triggers.OnPress, _types.Triggers.OnLongPress],
14
14
  stylesPanelSections: [_types.StylesPanelSections.Margins, _types.StylesPanelSections.Effects, _types.StylesPanelSections.Position],
15
15
  props: {
16
16
  onPress: (0, _types.createActionProp)(),
17
+ onLongPress: (0, _types.createActionProp)(),
18
+ disabled: (0, _types.createDisabledProp)(),
17
19
  icon: (0, _types.createIconProp)(),
18
20
  color: (0, _types.createColorProp)({
19
21
  label: "Color",
20
22
  group: _types.GROUPS.basic
21
23
  }),
22
- disabled: (0, _types.createBoolProp)({
23
- label: "Disabled",
24
- group: _types.GROUPS.basic
25
- }),
26
24
  size: (0, _types.createNumberProp)({
27
25
  group: _types.GROUPS.basic,
28
26
  label: "Size",
29
27
  description: "Width and height of your icon",
30
28
  defaultValue: 32,
31
29
  min: 16,
32
- max: 128,
30
+ max: 256,
33
31
  step: 1,
34
32
  precision: 0
35
33
  })
@@ -12,7 +12,9 @@ const SEED_DATA = {
12
12
  description: "A map view",
13
13
  category: _types.COMPONENT_TYPES.map,
14
14
  layout: {
15
- flex: 1
15
+ flex: 1,
16
+ width: "100%",
17
+ height: "100%"
16
18
  },
17
19
  props: {
18
20
  provider: {
@@ -12,7 +12,9 @@ const SEED_DATA = {
12
12
  category: _types.COMPONENT_TYPES.view,
13
13
  stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS,
14
14
  layout: {},
15
+ triggers: [_types.Triggers.OnRefresh],
15
16
  props: {
17
+ onRefresh: (0, _types.createActionProp)(),
16
18
  horizontal: (0, _types.createStaticBoolProp)({
17
19
  label: "Horizontal",
18
20
  description: "Render your list horizontally",
@@ -21,7 +23,7 @@ const SEED_DATA = {
21
23
  showsHorizontalScrollIndicator: (0, _types.createStaticBoolProp)({
22
24
  label: "Show Horizontal Scroll Indicator",
23
25
  description: "When true, shows a horizontal scroll indicator. The default value is true.",
24
- defaultValue: false
26
+ defaultValue: true
25
27
  }),
26
28
  showsVerticalScrollIndicator: (0, _types.createStaticBoolProp)({
27
29
  label: "Show Vertical Scroll Indicator",
@@ -32,6 +34,10 @@ const SEED_DATA = {
32
34
  label: "Bounce",
33
35
  description: "When true, the scroll view bounces when it reaches the end of the content if the content is larger then the scroll view along the axis of the scroll direction.",
34
36
  defaultValue: true
37
+ }),
38
+ refreshColor: (0, _types.createColorProp)({
39
+ label: "Refreshing Color",
40
+ description: "Color of the refresh indicator"
35
41
  })
36
42
  }
37
43
  };
@@ -12,10 +12,11 @@ const SEED_DATA_PROPS = {
12
12
  props: {
13
13
  onPress: (0, _types.createActionProp)(),
14
14
  onLongPress: (0, _types.createActionProp)(),
15
+ disabled: (0, _types.createDisabledProp)(),
15
16
  activeOpacity: (0, _types.createStaticNumberProp)({
16
17
  label: "Active Opacity",
17
18
  description: "The opacity when the button is pressed.",
18
- defaultValue: 0.8,
19
+ defaultValue: null,
19
20
  min: 0,
20
21
  max: 1,
21
22
  step: 0.01,
@@ -25,7 +26,7 @@ const SEED_DATA_PROPS = {
25
26
  disabledOpacity: (0, _types.createStaticNumberProp)({
26
27
  label: "Disabled Opacity",
27
28
  description: "The opacity when the button is disabled.",
28
- defaultValue: 0.8,
29
+ defaultValue: null,
29
30
  min: 0,
30
31
  max: 1,
31
32
  step: 0.01,
@@ -41,6 +42,12 @@ const SEED_DATA_PROPS = {
41
42
  label: "Hit Slop",
42
43
  description: "Sets additional distance outside of element in which a press can be detected.",
43
44
  required: false
45
+ }),
46
+ android_disableSound: (0, _types.createStaticBoolProp)({
47
+ label: "Disable Sound",
48
+ description: "Disable the Android sound effect.",
49
+ defaultValue: null,
50
+ group: _types.GROUPS.android
44
51
  })
45
52
  }
46
53
  };
@@ -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,6 +57,7 @@ function extractBorderAndMarginStyles(style, additionalBorderStyles, additionalM
57
57
  marginStyles
58
58
  };
59
59
  }
60
+
60
61
  /**
61
62
  * Merges a style object on top of another style object. In React Native,
62
63
  * keys with undefined values in a style object will still override styles
@@ -89,4 +90,4 @@ function getValueForRadioButton(value) {
89
90
  } else {
90
91
  throw new Error("Invalid value: ".concat(value));
91
92
  }
92
- }}
93
+ }
@@ -1,3 +1,4 @@
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); }
1
2
  import * as React from "react";
2
3
  import { Text, Pressable, Platform, StyleSheet, ActivityIndicator } from "react-native";
3
4
  import { withTheme } from "../theming";
@@ -15,8 +16,8 @@ function Base(_ref) {
15
16
  loading,
16
17
  disabled,
17
18
  style,
18
- activeOpacity,
19
- disabledOpacity,
19
+ activeOpacity = 0.8,
20
+ disabledOpacity = 0.8,
20
21
  ...props
21
22
  } = _ref;
22
23
  const {
@@ -52,7 +53,7 @@ function Base(_ref) {
52
53
  if (textAlign === "right") {
53
54
  buttonStyles.justifyContent = "flex-end";
54
55
  }
55
- return /*#__PURE__*/React.createElement(Pressable, {
56
+ return /*#__PURE__*/React.createElement(Pressable, _extends({
56
57
  disabled: disabled || loading,
57
58
  style: _ref2 => {
58
59
  let {
@@ -61,9 +62,8 @@ function Base(_ref) {
61
62
  return [styles.base, {
62
63
  opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1
63
64
  }, buttonStyles];
64
- },
65
- ...props
66
- }, loading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
65
+ }
66
+ }, props), loading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
67
67
  size: "small",
68
68
  color: color,
69
69
  style: styles.loading
@@ -82,14 +82,13 @@ const Solid = _ref3 => {
82
82
  theme,
83
83
  ...props
84
84
  } = _ref3;
85
- return /*#__PURE__*/React.createElement(Base, {
85
+ return /*#__PURE__*/React.createElement(Base, _extends({
86
86
  style: [{
87
87
  color: "#FFF",
88
88
  borderRadius: theme.roundness,
89
89
  backgroundColor: theme.colors.primary
90
- }, style],
91
- ...props
92
- });
90
+ }, style]
91
+ }, props));
93
92
  };
94
93
  const ButtonSolid = withTheme(Solid);
95
94
  export { ButtonSolid };
@@ -101,14 +100,13 @@ const Outline = _ref4 => {
101
100
  theme,
102
101
  ...props
103
102
  } = _ref4;
104
- return /*#__PURE__*/React.createElement(Base, {
103
+ return /*#__PURE__*/React.createElement(Base, _extends({
105
104
  style: [styles.outline, {
106
105
  borderRadius: theme.roundness,
107
106
  borderColor: theme.colors.primary,
108
107
  color: theme.colors.primary
109
- }, style],
110
- ...props
111
- });
108
+ }, style]
109
+ }, props));
112
110
  };
113
111
  const ButtonOutline = withTheme(Outline);
114
112
  export { ButtonOutline };
@@ -155,25 +153,4 @@ const styles = StyleSheet.create({
155
153
  }
156
154
  })
157
155
  }
158
- });or: "transparent",
159
- padding: 0,
160
- minHeight: undefined
161
- },
162
- loading: {
163
- marginRight: 6
164
- },
165
- icon: {
166
- ...Platform.select({
167
- web: {
168
- marginTop: 1,
169
- marginRight: 4,
170
- alignSelf: "center"
171
- },
172
- default: {
173
- marginBottom: 2,
174
- marginRight: 4,
175
- alignSelf: "center"
176
- }
177
- })
178
- }
179
156
  });
@@ -1,3 +1,4 @@
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); }
1
2
  import * as React from "react";
2
3
  import { StyleSheet, View, Platform, Pressable } from "react-native";
3
4
  import Checkbox from "./Checkbox";
@@ -5,7 +6,7 @@ import Text from "../Text";
5
6
  import { useCheckboxGroupContext } from "./context";
6
7
  import { Direction as GroupDirection } from "./context";
7
8
  import { extractStyles } from "../../utilities";
8
- export var Direction;
9
+ export let Direction;
9
10
  (function (Direction) {
10
11
  Direction["Row"] = "row";
11
12
  Direction["RowReverse"] = "row-reverse";
@@ -62,14 +63,13 @@ const CheckboxGroupRow = _ref => {
62
63
  textStyles,
63
64
  viewStyles
64
65
  } = extractStyles(style);
65
- return /*#__PURE__*/React.createElement(Pressable, {
66
+ return /*#__PURE__*/React.createElement(Pressable, _extends({
66
67
  onPress: handlePress,
67
68
  style: [styles.mainParent, {
68
69
  flexDirection: direction
69
70
  }, viewStyles],
70
- disabled: disabled,
71
- ...rest
72
- }, /*#__PURE__*/React.createElement(View, {
71
+ disabled: disabled
72
+ }, rest), /*#__PURE__*/React.createElement(View, {
73
73
  style: [styles.label, {
74
74
  alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
75
75
  }, labelContainerStyle]
@@ -107,23 +107,4 @@ const styles = StyleSheet.create({
107
107
  flex: 3
108
108
  }
109
109
  });
110
- export default CheckboxGroupRow;reate({
111
- mainParent: {
112
- alignItems: "center",
113
- justifyContent: "space-around",
114
- paddingStart: 20,
115
- minHeight: 50,
116
- paddingEnd: 20,
117
- display: "flex",
118
- ...Platform.select({
119
- web: {
120
- cursor: "pointer",
121
- userSelect: "none"
122
- }
123
- })
124
- },
125
- label: {
126
- flex: 3
127
- }
128
- });
129
110
  export default CheckboxGroupRow;
@@ -1,5 +1,5 @@
1
1
  import { createContext, useContext } from "react";
2
- export var Direction;
2
+ export let Direction;
3
3
  (function (Direction) {
4
4
  Direction["Horizontal"] = "horizontal";
5
5
  Direction["Vertical"] = "vertical";
@@ -1,3 +1,4 @@
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); }
1
2
  import * as React from "react";
2
3
  import { Image } from "react-native";
3
4
  import Config from "./Config";
@@ -9,22 +10,6 @@ const CircleImage = _ref => {
9
10
  ...props
10
11
  } = _ref;
11
12
  const borderRadius = size / 2;
12
- return /*#__PURE__*/React.createElement(Image, {
13
- style: [{
14
- width: size,
15
- height: size,
16
- borderRadius
17
- }, style],
18
- source: typeof source === "string" ? {
19
- uri: source
20
- } : source,
21
- resizeMode: "cover",
22
- ...props
23
- });
24
- };
25
- export default CircleImage;props
26
- } = _ref;
27
- const borderRadius = size / 2;
28
13
  return /*#__PURE__*/React.createElement(Image, _extends({
29
14
  style: [{
30
15
  width: size,
@@ -1,3 +1,4 @@
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); }
1
2
  import React from "react";
2
3
  import { withTheme } from "../theming";
3
4
  import Touchable from "./Touchable";
@@ -12,24 +13,6 @@ const getWidth = numColumns => {
12
13
  }
13
14
  };
14
15
  const Card = _ref => {
15
- let {
16
- numColumns = 3,
17
- children,
18
- onPress,
19
- style,
20
- ...rest
21
- } = _ref;
22
- const width = getWidth(numColumns);
23
- return /*#__PURE__*/React.createElement(Touchable, {
24
- disabled: !onPress,
25
- onPress: onPress,
26
- style: [style, {
27
- width
28
- }],
29
- ...rest
30
- }, children);
31
- };
32
- export default withTheme(Card);ef => {
33
16
  let {
34
17
  numColumns = 3,
35
18
  children,
@@ -1,24 +1,7 @@
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); }
1
2
  import * as React from "react";
2
3
  import { StyleSheet, View } from "react-native";
3
4
  import { withTheme } from "../theming";
4
- const Divider = _ref => {
5
- let {
6
- style,
7
- color,
8
- theme: {
9
- colors
10
- },
11
- ...rest
12
- } = _ref;
13
- return /*#__PURE__*/React.createElement(View, {
14
- style: [{
15
- backgroundColor: color || colors.divider,
16
- height: StyleSheet.hairlineWidth
17
- }, style],
18
- ...rest
19
- });
20
- };
21
- export default withTheme(Divider);ing";
22
5
  const Divider = _ref => {
23
6
  let {
24
7
  style,
@@ -1,3 +1,4 @@
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); }
1
2
  import * as React from "react";
2
3
  import { Animated, StyleSheet, View } from "react-native";
3
4
  import shadow from "../styles/shadow";
@@ -18,20 +19,7 @@ const Elevation = _ref => {
18
19
  colors
19
20
  } = theme;
20
21
  const borderRadius = radius;
21
- return /*#__PURE__*/React.createElement(Animated.View, {
22
- ...rest,
23
- style: [{
24
- borderRadius,
25
- backgroundColor: colors.surface
26
- }, elevation ? shadow(elevation) : null, style]
27
- }, /*#__PURE__*/React.createElement(View, {
28
- style: {
29
- overflow: "hidden",
30
- borderRadius
31
- }
32
- }, children));
33
- };
34
- export default withTheme(Elevation);React.createElement(Animated.View, _extends({}, rest, {
22
+ return /*#__PURE__*/React.createElement(Animated.View, _extends({}, rest, {
35
23
  style: [{
36
24
  borderRadius,
37
25
  backgroundColor: colors.surface
@@ -46,6 +46,7 @@ const FieldSearchBarFull = _ref => {
46
46
  lineHeight,
47
47
  ...typeStyles
48
48
  } = typography.body2; // eslint-disable-line @typescript-eslint/no-unused-vars
49
+
49
50
  const handleChangeText = newValue => {
50
51
  setInternalValue(newValue);
51
52
  if (onChange) {
@@ -83,4 +84,4 @@ const styles = StyleSheet.create({
83
84
  alignItems: "center"
84
85
  }
85
86
  });
86
- export default withTheme(FieldSearchBarFull);;
87
+ export default withTheme(FieldSearchBarFull);
@@ -1,3 +1,4 @@
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); }
1
2
  import * as React from "react";
2
3
  import { Text, StyleSheet } from "react-native";
3
4
  import { extractStyles } from "../utilities";
@@ -16,27 +17,11 @@ export default function FormRow(_ref) {
16
17
  textStyles,
17
18
  viewStyles
18
19
  } = extractStyles(style);
19
- return /*#__PURE__*/React.createElement(Touchable, {
20
+ return /*#__PURE__*/React.createElement(Touchable, _extends({
20
21
  disabled: disabled,
21
22
  onPress: onPress,
22
23
  style: [styles.row, {
23
24
  flexDirection: direction
24
- }, viewStyles],
25
- ...rest
26
- }, /*#__PURE__*/React.createElement(Text, {
27
- style: textStyles
28
- }, label), children);
29
- }
30
- const styles = StyleSheet.create({
31
- row: {
32
- marginLeft: 8,
33
- marginRight: 8,
34
- flexDirection: "row",
35
- justifyContent: "space-between",
36
- alignItems: "center"
37
- }
38
- });styles.row, {
39
- flexDirection: direction
40
25
  }, viewStyles]
41
26
  }, rest), /*#__PURE__*/React.createElement(Text, {
42
27
  style: textStyles
@@ -8,11 +8,13 @@ const IconButton = _ref => {
8
8
  icon,
9
9
  color: customColor,
10
10
  size = 32,
11
- disabled = false,
11
+ disabled,
12
12
  loading = false,
13
13
  onPress,
14
14
  theme,
15
15
  style,
16
+ activeOpacity = 0.8,
17
+ disabledOpacity = 0.8,
16
18
  ...props
17
19
  } = _ref;
18
20
  const iconColor = customColor || theme.colors.primary;
@@ -24,7 +26,7 @@ const IconButton = _ref => {
24
26
  pressed
25
27
  } = _ref2;
26
28
  return [styles.container, {
27
- opacity: pressed || disabled ? 0.75 : 1,
29
+ opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1,
28
30
  width: size,
29
31
  height: size,
30
32
  alignItems: "center",
@@ -1,3 +1,4 @@
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); }
1
2
  /* README: Internal Image component used for stuff like Card. DO NOT EXPORT! */
2
3
  import React from "react";
3
4
  import { Image as NativeImage, StyleSheet } from "react-native";
@@ -55,24 +56,7 @@ const Image = _ref2 => {
55
56
  height,
56
57
  aspectRatio
57
58
  }]
58
- }, /*#__PURE__*/React.createElement(NativeImage, {
59
- ...props,
60
- source: imageSource,
61
- resizeMode: resizeMode,
62
- style: [style, {
63
- height: "100%",
64
- width: "100%"
65
- }]
66
- }));
67
- }
68
- return /*#__PURE__*/React.createElement(NativeImage, {
69
- ...props,
70
- source: source,
71
- resizeMode: resizeMode,
72
- style: style
73
- });
74
- };
75
- export default Image;eImage, _extends({}, props, {
59
+ }, /*#__PURE__*/React.createElement(NativeImage, _extends({}, props, {
76
60
  source: imageSource,
77
61
  resizeMode: resizeMode,
78
62
  style: [style, {
@@ -1,5 +1,8 @@
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); }
1
2
  import * as React from "react";
2
3
  import { View } from "react-native";
4
+ // @ts-ignore
5
+
3
6
  export function Center(_ref) {
4
7
  let {
5
8
  width = 240,
@@ -9,16 +12,15 @@ export function Center(_ref) {
9
12
  style,
10
13
  ...rest
11
14
  } = _ref;
12
- return /*#__PURE__*/React.createElement(View, {
15
+ return /*#__PURE__*/React.createElement(View, _extends({
13
16
  style: [{
14
17
  justifyContent: "center",
15
18
  alignItems: "center",
16
19
  width,
17
20
  height,
18
21
  backgroundColor: bgColor
19
- }, style],
20
- ...rest
21
- }, children);
22
+ }, style]
23
+ }, rest), children);
22
24
  }
23
25
  export function Circle(_ref2) {
24
26
  let {
@@ -29,7 +31,7 @@ export function Circle(_ref2) {
29
31
  ...rest
30
32
  } = _ref2;
31
33
  const borderRadius = 1000;
32
- return /*#__PURE__*/React.createElement(Center, {
34
+ return /*#__PURE__*/React.createElement(Center, _extends({
33
35
  width: size,
34
36
  height: size,
35
37
  bgColor: bgColor,
@@ -37,9 +39,8 @@ export function Circle(_ref2) {
37
39
  backgroundColor: bgColor,
38
40
  borderRadius,
39
41
  overflow: "hidden"
40
- }],
41
- ...rest
42
- }, children);
42
+ }]
43
+ }, rest), children);
43
44
  }
44
45
  export function Square(_ref3) {
45
46
  let {
@@ -49,13 +50,12 @@ export function Square(_ref3) {
49
50
  style,
50
51
  ...rest
51
52
  } = _ref3;
52
- return /*#__PURE__*/React.createElement(Center, {
53
+ return /*#__PURE__*/React.createElement(Center, _extends({
53
54
  style: style,
54
55
  width: size,
55
56
  height: size,
56
- bgColor: bgColor,
57
- ...rest
58
- }, children);
57
+ bgColor: bgColor
58
+ }, rest), children);
59
59
  }
60
60
  export function Row(_ref4) {
61
61
  let {
@@ -65,14 +65,15 @@ export function Row(_ref4) {
65
65
  style,
66
66
  ...rest
67
67
  } = _ref4;
68
- return /*#__PURE__*/React.createElement(View, {
69
- style: [style, {
68
+ return /*#__PURE__*/React.createElement(View, _extends({
69
+ style: [style,
70
+ // style goes first b/c we can't override these
71
+ {
70
72
  alignItems,
71
73
  flexDirection: "row",
72
74
  justifyContent: justifyContent
73
- }],
74
- ...rest
75
- }, children);
75
+ }]
76
+ }, rest), children);
76
77
  }
77
78
  export function Spacer(_ref5) {
78
79
  let {
@@ -84,36 +85,14 @@ export function Spacer(_ref5) {
84
85
  style,
85
86
  ...rest
86
87
  } = _ref5;
87
- return /*#__PURE__*/React.createElement(View, {
88
+ return /*#__PURE__*/React.createElement(View, _extends({
88
89
  style: [style, {
89
90
  paddingRight: right,
90
91
  paddingTop: top,
91
92
  paddingLeft: left,
92
93
  paddingBottom: bottom
93
- }],
94
- ...rest
95
- }, children);
96
- }
97
- export function Stack(_ref6) {
98
- let {
99
- children,
100
- justifyContent = "flex-start",
101
- alignItems = "flex-start",
102
- style,
103
- ...rest
104
- } = _ref6;
105
- return (
106
- /*#__PURE__*/
107
- // style must go first since we don't want justifyContent, alignItems overridden
108
- React.createElement(View, {
109
- style: [style, {
110
- justifyContent,
111
- alignItems
112
- }],
113
- ...rest
114
- }, children)
115
- );
116
- }hildren);
94
+ }]
95
+ }, rest), children);
117
96
  }
118
97
  export function Stack(_ref6) {
119
98
  let {