@draftbit/core 47.0.1-17098e.2 → 47.0.1-1d6a5b.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 (87) hide show
  1. package/lib/commonjs/components/Button.js +15 -27
  2. package/lib/commonjs/components/Checkbox/Checkbox.js +3 -1
  3. package/lib/commonjs/components/DeprecatedButton.js +151 -0
  4. package/lib/commonjs/components/DeprecatedCardWrapper.js +2 -2
  5. package/lib/commonjs/components/DeprecatedFAB.js +2 -1
  6. package/lib/commonjs/components/Picker/Picker.js +4 -3
  7. package/lib/commonjs/components/Picker/PickerComponent.ios.js +2 -2
  8. package/lib/commonjs/components/Touchable.js +11 -27
  9. package/lib/commonjs/components/Touchable.web.js +9 -0
  10. package/lib/commonjs/mappings/Button.js +10 -14
  11. package/lib/commonjs/mappings/FlashList.js +45 -2
  12. package/lib/commonjs/mappings/FlatList.js +12 -0
  13. package/lib/commonjs/mappings/Touchable.js +20 -0
  14. package/lib/module/components/Button.js +9 -21
  15. package/lib/module/components/Checkbox/Checkbox.js +3 -2
  16. package/lib/module/components/DeprecatedButton.js +141 -0
  17. package/lib/module/components/DeprecatedCardWrapper.js +2 -2
  18. package/lib/module/components/DeprecatedFAB.js +3 -2
  19. package/lib/module/components/Picker/Picker.js +4 -3
  20. package/lib/module/components/Picker/PickerComponent.ios.js +1 -1
  21. package/lib/module/components/Touchable.js +10 -25
  22. package/lib/module/components/Touchable.web.js +2 -0
  23. package/lib/module/mappings/Button.js +11 -15
  24. package/lib/module/mappings/FlashList.js +46 -3
  25. package/lib/module/mappings/FlatList.js +13 -1
  26. package/lib/module/mappings/Touchable.js +13 -0
  27. package/lib/typescript/src/components/Button.d.ts +0 -2
  28. package/lib/typescript/src/components/Button.d.ts.map +1 -1
  29. package/lib/typescript/src/components/Checkbox/Checkbox.d.ts +2 -2
  30. package/lib/typescript/src/components/Checkbox/Checkbox.d.ts.map +1 -1
  31. package/lib/typescript/src/components/DeprecatedButton.d.ts +54 -0
  32. package/lib/typescript/src/components/DeprecatedButton.d.ts.map +1 -0
  33. package/lib/typescript/src/components/DeprecatedCardWrapper.d.ts.map +1 -1
  34. package/lib/typescript/src/components/DeprecatedFAB.d.ts +2 -2
  35. package/lib/typescript/src/components/DeprecatedFAB.d.ts.map +1 -1
  36. package/lib/typescript/src/components/Picker/Picker.d.ts.map +1 -1
  37. package/lib/typescript/src/components/Touchable.d.ts +2 -9
  38. package/lib/typescript/src/components/Touchable.d.ts.map +1 -1
  39. package/lib/typescript/src/components/Touchable.web.d.ts +3 -0
  40. package/lib/typescript/src/components/Touchable.web.d.ts.map +1 -0
  41. package/lib/typescript/src/mappings/Button.d.ts +2 -224
  42. package/lib/typescript/src/mappings/Button.d.ts.map +1 -1
  43. package/lib/typescript/src/mappings/FlashList.d.ts +112 -2
  44. package/lib/typescript/src/mappings/FlashList.d.ts.map +1 -1
  45. package/lib/typescript/src/mappings/FlatList.d.ts +42 -0
  46. package/lib/typescript/src/mappings/FlatList.d.ts.map +1 -1
  47. package/lib/typescript/src/mappings/Touchable.d.ts +22 -0
  48. package/lib/typescript/src/mappings/Touchable.d.ts.map +1 -0
  49. package/package.json +3 -3
  50. package/src/components/Button.js +11 -18
  51. package/src/components/Button.tsx +11 -45
  52. package/src/components/Checkbox/Checkbox.js +3 -2
  53. package/src/components/Checkbox/Checkbox.tsx +7 -5
  54. package/src/components/DeprecatedButton.js +95 -0
  55. package/src/components/DeprecatedButton.tsx +214 -0
  56. package/src/components/DeprecatedCardWrapper.js +2 -2
  57. package/src/components/DeprecatedCardWrapper.tsx +4 -3
  58. package/src/components/DeprecatedFAB.js +3 -2
  59. package/src/components/DeprecatedFAB.tsx +5 -5
  60. package/src/components/Picker/Picker.js +4 -3
  61. package/src/components/Picker/Picker.tsx +4 -4
  62. package/src/components/Picker/PickerComponent.ios.js +1 -1
  63. package/src/components/Picker/PickerComponent.ios.tsx +1 -1
  64. package/src/components/Touchable.js +11 -16
  65. package/src/components/Touchable.tsx +11 -42
  66. package/src/components/Touchable.web.js +2 -0
  67. package/src/components/Touchable.web.tsx +3 -0
  68. package/src/mappings/Button.js +10 -14
  69. package/src/mappings/Button.ts +10 -14
  70. package/src/mappings/FlashList.js +77 -31
  71. package/src/mappings/FlashList.ts +82 -30
  72. package/src/mappings/FlatList.js +13 -1
  73. package/src/mappings/FlatList.ts +16 -0
  74. package/src/mappings/Touchable.js +17 -0
  75. package/src/mappings/Touchable.ts +23 -0
  76. package/lib/commonjs/components/Pressable.js +0 -48
  77. package/lib/commonjs/mappings/Pressable.js +0 -52
  78. package/lib/module/components/Pressable.js +0 -40
  79. package/lib/module/mappings/Pressable.js +0 -45
  80. package/lib/typescript/src/components/Pressable.d.ts +0 -18
  81. package/lib/typescript/src/components/Pressable.d.ts.map +0 -1
  82. package/lib/typescript/src/mappings/Pressable.d.ts +0 -76
  83. package/lib/typescript/src/mappings/Pressable.d.ts.map +0 -1
  84. package/src/components/Pressable.js +0 -17
  85. package/src/components/Pressable.tsx +0 -67
  86. package/src/mappings/Pressable.js +0 -52
  87. package/src/mappings/Pressable.ts +0 -63
