@draftbit/core 46.10.2-9a00ea.2 → 46.10.2-a6ec8c.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 (42) hide show
  1. package/lib/commonjs/components/BottomSheet/BottomSheetComponent.js +127 -111
  2. package/lib/commonjs/components/Checkbox/context.js +1 -1
  3. package/lib/commonjs/components/DeprecatedFAB.js +21 -3
  4. package/lib/commonjs/components/TabView/TabView.js +13 -7
  5. package/lib/commonjs/index.js +0 -21
  6. package/lib/commonjs/mappings/NativeBase/Layout.js +98 -0
  7. package/lib/module/components/Banner.js +25 -4
  8. package/lib/module/index.js +0 -3
  9. package/lib/module/mappings/NativeBase/Layout.js +91 -0
  10. package/lib/typescript/src/index.d.ts +0 -3
  11. package/lib/typescript/src/index.d.ts.map +1 -1
  12. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +97 -0
  13. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +1 -0
  14. package/package.json +3 -3
  15. package/src/index.js +0 -3
  16. package/src/index.tsx +0 -3
  17. package/src/mappings/NativeBase/Layout.js +102 -0
  18. package/src/mappings/NativeBase/Layout.ts +117 -0
  19. package/lib/commonjs/components/Row.js +0 -73
  20. package/lib/commonjs/components/RowBodyIcon.js +0 -45
  21. package/lib/commonjs/components/RowHeadlineImageCaption.js +0 -45
  22. package/lib/commonjs/components/RowHeadlineImageIcon.js +0 -51
  23. package/lib/module/components/Row.js +0 -63
  24. package/lib/module/components/RowBodyIcon.js +0 -35
  25. package/lib/module/components/RowHeadlineImageCaption.js +0 -35
  26. package/lib/module/components/RowHeadlineImageIcon.js +0 -41
  27. package/lib/typescript/src/components/Row.d.ts +0 -21
  28. package/lib/typescript/src/components/Row.d.ts.map +0 -1
  29. package/lib/typescript/src/components/RowBodyIcon.d.ts +0 -16
  30. package/lib/typescript/src/components/RowBodyIcon.d.ts.map +0 -1
  31. package/lib/typescript/src/components/RowHeadlineImageCaption.d.ts +0 -16
  32. package/lib/typescript/src/components/RowHeadlineImageCaption.d.ts.map +0 -1
  33. package/lib/typescript/src/components/RowHeadlineImageIcon.d.ts +0 -18
  34. package/lib/typescript/src/components/RowHeadlineImageIcon.d.ts.map +0 -1
  35. package/src/components/Row.js +0 -48
  36. package/src/components/Row.tsx +0 -108
  37. package/src/components/RowBodyIcon.js +0 -8
  38. package/src/components/RowBodyIcon.tsx +0 -47
  39. package/src/components/RowHeadlineImageCaption.js +0 -12
  40. package/src/components/RowHeadlineImageCaption.tsx +0 -49
  41. package/src/components/RowHeadlineImageIcon.js +0 -14
  42. package/src/components/RowHeadlineImageIcon.tsx +0 -61
@@ -10,10 +10,19 @@ var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reani
10
10
  var _reactNativeGestureHandler = require("react-native-gesture-handler");
11
11
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
12
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
14
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
16
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
13
+ /**
14
+ * Slightly modfied version as taken from https://github.com/rgommezz/react-native-scroll-bottom-sheet
15
+ * Main previously breaking change:
16
+ * const node = this.props.innerRef.current?.getNode() ==> const node = this.props.innerRef.current as any
17
+ */
18
+ /**
19
+ * Copyright (c) 2020 Raul Gomez Acuna
20
+ *
21
+ * This source code is licensed under the MIT license found in the
22
+ * LICENSE file in the root directory of this source tree.
23
+ *
24
+ */
25
+
17
26
  const {
18
27
  //@ts-ignore
19
28
  interpolate: interpolateDeprecated,
@@ -73,85 +82,42 @@ const imperativeScrollOptions = {
73
82
  }
74
83
  };
