@draftbit/core 47.0.1-d41acb.2 → 47.0.1-e04fa3.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 (136) hide show
  1. package/lib/commonjs/components/Button.js +3 -3
  2. package/lib/commonjs/components/Checkbox/Checkbox.js +3 -1
  3. package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +2 -1
  4. package/lib/commonjs/components/Checkbox/CheckboxRow.js +2 -1
  5. package/lib/commonjs/components/DeprecatedButton.js +27 -3
  6. package/lib/commonjs/components/DeprecatedFAB.js +2 -1
  7. package/lib/commonjs/components/Touchable.js +3 -8
  8. package/lib/commonjs/index.js +25 -89
  9. package/lib/commonjs/mappings/Button.js +10 -39
  10. package/lib/commonjs/mappings/NativeBase/AlertDialog.js +102 -0
  11. package/lib/commonjs/mappings/NativeBase/Button.js +84 -0
  12. package/lib/commonjs/mappings/NativeBase/DataDisplay.js +61 -0
  13. package/lib/commonjs/mappings/NativeBase/Feedback.js +74 -0
  14. package/lib/commonjs/mappings/NativeBase/Layout.js +114 -0
  15. package/lib/commonjs/mappings/NativeBase/Media.js +49 -0
  16. package/lib/commonjs/mappings/NativeBase/Menu.js +111 -0
  17. package/lib/commonjs/mappings/NativeBase/Modal.js +93 -0
  18. package/lib/commonjs/mappings/NativeBase/Other.js +94 -0
  19. package/lib/commonjs/mappings/NativeBase/Popover.js +99 -0
  20. package/lib/commonjs/mappings/NativeBase/Select.js +65 -0
  21. package/lib/commonjs/mappings/NativeBase/Slider.js +81 -0
  22. package/lib/commonjs/mappings/Touchable.js +7 -47
  23. package/lib/module/components/Button.js +3 -3
  24. package/lib/module/components/Checkbox/Checkbox.js +3 -2
  25. package/lib/module/components/Checkbox/CheckboxGroupRow.js +3 -2
  26. package/lib/module/components/Checkbox/CheckboxRow.js +3 -2
  27. package/lib/module/components/DeprecatedButton.js +28 -4
  28. package/lib/module/components/DeprecatedFAB.js +3 -2
  29. package/lib/module/components/Touchable.js +3 -8
  30. package/lib/module/index.js +121 -32
  31. package/lib/module/mappings/Button.js +11 -40
  32. package/lib/module/mappings/NativeBase/AlertDialog.js +95 -0
  33. package/lib/module/mappings/NativeBase/Button.js +86 -0
  34. package/lib/module/mappings/NativeBase/DataDisplay.js +54 -0
  35. package/lib/module/mappings/NativeBase/Feedback.js +67 -0
  36. package/lib/module/mappings/NativeBase/Layout.js +107 -0
  37. package/lib/module/mappings/NativeBase/Media.js +42 -0
  38. package/lib/module/mappings/NativeBase/Menu.js +104 -0
  39. package/lib/module/mappings/NativeBase/Modal.js +86 -0
  40. package/lib/module/mappings/NativeBase/Other.js +87 -0
  41. package/lib/module/mappings/NativeBase/Popover.js +92 -0
  42. package/lib/module/mappings/NativeBase/Select.js +58 -0
  43. package/lib/module/mappings/NativeBase/Slider.js +74 -0
  44. package/lib/module/mappings/Touchable.js +9 -49
  45. package/lib/typescript/src/components/Button.d.ts.map +1 -1
  46. package/lib/typescript/src/components/Checkbox/Checkbox.d.ts +2 -2
  47. package/lib/typescript/src/components/Checkbox/Checkbox.d.ts.map +1 -1
  48. package/lib/typescript/src/components/Checkbox/CheckboxGroupRow.d.ts.map +1 -1
  49. package/lib/typescript/src/components/Checkbox/CheckboxRow.d.ts.map +1 -1
  50. package/lib/typescript/src/components/DeprecatedButton.d.ts +2 -2
  51. package/lib/typescript/src/components/DeprecatedButton.d.ts.map +1 -1
  52. package/lib/typescript/src/components/DeprecatedFAB.d.ts +2 -2
  53. package/lib/typescript/src/components/DeprecatedFAB.d.ts.map +1 -1
  54. package/lib/typescript/src/components/Touchable.d.ts +2 -7
  55. package/lib/typescript/src/components/Touchable.d.ts.map +1 -1
  56. package/lib/typescript/src/index.d.ts +102 -30
  57. package/lib/typescript/src/index.d.ts.map +1 -1
  58. package/lib/typescript/src/mappings/Button.d.ts +4 -113
  59. package/lib/typescript/src/mappings/Button.d.ts.map +1 -1
  60. package/lib/typescript/src/mappings/NativeBase/AlertDialog.d.ts +146 -0
  61. package/lib/typescript/src/mappings/NativeBase/AlertDialog.d.ts.map +1 -0
  62. package/lib/typescript/src/mappings/NativeBase/Button.d.ts +1 -0
  63. package/lib/typescript/src/mappings/NativeBase/Button.d.ts.map +1 -0
  64. package/lib/typescript/src/mappings/NativeBase/DataDisplay.d.ts +96 -0
  65. package/lib/typescript/src/mappings/NativeBase/DataDisplay.d.ts.map +1 -0
  66. package/lib/typescript/src/mappings/NativeBase/Feedback.d.ts +2 -0
  67. package/lib/typescript/src/mappings/NativeBase/Feedback.d.ts.map +1 -0
  68. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +146 -0
  69. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +1 -0
  70. package/lib/typescript/src/mappings/NativeBase/Media.d.ts +48 -0
  71. package/lib/typescript/src/mappings/NativeBase/Media.d.ts.map +1 -0
  72. package/lib/typescript/src/mappings/NativeBase/Menu.d.ts +227 -0
  73. package/lib/typescript/src/mappings/NativeBase/Menu.d.ts.map +1 -0
  74. package/lib/typescript/src/mappings/NativeBase/Modal.d.ts +133 -0
  75. package/lib/typescript/src/mappings/NativeBase/Modal.d.ts.map +1 -0
  76. package/lib/typescript/src/mappings/NativeBase/Other.d.ts +179 -0
  77. package/lib/typescript/src/mappings/NativeBase/Other.d.ts.map +1 -0
  78. package/lib/typescript/src/mappings/NativeBase/Popover.d.ts +136 -0
  79. package/lib/typescript/src/mappings/NativeBase/Popover.d.ts.map +1 -0
  80. package/lib/typescript/src/mappings/NativeBase/Select.d.ts +156 -0
  81. package/lib/typescript/src/mappings/NativeBase/Select.d.ts.map +1 -0
  82. package/lib/typescript/src/mappings/NativeBase/Slider.d.ts +200 -0
  83. package/lib/typescript/src/mappings/NativeBase/Slider.d.ts.map +1 -0
  84. package/lib/typescript/src/mappings/Touchable.d.ts +5 -59
  85. package/lib/typescript/src/mappings/Touchable.d.ts.map +1 -1
  86. package/package.json +3 -3
  87. package/src/components/Button.js +3 -3
  88. package/src/components/Button.tsx +4 -14
  89. package/src/components/Checkbox/Checkbox.js +3 -2
  90. package/src/components/Checkbox/Checkbox.tsx +7 -5
  91. package/src/components/Checkbox/CheckboxGroupRow.js +3 -2
  92. package/src/components/Checkbox/CheckboxGroupRow.tsx +3 -3
  93. package/src/components/Checkbox/CheckboxRow.js +3 -2
  94. package/src/components/Checkbox/CheckboxRow.tsx +3 -3
  95. package/src/components/DeprecatedButton.js +16 -4
  96. package/src/components/DeprecatedButton.tsx +31 -7
  97. package/src/components/DeprecatedFAB.js +3 -2
  98. package/src/components/DeprecatedFAB.tsx +5 -5
  99. package/src/components/Touchable.js +3 -3
  100. package/src/components/Touchable.tsx +4 -14
  101. package/src/index.js +112 -32
  102. package/src/index.tsx +123 -44
  103. package/src/mappings/Button.js +10 -39
  104. package/src/mappings/Button.ts +10 -41
  105. package/src/mappings/NativeBase/AlertDialog.js +112 -0
  106. package/src/mappings/NativeBase/AlertDialog.ts +128 -0
  107. package/src/mappings/NativeBase/Button.js +84 -0
  108. package/src/mappings/NativeBase/Button.ts +83 -0
  109. package/src/mappings/NativeBase/DataDisplay.js +67 -0
  110. package/src/mappings/NativeBase/DataDisplay.ts +79 -0
  111. package/src/mappings/NativeBase/Feedback.js +89 -0
  112. package/src/mappings/NativeBase/Feedback.ts +100 -0
  113. package/src/mappings/NativeBase/Layout.js +140 -0
  114. package/src/mappings/NativeBase/Layout.ts +152 -0
  115. package/src/mappings/NativeBase/Media.js +56 -0
  116. package/src/mappings/NativeBase/Media.ts +65 -0
  117. package/src/mappings/NativeBase/Menu.js +134 -0
  118. package/src/mappings/NativeBase/Menu.ts +150 -0
  119. package/src/mappings/NativeBase/Modal.js +103 -0
  120. package/src/mappings/NativeBase/Modal.ts +118 -0
  121. package/src/mappings/NativeBase/Other.js +123 -0
  122. package/src/mappings/NativeBase/Other.ts +139 -0
  123. package/src/mappings/NativeBase/Popover.js +123 -0
  124. package/src/mappings/NativeBase/Popover.ts +136 -0
  125. package/src/mappings/NativeBase/Select.js +71 -0
  126. package/src/mappings/NativeBase/Select.ts +85 -0
  127. package/src/mappings/NativeBase/Slider.js +89 -0
  128. package/src/mappings/NativeBase/Slider.ts +105 -0
  129. package/src/mappings/Touchable.js +7 -50
  130. package/src/mappings/Touchable.ts +6 -53
  131. package/lib/commonjs/components/Pressable.js +0 -37
  132. package/lib/module/components/Pressable.js +0 -30
  133. package/lib/typescript/src/components/Pressable.d.ts +0 -16
  134. package/lib/typescript/src/components/Pressable.d.ts.map +0 -1
  135. package/src/components/Pressable.js +0 -12
  136. package/src/components/Pressable.tsx +0 -50
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SEED_DATA = void 0;
7
+ var _types = require("@draftbit/types");
8
+ const SHARED_SEED_DATA = {
9
+ category: _types.COMPONENT_TYPES.NBPopover,
10
+ packageName: "native-base",
11
+ stylesPanelSections: [_types.StylesPanelSections.LayoutFlexItems, _types.StylesPanelSections.LayoutSelectedItem, _types.StylesPanelSections.LayoutContent, _types.StylesPanelSections.Background, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Effects],
12
+ layout: {},
13
+ triggers: {}
14
+ };
15
+ const SEED_DATA = [{
16
+ name: "Popover",
17
+ tag: "Popover",
18
+ description: "Popover floats around a trigger. It is a non-modal dialog used to provide contextual information to the user. It should be paired with a pressable trigger element.",
19
+ ...SHARED_SEED_DATA,
20
+ allowChildren: true,
21
+ props: {
22
+ isOpen: (0, _types.createBoolProp)({
23
+ label: "Is Open",
24
+ description: "If true, the popover is open. Useful for controlling the open state."
25
+ }),
26
+ defaultIsOpen: (0, _types.createStaticBoolProp)({
27
+ label: "Default Is Open",
28
+ description: "If true, the popover will be opened by default."
29
+ }),
30
+ trapFocus: (0, _types.createStaticBoolProp)({
31
+ label: "Trap Focus",
32
+ description: "Whether popover should trap focus."
33
+ }),
34
+ shouldFlip: (0, _types.createStaticBoolProp)({
35
+ label: "Should Flip",
36
+ description: "Whether popover should flip when it reaches the edge of the screen.",
37
+ defaultValue: true
38
+ }),
39
+ shouldOverlapWithTrigger: (0, _types.createStaticBoolProp)({
40
+ label: "Should Overlap With Trigger",
41
+ description: "Whether popover should overlap with trigger.",
42
+ defaultValue: false
43
+ }),
44
+ isKeyboardDismissable: (0, _types.createStaticBoolProp)({
45
+ label: "Is Keyboard Dismissable",
46
+ description: "If true, the popover will close when the keyboard is dismissed.",
47
+ defaultValue: true
48
+ }),
49
+ placement: (0, _types.createTextEnumProp)({
50
+ label: "Placement",
51
+ description: "The placement of the popover",
52
+ options: ["bottom", "top", "left", "right", "top left", "top right", "bottom left", "bottom right", "right bottom", "right top", "left bottom", "left top"],
53
+ defaultValue: "bottom left"
54
+ }),
55
+ useRNModal: (0, _types.createStaticBoolProp)({
56
+ label: "Use RN Modal",
57
+ description: "If true, the popover will use the RN Modal component."
58
+ }),
59
+ onOpen: (0, _types.createActionProp)(),
60
+ onClose: (0, _types.createActionProp)()
61
+ }
62
+ }, {
63
+ name: "Popover Arrow",
64
+ tag: "Popover.Arrow",
65
+ description: "The popover arrow.",
66
+ ...SHARED_SEED_DATA,
67
+ props: {}
68
+ }, {
69
+ name: "Popover Body",
70
+ tag: "Popover.Body",
71
+ description: "The body of the popover.",
72
+ ...SHARED_SEED_DATA,
73
+ props: {}
74
+ }, {
75
+ name: "Popover Content",
76
+ tag: "Popover.Content",
77
+ description: "The popover itself.",
78
+ ...SHARED_SEED_DATA,
79
+ props: {}
80
+ }, {
81
+ name: "Popover Close Button",
82
+ tag: "Popover.CloseButton",
83
+ description: "The button that closes the popover.",
84
+ ...SHARED_SEED_DATA,
85
+ props: {}
86
+ }, {
87
+ name: "Popover Header",
88
+ tag: "Popover.Header",
89
+ description: "The header of the popover.",
90
+ ...SHARED_SEED_DATA,
91
+ props: {}
92
+ }, {
93
+ name: "Popover Trigger",
94
+ tag: "Popover.Trigger",
95
+ description: "Used to wrap the reference (or trigger) element.",
96
+ ...SHARED_SEED_DATA,
97
+ props: {}
98
+ }];
99
+ exports.SEED_DATA = SEED_DATA;
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SEED_DATA = void 0;
7
+ var _types = require("@draftbit/types");
8
+ const SHARED_SEED_DATA = {
9
+ category: _types.COMPONENT_TYPES.NBForms,
10
+ packageName: "native-base",
11
+ doc_link: "https://docs.nativebase.io/select",
12
+ code_link: "https://github.com/GeekyAnts/NativeBase/tree/master/src/components/primitives/Select",
13
+ stylesPanelSections: [_types.StylesPanelSections.LayoutFlexItems, _types.StylesPanelSections.LayoutSelectedItem, _types.StylesPanelSections.LayoutContent, _types.StylesPanelSections.Background, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Effects],
14
+ layout: {},
15
+ allowChildren: true
16
+ };
17
+ const SEED_DATA = [{
18
+ name: "Select",
19
+ tag: "Select",
20
+ description: "Select creates a dropdown list of items with the selected item in closed view.",
21
+ ...SHARED_SEED_DATA,
22
+ triggers: [_types.Triggers.OnOpen, _types.Triggers.OnClose],
23
+ props: {
24
+ onOpen: (0, _types.createActionProp)(),
25
+ onClose: (0, _types.createActionProp)(),
26
+ placeholder: (0, _types.createTextProp)({
27
+ label: "Placeholder",
28
+ defaultValue: "Select an option"
29
+ }),
30
+ color: (0, _types.createColorProp)(),
31
+ placeholderTextColor: (0, _types.createColorProp)(),
32
+ isDisabled: (0, _types.createDisabledProp)(),
33
+ isHovered: (0, _types.createBoolProp)({
34
+ label: "Hovered?",
35
+ description: "Whether the select is hovered"
36
+ }),
37
+ isFocused: (0, _types.createBoolProp)({
38
+ label: "Focused?",
39
+ description: "Whether the select is hovered"
40
+ }),
41
+ isFocusVisible: (0, _types.createBoolProp)({
42
+ label: "Focus Visible?",
43
+ description: "WIf true, the focus ring of select will be visible."
44
+ }),
45
+ dropdownIcon: (0, _types.createIconProp)(),
46
+ dropdownOpenIcon: (0, _types.createIconProp)(),
47
+ dropdownCloseIcon: (0, _types.createIconProp)()
48
+ }
49
+ }, {
50
+ name: "Select Item",
51
+ tag: "Select.Item",
52
+ description: "An individual item in the menu.",
53
+ ...SHARED_SEED_DATA,
54
+ props: {
55
+ label: (0, _types.createTextProp)({
56
+ label: "Label",
57
+ description: "The label of the item"
58
+ }),
59
+ value: (0, _types.createTextProp)({
60
+ label: "Value",
61
+ description: "The value of the item"
62
+ })
63
+ }
64
+ }];
65
+ exports.SEED_DATA = SEED_DATA;
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SEED_DATA = void 0;
7
+ var _types = require("@draftbit/types");
8
+ const SHARED_SEED_DATA = {
9
+ category: _types.COMPONENT_TYPES.NBForms,
10
+ packageName: "native-base",
11
+ stylesPanelSections: [_types.StylesPanelSections.LayoutFlexItems, _types.StylesPanelSections.LayoutSelectedItem, _types.StylesPanelSections.LayoutContent, _types.StylesPanelSections.Background, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Effects],
12
+ layout: {},
13
+ allowChildren: true
14
+ };
15
+ const SEED_DATA = [{
16
+ name: "Slider",
17
+ tag: "Slider",
18
+ description: "The Slider allows users to select options from a given range of values.",
19
+ ...SHARED_SEED_DATA,
20
+ triggers: [_types.Triggers.OnChange, _types.Triggers.OnChangeEnd],
21
+ props: {
22
+ onChange: (0, _types.createActionProp)(),
23
+ onChangeEnd: (0, _types.createActionProp)(),
24
+ defaultValue: (0, _types.createNumberProp)(),
25
+ thumbSize: (0, _types.createStaticNumberProp)({
26
+ label: "Thumb Size",
27
+ description: "The size of the slider thumb"
28
+ }),
29
+ sliderTrackHeight: (0, _types.createStaticNumberProp)({
30
+ label: "Slider Track Height",
31
+ description: "The height of the slider track"
32
+ }),
33
+ minValue: (0, _types.createStaticNumberProp)({
34
+ label: "Min Value"
35
+ }),
36
+ maxValue: (0, _types.createStaticNumberProp)({
37
+ label: "Max Value"
38
+ }),
39
+ step: (0, _types.createStaticNumberProp)({
40
+ label: "Step"
41
+ }),
42
+ isReadOnly: (0, _types.createBoolProp)({
43
+ label: "Read Only",
44
+ description: "Whether the slider is read only",
45
+ defaultValue: false
46
+ }),
47
+ isReversed: (0, _types.createStaticBoolProp)({
48
+ label: "Reversed",
49
+ description: "If true, the value will be incremented or decremented in reverse.",
50
+ defaultValue: false
51
+ }),
52
+ orientation: (0, _types.createTextEnumProp)({
53
+ label: "Orientation",
54
+ description: "The orientation of the Slider.",
55
+ options: ["horizontal", "vertical"],
56
+ defaultValue: "horizontal"
57
+ }),
58
+ isDisabled: (0, _types.createDisabledProp)(),
59
+ accessibilityLabel: (0, _types.createAccessibilityLabelProp)()
60
+ }
61
+ }, {
62
+ name: "Slider Track",
63
+ tag: "Menu.Item",
64
+ description: "An individual item in the menu.",
65
+ ...SHARED_SEED_DATA,
66
+ props: {}
67
+ }, {
68
+ name: "Slider Filled Track",
69
+ tag: "Menu.Group",
70
+ description: "A wrapper to group related menu items.",
71
+ ...SHARED_SEED_DATA,
72
+ props: {}
73
+ }, {
74
+ name: "Slider Thumb",
75
+ tag: "Menu.OptionGroup",
76
+ description: "A wrapper for checkable menu items (radio and checkbox).",
77
+ ...SHARED_SEED_DATA,
78
+ triggers: [_types.Triggers.OnChange],
79
+ props: {}
80
+ }];
81
+ exports.SEED_DATA = SEED_DATA;
@@ -5,56 +5,16 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.SEED_DATA = void 0;
7
7
  var _types = require("@draftbit/types");