@@ -0,0 +1,141 @@
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";
3
+ import { ActivityIndicator, View, Text, StyleSheet } from "react-native";
4
+ import color from "color";
5
+ import Config from "./Config";
6
+ import Touchable from "./Touchable";
7
+ import Elevation from "./Elevation";
8
+ import { withTheme } from "../theming";
9
+ const Button = _ref => {
10
+ let {
11
+ Icon,
12
+ icon,
13
+ disabled = false,
14
+ type = "solid",
15
+ loading = false,
16
+ labelColor,
17
+ color: colorOverride,
18
+ children,
19
+ onPress,
20
+ elevation = 0,
21
+ style,
22
+ theme: {
23
+ colors,
24
+ disabledOpacity,
25
+ roundness,
26
+ typography
27
+ },
28
+ ...rest
29
+ } = _ref;
30
+ let backgroundColor, borderColor, textColor, borderWidth;
31
+ const buttonColor = colorOverride || colors.primary;
32
+ if (type === "solid") {
33
+ backgroundColor = buttonColor;
34
+ if (disabled) {
35
+ textColor = color(colors.surface).alpha(disabledOpacity).rgb().string();
36
+ } else {
37
+ textColor = labelColor || colors.surface;
38
+ }
39
+ } else {
40
+ backgroundColor = "transparent";
41
+ if (disabled) {
42
+ textColor = color(buttonColor).alpha(disabledOpacity).rgb().string();
43
+ } else {
44
+ textColor = labelColor || buttonColor;
45
+ }
46
+ }
47
+ if (type === "outline") {
48
+ if (disabled) {
49
+ borderColor = color(buttonColor).alpha(disabledOpacity).rgb().string();
50
+ } else {
51
+ borderColor = buttonColor;
52
+ }
53
+ borderWidth = StyleSheet.hairlineWidth;
54
+ } else {
55
+ borderColor = "transparent";
56
+ borderWidth = 0;
57
+ }
58
+ const buttonStyle = {
59
+ backgroundColor,
60
+ borderColor,
61
+ borderWidth,
62
+ borderRadius: roundness
63
+ };
64
+ const textStyle = {
65
+ textAlign: "center",
66
+ color: textColor,
67
+ marginVertical: 16,
68
+ marginHorizontal: 16
69
+ };
70
+ const iconStyle = [styles.icon, {
71
+ marginLeft: 16,
72
+ marginRight: -8,
73
+ width: Config.buttonIconSize
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
+ };
96
+ return /*#__PURE__*/React.createElement(Elevation, {
97
+ style: {
98
+ elevation,
99
+ alignSelf: "stretch",
100
+ ...margins
101
+ }
102
+ }, /*#__PURE__*/React.createElement(Touchable, _extends({}, rest, {
103
+ onPress: onPress,
104
+ accessibilityState: {
105
+ disabled
106
+ },
107
+ accessibilityRole: "button",
108
+ disabled: disabled || loading,
109
+ style: [styles.button, buttonStyle, innerStyles]
110
+ }), /*#__PURE__*/React.createElement(View, {
111
+ style: styles.content
112
+ }, icon && loading !== true ? /*#__PURE__*/React.createElement(View, {
113
+ style: iconStyle
114
+ }, /*#__PURE__*/React.createElement(Icon, {
115
+ name: icon,
116
+ size: Config.buttonIconSize,
117
+ color: textColor
118
+ })) : null, loading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
119
+ size: "small",
120
+ color: textColor,
121
+ style: iconStyle
122
+ }) : null, /*#__PURE__*/React.createElement(Text, {
123
+ numberOfLines: 1,
124
+ style: [textStyle, typography.button]
125
+ }, children))));
126
+ };
127
+ const styles = StyleSheet.create({
128
+ button: {
129
+ minWidth: 64,
130
+ borderStyle: "solid"
131
+ },
132
+ content: {
133
+ flexDirection: "row",
134
+ alignItems: "center",
135
+ justifyContent: "center"
136
+ },
137
+ icon: {
138
+ width: Config.buttonIconSize
139
+ }
140
+ });
141
+ export default withTheme(Button);
@@ -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 { Pressable } from "react-native";
4
+ import Touchable from "./Touchable";
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(Pressable, _extends({
24
+ return /*#__PURE__*/React.createElement(Touchable, _extends({
25
25
  disabled: !onPress,
26
26
  onPress: onPress,
27
27
  style: [style, {
@@ -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
@@ -1,11 +1,12 @@
1
1
  import * as React from "react";
2
- import { View, StyleSheet, Text, Platform, Dimensions, Pressable } from "react-native";
2
+ import { View, StyleSheet, Text, Platform, Dimensions } 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 "../Button";
8
+ import Button from "../DeprecatedButton";
9
+ import Touchable from "../Touchable";
9
10
  import { extractStyles, extractBorderAndMarginStyles, borderStyleNames, marginStyleNames } from "../../utilities";
10
11
  function normalizeOptions(options) {
11
12
  if (options.length === 0) {
@@ -197,7 +198,7 @@ const Picker = _ref => {
197
198
  /* marginsContainer */
198
199
  React.createElement(View, {
199
200
  style: [styles.marginsContainer, marginStyles]
200
- }, /*#__PURE__*/React.createElement(Pressable, {
201
+ }, /*#__PURE__*/React.createElement(Touchable, {
201
202
  disabled: disabled,
202
203
  onPress: togglePickerVisible,
203
204
  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 "../Button";
9
+ import Button from "../DeprecatedButton";
10
10
  import TextField from "../TextField";
11
11
  import Touchable from "../Touchable";
12
12
  import { extractStyles } from "../../utilities";
@@ -1,40 +1,25 @@
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 React, { useCallback } from "react";
2
+ import React from "react";
3
3
  import { Pressable } from "react-native";
4
4
  export default function Touchable(_ref) {
5
5
  let {
6
6
  children,
7
7
  disabled,
8
8
  onPress,
9
- onLongPress,
10
- hitSlop,
11
- delayLongPress,
12
- activeOpacity,
13
- disabledOpacity,
14
9
  style,
15
10
  ...props
16
11
  } = _ref;
17
- const getOpacity = useCallback(pressed => {
18
- if (disabled) {
19
- return disabledOpacity;
20
- } else {
21
- if (pressed) return activeOpacity;else return 1;
22
- }
23
- }, [activeOpacity, disabled, disabledOpacity]);
24
- const _style = useCallback(_ref2 => {
25
- let {
26
- pressed
27
- } = _ref2;
28
- return [style, {
29
- opacity: getOpacity(pressed)
30
- }];
31
- }, [getOpacity, style]);
32
12
  return /*#__PURE__*/React.createElement(Pressable, _extends({
33
13
  onPress: onPress,
34
- onLongPress: onLongPress,
35
14
  disabled: disabled,
36
- delayLongPress: delayLongPress ? delayLongPress : 500,
37
- hitSlop: hitSlop ? hitSlop : 8,
38
- style: _style
15
+ hitSlop: 8,
16
+ style: _ref2 => {
17
+ let {
18
+ pressed
19
+ } = _ref2;
20
+ return [{
21
+ opacity: pressed || disabled ? 0.75 : 1
22
+ }, style];
23
+ }
39
24
  }, props), children);
40
25
  }
@@ -0,0 +1,2 @@
1
+ import { TouchableOpacity } from "react-native";
2
+ export default TouchableOpacity;
@@ -1,8 +1,7 @@
1
- import { COMPONENT_TYPES, createIconProp, createTextProp, createDisabledProp, createLoadingProp, createActionProp, Triggers, StylesPanelSections, createNumberProp } from "@draftbit/types";
2
- const SEED_DATA_TRIGGERS = [Triggers.OnPress, Triggers.OnLongPress];
1
+ import { COMPONENT_TYPES, createIconProp, createTextProp, createDisabledProp, createLoadingProp, createActionProp, Triggers, StylesPanelSections } from "@draftbit/types";
2
+ const SEED_DATA_TRIGGERS = [Triggers.OnPress];
3
3
  const SEED_DATA_PROPS = {
4
4
  onPress: createActionProp(),
5
- onLongPress: createActionProp(),
6
5
  icon: createIconProp({
7
6
  defaultValue: null,
8
7
  required: false
@@ -13,11 +12,12 @@ const SEED_DATA_PROPS = {
13
12
  defaultValue: "Get Started"
14
13
  }),
15
14
  disabled: createDisabledProp(),
16
- loading: createLoadingProp(),
17
- activeOpacity: createNumberProp(),
18
- disabledOpacity: createNumberProp(),
19
- delayLongPress: createNumberProp(),
20
- hitSlop: createNumberProp()
15
+ loading: createLoadingProp()
16
+ };
17
+ const LAYOUT = {
18
+ backgroundColor: "transparent",
19
+ borderRadius: 8,
20
+ fontFamily: "system-700"
21
21
  };
22
22
  export const SEED_DATA = [{
23
23
  name: "Button Outline",
@@ -25,9 +25,8 @@ export const SEED_DATA = [{
25
25
  category: COMPONENT_TYPES.deprecated,
26
26
  stylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.Background, StylesPanelSections.Borders, StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position, StylesPanelSections.Effects],
27
27
  layout: {
28
+ ...LAYOUT,
28
29
  backgroundColor: "transparent",
29
- borderRadius: 8,
30
- fontFamily: "system-700",
31
30
  borderWidth: 1,
32
31
  textAlign: "center"
33
32
  },
@@ -39,8 +38,7 @@ export const SEED_DATA = [{
39
38
  category: COMPONENT_TYPES.deprecated,
40
39
  stylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.Background, StylesPanelSections.Borders, StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position, StylesPanelSections.Effects],
41
40
  layout: {
42
- borderRadius: 8,
43
- fontFamily: "system-700",
41
+ ...LAYOUT,
44
42
  backgroundColor: "primary",
45
43
  textAlign: "center"
46
44
  },
@@ -52,9 +50,7 @@ export const SEED_DATA = [{
52
50
  category: COMPONENT_TYPES.button,
53
51
  stylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.Background, StylesPanelSections.Borders, StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position, StylesPanelSections.Effects],
54
52
  layout: {
55
- borderRadius: 8,
56
- height: 42,
57
- fontFamily: "system-700",
53
+ ...LAYOUT,
58
54
  backgroundColor: "primary",
59
55
  textAlign: "center"
60
56
  },
@@ -1,5 +1,40 @@
1
- import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS } from "@draftbit/types";
2
- export const SEED_DATA = {
1
+ import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS, Triggers, createActionProp, createStaticNumberProp } from "@draftbit/types";
2
+ export const SEED_DATA = [{
3
+ name: "Masonry List",
4
+ tag: "MasonryFlashList",
5
+ description: "Masonry Flashlist by Shopify",
6
+ packageName: "@shopify/flash-list",
7
+ category: COMPONENT_TYPES.data,
8
+ stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
9
+ layout: {
10
+ flex: 1
11
+ },
12
+ triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
13
+ props: {
14
+ onRefresh: createActionProp(),
15
+ onEndReached: createActionProp(),
16
+ numColumns: createNumColumnsType({
17
+ editable: true
18
+ }),
19
+ estimatedItemSize: createNumberProp({
20
+ group: GROUPS.basic,
21
+ label: "Est. Item Size",
22
+ description: "Approximate size of the items before rendering.",
23
+ defaultValue: 50,
24
+ step: 1,
25
+ precision: 0
26
+ }),
27
+ optimizeItemArrangement: createStaticBoolProp({
28
+ label: "Optimize Item Arrangement",
29
+ description: "If enabled, MasonryFlashList will try to reduce difference in column height by modifying item order. If true, specifying overrideItemLayout is required. Default value is false."
30
+ }),
31
+ onEndReachedThreshold: createStaticNumberProp({
32
+ label: "End Reached Threshold",
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
+ defaultValue: 0.5
35
+ })
36
+ }
37
+ }, {
3
38
  name: "FlashList",
4
39
  tag: "FlashList",
5
40
  description: "Flashlist by Shopify",
@@ -9,7 +44,10 @@ export const SEED_DATA = {
9
44
  layout: {
10
45
  flex: 1
11
46
  },
47
+ triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
12
48
  props: {
49
+ onRefresh: createActionProp(),
50
+ onEndReached: createActionProp(),
13
51
  estimatedItemSize: createNumberProp({
14
52
  group: GROUPS.basic,
15
53
  label: "Est. Item Size",
@@ -28,6 +66,11 @@ export const SEED_DATA = {
28
66
  }),
29
67
  numColumns: createNumColumnsType({
30
68
  editable: true
69
+ }),
70
+ onEndReachedThreshold: createStaticNumberProp({
71
+ label: "End Reached Threshold",
72
+ 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.",
73
+ defaultValue: 0.5
31
74
  })
32
75
  }
33
- };
76
+ }];
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp, createStaticNumberProp } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "List",
4
4
  tag: "FlatList",
@@ -8,7 +8,10 @@ export const SEED_DATA = {
8
8
  layout: {
9
9
  flex: 1
10
10
  },
11
+ triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
11
12
  props: {
13
+ onRefresh: createActionProp(),
14
+ onEndReached: createActionProp(),
12
15
  horizontal: createStaticBoolProp({
13
16
  label: "Horizontal",
14
17
  description: "Render list horizontally"
@@ -19,6 +22,15 @@ export const SEED_DATA = {
19
22
  }),
20
23
  numColumns: createNumColumnsType({
21
24
  editable: true
25
+ }),
26
+ initialNumToRender: createStaticBoolProp({
27
+ label: "Initial Num To Render",
28
+ descriprion: "How many items to render in the initial batch"
29
+ }),
30
+ onEndReachedThreshold: createStaticNumberProp({
31
+ label: "End Reached Threshold",
32
+ 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.",
33
+ defaultValue: 0.5
22
34
  })
23
35
  }
24
36
  };
@@ -0,0 +1,13 @@
1
+ import { COMPONENT_TYPES, createActionProp, Triggers, StylesPanelSections } from "@draftbit/types";
2
+ export const SEED_DATA = {
3
+ name: "Touchable",
4
+ tag: "Touchable",
5
+ description: "Simple button with no styles",
6
+ category: COMPONENT_TYPES.button,
7
+ stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins, StylesPanelSections.Borders],
8
+ layout: {},
9
+ triggers: [Triggers.OnPress],
10
+ props: {
11
+ onPress: createActionProp()
12
+ }
13
+ };
@@ -1,5 +1,3 @@
1
- import { PressableStateCallbackType, StyleProp, ViewStyle } from "react-native";
2
- export declare type StyleType = (state: PressableStateCallbackType) => StyleProp<ViewStyle>;
3
1
  declare const ButtonSolid: any;
4
2
  export { ButtonSolid };
5
3
  declare const Button: any;
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/Button.tsx"],"names":[],"mappings":"AACA,OAAO,EAIL,0BAA0B,EAG1B,SAAS,EAET,SAAS,EAEV,MAAM,cAAc,CAAC;AA+CtB,oBAAY,SAAS,GAAG,CACtB,KAAK,EAAE,0BAA0B,KAC9B,SAAS,CAAC,SAAS,CAAC,CAAC;AA+G1B,QAAA,MAAM,WAAW,EAAE,GAAsB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,CAAC;AAEvB,QAAA,MAAM,MAAM,EAAE,GAAsB,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,CAAC;AAmBlB,QAAA,MAAM,aAAa,EAAE,GAAwB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/Button.tsx"],"names":[],"mappings":"AA0IA,QAAA,MAAM,WAAW,EAAE,GAAsB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,CAAC;AAEvB,QAAA,MAAM,MAAM,EAAE,GAAsB,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,CAAC;AAmBlB,QAAA,MAAM,aAAa,EAAE,GAAwB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { StyleProp, ViewStyle, PressableProps } from "react-native";
2
+ import { TouchableHighlightProps, StyleProp, ViewStyle } from "react-native";
3
3
  import type { IconSlot } from "../../interfaces/Icon";
4
4
  export interface CheckboxProps {
5
5
  status?: boolean;
@@ -15,6 +15,6 @@ export interface CheckboxProps {
15
15
  size?: number;
16
16
  style?: StyleProp<ViewStyle>;
17
17
  }
18
- declare const Checkbox: React.FC<CheckboxProps & PressableProps & IconSlot>;
18
+ declare const Checkbox: React.FC<CheckboxProps & TouchableHighlightProps & IconSlot>;
19
19
  export default Checkbox;
20
20
  //# sourceMappingURL=Checkbox.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../../src/components/Checkbox/Checkbox.tsx"],"names":[],"mapp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E,OAAO,KAAK,IAAI,CAAC;IACrC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CACtB,aAAa,GAAG,uBAAuB,GAAG,QAAQ,CAqFnD,CAAC;AAqBF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,54 @@
1
+ import * as React from "react";
2
+ import { TouchableHighlightProps, StyleProp, ViewStyle } from "react-native";
3
+ import type { Theme } from "../styles/DefaultTheme";
4
+ import type { IconSlot } from "../interfaces/Icon";
5
+ /**
6
+ * A button is component that the user can press to trigger an action.
7
+ *
8
+ * <div class="screenshots">
9
+ * <figure>
10
+ * <img src="screenshots/button-1.png" />
11
+ * <figcaption>Text button</figcaption>
12
+ * </figure>
13
+ * <figure>
14
+ * <img src="screenshots/button-2.png" />
15
+ * <figcaption>Outlined button</figcaption>
16
+ * </figure>
17
+ * <figure>
18
+ * <img src="screenshots/button-3.png" />
19
+ * <figcaption>Contained button</figcaption>
20
+ * </figure>
21
+ * </div>
22
+ *
23
+ * ## Usage
24
+ * ```js
25
+ * import * as React from 'react';
26
+ * import { Button } from '@draftbit/ui';
27
+ *
28
+ * const MyComponent = () => (
29
+ * <Button icon="add-a-photo" type="solid" onPress={() => console.log('Pressed')}>
30
+ * Press me
31
+ * </Button>
32
+ * );
33
+ *
34
+ * export default MyComponent;
35
+ * ```
36
+ */
37
+ declare type Props = {
38
+ disabled?: boolean;
39
+ type?: "solid" | "outline" | "text";
40
+ loading?: boolean;
41
+ icon?: string;
42
+ labelColor?: string;
43
+ color?: string;
44
+ children?: React.ReactNode;
45
+ onPress: () => void;
46
+ elevation?: number;
47
+ style?: StyleProp<ViewStyle>;
48
+ theme: Theme;
49
+ } & TouchableHighlightProps & IconSlot;
50
+ declare const _default: React.ComponentType<import("@draftbit/react-theme-provider").$Without<React.PropsWithChildren<Props>, "theme"> & {
51
+ theme?: import("@draftbit/react-theme-provider").$DeepPartial<any> | undefined;
52
+ }> & import("@draftbit/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<React.PropsWithChildren<Props>> & React.FC<React.PropsWithChildren<Props>>, {}>;
53
+ export default _default;
54
+ //# sourceMappingURL=DeprecatedButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeprecatedButton.d.ts","sourceRoot":"","sources":["../../../../src/components/DeprecatedButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAKL,uBAAuB,EACvB,SAAS,EACT,SAAS,EAEV,MAAM,cAAc,CAAC;AAOtB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,aAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,KAAK,EAAE,KAAK,CAAC;CACd,GAAG,uBAAuB,GACzB,QAAQ,CAAC;;;;AAmJX,wBAAiC"}
@@ -1 +1 @@
1
- {"version":3,"file":"DeprecatedCardWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/DeprecatedCardWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAa,MAAM,cAAc,CAAC;AAC/D,OAAO,KAAK,MAAM,wBAAwB,CAAC;AAE3C,aAAK,KAAK,GAAG;IACX,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,KAAK,EAAE,OAAO,KAAK,CAAC;CACrB,CAAC;;;;AAiCF,wBAA+B"}
1
+ {"version":3,"file":"DeprecatedCardWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/DeprecatedCardWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,MAAM,wBAAwB,CAAC;AAE3C,aAAK,KAAK,GAAG;IACX,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,KAAK,EAAE,OAAO,KAAK,CAAC;CACrB,CAAC;;;;AAiCF,wBAA+B"}
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { StyleProp, ViewStyle, PressableProps } from "react-native";
2
+ import { TouchableHighlightProps, StyleProp, ViewStyle } from "react-native";
3
3
  import type { Theme } from "../styles/DefaultTheme";
4
4
  import type { IconSlot } from "../interfaces/Icon";
5
5
  /**
@@ -48,7 +48,7 @@ declare type Props = {
48
48
  elevation?: number;
49
49
  theme: Theme;
50
50
  style?: StyleProp<ViewStyle>;
51
- } & PressableProps & IconSlot;
51
+ } & TouchableHighlightProps & IconSlot;
52
52
  declare const _default: React.ComponentType<import("@draftbit/react-theme-provider").$Without<React.PropsWithChildren<Props>, "theme"> & {
53
53
  theme?: import("@draftbit/react-theme-provider").$DeepPartial<any> | undefined;
54
54
  }> & import("@draftbit/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<React.PropsWithChildren<Props>> & React.FC<React.PropsWithChildren<Props>>, {}>;
@@ -1 +1 @@
1
- {"version":3,"file":"DeprecatedFAB.d.ts","sourceRoot":"","sources":["../../../../src/components/DeprecatedFAB.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAIL,SAAS,EACT,SAAS,EAGT,cAAc,EACf,MAAM,cAAc,CAAC;AAOtB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,aAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC;IAC/D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,GAAG,cAAc,GAChB,QAAQ,CAAC;;;;AAkKX,wBAA8B"}
1
+ {"version":3,"file":"DeprecatedFAB.d.ts","sourceRoot":"","sources":["../../../../src/components/DeprecatedFAB.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAIL,uBAAuB,EACvB,SAAS,EACT,SAAS,EAEV,MAAM,cAAc,CAAC;AAQtB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,aAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC;IAC/D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,GAAG,uBAAuB,GACzB,QAAQ,CAAC;;;;AAkKX,wBAA8B"}
@@ -1 +1 @@
1
- {"version":3,"file":"Picker.d.ts","sourceRoot":"","sources":["../../../../../src/components/Picker/Picker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAKL,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-1,18 +1,11 @@
1
1
  import React from "react";
2
- import { PressableProps, PressableStateCallbackType, StyleProp, ViewStyle } from "react-native";
2
+ import { ViewStyle, PressableProps } from "react-native";
3
3
  declare type Props = {
4
4
  disabled?: boolean;
5
5
  children: React.ReactNode;
6
6
  style?: ViewStyle;
7
7
  onPress?: () => void;
8
- onLongPress?: () => void;
9
- delayLongPress?: number;
10
- hitSlop?: number;
11
- pressRetentionOffset?: number;
12
- activeOpacity?: number;
13
- disabledOpacity?: number;
14
8
  } & PressableProps;
15
- export declare type StyleType = (state: PressableStateCallbackType) => StyleProp<ViewStyle>;
16
- export default function Touchable({ children, disabled, onPress, onLongPress, hitSlop, delayLongPress, activeOpacity, disabledOpacity, style, ...props }: Props): JSX.Element;
9
+ export default function Touchable({ children, disabled, onPress, style, ...props }: Props): JSX.Element;
17
10
  export {};
18
11
  //# sourceMappingURL=Touchable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Touchable.d.ts","sourceRoot":"","sources":["../../../../src/components/Touchable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAC3C,OAAO,EAEL,cAAc,EACd,0BAA0B,EAC1B,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB,aAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GAAG,cAAc,CAAC;AAEnB,oBAAY,SAAS,GAAG,CACtB,KAAK,EAAE,0BAA0B,KAC9B,SAAS,CAAC,SAAS,CAAC,CAAC;AAE1B,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,WAAW,EACX,OAAO,EACP,cAAc,EACd,aAAa,EACb,eAAe,EACf,KAAK,EACL,GAAG,KAAK,EACT,EAAE,KAAK,eA6BP"}
1
+ {"version":3,"file":"Touchable.d.ts","sourceRoot":"","sources":["../../../../src/components/Touchable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAa,SAAS,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEpE,aAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,GAAG,cAAc,CAAC;AAEnB,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,KAAK,EACL,GAAG,KAAK,EACT,EAAE,KAAK,eAmBP"}
@@ -0,0 +1,3 @@
1
+ import { TouchableOpacity } from "react-native";
2
+ export default TouchableOpacity;
3
+ //# sourceMappingURL=Touchable.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Touchable.web.d.ts","sourceRoot":"","sources":["../../../../src/components/Touchable.web.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,eAAe,gBAAgB,CAAC"}