@draftbit/core 47.0.0 → 47.0.1-0e56b5.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 (244) hide show
  1. package/lib/commonjs/components/Button.js +31 -22
  2. package/lib/commonjs/components/Checkbox/Checkbox.js +1 -3
  3. package/lib/commonjs/components/DeprecatedCardWrapper.js +2 -2
  4. package/lib/commonjs/components/DeprecatedFAB.js +1 -2
  5. package/lib/commonjs/components/Justification.js +5 -1
  6. package/lib/commonjs/components/Picker/Picker.js +3 -4
  7. package/lib/commonjs/components/Picker/PickerComponent.ios.js +2 -2
  8. package/lib/commonjs/components/Pressable.js +48 -0
  9. package/lib/commonjs/components/ResizeMode.js +5 -1
  10. package/lib/commonjs/components/Touchable.js +27 -11
  11. package/lib/commonjs/mappings/Button.js +29 -10
  12. package/lib/commonjs/mappings/Pressable.js +52 -0
  13. package/lib/module/components/Button.js +25 -16
  14. package/lib/module/components/Checkbox/Checkbox.js +2 -3
  15. package/lib/module/components/DeprecatedCardWrapper.js +2 -2
  16. package/lib/module/components/DeprecatedFAB.js +2 -3
  17. package/lib/module/components/Justification.js +1 -0
  18. package/lib/module/components/Picker/Picker.js +3 -4
  19. package/lib/module/components/Picker/PickerComponent.ios.js +1 -1
  20. package/lib/module/components/Pressable.js +40 -0
  21. package/lib/module/components/ResizeMode.js +1 -0
  22. package/lib/module/components/Touchable.js +25 -10
  23. package/lib/module/mappings/Button.js +30 -11
  24. package/lib/module/mappings/Pressable.js +45 -0
  25. package/lib/typescript/src/components/Button.d.ts +2 -0
  26. package/lib/typescript/src/components/Button.d.ts.map +1 -1
  27. package/lib/typescript/src/components/Checkbox/Checkbox.d.ts +2 -2
  28. package/lib/typescript/src/components/Checkbox/Checkbox.d.ts.map +1 -1
  29. package/lib/typescript/src/components/DeprecatedCardWrapper.d.ts.map +1 -1
  30. package/lib/typescript/src/components/DeprecatedFAB.d.ts +2 -2
  31. package/lib/typescript/src/components/DeprecatedFAB.d.ts.map +1 -1
  32. package/lib/typescript/src/components/Picker/Picker.d.ts.map +1 -1
  33. package/lib/typescript/src/components/Pressable.d.ts +18 -0
  34. package/lib/typescript/src/components/Pressable.d.ts.map +1 -0
  35. package/lib/typescript/src/components/Touchable.d.ts +9 -2
  36. package/lib/typescript/src/components/Touchable.d.ts.map +1 -1
  37. package/lib/typescript/src/mappings/Button.d.ts +113 -4
  38. package/lib/typescript/src/mappings/Button.d.ts.map +1 -1
  39. package/lib/typescript/src/mappings/Pressable.d.ts +76 -0
  40. package/lib/typescript/src/mappings/Pressable.d.ts.map +1 -0
  41. package/package.json +3 -3
  42. package/src/Provider.js +9 -0
  43. package/src/components/Accordion/AccordionGroup.js +44 -0
  44. package/src/components/Accordion/AccordionItem.js +32 -0
  45. package/src/components/Accordion/index.js +2 -0
  46. package/src/components/ActionSheet/ActionSheet.js +45 -0
  47. package/src/components/ActionSheet/ActionSheetCancel.js +6 -0
  48. package/src/components/ActionSheet/ActionSheetItem.js +30 -0
  49. package/src/components/ActionSheet/index.js +3 -0
  50. package/src/components/AnimatedCircularProgress.js +43 -0
  51. package/src/components/AspectRatio.js +18 -0
  52. package/src/components/AvatarEdit.js +30 -0
  53. package/src/components/Banner.js +109 -0
  54. package/src/components/Button.js +118 -0
  55. package/src/components/Button.tsx +49 -18
  56. package/src/components/Card.js +57 -0
  57. package/src/components/CardBlock.js +54 -0
  58. package/src/components/CardContainer.js +69 -0
  59. package/src/components/CardContainerRating.js +79 -0
  60. package/src/components/CardContainerShortImage.js +33 -0
  61. package/src/components/CardInline.js +36 -0
  62. package/src/components/Carousel.js +68 -0
  63. package/src/components/Checkbox/Checkbox.js +62 -0
  64. package/src/components/Checkbox/Checkbox.tsx +5 -7
  65. package/src/components/Checkbox/CheckboxGroup.js +21 -0
  66. package/src/components/Checkbox/CheckboxGroupRow.js +77 -0
  67. package/src/components/Checkbox/CheckboxRow.js +78 -0
  68. package/src/components/Checkbox/context.js +14 -0
  69. package/src/components/Checkbox/index.js +3 -0
  70. package/src/components/CircleImage.js +8 -0
  71. package/src/components/CircularProgress.js +81 -0
  72. package/src/components/Config.js +64 -0
  73. package/src/components/Container.js +43 -0
  74. package/src/components/DatePicker/DatePicker.js +377 -0
  75. package/src/components/DatePicker/DatePickerComponent.js +13 -0
  76. package/src/components/DatePicker/DatePickerComponent.web.js +30 -0
  77. package/src/components/DatePicker/DatePickerComponentType.js +1 -0
  78. package/src/components/DeprecatedCardWrapper.js +18 -0
  79. package/src/components/DeprecatedCardWrapper.tsx +3 -4
  80. package/src/components/DeprecatedFAB.js +114 -0
  81. package/src/components/DeprecatedFAB.tsx +5 -5
  82. package/src/components/Divider.js +13 -0
  83. package/src/components/Elevation.js +20 -0
  84. package/src/components/FAB.js +46 -0
  85. package/src/components/FieldSearchBarFull.js +53 -0
  86. package/src/components/FormRow.js +19 -0
  87. package/src/components/Header.js +44 -0
  88. package/src/components/HeaderLarge.js +7 -0
  89. package/src/components/HeaderMedium.js +7 -0
  90. package/src/components/HeaderOverline.js +7 -0
  91. package/src/components/IconButton.js +35 -0
  92. package/src/components/Image.js +47 -0
  93. package/src/components/Justification.js +1 -0
  94. package/src/components/Layout.js +50 -0
  95. package/src/components/NumberInput.js +49 -0
  96. package/src/components/Picker/Picker.js +266 -0
  97. package/src/components/Picker/Picker.tsx +4 -4
  98. package/src/components/Picker/PickerComponent.android.js +69 -0
  99. package/src/components/Picker/PickerComponent.ios.js +79 -0
  100. package/src/components/Picker/PickerComponent.ios.tsx +1 -1
  101. package/src/components/Picker/PickerComponent.web.js +70 -0
  102. package/src/components/Picker/PickerTypes.js +1 -0
  103. package/src/components/Portal/Portal.js +35 -0
  104. package/src/components/Portal/PortalConsumer.js +27 -0
  105. package/src/components/Portal/PortalHost.js +107 -0
  106. package/src/components/Portal/PortalManager.js +32 -0
  107. package/src/components/Pressable.js +17 -0
  108. package/src/components/Pressable.tsx +67 -0
  109. package/src/components/ProgressBar.js +118 -0
  110. package/src/components/ProgressCircle.js +13 -0
  111. package/src/components/ProgressIndicator.js +27 -0
  112. package/src/components/RadioButton/RadioButton.js +17 -0
  113. package/src/components/RadioButton/RadioButtonFieldGroup.js +17 -0
  114. package/src/components/RadioButton/RadioButtonGroup.js +43 -0
  115. package/src/components/RadioButton/RadioButtonRow.js +76 -0
  116. package/src/components/RadioButton/context.js +14 -0
  117. package/src/components/RadioButton/index.js +4 -0
  118. package/src/components/ResizeMode.js +1 -0
  119. package/src/components/Row.js +48 -0
  120. package/src/components/RowBodyIcon.js +8 -0
  121. package/src/components/RowHeadlineImageCaption.js +12 -0
  122. package/src/components/RowHeadlineImageIcon.js +14 -0
  123. package/src/components/SVG.js +13 -0
  124. package/src/components/ScreenContainer.js +34 -0
  125. package/src/components/Slider.js +63 -0
  126. package/src/components/StarRating.js +50 -0
  127. package/src/components/StepIndicator.js +346 -0
  128. package/src/components/Stepper.js +41 -0
  129. package/src/components/Surface.js +32 -0
  130. package/src/components/Swiper/Swiper.js +29 -0
  131. package/src/components/Swiper/SwiperItem.js +9 -0
  132. package/src/components/Swiper/index.js +2 -0
  133. package/src/components/Switch.js +56 -0
  134. package/src/components/Text.js +33 -0
  135. package/src/components/TextField.js +428 -0
  136. package/src/components/ToggleButton.js +39 -0
  137. package/src/components/Touchable.js +17 -0
  138. package/src/components/Touchable.tsx +42 -11
  139. package/src/components/Typography.js +36 -0
  140. package/src/components/useAuthState.js +31 -0
  141. package/src/constants.js +10 -0
  142. package/src/hooks.js +12 -0
  143. package/src/index.js +52 -0
  144. package/src/interfaces/Icon.js +8 -0
  145. package/src/mappings/Accordion.js +41 -0
  146. package/src/mappings/AccordionItem.js +16 -0
  147. package/src/mappings/ActionSheet.js +13 -0
  148. package/src/mappings/ActionSheetCancel.js +19 -0
  149. package/src/mappings/ActionSheetItem.js +23 -0
  150. package/src/mappings/ActivityIndicator.js +58 -0
  151. package/src/mappings/AudioPlayer.js +57 -0
  152. package/src/mappings/AvatarEdit.js +38 -0
  153. package/src/mappings/Banner.js +32 -0
  154. package/src/mappings/BlurView.js +42 -0
  155. package/src/mappings/Button.js +106 -0
  156. package/src/mappings/Button.ts +31 -10
  157. package/src/mappings/Card.js +52 -0
  158. package/src/mappings/CardBlock.js +123 -0
  159. package/src/mappings/CardContainer.js +104 -0
  160. package/src/mappings/CardContainerRating.js +126 -0
  161. package/src/mappings/CardContainerShortImage.js +120 -0
  162. package/src/mappings/CardInline.js +52 -0
  163. package/src/mappings/Carousel.js +19 -0
  164. package/src/mappings/Checkbox.js +46 -0
  165. package/src/mappings/CheckboxGroup.js +26 -0
  166. package/src/mappings/CheckboxRow.js +61 -0
  167. package/src/mappings/CircleImage.js +25 -0
  168. package/src/mappings/Container.js +30 -0
  169. package/src/mappings/CustomCode.js +8 -0
  170. package/src/mappings/DatePicker.js +176 -0
  171. package/src/mappings/Divider.js +27 -0
  172. package/src/mappings/FAB.js +37 -0
  173. package/src/mappings/Fetch.js +13 -0
  174. package/src/mappings/FieldSearchBarFull.js +50 -0
  175. package/src/mappings/FlashList.js +33 -0
  176. package/src/mappings/FlatList.js +24 -0
  177. package/src/mappings/HeaderLarge.js +29 -0
  178. package/src/mappings/HeaderMedium.js +55 -0
  179. package/src/mappings/HeaderOverline.js +55 -0
  180. package/src/mappings/Icon.js +32 -0
  181. package/src/mappings/IconButton.js +35 -0
  182. package/src/mappings/Image.js +35 -0
  183. package/src/mappings/ImageBackground.js +29 -0
  184. package/src/mappings/KeyboardAvoidingView.js +41 -0
  185. package/src/mappings/KeyboardAwareScrollView.js +50 -0
  186. package/src/mappings/Layout.js +200 -0
  187. package/src/mappings/LinearGradient.js +77 -0
  188. package/src/mappings/MapCallout.js +21 -0
  189. package/src/mappings/MapMarker.js +47 -0
  190. package/src/mappings/MapView.js +139 -0
  191. package/src/mappings/Modal.js +42 -0
  192. package/src/mappings/NumberInput.js +254 -0
  193. package/src/mappings/Picker.js +148 -0
  194. package/src/mappings/Pressable.js +52 -0
  195. package/src/mappings/Pressable.ts +63 -0
  196. package/src/mappings/ProgressBar.js +101 -0
  197. package/src/mappings/ProgressCircle.js +109 -0
  198. package/src/mappings/ProgressIndicator.js +181 -0
  199. package/src/mappings/RadioButton.js +51 -0
  200. package/src/mappings/RadioButtonGroup.js +17 -0
  201. package/src/mappings/RadioButtonRow.js +42 -0
  202. package/src/mappings/RowBodyIcon.js +75 -0
  203. package/src/mappings/RowHeadlineImageCaption.js +167 -0
  204. package/src/mappings/RowHeadlineImageIcon.js +99 -0
  205. package/src/mappings/SVG.js +20 -0
  206. package/src/mappings/SafeAreaView.js +33 -0
  207. package/src/mappings/ScrollView.js +31 -0
  208. package/src/mappings/Slider.js +60 -0
  209. package/src/mappings/StarRating.js +43 -0
  210. package/src/mappings/Stepper.js +32 -0
  211. package/src/mappings/Surface.js +14 -0
  212. package/src/mappings/Swiper.js +60 -0
  213. package/src/mappings/SwiperItem.js +8 -0
  214. package/src/mappings/Switch.js +81 -0
  215. package/src/mappings/Text.js +251 -0
  216. package/src/mappings/TextArea.js +274 -0
  217. package/src/mappings/TextField.js +391 -0
  218. package/src/mappings/TextInput.js +402 -0
  219. package/src/mappings/ToggleButton.js +50 -0
  220. package/src/mappings/Video.js +81 -0
  221. package/src/mappings/View.js +207 -0
  222. package/src/mappings/WebView.js +88 -0
  223. package/src/styles/DarkTheme.js +26 -0
  224. package/src/styles/DefaultTheme.js +111 -0
  225. package/src/styles/fonts.js +62 -0
  226. package/src/styles/overlay.js +60 -0
  227. package/src/styles/shadow.js +51 -0
  228. package/src/theming.js +3 -0
  229. package/src/utilities.js +102 -0
  230. package/lib/commonjs/components/DeprecatedButton.js +0 -151
  231. package/lib/commonjs/components/Touchable.web.js +0 -9
  232. package/lib/commonjs/mappings/Touchable.js +0 -20
  233. package/lib/module/components/DeprecatedButton.js +0 -141
  234. package/lib/module/components/Touchable.web.js +0 -2
  235. package/lib/module/mappings/Touchable.js +0 -13
  236. package/lib/typescript/src/components/DeprecatedButton.d.ts +0 -54
  237. package/lib/typescript/src/components/DeprecatedButton.d.ts.map +0 -1
  238. package/lib/typescript/src/components/Touchable.web.d.ts +0 -3
  239. package/lib/typescript/src/components/Touchable.web.d.ts.map +0 -1
  240. package/lib/typescript/src/mappings/Touchable.d.ts +0 -22
  241. package/lib/typescript/src/mappings/Touchable.d.ts.map +0 -1
  242. package/src/components/DeprecatedButton.tsx +0 -214
  243. package/src/components/Touchable.web.tsx +0 -3
  244. package/src/mappings/Touchable.ts +0 -23
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.ButtonSolid = exports.ButtonOutline = exports.Button = void 0;
7
- var React = _interopRequireWildcard(require("react"));
7
+ var _react = _interopRequireWildcard(require("react"));
8
8
  var _reactNative = require("react-native");
