@draftbit/core 47.1.1-8b0b37.2 → 47.1.1-ace71d.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 (80) hide show
  1. package/lib/commonjs/components/Button.js +2 -2
  2. package/lib/commonjs/components/IconButton.js +4 -2
  3. package/lib/commonjs/components/NumberInput.js +1 -1
  4. package/lib/commonjs/components/Pressable.js +2 -2
  5. package/lib/commonjs/components/Touchable.js +2 -2
  6. package/lib/commonjs/mappings/Button.js +2 -2
  7. package/lib/commonjs/mappings/DatePicker.js +1 -1
  8. package/lib/commonjs/mappings/FlashList.js +28 -4
  9. package/lib/commonjs/mappings/FlatList.js +14 -0
  10. package/lib/commonjs/mappings/IconButton.js +4 -6
  11. package/lib/commonjs/mappings/MapView.js +3 -1
  12. package/lib/commonjs/mappings/ScrollView.js +7 -1
  13. package/lib/commonjs/mappings/TextField.js +2 -2
  14. package/lib/commonjs/mappings/Touchable.js +9 -2
  15. package/lib/module/components/Button.js +2 -2
  16. package/lib/module/components/CardBlock.js +4 -14
  17. package/lib/module/components/CircularProgress.js +8 -28
  18. package/lib/module/components/IconButton.js +4 -2
  19. package/lib/module/components/Image.js +2 -18
  20. package/lib/module/components/NumberInput.js +1 -1
  21. package/lib/module/components/Picker/PickerComponent.android.js +3 -21
  22. package/lib/module/components/Pressable.js +2 -2
  23. package/lib/module/components/RadioButton/context.js +1 -1
  24. package/lib/module/components/Touchable.js +2 -2
  25. package/lib/module/hooks.js +2 -1
  26. package/lib/module/mappings/Button.js +2 -2
  27. package/lib/module/mappings/DatePicker.js +1 -1
  28. package/lib/module/mappings/FlashList.js +29 -5
  29. package/lib/module/mappings/FlatList.js +15 -1
  30. package/lib/module/mappings/IconButton.js +5 -7
  31. package/lib/module/mappings/MapView.js +3 -1
  32. package/lib/module/mappings/ScrollView.js +8 -2
  33. package/lib/module/mappings/TextField.js +2 -2
  34. package/lib/module/mappings/Touchable.js +10 -3
  35. package/lib/typescript/src/components/IconButton.d.ts +2 -0
  36. package/lib/typescript/src/components/IconButton.d.ts.map +1 -1
  37. package/lib/typescript/src/components/Pressable.d.ts.map +1 -1
  38. package/lib/typescript/src/components/Touchable.d.ts.map +1 -1
  39. package/lib/typescript/src/mappings/DatePicker.d.ts +1 -1
  40. package/lib/typescript/src/mappings/FlashList.d.ts +57 -8
  41. package/lib/typescript/src/mappings/FlashList.d.ts.map +1 -1
  42. package/lib/typescript/src/mappings/FlatList.d.ts +30 -0
  43. package/lib/typescript/src/mappings/FlatList.d.ts.map +1 -1
  44. package/lib/typescript/src/mappings/IconButton.d.ts +20 -10
  45. package/lib/typescript/src/mappings/IconButton.d.ts.map +1 -1
  46. package/lib/typescript/src/mappings/MapView.d.ts +2 -0
  47. package/lib/typescript/src/mappings/MapView.d.ts.map +1 -1
  48. package/lib/typescript/src/mappings/ScrollView.d.ts +21 -0
  49. package/lib/typescript/src/mappings/ScrollView.d.ts.map +1 -1
  50. package/lib/typescript/src/mappings/Touchable.d.ts +20 -0
  51. package/lib/typescript/src/mappings/Touchable.d.ts.map +1 -1
  52. package/package.json +3 -3
  53. package/src/components/Button.js +1 -1
  54. package/src/components/Button.tsx +2 -2
  55. package/src/components/IconButton.js +2 -2
  56. package/src/components/IconButton.tsx +6 -2
  57. package/src/components/NumberInput.js +1 -1
  58. package/src/components/NumberInput.tsx +1 -1
  59. package/src/components/Pressable.js +1 -1
  60. package/src/components/Pressable.tsx +2 -2
  61. package/src/components/Touchable.js +1 -1
  62. package/src/components/Touchable.tsx +2 -2
  63. package/src/mappings/Button.js +2 -2
  64. package/src/mappings/Button.ts +2 -2
  65. package/src/mappings/DatePicker.js +1 -1
  66. package/src/mappings/DatePicker.ts +1 -1
  67. package/src/mappings/FlashList.js +29 -5
  68. package/src/mappings/FlashList.ts +33 -5
  69. package/src/mappings/FlatList.js +15 -1
  70. package/src/mappings/FlatList.ts +17 -0
  71. package/src/mappings/IconButton.js +5 -7
  72. package/src/mappings/IconButton.ts +5 -7
  73. package/src/mappings/MapView.js +2 -0
  74. package/src/mappings/MapView.ts +2 -0
  75. package/src/mappings/ScrollView.js +8 -2
  76. package/src/mappings/ScrollView.ts +10 -1
  77. package/src/mappings/TextField.js +2 -2
  78. package/src/mappings/TextField.ts +2 -2
  79. package/src/mappings/Touchable.js +10 -3
  80. package/src/mappings/Touchable.ts +12 -2
