@draftbit/core 46.7.4 → 46.7.6-0a91fd.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 (230) hide show
  1. package/lib/commonjs/components/Button.js +2 -2
  2. package/lib/commonjs/components/Divider.js +14 -1
  3. package/lib/commonjs/components/IconButton.js +4 -2
  4. package/lib/commonjs/components/Justification.js +5 -1
  5. package/lib/commonjs/components/NumberInput.js +1 -1
  6. package/lib/commonjs/components/Pressable.js +2 -2
  7. package/lib/commonjs/components/ResizeMode.js +5 -1
  8. package/lib/commonjs/components/Touchable.js +2 -2
  9. package/lib/commonjs/constants.js +1 -1
  10. package/lib/commonjs/mappings/Button.js +2 -2
  11. package/lib/commonjs/mappings/FieldSearchBarFull.js +3 -1
  12. package/lib/commonjs/mappings/FlashList.js +28 -0
  13. package/lib/commonjs/mappings/FlatList.js +14 -0
  14. package/lib/commonjs/mappings/IconButton.js +4 -6
  15. package/lib/commonjs/mappings/MapView.js +3 -1
  16. package/lib/commonjs/mappings/ScrollView.js +7 -1
  17. package/lib/commonjs/mappings/Touchable.js +9 -2
  18. package/lib/module/components/Button.js +2 -2
  19. package/lib/module/components/IconButton.js +4 -2
  20. package/lib/module/components/Justification.js +1 -0
  21. package/lib/module/components/NumberInput.js +1 -1
  22. package/lib/module/components/Pressable.js +2 -2
  23. package/lib/module/components/ResizeMode.js +1 -0
  24. package/lib/module/components/Touchable.js +2 -2
  25. package/lib/module/mappings/Button.js +2 -2
  26. package/lib/module/mappings/FlashList.js +29 -1
  27. package/lib/module/mappings/FlatList.js +15 -1
  28. package/lib/module/mappings/IconButton.js +5 -7
  29. package/lib/module/mappings/MapView.js +3 -1
  30. package/lib/module/mappings/ScrollView.js +8 -2
  31. package/lib/module/mappings/Touchable.js +10 -3
  32. package/lib/typescript/src/components/IconButton.d.ts +2 -0
  33. package/lib/typescript/src/components/IconButton.d.ts.map +1 -1
  34. package/lib/typescript/src/components/Pressable.d.ts.map +1 -1
  35. package/lib/typescript/src/components/Touchable.d.ts.map +1 -1
  36. package/lib/typescript/src/mappings/FlashList.d.ts +60 -0
  37. package/lib/typescript/src/mappings/FlashList.d.ts.map +1 -1
  38. package/lib/typescript/src/mappings/FlatList.d.ts +30 -0
  39. package/lib/typescript/src/mappings/FlatList.d.ts.map +1 -1
  40. package/lib/typescript/src/mappings/IconButton.d.ts +20 -10
  41. package/lib/typescript/src/mappings/IconButton.d.ts.map +1 -1
  42. package/lib/typescript/src/mappings/MapView.d.ts +2 -0
  43. package/lib/typescript/src/mappings/MapView.d.ts.map +1 -1
  44. package/lib/typescript/src/mappings/ScrollView.d.ts +21 -0
  45. package/lib/typescript/src/mappings/ScrollView.d.ts.map +1 -1
  46. package/lib/typescript/src/mappings/Touchable.d.ts +20 -0
  47. package/lib/typescript/src/mappings/Touchable.d.ts.map +1 -1
  48. package/package.json +3 -3
  49. package/src/Provider.js +9 -0
  50. package/src/components/Accordion/AccordionGroup.js +44 -0
  51. package/src/components/Accordion/AccordionItem.js +32 -0
  52. package/src/components/Accordion/index.js +2 -0
  53. package/src/components/ActionSheet/ActionSheet.js +45 -0
  54. package/src/components/ActionSheet/ActionSheetCancel.js +6 -0
  55. package/src/components/ActionSheet/ActionSheetItem.js +30 -0
  56. package/src/components/ActionSheet/index.js +3 -0
  57. package/src/components/AnimatedCircularProgress.js +43 -0
  58. package/src/components/AspectRatio.js +18 -0
  59. package/src/components/AvatarEdit.js +30 -0
  60. package/src/components/Banner.js +109 -0
  61. package/src/components/Button.js +114 -0
  62. package/src/components/Button.tsx +2 -2
  63. package/src/components/Card.js +57 -0
  64. package/src/components/Checkbox/Checkbox.js +62 -0
  65. package/src/components/Checkbox/CheckboxGroup.js +21 -0
  66. package/src/components/Checkbox/CheckboxGroupRow.js +76 -0
  67. package/src/components/Checkbox/CheckboxRow.js +77 -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/DeprecatedButton.js +83 -0
  79. package/src/components/DeprecatedCardWrapper.js +18 -0
  80. package/src/components/DeprecatedFAB.js +114 -0
  81. package/src/components/Divider.js +13 -0
  82. package/src/components/Elevation.js +20 -0
  83. package/src/components/FAB.js +46 -0
  84. package/src/components/FieldSearchBarFull.js +53 -0
  85. package/src/components/FormRow.js +19 -0
  86. package/src/components/IconButton.js +35 -0
  87. package/src/components/IconButton.tsx +6 -2
  88. package/src/components/Image.js +47 -0
  89. package/src/components/Justification.js +1 -0
  90. package/src/components/Layout.js +50 -0
  91. package/src/components/NumberInput.js +49 -0
  92. package/src/components/NumberInput.tsx +1 -1
  93. package/src/components/Picker/Picker.js +267 -0
  94. package/src/components/Picker/PickerComponent.android.js +69 -0
  95. package/src/components/Picker/PickerComponent.ios.js +79 -0
  96. package/src/components/Picker/PickerComponent.web.js +70 -0
  97. package/src/components/Picker/PickerTypes.js +1 -0
  98. package/src/components/Portal/Portal.js +35 -0
  99. package/src/components/Portal/PortalConsumer.js +27 -0
  100. package/src/components/Portal/PortalHost.js +107 -0
  101. package/src/components/Portal/PortalManager.js +32 -0
  102. package/src/components/Pressable.js +12 -0
  103. package/src/components/Pressable.tsx +2 -2
  104. package/src/components/ProgressBar.js +118 -0
  105. package/src/components/ProgressCircle.js +13 -0
  106. package/src/components/ProgressIndicator.js +27 -0
  107. package/src/components/RadioButton/RadioButton.js +17 -0
  108. package/src/components/RadioButton/RadioButtonFieldGroup.js +17 -0
  109. package/src/components/RadioButton/RadioButtonGroup.js +43 -0
  110. package/src/components/RadioButton/RadioButtonRow.js +76 -0
  111. package/src/components/RadioButton/context.js +14 -0
  112. package/src/components/RadioButton/index.js +4 -0
  113. package/src/components/ResizeMode.js +1 -0
  114. package/src/components/Row.js +48 -0
  115. package/src/components/RowBodyIcon.js +8 -0
  116. package/src/components/RowHeadlineImageCaption.js +12 -0
  117. package/src/components/RowHeadlineImageIcon.js +14 -0
  118. package/src/components/SVG.js +13 -0
  119. package/src/components/ScreenContainer.js +34 -0
  120. package/src/components/Slider.js +63 -0
  121. package/src/components/StarRating.js +50 -0
  122. package/src/components/StepIndicator.js +346 -0
  123. package/src/components/Stepper.js +41 -0
  124. package/src/components/Surface.js +32 -0
  125. package/src/components/Swiper/Swiper.js +29 -0
  126. package/src/components/Swiper/SwiperItem.js +9 -0
  127. package/src/components/Swiper/index.js +2 -0
  128. package/src/components/Switch.js +56 -0
  129. package/src/components/Text.js +33 -0
  130. package/src/components/TextField.js +428 -0
  131. package/src/components/ToggleButton.js +39 -0
  132. package/src/components/Touchable.js +12 -0
  133. package/src/components/Touchable.tsx +2 -2
  134. package/src/components/Touchable.web.js +2 -0
  135. package/src/components/Typography.js +36 -0
  136. package/src/components/useAuthState.js +31 -0
  137. package/src/constants.js +10 -0
  138. package/src/hooks.js +12 -0
  139. package/src/index.js +45 -0
  140. package/src/interfaces/Icon.js +8 -0
  141. package/src/mappings/Accordion.js +41 -0
  142. package/src/mappings/AccordionItem.js +16 -0
  143. package/src/mappings/ActionSheet.js +13 -0
  144. package/src/mappings/ActionSheetCancel.js +19 -0
  145. package/src/mappings/ActionSheetItem.js +23 -0
  146. package/src/mappings/ActivityIndicator.js +58 -0
  147. package/src/mappings/AudioPlayer.js +57 -0
  148. package/src/mappings/AvatarEdit.js +38 -0
  149. package/src/mappings/Banner.js +32 -0
  150. package/src/mappings/BlurView.js +42 -0
  151. package/src/mappings/Button.js +116 -0
  152. package/src/mappings/Button.ts +2 -2
  153. package/src/mappings/Card.js +52 -0
  154. package/src/mappings/CardBlock.js +123 -0
  155. package/src/mappings/CardContainer.js +104 -0
  156. package/src/mappings/CardContainerRating.js +126 -0
  157. package/src/mappings/CardContainerShortImage.js +120 -0
  158. package/src/mappings/CardInline.js +52 -0
  159. package/src/mappings/Carousel.js +19 -0
  160. package/src/mappings/Checkbox.js +46 -0
  161. package/src/mappings/CheckboxGroup.js +26 -0
  162. package/src/mappings/CheckboxRow.js +61 -0
  163. package/src/mappings/CircleImage.js +25 -0
  164. package/src/mappings/Container.js +30 -0
  165. package/src/mappings/CustomCode.js +8 -0
  166. package/src/mappings/DatePicker.js +176 -0
  167. package/src/mappings/Divider.js +27 -0
  168. package/src/mappings/FAB.js +37 -0
  169. package/src/mappings/Fetch.js +13 -0
  170. package/src/mappings/FieldSearchBarFull.js +50 -0
  171. package/src/mappings/FlashList.js +113 -0
  172. package/src/mappings/FlashList.ts +33 -0
  173. package/src/mappings/FlatList.js +51 -0
  174. package/src/mappings/FlatList.ts +17 -0
  175. package/src/mappings/HeaderLarge.js +29 -0
  176. package/src/mappings/HeaderMedium.js +55 -0
  177. package/src/mappings/HeaderOverline.js +55 -0
  178. package/src/mappings/Icon.js +32 -0
  179. package/src/mappings/IconButton.js +33 -0
  180. package/src/mappings/IconButton.ts +5 -7
  181. package/src/mappings/Image.js +35 -0
  182. package/src/mappings/ImageBackground.js +29 -0
  183. package/src/mappings/KeyboardAvoidingView.js +41 -0
  184. package/src/mappings/KeyboardAwareScrollView.js +50 -0
  185. package/src/mappings/Layout.js +200 -0
  186. package/src/mappings/LinearGradient.js +77 -0
  187. package/src/mappings/MapCallout.js +21 -0
  188. package/src/mappings/MapMarker.js +47 -0
  189. package/src/mappings/MapView.js +141 -0
  190. package/src/mappings/MapView.ts +2 -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/ProgressBar.js +101 -0
  195. package/src/mappings/ProgressCircle.js +109 -0
  196. package/src/mappings/ProgressIndicator.js +181 -0
  197. package/src/mappings/RadioButton.js +51 -0
  198. package/src/mappings/RadioButtonGroup.js +17 -0
  199. package/src/mappings/RadioButtonRow.js +42 -0
  200. package/src/mappings/RowBodyIcon.js +75 -0
  201. package/src/mappings/RowHeadlineImageCaption.js +167 -0
  202. package/src/mappings/RowHeadlineImageIcon.js +99 -0
  203. package/src/mappings/SVG.js +20 -0
  204. package/src/mappings/SafeAreaView.js +33 -0
  205. package/src/mappings/ScrollView.js +37 -0
  206. package/src/mappings/ScrollView.ts +10 -1
  207. package/src/mappings/Slider.js +60 -0
  208. package/src/mappings/StarRating.js +43 -0
  209. package/src/mappings/Stepper.js +32 -0
  210. package/src/mappings/Surface.js +14 -0
  211. package/src/mappings/Swiper.js +62 -0
  212. package/src/mappings/SwiperItem.js +8 -0
  213. package/src/mappings/Switch.js +81 -0
  214. package/src/mappings/Text.js +251 -0
  215. package/src/mappings/TextArea.js +274 -0
  216. package/src/mappings/TextField.js +391 -0
  217. package/src/mappings/TextInput.js +402 -0
  218. package/src/mappings/ToggleButton.js +50 -0
  219. package/src/mappings/Touchable.js +67 -0
  220. package/src/mappings/Touchable.ts +12 -2
  221. package/src/mappings/Video.js +81 -0
  222. package/src/mappings/View.js +207 -0
  223. package/src/mappings/WebView.js +88 -0
  224. package/src/styles/DarkTheme.js +26 -0
  225. package/src/styles/DefaultTheme.js +111 -0
  226. package/src/styles/fonts.js +62 -0
  227. package/src/styles/overlay.js +60 -0
  228. package/src/styles/shadow.js +51 -0
  229. package/src/theming.js +3 -0
  230. package/src/utilities.js +102 -0