9
9
  var _theming = require("../theming");
10
10
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -22,6 +22,9 @@ function Base(_ref) {
22
22
  icon,
23
23
  title,
24
24
  onPress,
25
+ onLongPress,
26
+ activeOpacity,
27
+ disabledOpacity,
25
28
  loading,
26
29
  disabled,
27
30
  style,
@@ -60,27 +63,36 @@ function Base(_ref) {
60
63
  if (textAlign === "right") {
61
64
  buttonStyles.justifyContent = "flex-end";
62
65
  }
63
- return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
66
+ const getOpacity = (0, _react.useCallback)(pressed => {
67
+ if (disabled) {
68
+ return disabledOpacity;
69
+ } else {
70
+ if (pressed) return activeOpacity;else return 1;
71
+ }
72
+ }, [activeOpacity, disabled, disabledOpacity]);
73
+ const _style = (0, _react.useCallback)(_ref2 => {
74
+ let {
75
+ pressed
76
+ } = _ref2;
77
+ return [buttonStyles, {
78
+ opacity: getOpacity(pressed)
79
+ }];
80
+ }, [getOpacity, buttonStyles]);
81
+ return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, _extends({
64
82
  onPress: onPress,
83
+ onLongPress: onLongPress,
65
84
  disabled: disabled || loading,
66
- style: _ref2 => {
67
- let {
68
- pressed
69
- } = _ref2;
70
- return [styles.base, {
71
- opacity: pressed || disabled ? 0.75 : 1
72
- }, buttonStyles];
73
- }
74
- }, props), loading ? /*#__PURE__*/React.createElement(_reactNative.ActivityIndicator, {
85
+ style: (styles.base, _style)
86
+ }, props), loading ? /*#__PURE__*/_react.default.createElement(_reactNative.ActivityIndicator, {
75
87
  size: "small",
76
88
  color: color,
77
89
  style: styles.loading
78
- }) : null, icon && !loading ? /*#__PURE__*/React.createElement(Icon, {
90
+ }) : null, icon && !loading ? /*#__PURE__*/_react.default.createElement(Icon, {
79
91
  name: icon,
80
92
  color: color,
81
93
  style: styles.icon,
82
94
  size: CONSTANTS.icon
83
- }) : null, /*#__PURE__*/React.createElement(_reactNative.Text, {
95
+ }) : null, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
84
96
  style: titleStyles
85
97
  }, title));