75
84
  class ScrollBottomSheet extends _react.Component {
76
- /**
77
- * Gesture Handler references
78
- */
79
-
80
- /**
81
- * ScrollView prop
82
- */
83
-
84
- /**
85
- * Pan gesture handler events for drawer handle and content
86
- */
87
-
88
- /**
89
- * Main Animated Value that drives the top position of the UI drawer at any point in time
90
- */
91
-
92
- /**
93
- * Animated value that keeps track of the position: 0 => closed, 1 => opened
94
- */
95
-
96
- /**
97
- * Flag to indicate imperative snapping
98
- */
99
-
100
- /**
101
- * Manual snapping amount
102
- */
103
-
104
- /**
105
- * Keeps track of the current index
106
- */
107
-
108
- /**
109
- * Deceleration rate of the scroll component. This is used only on Android to
110
- * compensate the unexpected glide it gets sometimes.
111
- */
112
-
113
85
  constructor(props) {
114
- var _props$animationConfi, _this;
86
+ var _this;
87
+ var _a;
115
88
  super(props);
116
89
  _this = this;
117
- _defineProperty(this, "masterDrawer", /*#__PURE__*/_react.default.createRef());
118
- _defineProperty(this, "drawerHandleRef", /*#__PURE__*/_react.default.createRef());
119
- _defineProperty(this, "drawerContentRef", /*#__PURE__*/_react.default.createRef());
120
- _defineProperty(this, "scrollComponentRef", /*#__PURE__*/_react.default.createRef());
121
- _defineProperty(this, "onScrollBeginDrag", void 0);
122
- _defineProperty(this, "onHandleGestureEvent", void 0);
123
- _defineProperty(this, "onDrawerGestureEvent", void 0);
124
- _defineProperty(this, "translateY", void 0);
125
- _defineProperty(this, "position", void 0);
126
- _defineProperty(this, "isManuallySetValue", new _reactNativeReanimated.Value(0));
127
- _defineProperty(this, "manualYOffset", new _reactNativeReanimated.Value(0));
128
- _defineProperty(this, "nextSnapIndex", void 0);
129
- _defineProperty(this, "decelerationRate", void 0);
130
- _defineProperty(this, "prevSnapIndex", -1);
131
- _defineProperty(this, "dragY", new _reactNativeReanimated.Value(0));
132
- _defineProperty(this, "prevDragY", new _reactNativeReanimated.Value(0));
133
- _defineProperty(this, "tempDestSnapPoint", new _reactNativeReanimated.Value(0));
134
- _defineProperty(this, "isAndroid", new _reactNativeReanimated.Value(Number(_reactNative.Platform.OS === "android")));
135
- _defineProperty(this, "animationClock", new _reactNativeReanimated.Clock());
136
- _defineProperty(this, "animationPosition", new _reactNativeReanimated.Value(0));
137
- _defineProperty(this, "animationFinished", new _reactNativeReanimated.Value(0));
138
- _defineProperty(this, "animationFrameTime", new _reactNativeReanimated.Value(0));
139
- _defineProperty(this, "velocityY", new _reactNativeReanimated.Value(0));
140
- _defineProperty(this, "lastStartScrollY", new _reactNativeReanimated.Value(0));
141
- _defineProperty(this, "prevTranslateYOffset", void 0);
142
- _defineProperty(this, "translationY", void 0);
143
- _defineProperty(this, "destSnapPoint", new _reactNativeReanimated.Value(0));
144
- _defineProperty(this, "lastSnap", void 0);
145
- _defineProperty(this, "dragWithHandle", new _reactNativeReanimated.Value(0));
146
- _defineProperty(this, "scrollUpAndPullDown", new _reactNativeReanimated.Value(0));
147
- _defineProperty(this, "didGestureFinish", void 0);
148
- _defineProperty(this, "didScrollUpAndPullDown", void 0);
149
- _defineProperty(this, "setTranslationY", void 0);
150
- _defineProperty(this, "extraOffset", void 0);
151
- _defineProperty(this, "calculateNextSnapPoint", void 0);
152
- _defineProperty(this, "scrollComponent", void 0);
153
- _defineProperty(this, "convertPercentageToDp", str => Number(str.split("%")[0]) * (windowHeight - this.props.topInset) / 100);
154
- _defineProperty(this, "getNormalisedSnapPoints", () => {
90
+ /**
91
+ * Gesture Handler references
92
+ */
93
+ this.masterDrawer = /*#__PURE__*/_react.default.createRef();
94
+ this.drawerHandleRef = /*#__PURE__*/_react.default.createRef();
95
+ this.drawerContentRef = /*#__PURE__*/_react.default.createRef();
96
+ this.scrollComponentRef = /*#__PURE__*/_react.default.createRef();
97
+ /**
98
+ * Flag to indicate imperative snapping
99
+ */
100
+ this.isManuallySetValue = new _reactNativeReanimated.Value(0);
101
+ /**
102
+ * Manual snapping amount
103
+ */
104
+ this.manualYOffset = new _reactNativeReanimated.Value(0);
105
+ this.prevSnapIndex = -1;
106
+ this.dragY = new _reactNativeReanimated.Value(0);
107
+ this.prevDragY = new _reactNativeReanimated.Value(0);
108
+ this.tempDestSnapPoint = new _reactNativeReanimated.Value(0);
109
+ this.isAndroid = new _reactNativeReanimated.Value(Number(_reactNative.Platform.OS === "android"));
110
+ this.animationClock = new _reactNativeReanimated.Clock();
111
+ this.animationPosition = new _reactNativeReanimated.Value(0);
112
+ this.animationFinished = new _reactNativeReanimated.Value(0);
113
+ this.animationFrameTime = new _reactNativeReanimated.Value(0);
114
+ this.velocityY = new _reactNativeReanimated.Value(0);
115
+ this.lastStartScrollY = new _reactNativeReanimated.Value(0);
116
+ this.destSnapPoint = new _reactNativeReanimated.Value(0);
117
+ this.dragWithHandle = new _reactNativeReanimated.Value(0);
118
+ this.scrollUpAndPullDown = new _reactNativeReanimated.Value(0);
119
+ this.convertPercentageToDp = str => Number(str.split("%")[0]) * (windowHeight - this.props.topInset) / 100;
120
+ this.getNormalisedSnapPoints = () => {
155
121
  return this.props.snapPoints.map(p => {
156
122
  if (typeof p === "string") {
157
123
  return this.convertPercentageToDp(p);
@@ -160,8 +126,8 @@ class ScrollBottomSheet extends _react.Component {
160
126
  }
161
127
  throw new Error("Invalid type for value ".concat(p, ": ").concat(typeof p, ". It should be either a percentage string or a number"));
162
128
  });
163
- });
164
- _defineProperty(this, "getScrollComponent", () => {
129
+ };
130
+ this.getScrollComponent = () => {
165
131
  switch (this.props.componentType) {
166
132
  case "FlatList":
167
133
  return _reactNative.FlatList;
@@ -172,33 +138,32 @@ class ScrollBottomSheet extends _react.Component {
172
138
  default:
173
139
  throw new Error("Component type not supported: it should be one of `FlatList`, `ScrollView` or `SectionList`");
174
140
  }
175
- });
176
- _defineProperty(this, "snapTo", index => {
141
+ };
142
+ this.snapTo = index => {
177
143
  const snapPoints = this.getNormalisedSnapPoints();
178
144
  this.isManuallySetValue.setValue(1);
179
145
  this.manualYOffset.setValue(snapPoints[index]);
180
146
  this.nextSnapIndex.setValue(index);
181
- });
147
+ };
182
148
  const {
183
149
  initialSnapIndex,
184
150
  animationType
185
151
  } = props;
186
152
  const animationDriver = animationType === "timing" ? 0 : 1;
187
- const animationDuration = props.animationType === "timing" && ((_props$animationConfi = props.animationConfig) === null || _props$animationConfi === void 0 ? void 0 : _props$animationConfi.duration) || DEFAULT_ANIMATION_DURATION;
153
+ const animationDuration = props.animationType === "timing" && ((_a = props.animationConfig) === null || _a === void 0 ? void 0 : _a.duration) || DEFAULT_ANIMATION_DURATION;
188
154
  const ScrollComponent = this.getScrollComponent();
189
155
  // @ts-ignore
190
156
  this.scrollComponent = _reactNativeReanimated.default.createAnimatedComponent(ScrollComponent);
191
- const _snapPoints = this.getNormalisedSnapPoints();
192
- const openPosition = _snapPoints[0];
193
- const closedPosition = this.props.enableOverScroll ? windowHeight : _snapPoints[_snapPoints.length - 1];
194
- const initialSnap = _snapPoints[initialSnapIndex];
157
+ const snapPoints = this.getNormalisedSnapPoints();
158
+ const openPosition = snapPoints[0];
159
+ const closedPosition = this.props.enableOverScroll ? windowHeight : snapPoints[snapPoints.length - 1];
160
+ const initialSnap = snapPoints[initialSnapIndex];
195
161
  this.nextSnapIndex = new _reactNativeReanimated.Value(initialSnapIndex);
196
162
  const initialDecelerationRate = _reactNative.Platform.select({
197
163
  android: props.initialSnapIndex === 0 ? ANDROID_NORMAL_DECELERATION_RATE : 0,
198
164
  ios: IOS_NORMAL_DECELERATION_RATE
199
165
  });
200
166
  this.decelerationRate = new _reactNativeReanimated.Value(initialDecelerationRate);
201
-
202
167
  //@ts-ignore
203
168
  const handleGestureState = new _reactNativeReanimated.Value(-1);
204
169
  //@ts-ignore
@@ -237,29 +202,27 @@ class ScrollBottomSheet extends _react.Component {
237
202
  const didHandleGestureBegin = (0, _reactNativeReanimated.eq)(handleGestureState, _reactNativeGestureHandler.State.ACTIVE);
238
203
  const isAnimationInterrupted = (0, _reactNativeReanimated.and)((0, _reactNativeReanimated.or)((0, _reactNativeReanimated.eq)(handleGestureState, _reactNativeGestureHandler.State.BEGAN), (0, _reactNativeReanimated.eq)(drawerGestureState, _reactNativeGestureHandler.State.BEGAN), (0, _reactNativeReanimated.and)((0, _reactNativeReanimated.eq)(this.isAndroid, 0), (0, _reactNativeReanimated.eq)(animationDriver, 1), (0, _reactNativeReanimated.or)((0, _reactNativeReanimated.eq)(drawerGestureState, _reactNativeGestureHandler.State.ACTIVE), (0, _reactNativeReanimated.eq)(handleGestureState, _reactNativeGestureHandler.State.ACTIVE)))), (0, _reactNativeReanimated.clockRunning)(this.animationClock));
239
204
  this.didGestureFinish = (0, _reactNativeReanimated.or)((0, _reactNativeReanimated.and)((0, _reactNativeReanimated.eq)(handleOldGestureState, _reactNativeGestureHandler.State.ACTIVE), (0, _reactNativeReanimated.eq)(handleGestureState, _reactNativeGestureHandler.State.END)), (0, _reactNativeReanimated.and)((0, _reactNativeReanimated.eq)(drawerOldGestureState, _reactNativeGestureHandler.State.ACTIVE), (0, _reactNativeReanimated.eq)(drawerGestureState, _reactNativeGestureHandler.State.END)));
240
-
241
205
  // Function that determines if the last snap point is in the range {snapPoints}
242
206
  // In the case of interruptions in the middle of an animation, we'll get
243
207
  // lastSnap values outside the range
244
208
  const isLastSnapPointInRange = function () {
245
209
  let i = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
246
- return i === _snapPoints.length ? lastSnapInRange : (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(_this.lastSnap, _snapPoints[i]), [(0, _reactNativeReanimated.set)(lastSnapInRange, 1)], isLastSnapPointInRange(i + 1));
210
+ return i === snapPoints.length ? lastSnapInRange : (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(_this.lastSnap, snapPoints[i]), [(0, _reactNativeReanimated.set)(lastSnapInRange, 1)], isLastSnapPointInRange(i + 1));
247
211
  };
248
- const scrollY = [(0, _reactNativeReanimated.set)(lastSnapInRange, 0), isLastSnapPointInRange(), (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.or)(didHandleGestureBegin, (0, _reactNativeReanimated.and)(this.isManuallySetValue, (0, _reactNativeReanimated.not)((0, _reactNativeReanimated.eq)(this.manualYOffset, _snapPoints[0])))), [(0, _reactNativeReanimated.set)(this.dragWithHandle, 1), 0]), (0, _reactNativeReanimated.cond)(
212
+ const scrollY = [(0, _reactNativeReanimated.set)(lastSnapInRange, 0), isLastSnapPointInRange(), (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.or)(didHandleGestureBegin, (0, _reactNativeReanimated.and)(this.isManuallySetValue, (0, _reactNativeReanimated.not)((0, _reactNativeReanimated.eq)(this.manualYOffset, snapPoints[0])))), [(0, _reactNativeReanimated.set)(this.dragWithHandle, 1), 0]), (0, _reactNativeReanimated.cond)(
249
213
  // This is to account for a continuous scroll on the drawer from a snap point
250
214
  // Different than top, bringing the drawer to the top position, so that if we
251
215
  // change scroll direction without releasing the gesture, it doesn't pull down the drawer again
252
- (0, _reactNativeReanimated.and)((0, _reactNativeReanimated.eq)(this.dragWithHandle, 1), (0, _reactNativeReanimated.greaterThan)(_snapPoints[0], (0, _reactNativeReanimated.add)(this.lastSnap, this.dragY)), (0, _reactNativeReanimated.and)((0, _reactNativeReanimated.not)((0, _reactNativeReanimated.eq)(this.lastSnap, _snapPoints[0])), lastSnapInRange)), [(0, _reactNativeReanimated.set)(this.lastSnap, _snapPoints[0]), (0, _reactNativeReanimated.set)(this.dragWithHandle, 0), this.lastStartScrollY], (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(this.dragWithHandle, 1), 0, this.lastStartScrollY))];
216
+ (0, _reactNativeReanimated.and)((0, _reactNativeReanimated.eq)(this.dragWithHandle, 1), (0, _reactNativeReanimated.greaterThan)(snapPoints[0], (0, _reactNativeReanimated.add)(this.lastSnap, this.dragY)), (0, _reactNativeReanimated.and)((0, _reactNativeReanimated.not)((0, _reactNativeReanimated.eq)(this.lastSnap, snapPoints[0])), lastSnapInRange)), [(0, _reactNativeReanimated.set)(this.lastSnap, snapPoints[0]), (0, _reactNativeReanimated.set)(this.dragWithHandle, 0), this.lastStartScrollY], (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(this.dragWithHandle, 1), 0, this.lastStartScrollY))];
253
217
  this.didScrollUpAndPullDown = (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.and)((0, _reactNativeReanimated.greaterOrEq)(this.dragY, this.lastStartScrollY), (0, _reactNativeReanimated.greaterThan)(this.lastStartScrollY, 0)), (0, _reactNativeReanimated.set)(this.scrollUpAndPullDown, 1));
254
218
  this.setTranslationY = (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.and)((0, _reactNativeReanimated.not)(this.dragWithHandle), (0, _reactNativeReanimated.not)((0, _reactNativeReanimated.greaterOrEq)(this.dragY, this.lastStartScrollY))), (0, _reactNativeReanimated.set)(this.translationY, (0, _reactNativeReanimated.sub)(this.dragY, this.lastStartScrollY)), (0, _reactNativeReanimated.set)(this.translationY, this.dragY));
255
219
  this.extraOffset = (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(this.scrollUpAndPullDown, 1), this.lastStartScrollY, 0);
256
220
  const endOffsetY = (0, _reactNativeReanimated.add)(this.lastSnap, this.translationY, (0, _reactNativeReanimated.multiply)(1 - props.friction, this.velocityY));
257
221
  this.calculateNextSnapPoint = function () {
258
222
  let i = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
259
- return i === _snapPoints.length ? _this.tempDestSnapPoint : (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.greaterThan)((0, _reactNativeReanimated.abs)((0, _reactNativeReanimated.sub)(_this.tempDestSnapPoint, endOffsetY)), (0, _reactNativeReanimated.abs)((0, _reactNativeReanimated.sub)((0, _reactNativeReanimated.add)(_snapPoints[i], _this.extraOffset), endOffsetY))), [(0, _reactNativeReanimated.set)(_this.tempDestSnapPoint, (0, _reactNativeReanimated.add)(_snapPoints[i], _this.extraOffset)), (0, _reactNativeReanimated.set)(_this.nextSnapIndex, i), _this.calculateNextSnapPoint(i + 1)], _this.calculateNextSnapPoint(i + 1));
223
+ return i === snapPoints.length ? _this.tempDestSnapPoint : (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.greaterThan)((0, _reactNativeReanimated.abs)((0, _reactNativeReanimated.sub)(_this.tempDestSnapPoint, endOffsetY)), (0, _reactNativeReanimated.abs)((0, _reactNativeReanimated.sub)((0, _reactNativeReanimated.add)(snapPoints[i], _this.extraOffset), endOffsetY))), [(0, _reactNativeReanimated.set)(_this.tempDestSnapPoint, (0, _reactNativeReanimated.add)(snapPoints[i], _this.extraOffset)), (0, _reactNativeReanimated.set)(_this.nextSnapIndex, i), _this.calculateNextSnapPoint(i + 1)], _this.calculateNextSnapPoint(i + 1));
260
224
  };