@@ -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 {
@@ -9,7 +9,6 @@ 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); }
11
11
  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; }
12
- 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); }
13
12
  const Divider = _ref => {
14
13
  let {
15
14
  style,
@@ -19,6 +18,20 @@ const Divider = _ref => {
19
18
  },
20
19
  ...rest
21
20
  } = _ref;
21
+ return /*#__PURE__*/React.createElement(_reactNative.View, {
22
+ style: [{
23
+ backgroundColor: color || colors.divider,
24
+ height: _reactNative.StyleSheet.hairlineWidth
25
+ }, style],
26
+ ...rest
27
+ });
28
+ };
29
+ var _default = (0, _theming.withTheme)(Divider);
30
+ exports.default = _default;eme: {
31
+ colors
32
+ },
33
+ ...rest
34
+ } = _ref;
22
35
  return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
23
36
  style: [{
24
37
  backgroundColor: color || colors.divider,
@@ -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",
@@ -1 +1,5 @@
1
- "use strict";
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -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,
@@ -1 +1,5 @@
1
- "use strict";
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -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,
@@ -12,4 +12,4 @@ const APPROX_STATUSBAR_HEIGHT = _reactNative.Platform.select({
12
12
  android: DEFAULT_STATUSBAR_HEIGHT_EXPO,
13
13
  ios: _reactNative.Platform.Version < 11 ? DEFAULT_STATUSBAR_HEIGHT_EXPO : 0
14
14
  });
15
- exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;
15
+ exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;AR_HEIGHT;
@@ -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,
@@ -14,7 +14,6 @@ const SEED_DATA = [{
14
14
  preview_image_url: "{CLOUDINARY_URL}/Field_SearchBar_Full.png",
15
15
  supports_list_render: false,
16
16
  triggers: [_types.Triggers.OnChange],
17
- // TODO Triggers.OnSubmit for multiple triggers
18
17
  props: {
19
18
  icon: {
20
19
  group: _types.GROUPS.basic,
@@ -53,4 +52,7 @@ const SEED_DATA = [{
53
52
  },
54
53
  layout: {}
55
54
  }];
55
+ exports.SEED_DATA = SEED_DATA;},
56
+ layout: {}
57
+ }];
56
58
  exports.SEED_DATA = SEED_DATA;
@@ -39,6 +39,20 @@ const SEED_DATA = [{
39
39
  label: "End Reached Threshold",
40
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.",
41
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
42
56
  })
43
57
  }
44
58
  }, {
@@ -83,6 +97,20 @@ const SEED_DATA = [{
83
97
  label: "End Reached Threshold",
84
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.",
85
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
86
114
  })
87
115
  }
