@draftbit/core 47.1.1-dbfde6.2 → 47.1.1-ee131b.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 +2 -2
- package/lib/commonjs/components/IconButton.js +4 -2
- package/lib/commonjs/components/Portal/PortalConsumer.js +22 -7
- package/lib/commonjs/components/Pressable.js +2 -2
- package/lib/commonjs/components/Touchable.js +2 -2
- package/lib/commonjs/mappings/Button.js +2 -2
- package/lib/commonjs/mappings/IconButton.js +4 -6
- package/lib/commonjs/mappings/MapView.js +3 -1
- package/lib/commonjs/mappings/Touchable.js +9 -2
- package/lib/module/components/Button.js +2 -2
- package/lib/module/components/IconButton.js +4 -2
- package/lib/module/components/Pressable.js +2 -2
- package/lib/module/components/Touchable.js +2 -2
- package/lib/module/mappings/Button.js +2 -2
- package/lib/module/mappings/IconButton.js +5 -7
- package/lib/module/mappings/MapView.js +3 -1
- package/lib/module/mappings/Touchable.js +10 -3
- package/lib/typescript/src/components/IconButton.d.ts +2 -0
- package/lib/typescript/src/components/IconButton.d.ts.map +1 -1
- package/lib/typescript/src/components/Pressable.d.ts.map +1 -1
- package/lib/typescript/src/components/Touchable.d.ts.map +1 -1
- package/lib/typescript/src/mappings/IconButton.d.ts +20 -10
- package/lib/typescript/src/mappings/IconButton.d.ts.map +1 -1
- package/lib/typescript/src/mappings/MapView.d.ts +2 -0
- package/lib/typescript/src/mappings/MapView.d.ts.map +1 -1
- package/lib/typescript/src/mappings/Touchable.d.ts +20 -0
- package/lib/typescript/src/mappings/Touchable.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/components/Button.js +1 -1
- package/src/components/Button.tsx +2 -2
- package/src/components/IconButton.js +2 -2
- package/src/components/IconButton.tsx +6 -2
- package/src/components/Pressable.js +1 -1
- package/src/components/Pressable.tsx +2 -2
- package/src/components/Touchable.js +1 -1
- package/src/components/Touchable.tsx +2 -2
- package/src/mappings/Button.js +2 -2
- package/src/mappings/Button.ts +2 -2
- package/src/mappings/IconButton.js +5 -7
- package/src/mappings/IconButton.ts +5 -7
- package/src/mappings/MapView.js +2 -0
- package/src/mappings/MapView.ts +2 -0
- package/src/mappings/Touchable.js +10 -3
- package/src/mappings/Touchable.ts +12 -2
- package/lib/commonjs/mappings/Shadow.js +0 -46
- package/lib/module/mappings/Shadow.js +0 -39
- package/lib/typescript/src/mappings/Shadow.d.ts +0 -73
- package/lib/typescript/src/mappings/Shadow.d.ts.map +0 -1
- package/src/mappings/Shadow.js +0 -39
- package/src/mappings/Shadow.ts +0 -47
|
@@ -16,11 +16,13 @@ const IconButton = _ref => {
|
|
|
16
16
|
icon,
|
|
17
17
|
color: customColor,
|
|
18
18
|
size = 32,
|
|
19
|
-
disabled
|
|
19
|
+
disabled,
|
|
20
20
|
loading = false,
|
|
21
21
|
onPress,
|
|
22
22
|
theme,
|
|
23
23
|
style,
|
|
24
|
+
activeOpacity = 0.8,
|
|
25
|
+
disabledOpacity = 0.8,
|
|
24
26
|
...props
|
|
25
27
|
} = _ref;
|
|
26
28
|
const iconColor = customColor || theme.colors.primary;
|
|
@@ -32,7 +34,7 @@ const IconButton = _ref => {
|
|
|
32
34
|
pressed
|
|
33
35
|
} = _ref2;
|
|
34
36
|
return [styles.container, {
|
|
35
|
-
opacity: pressed
|
|
37
|
+
opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1,
|
|
36
38
|
width: size,
|
|
37
39
|
height: size,
|
|
38
40
|
alignItems: "center",
|
|
@@ -7,16 +7,31 @@ exports.default = void 0;
|
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
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); }
|
|
9
9
|
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; }
|
|
10
|
-
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; }
|
|
11
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
12
|
-
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
10
|
class PortalConsumer extends React.Component {
|
|
14
|
-
constructor() {
|
|
15
|
-
super(...arguments);
|
|
16
|
-
_defineProperty(this, "key", void 0);
|
|
17
|
-
}
|
|
18
11
|
async componentDidMount() {
|
|
19
12
|
this.checkManager();
|
|
13
|
+
// Delay updating to prevent React from going to infinite loop
|
|
14
|
+
await Promise.resolve();
|
|
15
|
+
this.key = this.props.manager.mount(this.props.children);
|
|
16
|
+
}
|
|
17
|
+
componentDidUpdate() {
|
|
18
|
+
this.checkManager();
|
|
19
|
+
this.props.manager.update(this.key, this.props.children);
|
|
20
|
+
}
|
|
21
|
+
componentWillUnmount() {
|
|
22
|
+
this.checkManager();
|
|
23
|
+
this.props.manager.unmount(this.key);
|
|
24
|
+
}
|
|
25
|
+
checkManager() {
|
|
26
|
+
if (!this.props.manager) {
|
|
27
|
+
throw new Error("Looks like you forgot to wrap your root component with `Provider` component from `react-native-paper`.\n\n" + "Please read our getting-started guide and make sure you've followed all the required steps.\n\n" + "https://callstack.github.io/react-native-paper/getting-started.html");
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.default = PortalConsumer;s.checkManager();
|
|
20
35
|
|
|
21
36
|
// Delay updating to prevent React from going to infinite loop
|
|
22
37
|
await Promise.resolve();
|
|
@@ -23,7 +23,7 @@ const SEED_DATA_PROPS = {
|
|
|
23
23
|
activeOpacity: (0, _types.createStaticNumberProp)({
|
|
24
24
|
label: "Active Opacity",
|
|
25
25
|
description: "Opacity of the button when active.",
|
|
26
|
-
defaultValue:
|
|
26
|
+
defaultValue: null,
|
|
27
27
|
min: 0,
|
|
28
28
|
max: 1,
|
|
29
29
|
step: 0.01,
|
|
@@ -33,7 +33,7 @@ const SEED_DATA_PROPS = {
|
|
|
33
33
|
disabledOpacity: (0, _types.createStaticNumberProp)({
|
|
34
34
|
label: "Disabled Opacity",
|
|
35
35
|
description: "Opacity of the button when disabled.",
|
|
36
|
-
defaultValue:
|
|
36
|
+
defaultValue: null,
|
|
37
37
|
min: 0,
|
|
38
38
|
max: 1,
|
|
39
39
|
step: 0.01,
|
|
@@ -10,26 +10,24 @@ const SEED_DATA = {
|
|
|
10
10
|
tag: "IconButton",
|
|
11
11
|
category: _types.COMPONENT_TYPES.button,
|
|
12
12
|
layout: {},
|
|
13
|
-
triggers: [_types.Triggers.OnPress],
|
|
13
|
+
triggers: [_types.Triggers.OnPress, _types.Triggers.OnLongPress],
|
|
14
14
|
stylesPanelSections: [_types.StylesPanelSections.Margins, _types.StylesPanelSections.Effects, _types.StylesPanelSections.Position],
|
|
15
15
|
props: {
|
|
16
16
|
onPress: (0, _types.createActionProp)(),
|
|
17
|
+
onLongPress: (0, _types.createActionProp)(),
|
|
18
|
+
disabled: (0, _types.createDisabledProp)(),
|
|
17
19
|
icon: (0, _types.createIconProp)(),
|
|
18
20
|
color: (0, _types.createColorProp)({
|
|
19
21
|
label: "Color",
|
|
20
22
|
group: _types.GROUPS.basic
|
|
21
23
|
}),
|
|
22
|
-
disabled: (0, _types.createBoolProp)({
|
|
23
|
-
label: "Disabled",
|
|
24
|
-
group: _types.GROUPS.basic
|
|
25
|
-
}),
|
|
26
24
|
size: (0, _types.createNumberProp)({
|
|
27
25
|
group: _types.GROUPS.basic,
|
|
28
26
|
label: "Size",
|
|
29
27
|
description: "Width and height of your icon",
|
|
30
28
|
defaultValue: 32,
|
|
31
29
|
min: 16,
|
|
32
|
-
max:
|
|
30
|
+
max: 256,
|
|
33
31
|
step: 1,
|
|
34
32
|
precision: 0
|
|
35
33
|
})
|
|
@@ -12,10 +12,11 @@ const SEED_DATA_PROPS = {
|
|
|
12
12
|
props: {
|
|
13
13
|
onPress: (0, _types.createActionProp)(),
|
|
14
14
|
onLongPress: (0, _types.createActionProp)(),
|
|
15
|
+
disabled: (0, _types.createDisabledProp)(),
|
|
15
16
|
activeOpacity: (0, _types.createStaticNumberProp)({
|
|
16
17
|
label: "Active Opacity",
|
|
17
18
|
description: "The opacity when the button is pressed.",
|
|
18
|
-
defaultValue:
|
|
19
|
+
defaultValue: null,
|
|
19
20
|
min: 0,
|
|
20
21
|
max: 1,
|
|
21
22
|
step: 0.01,
|
|
@@ -25,7 +26,7 @@ const SEED_DATA_PROPS = {
|
|
|
25
26
|
disabledOpacity: (0, _types.createStaticNumberProp)({
|
|
26
27
|
label: "Disabled Opacity",
|
|
27
28
|
description: "The opacity when the button is disabled.",
|
|
28
|
-
defaultValue:
|
|
29
|
+
defaultValue: null,
|
|
29
30
|
min: 0,
|
|
30
31
|
max: 1,
|
|
31
32
|
step: 0.01,
|
|
@@ -41,6 +42,12 @@ const SEED_DATA_PROPS = {
|
|
|
41
42
|
label: "Hit Slop",
|
|
42
43
|
description: "Sets additional distance outside of element in which a press can be detected.",
|
|
43
44
|
required: false
|
|
45
|
+
}),
|
|
46
|
+
android_disableSound: (0, _types.createStaticBoolProp)({
|
|
47
|
+
label: "Disable Sound",
|
|
48
|
+
description: "Disable the Android sound effect.",
|
|
49
|
+
defaultValue: null,
|
|
50
|
+
group: _types.GROUPS.android
|
|
44
51
|
})
|
|
45
52
|
}
|
|
46
53
|
};
|
|
@@ -8,11 +8,13 @@ const IconButton = _ref => {
|
|
|
8
8
|
icon,
|
|
9
9
|
color: customColor,
|
|
10
10
|
size = 32,
|
|
11
|
-
disabled
|
|
11
|
+
disabled,
|
|
12
12
|
loading = false,
|
|
13
13
|
onPress,
|
|
14
14
|
theme,
|
|
15
15
|
style,
|
|
16
|
+
activeOpacity = 0.8,
|
|
17
|
+
disabledOpacity = 0.8,
|
|
16
18
|
...props
|
|
17
19
|
} = _ref;
|
|
18
20
|
const iconColor = customColor || theme.colors.primary;
|
|
@@ -24,7 +26,7 @@ const IconButton = _ref => {
|
|
|
24
26
|
pressed
|
|
25
27
|
} = _ref2;
|
|
26
28
|
return [styles.container, {
|
|
27
|
-
opacity: pressed
|
|
29
|
+
opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1,
|
|
28
30
|
width: size,
|
|
29
31
|
height: size,
|
|
30
32
|
alignItems: "center",
|
|
@@ -17,7 +17,7 @@ const SEED_DATA_PROPS = {
|
|
|
17
17
|
activeOpacity: createStaticNumberProp({
|
|
18
18
|
label: "Active Opacity",
|
|
19
19
|
description: "Opacity of the button when active.",
|
|
20
|
-
defaultValue:
|
|
20
|
+
defaultValue: null,
|
|
21
21
|
min: 0,
|
|
22
22
|
max: 1,
|
|
23
23
|
step: 0.01,
|
|
@@ -27,7 +27,7 @@ const SEED_DATA_PROPS = {
|
|
|
27
27
|
disabledOpacity: createStaticNumberProp({
|
|
28
28
|
label: "Disabled Opacity",
|
|
29
29
|
description: "Opacity of the button when disabled.",
|
|
30
|
-
defaultValue:
|
|
30
|
+
defaultValue: null,
|
|
31
31
|
min: 0,
|
|
32
32
|
max: 1,
|
|
33
33
|
step: 0.01,
|
|
@@ -1,29 +1,27 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, GROUPS, createIconProp, createColorProp, createNumberProp,
|
|
1
|
+
import { COMPONENT_TYPES, GROUPS, createIconProp, createColorProp, createNumberProp, createActionProp, Triggers, StylesPanelSections, createDisabledProp } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "Icon Button",
|
|
4
4
|
tag: "IconButton",
|
|
5
5
|
category: COMPONENT_TYPES.button,
|
|
6
6
|
layout: {},
|
|
7
|
-
triggers: [Triggers.OnPress],
|
|
7
|
+
triggers: [Triggers.OnPress, Triggers.OnLongPress],
|
|
8
8
|
stylesPanelSections: [StylesPanelSections.Margins, StylesPanelSections.Effects, StylesPanelSections.Position],
|
|
9
9
|
props: {
|
|
10
10
|
onPress: createActionProp(),
|
|
11
|
+
onLongPress: createActionProp(),
|
|
12
|
+
disabled: createDisabledProp(),
|
|
11
13
|
icon: createIconProp(),
|
|
12
14
|
color: createColorProp({
|
|
13
15
|
label: "Color",
|
|
14
16
|
group: GROUPS.basic
|
|
15
17
|
}),
|
|
16
|
-
disabled: createBoolProp({
|
|
17
|
-
label: "Disabled",
|
|
18
|
-
group: GROUPS.basic
|
|
19
|
-
}),
|
|
20
18
|
size: createNumberProp({
|
|
21
19
|
group: GROUPS.basic,
|
|
22
20
|
label: "Size",
|
|
23
21
|
description: "Width and height of your icon",
|
|
24
22
|
defaultValue: 32,
|
|
25
23
|
min: 16,
|
|
26
|
-
max:
|
|
24
|
+
max: 256,
|
|
27
25
|
step: 1,
|
|
28
26
|
precision: 0
|
|
29
27
|
})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createActionProp, Triggers, createStaticNumberProp, StylesPanelSections } from "@draftbit/types";
|
|
1
|
+
import { COMPONENT_TYPES, createActionProp, Triggers, createStaticNumberProp, StylesPanelSections, createDisabledProp, GROUPS, createStaticBoolProp } from "@draftbit/types";
|
|
2
2
|
const SEED_DATA_PROPS = {
|
|
3
3
|
stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins, StylesPanelSections.Borders],
|
|
4
4
|
layout: {},
|
|
@@ -6,10 +6,11 @@ const SEED_DATA_PROPS = {
|
|
|
6
6
|
props: {
|
|
7
7
|
onPress: createActionProp(),
|
|
8
8
|
onLongPress: createActionProp(),
|
|
9
|
+
disabled: createDisabledProp(),
|
|
9
10
|
activeOpacity: createStaticNumberProp({
|
|
10
11
|
label: "Active Opacity",
|
|
11
12
|
description: "The opacity when the button is pressed.",
|
|
12
|
-
defaultValue:
|
|
13
|
+
defaultValue: null,
|
|
13
14
|
min: 0,
|
|
14
15
|
max: 1,
|
|
15
16
|
step: 0.01,
|
|
@@ -19,7 +20,7 @@ const SEED_DATA_PROPS = {
|
|
|
19
20
|
disabledOpacity: createStaticNumberProp({
|
|
20
21
|
label: "Disabled Opacity",
|
|
21
22
|
description: "The opacity when the button is disabled.",
|
|
22
|
-
defaultValue:
|
|
23
|
+
defaultValue: null,
|
|
23
24
|
min: 0,
|
|
24
25
|
max: 1,
|
|
25
26
|
step: 0.01,
|
|
@@ -35,6 +36,12 @@ const SEED_DATA_PROPS = {
|
|
|
35
36
|
label: "Hit Slop",
|
|
36
37
|
description: "Sets additional distance outside of element in which a press can be detected.",
|
|
37
38
|
required: false
|
|
39
|
+
}),
|
|
40
|
+
android_disableSound: createStaticBoolProp({
|
|
41
|
+
label: "Disable Sound",
|
|
42
|
+
description: "Disable the Android sound effect.",
|
|
43
|
+
defaultValue: null,
|
|
44
|
+
group: GROUPS.android
|
|
38
45
|
})
|
|
39
46
|
}
|
|
40
47
|
};
|
|
@@ -11,6 +11,8 @@ declare type Props = {
|
|
|
11
11
|
onPress: () => void;
|
|
12
12
|
theme: Theme;
|
|
13
13
|
style?: StyleProp<ViewStyle>;
|
|
14
|
+
activeOpacity?: number;
|
|
15
|
+
disabledOpacity?: number;
|
|
14
16
|
} & PressableProps & IconSlot;
|
|
15
17
|
declare const _default: React.ComponentType<import("@draftbit/react-theme-provider").$Without<React.PropsWithChildren<Props>, "theme"> & {
|
|
16
18
|
theme?: import("@draftbit/react-theme-provider").$DeepPartial<any> | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAIL,SAAS,EACT,SAAS,EAET,cAAc,EAEf,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD,aAAK,KAAK,GAAG;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAIL,SAAS,EACT,SAAS,EAET,cAAc,EAEf,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD,aAAK,KAAK,GAAG;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GAAG,cAAc,GAChB,QAAQ,CAAC;;;;AA4DX,wBAAqC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pressable.d.ts","sourceRoot":"","sources":["../../../../src/components/Pressable.tsx"],"names":[],"mappings":";AACA,OAAO,EAEL,cAAc,EACd,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB,aAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GAAG,cAAc,CAAC;AAEnB,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,
|
|
1
|
+
{"version":3,"file":"Pressable.d.ts","sourceRoot":"","sources":["../../../../src/components/Pressable.tsx"],"names":[],"mappings":";AACA,OAAO,EAEL,cAAc,EACd,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB,aAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GAAG,cAAc,CAAC;AAEnB,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,aAAmB,EACnB,eAAqB,EACrB,cAAc,EACd,OAAO,EACP,KAAK,EACL,GAAG,KAAK,EACT,EAAE,KAAK,eAoBP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Touchable.d.ts","sourceRoot":"","sources":["../../../../src/components/Touchable.tsx"],"names":[],"mappings":";AACA,OAAO,EAAa,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpE,aAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GAAG,cAAc,CAAC;AAEnB,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,
|
|
1
|
+
{"version":3,"file":"Touchable.d.ts","sourceRoot":"","sources":["../../../../src/components/Touchable.tsx"],"names":[],"mappings":";AACA,OAAO,EAAa,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpE,aAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GAAG,cAAc,CAAC;AAEnB,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,aAAmB,EACnB,eAAqB,EACrB,cAAc,EACd,OAAO,EACP,KAAK,EACL,GAAG,KAAK,EACT,EAAE,KAAK,eAoBP"}
|
|
@@ -16,35 +16,45 @@ export declare const SEED_DATA: {
|
|
|
16
16
|
defaultValue: null;
|
|
17
17
|
group: string;
|
|
18
18
|
};
|
|
19
|
-
|
|
19
|
+
onLongPress: {
|
|
20
20
|
label: string;
|
|
21
21
|
description: string;
|
|
22
|
+
editable: boolean;
|
|
23
|
+
required: boolean;
|
|
22
24
|
formType: string;
|
|
23
25
|
propType: string;
|
|
24
|
-
defaultValue:
|
|
25
|
-
required: boolean;
|
|
26
|
-
editable: boolean;
|
|
26
|
+
defaultValue: null;
|
|
27
27
|
group: string;
|
|
28
28
|
};
|
|
29
|
-
|
|
30
|
-
group: string;
|
|
29
|
+
disabled: {
|
|
31
30
|
label: string;
|
|
32
31
|
description: string;
|
|
32
|
+
group: string;
|
|
33
33
|
editable: boolean;
|
|
34
34
|
required: boolean;
|
|
35
|
-
defaultValue: null;
|
|
36
35
|
formType: string;
|
|
37
36
|
propType: string;
|
|
37
|
+
defaultValue: null;
|
|
38
38
|
};
|
|
39
|
-
|
|
39
|
+
icon: {
|
|
40
40
|
label: string;
|
|
41
41
|
description: string;
|
|
42
42
|
formType: string;
|
|
43
43
|
propType: string;
|
|
44
|
-
defaultValue:
|
|
45
|
-
editable: boolean;
|
|
44
|
+
defaultValue: string;
|
|
46
45
|
required: boolean;
|
|
46
|
+
editable: boolean;
|
|
47
|
+
group: string;
|
|
48
|
+
};
|
|
49
|
+
color: {
|
|
47
50
|
group: string;
|
|
51
|
+
label: string;
|
|
52
|
+
description: string;
|
|
53
|
+
editable: boolean;
|
|
54
|
+
required: boolean;
|
|
55
|
+
defaultValue: null;
|
|
56
|
+
formType: string;
|
|
57
|
+
propType: string;
|
|
48
58
|
};
|
|
49
59
|
size: {
|
|
50
60
|
label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/mappings/IconButton.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/mappings/IconButton.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapView.d.ts","sourceRoot":"","sources":["../../../../src/mappings/MapView.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"MapView.d.ts","sourceRoot":"","sources":["../../../../src/mappings/MapView.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6IrB,CAAC"}
|
|
@@ -23,6 +23,16 @@ export declare const SEED_DATA: {
|
|
|
23
23
|
defaultValue: null;
|
|
24
24
|
group: string;
|
|
25
25
|
};
|
|
26
|
+
disabled: {
|
|
27
|
+
label: string;
|
|
28
|
+
description: string;
|
|
29
|
+
group: string;
|
|
30
|
+
editable: boolean;
|
|
31
|
+
required: boolean;
|
|
32
|
+
formType: string;
|
|
33
|
+
propType: string;
|
|
34
|
+
defaultValue: null;
|
|
35
|
+
};
|
|
26
36
|
activeOpacity: {
|
|
27
37
|
label: string;
|
|
28
38
|
description: string;
|
|
@@ -67,6 +77,16 @@ export declare const SEED_DATA: {
|
|
|
67
77
|
required: boolean;
|
|
68
78
|
step: number;
|
|
69
79
|
};
|
|
80
|
+
android_disableSound: {
|
|
81
|
+
label: string;
|
|
82
|
+
description: string;
|
|
83
|
+
formType: string;
|
|
84
|
+
propType: string;
|
|
85
|
+
defaultValue: boolean;
|
|
86
|
+
editable: boolean;
|
|
87
|
+
required: boolean;
|
|
88
|
+
group: string;
|
|
89
|
+
};
|
|
70
90
|
};
|
|
71
91
|
name: string;
|
|
72
92
|
tag: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Touchable.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Touchable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Touchable.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Touchable.ts"],"names":[],"mappings":"AAgEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAerB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "47.1.1-
|
|
3
|
+
"version": "47.1.1-ee131b.2+ee131ba",
|
|
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": "^47.1.1-
|
|
44
|
+
"@draftbit/types": "^47.1.1-ee131b.2+ee131ba",
|
|
45
45
|
"@material-ui/core": "^4.11.0",
|
|
46
46
|
"@material-ui/pickers": "^3.2.10",
|
|
47
47
|
"@react-native-community/slider": "4.2.4",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
]
|
|
92
92
|
]
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "ee131ba21962c50c2de0844e3685dae57ed6880a"
|
|
95
95
|
}
|
package/src/components/Button.js
CHANGED
|
@@ -7,7 +7,7 @@ const CONSTANTS = {
|
|
|
7
7
|
padding: 8,
|
|
8
8
|
icon: 24,
|
|
9
9
|
};
|
|
10
|
-
function Base({ Icon, icon, title, loading, disabled, style, activeOpacity, disabledOpacity, ...props }) {
|
|
10
|
+
function Base({ Icon, icon, title, loading, disabled, style, activeOpacity = 0.8, disabledOpacity = 0.8, ...props }) {
|
|
11
11
|
const { color, fontFamily, fontWeight, fontSize, lineHeight, letterSpacing, textTransform, textAlign, textDecorationLine, textDecorationColor, textDecorationStyle, ...buttonStyles } = StyleSheet.flatten(style || {});
|
|
12
12
|
const titleStyles = {
|
|
13
13
|
color,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { View, StyleSheet, ActivityIndicator, Pressable, Platform, } from "react-native";
|
|
3
3
|
import { withTheme } from "../theming";
|
|
4
|
-
const IconButton = ({ Icon, icon, color: customColor, size = 32, disabled
|
|
4
|
+
const IconButton = ({ Icon, icon, color: customColor, size = 32, disabled, loading = false, onPress, theme, style, activeOpacity = 0.8, disabledOpacity = 0.8, ...props }) => {
|
|
5
5
|
const iconColor = customColor || theme.colors.primary;
|
|
6
6
|
return (React.createElement(Pressable, { onPress: onPress, disabled: disabled || loading, style: ({ pressed }) => {
|
|
7
7
|
return [
|
|
8
8
|
styles.container,
|
|
9
9
|
{
|
|
10
|
-
opacity: pressed
|
|
10
|
+
opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1,
|
|
11
11
|
width: size,
|
|
12
12
|
height: size,
|
|
13
13
|
alignItems: "center",
|
|
@@ -22,6 +22,8 @@ type Props = {
|
|
|
22
22
|
onPress: () => void;
|
|
23
23
|
theme: Theme;
|
|
24
24
|
style?: StyleProp<ViewStyle>;
|
|
25
|
+
activeOpacity?: number;
|
|
26
|
+
disabledOpacity?: number;
|
|
25
27
|
} & PressableProps &
|
|
26
28
|
IconSlot;
|
|
27
29
|
|
|
@@ -30,11 +32,13 @@ const IconButton: React.FC<React.PropsWithChildren<Props>> = ({
|
|
|
30
32
|
icon,
|
|
31
33
|
color: customColor,
|
|
32
34
|
size = 32,
|
|
33
|
-
disabled
|
|
35
|
+
disabled,
|
|
34
36
|
loading = false,
|
|
35
37
|
onPress,
|
|
36
38
|
theme,
|
|
37
39
|
style,
|
|
40
|
+
activeOpacity = 0.8,
|
|
41
|
+
disabledOpacity = 0.8,
|
|
38
42
|
...props
|
|
39
43
|
}) => {
|
|
40
44
|
const iconColor = customColor || theme.colors.primary;
|
|
@@ -47,7 +51,7 @@ const IconButton: React.FC<React.PropsWithChildren<Props>> = ({
|
|
|
47
51
|
return [
|
|
48
52
|
styles.container,
|
|
49
53
|
{
|
|
50
|
-
opacity: pressed
|
|
54
|
+
opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1,
|
|
51
55
|
width: size,
|
|
52
56
|
height: size,
|
|
53
57
|
alignItems: "center",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Pressable as NativePressable, } from "react-native";
|
|
3
|
-
export default function Pressable({ children, disabled, onPress, activeOpacity, disabledOpacity, delayLongPress, hitSlop, style, ...props }) {
|
|
3
|
+
export default function Pressable({ children, disabled, onPress, activeOpacity = 0.8, disabledOpacity = 0.8, delayLongPress, hitSlop, style, ...props }) {
|
|
4
4
|
return (React.createElement(NativePressable, { onPress: onPress, disabled: disabled, delayLongPress: delayLongPress ? delayLongPress : 500, hitSlop: hitSlop ? hitSlop : 8, style: ({ pressed }) => {
|
|
5
5
|
return [
|
|
6
6
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Pressable } from "react-native";
|
|
3
|
-
export default function Touchable({ children, disabled, onPress, activeOpacity, disabledOpacity, delayLongPress, hitSlop, style, ...props }) {
|
|
3
|
+
export default function Touchable({ children, disabled, onPress, activeOpacity = 0.8, disabledOpacity = 0.8, delayLongPress, hitSlop, style, ...props }) {
|
|
4
4
|
return (React.createElement(Pressable, { disabled: disabled, onPress: onPress, delayLongPress: delayLongPress ? delayLongPress : 500, hitSlop: hitSlop ? hitSlop : 8, style: ({ pressed }) => {
|
|
5
5
|
return [
|
|
6
6
|
{
|
package/src/mappings/Button.js
CHANGED
|
@@ -17,7 +17,7 @@ const SEED_DATA_PROPS = {
|
|
|
17
17
|
activeOpacity: createStaticNumberProp({
|
|
18
18
|
label: "Active Opacity",
|
|
19
19
|
description: "Opacity of the button when active.",
|
|
20
|
-
defaultValue:
|
|
20
|
+
defaultValue: null,
|
|
21
21
|
min: 0,
|
|
22
22
|
max: 1,
|
|
23
23
|
step: 0.01,
|
|
@@ -27,7 +27,7 @@ const SEED_DATA_PROPS = {
|
|
|
27
27
|
disabledOpacity: createStaticNumberProp({
|
|
28
28
|
label: "Disabled Opacity",
|
|
29
29
|
description: "Opacity of the button when disabled.",
|
|
30
|
-
defaultValue:
|
|
30
|
+
defaultValue: null,
|
|
31
31
|
min: 0,
|
|
32
32
|
max: 1,
|
|
33
33
|
step: 0.01,
|
package/src/mappings/Button.ts
CHANGED
|
@@ -28,7 +28,7 @@ const SEED_DATA_PROPS = {
|
|
|
28
28
|
activeOpacity: createStaticNumberProp({
|
|
29
29
|
label: "Active Opacity",
|
|
30
30
|
description: "Opacity of the button when active.",
|
|
31
|
-
defaultValue:
|
|
31
|
+
defaultValue: null,
|
|
32
32
|
min: 0,
|
|
33
33
|
max: 1,
|
|
34
34
|
step: 0.01,
|
|
@@ -38,7 +38,7 @@ const SEED_DATA_PROPS = {
|
|
|
38
38
|
disabledOpacity: createStaticNumberProp({
|
|
39
39
|
label: "Disabled Opacity",
|
|
40
40
|
description: "Opacity of the button when disabled.",
|
|
41
|
-
defaultValue:
|
|
41
|
+
defaultValue: null,
|
|
42
42
|
min: 0,
|
|
43
43
|
max: 1,
|
|
44
44
|
step: 0.01,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, GROUPS, createIconProp, createColorProp, createNumberProp,
|
|
1
|
+
import { COMPONENT_TYPES, GROUPS, createIconProp, createColorProp, createNumberProp, createActionProp, Triggers, StylesPanelSections, createDisabledProp, } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "Icon Button",
|
|
4
4
|
tag: "IconButton",
|
|
5
5
|
category: COMPONENT_TYPES.button,
|
|
6
6
|
layout: {},
|
|
7
|
-
triggers: [Triggers.OnPress],
|
|
7
|
+
triggers: [Triggers.OnPress, Triggers.OnLongPress],
|
|
8
8
|
stylesPanelSections: [
|
|
9
9
|
StylesPanelSections.Margins,
|
|
10
10
|
StylesPanelSections.Effects,
|
|
@@ -12,22 +12,20 @@ export const SEED_DATA = {
|
|
|
12
12
|
],
|
|
13
13
|
props: {
|
|
14
14
|
onPress: createActionProp(),
|
|
15
|
+
onLongPress: createActionProp(),
|
|
16
|
+
disabled: createDisabledProp(),
|
|
15
17
|
icon: createIconProp(),
|
|
16
18
|
color: createColorProp({
|
|
17
19
|
label: "Color",
|
|
18
20
|
group: GROUPS.basic,
|
|
19
21
|
}),
|
|
20
|
-
disabled: createBoolProp({
|
|
21
|
-
label: "Disabled",
|
|
22
|
-
group: GROUPS.basic,
|
|
23
|
-
}),
|
|
24
22
|
size: createNumberProp({
|
|
25
23
|
group: GROUPS.basic,
|
|
26
24
|
label: "Size",
|
|
27
25
|
description: "Width and height of your icon",
|
|
28
26
|
defaultValue: 32,
|
|
29
27
|
min: 16,
|
|
30
|
-
max:
|
|
28
|
+
max: 256,
|
|
31
29
|
step: 1,
|
|
32
30
|
precision: 0,
|
|
33
31
|
}),
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
createIconProp,
|
|
5
5
|
createColorProp,
|
|
6
6
|
createNumberProp,
|
|
7
|
-
createBoolProp,
|
|
8
7
|
createActionProp,
|
|
9
8
|
Triggers,
|
|
10
9
|
StylesPanelSections,
|
|
10
|
+
createDisabledProp,
|
|
11
11
|
} from "@draftbit/types";
|
|
12
12
|
|
|
13
13
|
export const SEED_DATA = {
|
|
@@ -15,7 +15,7 @@ export const SEED_DATA = {
|
|
|
15
15
|
tag: "IconButton",
|
|
16
16
|
category: COMPONENT_TYPES.button,
|
|
17
17
|
layout: {},
|
|
18
|
-
triggers: [Triggers.OnPress],
|
|
18
|
+
triggers: [Triggers.OnPress, Triggers.OnLongPress],
|
|
19
19
|
stylesPanelSections: [
|
|
20
20
|
StylesPanelSections.Margins,
|
|
21
21
|
StylesPanelSections.Effects,
|
|
@@ -23,22 +23,20 @@ export const SEED_DATA = {
|
|
|
23
23
|
],
|
|
24
24
|
props: {
|
|
25
25
|
onPress: createActionProp(),
|
|
26
|
+
onLongPress: createActionProp(),
|
|
27
|
+
disabled: createDisabledProp(),
|
|
26
28
|
icon: createIconProp(),
|
|
27
29
|
color: createColorProp({
|
|
28
30
|
label: "Color",
|
|
29
31
|
group: GROUPS.basic,
|
|
30
32
|
}),
|
|
31
|
-
disabled: createBoolProp({
|
|
32
|
-
label: "Disabled",
|
|
33
|
-
group: GROUPS.basic,
|
|
34
|
-
}),
|
|
35
33
|
size: createNumberProp({
|
|
36
34
|
group: GROUPS.basic,
|
|
37
35
|
label: "Size",
|
|
38
36
|
description: "Width and height of your icon",
|
|
39
37
|
defaultValue: 32,
|
|
40
38
|
min: 16,
|
|
41
|
-
max:
|
|
39
|
+
max: 256,
|
|
42
40
|
step: 1,
|
|
43
41
|
precision: 0,
|
|
44
42
|
}),
|
package/src/mappings/MapView.js
CHANGED
package/src/mappings/MapView.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createActionProp, Triggers, createStaticNumberProp, StylesPanelSections, } from "@draftbit/types";
|
|
1
|
+
import { COMPONENT_TYPES, createActionProp, Triggers, createStaticNumberProp, StylesPanelSections, createDisabledProp, GROUPS, createStaticBoolProp, } from "@draftbit/types";
|
|
2
2
|
const SEED_DATA_PROPS = {
|
|
3
3
|
stylesPanelSections: [
|
|
4
4
|
StylesPanelSections.Size,
|
|
@@ -10,10 +10,11 @@ const SEED_DATA_PROPS = {
|
|
|
10
10
|
props: {
|
|
11
11
|
onPress: createActionProp(),
|
|
12
12
|
onLongPress: createActionProp(),
|
|
13
|
+
disabled: createDisabledProp(),
|
|
13
14
|
activeOpacity: createStaticNumberProp({
|
|
14
15
|
label: "Active Opacity",
|
|
15
16
|
description: "The opacity when the button is pressed.",
|
|
16
|
-
defaultValue:
|
|
17
|
+
defaultValue: null,
|
|
17
18
|
min: 0,
|
|
18
19
|
max: 1,
|
|
19
20
|
step: 0.01,
|
|
@@ -23,7 +24,7 @@ const SEED_DATA_PROPS = {
|
|
|
23
24
|
disabledOpacity: createStaticNumberProp({
|
|
24
25
|
label: "Disabled Opacity",
|
|
25
26
|
description: "The opacity when the button is disabled.",
|
|
26
|
-
defaultValue:
|
|
27
|
+
defaultValue: null,
|
|
27
28
|
min: 0,
|
|
28
29
|
max: 1,
|
|
29
30
|
step: 0.01,
|
|
@@ -40,6 +41,12 @@ const SEED_DATA_PROPS = {
|
|
|
40
41
|
description: "Sets additional distance outside of element in which a press can be detected.",
|
|
41
42
|
required: false,
|
|
42
43
|
}),
|
|
44
|
+
android_disableSound: createStaticBoolProp({
|
|
45
|
+
label: "Disable Sound",
|
|
46
|
+
description: "Disable the Android sound effect.",
|
|
47
|
+
defaultValue: null,
|
|
48
|
+
group: GROUPS.android,
|
|
49
|
+
}),
|
|
43
50
|
},
|
|
44
51
|
};
|
|
45
52
|
export const SEED_DATA = [
|
|
@@ -4,6 +4,9 @@ import {
|
|
|
4
4
|
Triggers,
|
|
5
5
|
createStaticNumberProp,
|
|
6
6
|
StylesPanelSections,
|
|
7
|
+
createDisabledProp,
|
|
8
|
+
GROUPS,
|
|
9
|
+
createStaticBoolProp,
|
|
7
10
|
} from "@draftbit/types";
|
|
8
11
|
|
|
9
12
|
const SEED_DATA_PROPS = {
|
|
@@ -17,10 +20,11 @@ const SEED_DATA_PROPS = {
|
|
|
17
20
|
props: {
|
|
18
21
|
onPress: createActionProp(),
|
|
19
22
|
onLongPress: createActionProp(),
|
|
23
|
+
disabled: createDisabledProp(),
|
|
20
24
|
activeOpacity: createStaticNumberProp({
|
|
21
25
|
label: "Active Opacity",
|
|
22
26
|
description: "The opacity when the button is pressed.",
|
|
23
|
-
defaultValue:
|
|
27
|
+
defaultValue: null,
|
|
24
28
|
min: 0,
|
|
25
29
|
max: 1,
|
|
26
30
|
step: 0.01,
|
|
@@ -30,7 +34,7 @@ const SEED_DATA_PROPS = {
|
|
|
30
34
|
disabledOpacity: createStaticNumberProp({
|
|
31
35
|
label: "Disabled Opacity",
|
|
32
36
|
description: "The opacity when the button is disabled.",
|
|
33
|
-
defaultValue:
|
|
37
|
+
defaultValue: null,
|
|
34
38
|
min: 0,
|
|
35
39
|
max: 1,
|
|
36
40
|
step: 0.01,
|
|
@@ -49,6 +53,12 @@ const SEED_DATA_PROPS = {
|
|
|
49
53
|
"Sets additional distance outside of element in which a press can be detected.",
|
|
50
54
|
required: false,
|
|
51
55
|
}),
|
|
56
|
+
android_disableSound: createStaticBoolProp({
|
|
57
|
+
label: "Disable Sound",
|
|
58
|
+
description: "Disable the Android sound effect.",
|
|
59
|
+
defaultValue: null,
|
|
60
|
+
group: GROUPS.android,
|
|
61
|
+
}),
|
|
52
62
|
},
|
|
53
63
|
};
|
|
54
64
|
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.SEED_DATA = void 0;
|
|
7
|
-
var _types = require("@draftbit/types");
|
|
8
|
-
const SEED_DATA = {
|
|
9
|
-
name: "Shadow",
|
|
10
|
-
tag: "Shadow View",
|
|
11
|
-
description: "A cross-platform, universal shadow.",
|
|
12
|
-
library: "react-native-shadow-2",
|
|
13
|
-
category: _types.COMPONENT_TYPES.view,
|
|
14
|
-
stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
15
|
-
layout: {},
|
|
16
|
-
props: {
|
|
17
|
-
disabled: (0, _types.createDisabledProp)({
|
|
18
|
-
description: "Disabled the shadow."
|
|
19
|
-
}),
|
|
20
|
-
startColor: (0, _types.createColorProp)({
|
|
21
|
-
label: "Start Color",
|
|
22
|
-
description: "The initial gradient color of the shadow.",
|
|
23
|
-
defaultValue: null
|
|
24
|
-
}),
|
|
25
|
-
endColor: (0, _types.createColorProp)({
|
|
26
|
-
label: "End Color",
|
|
27
|
-
description: "The final gradient color of the shadow.",
|
|
28
|
-
defaultValue: null
|
|
29
|
-
}),
|
|
30
|
-
distance: (0, _types.createStaticNumberProp)({
|
|
31
|
-
label: "Distance",
|
|
32
|
-
description: "The distance of the shadow."
|
|
33
|
-
}),
|
|
34
|
-
paintInside: (0, _types.createStaticBoolProp)({
|
|
35
|
-
label: "Paint Inside",
|
|
36
|
-
description: "Apply the shadow below/inside the content.",
|
|
37
|
-
defaultValue: null
|
|
38
|
-
}),
|
|
39
|
-
stretch: (0, _types.createStaticBoolProp)({
|
|
40
|
-
label: "Stretch",
|
|
41
|
-
description: "Force children to occupy all available horizontal space.",
|
|
42
|
-
defaultValue: null
|
|
43
|
-
})
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
exports.SEED_DATA = SEED_DATA;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, CONTAINER_COMPONENT_STYLES_SECTIONS, createColorProp, createStaticNumberProp, createStaticBoolProp, createDisabledProp } from "@draftbit/types";
|
|
2
|
-
export const SEED_DATA = {
|
|
3
|
-
name: "Shadow",
|
|
4
|
-
tag: "Shadow View",
|
|
5
|
-
description: "A cross-platform, universal shadow.",
|
|
6
|
-
library: "react-native-shadow-2",
|
|
7
|
-
category: COMPONENT_TYPES.view,
|
|
8
|
-
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
9
|
-
layout: {},
|
|
10
|
-
props: {
|
|
11
|
-
disabled: createDisabledProp({
|
|
12
|
-
description: "Disabled the shadow."
|
|
13
|
-
}),
|
|
14
|
-
startColor: createColorProp({
|
|
15
|
-
label: "Start Color",
|
|
16
|
-
description: "The initial gradient color of the shadow.",
|
|
17
|
-
defaultValue: null
|
|
18
|
-
}),
|
|
19
|
-
endColor: createColorProp({
|
|
20
|
-
label: "End Color",
|
|
21
|
-
description: "The final gradient color of the shadow.",
|
|
22
|
-
defaultValue: null
|
|
23
|
-
}),
|
|
24
|
-
distance: createStaticNumberProp({
|
|
25
|
-
label: "Distance",
|
|
26
|
-
description: "The distance of the shadow."
|
|
27
|
-
}),
|
|
28
|
-
paintInside: createStaticBoolProp({
|
|
29
|
-
label: "Paint Inside",
|
|
30
|
-
description: "Apply the shadow below/inside the content.",
|
|
31
|
-
defaultValue: null
|
|
32
|
-
}),
|
|
33
|
-
stretch: createStaticBoolProp({
|
|
34
|
-
label: "Stretch",
|
|
35
|
-
description: "Force children to occupy all available horizontal space.",
|
|
36
|
-
defaultValue: null
|
|
37
|
-
})
|
|
38
|
-
}
|
|
39
|
-
};
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
export declare const SEED_DATA: {
|
|
2
|
-
name: string;
|
|
3
|
-
tag: string;
|
|
4
|
-
description: string;
|
|
5
|
-
library: string;
|
|
6
|
-
category: string;
|
|
7
|
-
stylesPanelSections: string[];
|
|
8
|
-
layout: {};
|
|
9
|
-
props: {
|
|
10
|
-
disabled: {
|
|
11
|
-
label: string;
|
|
12
|
-
description: string;
|
|
13
|
-
group: string;
|
|
14
|
-
editable: boolean;
|
|
15
|
-
required: boolean;
|
|
16
|
-
formType: string;
|
|
17
|
-
propType: string;
|
|
18
|
-
defaultValue: null;
|
|
19
|
-
};
|
|
20
|
-
startColor: {
|
|
21
|
-
group: string;
|
|
22
|
-
label: string;
|
|
23
|
-
description: string;
|
|
24
|
-
editable: boolean;
|
|
25
|
-
required: boolean;
|
|
26
|
-
defaultValue: null;
|
|
27
|
-
formType: string;
|
|
28
|
-
propType: string;
|
|
29
|
-
};
|
|
30
|
-
endColor: {
|
|
31
|
-
group: string;
|
|
32
|
-
label: string;
|
|
33
|
-
description: string;
|
|
34
|
-
editable: boolean;
|
|
35
|
-
required: boolean;
|
|
36
|
-
defaultValue: null;
|
|
37
|
-
formType: string;
|
|
38
|
-
propType: string;
|
|
39
|
-
};
|
|
40
|
-
distance: {
|
|
41
|
-
label: string;
|
|
42
|
-
description: string;
|
|
43
|
-
formType: string;
|
|
44
|
-
propType: string;
|
|
45
|
-
group: string;
|
|
46
|
-
defaultValue: null;
|
|
47
|
-
editable: boolean;
|
|
48
|
-
required: boolean;
|
|
49
|
-
step: number;
|
|
50
|
-
};
|
|
51
|
-
paintInside: {
|
|
52
|
-
label: string;
|
|
53
|
-
description: string;
|
|
54
|
-
formType: string;
|
|
55
|
-
propType: string;
|
|
56
|
-
defaultValue: boolean;
|
|
57
|
-
editable: boolean;
|
|
58
|
-
required: boolean;
|
|
59
|
-
group: string;
|
|
60
|
-
};
|
|
61
|
-
stretch: {
|
|
62
|
-
label: string;
|
|
63
|
-
description: string;
|
|
64
|
-
formType: string;
|
|
65
|
-
propType: string;
|
|
66
|
-
defaultValue: boolean;
|
|
67
|
-
editable: boolean;
|
|
68
|
-
required: boolean;
|
|
69
|
-
group: string;
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
//# sourceMappingURL=Shadow.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Shadow.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Shadow.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCrB,CAAC"}
|
package/src/mappings/Shadow.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, CONTAINER_COMPONENT_STYLES_SECTIONS, createColorProp, createStaticNumberProp, createStaticBoolProp, createDisabledProp, } from "@draftbit/types";
|
|
2
|
-
export const SEED_DATA = {
|
|
3
|
-
name: "Shadow",
|
|
4
|
-
tag: "Shadow View",
|
|
5
|
-
description: "A cross-platform, universal shadow.",
|
|
6
|
-
library: "react-native-shadow-2",
|
|
7
|
-
category: COMPONENT_TYPES.view,
|
|
8
|
-
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
9
|
-
layout: {},
|
|
10
|
-
props: {
|
|
11
|
-
disabled: createDisabledProp({
|
|
12
|
-
description: "Disabled the shadow.",
|
|
13
|
-
}),
|
|
14
|
-
startColor: createColorProp({
|
|
15
|
-
label: "Start Color",
|
|
16
|
-
description: "The initial gradient color of the shadow.",
|
|
17
|
-
defaultValue: null,
|
|
18
|
-
}),
|
|
19
|
-
endColor: createColorProp({
|
|
20
|
-
label: "End Color",
|
|
21
|
-
description: "The final gradient color of the shadow.",
|
|
22
|
-
defaultValue: null,
|
|
23
|
-
}),
|
|
24
|
-
distance: createStaticNumberProp({
|
|
25
|
-
label: "Distance",
|
|
26
|
-
description: "The distance of the shadow.",
|
|
27
|
-
}),
|
|
28
|
-
paintInside: createStaticBoolProp({
|
|
29
|
-
label: "Paint Inside",
|
|
30
|
-
description: "Apply the shadow below/inside the content.",
|
|
31
|
-
defaultValue: null,
|
|
32
|
-
}),
|
|
33
|
-
stretch: createStaticBoolProp({
|
|
34
|
-
label: "Stretch",
|
|
35
|
-
description: "Force children to occupy all available horizontal space.",
|
|
36
|
-
defaultValue: null,
|
|
37
|
-
}),
|
|
38
|
-
},
|
|
39
|
-
};
|
package/src/mappings/Shadow.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
COMPONENT_TYPES,
|
|
3
|
-
CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
4
|
-
createColorProp,
|
|
5
|
-
createStaticNumberProp,
|
|
6
|
-
createStaticBoolProp,
|
|
7
|
-
createDisabledProp,
|
|
8
|
-
} from "@draftbit/types";
|
|
9
|
-
|
|
10
|
-
export const SEED_DATA = {
|
|
11
|
-
name: "Shadow",
|
|
12
|
-
tag: "Shadow View",
|
|
13
|
-
description: "A cross-platform, universal shadow.",
|
|
14
|
-
library: "react-native-shadow-2",
|
|
15
|
-
category: COMPONENT_TYPES.view,
|
|
16
|
-
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
17
|
-
layout: {},
|
|
18
|
-
props: {
|
|
19
|
-
disabled: createDisabledProp({
|
|
20
|
-
description: "Disabled the shadow.",
|
|
21
|
-
}),
|
|
22
|
-
startColor: createColorProp({
|
|
23
|
-
label: "Start Color",
|
|
24
|
-
description: "The initial gradient color of the shadow.",
|
|
25
|
-
defaultValue: null,
|
|
26
|
-
}),
|
|
27
|
-
endColor: createColorProp({
|
|
28
|
-
label: "End Color",
|
|
29
|
-
description: "The final gradient color of the shadow.",
|
|
30
|
-
defaultValue: null,
|
|
31
|
-
}),
|
|
32
|
-
distance: createStaticNumberProp({
|
|
33
|
-
label: "Distance",
|
|
34
|
-
description: "The distance of the shadow.",
|
|
35
|
-
}),
|
|
36
|
-
paintInside: createStaticBoolProp({
|
|
37
|
-
label: "Paint Inside",
|
|
38
|
-
description: "Apply the shadow below/inside the content.",
|
|
39
|
-
defaultValue: null,
|
|
40
|
-
}),
|
|
41
|
-
stretch: createStaticBoolProp({
|
|
42
|
-
label: "Stretch",
|
|
43
|
-
description: "Force children to occupy all available horizontal space.",
|
|
44
|
-
defaultValue: null,
|
|
45
|
-
}),
|
|
46
|
-
},
|
|
47
|
-
};
|