261
225
  const runAnimation = _ref => {
262
- var _props$animationConfi2;
263
226
  let {
264
227
  clock,
265
228
  from,
@@ -269,6 +232,7 @@ class ScrollBottomSheet extends _react.Component {
269
232
  velocity,
270
233
  frameTime
271
234
  } = _ref;
235
+ var _a;
272
236
  const state = {
273
237
  finished,
274
238
  velocity: new _reactNativeReanimated.Value(0),
@@ -278,7 +242,7 @@ class ScrollBottomSheet extends _react.Component {
278
242
  };
279
243
  const timingConfig = {
280
244
  duration: animationDuration,
281
- easing: props.animationType === "timing" && ((_props$animationConfi2 = props.animationConfig) === null || _props$animationConfi2 === void 0 ? void 0 : _props$animationConfi2.easing) || DEFAULT_EASING,
245
+ easing: props.animationType === "timing" && ((_a = props.animationConfig) === null || _a === void 0 ? void 0 : _a.easing) || DEFAULT_EASING,
282
246
  toValue: new _reactNativeReanimated.Value(0)
283
247
  };
284
248
  const springConfig = {
@@ -294,14 +258,14 @@ class ScrollBottomSheet extends _react.Component {
294
258
  //@ts-ignore
295
259
  (0, _reactNativeReanimated.timing)(clock, state, timingConfig), (0, _reactNativeReanimated.spring)(clock, state, springConfig)), (0, _reactNativeReanimated.cond)(state.finished, [(0, _reactNativeReanimated.call)([this.nextSnapIndex], _ref2 => {
296
260
  let [value] = _ref2;
261
+ var _a, _b;
297
262
  if (value !== this.prevSnapIndex) {
298
- var _this$props$onSettle, _this$props;
299
- (_this$props$onSettle = (_this$props = this.props).onSettle) === null || _this$props$onSettle === void 0 ? void 0 : _this$props$onSettle.call(_this$props, value);
263
+ (_b = (_a = this.props).onSettle) === null || _b === void 0 ? void 0 : _b.call(_a, value);
300
264
  }
301
265
  this.prevSnapIndex = value;
302
266
  }),
303
267
  // Resetting appropriate values
304
- (0, _reactNativeReanimated.set)(drawerOldGestureState, _reactNativeGestureHandler.State.END), (0, _reactNativeReanimated.set)(handleOldGestureState, _reactNativeGestureHandler.State.END), (0, _reactNativeReanimated.set)(this.prevTranslateYOffset, state.position), (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(this.scrollUpAndPullDown, 1), [(0, _reactNativeReanimated.set)(this.prevTranslateYOffset, (0, _reactNativeReanimated.sub)(this.prevTranslateYOffset, this.lastStartScrollY)), (0, _reactNativeReanimated.set)(this.lastStartScrollY, 0), (0, _reactNativeReanimated.set)(this.scrollUpAndPullDown, 0)]), (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(this.destSnapPoint, _snapPoints[0]), [(0, _reactNativeReanimated.set)(this.dragWithHandle, 0)]), (0, _reactNativeReanimated.set)(this.isManuallySetValue, 0), (0, _reactNativeReanimated.set)(this.manualYOffset, 0), (0, _reactNativeReanimated.stopClock)(clock), this.prevTranslateYOffset],
268
+ (0, _reactNativeReanimated.set)(drawerOldGestureState, _reactNativeGestureHandler.State.END), (0, _reactNativeReanimated.set)(handleOldGestureState, _reactNativeGestureHandler.State.END), (0, _reactNativeReanimated.set)(this.prevTranslateYOffset, state.position), (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(this.scrollUpAndPullDown, 1), [(0, _reactNativeReanimated.set)(this.prevTranslateYOffset, (0, _reactNativeReanimated.sub)(this.prevTranslateYOffset, this.lastStartScrollY)), (0, _reactNativeReanimated.set)(this.lastStartScrollY, 0), (0, _reactNativeReanimated.set)(this.scrollUpAndPullDown, 0)]), (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(this.destSnapPoint, snapPoints[0]), [(0, _reactNativeReanimated.set)(this.dragWithHandle, 0)]), (0, _reactNativeReanimated.set)(this.isManuallySetValue, 0), (0, _reactNativeReanimated.set)(this.manualYOffset, 0), (0, _reactNativeReanimated.stopClock)(clock), this.prevTranslateYOffset],
305
269
  // We made the block return the updated position,
306
270
  state.position)];
307
271
  };
@@ -330,7 +294,7 @@ class ScrollBottomSheet extends _react.Component {
330
294
  extrapolate: _reactNativeReanimated.Extrapolate.CLAMP
331
295
  });
