@draftbit/core 47.0.1-17098e.2 → 47.0.1-50db3c.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.
@@ -12,7 +12,6 @@ var _theming = require("../../theming");
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
13
  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
14
  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
- 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); }
16
15
  const AccordionItem = _ref => {
17
16
  let {
18
17
  Icon,
@@ -27,9 +26,10 @@ const AccordionItem = _ref => {
27
26
  textStyles,
28
27
  viewStyles
29
28
  } = (0, _utilities.extractStyles)(style);
30
- return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
31
- style: [styles.container, viewStyles]
32
- }, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
29
+ return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
30
+ style: [styles.container, viewStyles],
31
+ ...rest
32
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
33
33
  style: styles.row
34
34
  }, icon ? /*#__PURE__*/React.createElement(Icon, {
35
35
  name: icon,
@@ -61,4 +61,23 @@ const styles = _reactNative.StyleSheet.create({
61
61
  }
62
62
  });
63
63
  var _default = (0, _theming.withTheme)(AccordionItem);
64
+ exports.default = _default;.StyleSheet.create({
65
+ container: {
66
+ padding: 8
67
+ },
68
+ row: {
69
+ flexDirection: "row",
70
+ alignItems: "center",
71
+ paddingLeft: 8
72
+ },
73
+ item: {
74
+ marginVertical: 6,
75
+ paddingLeft: 8
76
+ },
77
+ content: {
78
+ flex: 1,
79
+ justifyContent: "center"
80
+ }
81
+ });
82
+ var _default = (0, _theming.withTheme)(AccordionItem);
64
83
  exports.default = _default;
@@ -136,8 +136,10 @@ const styles = _reactNative.StyleSheet.create({
136
136
  flexDirection: "row",
137
137
  alignItems: "center",
138
138
  justifyContent: "center",
139
- minHeight: CONSTANTS.baseHeight,
140
- paddingHorizontal: 12,
139
+ paddingTop: CONSTANTS.padding,
140
+ paddingLeft: CONSTANTS.padding,
141
+ paddingRight: CONSTANTS.padding,
142
+ paddingBottom: CONSTANTS.padding,
141
143
  fontFamily: "System",
142
144
  fontWeight: "700",
143
145
  ..._reactNative.Platform.select({
@@ -151,11 +153,6 @@ const styles = _reactNative.StyleSheet.create({
151
153
  backgroundColor: "transparent",
152
154
  borderWidth: 1
153
155
  },
154
- bare: {
155
- backgroundColor: "transparent",
156
- padding: 0,
157
- minHeight: undefined
158
- },
159
156
  loading: {
160
157
  marginRight: 6
161
158
  },
@@ -15,9 +15,7 @@ var _Touchable = _interopRequireDefault(require("../Touchable"));
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
16
  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); }
17
17
  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; }
18
- 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); }
19
18
  const Picker = _ref => {
20
- var _options$find$label, _options$find;
21
19
  let {
22
20
  style,
23
21
  options,
@@ -27,6 +25,7 @@ const Picker = _ref => {
27
25
  onValueChange: onValueChangeOverride = () => {},
28
26
  ...props
29
27
  } = _ref;
28
+ var _a, _b;
30
29
  const {
31
30
  viewStyles: {
32
31
  borderRadius,
@@ -71,7 +70,7 @@ const Picker = _ref => {
71
70
  };
72
71
 
73
72
  const stylesWithoutMargin = style && (0, _lodash.default)(_reactNative.StyleSheet.flatten(style), ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"]);
74
- const selectedLabel = selectedValue && ((_options$find$label = (_options$find = options.find(o => o.value === selectedValue)) === null || _options$find === void 0 ? void 0 : _options$find.label) !== null && _options$find$label !== void 0 ? _options$find$label : selectedValue);
73
+ const selectedLabel = selectedValue && ((_b = (_a = options.find(o => o.value === selectedValue)) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : selectedValue);
75
74
  return /*#__PURE__*/React.createElement(_Touchable.default, {
76
75
  disabled: disabled,
77
76
  onPress: toggleFocus,
@@ -95,6 +94,24 @@ const Picker = _ref => {
95
94
  key: o.value
96
95
  }))), /*#__PURE__*/React.createElement(_reactNative.View, {
97
96
  pointerEvents: "none"
97
+ }, /*#__PURE__*/React.createElement(_TextField.default, {
98
+ ...props,
99
+ value: selectedLabel,
100
+ placeholder: placeholder,
101
+ // @ts-ignore
102
+ ref: textField,
103
+ disabled: disabled,
104
+ // @ts-expect-error
105
+ style: stylesWithoutMargin
106
+ }))));
107
+ };
108
+ const styles = _reactNative.StyleSheet.create({
109
+ container: {
110
+ alignSelf: "stretch"
111
+ }
112
+ });
113
+ var _default = (0, _theming.withTheme)(Picker);
114
+ exports.default = _default;pointerEvents: "none"
98
115
  }, /*#__PURE__*/React.createElement(_TextField.default, _extends({}, props, {
99
116
  value: selectedLabel,
100
117
  placeholder: placeholder
@@ -8,7 +8,6 @@ var _react = _interopRequireWildcard(require("react"));
8
8
  var _reactNative = require("react-native");
9
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
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
11
  function Pressable(_ref) {
13
12
  let {
14
13
  children,
@@ -37,6 +36,18 @@ function Pressable(_ref) {
37
36
  opacity: getOpacity(pressed)
38
37
  }];
39
38
  }, [getOpacity, style]);
39
+ return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, {
40
+ onPress: onPress,
41
+ onLongPress: onLongPress,
42
+ disabled: disabled,
43
+ delayLongPress: delayLongPress ? delayLongPress : 500,
44
+ hitSlop: hitSlop ? hitSlop : 8,
45
+ style: _style,
46
+ ...props
47
+ }, children);
48
+ }ressed)
49
+ }];
50
+ }, [getOpacity, style]);
40
51
  return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, _extends({
41
52
  onPress: onPress,
42
53
  onLongPress: onLongPress,
@@ -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;
@@ -20,10 +20,18 @@ const SEED_DATA_PROPS = {
20
20
  }),
21
21
  disabled: (0, _types.createDisabledProp)(),
22
22
  loading: (0, _types.createLoadingProp)(),
23
- activeOpacity: (0, _types.createNumberProp)(),
24
- disabledOpacity: (0, _types.createNumberProp)(),
25
- delayLongPress: (0, _types.createNumberProp)(),
26
- hitSlop: (0, _types.createNumberProp)()
23
+ activeOpacity: (0, _types.createStaticNumberProp)({
24
+ required: false
25
+ }),
26
+ disabledOpacity: (0, _types.createStaticNumberProp)({
27
+ required: false
28
+ }),
29
+ delayLongPress: (0, _types.createStaticNumberProp)({
30
+ required: false
31
+ }),
32
+ hitSlop: (0, _types.createStaticNumberProp)({
33
+ required: false
34
+ })
27
35
  };
