@draftbit/core 46.4.3-64fdb2.2 → 46.4.3-c292ad.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/Button.js +35 -12
- package/lib/commonjs/components/CardContainer.js +5 -15
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +24 -6
- package/lib/commonjs/components/CircleImage.js +2 -16
- package/lib/commonjs/components/Container.js +5 -17
- package/lib/commonjs/components/DeprecatedFAB.js +4 -22
- package/lib/commonjs/components/Divider.js +2 -16
- package/lib/commonjs/components/Layout.js +40 -19
- package/lib/commonjs/components/NumberInput.js +2 -13
- package/lib/commonjs/components/Picker/PickerComponent.android.js +5 -24
- package/lib/commonjs/components/Picker/PickerComponent.ios.js +13 -42
- package/lib/commonjs/components/Portal/PortalManager.js +19 -11
- package/lib/commonjs/components/ProgressBar.js +23 -7
- package/lib/commonjs/components/RadioButton/RadioButton.js +14 -3
- package/lib/commonjs/components/RadioButton/RadioButtonGroup.js +16 -3
- package/lib/commonjs/components/ScreenContainer.js +5 -23
- package/lib/commonjs/components/StepIndicator.js +34 -16
- package/lib/commonjs/components/Text.js +37 -11
- package/lib/commonjs/components/TextField.js +30 -63
- package/lib/commonjs/constants.js +2 -2
- package/lib/commonjs/index.js +1 -3
- package/lib/commonjs/mappings/StarRating.js +2 -6
- package/lib/module/components/Button.js +2 -0
- package/lib/module/components/Portal/PortalHost.js +15 -26
- package/lib/module/components/RadioButton/RadioButton.js +2 -15
- package/lib/module/index.js +1 -2
- package/lib/typescript/src/components/Button.d.ts +2 -0
- package/lib/typescript/src/index.d.ts +1 -2
- package/package.json +3 -3
- package/src/components/Button.js +2 -0
- package/src/components/Button.tsx +3 -0
- package/src/index.js +1 -2
- package/src/index.tsx +1 -2
|
@@ -25,7 +25,9 @@ const SEED_DATA = {
|
|
|
25
25
|
}),
|
|
26
26
|
fieldName: (0, _types.createFieldNameProp)({
|
|
27
27
|
defaultValue: "ratingValue",
|
|
28
|
+
// this is the name of the variable declared on the screen in Draftbit
|
|
28
29
|
handlerPropName: "onPress",
|
|
30
|
+
// the change handler prop in this component
|
|
29
31
|
valuePropName: "rating" // the value prop in this component
|
|
30
32
|
|
|
31
33
|
}),
|
|
@@ -50,10 +52,4 @@ const SEED_DATA = {
|
|
|
50
52
|
})
|
|
51
53
|
}
|
|
52
54
|
};
|
|
53
|
-
exports.SEED_DATA = SEED_DATA;pes.createColorProp)({
|
|
54
|
-
label: "Inactive Color",
|
|
55
|
-
defaultValue: "divider"
|
|
56
|
-
})
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
55
|
exports.SEED_DATA = SEED_DATA;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
+
|
|
1
3
|
import * as React from "react";
|
|
2
4
|
import { View, StyleSheet } from "react-native";
|
|
3
5
|
import PortalManager from "./PortalManager";
|
|
@@ -31,11 +33,11 @@ export default class PortalHost extends React.Component {
|
|
|
31
33
|
constructor() {
|
|
32
34
|
super(...arguments);
|
|
33
35
|
|
|
34
|
-
this
|
|
36
|
+
_defineProperty(this, "setManager", manager => {
|
|
35
37
|
this.manager = manager;
|
|
36
|
-
};
|
|
38
|
+
});
|
|
37
39
|
|
|
38
|
-
this
|
|
40
|
+
_defineProperty(this, "mount", children => {
|
|
39
41
|
const key = this.nextKey++;
|
|
40
42
|
|
|
41
43
|
if (this.manager) {
|
|
@@ -49,9 +51,9 @@ export default class PortalHost extends React.Component {
|
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
return key;
|
|
52
|
-
};
|
|
54
|
+
});
|
|
53
55
|
|
|
54
|
-
this
|
|
56
|
+
_defineProperty(this, "update", (key, children) => {
|
|
55
57
|
if (this.manager) {
|
|
56
58
|
this.manager.update(key, children);
|
|
57
59
|
} else {
|
|
@@ -69,9 +71,9 @@ export default class PortalHost extends React.Component {
|
|
|
69
71
|
this.queue.push(op);
|
|
70
72
|
}
|
|
71
73
|
}
|
|
72
|
-
};
|
|
74
|
+
});
|
|
73
75
|
|
|
74
|
-
this
|
|
76
|
+
_defineProperty(this, "unmount", key => {
|
|
75
77
|
if (this.manager) {
|
|
76
78
|
this.manager.unmount(key);
|
|
77
79
|
} else {
|
|
@@ -80,10 +82,13 @@ export default class PortalHost extends React.Component {
|
|
|
80
82
|
key
|
|
81
83
|
});
|
|
82
84
|
}
|
|
83
|
-
};
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
_defineProperty(this, "nextKey", 0);
|
|
88
|
+
|
|
89
|
+
_defineProperty(this, "queue", []);
|
|
84
90
|
|
|
85
|
-
this
|
|
86
|
-
this.queue = [];
|
|
91
|
+
_defineProperty(this, "manager", void 0);
|
|
87
92
|
}
|
|
88
93
|
|
|
89
94
|
componentDidMount() {
|
|
@@ -127,22 +132,6 @@ export default class PortalHost extends React.Component {
|
|
|
127
132
|
}));
|
|
128
133
|
}
|
|
129
134
|
|
|
130
|
-
}
|
|
131
|
-
PortalHost.displayName = "Portal.Host";
|
|
132
|
-
const styles = StyleSheet.create({
|
|
133
|
-
container: {
|
|
134
|
-
flex: 1
|
|
135
|
-
}
|
|
136
|
-
}); }
|
|
137
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
138
|
-
style: styles.container,
|
|
139
|
-
collapsable: false,
|
|
140
|
-
pointerEvents: "box-none"
|
|
141
|
-
}, this.props.children), /*#__PURE__*/React.createElement(PortalManager, {
|
|
142
|
-
ref: this.setManager
|
|
143
|
-
}));
|
|
144
|
-
}
|
|
145
|
-
|
|
146
135
|
}
|
|
147
136
|
|
|
148
137
|
_defineProperty(PortalHost, "displayName", "Portal.Host");
|
|
@@ -1,3 +1,5 @@
|
|
|
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); }
|
|
2
|
+
|
|
1
3
|
import * as React from "react";
|
|
2
4
|
import Config from "../Config";
|
|
3
5
|
import IconButton from "../IconButton";
|
|
@@ -32,21 +34,6 @@ const RadioButton = _ref => {
|
|
|
32
34
|
onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(realValue);
|
|
33
35
|
};
|
|
34
36
|
|
|
35
|
-
return /*#__PURE__*/React.createElement(IconButton, {
|
|
36
|
-
Icon: Icon,
|
|
37
|
-
icon: isSelected ? selectedIcon : unselectedIcon,
|
|
38
|
-
color: isSelected ? color : unselectedColor,
|
|
39
|
-
disabled: disabled,
|
|
40
|
-
onPress: handlePress,
|
|
41
|
-
size: size,
|
|
42
|
-
style: style,
|
|
43
|
-
...rest
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export default RadioButton; onValueChange(realValue);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
37
|
return /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
51
38
|
Icon: Icon,
|
|
52
39
|
icon: isSelected ? selectedIcon : unselectedIcon,
|
package/lib/module/index.js
CHANGED
|
@@ -4,7 +4,7 @@ export { default as Provider } from "./Provider";
|
|
|
4
4
|
export { default as DefaultTheme } from "./styles/DefaultTheme";
|
|
5
5
|
export { Link } from "./components/Text";
|
|
6
6
|
export { default as Banner } from "./components/Banner";
|
|
7
|
-
export { ButtonSolid, ButtonOutline } from "./components/Button";
|
|
7
|
+
export { Button, ButtonSolid, ButtonOutline } from "./components/Button";
|
|
8
8
|
export { default as Avatar } from "./components/CircleImage";
|
|
9
9
|
export { default as AvatarEdit } from "./components/AvatarEdit";
|
|
10
10
|
export { default as Card } from "./components/Card";
|
|
@@ -33,7 +33,6 @@ export { Center, Circle, Square, Row, Stack, Spacer } from "./components/Layout"
|
|
|
33
33
|
export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup } from "./components/RadioButton/index";
|
|
34
34
|
/* Deprecated: Fix or Delete! */
|
|
35
35
|
|
|
36
|
-
export { default as Button } from "./components/DeprecatedButton";
|
|
37
36
|
export { default as CardBlock } from "./components/CardBlock";
|
|
38
37
|
export { default as CardContainer } from "./components/CardContainer";
|
|
39
38
|
export { default as CardContainerRating } from "./components/CardContainerRating";
|
|
@@ -4,7 +4,7 @@ export { default as Provider } from "./Provider";
|
|
|
4
4
|
export { default as DefaultTheme } from "./styles/DefaultTheme";
|
|
5
5
|
export { Link } from "./components/Text";
|
|
6
6
|
export { default as Banner } from "./components/Banner";
|
|
7
|
-
export { ButtonSolid, ButtonOutline } from "./components/Button";
|
|
7
|
+
export { Button, ButtonSolid, ButtonOutline } from "./components/Button";
|
|
8
8
|
export { default as Avatar } from "./components/CircleImage";
|
|
9
9
|
export { default as AvatarEdit } from "./components/AvatarEdit";
|
|
10
10
|
export { default as Card } from "./components/Card";
|
|
@@ -31,7 +31,6 @@ export { ActionSheet, ActionSheetItem, ActionSheetCancel, } from "./components/A
|
|
|
31
31
|
export { Swiper, SwiperItem } from "./components/Swiper";
|
|
32
32
|
export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
|
|
33
33
|
export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
|
|
34
|
-
export { default as Button } from "./components/DeprecatedButton";
|
|
35
34
|
export { default as CardBlock } from "./components/CardBlock";
|
|
36
35
|
export { default as CardContainer } from "./components/CardContainer";
|
|
37
36
|
export { default as CardContainerRating } from "./components/CardContainerRating";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "46.4.3-
|
|
3
|
+
"version": "46.4.3-c292ad.2+c292add",
|
|
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.4.3-
|
|
44
|
+
"@draftbit/types": "^46.4.3-c292ad.2+c292add",
|
|
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",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
]
|
|
82
82
|
]
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "c292add64fa0f6ded7e9271ed1fe2566b9516911"
|
|
85
85
|
}
|
package/src/components/Button.js
CHANGED
|
@@ -53,6 +53,8 @@ const Solid = ({ style, theme, ...props }) => {
|
|
|
53
53
|
};
|
|
54
54
|
const ButtonSolid = withTheme(Solid);
|
|
55
55
|
export { ButtonSolid };
|
|
56
|
+
const Button = withTheme(Solid);
|
|
57
|
+
export { Button };
|
|
56
58
|
const Outline = ({ style, theme, ...props }) => {
|
|
57
59
|
return (React.createElement(Base, { style: [
|
|
58
60
|
styles.outline,
|
|
@@ -139,6 +139,9 @@ const Solid = ({ style, theme, ...props }: Props): JSX.Element => {
|
|
|
139
139
|
const ButtonSolid: any = withTheme(Solid);
|
|
140
140
|
export { ButtonSolid };
|
|
141
141
|
|
|
142
|
+
const Button: any = withTheme(Solid);
|
|
143
|
+
export { Button };
|
|
144
|
+
|
|
142
145
|
const Outline = ({ style, theme, ...props }: Props): JSX.Element => {
|
|
143
146
|
return (
|
|
144
147
|
<Base
|
package/src/index.js
CHANGED
|
@@ -4,7 +4,7 @@ export { default as Provider } from "./Provider";
|
|
|
4
4
|
export { default as DefaultTheme } from "./styles/DefaultTheme";
|
|
5
5
|
export { Link } from "./components/Text";
|
|
6
6
|
export { default as Banner } from "./components/Banner";
|
|
7
|
-
export { ButtonSolid, ButtonOutline } from "./components/Button";
|
|
7
|
+
export { Button, ButtonSolid, ButtonOutline } from "./components/Button";
|
|
8
8
|
export { default as Avatar } from "./components/CircleImage";
|
|
9
9
|
export { default as AvatarEdit } from "./components/AvatarEdit";
|
|
10
10
|
export { default as Card } from "./components/Card";
|
|
@@ -32,7 +32,6 @@ export { Swiper, SwiperItem } from "./components/Swiper";
|
|
|
32
32
|
export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
|
|
33
33
|
export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
|
|
34
34
|
/* Deprecated: Fix or Delete! */
|
|
35
|
-
export { default as Button } from "./components/DeprecatedButton";
|
|
36
35
|
export { default as CardBlock } from "./components/CardBlock";
|
|
37
36
|
export { default as CardContainer } from "./components/CardContainer";
|
|
38
37
|
export { default as CardContainerRating } from "./components/CardContainerRating";
|
package/src/index.tsx
CHANGED
|
@@ -5,7 +5,7 @@ export { default as DefaultTheme } from "./styles/DefaultTheme";
|
|
|
5
5
|
|
|
6
6
|
export { Link } from "./components/Text";
|
|
7
7
|
export { default as Banner } from "./components/Banner";
|
|
8
|
-
export { ButtonSolid, ButtonOutline } from "./components/Button";
|
|
8
|
+
export { Button, ButtonSolid, ButtonOutline } from "./components/Button";
|
|
9
9
|
export { default as Avatar } from "./components/CircleImage";
|
|
10
10
|
export { default as AvatarEdit } from "./components/AvatarEdit";
|
|
11
11
|
export { default as Card } from "./components/Card";
|
|
@@ -52,7 +52,6 @@ export {
|
|
|
52
52
|
} from "./components/RadioButton/index";
|
|
53
53
|
|
|
54
54
|
/* Deprecated: Fix or Delete! */
|
|
55
|
-
export { default as Button } from "./components/DeprecatedButton";
|
|
56
55
|
export { default as CardBlock } from "./components/CardBlock";
|
|
57
56
|
export { default as CardContainer } from "./components/CardContainer";
|
|
58
57
|
export { default as CardContainerRating } from "./components/CardContainerRating";
|