332
296
  this.position = interpolate(this.translateY, {
333
- inputRange: [openPosition, _snapPoints[_snapPoints.length - 1]],
297
+ inputRange: [openPosition, snapPoints[snapPoints.length - 1]],
334
298
  outputRange: [1, 0],
335
299
  extrapolate: _reactNativeReanimated.Extrapolate.CLAMP
336
300
  });
@@ -371,26 +335,25 @@ class ScrollBottomSheet extends _react.Component {
371
335
  ref: this.scrollComponentRef,
372
336
  waitFor: this.masterDrawer,
373
337
  simultaneousHandlers: this.drawerContentRef
374
- }, /*#__PURE__*/_react.default.createElement(AnimatedScrollableComponent, _extends({
338
+ }, /*#__PURE__*/_react.default.createElement(AnimatedScrollableComponent, {
375
339
  overScrollMode: "never",
376
- bounces: false
377
- }, rest, {
378
- ref: this.props.innerRef
340
+ bounces: false,
341
+ ...rest,
342
+ ref: this.props.innerRef,
379
343
  // @ts-ignore
380
- ,
381
344
  decelerationRate: this.decelerationRate,
382
345
  onScrollBeginDrag: this.onScrollBeginDrag,
383
346
  scrollEventThrottle: 1,
384
347
  contentContainerStyle: [rest.contentContainerStyle, {
385
348
  paddingBottom: this.getNormalisedSnapPoints()[0]
386
349
  }]
387
- }))))), this.props.animatedPosition && /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.Code, {
350
+ })))), this.props.animatedPosition && /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.Code, {
388
351
  exec: (0, _reactNativeReanimated.onChange)(this.position, (0, _reactNativeReanimated.set)(this.props.animatedPosition, this.position))
389
352
  }), /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.Code, {
390
353
  exec: (0, _reactNativeReanimated.onChange)(this.dragY, (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.not)((0, _reactNativeReanimated.eq)(this.dragY, 0)), (0, _reactNativeReanimated.set)(this.prevDragY, this.dragY)))