88
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
  };
@@ -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 {
@@ -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",
@@ -0,0 +1 @@
1
+ export {};
@@ -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 !== "") {
@@ -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,
@@ -0,0 +1 @@
1
+ export {};
@@ -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,
@@ -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,
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS, Triggers, createActionProp, createStaticNumberProp } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS, Triggers, createActionProp, createStaticNumberProp, createColorProp } from "@draftbit/types";
2
2
  export const SEED_DATA = [{
3
3
  name: "Masonry List",
4
4
  tag: "MasonryFlashList",
@@ -33,6 +33,20 @@ export const SEED_DATA = [{
33
33
  label: "End Reached Threshold",
34
34
  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.",
35
35
  defaultValue: 0.5
36
+ }),
37
+ refreshColor: createColorProp({
38
+ label: "Refreshing Color",
39
+ description: "Color of the refresh indicator"
40
+ }),
41
+ showsHorizontalScrollIndicator: createStaticBoolProp({
42
+ label: "Show Horizontal Scroll Indicator",
43
+ description: "When true, shows a horizontal scroll indicator. The default value is true.",
44
+ defaultValue: true
45
+ }),
46
+ showsVerticalScrollIndicator: createStaticBoolProp({
47
+ label: "Show Vertical Scroll Indicator",
48
+ description: "When true, shows a vertical scroll indicator. The default value is true.",
49
+ defaultValue: true
36
50
  })
37
51
  }
38
52
  }, {
@@ -77,6 +91,20 @@ export const SEED_DATA = [{
77
91
  label: "End Reached Threshold",
78
92
  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.",
79
93
  defaultValue: 0.5
94
+ }),
95
+ refreshColor: createColorProp({
96
+ label: "Refreshing Color",
97
+ description: "Color of the refresh indicator"
98
+ }),
99
+ showsHorizontalScrollIndicator: createStaticBoolProp({
100
+ label: "Show Horizontal Scroll Indicator",
101
+ description: "When true, shows a horizontal scroll indicator. The default value is true.",
102
+ defaultValue: true
103
+ }),
104
+ showsVerticalScrollIndicator: createStaticBoolProp({
105
+ label: "Show Vertical Scroll Indicator",
106
+ description: "When true, shows a vertical scroll indicator. The default value is true.",
107
+ defaultValue: true
80
108
  })
81
109
  }
