@draftbit/core 46.6.6 → 46.6.7-d8d4b8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/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/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/ScreenContainer.js +4 -20
- package/lib/commonjs/components/StepIndicator.js +18 -57
- 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/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/StarRating.js +4 -24
- package/lib/module/components/Stepper.js +4 -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
|
@@ -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 { Pressable } from "react-native";
|
|
3
4
|
export default function Touchable(_ref) {
|
|
@@ -12,22 +13,8 @@ export default function Touchable(_ref) {
|
|
|
12
13
|
style,
|
|
13
14
|
...props
|
|
14
15
|
} = _ref;
|
|
15
|
-
return /*#__PURE__*/React.createElement(Pressable, {
|
|
16
|
+
return /*#__PURE__*/React.createElement(Pressable, _extends({
|
|
16
17
|
disabled: disabled,
|
|
17
|
-
onPress: onPress,
|
|
18
|
-
delayLongPress: delayLongPress ? delayLongPress : 500,
|
|
19
|
-
hitSlop: hitSlop ? hitSlop : 8,
|
|
20
|
-
style: _ref2 => {
|
|
21
|
-
let {
|
|
22
|
-
pressed
|
|
23
|
-
} = _ref2;
|
|
24
|
-
return [{
|
|
25
|
-
opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1
|
|
26
|
-
}, style];
|
|
27
|
-
},
|
|
28
|
-
...props
|
|
29
|
-
}, children);
|
|
30
|
-
} disabled: disabled,
|
|
31
18
|
onPress: onPress,
|
|
32
19
|
delayLongPress: delayLongPress ? delayLongPress : 500,
|
|
33
20
|
hitSlop: hitSlop ? hitSlop : 8,
|
package/lib/module/constants.js
CHANGED
|
@@ -17,7 +17,9 @@ export const SEED_DATA = {
|
|
|
17
17
|
}),
|
|
18
18
|
fieldName: createFieldNameProp({
|
|
19
19
|
defaultValue: "ratingValue",
|
|
20
|
+
// this is the name of the variable declared on the screen in Draftbit
|
|
20
21
|
handlerPropName: "onPress",
|
|
22
|
+
// the change handler prop in this component
|
|
21
23
|
valuePropName: "rating" // the value prop in this component
|
|
22
24
|
}),
|
|
23
25
|
|
|
@@ -41,11 +43,4 @@ export const SEED_DATA = {
|
|
|
41
43
|
defaultValue: "divider"
|
|
42
44
|
})
|
|
43
45
|
}
|
|
44
|
-
};primary"
|
|
45
|
-
}),
|
|
46
|
-
inactiveColor: createColorProp({
|
|
47
|
-
label: "Inactive Color",
|
|
48
|
-
defaultValue: "divider"
|
|
49
|
-
})
|
|
50
|
-
}
|
|
51
46
|
};
|
package/lib/module/utilities.js
CHANGED
|
@@ -44,6 +44,7 @@ export function extractBorderAndMarginStyles(style, additionalBorderStyles, addi
|
|
|
44
44
|
marginStyles
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
+
|
|
47
48
|
/**
|
|
48
49
|
* Merges a style object on top of another style object. In React Native,
|
|
49
50
|
* keys with undefined values in a style object will still override styles
|
|
@@ -76,4 +77,4 @@ export function getValueForRadioButton(value) {
|
|
|
76
77
|
} else {
|
|
77
78
|
throw new Error(`Invalid value: ${value}`);
|
|
78
79
|
}
|
|
79
|
-
}
|
|
80
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "46.6.
|
|
3
|
+
"version": "46.6.7-d8d4b8.2+d8d4b8f",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@date-io/date-fns": "^1.3.13",
|
|
43
43
|
"@draftbit/react-theme-provider": "^2.1.1",
|
|
44
|
-
"@draftbit/types": "^46.6.
|
|
44
|
+
"@draftbit/types": "^46.6.7-d8d4b8.2+d8d4b8f",
|
|
45
45
|
"@material-ui/core": "^4.11.0",
|
|
46
46
|
"@material-ui/pickers": "^3.2.10",
|
|
47
47
|
"@react-native-community/slider": "4.2.3",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
]
|
|
92
92
|
]
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "d8d4b8f9e65c07b60cd34e0a1f4450e3a083bdcd"
|
|
95
95
|
}
|