391
354
  }), /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.Code, {
392
355
  exec: (0, _reactNativeReanimated.onChange)(this.didGestureFinish, (0, _reactNativeReanimated.cond)(this.didGestureFinish, [this.didScrollUpAndPullDown, this.setTranslationY, (0, _reactNativeReanimated.set)(this.tempDestSnapPoint, (0, _reactNativeReanimated.add)(normalisedSnapPoints[0], this.extraOffset)), (0, _reactNativeReanimated.set)(this.nextSnapIndex, 0), (0, _reactNativeReanimated.set)(this.destSnapPoint, this.calculateNextSnapPoint()), (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.and)((0, _reactNativeReanimated.greaterThan)(this.dragY, this.lastStartScrollY), this.isAndroid, (0, _reactNativeReanimated.not)(this.dragWithHandle)), (0, _reactNativeReanimated.call)([], () => {
393
- var _this$props2, _this$props2$data;
356
+ var _a, _b;
394
357
  // This prevents the scroll glide from happening on Android when pulling down with inertia.
395
358
  // It's not perfect, but does the job for now
396
359
  const {
@@ -399,14 +362,67 @@ class ScrollBottomSheet extends _react.Component {
399
362
  } = imperativeScrollOptions[this.props.componentType];
400
363
  // @ts-ignore
401
364
  const node = this.props.innerRef.current;
402
- if (node && node[method] && (this.props.componentType === "FlatList" && (((_this$props2 = this.props) === null || _this$props2 === void 0 ? void 0 : (_this$props2$data = _this$props2.data) === null || _this$props2$data === void 0 ? void 0 : _this$props2$data.length) || 0) > 0 || this.props.componentType === "SectionList" && this.props.sections.length > 0 || this.props.componentType === "ScrollView")) {
365
+ if (node && node[method] && (this.props.componentType === "FlatList" && (((_b = (_a = this.props) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.length) || 0) > 0 || this.props.componentType === "SectionList" && this.props.sections.length > 0 || this.props.componentType === "ScrollView")) {
403
366
  node[method](args);
404
367
  }
405
368
  })), (0, _reactNativeReanimated.set)(this.dragY, 0), (0, _reactNativeReanimated.set)(this.velocityY, 0), (0, _reactNativeReanimated.set)(this.lastSnap, (0, _reactNativeReanimated.sub)(this.destSnapPoint, (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(this.scrollUpAndPullDown, 1), this.lastStartScrollY, 0))), (0, _reactNativeReanimated.call)([this.lastSnap], _ref3 => {
406
- var _this$masterDrawer, _this$masterDrawer$cu;
407
369
  let [value] = _ref3;
370
+ var _a, _b;
371
+ // This is the TapGHandler trick
372
+ // @ts-ignore
373
+ (_b = (_a = this.masterDrawer) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.setNativeProps({
374
+ maxDeltaY: value - this.getNormalisedSnapPoints()[0]
375
+ });
376
+ }), (0, _reactNativeReanimated.set)(this.decelerationRate, (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(this.isAndroid, 1), (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(this.lastSnap, normalisedSnapPoints[0]), ANDROID_NORMAL_DECELERATION_RATE, 0), IOS_NORMAL_DECELERATION_RATE))]))
377
+ }), /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.Code, {
378
+ exec: (0, _reactNativeReanimated.onChange)(this.isManuallySetValue, [(0, _reactNativeReanimated.cond)(this.isManuallySetValue, [(0, _reactNativeReanimated.set)(this.destSnapPoint, this.manualYOffset), (0, _reactNativeReanimated.set)(this.animationFinished, 0), (0, _reactNativeReanimated.set)(this.lastSnap, this.manualYOffset), (0, _reactNativeReanimated.call)([this.lastSnap], _ref4 => {
379
+ let [value] = _ref4;
380
+ var _a, _b;
408
381
  // This is the TapGHandler trick
409
382
  // @ts-ignore
383
+ (_b = (_a = this.masterDrawer) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.setNativeProps({
384
+ maxDeltaY: value - this.getNormalisedSnapPoints()[0]
385
+ });
386
+ })], [(0, _reactNativeReanimated.set)(this.nextSnapIndex, 0)])])
387
+ }));
388
+ // On Android, having an intermediary view with pointerEvents="box-none", breaks the
389
+ // waitFor logic
390
+ if (_reactNative.Platform.OS === "android") {
391
+ return /*#__PURE__*/_react.default.createElement(_reactNativeGestureHandler.TapGestureHandler, {
392
+ maxDurationMs: 100000,
393
+ ref: this.masterDrawer,
394
+ maxDeltaY: initialSnap - this.getNormalisedSnapPoints()[0],
395
+ shouldCancelWhenOutside: false
396
+ }, Content);
397
+ }
398
+ // On iOS, We need to wrap the content on a view with PointerEvents box-none
399
+ // So that we can start scrolling automatically when reaching the top without
400
+ // Stopping the gesture
401
+ return /*#__PURE__*/_react.default.createElement(_reactNativeGestureHandler.TapGestureHandler, {
402
+ maxDurationMs: 100000,
403
+ ref: this.masterDrawer,
404
+ maxDeltaY: initialSnap - this.getNormalisedSnapPoints()[0]
405
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
406
+ style: _reactNative.StyleSheet.absoluteFillObject,
407
+ pointerEvents: "box-none"
408
+ }, Content));
409
+ }
410
+ }
411
+ exports.ScrollBottomSheet = ScrollBottomSheet;
412
+ ScrollBottomSheet.defaultProps = {
413
+ topInset: 0,
414
+ friction: 0.95,
415
+ animationType: "timing",
416
+ innerRef: /*#__PURE__*/_react.default.createRef(),
417
+ enableOverScroll: false
418
+ };
419
+ var _default = ScrollBottomSheet;
420
+ exports.default = _default;
421
+ const styles = _reactNative.StyleSheet.create({
422
+ container: {
423
+ flex: 1
424
+ }
425
+ }); @ts-ignore
410
426
  (_this$masterDrawer = this.masterDrawer) === null || _this$masterDrawer === void 0 ? void 0 : (_this$masterDrawer$cu = _this$masterDrawer.current) === null || _this$masterDrawer$cu === void 0 ? void 0 : _this$masterDrawer$cu.setNativeProps({
411
427
  maxDeltaY: value - this.getNormalisedSnapPoints()[0]
412
428
  });
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.checkboxGroupContext = exports.Direction = void 0;
7
7
  exports.useCheckboxGroupContext = useCheckboxGroupContext;