@@ -24,8 +24,8 @@ function Base(_ref) {
24
24
  loading,
25
25
  disabled,
26
26
  style,
27
- activeOpacity,
28
- disabledOpacity,
27
+ activeOpacity = 0.8,
28
+ disabledOpacity = 0.8,
29
29
  ...props
30
30
  } = _ref;
31
31
  const {
@@ -16,11 +16,13 @@ const IconButton = _ref => {
16
16
  icon,
17
17
  color: customColor,
18
18
  size = 32,
19
- disabled = false,
19
+ disabled,
20
20
  loading = false,
21
21
  onPress,
22
22
  theme,
23
23
  style,
24
+ activeOpacity = 0.8,
25
+ disabledOpacity = 0.8,
24
26
  ...props
25
27
  } = _ref;
26
28
  const iconColor = customColor || theme.colors.primary;
@@ -32,7 +34,7 @@ const IconButton = _ref => {
32
34
  pressed
33
35
  } = _ref2;
34
36
  return [styles.container, {
35
- opacity: pressed || disabled ? 0.75 : 1,
37
+ opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1,
36
38
  width: size,
37
39
  height: size,
38
40
  alignItems: "center",
@@ -17,7 +17,7 @@ const NumberInput = _ref => {
17
17
  defaultValue,
18
18
  ...props
19
19
  } = _ref;
20
- const [currentStringNumberValue, setCurrentStringNumberValue] = (0, _react.useState)("0");
20
+ const [currentStringNumberValue, setCurrentStringNumberValue] = (0, _react.useState)("");
21
21
  const formatValueToStringNumber = valueToFormat => {
22
22
  if (valueToFormat != null) {
23
23
  if ((0, _lodash.isString)(valueToFormat) && valueToFormat !== "") {
@@ -13,8 +13,8 @@ function Pressable(_ref) {
13
13
  children,
14
14
  disabled,
15
15
  onPress,
16
- activeOpacity,
17
- disabledOpacity,
16
+ activeOpacity = 0.8,
17
+ disabledOpacity = 0.8,
18
18
  delayLongPress,
19
19
  hitSlop,
20
20
  style,
@@ -13,8 +13,8 @@ function Touchable(_ref) {
13
13
  children,
14
14
  disabled,
15
15
  onPress,
16
- activeOpacity,
17
- disabledOpacity,
16
+ activeOpacity = 0.8,
17
+ disabledOpacity = 0.8,
18
18
  delayLongPress,
19
19
  hitSlop,
20
20
  style,
@@ -23,7 +23,7 @@ const SEED_DATA_PROPS = {
23
23
  activeOpacity: (0, _types.createStaticNumberProp)({
24
24
  label: "Active Opacity",
25
25
  description: "Opacity of the button when active.",
26
- defaultValue: 0.8,
26
+ defaultValue: null,
27
27
  min: 0,
28
28
  max: 1,
29
29
  step: 0.01,
@@ -33,7 +33,7 @@ const SEED_DATA_PROPS = {
33
33
  disabledOpacity: (0, _types.createStaticNumberProp)({
34
34
  label: "Disabled Opacity",
35
35
  description: "Opacity of the button when disabled.",
36
- defaultValue: 0.8,
36
+ defaultValue: null,
37
37
  min: 0,
38
38
  max: 1,
39
39
  step: 0.01,
@@ -156,7 +156,7 @@ const SEED_DATA = [{
156
156
  category: _types.COMPONENT_TYPES.input,
157
157
  layout: null,
158
158
  triggers: [_types.Triggers.OnDateChange],
159
- StylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.Background, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position],
159
+ stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.Background, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position],
160
160
  props: {
161
161
  ...SEED_DATA_PROPS,
162
162
  type: {
@@ -30,10 +30,6 @@ const SEED_DATA = [{
30
30
  step: 1,
31
31
  precision: 0
32
32
  }),
33
- optimizeItemArrangement: (0, _types.createStaticBoolProp)({
34
- label: "Optimize Item Arrangement",
35
- description: "If enabled, MasonryFlashList will try to reduce difference in column height by modifying item order. If true, specifying overrideItemLayout is required. Default value is false."
36
- }),
37
33
  initialNumToRender: (0, _types.createStaticNumberProp)({
38
34
  label: "Initial Num To Render",
39
35
  description: "How many items to render in the initial batch",
@@ -43,6 +39,20 @@ const SEED_DATA = [{
43
39
  label: "End Reached Threshold",
44
40
  description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
45
41
  defaultValue: 0.5
42
+ }),
43
+ refreshColor: (0, _types.createColorProp)({
44
+ label: "Refreshing Color",
45
+ description: "Color of the refresh indicator"
46
+ }),
47
+ showsHorizontalScrollIndicator: (0, _types.createStaticBoolProp)({
48
+ label: "Show Horizontal Scroll Indicator",
49
+ description: "When true, shows a horizontal scroll indicator. The default value is true.",
50
+ defaultValue: true
51
+ }),
52
+ showsVerticalScrollIndicator: (0, _types.createStaticBoolProp)({
53
+ label: "Show Vertical Scroll Indicator",
54
+ description: "When true, shows a vertical scroll indicator. The default value is true.",
55
+ defaultValue: true
46
56
  })
47
57
  }
48
58
  }, {
@@ -87,6 +97,20 @@ const SEED_DATA = [{
87
97
  label: "End Reached Threshold",
88
98
  description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
89
99
  defaultValue: 0.5
100
+ }),
101
+ refreshColor: (0, _types.createColorProp)({
102
+ label: "Refreshing Color",
103
+ description: "Color of the refresh indicator"
104
+ }),
105
+ showsHorizontalScrollIndicator: (0, _types.createStaticBoolProp)({
106
+ label: "Show Horizontal Scroll Indicator",
107
+ description: "When true, shows a horizontal scroll indicator. The default value is true.",
108
+ defaultValue: true
109
+ }),
110
+ showsVerticalScrollIndicator: (0, _types.createStaticBoolProp)({
111
+ label: "Show Vertical Scroll Indicator",
112
+ description: "When true, shows a vertical scroll indicator. The default value is true.",
113
+ defaultValue: true
90
114
  })
91
115
  }
92
116
  }];
@@ -38,6 +38,20 @@ const SEED_DATA = {
38
38
  label: "End Reached Threshold",
39
39
  description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
40
40
  defaultValue: 0.5
41
+ }),
42
+ refreshColor: (0, _types.createColorProp)({
43
+ label: "Refreshing Color",
44
+ description: "Color of the refresh indicator"
45
+ }),
46
+ showsHorizontalScrollIndicator: (0, _types.createStaticBoolProp)({
47
+ label: "Show Horizontal Scroll Indicator",
48
+ description: "When true, shows a horizontal scroll indicator. The default value is true.",
49
+ defaultValue: true
50
+ }),
51
+ showsVerticalScrollIndicator: (0, _types.createStaticBoolProp)({
52
+ label: "Show Vertical Scroll Indicator",
53
+ description: "When true, shows a vertical scroll indicator. The default value is true.",
54
+ defaultValue: true
41
55
  })
42
56
  }
43
57
  };
@@ -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
  };
@@ -283,7 +283,7 @@ const SEED_DATA = [{
283
283
  ...SEED_DATA_PROPS,
284
284
  type: {
285
285
  label: "Appearance",
286
- description: "Type of Datepicker",
286
+ description: "Type of Field",
287
287
  formType: _types.FORM_TYPES.flatArray,
288
288
  propType: _types.PROP_TYPES.STRING,
289
289
  defaultValue: "solid",
@@ -325,7 +325,7 @@ const SEED_DATA = [{
325
325
  ...SEED_DATA_PROPS,
326
326
  type: {
327
327
  label: "Appearance",
328
- description: "Type of Datepicker",
328
+ description: "Type of Field",
329
329
  formType: _types.FORM_TYPES.flatArray,
330
330
  propType: _types.PROP_TYPES.STRING,
331
331
  defaultValue: "solid",
@@ -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
  };
@@ -16,8 +16,8 @@ function Base(_ref) {
16
16
  loading,
17
17
  disabled,
18
18
  style,
19
- activeOpacity,
20
- disabledOpacity,
19
+ activeOpacity = 0.8,
20
+ disabledOpacity = 0.8,
21
21
  ...props
22
22
  } = _ref;
23
23
  const {
@@ -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 { View, Text } from "react-native";
3
4
  import Image from "./Image";
@@ -41,12 +42,11 @@ const CardBlock = _ref => {
41
42
  const rightDescriptionStyles = [typography.subtitle2, {
42
43
  color: colors.light
43
44
  }];
44
- return /*#__PURE__*/React.createElement(Card, {
45
+ return /*#__PURE__*/React.createElement(Card, _extends({
45
46
  style: style,
46
47
  onPress: onPress,
47
- numColumns: numColumns,
48
- ...rest
49
- }, /*#__PURE__*/React.createElement(View, {
48
+ numColumns: numColumns
49
+ }, rest), /*#__PURE__*/React.createElement(View, {
50
50
  style: {
51
51
  backgroundColor: colors.background
52
52
  }
@@ -95,14 +95,4 @@ const CardBlock = _ref => {
95
95
  style: rightDescriptionStyles
96
96
  }, rightDescription) : null) : null));
97
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
98
  export default withTheme(CardBlock);
@@ -1,24 +1,27 @@
1
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
1
4
  import React from "react";
2
5
  import { View } from "react-native";
3
6
  import { Svg, Path, G } from "react-native-svg";
4
7
  class CircularProgress extends React.Component {
5
8
  constructor() {
6
9
  super(...arguments);
7
- this.polarToCartesian = (centerX, centerY, radius, angleInDegrees) => {
10
+ _defineProperty(this, "polarToCartesian", (centerX, centerY, radius, angleInDegrees) => {
8
11
  var angleInRadians = (angleInDegrees - 90) * Math.PI / 180.0;
9
12
  return {
10
13
  x: centerX + radius * Math.cos(angleInRadians),
11
14
  y: centerY + radius * Math.sin(angleInRadians)
12
15
  };
13
- };
14
- this.circlePath = (x, y, radius, startAngle, endAngle) => {
16
+ });
17
+ _defineProperty(this, "circlePath", (x, y, radius, startAngle, endAngle) => {
15
18
  var start = this.polarToCartesian(x, y, radius, endAngle * 0.9999);
16
19
  var end = this.polarToCartesian(x, y, radius, startAngle);
17
20
  var largeArcFlag = endAngle - startAngle <= 180 ? "0" : "1";
18
21
  var d = ["M", start.x, start.y, "A", radius, radius, 0, largeArcFlag, 0, end.x, end.y];
19
22
  return d.join(" ");
20
- };
21
- this.clampFill = fill => Math.min(100, Math.max(0, fill));
23
+ });
24
+ _defineProperty(this, "clampFill", fill => Math.min(100, Math.max(0, fill)));
22
25
  }
23
26
  render() {
24
27
  const {
@@ -98,27 +101,4 @@ class CircularProgress extends React.Component {
98
101
  }, children(fill)));
99
102
  }
100
103
  }
101
- export default CircularProgress;eElement(G, {
102
- rotation: rotation,
103
- originX: (size + padding) / 2,
104
- originY: (size + padding) / 2
105
- }, backgroundColor && /*#__PURE__*/React.createElement(Path, {
106
- d: backgroundPath,
107
- stroke: backgroundColor,
108
- strokeWidth: backgroundWidth || width,
109
- strokeLinecap: lineCap,
110
- strokeDasharray: strokeDasharrayBackground,
111
- fill: "transparent"
112
- }), fill > 0 && /*#__PURE__*/React.createElement(Path, {
113
- d: circlePathItem,
114
- stroke: tintColor,
115
- strokeWidth: width,
116
- strokeLinecap: lineCap,
117
- strokeDasharray: strokeDasharrayTint,
118
- fill: "transparent"
119
- }), cap)), children && /*#__PURE__*/React.createElement(View, {
120
- style: localChildrenContainerStyle
121
- }, children(fill)));
122
- }
123
- }
124
104
  export default CircularProgress;
@@ -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, {
@@ -9,7 +9,7 @@ const NumberInput = _ref => {
9
9
  defaultValue,
10
10
  ...props
11
11
  } = _ref;
12
- const [currentStringNumberValue, setCurrentStringNumberValue] = useState("0");
12
+ const [currentStringNumberValue, setCurrentStringNumberValue] = useState("");
13
13
  const formatValueToStringNumber = valueToFormat => {
14
14
  if (valueToFormat != null) {
15
15
  if (isString(valueToFormat) && valueToFormat !== "") {
@@ -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 { View, StyleSheet } from "react-native";
3
4
  import omit from "lodash.omit";
@@ -7,6 +8,7 @@ import { extractStyles } from "../../utilities";
7
8
  import TextField from "../TextField";
8
9
  import Touchable from "../Touchable";
9
10
  const Picker = _ref => {
11
+ var _options$find$label, _options$find;
10
12
  let {
11
13
  style,
12
14
  options,
@@ -16,7 +18,6 @@ const Picker = _ref => {
16
18
  onValueChange: onValueChangeOverride = () => {},
17
19
  ...props
18
20
  } = _ref;
19
- var _a, _b;
20
21
  const {
21
22
  viewStyles: {
22
23
  borderRadius,
@@ -61,7 +62,7 @@ const Picker = _ref => {
61
62
  };
62
63
 
63
64
  const stylesWithoutMargin = style && omit(StyleSheet.flatten(style), ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"]);
64
- const selectedLabel = selectedValue && ((_b = (_a = options.find(o => o.value === selectedValue)) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : selectedValue);
65
+ const selectedLabel = selectedValue && ((_options$find$label = (_options$find = options.find(o => o.value === selectedValue)) === null || _options$find === void 0 ? void 0 : _options$find.label) !== null && _options$find$label !== void 0 ? _options$find$label : selectedValue);
65
66
  return /*#__PURE__*/React.createElement(Touchable, {
66
67
  disabled: disabled,
67
68
  onPress: toggleFocus,
@@ -83,25 +84,6 @@ const Picker = _ref => {
83
84
  label: o.label,
84
85
  value: o.value,
85
86
  key: o.value
86
- }))), /*#__PURE__*/React.createElement(View, {
87
- pointerEvents: "none"
88
- }, /*#__PURE__*/React.createElement(TextField, {
89
- ...props,
90
- value: selectedLabel,
91
- placeholder: placeholder,
92
- // @ts-ignore
93
- ref: textField,
94
- disabled: disabled,
95
- // @ts-expect-error
96
- style: stylesWithoutMargin
97
- }))));
98
- };
99
- const styles = StyleSheet.create({
100
- container: {
101
- alignSelf: "stretch"
102
- }
103
- });
104
- export default withTheme(Picker);y: o.value
105
87
  }))), /*#__PURE__*/React.createElement(View, {
106
88
  pointerEvents: "none"
107
89
  }, /*#__PURE__*/React.createElement(TextField, _extends({}, props, {
@@ -6,8 +6,8 @@ export default function Pressable(_ref) {
6
6
  children,
7
7
  disabled,
8
8
  onPress,
9
- activeOpacity,
10
- disabledOpacity,
9
+ activeOpacity = 0.8,
10
+ disabledOpacity = 0.8,
11
11
  delayLongPress,
12
12
  hitSlop,
13
13
  style,
@@ -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";
@@ -6,8 +6,8 @@ export default function Touchable(_ref) {
6
6
  children,
7
7
  disabled,
8
8
  onPress,
9
- activeOpacity,
10
- disabledOpacity,
9
+ activeOpacity = 0.8,
10
+ disabledOpacity = 0.8,
11
11
  delayLongPress,
12
12
  hitSlop,
13
13
  style,
@@ -3,11 +3,12 @@ export function usePrevious(value) {
3
3
  // The ref object is a generic container whose current property is mutable
4
4
  // and can hold any value, similar to an instance property on a class
5
5
  const ref = React.useRef();
6
+
6
7
  // Store current value in ref
7
8
  React.useEffect(() => {
8
9
  ref.current = value;
9
10
  }, [value]);
11
+
10
12
  // Return previous value (happens before update in useEffect above)
11
13
  return ref.current;
12
- }
13
14
  }
@@ -17,7 +17,7 @@ const SEED_DATA_PROPS = {
17
17
  activeOpacity: createStaticNumberProp({
18
18
  label: "Active Opacity",
19
19
  description: "Opacity of the button when active.",
20
- defaultValue: 0.8,
20
+ defaultValue: null,
21
21
  min: 0,
22
22
  max: 1,
23
23
  step: 0.01,
@@ -27,7 +27,7 @@ const SEED_DATA_PROPS = {
27
27
  disabledOpacity: createStaticNumberProp({
28
28
  label: "Disabled Opacity",
29
29
  description: "Opacity of the button when disabled.",
30
- defaultValue: 0.8,
30
+ defaultValue: null,
31
31
  min: 0,
32
32
  max: 1,
33
33
  step: 0.01,
@@ -150,7 +150,7 @@ export const SEED_DATA = [{
150
150
  category: COMPONENT_TYPES.input,
151
151
  layout: null,
152
152
  triggers: [Triggers.OnDateChange],
153
- StylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.Background, StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position],
153
+ stylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.Background, StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position],
154
154
  props: {
155
155
  ...SEED_DATA_PROPS,
156
156
  type: {