@draftbit/core 46.6.6 → 46.6.7
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/CardBlock.js +4 -13
- package/lib/commonjs/components/CardContainerRating.js +4 -13
- package/lib/commonjs/components/Checkbox/Checkbox.js +4 -22
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +5 -23
- package/lib/commonjs/components/Checkbox/CheckboxRow.js +6 -23
- package/lib/commonjs/components/Container.js +4 -15
- package/lib/commonjs/components/DatePicker/DatePicker.js +13 -26
- package/lib/commonjs/components/DeprecatedFAB.js +3 -21
- package/lib/commonjs/components/Divider.js +1 -14
- package/lib/commonjs/components/FAB.js +4 -18
- package/lib/commonjs/components/FormRow.js +2 -16
- package/lib/commonjs/components/IconButton.js +4 -19
- package/lib/commonjs/components/Image.js +2 -17
- package/lib/commonjs/components/Justification.js +1 -5
- package/lib/commonjs/components/Layout.js +19 -40
- package/lib/commonjs/components/Picker/Picker.js +1 -1
- package/lib/commonjs/components/Picker/PickerComponent.web.js +4 -19
- package/lib/commonjs/components/Portal/PortalHost.js +15 -44
- package/lib/commonjs/components/Portal/PortalManager.js +8 -34
- package/lib/commonjs/components/Pressable.js +2 -15
- package/lib/commonjs/components/ProgressBar.js +7 -37
- package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js +1 -9
- package/lib/commonjs/components/ResizeMode.js +1 -5
- package/lib/commonjs/components/ScreenContainer.js +4 -20
- package/lib/commonjs/components/StepIndicator.js +18 -57
- package/lib/commonjs/components/Stepper.js +0 -1
- package/lib/commonjs/components/Surface.js +2 -14
- package/lib/commonjs/components/Switch.js +10 -19
- package/lib/commonjs/components/TextField.js +28 -76
- package/lib/commonjs/components/ToggleButton.js +2 -15
- package/lib/commonjs/components/Touchable.js +2 -15
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/mappings/FieldSearchBarFull.js +1 -3
- package/lib/commonjs/utilities.js +2 -1
- package/lib/module/components/Accordion/AccordionItem.js +4 -25
- package/lib/module/components/AnimatedCircularProgress.js +1 -13
- package/lib/module/components/AspectRatio.js +1 -18
- package/lib/module/components/AvatarEdit.js +4 -15
- package/lib/module/components/CardContainerRating.js +4 -14
- package/lib/module/components/CardContainerShortImage.js +4 -18
- package/lib/module/components/Checkbox/Checkbox.js +4 -25
- package/lib/module/components/Checkbox/CheckboxGroup.js +2 -16
- package/lib/module/components/CircleImage.js +1 -16
- package/lib/module/components/CircularProgress.js +8 -28
- package/lib/module/components/Container.js +4 -17
- package/lib/module/components/DatePicker/DatePicker.js +13 -27
- package/lib/module/components/DeprecatedCardWrapper.js +1 -18
- package/lib/module/components/DeprecatedFAB.js +3 -23
- package/lib/module/components/Elevation.js +2 -14
- package/lib/module/components/FAB.js +4 -22
- package/lib/module/components/FieldSearchBarFull.js +2 -1
- package/lib/module/components/IconButton.js +4 -21
- package/lib/module/components/Justification.js +0 -1
- package/lib/module/components/Picker/Picker.js +1 -1
- package/lib/module/components/Picker/PickerComponent.web.js +4 -19
- package/lib/module/components/Portal/Portal.js +3 -28
- package/lib/module/components/Portal/PortalHost.js +15 -45
- package/lib/module/components/Portal/PortalManager.js +7 -33
- package/lib/module/components/ProgressBar.js +7 -39
- package/lib/module/components/RadioButton/RadioButtonFieldGroup.js +1 -10
- package/lib/module/components/RadioButton/context.js +1 -1
- package/lib/module/components/ResizeMode.js +0 -1
- package/lib/module/components/StarRating.js +4 -24
- package/lib/module/components/Stepper.js +1 -1
- package/lib/module/components/Surface.js +1 -15
- package/lib/module/components/TextField.js +28 -78
- package/lib/module/components/ToggleButton.js +2 -16
- package/lib/module/components/Touchable.js +2 -15
- package/lib/module/constants.js +0 -1
- package/lib/module/mappings/StarRating.js +2 -7
- package/lib/module/utilities.js +2 -1
- package/package.json +3 -3
- package/src/Provider.js +0 -9
- package/src/components/Accordion/AccordionGroup.js +0 -44
- package/src/components/Accordion/AccordionItem.js +0 -32
- package/src/components/Accordion/index.js +0 -2
- package/src/components/ActionSheet/ActionSheet.js +0 -45
- package/src/components/ActionSheet/ActionSheetCancel.js +0 -6
- package/src/components/ActionSheet/ActionSheetItem.js +0 -30
- package/src/components/ActionSheet/index.js +0 -3
- package/src/components/AnimatedCircularProgress.js +0 -43
- package/src/components/AspectRatio.js +0 -18
- package/src/components/AvatarEdit.js +0 -30
- package/src/components/Banner.js +0 -109
- package/src/components/Button.js +0 -114
- package/src/components/Card.js +0 -57
- package/src/components/CardBlock.js +0 -54
- package/src/components/CardContainer.js +0 -69
- package/src/components/CardContainerRating.js +0 -79
- package/src/components/CardContainerShortImage.js +0 -33
- package/src/components/CardInline.js +0 -36
- package/src/components/Carousel.js +0 -68
- package/src/components/Checkbox/Checkbox.js +0 -62
- package/src/components/Checkbox/CheckboxGroup.js +0 -21
- package/src/components/Checkbox/CheckboxGroupRow.js +0 -76
- package/src/components/Checkbox/CheckboxRow.js +0 -77
- package/src/components/Checkbox/context.js +0 -14
- package/src/components/Checkbox/index.js +0 -3
- package/src/components/CircleImage.js +0 -8
- package/src/components/CircularProgress.js +0 -81
- package/src/components/Config.js +0 -64
- package/src/components/Container.js +0 -43
- package/src/components/DatePicker/DatePicker.js +0 -377
- package/src/components/DatePicker/DatePickerComponent.js +0 -13
- package/src/components/DatePicker/DatePickerComponent.web.js +0 -30
- package/src/components/DatePicker/DatePickerComponentType.js +0 -1
- package/src/components/DeprecatedButton.js +0 -83
- package/src/components/DeprecatedCardWrapper.js +0 -18
- package/src/components/DeprecatedFAB.js +0 -114
- package/src/components/Divider.js +0 -13
- package/src/components/Elevation.js +0 -20
- package/src/components/FAB.js +0 -46
- package/src/components/FieldSearchBarFull.js +0 -53
- package/src/components/FormRow.js +0 -19
- package/src/components/Header.js +0 -44
- package/src/components/HeaderLarge.js +0 -7
- package/src/components/HeaderMedium.js +0 -7
- package/src/components/HeaderOverline.js +0 -7
- package/src/components/IconButton.js +0 -35
- package/src/components/Image.js +0 -47
- package/src/components/Justification.js +0 -1
- package/src/components/Layout.js +0 -50
- package/src/components/NumberInput.js +0 -49
- package/src/components/Picker/Picker.js +0 -267
- package/src/components/Picker/PickerComponent.android.js +0 -69
- package/src/components/Picker/PickerComponent.ios.js +0 -79
- package/src/components/Picker/PickerComponent.web.js +0 -70
- package/src/components/Picker/PickerTypes.js +0 -1
- package/src/components/Portal/Portal.js +0 -35
- package/src/components/Portal/PortalConsumer.js +0 -27
- package/src/components/Portal/PortalHost.js +0 -107
- package/src/components/Portal/PortalManager.js +0 -32
- package/src/components/Pressable.js +0 -12
- package/src/components/ProgressBar.js +0 -118
- package/src/components/ProgressCircle.js +0 -13
- package/src/components/ProgressIndicator.js +0 -27
- package/src/components/RadioButton/RadioButton.js +0 -17
- package/src/components/RadioButton/RadioButtonFieldGroup.js +0 -17
- package/src/components/RadioButton/RadioButtonGroup.js +0 -43
- package/src/components/RadioButton/RadioButtonRow.js +0 -76
- package/src/components/RadioButton/context.js +0 -14
- package/src/components/RadioButton/index.js +0 -4
- package/src/components/ResizeMode.js +0 -1
- package/src/components/Row.js +0 -48
- package/src/components/RowBodyIcon.js +0 -8
- package/src/components/RowHeadlineImageCaption.js +0 -12
- package/src/components/RowHeadlineImageIcon.js +0 -14
- package/src/components/SVG.js +0 -13
- package/src/components/ScreenContainer.js +0 -34
- package/src/components/Slider.js +0 -63
- package/src/components/StarRating.js +0 -50
- package/src/components/StepIndicator.js +0 -346
- package/src/components/Stepper.js +0 -41
- package/src/components/Surface.js +0 -32
- package/src/components/Swiper/Swiper.js +0 -29
- package/src/components/Swiper/SwiperItem.js +0 -9
- package/src/components/Swiper/index.js +0 -2
- package/src/components/Switch.js +0 -56
- package/src/components/Text.js +0 -33
- package/src/components/TextField.js +0 -428
- package/src/components/ToggleButton.js +0 -39
- package/src/components/Touchable.js +0 -12
- package/src/components/Touchable.web.js +0 -2
- package/src/components/Typography.js +0 -36
- package/src/components/useAuthState.js +0 -31
- package/src/constants.js +0 -10
- package/src/hooks.js +0 -12
- package/src/index.js +0 -53
- package/src/interfaces/Icon.js +0 -8
- package/src/mappings/Accordion.js +0 -41
- package/src/mappings/AccordionItem.js +0 -16
- package/src/mappings/ActionSheet.js +0 -13
- package/src/mappings/ActionSheetCancel.js +0 -19
- package/src/mappings/ActionSheetItem.js +0 -23
- package/src/mappings/ActivityIndicator.js +0 -58
- package/src/mappings/AudioPlayer.js +0 -57
- package/src/mappings/AvatarEdit.js +0 -38
- package/src/mappings/Banner.js +0 -32
- package/src/mappings/BlurView.js +0 -42
- package/src/mappings/Button.js +0 -116
- package/src/mappings/Card.js +0 -52
- package/src/mappings/CardBlock.js +0 -123
- package/src/mappings/CardContainer.js +0 -104
- package/src/mappings/CardContainerRating.js +0 -126
- package/src/mappings/CardContainerShortImage.js +0 -120
- package/src/mappings/CardInline.js +0 -52
- package/src/mappings/Carousel.js +0 -19
- package/src/mappings/Checkbox.js +0 -46
- package/src/mappings/CheckboxGroup.js +0 -26
- package/src/mappings/CheckboxRow.js +0 -61
- package/src/mappings/CircleImage.js +0 -25
- package/src/mappings/Container.js +0 -30
- package/src/mappings/CustomCode.js +0 -8
- package/src/mappings/DatePicker.js +0 -176
- package/src/mappings/Divider.js +0 -27
- package/src/mappings/FAB.js +0 -37
- package/src/mappings/Fetch.js +0 -13
- package/src/mappings/FieldSearchBarFull.js +0 -50
- package/src/mappings/FlashList.js +0 -79
- package/src/mappings/FlatList.js +0 -36
- package/src/mappings/HeaderLarge.js +0 -29
- package/src/mappings/HeaderMedium.js +0 -55
- package/src/mappings/HeaderOverline.js +0 -55
- package/src/mappings/Icon.js +0 -32
- package/src/mappings/IconButton.js +0 -35
- package/src/mappings/Image.js +0 -35
- package/src/mappings/ImageBackground.js +0 -29
- package/src/mappings/KeyboardAvoidingView.js +0 -41
- package/src/mappings/KeyboardAwareScrollView.js +0 -50
- package/src/mappings/Layout.js +0 -200
- package/src/mappings/LinearGradient.js +0 -77
- package/src/mappings/MapCallout.js +0 -21
- package/src/mappings/MapMarker.js +0 -47
- package/src/mappings/MapView.js +0 -139
- package/src/mappings/Modal.js +0 -42
- package/src/mappings/NumberInput.js +0 -254
- package/src/mappings/Picker.js +0 -148
- package/src/mappings/ProgressBar.js +0 -101
- package/src/mappings/ProgressCircle.js +0 -109
- package/src/mappings/ProgressIndicator.js +0 -181
- package/src/mappings/RadioButton.js +0 -51
- package/src/mappings/RadioButtonGroup.js +0 -17
- package/src/mappings/RadioButtonRow.js +0 -42
- package/src/mappings/RowBodyIcon.js +0 -75
- package/src/mappings/RowHeadlineImageCaption.js +0 -167
- package/src/mappings/RowHeadlineImageIcon.js +0 -99
- package/src/mappings/SVG.js +0 -20
- package/src/mappings/SafeAreaView.js +0 -33
- package/src/mappings/ScrollView.js +0 -31
- package/src/mappings/Slider.js +0 -60
- package/src/mappings/StarRating.js +0 -43
- package/src/mappings/Stepper.js +0 -32
- package/src/mappings/Surface.js +0 -14
- package/src/mappings/Swiper.js +0 -62
- package/src/mappings/SwiperItem.js +0 -8
- package/src/mappings/Switch.js +0 -81
- package/src/mappings/Text.js +0 -251
- package/src/mappings/TextArea.js +0 -274
- package/src/mappings/TextField.js +0 -391
- package/src/mappings/TextInput.js +0 -402
- package/src/mappings/ToggleButton.js +0 -50
- package/src/mappings/Touchable.js +0 -60
- package/src/mappings/Video.js +0 -81
- package/src/mappings/View.js +0 -207
- package/src/mappings/WebView.js +0 -88
- package/src/styles/DarkTheme.js +0 -26
- package/src/styles/DefaultTheme.js +0 -111
- package/src/styles/fonts.js +0 -62
- package/src/styles/overlay.js +0 -60
- package/src/styles/shadow.js +0 -51
- package/src/theming.js +0 -3
- package/src/utilities.js +0 -102
|
@@ -8,8 +8,9 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
10
10
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
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; }
|
|
12
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
13
|
+
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
|
const STEP_STATUS = {
|
|
14
15
|
CURRENT: "current",
|
|
15
16
|
FINISHED: "finished",
|
|
@@ -18,7 +19,7 @@ const STEP_STATUS = {
|
|
|
18
19
|
class StepIndicator extends _react.Component {
|
|
19
20
|
constructor(props) {
|
|
20
21
|
super(props);
|
|
21
|
-
this
|
|
22
|
+
_defineProperty(this, "renderProgressBarBackground", () => {
|
|
22
23
|
const {
|
|
23
24
|
stepCount,
|
|
24
25
|
direction
|
|
@@ -61,8 +62,8 @@ class StepIndicator extends _react.Component {
|
|
|
61
62
|
},
|
|
62
63
|
style: progressBarBackgroundStyle
|
|
63
64
|
});
|
|
64
|
-
};
|
|
65
|
-
this
|
|
65
|
+
});
|
|
66
|
+
_defineProperty(this, "renderProgressBar", () => {
|
|
66
67
|
const {
|
|
67
68
|
stepCount,
|
|
68
69
|
direction
|
|
@@ -92,8 +93,8 @@ class StepIndicator extends _react.Component {
|
|
|
92
93
|
return /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
|
|
93
94
|
style: progressBarStyle
|
|
94
95
|
});
|
|
95
|
-
};
|
|
96
|
-
this
|
|
96
|
+
});
|
|
97
|
+
_defineProperty(this, "renderStepIndicator", () => {
|
|
97
98
|
let steps = [];
|
|
98
99
|
const {
|
|
99
100
|
stepCount,
|
|
@@ -124,8 +125,8 @@ class StepIndicator extends _react.Component {
|
|
|
124
125
|
height: this.state.customStyles.currentStepIndicatorSize
|
|
125
126
|
}]
|
|
126
127
|
}, steps);
|
|
127
|
-
};
|
|
128
|
-
this
|
|
128
|
+
});
|
|
129
|
+
_defineProperty(this, "renderStepLabels", () => {
|
|
129
130
|
const {
|
|
130
131
|
labels,
|
|
131
132
|
direction,
|
|
@@ -167,8 +168,8 @@ class StepIndicator extends _react.Component {
|
|
|
167
168
|
alignItems: this.state.customStyles.labelAlign
|
|
168
169
|
}]
|
|
169
170
|
}, labelViews);
|
|
170
|
-
};
|
|
171
|
-
this
|
|
171
|
+
});
|
|
172
|
+
_defineProperty(this, "renderStep", position => {
|
|
172
173
|
const {
|
|
173
174
|
renderStepIndicator
|
|
174
175
|
} = this.props;
|
|
@@ -235,8 +236,8 @@ class StepIndicator extends _react.Component {
|
|
|
235
236
|
}) : /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
236
237
|
style: indicatorLabelStyle
|
|
237
238
|
}, `${position + 1}`));
|
|
238
|
-
};
|
|
239
|
-
this
|
|
239
|
+
});
|
|
240
|
+
_defineProperty(this, "getStepStatus", stepPosition => {
|
|
240
241
|
const {
|
|
241
242
|
currentPosition
|
|
242
243
|
} = this.props;
|
|
@@ -247,8 +248,8 @@ class StepIndicator extends _react.Component {
|
|
|
247
248
|
} else {
|
|
248
249
|
return STEP_STATUS.UNFINISHED;
|
|
249
250
|
}
|
|
250
|
-
};
|
|
251
|
-
this
|
|
251
|
+
});
|
|
252
|
+
_defineProperty(this, "onCurrentPositionChanged", position => {
|
|
252
253
|
let {
|
|
253
254
|
stepCount
|
|
254
255
|
} = this.props;
|
|
@@ -268,7 +269,7 @@ class StepIndicator extends _react.Component {
|
|
|
268
269
|
toValue: this.state.customStyles.currentStepIndicatorSize / 2,
|
|
269
270
|
duration: 100
|
|
270
271
|
})])]).start();
|
|
271
|
-
};
|
|
272
|
+
});
|
|
272
273
|
const defaultStyles = {
|
|
273
274
|
stepIndicatorSize: 30,
|
|
274
275
|
currentStepIndicatorSize: 40,
|
|
@@ -334,6 +335,7 @@ class StepIndicator extends _react.Component {
|
|
|
334
335
|
// ),
|
|
335
336
|
// }));
|
|
336
337
|
// }
|
|
338
|
+
|
|
337
339
|
if (prevProps.currentPosition !== this.props.currentPosition) {
|
|
338
340
|
this.onCurrentPositionChanged(this.props.currentPosition);
|
|
339
341
|
}
|
|
@@ -375,47 +377,6 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
375
377
|
justifyContent: "center"
|
|
376
378
|
}
|
|
377
379
|
});
|
|
378
|
-
StepIndicator.defaultProps = {
|
|
379
|
-
currentPosition: 0,
|
|
380
|
-
stepCount: 5,
|
|
381
|
-
customStyles: {},
|
|
382
|
-
direction: "horizontal"
|
|
383
|
-
};exports.default = StepIndicator;
|
|
384
|
-
const styles = _reactNative.StyleSheet.create({
|
|
385
|
-
container: {
|
|
386
|
-
backgroundColor: "transparent"
|
|
387
|
-
},
|
|
388
|
-
stepIndicatorContainer: {
|
|
389
|
-
flexDirection: "row",
|
|
390
|
-
alignItems: "center",
|
|
391
|
-
justifyContent: "space-around",
|
|
392
|
-
backgroundColor: "transparent"
|
|
393
|
-
},
|
|
394
|
-
stepLabelsContainer: {
|
|
395
|
-
justifyContent: "space-around"
|
|
396
|
-
},
|
|
397
|
-
step: {
|
|
398
|
-
alignItems: "center",
|
|
399
|
-
justifyContent: "center",
|
|
400
|
-
zIndex: 2
|
|
401
|
-
},
|
|
402
|
-
stepContainer: {
|
|
403
|
-
flex: 1,
|
|
404
|
-
flexDirection: "row",
|
|
405
|
-
alignItems: "center",
|
|
406
|
-
justifyContent: "center"
|
|
407
|
-
},
|
|
408
|
-
stepLabel: {
|
|
409
|
-
fontSize: 12,
|
|
410
|
-
textAlign: "center",
|
|
411
|
-
fontWeight: "500"
|
|
412
|
-
},
|
|
413
|
-
stepLabelItem: {
|
|
414
|
-
flex: 1,
|
|
415
|
-
alignItems: "center",
|
|
416
|
-
justifyContent: "center"
|
|
417
|
-
}
|
|
418
|
-
});
|
|
419
380
|
StepIndicator.defaultProps = {
|
|
420
381
|
currentPosition: 0,
|
|
421
382
|
stepCount: 5,
|
|
@@ -12,8 +12,7 @@ var _theming = require("../theming");
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
14
14
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
16
|
const Surface = _ref => {
|
|
18
17
|
let {
|
|
19
18
|
elevation: propElevation,
|
|
@@ -43,18 +42,7 @@ const Surface = _ref => {
|
|
|
43
42
|
return colors.surface;
|
|
44
43
|
}
|
|
45
44
|
};
|
|
46
|
-
return /*#__PURE__*/React.createElement(_reactNative.Animated.View, {
|
|
47
|
-
...rest,
|
|
48
|
-
style: [{
|
|
49
|
-
backgroundColor: getBackgroundColor(),
|
|
50
|
-
elevation,
|
|
51
|
-
...evalationStyles,
|
|
52
|
-
...restStyle
|
|
53
|
-
}]
|
|
54
|
-
}, children);
|
|
55
|
-
};
|
|
56
|
-
var _default = (0, _theming.withTheme)(Surface);
|
|
57
|
-
exports.default = _default;xtends({}, rest, {
|
|
45
|
+
return /*#__PURE__*/React.createElement(_reactNative.Animated.View, _extends({}, rest, {
|
|
58
46
|
style: [{
|
|
59
47
|
backgroundColor: getBackgroundColor(),
|
|
60
48
|
elevation,
|
|
@@ -13,6 +13,7 @@ var _hooks = require("../hooks");
|
|
|
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
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
16
17
|
function Switch(_ref) {
|
|
17
18
|
let {
|
|
18
19
|
value,
|
|
@@ -37,6 +38,7 @@ function Switch(_ref) {
|
|
|
37
38
|
setChecked(value);
|
|
38
39
|
}
|
|
39
40
|
}, [value, checked]);
|
|
41
|
+
|
|
40
42
|
// This special logic is to handle weird APIs like Airtable that return
|
|
41
43
|
// true or undefined for a boolean
|
|
42
44
|
const previousDefaultValue = (0, _hooks.usePrevious)(defaultValue);
|
|
@@ -45,24 +47,24 @@ function Switch(_ref) {
|
|
|
45
47
|
setChecked(Boolean(defaultValue));
|
|
46
48
|
}
|
|
47
49
|
}, [defaultValue, previousDefaultValue]);
|
|
48
|
-
return /*#__PURE__*/React.createElement(_reactNative.Switch, {
|
|
50
|
+
return /*#__PURE__*/React.createElement(_reactNative.Switch, _extends({
|
|
49
51
|
value: checked,
|
|
50
52
|
disabled: disabled,
|
|
51
53
|
trackColor: {
|
|
52
54
|
false: inactiveTrackThemeColor,
|
|
53
55
|
true: activeTrackThemeColor
|
|
54
56
|
},
|
|
55
|
-
thumbColor: value ? activeThumbThemeColor : inactiveThumbThemeColor
|
|
57
|
+
thumbColor: value ? activeThumbThemeColor : inactiveThumbThemeColor
|
|
56
58
|
// @ts-ignore react-native-web only
|
|
59
|
+
,
|
|
57
60
|
activeThumbColor: activeThumbThemeColor,
|
|
58
61
|
ios_backgroundColor: inactiveTrackThemeColor,
|
|
59
62
|
style: style,
|
|
60
63
|
onValueChange: bool => {
|
|
61
64
|
setChecked(bool);
|
|
62
65
|
onValueChange && onValueChange(bool);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
});
|
|
66
|
+
}
|
|
67
|
+
}, rest));
|
|
66
68
|
}
|
|
67
69
|
function Row(_ref2) {
|
|
68
70
|
let {
|
|
@@ -91,7 +93,7 @@ function Row(_ref2) {
|
|
|
91
93
|
setChecked(defaultValue);
|
|
92
94
|
}
|
|
93
95
|
}, [defaultValue]);
|
|
94
|
-
return /*#__PURE__*/React.createElement(_FormRow.default, {
|
|
96
|
+
return /*#__PURE__*/React.createElement(_FormRow.default, _extends({
|
|
95
97
|
disabled: disabled,
|
|
96
98
|
onPress: () => {
|
|
97
99
|
setChecked(!checked);
|
|
@@ -99,9 +101,8 @@ function Row(_ref2) {
|
|
|
99
101
|
},
|
|
100
102
|
label: label,
|
|
101
103
|
direction: direction,
|
|
102
|
-
style: style
|
|
103
|
-
|
|
104
|
-
}, /*#__PURE__*/React.createElement(Switch, {
|
|
104
|
+
style: style
|
|
105
|
+
}, rest), /*#__PURE__*/React.createElement(Switch, {
|
|
105
106
|
theme: theme,
|
|
106
107
|
value: checked,
|
|
107
108
|
disabled: disabled,
|
|
@@ -115,14 +116,4 @@ function Row(_ref2) {
|
|
|
115
116
|
const SwitchRow = (0, _theming.withTheme)(Row);
|
|
116
117
|
exports.SwitchRow = SwitchRow;
|
|
117
118
|
var _default = (0, _theming.withTheme)(Switch);
|
|
118
|
-
exports.default = _default;hange: onValueChange,
|
|
119
|
-
activeTrackColor: activeTrackColor,
|
|
120
|
-
inactiveTrackColor: inactiveTrackColor,
|
|
121
|
-
activeThumbColor: activeThumbColor,
|
|
122
|
-
inactiveThumbColor: inactiveThumbColor
|
|
123
|
-
}));
|
|
124
|
-
}
|
|
125
|
-
const SwitchRow = (0, _theming.withTheme)(Row);
|
|
126
|
-
exports.SwitchRow = SwitchRow;
|
|
127
|
-
var _default = (0, _theming.withTheme)(Switch);
|
|
128
119
|
exports.default = _default;
|
|
@@ -10,6 +10,10 @@ 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
|
+
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
17
|
const AnimatedText = _reactNative.Animated.createAnimatedComponent(_reactNative.Text);
|
|
14
18
|
const FOCUS_ANIMATION_DURATION = 150;
|
|
15
19
|
const BLUR_ANIMATION_DURATION = 180;
|
|
@@ -17,7 +21,7 @@ const ICON_SIZE = 24;
|
|
|
17
21
|
class TextField extends React.Component {
|
|
18
22
|
constructor() {
|
|
19
23
|
super(...arguments);
|
|
20
|
-
this
|
|
24
|
+
_defineProperty(this, "state", {
|
|
21
25
|
nativeProps: {},
|
|
22
26
|
labeled: new _reactNative.Animated.Value(this.props.value || this.props.error ? 0 : 1),
|
|
23
27
|
focused: false,
|
|
@@ -26,46 +30,47 @@ class TextField extends React.Component {
|
|
|
26
30
|
measured: false,
|
|
27
31
|
width: 0
|
|
28
32
|
}
|
|
29
|
-
};
|
|
30
|
-
this
|
|
31
|
-
this
|
|
33
|
+
});
|
|
34
|
+
_defineProperty(this, "_timer", setTimeout(() => {}, 0));
|
|
35
|
+
_defineProperty(this, "_showPlaceholder", () => {
|
|
32
36
|
clearTimeout(this._timer);
|
|
37
|
+
|
|
33
38
|
// Set the placeholder in a delay to offset the label animation
|
|
34
39
|
// If we show it immediately, they'll overlap and look ugly
|
|
35
40
|
this._timer = setTimeout(() => this.setState({
|
|
36
41
|
placeholder: this.props.placeholder
|
|
37
42
|
}), 50);
|
|
38
|
-
};
|
|
39
|
-
this._hidePlaceholder = () => this.setState({
|
|
40
|
-
placeholder: ""
|
|
41
43
|
});
|
|
42
|
-
this
|
|
44
|
+
_defineProperty(this, "_hidePlaceholder", () => this.setState({
|
|
45
|
+
placeholder: ""
|
|
46
|
+
}));
|
|
47
|
+
_defineProperty(this, "_restoreLabel", () => _reactNative.Animated.timing(this.state.labeled, {
|
|
43
48
|
toValue: 1,
|
|
44
49
|
duration: FOCUS_ANIMATION_DURATION,
|
|
45
50
|
useNativeDriver: true
|
|
46
|
-
}).start();
|
|
47
|
-
this
|
|
51
|
+
}).start());
|
|
52
|
+
_defineProperty(this, "_minmizeLabel", () => _reactNative.Animated.timing(this.state.labeled, {
|
|
48
53
|
toValue: 0,
|
|
49
54
|
duration: BLUR_ANIMATION_DURATION,
|
|
50
55
|
useNativeDriver: true
|
|
51
|
-
}).start();
|
|
52
|
-
this
|
|
56
|
+
}).start());
|
|
57
|
+
_defineProperty(this, "_handleFocus", () => {
|
|
53
58
|
if (this.props.disabled) {
|
|
54
59
|
return;
|
|
55
60
|
}
|
|
56
61
|
this.setState({
|
|
57
62
|
focused: true
|
|
58
63
|
});
|
|
59
|
-
};
|
|
60
|
-
this
|
|
64
|
+
});
|
|
65
|
+
_defineProperty(this, "_handleBlur", () => {
|
|
61
66
|
if (this.props.disabled) {
|
|
62
67
|
return;
|
|
63
68
|
}
|
|
64
69
|
this.setState({
|
|
65
70
|
focused: false
|
|
66
71
|
});
|
|
67
|
-
};
|
|
68
|
-
this
|
|
72
|
+
});
|
|
73
|
+
_defineProperty(this, "_handleChangeText", value => {
|
|
69
74
|
if (this.props.disabled) {
|
|
70
75
|
return;
|
|
71
76
|
}
|
|
@@ -80,8 +85,8 @@ class TextField extends React.Component {
|
|
|
80
85
|
});
|
|
81
86
|
this.props.onChangeText && this.props.onChangeText(value.nativeEvent.text);
|
|
82
87
|
}
|
|
83
|
-
};
|
|
84
|
-
this
|
|
88
|
+
});
|
|
89
|
+
_defineProperty(this, "_root", undefined);
|
|
85
90
|
}
|
|
86
91
|
static getDerivedStateFromProps(nextProps, prevState) {
|
|
87
92
|
return {
|
|
@@ -168,9 +173,7 @@ class TextField extends React.Component {
|
|
|
168
173
|
roundness,
|
|
169
174
|
disabledOpacity
|
|
170
175
|
},
|
|
171
|
-
render = props => /*#__PURE__*/React.createElement(_reactNative.TextInput,
|
|
172
|
-
...props
|
|
173
|
-
}),
|
|
176
|
+
render = props => /*#__PURE__*/React.createElement(_reactNative.TextInput, props),
|
|
174
177
|
...rest
|
|
175
178
|
} = this.props;
|
|
176
179
|
const MINIMIZED_LABEL_Y_OFFSET = -(typography.caption.lineHeight + 4);
|
|
@@ -310,10 +313,9 @@ class TextField extends React.Component {
|
|
|
310
313
|
} = _reactNative.StyleSheet.flatten(style || {});
|
|
311
314
|
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
312
315
|
style: [styles.container, styleProp]
|
|
313
|
-
}, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon, {
|
|
314
|
-
...leftIconProps,
|
|
316
|
+
}, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon, _extends({}, leftIconProps, {
|
|
315
317
|
style: leftIconStyle
|
|
316
|
-
}) : null, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
318
|
+
})) : null, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
317
319
|
style: (0, _utilities.applyStyles)([containerStyle], {
|
|
318
320
|
height: style === null || style === void 0 ? void 0 : style.height,
|
|
319
321
|
backgroundColor: bgColor,
|
|
@@ -381,10 +383,9 @@ class TextField extends React.Component {
|
|
|
381
383
|
style: {
|
|
382
384
|
justifyContent: type === "solid" ? "center" : undefined
|
|
383
385
|
}
|
|
384
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
385
|
-
...leftIconProps,
|
|
386
|
+
}, /*#__PURE__*/React.createElement(Icon, _extends({}, leftIconProps, {
|
|
386
387
|
style: leftIconStyle
|
|
387
|
-
})) : null, render({
|
|
388
|
+
}))) : null, render({
|
|
388
389
|
ref: c => {
|
|
389
390
|
this._root = c;
|
|
390
391
|
},
|
|
@@ -422,55 +423,6 @@ class TextField extends React.Component {
|
|
|
422
423
|
}
|
|
423
424
|
var _default = (0, _theming.withTheme)(TextField);
|
|
424
425
|
exports.default = _default;
|
|
425
|
-
const styles = _reactNative.StyleSheet.create({
|
|
426
|
-
container: {
|
|
427
|
-
alignSelf: "stretch"
|
|
428
|
-
},
|
|
429
|
-
placeholder: {
|
|
430
|
-
position: "absolute",
|
|
431
|
-
left: 0
|
|
432
|
-
},
|
|
433
|
-
underline: {
|
|
434
|
-
position: "absolute",
|
|
435
|
-
left: 0,
|
|
436
|
-
right: 0,
|
|
437
|
-
bottom: 0,
|
|
438
|
-
height: 2
|
|
439
|
-
},
|
|
440
|
-
input: {
|
|
441
|
-
flexGrow: 1,
|
|
442
|
-
justifyContent: "center",
|
|
443
|
-
textAlignVertical: "center",
|
|
444
|
-
margin: 0,
|
|
445
|
-
textAlign: _reactNative.I18nManager.isRTL ? "right" : "left"
|
|
446
|
-
}
|
|
447
|
-
});_handleFocus,
|
|
448
|
-
onBlur: this._handleBlur,
|
|
449
|
-
underlineColorAndroid: "transparent",
|
|
450
|
-
style: inputStyles,
|
|
451
|
-
...rest,
|
|
452
|
-
...this.state.nativeProps,
|
|
453
|
-
value: this.state.value
|
|
454
|
-
})), rightIconName ? /*#__PURE__*/React.createElement(Icon, {
|
|
455
|
-
name: rightIconName,
|
|
456
|
-
size: ICON_SIZE,
|
|
457
|
-
color: colors.light,
|
|
458
|
-
style: {
|
|
459
|
-
position: "absolute",
|
|
460
|
-
right: 16,
|
|
461
|
-
marginTop: type === "solid" ? MINIMIZED_LABEL_FONT_SIZE + 4 : 16
|
|
462
|
-
}
|
|
463
|
-
}) : null, assistiveText ? /*#__PURE__*/React.createElement(_reactNative.Text, {
|
|
464
|
-
style: [{
|
|
465
|
-
color: error ? colors.error : colors.light,
|
|
466
|
-
marginTop: 8,
|
|
467
|
-
marginLeft: assistiveTextLeftMargin
|
|
468
|
-
}]
|
|
469
|
-
}, assistiveText) : null);
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
var _default = (0, _theming.withTheme)(TextField);
|
|
473
|
-
exports.default = _default;
|
|
474
426
|
const styles = _reactNative.StyleSheet.create({
|
|
475
427
|
container: {
|
|
476
428
|
alignSelf: "stretch"
|
|
@@ -11,6 +11,7 @@ var _IconButton = _interopRequireDefault(require("./IconButton"));
|
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
12
|
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); }
|
|
13
13
|
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; }
|
|
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); }
|
|
14
15
|
const ToggleButton = _ref => {
|
|
15
16
|
let {
|
|
16
17
|
Icon,
|
|
@@ -46,7 +47,7 @@ const ToggleButton = _ref => {
|
|
|
46
47
|
setInternalValue(!internalValue);
|
|
47
48
|
onPress(!internalValue);
|
|
48
49
|
};
|
|
49
|
-
return /*#__PURE__*/React.createElement(_IconButton.default, {
|
|
50
|
+
return /*#__PURE__*/React.createElement(_IconButton.default, _extends({
|
|
50
51
|
Icon: Icon,
|
|
51
52
|
icon: icon,
|
|
52
53
|
size: iconSize,
|
|
@@ -58,20 +59,6 @@ const ToggleButton = _ref => {
|
|
|
58
59
|
height,
|
|
59
60
|
backgroundColor: internalValue ? colors[colorSecondary] : colors[color],
|
|
60
61
|
borderColor: colors[borderColor]
|
|
61
|
-
}, style],
|
|
62
|
-
...rest
|
|
63
|
-
});
|
|
64
|
-
};
|
|
65
|
-
const styles = _reactNative.StyleSheet.create({
|
|
66
|
-
mainContainer: {
|
|
67
|
-
borderWidth: 1
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
var _default = (0, _theming.withTheme)(ToggleButton);
|
|
71
|
-
exports.default = _default;idth,
|
|
72
|
-
height,
|
|
73
|
-
backgroundColor: internalValue ? colors[colorSecondary] : colors[color],
|
|
74
|
-
borderColor: colors[borderColor]
|
|
75
62
|
}, style]
|
|
76
63
|
}, rest));
|
|
77
64
|
};
|
|
@@ -7,6 +7,7 @@ exports.default = Touchable;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
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); }
|
|
10
11
|
function Touchable(_ref) {
|
|
11
12
|
let {
|
|
12
13
|
children,
|
|
@@ -19,22 +20,8 @@ function Touchable(_ref) {
|
|
|
19
20
|
style,
|
|
20
21
|
...props
|
|
21
22
|
} = _ref;
|
|
22
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, {
|
|
23
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, _extends({
|
|
23
24
|
disabled: disabled,
|
|
24
|
-
onPress: onPress,
|
|
25
|
-
delayLongPress: delayLongPress ? delayLongPress : 500,
|
|
26
|
-
hitSlop: hitSlop ? hitSlop : 8,
|
|
27
|
-
style: _ref2 => {
|
|
28
|
-
let {
|
|
29
|
-
pressed
|
|
30
|
-
} = _ref2;
|
|
31
|
-
return [{
|
|
32
|
-
opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1
|
|
33
|
-
}, style];
|
|
34
|
-
},
|
|
35
|
-
...props
|
|
36
|
-
}, children);
|
|
37
|
-
} disabled: disabled,
|
|
38
25
|
onPress: onPress,
|
|
39
26
|
delayLongPress: delayLongPress ? delayLongPress : 500,
|
|
40
27
|
hitSlop: hitSlop ? hitSlop : 8,
|
|
@@ -12,4 +12,4 @@ const APPROX_STATUSBAR_HEIGHT = _reactNative.Platform.select({
|
|
|
12
12
|
android: DEFAULT_STATUSBAR_HEIGHT_EXPO,
|
|
13
13
|
ios: _reactNative.Platform.Version < 11 ? DEFAULT_STATUSBAR_HEIGHT_EXPO : 0
|
|
14
14
|
});
|
|
15
|
-
exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;
|
|
15
|
+
exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;
|
|
@@ -14,6 +14,7 @@ const SEED_DATA = [{
|
|
|
14
14
|
preview_image_url: "{CLOUDINARY_URL}/Field_SearchBar_Full.png",
|
|
15
15
|
supports_list_render: false,
|
|
16
16
|
triggers: [_types.Triggers.OnChange],
|
|
17
|
+
// TODO Triggers.OnSubmit for multiple triggers
|
|
17
18
|
props: {
|
|
18
19
|
icon: {
|
|
19
20
|
group: _types.GROUPS.basic,
|
|
@@ -52,7 +53,4 @@ const SEED_DATA = [{
|
|
|
52
53
|
},
|
|
53
54
|
layout: {}
|
|
54
55
|
}];
|
|
55
|
-
exports.SEED_DATA = SEED_DATA;},
|
|
56
|
-
layout: {}
|
|
57
|
-
}];
|
|
58
56
|
exports.SEED_DATA = SEED_DATA;
|
|
@@ -57,6 +57,7 @@ function extractBorderAndMarginStyles(style, additionalBorderStyles, additionalM
|
|
|
57
57
|
marginStyles
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
|
+
|
|
60
61
|
/**
|
|
61
62
|
* Merges a style object on top of another style object. In React Native,
|
|
62
63
|
* keys with undefined values in a style object will still override styles
|
|
@@ -89,4 +90,4 @@ function getValueForRadioButton(value) {
|
|
|
89
90
|
} else {
|
|
90
91
|
throw new Error(`Invalid value: ${value}`);
|
|
91
92
|
}
|
|
92
|
-
}
|
|
93
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import { Pressable, StyleSheet, View } from "react-native";
|
|
3
4
|
import Text from "../Text";
|
|
@@ -17,10 +18,9 @@ const AccordionItem = _ref => {
|
|
|
17
18
|
textStyles,
|
|
18
19
|
viewStyles
|
|
19
20
|
} = extractStyles(style);
|
|
20
|
-
return /*#__PURE__*/React.createElement(Pressable, {
|
|
21
|
-
style: [styles.container, viewStyles]
|
|
22
|
-
|
|
23
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
21
|
+
return /*#__PURE__*/React.createElement(Pressable, _extends({
|
|
22
|
+
style: [styles.container, viewStyles]
|
|
23
|
+
}, rest), /*#__PURE__*/React.createElement(View, {
|
|
24
24
|
style: styles.row
|
|
25
25
|
}, icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
26
26
|
name: icon,
|
|
@@ -51,25 +51,4 @@ const styles = StyleSheet.create({
|
|
|
51
51
|
justifyContent: "center"
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
-
export default withTheme(AccordionItem);xtStyles
|
|
55
|
-
}, label))));
|
|
56
|
-
};
|
|
57
|
-
const styles = StyleSheet.create({
|
|
58
|
-
container: {
|
|
59
|
-
padding: 8
|
|
60
|
-
},
|
|
61
|
-
row: {
|
|
62
|
-
flexDirection: "row",
|
|
63
|
-
alignItems: "center",
|
|
64
|
-
paddingLeft: 8
|
|
65
|
-
},
|
|
66
|
-
item: {
|
|
67
|
-
marginVertical: 6,
|
|
68
|
-
paddingLeft: 8
|
|
69
|
-
},
|
|
70
|
-
content: {
|
|
71
|
-
flex: 1,
|
|
72
|
-
justifyContent: "center"
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
54
|
export default withTheme(AccordionItem);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import { Animated, Easing } from "react-native";
|
|
3
4
|
import CircularProgress from "./CircularProgress";
|
|
@@ -45,19 +46,6 @@ const AnimatedCircularProgress = _ref => {
|
|
|
45
46
|
React.useEffect(() => {
|
|
46
47
|
animate();
|
|
47
48
|
}, [fill, animate]);
|
|
48
|
-
return /*#__PURE__*/React.createElement(AnimatedProgress, {
|
|
49
|
-
...other,
|
|
50
|
-
style: other.style,
|
|
51
|
-
childrenContainerStyle: other.childrenContainerStyle,
|
|
52
|
-
fill: fillAnimation,
|
|
53
|
-
tintColor: animateColor()
|
|
54
|
-
});
|
|
55
|
-
};
|
|
56
|
-
export default AnimatedCircularProgress;imation;
|
|
57
|
-
};
|
|
58
|
-
React.useEffect(() => {
|
|
59
|
-
animate();
|
|
60
|
-
}, [fill, animate]);
|
|
61
49
|
return /*#__PURE__*/React.createElement(AnimatedProgress, _extends({}, other, {
|
|
62
50
|
style: other.style,
|
|
63
51
|
childrenContainerStyle: other.childrenContainerStyle,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
1
2
|
import React from "react";
|
|
2
3
|
import { View, StyleSheet } from "react-native";
|
|
3
4
|
const AspectRatio = props => {
|
|
@@ -26,24 +27,6 @@ const AspectRatio = props => {
|
|
|
26
27
|
});
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
30
|
-
...props,
|
|
31
|
-
style: style,
|
|
32
|
-
onLayout: _ref => {
|
|
33
|
-
let {
|
|
34
|
-
nativeEvent: {
|
|
35
|
-
layout: l
|
|
36
|
-
}
|
|
37
|
-
} = _ref;
|
|
38
|
-
return setLayout(l);
|
|
39
|
-
}
|
|
40
|
-
}, props.children);
|
|
41
|
-
};
|
|
42
|
-
export default AspectRatio;idth,
|
|
43
|
-
height: width * (1 / aspectRatio)
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
30
|
return /*#__PURE__*/React.createElement(View, _extends({}, props, {
|
|
48
31
|
style: style,
|
|
49
32
|
onLayout: _ref => {
|