8
8
  var _react = require("react");
9
- let Direction;
9
+ var Direction;
10
10
  exports.Direction = Direction;
11
11
  (function (Direction) {
12
12
  Direction["Horizontal"] = "horizontal";
@@ -14,7 +14,6 @@ var _theming = require("../theming");
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
  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); }
16
16
  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; }
17
- 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); }
18
17
  const FAB = _ref => {
19
18
  let {
20
19
  Icon,
@@ -106,7 +105,8 @@ const FAB = _ref => {
106
105
  style: [{
107
106
  elevation
108
107
  }, style]
109
- }, /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({}, rest, {
108
+ }, /*#__PURE__*/React.createElement(_reactNative.Pressable, {
109
+ ...rest,
110
110
  onPress: onPress,
111
111
  accessibilityState: {
112
112
  disabled
@@ -114,7 +114,7 @@ const FAB = _ref => {
114
114
  accessibilityRole: "button",
115
115
  disabled: disabled || loading,
116
116
  style: buttonStyles
117
- }), /*#__PURE__*/React.createElement(_reactNative.View, {
117
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
118
118
  style: styles.content
119
119
  }, icon && loading !== true ? /*#__PURE__*/React.createElement(_reactNative.View, {
120
120
  style: iconStyle
@@ -154,4 +154,22 @@ const styles = _reactNative.StyleSheet.create({
154
154
  }
155
155
  });
156
156
  var _default = (0, _theming.withTheme)(FAB);
157
+ exports.default = _default;ow",
158
+ alignItems: "center",
159
+ justifyContent: "center"
160
+ },
161
+ icon: {
162
+ alignItems: "center",
163
+ justifyContent: "center",
164
+ width: _Config.default.buttonIconSize
165
+ },
166
+ fixed: {
167
+ left: 0,
168
+ right: 0,
169
+ bottom: 0,
170
+ height: 64,
171
+ borderRadius: 0
172
+ }
173
+ });
174
+ var _default = (0, _theming.withTheme)(FAB);
157
175
  exports.default = _default;
@@ -10,7 +10,6 @@ var _theming = require("../../theming");
10
10
  var _utilities = require("../../utilities");
11
11
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
12
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
14
13
  const TabViewComponent = _ref => {
15
14
  let {
16
15
  Icon,
@@ -36,13 +35,11 @@ const TabViewComponent = _ref => {
36
35
  textStyles,
37
36
  viewStyles
38
37
  } = (0, _utilities.extractStyles)(style);
39
-
40
38
  //Check type of child using props
41
39
  //Regular '.type' cannot work because Draftbit strips the type in Draft view
42
40
  const instanceOfTabViewItemProps = object => {
43
41
  return "title" in object;
44
42
  };
45
-
46
43
  //Populate routes and scenes based on children
47
44
  React.useEffect(() => {
48
45
  const newRoutes = [];
@@ -68,7 +65,8 @@ const TabViewComponent = _ref => {
68
65
  }
69
66
  };
70
67
  const renderTabBar = props => {
71
- return /*#__PURE__*/React.createElement(_reactNativeTabView.TabBar, _extends({}, props, {
68
+ return /*#__PURE__*/React.createElement(_reactNativeTabView.TabBar, {
69
+ ...props,
72
70
  activeColor: activeColor || theme.colors.primary,
73
71
  inactiveColor: inactiveColor || theme.colors.divider,
74
72
  pressColor: pressColor || theme.colors.primary,
@@ -82,7 +80,7 @@ const TabViewComponent = _ref => {
82
80
  route,
83
81
  color
84
82
  } = _ref2;
85
- return route !== null && route !== void 0 && route.icon ? /*#__PURE__*/React.createElement(Icon, {
83
+ return (route === null || route === void 0 ? void 0 : route.icon) ? /*#__PURE__*/React.createElement(Icon, {
86
84
  name: route.icon,
87
85
  color: color,
88
86
  size: 16
@@ -91,9 +89,8 @@ const TabViewComponent = _ref => {
91
89
  style: {
92
90
  backgroundColor: tabsBackgroundColor || theme.colors.background
93
91
  }
94
- }));
92
+ });
95
93
  };
96
-
97
94
  //Cannot render TabView without at least one tab
98
95
  if (!routes.length) {
99
96
  return /*#__PURE__*/React.createElement(React.Fragment, null);
@@ -113,4 +110,13 @@ const TabViewComponent = _ref => {
113
110
  });
114
111
  };
115
112
  var _default = (0, _theming.withTheme)(TabViewComponent);
113
+ exports.default = _default; renderScene: (0, _reactNativeTabView.SceneMap)(tabScenes),
114
+ renderTabBar: renderTabBar,
115
+ onIndexChange: indexChangeHandler,
116
+ tabBarPosition: tabBarPosition,
117
+ keyboardDismissMode: keyboardDismissMode,
118
+ swipeEnabled: swipeEnabled
119
+ });
120
+ };
121
+ var _default = (0, _theming.withTheme)(TabViewComponent);
116
122
  exports.default = _default;
@@ -255,24 +255,6 @@ Object.defineProperty(exports, "Row", {
255
255
  return _Layout.Row;
256
256
  }
257
257
  });
258
- Object.defineProperty(exports, "RowBodyIcon", {
259
- enumerable: true,
260
- get: function () {
261
- return _RowBodyIcon.default;
262
- }
263
- });
264
- Object.defineProperty(exports, "RowHeadlineImageCaption", {
265
- enumerable: true,
266
- get: function () {
267
- return _RowHeadlineImageCaption.default;
268
- }
269
- });
270
- Object.defineProperty(exports, "RowHeadlineImageIcon", {
271
- enumerable: true,
272
- get: function () {
273
- return _RowHeadlineImageIcon.default;
274
- }
275
- });
276
258
  Object.defineProperty(exports, "SVG", {
277
259
  enumerable: true,
278
260
  get: function () {
@@ -459,9 +441,6 @@ var _DatePicker = _interopRequireDefault(require("./components/DatePicker/DatePi
459
441
  var _Picker = _interopRequireDefault(require("./components/Picker/Picker"));
460
442
  var _ProgressBar = _interopRequireDefault(require("./components/ProgressBar"));
461
443
  var _ProgressCircle = _interopRequireDefault(require("./components/ProgressCircle"));
462
- var _RowBodyIcon = _interopRequireDefault(require("./components/RowBodyIcon"));
463
- var _RowHeadlineImageCaption = _interopRequireDefault(require("./components/RowHeadlineImageCaption"));
464
- var _RowHeadlineImageIcon = _interopRequireDefault(require("./components/RowHeadlineImageIcon"));
465
444
  var _Slider = _interopRequireDefault(require("./components/Slider"));
466
445
  var _Stepper = _interopRequireDefault(require("./components/Stepper"));
467
446
  var _useAuthState = require("./components/useAuthState");
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SEED_DATA = void 0;
7
+ var _types = require("@draftbit/types");
8
+ const SHARED_SEED_DATA = {
9
+ category: _types.COMPONENT_TYPES.layout,
10
+ packageName: "native-base",
11
+ stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS
12
+ };
13
+ const SEED_DATA = [{
14
+ name: "Aspect Ratio",
15
+ tag: "AspectRatio",
16
+ description: "AspectRatio controls the size of the undefined dimension of a node or child component.",
17
+ ...SHARED_SEED_DATA,
18
+ props: {
19
+ ratio: (0, _types.createTextProp)({
20
+ label: "Ratio",
21
+ description: "The aspect ratio of the container",
22
+ defaultValue: "4/3",
23
+ group: _types.GROUPS.basic
24
+ })
25
+ }
26
+ }, {
27
+ name: "Box",
28
+ tag: "Box",
29
+ description: "This is a generic component for low level layout needs. It is similar to a div in HTML",
30
+ ...SHARED_SEED_DATA
31
+ }, {
32
+ name: "Center",
33
+ tag: "Center",
34
+ description: "Center aligns its contents to the center within itself",
35
+ ...SHARED_SEED_DATA
36
+ }, {
37
+ name: "Circle",
38
+ tag: "Circle",
39
+ description: "Center aligns its contents to the center within itself with a round border radius",
40
+ ...SHARED_SEED_DATA
41
+ }, {
42
+ name: "Container",
43
+ tag: "Container",
44
+ description: "The Container restricts a content's width according to current breakpoint, while keeping the size fluid.",
45
+ ...SHARED_SEED_DATA
46
+ }, {
47
+ name: "Column",
48
+ tag: "Column",
49
+ description: "Column aligns items vertically",
50
+ ...SHARED_SEED_DATA
51
+ }, {
52
+ name: "Row",
53
+ tag: "Row",
54
+ description: "Column aligns items horizontally",
55
+ ...SHARED_SEED_DATA
56
+ }, {
57
+ name: "Spacer",
58
+ tag: "Spacer",
59
+ description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
60
+ ...SHARED_SEED_DATA
61
+ }, {
62
+ name: "Stack",
63
+ tag: "Stack",
64
+ description: "Stack aligns items vertically or horizontally based on the direction prop.",
65
+ ...SHARED_SEED_DATA,
66
+ props: {
67
+ direction: (0, _types.createTextEnumProp)({
68
+ label: "Direction",
69
+ description: "The direction of the Stack",
70
+ options: ["row", "column"],
71
+ defaultValue: "column"
72
+ }),
73
+ reversed: (0, _types.createBoolProp)({
74
+ label: "Reversed",
75
+ description: "Determines whether to reverse the direction of items."
76
+ }),
77
+ isDisabled: (0, _types.createBoolProp)({
78
+ label: "Disabled",
79
+ description: "If true, the Stack will be disabled."
80
+ }),
81
+ isInvalid: (0, _types.createBoolProp)({
82
+ label: "Invalid",
83
+ description: "If true, the Stack will be invalid."
84
+ })
85
+ }
86
+ }, {
87
+ name: "ZStack",
88
+ tag: "ZStack",
89
+ description: "ZStack aligns items to the z-axis.",
90
+ ...SHARED_SEED_DATA,
91
+ props: {
92
+ reversed: (0, _types.createBoolProp)({
93
+ label: "Reversed",
94
+ description: "Determines whether to reverse the direction of items."
95
+ })
96
+ }
97
+ }];
98
+ exports.SEED_DATA = SEED_DATA;