86
98
  }
@@ -90,7 +102,7 @@ const Solid = _ref3 => {
90
102
  theme,
91
103
  ...props
92
104
  } = _ref3;
93
- return /*#__PURE__*/React.createElement(Base, _extends({
105
+ return /*#__PURE__*/_react.default.createElement(Base, _extends({
94
106
  style: [{
95
107
  color: "#FFF",
96
108
  borderRadius: theme.roundness,
@@ -108,7 +120,7 @@ const Outline = _ref4 => {
108
120
  theme,
109
121
  ...props
110
122
  } = _ref4;
111
- return /*#__PURE__*/React.createElement(Base, _extends({
123
+ return /*#__PURE__*/_react.default.createElement(Base, _extends({
112
124
  style: [styles.outline, {
113
125
  borderRadius: theme.roundness,
114
126
  borderColor: theme.colors.primary,
@@ -124,8 +136,10 @@ const styles = _reactNative.StyleSheet.create({
124
136
  flexDirection: "row",
125
137
  alignItems: "center",
126
138
  justifyContent: "center",
127
- minHeight: CONSTANTS.baseHeight,
128
- paddingHorizontal: 12,
139
+ paddingTop: CONSTANTS.padding,
140
+ paddingLeft: CONSTANTS.padding,
141
+ paddingRight: CONSTANTS.padding,
142
+ paddingBottom: CONSTANTS.padding,
129
143
  fontFamily: "System",
130
144
  fontWeight: "700",
131
145
  ..._reactNative.Platform.select({
@@ -139,11 +153,6 @@ const styles = _reactNative.StyleSheet.create({
139
153
  backgroundColor: "transparent",
140
154
  borderWidth: 1
141
155
  },
142
- bare: {
143
- backgroundColor: "transparent",
144
- padding: 0,
145
- minHeight: undefined
146
- },
147
156
  loading: {
148
157
  marginRight: 6
149
158
  },
@@ -7,9 +7,7 @@ exports.default = void 0;
7
7
  var React = _interopRequireWildcard(require("react"));
8
8
  var _reactNative = require("react-native");
9
9
  var _theming = require("../../theming");
10
- var _Touchable = _interopRequireDefault(require("../Touchable"));
11
10
  var _hooks = require("../../hooks");
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
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); }
14
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; }
15
13
  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); }
@@ -60,7 +58,7 @@ const Checkbox = _ref => {
60
58
  onUncheck === null || onUncheck === void 0 ? void 0 : onUncheck();
61
59
  }
62
60
  };
63
- return /*#__PURE__*/React.createElement(_Touchable.default, _extends({}, rest, {
61
+ return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({}, rest, {
64
62
  onPress: handlePress,
65
63
  disabled: disabled,
66
64
  accessibilityState: {
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _theming = require("../theming");
9
- var _Touchable = _interopRequireDefault(require("./Touchable"));
9
+ var _reactNative = require("react-native");
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
  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); }
12
12
  const getWidth = numColumns => {
@@ -28,7 +28,7 @@ const Card = _ref => {
28
28
  ...rest
29
29
  } = _ref;
30
30
  const width = getWidth(numColumns);
31
- return /*#__PURE__*/_react.default.createElement(_Touchable.default, _extends({
31
+ return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, _extends({
32
32
  disabled: !onPress,
33
33
  onPress: onPress,
34
34
  style: [style, {
@@ -9,7 +9,6 @@ var _reactNative = require("react-native");
9
9
  var _color = _interopRequireDefault(require("color"));
10
10
  var _Config = _interopRequireDefault(require("./Config"));
11
11
  var _Text = _interopRequireDefault(require("./Text"));
12
- var _Touchable = _interopRequireDefault(require("./Touchable"));
13
12
  var _Elevation = _interopRequireDefault(require("./Elevation"));
14
13
  var _theming = require("../theming");
15
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -107,7 +106,7 @@ const FAB = _ref => {
107
106
  style: [{
108
107
  elevation
109
108
  }, style]
110
- }, /*#__PURE__*/React.createElement(_Touchable.default, _extends({}, rest, {
109
+ }, /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({}, rest, {
111
110
  onPress: onPress,
112
111
  accessibilityState: {
113
112
  disabled
@@ -1 +1,5 @@
1
- "use strict";
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -11,8 +11,7 @@ var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
11
11
  var _picker = require("@react-native-picker/picker");
12
12
  var _theming = require("../../theming");
13
13
  var _Portal = _interopRequireDefault(require("../Portal/Portal"));
14
- var _DeprecatedButton = _interopRequireDefault(require("../DeprecatedButton"));
15
- var _Touchable = _interopRequireDefault(require("../Touchable"));
14
+ var _Button = require("../Button");
16
15
  var _utilities = require("../../utilities");
17
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
17
  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); }
@@ -207,7 +206,7 @@ const Picker = _ref => {
207
206
  /* marginsContainer */
208
207
  React.createElement(_reactNative.View, {
209
208
  style: [styles.marginsContainer, marginStyles]
210
- }, /*#__PURE__*/React.createElement(_Touchable.default, {
209
+ }, /*#__PURE__*/React.createElement(_reactNative.Pressable, {
211
210
  disabled: disabled,
212
211
  onPress: togglePickerVisible,
213
212
  style: styles.touchableContainer
@@ -226,7 +225,7 @@ const Picker = _ref => {
226
225
  }]
227
226
  }, /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaView, {
228
227
  style: styles.iosSafeArea
229
- }, /*#__PURE__*/React.createElement(_DeprecatedButton.default, {
228
+ }, /*#__PURE__*/React.createElement(_Button.Button, {
230
229
  Icon: Icon,
231
230
  type: "text",
232
231
  onPress: togglePickerVisible,
@@ -11,7 +11,7 @@ var _lodash = _interopRequireDefault(require("lodash.omit"));
11
11
  var _picker = require("@react-native-picker/picker");
12
12
  var _theming = require("../../theming");
13
13
  var _Portal = _interopRequireDefault(require("../Portal/Portal"));
14
- var _DeprecatedButton = _interopRequireDefault(require("../DeprecatedButton"));
14
+ var _Button = require("../Button");
15
15
  var _TextField = _interopRequireDefault(require("../TextField"));
16
16
  var _Touchable = _interopRequireDefault(require("../Touchable"));
17
17
  var _utilities = require("../../utilities");
@@ -99,7 +99,7 @@ const Picker = _ref => {
99
99
  }]
100
100
  }, /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaView, {
101
101
  style: styles.pickerContainer
102
- }, /*#__PURE__*/React.createElement(_DeprecatedButton.default, {
102
+ }, /*#__PURE__*/React.createElement(_Button.Button, {
103
103
  Icon: Icon,
104
104
  type: "text",
105
105
  onPress: toggleVisibility,
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = Pressable;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
10
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
11
+ 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); }
12
+ function Pressable(_ref) {
13
+ let {
14
+ children,
15
+ disabled,
16
+ onPress,
17
+ onLongPress,
18
+ hitSlop,
19
+ delayLongPress,
20
+ activeOpacity,
21
+ disabledOpacity,
22
+ style,
23
+ ...props
24
+ } = _ref;
25
+ const getOpacity = (0, _react.useCallback)(pressed => {
26
+ if (disabled) {
27
+ return disabledOpacity;
28
+ } else {
29
+ if (pressed) return activeOpacity;else return 1;
30
+ }
31
+ }, [activeOpacity, disabled, disabledOpacity]);
32
+ const _style = (0, _react.useCallback)(_ref2 => {
33
+ let {
34
+ pressed
35
+ } = _ref2;
36
+ return [style, {
37
+ opacity: getOpacity(pressed)
38
+ }];
39
+ }, [getOpacity, style]);
40
+ return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, _extends({
41
+ onPress: onPress,
42
+ onLongPress: onLongPress,
43
+ disabled: disabled,
44
+ delayLongPress: delayLongPress ? delayLongPress : 500,
45
+ hitSlop: hitSlop ? hitSlop : 8,
46
+ style: _style
47
+ }, props), children);
48
+ }
@@ -1 +1,5 @@
1
- "use strict";
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -4,29 +4,45 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = Touchable;
7
- var _react = _interopRequireDefault(require("react"));
7
+ var _react = _interopRequireWildcard(require("react"));
8
8
  var _reactNative = require("react-native");
9
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
10
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
10
11
  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); }
11
12
  function Touchable(_ref) {
12
13
  let {
13
14
  children,
14
15
  disabled,
15
16
  onPress,
17
+ onLongPress,
18
+ hitSlop,
19
+ delayLongPress,
20
+ activeOpacity,
21
+ disabledOpacity,
16
22
  style,
17
23
  ...props
18
24
  } = _ref;
25
+ const getOpacity = (0, _react.useCallback)(pressed => {
26
+ if (disabled) {
27
+ return disabledOpacity;
28
+ } else {
29
+ if (pressed) return activeOpacity;else return 1;
30
+ }
31
+ }, [activeOpacity, disabled, disabledOpacity]);
32
+ const _style = (0, _react.useCallback)(_ref2 => {
33
+ let {
34
+ pressed
35
+ } = _ref2;
36
+ return [style, {
37
+ opacity: getOpacity(pressed)
38
+ }];
39
+ }, [getOpacity, style]);
19
40
  return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, _extends({
20
41
  onPress: onPress,
42
+ onLongPress: onLongPress,
21
43
  disabled: disabled,
22
- hitSlop: 8,
23
- style: _ref2 => {
24
- let {
25
- pressed
26
- } = _ref2;
27
- return [{
28
- opacity: pressed || disabled ? 0.75 : 1
29
- }, style];
30
- }
44
+ delayLongPress: delayLongPress ? delayLongPress : 500,
45
+ hitSlop: hitSlop ? hitSlop : 8,
46
+ style: _style
31
47
  }, props), children);
32
48
  }
@@ -5,9 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.SEED_DATA = void 0;
7
7
  var _types = require("@draftbit/types");
8
- const SEED_DATA_TRIGGERS = [_types.Triggers.OnPress];
8
+ const SEED_DATA_TRIGGERS = [_types.Triggers.OnPress, _types.Triggers.OnLongPress];
9
9
  const SEED_DATA_PROPS = {
10
10
  onPress: (0, _types.createActionProp)(),
11
+ onLongPress: (0, _types.createActionProp)(),
11
12
  icon: (0, _types.createIconProp)({
12
13
  defaultValue: null,
13
14
  required: false
@@ -18,12 +19,27 @@ const SEED_DATA_PROPS = {
18
19
  defaultValue: "Get Started"
19
20
  }),
20
21
  disabled: (0, _types.createDisabledProp)(),
21
- loading: (0, _types.createLoadingProp)()
22
- };
23
- const LAYOUT = {
24
- backgroundColor: "transparent",
25
- borderRadius: 8,
26
- fontFamily: "system-700"
22
+ loading: (0, _types.createLoadingProp)(),
23
+ activeOpacity: (0, _types.createStaticNumberProp)({
24
+ label: "Active Opacity",
25
+ description: "Opacity of the button when active.",
26
+ required: false
27
+ }),
28
+ disabledOpacity: (0, _types.createStaticNumberProp)({
29
+ label: "Disabled Opacity",
30
+ description: "Opacity of the button when disabled.",
31
+ required: false
32
+ }),
33
+ delayLongPress: (0, _types.createStaticNumberProp)({
34
+ label: "Delay Long Press",
35
+ description: "Duration (in milliseconds) from onPressIn before onLongPress is called.",
36
+ required: false
37
+ }),
38
+ hitSlop: (0, _types.createStaticNumberProp)({
39
+ label: "Hit Slop",
40
+ description: "Sets additional distance outside of element in which a press can be detected",
41
+ required: false
42
+ })
27
43
  };
28
44
  const SEED_DATA = [{
29
45
  name: "Button Outline",
@@ -31,8 +47,9 @@ const SEED_DATA = [{
31
47
  category: _types.COMPONENT_TYPES.deprecated,
32
48
  stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.Background, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
33
49
  layout: {
34
- ...LAYOUT,
35
50
  backgroundColor: "transparent",
51
+ borderRadius: 8,
52
+ fontFamily: "system-700",
36
53
  borderWidth: 1,
37
54
  textAlign: "center"
38
55
  },
@@ -44,7 +61,8 @@ const SEED_DATA = [{
44
61
  category: _types.COMPONENT_TYPES.deprecated,
45
62
  stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.Background, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
46
63
  layout: {
47
- ...LAYOUT,
64
+ borderRadius: 8,
65
+ fontFamily: "system-700",
48
66
  backgroundColor: "primary",
49
67
  textAlign: "center"
50
68
  },
@@ -56,7 +74,8 @@ const SEED_DATA = [{
56
74
  category: _types.COMPONENT_TYPES.button,
57
75
  stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.Background, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
58
76
  layout: {
59
- ...LAYOUT,
77
+ borderRadius: 8,
78
+ fontFamily: "system-700",
60
79
  backgroundColor: "primary",
61
80
  textAlign: "center"
62
81
  },
@@ -0,0 +1,52 @@
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 SEED_DATA_PROPS = {
9
+ stylesPanelSections: [_types.StylesPanelSections.Size, _types.StylesPanelSections.Margins, _types.StylesPanelSections.Borders],
10
+ layout: {},
11
+ triggers: [_types.Triggers.OnPress, _types.Triggers.OnLongPress],
12
+ props: {
13
+ onPress: (0, _types.createActionProp)(),
14
+ onLongPress: (0, _types.createActionProp)(),
15
+ activeOpacity: (0, _types.createNumberProp)({
16
+ label: "Active Opacity",
17
+ description: "The opacity when the button is pressed.",
18
+ defaultValue: 0.8,
19
+ group: _types.GROUPS.basic
20
+ }),
21
+ disabledOpacity: (0, _types.createNumberProp)({
22
+ label: "Disabled Opacity",
23
+ description: "The opacity when the button is disabled.",
24
+ defaultValue: 0.8,
25
+ group: _types.GROUPS.basic
26
+ }),
27
+ delayLongPress: (0, _types.createNumberProp)({
28
+ label: "Delay Long Press",
29
+ description: "Duration (in milliseconds) from onPressIn before onLongPress is called.",
30
+ group: _types.GROUPS.basic
31
+ }),
32
+ hitSlop: (0, _types.createNumberProp)({
33
+ label: "Hit Slop",
34
+ description: "Sets additional distance outside of element in which a press can be detected.",
35
+ group: _types.GROUPS.basic
36
+ })
37
+ }
38
+ };
39
+ const SEED_DATA = [{
40
+ name: "Touchable",
41
+ tag: "Touchable",
42
+ description: "An interactive view with no styles",
43
+ category: _types.COMPONENT_TYPES.button,
44
+ ...SEED_DATA_PROPS
45
+ }, {
46
+ name: "Pressable",
47
+ tag: "Pressable",
48
+ description: "An interactive view with no styles",
49
+ category: _types.COMPONENT_TYPES.deprecated,
50
+ ...SEED_DATA_PROPS
51
+ }];
52
+ exports.SEED_DATA = SEED_DATA;
@@ -1,5 +1,5 @@
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
- import * as React from "react";
2
+ import React, { useCallback } from "react";
3
3
  import { Text, Pressable, Platform, StyleSheet, ActivityIndicator } from "react-native";
4
4
  import { withTheme } from "../theming";
5
5
  const CONSTANTS = {
@@ -14,6 +14,9 @@ function Base(_ref) {
14
14
  icon,
15
15
  title,
16
16
  onPress,
17
+ onLongPress,
18
+ activeOpacity,
19
+ disabledOpacity,
17
20
  loading,
18
21
  disabled,
19
22
  style,
@@ -52,17 +55,26 @@ function Base(_ref) {
52
55
  if (textAlign === "right") {
53
56
  buttonStyles.justifyContent = "flex-end";
54
57
  }
58
+ const getOpacity = useCallback(pressed => {
59
+ if (disabled) {
60
+ return disabledOpacity;
61
+ } else {
62
+ if (pressed) return activeOpacity;else return 1;
63
+ }
64
+ }, [activeOpacity, disabled, disabledOpacity]);
65
+ const _style = useCallback(_ref2 => {
66
+ let {
67
+ pressed
68
+ } = _ref2;
69
+ return [buttonStyles, {
70
+ opacity: getOpacity(pressed)
71
+ }];
72
+ }, [getOpacity, buttonStyles]);
55
73
  return /*#__PURE__*/React.createElement(Pressable, _extends({
56
74
  onPress: onPress,
75
+ onLongPress: onLongPress,
57
76
  disabled: disabled || loading,
58
- style: _ref2 => {
59
- let {
60
- pressed
61
- } = _ref2;
62
- return [styles.base, {
63
- opacity: pressed || disabled ? 0.75 : 1
64
- }, buttonStyles];
65
- }
77
+ style: (styles.base, _style)
66
78
  }, props), loading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
67
79
  size: "small",
68
80
  color: color,
@@ -116,8 +128,10 @@ const styles = StyleSheet.create({
116
128
  flexDirection: "row",
117
129
  alignItems: "center",
118
130
  justifyContent: "center",
119
- minHeight: CONSTANTS.baseHeight,
120
- paddingHorizontal: 12,
131
+ paddingTop: CONSTANTS.padding,
132
+ paddingLeft: CONSTANTS.padding,
133
+ paddingRight: CONSTANTS.padding,
134
+ paddingBottom: CONSTANTS.padding,
121
135
  fontFamily: "System",
122
136
  fontWeight: "700",
123
137
  ...Platform.select({
@@ -131,11 +145,6 @@ const styles = StyleSheet.create({
131
145
  backgroundColor: "transparent",
132
146
  borderWidth: 1
133
147
  },
134
- bare: {
135
- backgroundColor: "transparent",
136
- padding: 0,
137
- minHeight: undefined
138
- },
139
148
  loading: {
140
149
  marginRight: 6
141
150
  },
@@ -1,8 +1,7 @@
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 } from "react-native";
3
+ import { View, StyleSheet, Pressable } from "react-native";
4
4
  import { useTheme } from "../../theming";
5
- import Touchable from "../Touchable";
6
5
  import { usePrevious } from "../../hooks";
7
6
  const Checkbox = _ref => {
8
7
  let {
@@ -51,7 +50,7 @@ const Checkbox = _ref => {
51
50
  onUncheck === null || onUncheck === void 0 ? void 0 : onUncheck();
52
51
  }
53
52
  };
54
- return /*#__PURE__*/React.createElement(Touchable, _extends({}, rest, {
53
+ return /*#__PURE__*/React.createElement(Pressable, _extends({}, rest, {
55
54
  onPress: handlePress,
56
55
  disabled: disabled,
57
56
  accessibilityState: {
@@ -1,7 +1,7 @@
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 React from "react";
3
3
  import { withTheme } from "../theming";
4
- import Touchable from "./Touchable";
4
+ import { Pressable } from "react-native";
5
5
  const getWidth = numColumns => {
6
6
  switch (numColumns) {
7
7
  case 1:
@@ -21,7 +21,7 @@ const Card = _ref => {
21
21
  ...rest
22
22
  } = _ref;
23
23
  const width = getWidth(numColumns);
24
- return /*#__PURE__*/React.createElement(Touchable, _extends({
24
+ return /*#__PURE__*/React.createElement(Pressable, _extends({
25
25
  disabled: !onPress,
26
26
  onPress: onPress,
27
27
  style: [style, {
@@ -1,10 +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, StyleSheet } from "react-native";
3
+ import { ActivityIndicator, View, StyleSheet, Pressable } 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";
8
7
  import Elevation from "./Elevation";
9
8
  import { withTheme } from "../theming";
10
9
  const FAB = _ref => {
@@ -98,7 +97,7 @@ const FAB = _ref => {
98
97
  style: [{
99
98
  elevation
100
99
  }, style]
101
- }, /*#__PURE__*/React.createElement(Touchable, _extends({}, rest, {
100
+ }, /*#__PURE__*/React.createElement(Pressable, _extends({}, rest, {
102
101
  onPress: onPress,
103
102
  accessibilityState: {
104
103
  disabled
@@ -0,0 +1 @@
1
+ export {};
@@ -1,12 +1,11 @@
1
1
  import * as React from "react";
2
- import { View, StyleSheet, Text, Platform, Dimensions } from "react-native";
2
+ import { View, StyleSheet, Text, Platform, Dimensions, Pressable } from "react-native";
3
3
  import { omit, pickBy, identity, isObject } from "lodash";
4
4
  import { SafeAreaView } from "react-native-safe-area-context";
5
5
  import { Picker as NativePicker } from "@react-native-picker/picker";
6
6
  import { withTheme } from "../../theming";
7
7
  import Portal from "../Portal/Portal";
8
- import Button from "../DeprecatedButton";
9
- import Touchable from "../Touchable";
8
+ import { Button } from "../Button";
10
9
  import { extractStyles, extractBorderAndMarginStyles, borderStyleNames, marginStyleNames } from "../../utilities";
11
10
  function normalizeOptions(options) {
12
11
  if (options.length === 0) {
@@ -198,7 +197,7 @@ const Picker = _ref => {
198
197
  /* marginsContainer */
199
198
  React.createElement(View, {
200
199
  style: [styles.marginsContainer, marginStyles]
201
- }, /*#__PURE__*/React.createElement(Touchable, {
200
+ }, /*#__PURE__*/React.createElement(Pressable, {
202
201
  disabled: disabled,
203
202
  onPress: togglePickerVisible,
204
203
  style: styles.touchableContainer
@@ -6,7 +6,7 @@ import omit from "lodash.omit";
6
6
  import { Picker as NativePicker } from "@react-native-picker/picker";
7
7
  import { withTheme } from "../../theming";
8
8
  import Portal from "../Portal/Portal";
9
- import Button from "../DeprecatedButton";
9
+ import { Button } from "../Button";
10
10
  import TextField from "../TextField";
11
11
  import Touchable from "../Touchable";
12
12
  import { extractStyles } from "../../utilities";