@draftbit/core 46.4.4-808a01.2 → 46.4.4-885019.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/Accordion/AccordionItem.js +25 -5
- package/lib/commonjs/components/AnimatedCircularProgress.js +2 -12
- package/lib/commonjs/components/AspectRatio.js +2 -19
- package/lib/commonjs/components/AvatarEdit.js +5 -17
- package/lib/commonjs/components/Button.js +11 -32
- package/lib/commonjs/components/CardBlock.js +5 -15
- package/lib/commonjs/components/CardContainer.js +5 -15
- package/lib/commonjs/components/CardContainerRating.js +5 -15
- package/lib/commonjs/components/CardContainerShortImage.js +5 -17
- package/lib/commonjs/components/Carousel.js +10 -34
- package/lib/commonjs/components/Checkbox/CheckboxRow.js +6 -24
- package/lib/commonjs/components/CircleImage.js +2 -16
- package/lib/commonjs/components/CircularProgress.js +7 -15
- package/lib/commonjs/components/DeprecatedButton.js +22 -4
- package/lib/commonjs/components/DeprecatedCardWrapper.js +2 -17
- package/lib/commonjs/components/DeprecatedFAB.js +4 -22
- package/lib/commonjs/components/Divider.js +2 -16
- package/lib/commonjs/components/FAB.js +5 -20
- package/lib/commonjs/components/FormRow.js +3 -17
- package/lib/commonjs/components/IconButton.js +5 -22
- package/lib/commonjs/components/Layout.js +19 -40
- package/lib/commonjs/components/NumberInput.js +2 -13
- package/lib/commonjs/components/Picker/PickerComponent.android.js +24 -5
- package/lib/commonjs/components/Picker/PickerComponent.web.js +5 -24
- package/lib/commonjs/components/Portal/PortalConsumer.js +8 -10
- package/lib/commonjs/components/Portal/PortalHost.js +15 -27
- package/lib/commonjs/components/Portal/PortalManager.js +11 -19
- package/lib/commonjs/components/ProgressBar.js +7 -23
- package/lib/commonjs/components/RadioButton/RadioButton.js +3 -14
- package/lib/commonjs/components/RadioButton/RadioButtonRow.js +6 -24
- package/lib/commonjs/components/ScreenContainer.js +5 -23
- package/lib/commonjs/components/Slider.js +5 -24
- package/lib/commonjs/components/StarRating.js +5 -25
- package/lib/commonjs/components/StepIndicator.js +16 -34
- package/lib/commonjs/components/Surface.js +3 -14
- package/lib/commonjs/components/Table/Table.js +35 -0
- package/lib/commonjs/components/Table/TableCell.js +50 -0
- package/lib/commonjs/components/Table/TableHeader.js +41 -0
- package/lib/commonjs/components/Table/TablePaginator.js +17 -0
- package/lib/commonjs/components/Table/TableRow.js +47 -0
- package/lib/commonjs/components/Table/TableTitle.js +60 -0
- package/lib/commonjs/components/Table/index.js +55 -0
- package/lib/commonjs/components/Text.js +11 -37
- package/lib/commonjs/components/TextField.js +30 -63
- package/lib/commonjs/components/ToggleButton.js +3 -18
- package/lib/commonjs/components/Touchable.js +2 -16
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/index.js +38 -0
- package/lib/commonjs/mappings/AudioPlayer.js +2 -32
- package/lib/commonjs/mappings/StarRating.js +6 -2
- package/lib/commonjs/mappings/Table.js +103 -0
- package/lib/commonjs/utilities.js +2 -2
- package/lib/module/components/Checkbox/context.js +1 -1
- package/lib/module/components/Table/Table.js +23 -0
- package/lib/module/components/Table/TableCell.js +37 -0
- package/lib/module/components/Table/TableHeader.js +27 -0
- package/lib/module/components/Table/TablePaginator.js +6 -0
- package/lib/module/components/Table/TableRow.js +33 -0
- package/lib/module/components/Table/TableTitle.js +47 -0
- package/lib/module/components/Table/index.js +6 -0
- package/lib/module/index.js +1 -0
- package/lib/module/mappings/AudioPlayer.js +3 -33
- package/lib/module/mappings/Table.js +94 -0
- package/lib/module/utilities.js +3 -3
- package/lib/typescript/src/components/Table/Table.d.ts +8 -0
- package/lib/typescript/src/components/Table/TableCell.d.ts +10 -0
- package/lib/typescript/src/components/Table/TableHeader.d.ts +12 -0
- package/lib/typescript/src/components/Table/TablePaginator.d.ts +3 -0
- package/lib/typescript/src/components/Table/TableRow.d.ts +12 -0
- package/lib/typescript/src/components/Table/TableTitle.d.ts +12 -0
- package/lib/typescript/src/components/Table/index.d.ts +6 -0
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/mappings/AudioPlayer.d.ts +1 -62
- package/lib/typescript/src/mappings/Table.d.ts +153 -0
- package/lib/typescript/src/utilities.d.ts +3 -3
- package/package.json +3 -3
- package/src/components/Table/Table.js +10 -0
- package/src/components/Table/Table.tsx +22 -0
- package/src/components/Table/TableCell.js +21 -0
- package/src/components/Table/TableCell.tsx +44 -0
- package/src/components/Table/TableHeader.js +11 -0
- package/src/components/Table/TableHeader.tsx +28 -0
- package/src/components/Table/TablePaginator.js +5 -0
- package/src/components/Table/TablePaginator.tsx +10 -0
- package/src/components/Table/TableRow.js +16 -0
- package/src/components/Table/TableRow.tsx +31 -0
- package/src/components/Table/TableTitle.js +28 -0
- package/src/components/Table/TableTitle.tsx +58 -0
- package/src/components/Table/index.js +6 -0
- package/src/components/Table/index.tsx +6 -0
- package/src/index.js +1 -0
- package/src/index.tsx +9 -0
- package/src/mappings/AudioPlayer.js +2 -39
- package/src/mappings/AudioPlayer.ts +1 -41
- package/src/mappings/Table.js +137 -0
- package/src/mappings/Table.ts +145 -0
- package/src/utilities.js +5 -2
- package/src/utilities.ts +13 -2
|
@@ -17,6 +17,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
17
17
|
|
|
18
18
|
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; }
|
|
19
19
|
|
|
20
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
21
|
+
|
|
20
22
|
const PortalContext = /*#__PURE__*/React.createContext(null);
|
|
21
23
|
/**
|
|
22
24
|
* Portal host renders all of its children `Portal` elements.
|
|
@@ -49,11 +51,11 @@ class PortalHost extends React.Component {
|
|
|
49
51
|
constructor() {
|
|
50
52
|
super(...arguments);
|
|
51
53
|
|
|
52
|
-
this
|
|
54
|
+
_defineProperty(this, "setManager", manager => {
|
|
53
55
|
this.manager = manager;
|
|
54
|
-
};
|
|
56
|
+
});
|
|
55
57
|
|
|
56
|
-
this
|
|
58
|
+
_defineProperty(this, "mount", children => {
|
|
57
59
|
const key = this.nextKey++;
|
|
58
60
|
|
|
59
61
|
if (this.manager) {
|
|
@@ -67,9 +69,9 @@ class PortalHost extends React.Component {
|
|
|
67
69
|
}
|
|
68
70
|
|
|
69
71
|
return key;
|
|
70
|
-
};
|
|
72
|
+
});
|
|
71
73
|
|
|
72
|
-
this
|
|
74
|
+
_defineProperty(this, "update", (key, children) => {
|
|
73
75
|
if (this.manager) {
|
|
74
76
|
this.manager.update(key, children);
|
|
75
77
|
} else {
|
|
@@ -87,9 +89,9 @@ class PortalHost extends React.Component {
|
|
|
87
89
|
this.queue.push(op);
|
|
88
90
|
}
|
|
89
91
|
}
|
|
90
|
-
};
|
|
92
|
+
});
|
|
91
93
|
|
|
92
|
-
this
|
|
94
|
+
_defineProperty(this, "unmount", key => {
|
|
93
95
|
if (this.manager) {
|
|
94
96
|
this.manager.unmount(key);
|
|
95
97
|
} else {
|
|
@@ -98,10 +100,13 @@ class PortalHost extends React.Component {
|
|
|
98
100
|
key
|
|
99
101
|
});
|
|
100
102
|
}
|
|
101
|
-
};
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
_defineProperty(this, "nextKey", 0);
|
|
106
|
+
|
|
107
|
+
_defineProperty(this, "queue", []);
|
|
102
108
|
|
|
103
|
-
this
|
|
104
|
-
this.queue = [];
|
|
109
|
+
_defineProperty(this, "manager", void 0);
|
|
105
110
|
}
|
|
106
111
|
|
|
107
112
|
componentDidMount() {
|
|
@@ -147,23 +152,6 @@ class PortalHost extends React.Component {
|
|
|
147
152
|
|
|
148
153
|
}
|
|
149
154
|
|
|
150
|
-
exports.default = PortalHost;
|
|
151
|
-
PortalHost.displayName = "Portal.Host";
|
|
152
|
-
|
|
153
|
-
const styles = _reactNative.StyleSheet.create({
|
|
154
|
-
container: {
|
|
155
|
-
flex: 1
|
|
156
|
-
}
|
|
157
|
-
}); style: styles.container,
|
|
158
|
-
collapsable: false,
|
|
159
|
-
pointerEvents: "box-none"
|
|
160
|
-
}, this.props.children), /*#__PURE__*/React.createElement(_PortalManager.default, {
|
|
161
|
-
ref: this.setManager
|
|
162
|
-
}));
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
}
|
|
166
|
-
|
|
167
155
|
exports.default = PortalHost;
|
|
168
156
|
|
|
169
157
|
_defineProperty(PortalHost, "displayName", "Portal.Host");
|
|
@@ -13,26 +13,29 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
13
13
|
|
|
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
15
|
|
|
16
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
+
|
|
16
18
|
/**
|
|
17
19
|
* Portal host is the component which actually renders all Portals.
|
|
18
20
|
*/
|
|
19
21
|
class PortalManager extends React.PureComponent {
|
|
20
22
|
constructor() {
|
|
21
23
|
super(...arguments);
|
|
22
|
-
|
|
24
|
+
|
|
25
|
+
_defineProperty(this, "state", {
|
|
23
26
|
portals: []
|
|
24
|
-
};
|
|
27
|
+
});
|
|
25
28
|
|
|
26
|
-
this
|
|
29
|
+
_defineProperty(this, "mount", (key, children) => {
|
|
27
30
|
this.setState(state => ({
|
|
28
31
|
portals: [...state.portals, {
|
|
29
32
|
key,
|
|
30
33
|
children
|
|
31
34
|
}]
|
|
32
35
|
}));
|
|
33
|
-
};
|
|
36
|
+
});
|
|
34
37
|
|
|
35
|
-
this
|
|
38
|
+
_defineProperty(this, "update", (key, children) => this.setState(state => ({
|
|
36
39
|
portals: state.portals.map(item => {
|
|
37
40
|
if (item.key === key) {
|
|
38
41
|
return { ...item,
|
|
@@ -42,11 +45,11 @@ class PortalManager extends React.PureComponent {
|
|
|
42
45
|
|
|
43
46
|
return item;
|
|
44
47
|
})
|
|
45
|
-
}));
|
|
48
|
+
})));
|
|
46
49
|
|
|
47
|
-
this
|
|
50
|
+
_defineProperty(this, "unmount", key => this.setState(state => ({
|
|
48
51
|
portals: state.portals.filter(item => item.key !== key)
|
|
49
|
-
}));
|
|
52
|
+
})));
|
|
50
53
|
}
|
|
51
54
|
|
|
52
55
|
render() {
|
|
@@ -68,15 +71,4 @@ class PortalManager extends React.PureComponent {
|
|
|
68
71
|
|
|
69
72
|
}
|
|
70
73
|
|
|
71
|
-
exports.default = PortalManager;le: false
|
|
72
|
-
/* Need collapsable=false here to clip the elevations, otherwise they appear above sibling components */
|
|
73
|
-
,
|
|
74
|
-
pointerEvents: "box-none",
|
|
75
|
-
style: _reactNative.StyleSheet.absoluteFill
|
|
76
|
-
}, children);
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
|
|
82
74
|
exports.default = PortalManager;
|
|
@@ -13,6 +13,10 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
13
13
|
|
|
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
15
|
|
|
16
|
+
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); }
|
|
17
|
+
|
|
18
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19
|
+
|
|
16
20
|
const INDETERMINATE_WIDTH_FACTOR = 0.3;
|
|
17
21
|
const BAR_WIDTH_ZERO_POSITION = INDETERMINATE_WIDTH_FACTOR / (1 + INDETERMINATE_WIDTH_FACTOR);
|
|
18
22
|
|
|
@@ -20,7 +24,7 @@ class ProgressBar extends _react.Component {
|
|
|
20
24
|
constructor(props) {
|
|
21
25
|
super(props);
|
|
22
26
|
|
|
23
|
-
this
|
|
27
|
+
_defineProperty(this, "handleLayout", event => {
|
|
24
28
|
const {
|
|
25
29
|
width = 150,
|
|
26
30
|
onLayout
|
|
@@ -35,7 +39,7 @@ class ProgressBar extends _react.Component {
|
|
|
35
39
|
if (onLayout) {
|
|
36
40
|
onLayout(event);
|
|
37
41
|
}
|
|
38
|
-
};
|
|
42
|
+
});
|
|
39
43
|
|
|
40
44
|
const {
|
|
41
45
|
progress: progressP = 0,
|
|
@@ -89,6 +93,7 @@ class ProgressBar extends _react.Component {
|
|
|
89
93
|
_reactNative.Animated[animationType](this.state.progress, { ...animationConfig,
|
|
90
94
|
toValue: progress,
|
|
91
95
|
velocity: 0,
|
|
96
|
+
//adjust this value if animation fails - velocity is required
|
|
92
97
|
useNativeDriver
|
|
93
98
|
}).start();
|
|
94
99
|
} else {
|
|
@@ -160,27 +165,6 @@ class ProgressBar extends _react.Component {
|
|
|
160
165
|
})
|
|
161
166
|
}]
|
|
162
167
|
};
|
|
163
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
164
|
-
style: [containerStyle, style],
|
|
165
|
-
onLayout: this.handleLayout,
|
|
166
|
-
...restProps
|
|
167
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
|
|
168
|
-
style: progressStyle
|
|
169
|
-
}), children);
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
exports.default = ProgressBar;h / (_reactNative.I18nManager.isRTL ? 2 : -2), 0]
|
|
175
|
-
})
|
|
176
|
-
}, {
|
|
177
|
-
// Interpolation a temp workaround for https://github.com/facebook/react-native/issues/6278
|
|
178
|
-
scaleX: this.state.progress.interpolate({
|
|
179
|
-
inputRange: [0, 1],
|
|
180
|
-
outputRange: [0.0001, 1]
|
|
181
|
-
})
|
|
182
|
-
}]
|
|
183
|
-
};
|
|
184
168
|
return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({
|
|
185
169
|
style: [containerStyle, style],
|
|
186
170
|
onLayout: this.handleLayout
|
|
@@ -21,6 +21,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
21
21
|
|
|
22
22
|
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; }
|
|
23
23
|
|
|
24
|
+
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); }
|
|
25
|
+
|
|
24
26
|
const RadioButton = _ref => {
|
|
25
27
|
let {
|
|
26
28
|
Icon,
|
|
@@ -49,20 +51,7 @@ const RadioButton = _ref => {
|
|
|
49
51
|
onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(realValue);
|
|
50
52
|
};
|
|
51
53
|
|
|
52
|
-
return /*#__PURE__*/React.createElement(_IconButton.default, {
|
|
53
|
-
Icon: Icon,
|
|
54
|
-
icon: isSelected ? selectedIcon : unselectedIcon,
|
|
55
|
-
color: isSelected ? color : unselectedColor,
|
|
56
|
-
disabled: disabled,
|
|
57
|
-
onPress: handlePress,
|
|
58
|
-
size: size,
|
|
59
|
-
style: style,
|
|
60
|
-
...rest
|
|
61
|
-
});
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
var _default = RadioButton;
|
|
65
|
-
exports.default = _default;turn /*#__PURE__*/React.createElement(_IconButton.default, _extends({
|
|
54
|
+
return /*#__PURE__*/React.createElement(_IconButton.default, _extends({
|
|
66
55
|
Icon: Icon,
|
|
67
56
|
icon: isSelected ? selectedIcon : unselectedIcon,
|
|
68
57
|
color: isSelected ? color : unselectedColor,
|
|
@@ -25,7 +25,9 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
25
|
|
|
26
26
|
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; }
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
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); }
|
|
29
|
+
|
|
30
|
+
let Direction;
|
|
29
31
|
exports.Direction = Direction;
|
|
30
32
|
|
|
31
33
|
(function (Direction) {
|
|
@@ -88,14 +90,13 @@ const RadioButtonRow = _ref => {
|
|
|
88
90
|
textStyles,
|
|
89
91
|
viewStyles
|
|
90
92
|
} = (0, _utilities.extractStyles)(style);
|
|
91
|
-
return /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
93
|
+
return /*#__PURE__*/React.createElement(_Touchable.default, _extends({
|
|
92
94
|
onPress: handlePress,
|
|
93
95
|
style: [styles.mainParent, {
|
|
94
96
|
flexDirection: direction
|
|
95
97
|
}, viewStyles],
|
|
96
|
-
disabled: disabled
|
|
97
|
-
|
|
98
|
-
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
98
|
+
disabled: disabled
|
|
99
|
+
}, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
99
100
|
style: [styles.label, {
|
|
100
101
|
alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
|
|
101
102
|
}, labelContainerStyle]
|
|
@@ -134,24 +135,5 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
134
135
|
}
|
|
135
136
|
});
|
|
136
137
|
|
|
137
|
-
var _default = RadioButtonRow;
|
|
138
|
-
exports.default = _default; "center",
|
|
139
|
-
justifyContent: "space-around",
|
|
140
|
-
paddingStart: 20,
|
|
141
|
-
minHeight: 50,
|
|
142
|
-
paddingEnd: 20,
|
|
143
|
-
display: "flex",
|
|
144
|
-
..._reactNative.Platform.select({
|
|
145
|
-
web: {
|
|
146
|
-
cursor: "pointer",
|
|
147
|
-
userSelect: "none"
|
|
148
|
-
}
|
|
149
|
-
})
|
|
150
|
-
},
|
|
151
|
-
label: {
|
|
152
|
-
flex: 3
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
|
|
156
138
|
var _default = RadioButtonRow;
|
|
157
139
|
exports.default = _default;
|
|
@@ -17,6 +17,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
17
17
|
|
|
18
18
|
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; }
|
|
19
19
|
|
|
20
|
+
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); }
|
|
21
|
+
|
|
20
22
|
function ScreenContainer(_ref) {
|
|
21
23
|
let {
|
|
22
24
|
scrollable = false,
|
|
@@ -39,13 +41,12 @@ function ScreenContainer(_ref) {
|
|
|
39
41
|
edges.push("bottom");
|
|
40
42
|
}
|
|
41
43
|
|
|
42
|
-
return /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaView, {
|
|
44
|
+
return /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaView, _extends({
|
|
43
45
|
edges: edges,
|
|
44
46
|
style: [styles.container, {
|
|
45
47
|
backgroundColor
|
|
46
|
-
}]
|
|
47
|
-
|
|
48
|
-
}, scrollable ? /*#__PURE__*/React.createElement(_reactNative.ScrollView, {
|
|
48
|
+
}]
|
|
49
|
+
}, rest), scrollable ? /*#__PURE__*/React.createElement(_reactNative.ScrollView, {
|
|
49
50
|
contentContainerStyle: [styles.scrollViewContainer, {
|
|
50
51
|
backgroundColor
|
|
51
52
|
}, style]
|
|
@@ -68,23 +69,4 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
68
69
|
|
|
69
70
|
var _default = (0, _theming.withTheme)(ScreenContainer);
|
|
70
71
|
|
|
71
|
-
exports.default = _default;reactNative.View, {
|
|
72
|
-
style: [styles.container, {
|
|
73
|
-
backgroundColor
|
|
74
|
-
}, style]
|
|
75
|
-
}, children));
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
const styles = _reactNative.StyleSheet.create({
|
|
79
|
-
container: {
|
|
80
|
-
flex: 1
|
|
81
|
-
},
|
|
82
|
-
scrollViewContainer: {
|
|
83
|
-
flexGrow: 1,
|
|
84
|
-
flex: undefined
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
var _default = (0, _theming.withTheme)(ScreenContainer);
|
|
89
|
-
|
|
90
72
|
exports.default = _default;
|
|
@@ -23,6 +23,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
23
23
|
|
|
24
24
|
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; }
|
|
25
25
|
|
|
26
|
+
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); }
|
|
27
|
+
|
|
26
28
|
function maybeParseValue(value) {
|
|
27
29
|
if (value === undefined) {
|
|
28
30
|
return undefined;
|
|
@@ -89,10 +91,9 @@ function Slider(_ref) {
|
|
|
89
91
|
onValueChange(newValue);
|
|
90
92
|
};
|
|
91
93
|
|
|
92
|
-
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
93
|
-
style: [styles.container, style]
|
|
94
|
-
|
|
95
|
-
}, leftIcon ? /*#__PURE__*/React.createElement(Icon, {
|
|
94
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
|
|
95
|
+
style: [styles.container, style]
|
|
96
|
+
}, rest), leftIcon ? /*#__PURE__*/React.createElement(Icon, {
|
|
96
97
|
color: leftIconThemeColor,
|
|
97
98
|
name: leftIcon,
|
|
98
99
|
size: 24
|
|
@@ -128,24 +129,4 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
128
129
|
|
|
129
130
|
var _default = (0, _theming.withTheme)(Slider);
|
|
130
131
|
|
|
131
|
-
exports.default = _default;: rightIconThemeColor,
|
|
132
|
-
name: rightIcon,
|
|
133
|
-
size: 24
|
|
134
|
-
}) : null);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
const styles = _reactNative.StyleSheet.create({
|
|
138
|
-
container: {
|
|
139
|
-
height: 40,
|
|
140
|
-
flexDirection: "row",
|
|
141
|
-
alignItems: "center"
|
|
142
|
-
},
|
|
143
|
-
slider: {
|
|
144
|
-
flex: 1,
|
|
145
|
-
marginHorizontal: 12
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
var _default = (0, _theming.withTheme)(Slider);
|
|
150
|
-
|
|
151
132
|
exports.default = _default;
|
|
@@ -15,6 +15,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
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
17
|
|
|
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
20
|
const StarRating = _ref => {
|
|
19
21
|
let {
|
|
20
22
|
Icon,
|
|
@@ -45,10 +47,9 @@ const StarRating = _ref => {
|
|
|
45
47
|
!!onPress && onPress(r);
|
|
46
48
|
}, [onPress]);
|
|
47
49
|
const ratingRounded = Math.round(localRating * 2) / 2;
|
|
48
|
-
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
49
|
-
style: [styles.container, style]
|
|
50
|
-
|
|
51
|
-
}, [...Array(maxStars)].map((_, i) => /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
50
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
|
|
51
|
+
style: [styles.container, style]
|
|
52
|
+
}, rest), [...Array(maxStars)].map((_, i) => /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
52
53
|
key: i,
|
|
53
54
|
style: {
|
|
54
55
|
display: "flex"
|
|
@@ -92,25 +93,4 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
92
93
|
|
|
93
94
|
var _default = (0, _theming.withTheme)(StarRating);
|
|
94
95
|
|
|
95
|
-
exports.default = _default;ignItems: "center"
|
|
96
|
-
},
|
|
97
|
-
touchContainer: {
|
|
98
|
-
display: "flex",
|
|
99
|
-
flexDirection: "row",
|
|
100
|
-
position: "absolute",
|
|
101
|
-
top: 0,
|
|
102
|
-
right: 0,
|
|
103
|
-
left: 0,
|
|
104
|
-
bottom: 0,
|
|
105
|
-
zIndex: 1
|
|
106
|
-
},
|
|
107
|
-
pressable: {
|
|
108
|
-
flex: 1,
|
|
109
|
-
height: "100%",
|
|
110
|
-
width: "50%"
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
var _default = (0, _theming.withTheme)(StarRating);
|
|
115
|
-
|
|
116
96
|
exports.default = _default;
|
|
@@ -13,7 +13,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
13
13
|
|
|
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
15
|
|
|
16
|
-
|
|
16
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
+
|
|
17
18
|
const STEP_STATUS = {
|
|
18
19
|
CURRENT: "current",
|
|
19
20
|
FINISHED: "finished",
|
|
@@ -24,7 +25,7 @@ class StepIndicator extends _react.Component {
|
|
|
24
25
|
constructor(props) {
|
|
25
26
|
super(props);
|
|
26
27
|
|
|
27
|
-
this
|
|
28
|
+
_defineProperty(this, "renderProgressBarBackground", () => {
|
|
28
29
|
const {
|
|
29
30
|
stepCount,
|
|
30
31
|
direction
|
|
@@ -69,9 +70,9 @@ class StepIndicator extends _react.Component {
|
|
|
69
70
|
},
|
|
70
71
|
style: progressBarBackgroundStyle
|
|
71
72
|
});
|
|
72
|
-
};
|
|
73
|
+
});
|
|
73
74
|
|
|
74
|
-
this
|
|
75
|
+
_defineProperty(this, "renderProgressBar", () => {
|
|
75
76
|
const {
|
|
76
77
|
stepCount,
|
|
77
78
|
direction
|
|
@@ -103,9 +104,9 @@ class StepIndicator extends _react.Component {
|
|
|
103
104
|
return /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
|
|
104
105
|
style: progressBarStyle
|
|
105
106
|
});
|
|
106
|
-
};
|
|
107
|
+
});
|
|
107
108
|
|
|
108
|
-
this
|
|
109
|
+
_defineProperty(this, "renderStepIndicator", () => {
|
|
109
110
|
let steps = [];
|
|
110
111
|
const {
|
|
111
112
|
stepCount,
|
|
@@ -138,9 +139,9 @@ class StepIndicator extends _react.Component {
|
|
|
138
139
|
height: this.state.customStyles.currentStepIndicatorSize
|
|
139
140
|
}]
|
|
140
141
|
}, steps);
|
|
141
|
-
};
|
|
142
|
+
});
|
|
142
143
|
|
|
143
|
-
this
|
|
144
|
+
_defineProperty(this, "renderStepLabels", () => {
|
|
144
145
|
const {
|
|
145
146
|
labels,
|
|
146
147
|
direction,
|
|
@@ -182,9 +183,9 @@ class StepIndicator extends _react.Component {
|
|
|
182
183
|
alignItems: this.state.customStyles.labelAlign
|
|
183
184
|
}]
|
|
184
185
|
}, labelViews);
|
|
185
|
-
};
|
|
186
|
+
});
|
|
186
187
|
|
|
187
|
-
this
|
|
188
|
+
_defineProperty(this, "renderStep", position => {
|
|
188
189
|
const {
|
|
189
190
|
renderStepIndicator
|
|
190
191
|
} = this.props;
|
|
@@ -256,9 +257,9 @@ class StepIndicator extends _react.Component {
|
|
|
256
257
|
}) : /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
257
258
|
style: indicatorLabelStyle
|
|
258
259
|
}, "".concat(position + 1)));
|
|
259
|
-
};
|
|
260
|
+
});
|
|
260
261
|
|
|
261
|
-
this
|
|
262
|
+
_defineProperty(this, "getStepStatus", stepPosition => {
|
|
262
263
|
const {
|
|
263
264
|
currentPosition
|
|
264
265
|
} = this.props;
|
|
@@ -270,9 +271,9 @@ class StepIndicator extends _react.Component {
|
|
|
270
271
|
} else {
|
|
271
272
|
return STEP_STATUS.UNFINISHED;
|
|
272
273
|
}
|
|
273
|
-
};
|
|
274
|
+
});
|
|
274
275
|
|
|
275
|
-
this
|
|
276
|
+
_defineProperty(this, "onCurrentPositionChanged", position => {
|
|
276
277
|
let {
|
|
277
278
|
stepCount
|
|
278
279
|
} = this.props;
|
|
@@ -295,7 +296,7 @@ class StepIndicator extends _react.Component {
|
|
|
295
296
|
toValue: this.state.customStyles.currentStepIndicatorSize / 2,
|
|
296
297
|
duration: 100
|
|
297
298
|
})])]).start();
|
|
298
|
-
};
|
|
299
|
+
});
|
|
299
300
|
|
|
300
301
|
const defaultStyles = {
|
|
301
302
|
stepIndicatorSize: 30,
|
|
@@ -410,25 +411,6 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
410
411
|
}
|
|
411
412
|
});
|
|
412
413
|
|
|
413
|
-
StepIndicator.defaultProps = {
|
|
414
|
-
currentPosition: 0,
|
|
415
|
-
stepCount: 5,
|
|
416
|
-
customStyles: {},
|
|
417
|
-
direction: "horizontal"
|
|
418
|
-
}; justifyContent: "center"
|
|
419
|
-
},
|
|
420
|
-
stepLabel: {
|
|
421
|
-
fontSize: 12,
|
|
422
|
-
textAlign: "center",
|
|
423
|
-
fontWeight: "500"
|
|
424
|
-
},
|
|
425
|
-
stepLabelItem: {
|
|
426
|
-
flex: 1,
|
|
427
|
-
alignItems: "center",
|
|
428
|
-
justifyContent: "center"
|
|
429
|
-
}
|
|
430
|
-
});
|
|
431
|
-
|
|
432
414
|
StepIndicator.defaultProps = {
|
|
433
415
|
currentPosition: 0,
|
|
434
416
|
stepCount: 5,
|
|
@@ -21,7 +21,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
21
21
|
|
|
22
22
|
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; }
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
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); }
|
|
25
|
+
|
|
25
26
|
const Surface = _ref => {
|
|
26
27
|
let {
|
|
27
28
|
elevation: propElevation,
|
|
@@ -53,19 +54,7 @@ const Surface = _ref => {
|
|
|
53
54
|
}
|
|
54
55
|
};
|
|
55
56
|
|
|
56
|
-
return /*#__PURE__*/React.createElement(_reactNative.Animated.View, {
|
|
57
|
-
style: [{
|
|
58
|
-
backgroundColor: getBackgroundColor(),
|
|
59
|
-
elevation,
|
|
60
|
-
...evalationStyles,
|
|
61
|
-
...restStyle
|
|
62
|
-
}]
|
|
63
|
-
}, children);
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
var _default = (0, _theming.withTheme)(Surface);
|
|
67
|
-
|
|
68
|
-
exports.default = _default;, _extends({}, rest, {
|
|
57
|
+
return /*#__PURE__*/React.createElement(_reactNative.Animated.View, _extends({}, rest, {
|
|
69
58
|
style: [{
|
|
70
59
|
backgroundColor: getBackgroundColor(),
|
|
71
60
|
elevation,
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _reactNative = require("react-native");
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
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); }
|
|
15
|
+
|
|
16
|
+
const Table = _ref => {
|
|
17
|
+
let {
|
|
18
|
+
children,
|
|
19
|
+
style,
|
|
20
|
+
...rest
|
|
21
|
+
} = _ref;
|
|
22
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, rest, {
|
|
23
|
+
style: [styles.wrapper, style]
|
|
24
|
+
}), children);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const styles = _reactNative.StyleSheet.create({
|
|
28
|
+
wrapper: {
|
|
29
|
+
display: "flex",
|
|
30
|
+
flexDirection: "column"
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
var _default = Table;
|
|
35
|
+
exports.default = _default;
|