@draftbit/core 46.7.3 → 46.7.4
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 +4 -23
- package/lib/commonjs/components/AnimatedCircularProgress.js +1 -12
- package/lib/commonjs/components/AvatarEdit.js +4 -15
- package/lib/commonjs/components/Button.js +10 -33
- package/lib/commonjs/components/Checkbox/Checkbox.js +4 -22
- package/lib/commonjs/components/Container.js +4 -15
- package/lib/commonjs/components/DeprecatedButton.js +3 -20
- package/lib/commonjs/components/DeprecatedCardWrapper.js +1 -15
- package/lib/commonjs/components/Divider.js +1 -14
- package/lib/commonjs/components/Image.js +2 -17
- package/lib/commonjs/components/Justification.js +1 -5
- package/lib/commonjs/components/Picker/Picker.js +4 -9
- package/lib/commonjs/components/Portal/PortalHost.js +15 -44
- package/lib/commonjs/components/Portal/PortalManager.js +8 -34
- package/lib/commonjs/components/ProgressBar.js +7 -37
- package/lib/commonjs/components/ResizeMode.js +1 -5
- package/lib/commonjs/components/Slider.js +4 -21
- package/lib/commonjs/components/Surface.js +2 -14
- package/lib/commonjs/components/TextField.js +28 -76
- package/lib/commonjs/components/Touchable.js +2 -15
- package/lib/commonjs/hooks.js +2 -1
- package/lib/commonjs/index.js +0 -56
- package/lib/commonjs/mappings/StarRating.js +2 -6
- package/lib/commonjs/utilities.js +2 -1
- package/lib/module/components/Button.js +10 -33
- package/lib/module/components/Checkbox/CheckboxGroupRow.js +5 -24
- package/lib/module/components/Checkbox/context.js +1 -1
- package/lib/module/components/CircleImage.js +1 -16
- package/lib/module/components/DeprecatedCardWrapper.js +1 -18
- package/lib/module/components/Divider.js +1 -18
- package/lib/module/components/Elevation.js +2 -14
- package/lib/module/components/FieldSearchBarFull.js +2 -1
- package/lib/module/components/FormRow.js +2 -17
- package/lib/module/components/Image.js +2 -18
- package/lib/module/components/Justification.js +0 -1
- package/lib/module/components/Layout.js +21 -42
- package/lib/module/components/NumberInput.js +3 -12
- package/lib/module/components/Picker/PickerComponent.ios.js +11 -36
- package/lib/module/components/Portal/PortalConsumer.js +7 -22
- package/lib/module/components/RadioButton/RadioButton.js +1 -13
- package/lib/module/components/RadioButton/RadioButtonGroup.js +2 -16
- package/lib/module/components/RadioButton/RadioButtonRow.js +5 -24
- package/lib/module/components/ResizeMode.js +0 -1
- package/lib/module/components/Slider.js +4 -21
- package/lib/module/components/StepIndicator.js +18 -58
- 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 +2 -1
- package/lib/module/index.js +0 -8
- package/lib/module/mappings/FieldSearchBarFull.js +1 -4
- package/lib/module/styles/overlay.js +3 -1
- package/lib/module/utilities.js +2 -1
- package/lib/typescript/src/index.d.ts +0 -8
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/index.tsx +0 -8
- package/lib/commonjs/components/CardBlock.js +0 -115
- package/lib/commonjs/components/CardContainer.js +0 -138
- package/lib/commonjs/components/CardContainerRating.js +0 -133
- package/lib/commonjs/components/CardContainerShortImage.js +0 -84
- package/lib/commonjs/components/CardInline.js +0 -91
- package/lib/commonjs/components/Carousel.js +0 -130
- package/lib/commonjs/components/Header.js +0 -82
- package/lib/commonjs/components/HeaderLarge.js +0 -38
- package/lib/commonjs/components/HeaderMedium.js +0 -38
- package/lib/commonjs/components/HeaderOverline.js +0 -39
- package/lib/module/components/CardBlock.js +0 -108
- package/lib/module/components/CardContainer.js +0 -121
- package/lib/module/components/CardContainerRating.js +0 -135
- package/lib/module/components/CardContainerShortImage.js +0 -90
- package/lib/module/components/CardInline.js +0 -82
- package/lib/module/components/Carousel.js +0 -120
- package/lib/module/components/Header.js +0 -72
- package/lib/module/components/HeaderLarge.js +0 -28
- package/lib/module/components/HeaderMedium.js +0 -28
- package/lib/module/components/HeaderOverline.js +0 -29
- package/lib/typescript/src/components/CardBlock.d.ts +0 -21
- package/lib/typescript/src/components/CardBlock.d.ts.map +0 -1
- package/lib/typescript/src/components/CardContainer.d.ts +0 -23
- package/lib/typescript/src/components/CardContainer.d.ts.map +0 -1
- package/lib/typescript/src/components/CardContainerRating.d.ts +0 -24
- package/lib/typescript/src/components/CardContainerRating.d.ts.map +0 -1
- package/lib/typescript/src/components/CardContainerShortImage.d.ts +0 -19
- package/lib/typescript/src/components/CardContainerShortImage.d.ts.map +0 -1
- package/lib/typescript/src/components/CardInline.d.ts +0 -20
- package/lib/typescript/src/components/CardInline.d.ts.map +0 -1
- package/lib/typescript/src/components/Carousel.d.ts +0 -15
- package/lib/typescript/src/components/Carousel.d.ts.map +0 -1
- package/lib/typescript/src/components/Header.d.ts +0 -20
- package/lib/typescript/src/components/Header.d.ts.map +0 -1
- package/lib/typescript/src/components/HeaderLarge.d.ts +0 -17
- package/lib/typescript/src/components/HeaderLarge.d.ts.map +0 -1
- package/lib/typescript/src/components/HeaderMedium.d.ts +0 -17
- package/lib/typescript/src/components/HeaderMedium.d.ts.map +0 -1
- package/lib/typescript/src/components/HeaderOverline.d.ts +0 -17
- package/lib/typescript/src/components/HeaderOverline.d.ts.map +0 -1
- 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/CardBlock.tsx +0 -127
- package/src/components/CardContainer.js +0 -69
- package/src/components/CardContainer.tsx +0 -165
- package/src/components/CardContainerRating.js +0 -79
- package/src/components/CardContainerRating.tsx +0 -175
- package/src/components/CardContainerShortImage.js +0 -33
- package/src/components/CardContainerShortImage.tsx +0 -101
- package/src/components/CardInline.js +0 -36
- package/src/components/CardInline.tsx +0 -93
- package/src/components/Carousel.js +0 -68
- package/src/components/Carousel.tsx +0 -134
- 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/Header.tsx +0 -105
- package/src/components/HeaderLarge.js +0 -7
- package/src/components/HeaderLarge.tsx +0 -40
- package/src/components/HeaderMedium.js +0 -7
- package/src/components/HeaderMedium.tsx +0 -41
- package/src/components/HeaderOverline.js +0 -7
- package/src/components/HeaderOverline.tsx +0 -42
- 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 -85
- package/src/mappings/FlatList.js +0 -37
- 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,54 +8,28 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
10
10
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
11
|
+
function _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); }
|
|
11
14
|
/**
|
|
12
15
|
* Portal host is the component which actually renders all Portals.
|
|
13
16
|
*/
|
|
14
17
|
class PortalManager extends React.PureComponent {
|
|
15
18
|
constructor() {
|
|
16
19
|
super(...arguments);
|
|
17
|
-
this
|
|
20
|
+
_defineProperty(this, "state", {
|
|
18
21
|
portals: []
|
|
19
|
-
};
|
|
20
|
-
this
|
|
22
|
+
});
|
|
23
|
+
_defineProperty(this, "mount", (key, children) => {
|
|
21
24
|
this.setState(state => ({
|
|
22
25
|
portals: [...state.portals, {
|
|
23
26
|
key,
|
|
24
27
|
children
|
|
25
28
|
}]
|
|
26
29
|
}));
|
|
27
|
-
};
|
|
28
|
-
this.update = (key, children) => this.setState(state => ({
|
|
29
|
-
portals: state.portals.map(item => {
|
|
30
|
-
if (item.key === key) {
|
|
31
|
-
return {
|
|
32
|
-
...item,
|
|
33
|
-
children
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
return item;
|
|
37
|
-
})
|
|
38
|
-
}));
|
|
39
|
-
this.unmount = key => this.setState(state => ({
|
|
40
|
-
portals: state.portals.filter(item => item.key !== key)
|
|
41
|
-
}));
|
|
42
|
-
}
|
|
43
|
-
render() {
|
|
44
|
-
return this.state.portals.map(_ref => {
|
|
45
|
-
let {
|
|
46
|
-
key,
|
|
47
|
-
children
|
|
48
|
-
} = _ref;
|
|
49
|
-
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
50
|
-
key: key,
|
|
51
|
-
collapsable: false /* Need collapsable=false here to clip the elevations, otherwise they appear above sibling components */,
|
|
52
|
-
pointerEvents: "box-none",
|
|
53
|
-
style: _reactNative.StyleSheet.absoluteFill
|
|
54
|
-
}, children);
|
|
55
30
|
});
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
exports.default = PortalManager;tate.portals.map(item => {
|
|
31
|
+
_defineProperty(this, "update", (key, children) => this.setState(state => ({
|
|
32
|
+
portals: state.portals.map(item => {
|
|
59
33
|
if (item.key === key) {
|
|
60
34
|
return {
|
|
61
35
|
...item,
|
|
@@ -8,12 +8,16 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
10
10
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
11
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
12
|
+
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; }
|
|
13
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
14
|
+
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); }
|
|
11
15
|
const INDETERMINATE_WIDTH_FACTOR = 0.3;
|
|
12
16
|
const BAR_WIDTH_ZERO_POSITION = INDETERMINATE_WIDTH_FACTOR / (1 + INDETERMINATE_WIDTH_FACTOR);
|
|
13
17
|
class ProgressBar extends _react.Component {
|
|
14
18
|
constructor(props) {
|
|
15
19
|
super(props);
|
|
16
|
-
this
|
|
20
|
+
_defineProperty(this, "handleLayout", event => {
|
|
17
21
|
const {
|
|
18
22
|
width = 150,
|
|
19
23
|
onLayout
|
|
@@ -26,7 +30,7 @@ class ProgressBar extends _react.Component {
|
|
|
26
30
|
if (onLayout) {
|
|
27
31
|
onLayout(event);
|
|
28
32
|
}
|
|
29
|
-
};
|
|
33
|
+
});
|
|
30
34
|
const {
|
|
31
35
|
progress: progressP = 0,
|
|
32
36
|
indeterminate = false
|
|
@@ -74,6 +78,7 @@ class ProgressBar extends _react.Component {
|
|
|
74
78
|
...animationConfig,
|
|
75
79
|
toValue: progress,
|
|
76
80
|
velocity: 0,
|
|
81
|
+
//adjust this value if animation fails - velocity is required
|
|
77
82
|
useNativeDriver
|
|
78
83
|
}).start();
|
|
79
84
|
} else {
|
|
@@ -142,41 +147,6 @@ class ProgressBar extends _react.Component {
|
|
|
142
147
|
})
|
|
143
148
|
}]
|
|
144
149
|
};
|
|
145
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
146
|
-
style: [containerStyle, style],
|
|
147
|
-
onLayout: this.handleLayout,
|
|
148
|
-
...restProps
|
|
149
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
|
|
150
|
-
style: progressStyle
|
|
151
|
-
}), children);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
exports.default = ProgressBar;,
|
|
155
|
-
overflow: "hidden",
|
|
156
|
-
backgroundColor: unfilledColor
|
|
157
|
-
};
|
|
158
|
-
const progressStyle = {
|
|
159
|
-
backgroundColor: color,
|
|
160
|
-
// Always take up full height of container.
|
|
161
|
-
height: "100%",
|
|
162
|
-
transform: [{
|
|
163
|
-
translateX: this.state.animationValue.interpolate({
|
|
164
|
-
inputRange: [0, 1],
|
|
165
|
-
outputRange: [innerWidth * -INDETERMINATE_WIDTH_FACTOR, innerWidth]
|
|
166
|
-
})
|
|
167
|
-
}, {
|
|
168
|
-
translateX: this.state.progress.interpolate({
|
|
169
|
-
inputRange: [0, 1],
|
|
170
|
-
outputRange: [innerWidth / (_reactNative.I18nManager.isRTL ? 2 : -2), 0]
|
|
171
|
-
})
|
|
172
|
-
}, {
|
|
173
|
-
// Interpolation a temp workaround for https://github.com/facebook/react-native/issues/6278
|
|
174
|
-
scaleX: this.state.progress.interpolate({
|
|
175
|
-
inputRange: [0, 1],
|
|
176
|
-
outputRange: [0.0001, 1]
|
|
177
|
-
})
|
|
178
|
-
}]
|
|
179
|
-
};
|
|
180
150
|
return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({
|
|
181
151
|
style: [containerStyle, style],
|
|
182
152
|
onLayout: this.handleLayout
|
|
@@ -13,6 +13,7 @@ var _theming = require("../theming");
|
|
|
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 maybeParseValue(value) {
|
|
17
18
|
if (value === undefined) {
|
|
18
19
|
return undefined;
|
|
@@ -72,10 +73,9 @@ function Slider(_ref) {
|
|
|
72
73
|
setInternalValue(newValue);
|
|
73
74
|
onValueChange(newValue);
|
|
74
75
|
};
|
|
75
|
-
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
76
|
-
style: [styles.container, style]
|
|
77
|
-
|
|
78
|
-
}, leftIcon ? /*#__PURE__*/React.createElement(Icon, {
|
|
76
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
|
|
77
|
+
style: [styles.container, style]
|
|
78
|
+
}, rest), leftIcon ? /*#__PURE__*/React.createElement(Icon, {
|
|
79
79
|
color: leftIconThemeColor,
|
|
80
80
|
name: leftIcon,
|
|
81
81
|
size: 24
|
|
@@ -108,21 +108,4 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
110
|
var _default = (0, _theming.withTheme)(Slider);
|
|
111
|
-
exports.default = _default;or: rightIconThemeColor,
|
|
112
|
-
name: rightIcon,
|
|
113
|
-
size: 24
|
|
114
|
-
}) : null);
|
|
115
|
-
}
|
|
116
|
-
const styles = _reactNative.StyleSheet.create({
|
|
117
|
-
container: {
|
|
118
|
-
height: 40,
|
|
119
|
-
flexDirection: "row",
|
|
120
|
-
alignItems: "center"
|
|
121
|
-
},
|
|
122
|
-
slider: {
|
|
123
|
-
flex: 1,
|
|
124
|
-
marginHorizontal: 12
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
var _default = (0, _theming.withTheme)(Slider);
|
|
128
111
|
exports.default = _default;
|
|
@@ -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,
|
|
@@ -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"
|
|
@@ -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,
|
package/lib/commonjs/hooks.js
CHANGED
|
@@ -10,11 +10,12 @@ function usePrevious(value) {
|
|
|
10
10
|
// The ref object is a generic container whose current property is mutable
|
|
11
11
|
// and can hold any value, similar to an instance property on a class
|
|
12
12
|
const ref = _react.default.useRef();
|
|
13
|
+
|
|
13
14
|
// Store current value in ref
|
|
14
15
|
_react.default.useEffect(() => {
|
|
15
16
|
ref.current = value;
|
|
16
17
|
}, [value]);
|
|
18
|
+
|
|
17
19
|
// Return previous value (happens before update in useEffect above)
|
|
18
20
|
return ref.current;
|
|
19
|
-
}
|
|
20
21
|
}
|
package/lib/commonjs/index.js
CHANGED
|
@@ -75,36 +75,6 @@ Object.defineProperty(exports, "Card", {
|
|
|
75
75
|
return _Card.default;
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
|
-
Object.defineProperty(exports, "CardBlock", {
|
|
79
|
-
enumerable: true,
|
|
80
|
-
get: function () {
|
|
81
|
-
return _CardBlock.default;
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
Object.defineProperty(exports, "CardContainer", {
|
|
85
|
-
enumerable: true,
|
|
86
|
-
get: function () {
|
|
87
|
-
return _CardContainer.default;
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
Object.defineProperty(exports, "CardContainerRating", {
|
|
91
|
-
enumerable: true,
|
|
92
|
-
get: function () {
|
|
93
|
-
return _CardContainerRating.default;
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
Object.defineProperty(exports, "CardInline", {
|
|
97
|
-
enumerable: true,
|
|
98
|
-
get: function () {
|
|
99
|
-
return _CardInline.default;
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
Object.defineProperty(exports, "Carousel", {
|
|
103
|
-
enumerable: true,
|
|
104
|
-
get: function () {
|
|
105
|
-
return _Carousel.default;
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
78
|
Object.defineProperty(exports, "Center", {
|
|
109
79
|
enumerable: true,
|
|
110
80
|
get: function () {
|
|
@@ -177,24 +147,6 @@ Object.defineProperty(exports, "FieldSearchBarFull", {
|
|
|
177
147
|
return _FieldSearchBarFull.default;
|
|
178
148
|
}
|
|
179
149
|
});
|
|
180
|
-
Object.defineProperty(exports, "HeaderLarge", {
|
|
181
|
-
enumerable: true,
|
|
182
|
-
get: function () {
|
|
183
|
-
return _HeaderLarge.default;
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
Object.defineProperty(exports, "HeaderMedium", {
|
|
187
|
-
enumerable: true,
|
|
188
|
-
get: function () {
|
|
189
|
-
return _HeaderMedium.default;
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
Object.defineProperty(exports, "HeaderOverline", {
|
|
193
|
-
enumerable: true,
|
|
194
|
-
get: function () {
|
|
195
|
-
return _HeaderOverline.default;
|
|
196
|
-
}
|
|
197
|
-
});
|
|
198
150
|
Object.defineProperty(exports, "IconButton", {
|
|
199
151
|
enumerable: true,
|
|
200
152
|
get: function () {
|
|
@@ -427,7 +379,6 @@ var _Button = require("./components/Button");
|
|
|
427
379
|
var _CircleImage = _interopRequireDefault(require("./components/CircleImage"));
|
|
428
380
|
var _AvatarEdit = _interopRequireDefault(require("./components/AvatarEdit"));
|
|
429
381
|
var _Card = _interopRequireDefault(require("./components/Card"));
|
|
430
|
-
var _Carousel = _interopRequireDefault(require("./components/Carousel"));
|
|
431
382
|
var _Checkbox = require("./components/Checkbox");
|
|
432
383
|
var _Container = _interopRequireDefault(require("./components/Container"));
|
|
433
384
|
var _Divider = _interopRequireDefault(require("./components/Divider"));
|
|
@@ -450,14 +401,7 @@ var _ActionSheet = require("./components/ActionSheet");
|
|
|
450
401
|
var _Swiper = require("./components/Swiper");
|
|
451
402
|
var _Layout = require("./components/Layout");
|
|
452
403
|
var _index = require("./components/RadioButton/index");
|
|
453
|
-
var _CardBlock = _interopRequireDefault(require("./components/CardBlock"));
|
|
454
|
-
var _CardContainer = _interopRequireDefault(require("./components/CardContainer"));
|
|
455
|
-
var _CardContainerRating = _interopRequireDefault(require("./components/CardContainerRating"));
|
|
456
|
-
var _CardInline = _interopRequireDefault(require("./components/CardInline"));
|
|
457
404
|
var _DatePicker = _interopRequireDefault(require("./components/DatePicker/DatePicker"));
|
|
458
|
-
var _HeaderLarge = _interopRequireDefault(require("./components/HeaderLarge"));
|
|
459
|
-
var _HeaderMedium = _interopRequireDefault(require("./components/HeaderMedium"));
|
|
460
|
-
var _HeaderOverline = _interopRequireDefault(require("./components/HeaderOverline"));
|
|
461
405
|
var _Picker = _interopRequireDefault(require("./components/Picker/Picker"));
|
|
462
406
|
var _ProgressBar = _interopRequireDefault(require("./components/ProgressBar"));
|
|
463
407
|
var _ProgressCircle = _interopRequireDefault(require("./components/ProgressCircle"));
|
|
@@ -23,7 +23,9 @@ const SEED_DATA = {
|
|
|
23
23
|
}),
|
|
24
24
|
fieldName: (0, _types.createFieldNameProp)({
|
|
25
25
|
defaultValue: "ratingValue",
|
|
26
|
+
// this is the name of the variable declared on the screen in Draftbit
|
|
26
27
|
handlerPropName: "onPress",
|
|
28
|
+
// the change handler prop in this component
|
|
27
29
|
valuePropName: "rating" // the value prop in this component
|
|
28
30
|
}),
|
|
29
31
|
|
|
@@ -48,10 +50,4 @@ const SEED_DATA = {
|
|
|
48
50
|
})
|
|
49
51
|
}
|
|
50
52
|
};
|
|
51
|
-
exports.SEED_DATA = SEED_DATA;pes.createColorProp)({
|
|
52
|
-
label: "Inactive Color",
|
|
53
|
-
defaultValue: "divider"
|
|
54
|
-
})
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
53
|
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: ".concat(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 { Text, Pressable, Platform, StyleSheet, ActivityIndicator } from "react-native";
|
|
3
4
|
import { withTheme } from "../theming";
|
|
@@ -52,7 +53,7 @@ function Base(_ref) {
|
|
|
52
53
|
if (textAlign === "right") {
|
|
53
54
|
buttonStyles.justifyContent = "flex-end";
|
|
54
55
|
}
|
|
55
|
-
return /*#__PURE__*/React.createElement(Pressable, {
|
|
56
|
+
return /*#__PURE__*/React.createElement(Pressable, _extends({
|
|
56
57
|
disabled: disabled || loading,
|
|
57
58
|
style: _ref2 => {
|
|
58
59
|
let {
|
|
@@ -61,9 +62,8 @@ function Base(_ref) {
|
|
|
61
62
|
return [styles.base, {
|
|
62
63
|
opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1
|
|
63
64
|
}, buttonStyles];
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
}, loading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
|
|
65
|
+
}
|
|
66
|
+
}, props), loading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
|
|
67
67
|
size: "small",
|
|
68
68
|
color: color,
|
|
69
69
|
style: styles.loading
|
|
@@ -82,14 +82,13 @@ const Solid = _ref3 => {
|
|
|
82
82
|
theme,
|
|
83
83
|
...props
|
|
84
84
|
} = _ref3;
|
|
85
|
-
return /*#__PURE__*/React.createElement(Base, {
|
|
85
|
+
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
86
86
|
style: [{
|
|
87
87
|
color: "#FFF",
|
|
88
88
|
borderRadius: theme.roundness,
|
|
89
89
|
backgroundColor: theme.colors.primary
|
|
90
|
-
}, style]
|
|
91
|
-
|
|
92
|
-
});
|
|
90
|
+
}, style]
|
|
91
|
+
}, props));
|
|
93
92
|
};
|
|
94
93
|
const ButtonSolid = withTheme(Solid);
|
|
95
94
|
export { ButtonSolid };
|
|
@@ -101,14 +100,13 @@ const Outline = _ref4 => {
|
|
|
101
100
|
theme,
|
|
102
101
|
...props
|
|
103
102
|
} = _ref4;
|
|
104
|
-
return /*#__PURE__*/React.createElement(Base, {
|
|
103
|
+
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
105
104
|
style: [styles.outline, {
|
|
106
105
|
borderRadius: theme.roundness,
|
|
107
106
|
borderColor: theme.colors.primary,
|
|
108
107
|
color: theme.colors.primary
|
|
109
|
-
}, style]
|
|
110
|
-
|
|
111
|
-
});
|
|
108
|
+
}, style]
|
|
109
|
+
}, props));
|
|
112
110
|
};
|
|
113
111
|
const ButtonOutline = withTheme(Outline);
|
|
114
112
|
export { ButtonOutline };
|
|
@@ -155,25 +153,4 @@ const styles = StyleSheet.create({
|
|
|
155
153
|
}
|
|
156
154
|
})
|
|
157
155
|
}
|
|
158
|
-
});or: "transparent",
|
|
159
|
-
padding: 0,
|
|
160
|
-
minHeight: undefined
|
|
161
|
-
},
|
|
162
|
-
loading: {
|
|
163
|
-
marginRight: 6
|
|
164
|
-
},
|
|
165
|
-
icon: {
|
|
166
|
-
...Platform.select({
|
|
167
|
-
web: {
|
|
168
|
-
marginTop: 1,
|
|
169
|
-
marginRight: 4,
|
|
170
|
-
alignSelf: "center"
|
|
171
|
-
},
|
|
172
|
-
default: {
|
|
173
|
-
marginBottom: 2,
|
|
174
|
-
marginRight: 4,
|
|
175
|
-
alignSelf: "center"
|
|
176
|
-
}
|
|
177
|
-
})
|
|
178
|
-
}
|
|
179
156
|
});
|