8
- const SEED_DATA_PROPS = {
8
+ const SEED_DATA = {
9
+ name: "Touchable",
10
+ tag: "Touchable",
11
+ description: "Simple button with no styles",
12
+ category: _types.COMPONENT_TYPES.button,
9
13
  stylesPanelSections: [_types.StylesPanelSections.Size, _types.StylesPanelSections.Margins, _types.StylesPanelSections.Borders],
10
14
  layout: {},
11
- triggers: [_types.Triggers.OnPress, _types.Triggers.OnLongPress],
15
+ triggers: [_types.Triggers.OnPress],
12
16
  props: {
13
- onPress: (0, _types.createActionProp)(),
14
- onLongPress: (0, _types.createActionProp)(),
15
- activeOpacity: (0, _types.createStaticNumberProp)({
16
- label: "Active Opacity",
17
- description: "The opacity when the button is pressed.",
18
- defaultValue: 0.8,
19
- min: 0,
20
- max: 1,
21
- step: 0.01,
22
- precision: 2,
23
- required: false
24
- }),
25
- disabledOpacity: (0, _types.createStaticNumberProp)({
26
- label: "Disabled Opacity",
27
- description: "The opacity when the button is disabled.",
28
- defaultValue: 0.8,
29
- min: 0,
30
- max: 1,
31
- step: 0.01,
32
- precision: 2,
33
- required: false
34
- }),
35
- delayLongPress: (0, _types.createStaticNumberProp)({
36
- label: "Delay Long Press",
37
- description: "Duration (in milliseconds) from onPressIn before onLongPress is called.",
38
- required: false
39
- }),
40
- hitSlop: (0, _types.createStaticNumberProp)({
41
- label: "Hit Slop",
42
- description: "Sets additional distance outside of element in which a press can be detected.",
43
- required: false
44
- })
17
+ onPress: (0, _types.createActionProp)()
45
18
  }
46
19
  };
47
- const SEED_DATA = [{
48
- name: "Touchable",
49
- tag: "Touchable",
50
- description: "An interactive view with no styles",
51
- category: _types.COMPONENT_TYPES.deprecated,
52
- ...SEED_DATA_PROPS
53
- }, {
54
- name: "Pressable",
55
- tag: "Pressable",
56
- description: "An interactive view with no styles",
57
- category: _types.COMPONENT_TYPES.button,
58
- ...SEED_DATA_PROPS
59
- }];
60
20
  exports.SEED_DATA = SEED_DATA;
@@ -13,11 +13,10 @@ function Base(_ref) {
13
13
  Icon,
14
14
  icon,
15
15
  title,
16
+ onPress,
16
17
  loading,
17
18
  disabled,
18
19
  style,
19
- activeOpacity,
20
- disabledOpacity,
21
20
  ...props
22
21
  } = _ref;
23
22
  const {
@@ -54,13 +53,14 @@ function Base(_ref) {
54
53
  buttonStyles.justifyContent = "flex-end";
55
54
  }
56
55
  return /*#__PURE__*/React.createElement(Pressable, _extends({
56
+ onPress: onPress,
57
57
  disabled: disabled || loading,
58
58
  style: _ref2 => {
59
59
  let {
60
60
  pressed
61
61
  } = _ref2;
62
62
  return [styles.base, {
63
- opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1
63
+ opacity: pressed || disabled ? 0.75 : 1
64
64
  }, buttonStyles];
65
65
  }
66
66
  }, props), loading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
@@ -1,7 +1,8 @@
1
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
2
  import * as React from "react";
3
- import { View, StyleSheet, Pressable } from "react-native";
3
+ import { View, StyleSheet } from "react-native";
4
4
  import { useTheme } from "../../theming";
5
+ import Touchable from "../Touchable";
5
6
  import { usePrevious } from "../../hooks";
6
7
  const Checkbox = _ref => {
7
8
  let {
@@ -50,7 +51,7 @@ const Checkbox = _ref => {
50
51
  onUncheck === null || onUncheck === void 0 ? void 0 : onUncheck();
51
52
  }
52
53
  };
53
- return /*#__PURE__*/React.createElement(Pressable, _extends({}, rest, {
54
+ return /*#__PURE__*/React.createElement(Touchable, _extends({}, rest, {
54
55
  onPress: handlePress,
55
56
  disabled: disabled,
56
57
  accessibilityState: {
@@ -1,10 +1,11 @@
1
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
2
  import * as React from "react";
3
- import { StyleSheet, View, Platform, Pressable } from "react-native";
3
+ import { StyleSheet, View, Platform } from "react-native";
4
4
  import Checkbox from "./Checkbox";
5
5
  import Text from "../Text";
6
6
  import { useCheckboxGroupContext } from "./context";
7
7
  import { Direction as GroupDirection } from "./context";
8
+ import Touchable from "../Touchable";
8
9
  import { extractStyles } from "../../utilities";
9
10
  export let Direction;
10
11
  (function (Direction) {
@@ -63,7 +64,7 @@ const CheckboxGroupRow = _ref => {
63
64
  textStyles,
64
65
  viewStyles
65
66
  } = extractStyles(style);
66
- return /*#__PURE__*/React.createElement(Pressable, _extends({
67
+ return /*#__PURE__*/React.createElement(Touchable, _extends({
67
68
  onPress: handlePress,
68
69
  style: [styles.mainParent, {
69
70
  flexDirection: direction
@@ -1,10 +1,11 @@
1
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
2
  import * as React from "react";
3
- import { StyleSheet, View, Platform, Pressable } from "react-native";
3
+ import { StyleSheet, View, Platform } from "react-native";
4
4
  import { isString } from "lodash";
5
5
  import { extractStyles } from "../../utilities";
6
6
  import { usePrevious } from "../../hooks";
7
7
  import Text from "../Text";
8
+ import Touchable from "../Touchable";
8
9
  import Checkbox from "./Checkbox";
9
10
  export let Direction;
10
11
  (function (Direction) {
@@ -72,7 +73,7 @@ const CheckboxRow = _ref => {
72
73
  textStyles,
73
74
  viewStyles
74
75
  } = extractStyles(style);
75
- return /*#__PURE__*/React.createElement(Pressable, _extends({
76
+ return /*#__PURE__*/React.createElement(Touchable, _extends({
76
77
  onPress: handlePress,
77
78
  style: [viewStyles, styles.mainParent, {
78
79
  flexDirection: direction
@@ -1,8 +1,9 @@
1
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
2
  import * as React from "react";
3
- import { ActivityIndicator, View, Text, StyleSheet, Pressable } from "react-native";
3
+ import { ActivityIndicator, View, Text, StyleSheet } from "react-native";
4
4
  import color from "color";
5
5
  import Config from "./Config";
6
+ import Touchable from "./Touchable";
6
7
  import Elevation from "./Elevation";
7
8
  import { withTheme } from "../theming";
8
9
  const Button = _ref => {
@@ -17,6 +18,7 @@ const Button = _ref => {
17
18
  children,
18
19
  onPress,
19
20
  elevation = 0,
21
+ style,
20
22
  theme: {
21
23
  colors,
22
24
  disabledOpacity,
@@ -70,19 +72,41 @@ const Button = _ref => {
70
72
  marginRight: -8,
71
73
  width: Config.buttonIconSize
72
74
  }];
75
+ const {
76
+ margin,
77
+ marginEnd,
78
+ marginTop,
79
+ marginLeft,
80
+ marginRight,
81
+ marginBottom,
82
+ marginHorizontal,
83
+ marginVertical,
84
+ ...innerStyles
85
+ } = StyleSheet.flatten(style || {});
86
+ const margins = {
87
+ margin,
88
+ marginEnd,
89
+ marginTop,
90
+ marginLeft,
91
+ marginRight,
92
+ marginBottom,
93
+ marginHorizontal,
94
+ marginVertical
95
+ };
73
96
  return /*#__PURE__*/React.createElement(Elevation, {
74
97
  style: {
75
98
  elevation,
76
- alignSelf: "stretch"
99
+ alignSelf: "stretch",
100
+ ...margins
77
101
  }
78
- }, /*#__PURE__*/React.createElement(Pressable, _extends({}, rest, {
102
+ }, /*#__PURE__*/React.createElement(Touchable, _extends({}, rest, {
79
103
  onPress: onPress,
80
104
  accessibilityState: {
81
105
  disabled
82
106
  },
83
107
  accessibilityRole: "button",
84
108
  disabled: disabled || loading,
85
- style: [styles.button, buttonStyle]
109
+ style: [styles.button, buttonStyle, innerStyles]
86
110
  }), /*#__PURE__*/React.createElement(View, {
87
111
  style: styles.content
88
112
  }, icon && loading !== true ? /*#__PURE__*/React.createElement(View, {
@@ -1,9 +1,10 @@
1
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
2
  import * as React from "react";
3
- import { ActivityIndicator, View, StyleSheet, Pressable } from "react-native";
3
+ import { ActivityIndicator, View, StyleSheet } from "react-native";
4
4
  import color from "color";
5
5
  import Config from "./Config";
6
6
  import Text from "./Text";
7
+ import Touchable from "./Touchable";
7
8
  import Elevation from "./Elevation";
8
9
  import { withTheme } from "../theming";
9
10
  const FAB = _ref => {
@@ -97,7 +98,7 @@ const FAB = _ref => {
97
98
  style: [{
98
99
  elevation
99
100
  }, style]
100
- }, /*#__PURE__*/React.createElement(Pressable, _extends({}, rest, {
101
+ }, /*#__PURE__*/React.createElement(Touchable, _extends({}, rest, {
101
102
  onPress: onPress,
102
103
  accessibilityState: {
103
104
  disabled
@@ -6,24 +6,19 @@ export default function Touchable(_ref) {
6
6
  children,
7
7
  disabled,
8
8
  onPress,
9
- activeOpacity,
10
- disabledOpacity,
11
- delayLongPress,
12
- hitSlop,
13
9
  style,
14
10
  ...props
15
11
  } = _ref;
16
12
  return /*#__PURE__*/React.createElement(Pressable, _extends({
17
- disabled: disabled,
18
13
  onPress: onPress,
19
- delayLongPress: delayLongPress ? delayLongPress : 500,
20
- hitSlop: hitSlop ? hitSlop : 8,
14
+ disabled: disabled,
15
+ hitSlop: 8,
21
16
  style: _ref2 => {
22
17
  let {
23
18
  pressed
24
19
  } = _ref2;
25
20
  return [{
26
- opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1
21
+ opacity: pressed || disabled ? 0.75 : 1
27
22
  }, style];
28
23
  }
29
24
  }, props), children);