82
110
  }];
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp, createStaticNumberProp } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp, createStaticNumberProp, createColorProp } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "List",
4
4
  tag: "FlatList",
@@ -32,6 +32,20 @@ export const SEED_DATA = {
32
32
  label: "End Reached Threshold",
33
33
  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.",
34
34
  defaultValue: 0.5
35
+ }),
36
+ refreshColor: createColorProp({
37
+ label: "Refreshing Color",
38
+ description: "Color of the refresh indicator"
39
+ }),
40
+ showsHorizontalScrollIndicator: createStaticBoolProp({
41
+ label: "Show Horizontal Scroll Indicator",
42
+ description: "When true, shows a horizontal scroll indicator. The default value is true.",
43
+ defaultValue: true
44
+ }),
45
+ showsVerticalScrollIndicator: createStaticBoolProp({
46
+ label: "Show Vertical Scroll Indicator",
47
+ description: "When true, shows a vertical scroll indicator. The default value is true.",
48
+ defaultValue: true
35
49
  })
36
50
  }
37
51
  };
@@ -1,29 +1,27 @@
1
- import { COMPONENT_TYPES, GROUPS, createIconProp, createColorProp, createNumberProp, createBoolProp, createActionProp, Triggers, StylesPanelSections } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, GROUPS, createIconProp, createColorProp, createNumberProp, createActionProp, Triggers, StylesPanelSections, createDisabledProp } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Icon Button",
4
4
  tag: "IconButton",