28
36
  const SEED_DATA = [{
29
37
  name: "Button Outline",
@@ -59,7 +67,6 @@ const SEED_DATA = [{
59
67
  stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.Background, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
60
68
  layout: {
61
69
  borderRadius: 8,
62
- height: 42,
63
70
  fontFamily: "system-700",
64
71
  backgroundColor: "primary",
65
72
  textAlign: "center"
@@ -128,8 +128,10 @@ const styles = StyleSheet.create({
128
128
  flexDirection: "row",
129
129
  alignItems: "center",
130
130
  justifyContent: "center",
131
- minHeight: CONSTANTS.baseHeight,
132
- paddingHorizontal: 12,
131
+ paddingTop: CONSTANTS.padding,
132
+ paddingLeft: CONSTANTS.padding,
133
+ paddingRight: CONSTANTS.padding,
134
+ paddingBottom: CONSTANTS.padding,
133
135
  fontFamily: "System",
134
136
  fontWeight: "700",
135
137
  ...Platform.select({
@@ -143,11 +145,6 @@ const styles = StyleSheet.create({
143
145
  backgroundColor: "transparent",
144
146
  borderWidth: 1
145
147
  },
146
- bare: {
147
- backgroundColor: "transparent",
148
- padding: 0,
149
- minHeight: undefined
150
- },
151
148
  loading: {
152
149
  marginRight: 6
153
150
  },
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createIconProp, createTextProp, createDisabledProp, createLoadingProp, createActionProp, Triggers, StylesPanelSections, createNumberProp } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createIconProp, createTextProp, createDisabledProp, createLoadingProp, createActionProp, Triggers, StylesPanelSections, createStaticNumberProp } from "@draftbit/types";
2
2
  const SEED_DATA_TRIGGERS = [Triggers.OnPress, Triggers.OnLongPress];
3
3
  const SEED_DATA_PROPS = {
4
4
  onPress: createActionProp(),
@@ -14,10 +14,18 @@ const SEED_DATA_PROPS = {
14
14
  }),
15
15
  disabled: createDisabledProp(),
16
16
  loading: createLoadingProp(),
17
- activeOpacity: createNumberProp(),
18
- disabledOpacity: createNumberProp(),
19
- delayLongPress: createNumberProp(),
20
- hitSlop: createNumberProp()
17
+ activeOpacity: createStaticNumberProp({
18
+ required: false
19
+ }),
20
+ disabledOpacity: createStaticNumberProp({
21
+ required: false
22
+ }),
23
+ delayLongPress: createStaticNumberProp({
24
+ required: false
25
+ }),
26
+ hitSlop: createStaticNumberProp({
27
+ required: false
28
+ })
21
29
  };
22
30
  export const SEED_DATA = [{
23
31
  name: "Button Outline",
@@ -53,7 +61,6 @@ export const SEED_DATA = [{
53
61
  stylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.Background, StylesPanelSections.Borders, StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position, StylesPanelSections.Effects],
54
62
  layout: {
55
63
  borderRadius: 8,
56
- height: 42,
57
64
  fontFamily: "system-700",
58
65
  backgroundColor: "primary",
59
66
  textAlign: "center"
@@ -9,7 +9,6 @@ export declare const SEED_DATA: ({
9
9
  fontFamily: string;
10
10
  borderWidth: number;
11
11
  textAlign: string;
12
- height?: undefined;
13
12
  };
14
13
  triggers: string[];
15
14
  props: {
@@ -120,118 +119,6 @@ export declare const SEED_DATA: ({
120
119
  backgroundColor: string;
121
120
  textAlign: string;
122
121
  borderWidth?: undefined;
123
- height?: undefined;
124
- };
125
- triggers: string[];
126
- props: {
127
- onPress: {
128
- label: string;
129
- description: string;
130
- editable: boolean;
131
- required: boolean;
132
- formType: string;
133
- propType: string;
134
- defaultValue: null;
135
- group: string;
136
- };
137
- onLongPress: {
138
- label: string;
139
- description: string;
140
- editable: boolean;
141
- required: boolean;
142
- formType: string;
143
- propType: string;
144
- defaultValue: null;
145
- group: string;
146
- };
147
- icon: {
148
- label: string;
149
- description: string;
150
- formType: string;
151
- propType: string;
152
- defaultValue: string;
153
- required: boolean;
154
- editable: boolean;
155
- group: string;
156
- };
157
- title: any;
158
- disabled: {
159
- label: string;
160
- description: string;
161
- group: string;
162
- editable: boolean;
163
- required: boolean;
164
- formType: string;
165
- propType: string;
166
- defaultValue: null;
167
- };
168
- loading: {
169
- label: string;
170
- description: string;
171
- group: string;
172
- editable: boolean;
173
- required: boolean;
174
- formType: string;
175
- propType: string;
176
- defaultValue: null;
177
- };
178
- activeOpacity: {
179
- label: string;
180
- description: string;
181
- formType: string;
182
- propType: string;
183
- group: string;
184
- defaultValue: null;
185
- editable: boolean;
186
- required: boolean;
187
- step: number;
188
- };
189
- disabledOpacity: {
190
- label: string;
191
- description: string;
192
- formType: string;
193
- propType: string;
194
- group: string;
195
- defaultValue: null;
196
- editable: boolean;
197
- required: boolean;
198
- step: number;
199
- };
200
- delayLongPress: {
201
- label: string;
202
- description: string;
203
- formType: string;
204
- propType: string;
205
- group: string;
206
- defaultValue: null;
207
- editable: boolean;
208
- required: boolean;
209
- step: number;
210
- };
211
- hitSlop: {
212
- label: string;
213
- description: string;
214
- formType: string;
215
- propType: string;
216
- group: string;
217
- defaultValue: null;
218
- editable: boolean;
219
- required: boolean;
220
- step: number;
221
- };
222
- };
223
- } | {
224
- name: string;
225
- tag: string;
226
- category: string;
227
- stylesPanelSections: string[];
228
- layout: {
229
- borderRadius: number;
230
- height: number;
231
- fontFamily: string;
232
- backgroundColor: string;
233
- textAlign: string;
234
- borderWidth?: undefined;
235
122
  };
236
123
  triggers: string[];
237
124
  props: {
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Button.ts"],"names":[],"mappings":"AAiCA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqErB,CAAC"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Button.ts"],"names":[],"mappings":"AAyCA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoErB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "47.0.1-17098e.2+17098ef",
3
+ "version": "47.0.1-50db3c.2+50db3c5",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -41,7 +41,7 @@
41
41
  "dependencies": {
42
42
  "@date-io/date-fns": "^1.3.13",
43
43
  "@draftbit/react-theme-provider": "^2.1.1",
44
- "@draftbit/types": "^47.0.1-17098e.2+17098ef",
44
+ "@draftbit/types": "^47.0.1-50db3c.2+50db3c5",
45
45
  "@material-ui/core": "^4.11.0",
46
46
  "@material-ui/pickers": "^3.2.10",
47
47
  "@react-native-community/slider": "4.2.4",
@@ -91,5 +91,5 @@
91
91
  ]
92
92
  ]
93
93
  },
94
- "gitHead": "17098ef43f2803aa04abc191f3f193bd8f8e7103"
94
+ "gitHead": "50db3c5dad0007d8c59f2fa8f3b896e35e03f6e9"
95
95
  }
@@ -81,8 +81,10 @@ const styles = StyleSheet.create({
81
81
  flexDirection: "row",
82
82
  alignItems: "center",
83
83
  justifyContent: "center",
84
- minHeight: CONSTANTS.baseHeight,
85
- paddingHorizontal: 12,
84
+ paddingTop: CONSTANTS.padding,
85
+ paddingLeft: CONSTANTS.padding,
86
+ paddingRight: CONSTANTS.padding,
87
+ paddingBottom: CONSTANTS.padding,
86
88
  fontFamily: "System",
87
89
  fontWeight: "700",
88
90
  ...Platform.select({
@@ -96,11 +98,6 @@ const styles = StyleSheet.create({
96
98
  backgroundColor: "transparent",
97
99
  borderWidth: 1,
98
100
  },
99
- bare: {
100
- backgroundColor: "transparent",
101
- padding: 0,
102
- minHeight: undefined,
103
- },
104
101
  loading: {
105
102
  marginRight: 6,
106
103
  },
@@ -202,8 +202,10 @@ const styles = StyleSheet.create({
202
202
  flexDirection: "row",
203
203
  alignItems: "center",
204
204
  justifyContent: "center",
205
- minHeight: CONSTANTS.baseHeight,
206
- paddingHorizontal: 12,
205
+ paddingTop: CONSTANTS.padding,
206
+ paddingLeft: CONSTANTS.padding,
207
+ paddingRight: CONSTANTS.padding,
208
+ paddingBottom: CONSTANTS.padding,
207
209
  fontFamily: "System",
208
210
  fontWeight: "700",
209
211
  ...Platform.select({
@@ -217,11 +219,6 @@ const styles = StyleSheet.create({
217
219
  backgroundColor: "transparent",
218
220
  borderWidth: 1,
219
221
  },
220
- bare: {
221
- backgroundColor: "transparent",
222
- padding: 0,
223
- minHeight: undefined,
224
- },
225
222
  loading: {
226
223
  marginRight: 6,
227
224
  },
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createIconProp, createTextProp, createDisabledProp, createLoadingProp, createActionProp, Triggers, StylesPanelSections, createNumberProp, } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createIconProp, createTextProp, createDisabledProp, createLoadingProp, createActionProp, Triggers, StylesPanelSections, createStaticNumberProp, } from "@draftbit/types";
2
2
  const SEED_DATA_TRIGGERS = [Triggers.OnPress, Triggers.OnLongPress];
3
3
  const SEED_DATA_PROPS = {
4
4
  onPress: createActionProp(),
@@ -14,10 +14,18 @@ const SEED_DATA_PROPS = {
14
14
  }),
15
15
  disabled: createDisabledProp(),
16
16
  loading: createLoadingProp(),
17
- activeOpacity: createNumberProp(),
18
- disabledOpacity: createNumberProp(),
19
- delayLongPress: createNumberProp(),
20
- hitSlop: createNumberProp(),
17
+ activeOpacity: createStaticNumberProp({
18
+ required: false,
19
+ }),
20
+ disabledOpacity: createStaticNumberProp({
21
+ required: false,
22
+ }),
23
+ delayLongPress: createStaticNumberProp({
24
+ required: false,
25
+ }),
26
+ hitSlop: createStaticNumberProp({
27
+ required: false,
28
+ }),
21
29
  };
22
30
  export const SEED_DATA = [
23
31
  {
@@ -80,7 +88,6 @@ export const SEED_DATA = [
80
88
  ],
81
89
  layout: {
82
90
  borderRadius: 8,
83
- height: 42,
84
91
  fontFamily: "system-700",
85
92
  backgroundColor: "primary",
86
93
  textAlign: "center",
@@ -7,7 +7,7 @@ import {
7
7
  createActionProp,
8
8
  Triggers,
9
9
  StylesPanelSections,
10
- createNumberProp,
10
+ createStaticNumberProp,
11
11
  } from "@draftbit/types";
12
12
 
13
13
  const SEED_DATA_TRIGGERS = [Triggers.OnPress, Triggers.OnLongPress];
@@ -25,10 +25,18 @@ const SEED_DATA_PROPS = {
25
25
  }),
26
26
  disabled: createDisabledProp(),
27
27
  loading: createLoadingProp(),
28
- activeOpacity: createNumberProp(),
29
- disabledOpacity: createNumberProp(),
30
- delayLongPress: createNumberProp(),
31
- hitSlop: createNumberProp(),
28
+ activeOpacity: createStaticNumberProp({
29
+ required: false,
30
+ }),
31
+ disabledOpacity: createStaticNumberProp({
32
+ required: false,
33
+ }),
34
+ delayLongPress: createStaticNumberProp({
35
+ required: false,
36
+ }),
37
+ hitSlop: createStaticNumberProp({
38
+ required: false,
39
+ }),
32
40
  };
33
41
 
34
42
  export const SEED_DATA = [
@@ -92,7 +100,6 @@ export const SEED_DATA = [
92
100
  ],
93
101
  layout: {
94
102
  borderRadius: 8,
95
- height: 42,
96
103
  fontFamily: "system-700",
97
104
  backgroundColor: "primary",
98
105
  textAlign: "center",