@draftbit/core 46.10.3-93b2ea.2 → 46.10.3-98d623.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.
- package/lib/commonjs/components/BottomSheet/BottomSheetComponent.js +0 -41
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +23 -5
- package/lib/commonjs/components/Portal/PortalConsumer.js +0 -7
- package/lib/commonjs/components/Portal/PortalHost.js +0 -1
- package/lib/commonjs/components/Text.js +0 -1
- package/lib/commonjs/index.js +0 -28
- package/lib/commonjs/mappings/NativeBase/Layout.js +108 -0
- package/lib/module/components/BottomSheet/BottomSheetComponent.js +0 -41
- package/lib/module/components/Portal/PortalConsumer.js +0 -7
- package/lib/module/components/Portal/PortalHost.js +0 -1
- package/lib/module/components/Text.js +0 -1
- package/lib/module/index.js +0 -4
- package/lib/module/mappings/NativeBase/Layout.js +101 -0
- package/lib/typescript/src/index.d.ts +0 -4
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +133 -0
- package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +1 -0
- package/package.json +13 -10
- package/src/index.js +0 -4
- package/src/index.tsx +0 -4
- package/src/mappings/NativeBase/Layout.js +124 -0
- package/src/mappings/NativeBase/Layout.ts +145 -0
- package/lib/commonjs/components/Container.js +0 -93
- package/lib/commonjs/components/Row.js +0 -73
- package/lib/commonjs/components/RowBodyIcon.js +0 -45
- package/lib/commonjs/components/RowHeadlineImageCaption.js +0 -45
- package/lib/commonjs/components/RowHeadlineImageIcon.js +0 -51
- package/lib/commonjs/mappings/Container.js +0 -37
- package/lib/module/components/Container.js +0 -83
- package/lib/module/components/Row.js +0 -63
- package/lib/module/components/RowBodyIcon.js +0 -35
- package/lib/module/components/RowHeadlineImageCaption.js +0 -35
- package/lib/module/components/RowHeadlineImageIcon.js +0 -41
- package/lib/module/mappings/Container.js +0 -30
- package/lib/typescript/src/components/Container.d.ts +0 -21
- package/lib/typescript/src/components/Container.d.ts.map +0 -1
- package/lib/typescript/src/components/Row.d.ts +0 -21
- package/lib/typescript/src/components/Row.d.ts.map +0 -1
- package/lib/typescript/src/components/RowBodyIcon.d.ts +0 -16
- package/lib/typescript/src/components/RowBodyIcon.d.ts.map +0 -1
- package/lib/typescript/src/components/RowHeadlineImageCaption.d.ts +0 -16
- package/lib/typescript/src/components/RowHeadlineImageCaption.d.ts.map +0 -1
- package/lib/typescript/src/components/RowHeadlineImageIcon.d.ts +0 -18
- package/lib/typescript/src/components/RowHeadlineImageIcon.d.ts.map +0 -1
- package/lib/typescript/src/mappings/Container.d.ts +0 -55
- package/lib/typescript/src/mappings/Container.d.ts.map +0 -1
- package/src/components/Container.js +0 -43
- package/src/components/Container.tsx +0 -116
- package/src/components/Row.js +0 -48
- package/src/components/Row.tsx +0 -108
- package/src/components/RowBodyIcon.js +0 -8
- package/src/components/RowBodyIcon.tsx +0 -47
- package/src/components/RowHeadlineImageCaption.js +0 -12
- package/src/components/RowHeadlineImageCaption.tsx +0 -49
- package/src/components/RowHeadlineImageIcon.js +0 -14
- package/src/components/RowHeadlineImageIcon.tsx +0 -61
- package/src/mappings/Container.js +0 -30
- package/src/mappings/Container.ts +0 -41
|
@@ -77,22 +77,6 @@ class ScrollBottomSheet extends _react.Component {
|
|
|
77
77
|
* Gesture Handler references
|
|
78
78
|
*/
|
|
79
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
80
|
/**
|
|
97
81
|
* Flag to indicate imperative snapping
|
|
98
82
|
*/
|
|
@@ -101,15 +85,6 @@ class ScrollBottomSheet extends _react.Component {
|
|
|
101
85
|
* Manual snapping amount
|
|
102
86
|
*/
|
|
103
87
|
|
|
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
88
|
constructor(props) {
|
|
114
89
|
var _props$animationConfi, _this;
|
|
115
90
|
super(props);
|
|
@@ -118,15 +93,8 @@ class ScrollBottomSheet extends _react.Component {
|
|
|
118
93
|
_defineProperty(this, "drawerHandleRef", /*#__PURE__*/_react.default.createRef());
|
|
119
94
|
_defineProperty(this, "drawerContentRef", /*#__PURE__*/_react.default.createRef());
|
|
120
95
|
_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
96
|
_defineProperty(this, "isManuallySetValue", new _reactNativeReanimated.Value(0));
|
|
127
97
|
_defineProperty(this, "manualYOffset", new _reactNativeReanimated.Value(0));
|
|
128
|
-
_defineProperty(this, "nextSnapIndex", void 0);
|
|
129
|
-
_defineProperty(this, "decelerationRate", void 0);
|
|
130
98
|
_defineProperty(this, "prevSnapIndex", -1);
|
|
131
99
|
_defineProperty(this, "dragY", new _reactNativeReanimated.Value(0));
|
|
132
100
|
_defineProperty(this, "prevDragY", new _reactNativeReanimated.Value(0));
|
|
@@ -138,18 +106,9 @@ class ScrollBottomSheet extends _react.Component {
|
|
|
138
106
|
_defineProperty(this, "animationFrameTime", new _reactNativeReanimated.Value(0));
|
|
139
107
|
_defineProperty(this, "velocityY", new _reactNativeReanimated.Value(0));
|
|
140
108
|
_defineProperty(this, "lastStartScrollY", new _reactNativeReanimated.Value(0));
|
|
141
|
-
_defineProperty(this, "prevTranslateYOffset", void 0);
|
|
142
|
-
_defineProperty(this, "translationY", void 0);
|
|
143
109
|
_defineProperty(this, "destSnapPoint", new _reactNativeReanimated.Value(0));
|
|
144
|
-
_defineProperty(this, "lastSnap", void 0);
|
|
145
110
|
_defineProperty(this, "dragWithHandle", new _reactNativeReanimated.Value(0));
|
|
146
111
|
_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
112
|
_defineProperty(this, "convertPercentageToDp", str => Number(str.split("%")[0]) * (windowHeight - this.props.topInset) / 100);
|
|
154
113
|
_defineProperty(this, "getNormalisedSnapPoints", () => {
|
|
155
114
|
return this.props.snapPoints.map(p => {
|
|
@@ -13,8 +13,7 @@ var _utilities = require("../../utilities");
|
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
14
|
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); }
|
|
15
15
|
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; }
|
|
16
|
-
|
|
17
|
-
let Direction;
|
|
16
|
+
var Direction;
|
|
18
17
|
exports.Direction = Direction;
|
|
19
18
|
(function (Direction) {
|
|
20
19
|
Direction["Row"] = "row";
|
|
@@ -72,13 +71,14 @@ const CheckboxGroupRow = _ref => {
|
|
|
72
71
|
textStyles,
|
|
73
72
|
viewStyles
|
|
74
73
|
} = (0, _utilities.extractStyles)(style);
|
|
75
|
-
return /*#__PURE__*/React.createElement(_reactNative.Pressable,
|
|
74
|
+
return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
76
75
|
onPress: handlePress,
|
|
77
76
|
style: [styles.mainParent, {
|
|
78
77
|
flexDirection: direction
|
|
79
78
|
}, viewStyles],
|
|
80
|
-
disabled: disabled
|
|
81
|
-
|
|
79
|
+
disabled: disabled,
|
|
80
|
+
...rest
|
|
81
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
82
82
|
style: [styles.label, {
|
|
83
83
|
alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
|
|
84
84
|
}, labelContainerStyle]
|
|
@@ -117,4 +117,22 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
119
|
var _default = CheckboxGroupRow;
|
|
120
|
+
exports.default = _default;center",
|
|
121
|
+
justifyContent: "space-around",
|
|
122
|
+
paddingStart: 20,
|
|
123
|
+
minHeight: 50,
|
|
124
|
+
paddingEnd: 20,
|
|
125
|
+
display: "flex",
|
|
126
|
+
..._reactNative.Platform.select({
|
|
127
|
+
web: {
|
|
128
|
+
cursor: "pointer",
|
|
129
|
+
userSelect: "none"
|
|
130
|
+
}
|
|
131
|
+
})
|
|
132
|
+
},
|
|
133
|
+
label: {
|
|
134
|
+
flex: 3
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
var _default = CheckboxGroupRow;
|
|
120
138
|
exports.default = _default;
|
|
@@ -7,14 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
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); }
|
|
9
9
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
10
|
-
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; }
|
|
11
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
12
|
-
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
10
|
class PortalConsumer extends React.Component {
|
|
14
|
-
constructor() {
|
|
15
|
-
super(...arguments);
|
|
16
|
-
_defineProperty(this, "key", void 0);
|
|
17
|
-
}
|
|
18
11
|
async componentDidMount() {
|
|
19
12
|
this.checkManager();
|
|
20
13
|
|
|
@@ -16,7 +16,6 @@ function _toPrimitive(input, hint) { if (typeof input !== "object" || input ===
|
|
|
16
16
|
class Text extends React.Component {
|
|
17
17
|
constructor() {
|
|
18
18
|
super(...arguments);
|
|
19
|
-
_defineProperty(this, "_root", void 0);
|
|
20
19
|
_defineProperty(this, "state", {
|
|
21
20
|
nativeProps: {}
|
|
22
21
|
});
|
package/lib/commonjs/index.js
CHANGED
|
@@ -117,12 +117,6 @@ Object.defineProperty(exports, "CircleImage", {
|
|
|
117
117
|
return _CircleImage.default;
|
|
118
118
|
}
|
|
119
119
|
});
|
|
120
|
-
Object.defineProperty(exports, "Container", {
|
|
121
|
-
enumerable: true,
|
|
122
|
-
get: function () {
|
|
123
|
-
return _Container.default;
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
120
|
Object.defineProperty(exports, "DatePicker", {
|
|
127
121
|
enumerable: true,
|
|
128
122
|
get: function () {
|
|
@@ -255,24 +249,6 @@ Object.defineProperty(exports, "Row", {
|
|
|
255
249
|
return _Layout.Row;
|
|
256
250
|
}
|
|
257
251
|
});
|
|
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
252
|
Object.defineProperty(exports, "SVG", {
|
|
277
253
|
enumerable: true,
|
|
278
254
|
get: function () {
|
|
@@ -446,7 +422,6 @@ var _CircleImage = _interopRequireDefault(require("./components/CircleImage"));
|
|
|
446
422
|
var _AvatarEdit = _interopRequireDefault(require("./components/AvatarEdit"));
|
|
447
423
|
var _Card = _interopRequireDefault(require("./components/Card"));
|
|
448
424
|
var _Checkbox = require("./components/Checkbox");
|
|
449
|
-
var _Container = _interopRequireDefault(require("./components/Container"));
|
|
450
425
|
var _Divider = _interopRequireDefault(require("./components/Divider"));
|
|
451
426
|
var _FAB = _interopRequireDefault(require("./components/FAB"));
|
|
452
427
|
var _FieldSearchBarFull = _interopRequireDefault(require("./components/FieldSearchBarFull"));
|
|
@@ -478,9 +453,6 @@ var _DatePicker = _interopRequireDefault(require("./components/DatePicker/DatePi
|
|
|
478
453
|
var _Picker = _interopRequireDefault(require("./components/Picker/Picker"));
|
|
479
454
|
var _ProgressBar = _interopRequireDefault(require("./components/ProgressBar"));
|
|
480
455
|
var _ProgressCircle = _interopRequireDefault(require("./components/ProgressCircle"));
|
|
481
|
-
var _RowBodyIcon = _interopRequireDefault(require("./components/RowBodyIcon"));
|
|
482
|
-
var _RowHeadlineImageCaption = _interopRequireDefault(require("./components/RowHeadlineImageCaption"));
|
|
483
|
-
var _RowHeadlineImageIcon = _interopRequireDefault(require("./components/RowHeadlineImageIcon"));
|
|
484
456
|
var _Slider = _interopRequireDefault(require("./components/Slider"));
|
|
485
457
|
var _Stepper = _interopRequireDefault(require("./components/Stepper"));
|
|
486
458
|
var _useAuthState = require("./components/useAuthState");
|
|
@@ -0,0 +1,108 @@
|
|
|
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 CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX = _types.CONTAINER_COMPONENT_STYLES_SECTIONS.filter(item => item !== _types.StylesPanelSections.LayoutFlexItems && item !== _types.StylesPanelSections.LayoutContent);
|
|
14
|
+
const SEED_DATA = [{
|
|
15
|
+
name: "Aspect Ratio",
|
|
16
|
+
tag: "AspectRatio",
|
|
17
|
+
description: "Controls the size of the undefined dimension of a node or child component using an aspect ratio",
|
|
18
|
+
...SHARED_SEED_DATA,
|
|
19
|
+
props: {
|
|
20
|
+
ratio: (0, _types.createStaticNumberProp)({
|
|
21
|
+
label: "Ratio",
|
|
22
|
+
description: "The aspect ratio of the container in decimal format (ex: 3/4 -> 1.33)",
|
|
23
|
+
defaultValue: 1.33
|
|
24
|
+
})
|
|
25
|
+
},
|
|
26
|
+
stylesPanelSections: [_types.StylesPanelSections.Background, _types.StylesPanelSections.Size, _types.StylesPanelSections.Margins, _types.StylesPanelSections.Position, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Effects]
|
|
27
|
+
}, {
|
|
28
|
+
name: "Box",
|
|
29
|
+
tag: "Box",
|
|
30
|
+
description: "This is a generic component for low level layout needs. It is similar to a div in HTML",
|
|
31
|
+
...SHARED_SEED_DATA
|
|
32
|
+
}, {
|
|
33
|
+
name: "Center",
|
|
34
|
+
tag: "Center",
|
|
35
|
+
description: "Center aligns its contents to the center within itself",
|
|
36
|
+
...SHARED_SEED_DATA,
|
|
37
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX
|
|
38
|
+
}, {
|
|
39
|
+
name: "Circle",
|
|
40
|
+
tag: "Circle",
|
|
41
|
+
description: "Center aligns its contents to the center within itself with a round border radius",
|
|
42
|
+
...SHARED_SEED_DATA,
|
|
43
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX
|
|
44
|
+
}, {
|
|
45
|
+
name: "Container",
|
|
46
|
+
tag: "Container",
|
|
47
|
+
description: "The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
|
|
48
|
+
props: {
|
|
49
|
+
centerContent: (0, _types.createStaticBoolProp)({
|
|
50
|
+
label: "Center content",
|
|
51
|
+
description: "Center child elements based on their content width",
|
|
52
|
+
defaultValue: true
|
|
53
|
+
})
|
|
54
|
+
},
|
|
55
|
+
...SHARED_SEED_DATA
|
|
56
|
+
}, {
|
|
57
|
+
name: "Column",
|
|
58
|
+
tag: "Column",
|
|
59
|
+
description: "Column aligns items vertically",
|
|
60
|
+
layout: {
|
|
61
|
+
flexDirection: "column"
|
|
62
|
+
},
|
|
63
|
+
...SHARED_SEED_DATA
|
|
64
|
+
}, {
|
|
65
|
+
name: "Row",
|
|
66
|
+
tag: "Row",
|
|
67
|
+
description: "Column aligns items horizontally",
|
|
68
|
+
layout: {
|
|
69
|
+
flexDirection: "row"
|
|
70
|
+
},
|
|
71
|
+
...SHARED_SEED_DATA
|
|
72
|
+
}, {
|
|
73
|
+
name: "Spacer",
|
|
74
|
+
tag: "Spacer",
|
|
75
|
+
description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
|
|
76
|
+
layout: {
|
|
77
|
+
flex: 1
|
|
78
|
+
},
|
|
79
|
+
...SHARED_SEED_DATA,
|
|
80
|
+
stylesPanelSections: [_types.StylesPanelSections.LayoutSelectedItem, _types.StylesPanelSections.Background, _types.StylesPanelSections.Margins]
|
|
81
|
+
}, {
|
|
82
|
+
name: "Stack",
|
|
83
|
+
tag: "Stack",
|
|
84
|
+
description: "Stack aligns items vertically or horizontally based on the direction prop",
|
|
85
|
+
...SHARED_SEED_DATA,
|
|
86
|
+
props: {
|
|
87
|
+
isDisabled: (0, _types.createBoolProp)({
|
|
88
|
+
label: "Disabled",
|
|
89
|
+
description: "If true, the Stack will be disabled"
|
|
90
|
+
}),
|
|
91
|
+
isInvalid: (0, _types.createBoolProp)({
|
|
92
|
+
label: "Invalid",
|
|
93
|
+
description: "If true, the Stack will be invalid"
|
|
94
|
+
})
|
|
95
|
+
}
|
|
96
|
+
}, {
|
|
97
|
+
name: "ZStack",
|
|
98
|
+
tag: "ZStack",
|
|
99
|
+
description: "ZStack aligns items to the z-axis",
|
|
100
|
+
...SHARED_SEED_DATA,
|
|
101
|
+
props: {
|
|
102
|
+
reversed: (0, _types.createBoolProp)({
|
|
103
|
+
label: "Reversed",
|
|
104
|
+
description: "Determines whether to reverse the direction of items"
|
|
105
|
+
})
|
|
106
|
+
}
|
|
107
|
+
}];
|
|
108
|
+
exports.SEED_DATA = SEED_DATA;
|
|
@@ -85,22 +85,6 @@ export class ScrollBottomSheet extends Component {
|
|
|
85
85
|
* Gesture Handler references
|
|
86
86
|
*/
|
|
87
87
|
|
|
88
|
-
/**
|
|
89
|
-
* ScrollView prop
|
|
90
|
-
*/
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Pan gesture handler events for drawer handle and content
|
|
94
|
-
*/
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Main Animated Value that drives the top position of the UI drawer at any point in time
|
|
98
|
-
*/
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Animated value that keeps track of the position: 0 => closed, 1 => opened
|
|
102
|
-
*/
|
|
103
|
-
|
|
104
88
|
/**
|
|
105
89
|
* Flag to indicate imperative snapping
|
|
106
90
|
*/
|
|
@@ -109,15 +93,6 @@ export class ScrollBottomSheet extends Component {
|
|
|
109
93
|
* Manual snapping amount
|
|
110
94
|
*/
|
|
111
95
|
|
|
112
|
-
/**
|
|
113
|
-
* Keeps track of the current index
|
|
114
|
-
*/
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* Deceleration rate of the scroll component. This is used only on Android to
|
|
118
|
-
* compensate the unexpected glide it gets sometimes.
|
|
119
|
-
*/
|
|
120
|
-
|
|
121
96
|
constructor(props) {
|
|
122
97
|
var _props$animationConfi, _this;
|
|
123
98
|
super(props);
|
|
@@ -126,15 +101,8 @@ export class ScrollBottomSheet extends Component {
|
|
|
126
101
|
_defineProperty(this, "drawerHandleRef", /*#__PURE__*/React.createRef());
|
|
127
102
|
_defineProperty(this, "drawerContentRef", /*#__PURE__*/React.createRef());
|
|
128
103
|
_defineProperty(this, "scrollComponentRef", /*#__PURE__*/React.createRef());
|
|
129
|
-
_defineProperty(this, "onScrollBeginDrag", void 0);
|
|
130
|
-
_defineProperty(this, "onHandleGestureEvent", void 0);
|
|
131
|
-
_defineProperty(this, "onDrawerGestureEvent", void 0);
|
|
132
|
-
_defineProperty(this, "translateY", void 0);
|
|
133
|
-
_defineProperty(this, "position", void 0);
|
|
134
104
|
_defineProperty(this, "isManuallySetValue", new Value(0));
|
|
135
105
|
_defineProperty(this, "manualYOffset", new Value(0));
|
|
136
|
-
_defineProperty(this, "nextSnapIndex", void 0);
|
|
137
|
-
_defineProperty(this, "decelerationRate", void 0);
|
|
138
106
|
_defineProperty(this, "prevSnapIndex", -1);
|
|
139
107
|
_defineProperty(this, "dragY", new Value(0));
|
|
140
108
|
_defineProperty(this, "prevDragY", new Value(0));
|
|
@@ -146,18 +114,9 @@ export class ScrollBottomSheet extends Component {
|
|
|
146
114
|
_defineProperty(this, "animationFrameTime", new Value(0));
|
|
147
115
|
_defineProperty(this, "velocityY", new Value(0));
|
|
148
116
|
_defineProperty(this, "lastStartScrollY", new Value(0));
|
|
149
|
-
_defineProperty(this, "prevTranslateYOffset", void 0);
|
|
150
|
-
_defineProperty(this, "translationY", void 0);
|
|
151
117
|
_defineProperty(this, "destSnapPoint", new Value(0));
|
|
152
|
-
_defineProperty(this, "lastSnap", void 0);
|
|
153
118
|
_defineProperty(this, "dragWithHandle", new Value(0));
|
|
154
119
|
_defineProperty(this, "scrollUpAndPullDown", new Value(0));
|
|
155
|
-
_defineProperty(this, "didGestureFinish", void 0);
|
|
156
|
-
_defineProperty(this, "didScrollUpAndPullDown", void 0);
|
|
157
|
-
_defineProperty(this, "setTranslationY", void 0);
|
|
158
|
-
_defineProperty(this, "extraOffset", void 0);
|
|
159
|
-
_defineProperty(this, "calculateNextSnapPoint", void 0);
|
|
160
|
-
_defineProperty(this, "scrollComponent", void 0);
|
|
161
120
|
_defineProperty(this, "convertPercentageToDp", str => Number(str.split("%")[0]) * (windowHeight - this.props.topInset) / 100);
|
|
162
121
|
_defineProperty(this, "getNormalisedSnapPoints", () => {
|
|
163
122
|
return this.props.snapPoints.map(p => {
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
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; }
|
|
2
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
|
-
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); }
|
|
4
1
|
import * as React from "react";
|
|
5
2
|
export default class PortalConsumer extends React.Component {
|
|
6
|
-
constructor() {
|
|
7
|
-
super(...arguments);
|
|
8
|
-
_defineProperty(this, "key", void 0);
|
|
9
|
-
}
|
|
10
3
|
async componentDidMount() {
|
|
11
4
|
this.checkManager();
|
|
12
5
|
|
package/lib/module/index.js
CHANGED
|
@@ -10,7 +10,6 @@ export { default as AvatarEdit } from "./components/AvatarEdit";
|
|
|
10
10
|
export { default as Card } from "./components/Card";
|
|
11
11
|
export { Checkbox, CheckboxGroup, CheckboxRow } from "./components/Checkbox";
|
|
12
12
|
export { default as CircleImage } from "./components/CircleImage";
|
|
13
|
-
export { default as Container } from "./components/Container";
|
|
14
13
|
export { default as Divider } from "./components/Divider";
|
|
15
14
|
export { default as FAB } from "./components/FAB";
|
|
16
15
|
export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
|
|
@@ -44,9 +43,6 @@ export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
|
44
43
|
export { default as Picker } from "./components/Picker/Picker";
|
|
45
44
|
export { default as ProgressBar } from "./components/ProgressBar";
|
|
46
45
|
export { default as ProgressCircle } from "./components/ProgressCircle";
|
|
47
|
-
export { default as RowBodyIcon } from "./components/RowBodyIcon";
|
|
48
|
-
export { default as RowHeadlineImageCaption } from "./components/RowHeadlineImageCaption";
|
|
49
|
-
export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIcon";
|
|
50
46
|
export { default as Slider } from "./components/Slider";
|
|
51
47
|
export { default as Stepper } from "./components/Stepper";
|
|
52
48
|
export { useAuthState } from "./components/useAuthState";
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createStaticNumberProp, StylesPanelSections, createStaticBoolProp } from "@draftbit/types";
|
|
2
|
+
const SHARED_SEED_DATA = {
|
|
3
|
+
category: COMPONENT_TYPES.layout,
|
|
4
|
+
packageName: "native-base",
|
|
5
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS
|
|
6
|
+
};
|
|
7
|
+
const CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX = CONTAINER_COMPONENT_STYLES_SECTIONS.filter(item => item !== StylesPanelSections.LayoutFlexItems && item !== StylesPanelSections.LayoutContent);
|
|
8
|
+
export const SEED_DATA = [{
|
|
9
|
+
name: "Aspect Ratio",
|
|
10
|
+
tag: "AspectRatio",
|
|
11
|
+
description: "Controls the size of the undefined dimension of a node or child component using an aspect ratio",
|
|
12
|
+
...SHARED_SEED_DATA,
|
|
13
|
+
props: {
|
|
14
|
+
ratio: createStaticNumberProp({
|
|
15
|
+
label: "Ratio",
|
|
16
|
+
description: "The aspect ratio of the container in decimal format (ex: 3/4 -> 1.33)",
|
|
17
|
+
defaultValue: 1.33
|
|
18
|
+
})
|
|
19
|
+
},
|
|
20
|
+
stylesPanelSections: [StylesPanelSections.Background, StylesPanelSections.Size, StylesPanelSections.Margins, StylesPanelSections.Position, StylesPanelSections.Borders, StylesPanelSections.Effects]
|
|
21
|
+
}, {
|
|
22
|
+
name: "Box",
|
|
23
|
+
tag: "Box",
|
|
24
|
+
description: "This is a generic component for low level layout needs. It is similar to a div in HTML",
|
|
25
|
+
...SHARED_SEED_DATA
|
|
26
|
+
}, {
|
|
27
|
+
name: "Center",
|
|
28
|
+
tag: "Center",
|
|
29
|
+
description: "Center aligns its contents to the center within itself",
|
|
30
|
+
...SHARED_SEED_DATA,
|
|
31
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX
|
|
32
|
+
}, {
|
|
33
|
+
name: "Circle",
|
|
34
|
+
tag: "Circle",
|
|
35
|
+
description: "Center aligns its contents to the center within itself with a round border radius",
|
|
36
|
+
...SHARED_SEED_DATA,
|
|
37
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX
|
|
38
|
+
}, {
|
|
39
|
+
name: "Container",
|
|
40
|
+
tag: "Container",
|
|
41
|
+
description: "The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
|
|
42
|
+
props: {
|
|
43
|
+
centerContent: createStaticBoolProp({
|
|
44
|
+
label: "Center content",
|
|
45
|
+
description: "Center child elements based on their content width",
|
|
46
|
+
defaultValue: true
|
|
47
|
+
})
|
|
48
|
+
},
|
|
49
|
+
...SHARED_SEED_DATA
|
|
50
|
+
}, {
|
|
51
|
+
name: "Column",
|
|
52
|
+
tag: "Column",
|
|
53
|
+
description: "Column aligns items vertically",
|
|
54
|
+
layout: {
|
|
55
|
+
flexDirection: "column"
|
|
56
|
+
},
|
|
57
|
+
...SHARED_SEED_DATA
|
|
58
|
+
}, {
|
|
59
|
+
name: "Row",
|
|
60
|
+
tag: "Row",
|
|
61
|
+
description: "Column aligns items horizontally",
|
|
62
|
+
layout: {
|
|
63
|
+
flexDirection: "row"
|
|
64
|
+
},
|
|
65
|
+
...SHARED_SEED_DATA
|
|
66
|
+
}, {
|
|
67
|
+
name: "Spacer",
|
|
68
|
+
tag: "Spacer",
|
|
69
|
+
description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
|
|
70
|
+
layout: {
|
|
71
|
+
flex: 1
|
|
72
|
+
},
|
|
73
|
+
...SHARED_SEED_DATA,
|
|
74
|
+
stylesPanelSections: [StylesPanelSections.LayoutSelectedItem, StylesPanelSections.Background, StylesPanelSections.Margins]
|
|
75
|
+
}, {
|
|
76
|
+
name: "Stack",
|
|
77
|
+
tag: "Stack",
|
|
78
|
+
description: "Stack aligns items vertically or horizontally based on the direction prop",
|
|
79
|
+
...SHARED_SEED_DATA,
|
|
80
|
+
props: {
|
|
81
|
+
isDisabled: createBoolProp({
|
|
82
|
+
label: "Disabled",
|
|
83
|
+
description: "If true, the Stack will be disabled"
|
|
84
|
+
}),
|
|
85
|
+
isInvalid: createBoolProp({
|
|
86
|
+
label: "Invalid",
|
|
87
|
+
description: "If true, the Stack will be invalid"
|
|
88
|
+
})
|
|
89
|
+
}
|
|
90
|
+
}, {
|
|
91
|
+
name: "ZStack",
|
|
92
|
+
tag: "ZStack",
|
|
93
|
+
description: "ZStack aligns items to the z-axis",
|
|
94
|
+
...SHARED_SEED_DATA,
|
|
95
|
+
props: {
|
|
96
|
+
reversed: createBoolProp({
|
|
97
|
+
label: "Reversed",
|
|
98
|
+
description: "Determines whether to reverse the direction of items"
|
|
99
|
+
})
|
|
100
|
+
}
|
|
101
|
+
}];
|
|
@@ -10,7 +10,6 @@ export { default as AvatarEdit } from "./components/AvatarEdit";
|
|
|
10
10
|
export { default as Card } from "./components/Card";
|
|
11
11
|
export { Checkbox, CheckboxGroup, CheckboxRow } from "./components/Checkbox";
|
|
12
12
|
export { default as CircleImage } from "./components/CircleImage";
|
|
13
|
-
export { default as Container } from "./components/Container";
|
|
14
13
|
export { default as Divider } from "./components/Divider";
|
|
15
14
|
export { default as FAB } from "./components/FAB";
|
|
16
15
|
export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
|
|
@@ -42,9 +41,6 @@ export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
|
42
41
|
export { default as Picker } from "./components/Picker/Picker";
|
|
43
42
|
export { default as ProgressBar } from "./components/ProgressBar";
|
|
44
43
|
export { default as ProgressCircle } from "./components/ProgressCircle";
|
|
45
|
-
export { default as RowBodyIcon } from "./components/RowBodyIcon";
|
|
46
|
-
export { default as RowHeadlineImageCaption } from "./components/RowHeadlineImageCaption";
|
|
47
|
-
export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIcon";
|
|
48
44
|
export { default as Slider } from "./components/Slider";
|
|
49
45
|
export { default as Stepper } from "./components/Stepper";
|
|
50
46
|
export { useAuthState } from "./components/useAuthState";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,E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