5
5
  category: COMPONENT_TYPES.button,
6
6
  layout: {},
7
- triggers: [Triggers.OnPress],
7
+ triggers: [Triggers.OnPress, Triggers.OnLongPress],
8
8
  stylesPanelSections: [StylesPanelSections.Margins, StylesPanelSections.Effects, StylesPanelSections.Position],
9
9
  props: {
10
10
  onPress: createActionProp(),
11
+ onLongPress: createActionProp(),
12
+ disabled: createDisabledProp(),
11
13
  icon: createIconProp(),
12
14
  color: createColorProp({
13
15
  label: "Color",
14
16
  group: GROUPS.basic
15
17
  }),
16
- disabled: createBoolProp({
17
- label: "Disabled",
18
- group: GROUPS.basic
19
- }),
20
18
  size: createNumberProp({
21
19
  group: GROUPS.basic,
22
20
  label: "Size",
23
21
  description: "Width and height of your icon",
24
22
  defaultValue: 32,
25
23
  min: 16,
26
- max: 128,
24
+ max: 256,
27
25
  step: 1,
28
26
  precision: 0
29
27
  })
@@ -6,7 +6,9 @@ export const SEED_DATA = {
6
6
  description: "A map view",
7
7
  category: COMPONENT_TYPES.map,
8
8
  layout: {
9
- flex: 1
9
+ flex: 1,
10
+ width: "100%",
11
+ height: "100%"
10
12
  },
11
13
  props: {
12
14
  provider: {
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp, createColorProp } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Scroll View",
4
4
  tag: "ScrollView",
@@ -6,7 +6,9 @@ export const SEED_DATA = {
6
6
  category: COMPONENT_TYPES.view,
7
7
  stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
8
8
  layout: {},
9
+ triggers: [Triggers.OnRefresh],
9
10
  props: {
11
+ onRefresh: createActionProp(),
10
12
  horizontal: createStaticBoolProp({
11
13
  label: "Horizontal",
12
14
  description: "Render your list horizontally",
@@ -15,7 +17,7 @@ export const SEED_DATA = {
15
17
  showsHorizontalScrollIndicator: createStaticBoolProp({
16
18
  label: "Show Horizontal Scroll Indicator",
17
19
  description: "When true, shows a horizontal scroll indicator. The default value is true.",
18
- defaultValue: false
20
+ defaultValue: true
19
21
  }),
20
22
  showsVerticalScrollIndicator: createStaticBoolProp({
21
23
  label: "Show Vertical Scroll Indicator",
@@ -26,6 +28,10 @@ export const SEED_DATA = {
26
28
  label: "Bounce",
27
29
  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.",
28
30
  defaultValue: true
31
+ }),
32
+ refreshColor: createColorProp({
33
+ label: "Refreshing Color",
34
+ description: "Color of the refresh indicator"
29
35
  })
30
36
  }
31
37
  };
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createActionProp, Triggers, createStaticNumberProp, StylesPanelSections } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createActionProp, Triggers, createStaticNumberProp, StylesPanelSections, createDisabledProp, GROUPS, createStaticBoolProp } from "@draftbit/types";
2
2
  const SEED_DATA_PROPS = {
3
3
  stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins, StylesPanelSections.Borders],
4
4
  layout: {},
@@ -6,10 +6,11 @@ const SEED_DATA_PROPS = {
6
6
  props: {
7
7
  onPress: createActionProp(),
8
8
  onLongPress: createActionProp(),
9
+ disabled: createDisabledProp(),
9
10
  activeOpacity: createStaticNumberProp({
10
11
  label: "Active Opacity",
11
12
  description: "The opacity when the button is pressed.",
12
- defaultValue: 0.8,
13
+ defaultValue: null,
13
14
  min: 0,
14
15
  max: 1,
15
16
  step: 0.01,
@@ -19,7 +20,7 @@ const SEED_DATA_PROPS = {
19
20
  disabledOpacity: createStaticNumberProp({
20
21
  label: "Disabled Opacity",
21
22
  description: "The opacity when the button is disabled.",
22
- defaultValue: 0.8,
23
+ defaultValue: null,
23
24
  min: 0,
24
25
  max: 1,
25
26
  step: 0.01,
@@ -35,6 +36,12 @@ const SEED_DATA_PROPS = {
35
36
  label: "Hit Slop",
36
37
  description: "Sets additional distance outside of element in which a press can be detected.",
37
38
  required: false
39
+ }),
40
+ android_disableSound: createStaticBoolProp({
41
+ label: "Disable Sound",
42
+ description: "Disable the Android sound effect.",
43
+ defaultValue: null,
44
+ group: GROUPS.android
38
45
  })
39
46
  }
40
47
  };
@@ -11,6 +11,8 @@ declare type Props = {
11
11
  onPress: () => void;
12
12
  theme: Theme;
13
13
  style?: StyleProp<ViewStyle>;
14
+ activeOpacity?: number;
15
+ disabledOpacity?: number;
14
16
  } & PressableProps & IconSlot;
15
17
  declare const _default: React.ComponentType<import("@draftbit/react-theme-provider").$Without<React.PropsWithChildren<Props>, "theme"> & {
16
18
  theme?: import("@draftbit/react-theme-provider").$DeepPartial<any> | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAIL,SAAS,EACT,SAAS,EAET,cAAc,EAEf,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD,aAAK,KAAK,GAAG;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,GAAG,cAAc,GAChB,QAAQ,CAAC;;;;AA0DX,wBAAqC"}
1
+ {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAIL,SAAS,EACT,SAAS,EAET,cAAc,EAEf,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD,aAAK,KAAK,GAAG;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GAAG,cAAc,GAChB,QAAQ,CAAC;;;;AA4DX,wBAAqC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Pressable.d.ts","sourceRoot":"","sources":["../../../../src/components/Pressable.tsx"],"names":[],"mappings":";AACA,OAAO,EAEL,cAAc,EACd,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB,aAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GAAG,cAAc,CAAC;AAEnB,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,aAAa,EACb,eAAe,EACf,cAAc,EACd,OAAO,EACP,KAAK,EACL,GAAG,KAAK,EACT,EAAE,KAAK,eAoBP"}
1
+ {"version":3,"file":"Pressable.d.ts","sourceRoot":"","sources":["../../../../src/components/Pressable.tsx"],"names":[],"mappings":";AACA,OAAO,EAEL,cAAc,EACd,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB,aAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GAAG,cAAc,CAAC;AAEnB,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,aAAmB,EACnB,eAAqB,EACrB,cAAc,EACd,OAAO,EACP,KAAK,EACL,GAAG,KAAK,EACT,EAAE,KAAK,eAoBP"}