@draftbit/core 47.0.1-ad0ed2.2 → 47.0.1-c14479.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/index.js +7 -0
- package/lib/commonjs/mappings/Button.js +12 -1
- package/lib/commonjs/mappings/Touchable.js +16 -8
- package/lib/module/index.js +1 -0
- package/lib/module/mappings/Button.js +12 -1
- package/lib/module/mappings/Touchable.js +17 -9
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mappings/Button.d.ts +20 -0
- package/lib/typescript/src/mappings/Button.d.ts.map +1 -1
- package/lib/typescript/src/mappings/Touchable.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/index.js +1 -0
- package/src/index.tsx +1 -0
- package/src/mappings/Button.js +12 -1
- package/src/mappings/Button.ts +12 -1
- package/src/mappings/Touchable.js +17 -9
- package/src/mappings/Touchable.ts +17 -10
package/lib/commonjs/index.js
CHANGED
|
@@ -225,6 +225,12 @@ Object.defineProperty(exports, "Picker", {
|
|
|
225
225
|
return _Picker.default;
|
|
226
226
|
}
|
|
227
227
|
});
|
|
228
|
+
Object.defineProperty(exports, "Pressable", {
|
|
229
|
+
enumerable: true,
|
|
230
|
+
get: function () {
|
|
231
|
+
return _Pressable.default;
|
|
232
|
+
}
|
|
233
|
+
});
|
|
228
234
|
Object.defineProperty(exports, "ProgressBar", {
|
|
229
235
|
enumerable: true,
|
|
230
236
|
get: function () {
|
|
@@ -438,6 +444,7 @@ var _Switch = _interopRequireWildcard(require("./components/Switch"));
|
|
|
438
444
|
var _TextField = _interopRequireDefault(require("./components/TextField"));
|
|
439
445
|
var _ToggleButton = _interopRequireDefault(require("./components/ToggleButton"));
|
|
440
446
|
var _Touchable = _interopRequireDefault(require("./components/Touchable"));
|
|
447
|
+
var _Pressable = _interopRequireDefault(require("./components/Pressable"));
|
|
441
448
|
var _Accordion = require("./components/Accordion");
|
|
442
449
|
var _ActionSheet = require("./components/ActionSheet");
|
|
443
450
|
var _Swiper = require("./components/Swiper");
|
|
@@ -5,9 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.SEED_DATA = void 0;
|
|
7
7
|
var _types = require("@draftbit/types");
|
|
8
|
-
const SEED_DATA_TRIGGERS = [_types.Triggers.OnPress];
|
|
8
|
+
const SEED_DATA_TRIGGERS = [_types.Triggers.OnPress, _types.Triggers.OnLongPress];
|
|
9
9
|
const SEED_DATA_PROPS = {
|
|
10
10
|
onPress: (0, _types.createActionProp)(),
|
|
11
|
+
onLongPress: (0, _types.createActionProp)(),
|
|
11
12
|
icon: (0, _types.createIconProp)({
|
|
12
13
|
defaultValue: null,
|
|
13
14
|
required: false
|
|
@@ -22,11 +23,21 @@ const SEED_DATA_PROPS = {
|
|
|
22
23
|
activeOpacity: (0, _types.createStaticNumberProp)({
|
|
23
24
|
label: "Active Opacity",
|
|
24
25
|
description: "Opacity of the button when active.",
|
|
26
|
+
defaultValue: 0.8,
|
|
27
|
+
min: 0,
|
|
28
|
+
max: 1,
|
|
29
|
+
step: 0.01,
|
|
30
|
+
precision: 2,
|
|
25
31
|
required: false
|
|
26
32
|
}),
|
|
27
33
|
disabledOpacity: (0, _types.createStaticNumberProp)({
|
|
28
34
|
label: "Disabled Opacity",
|
|
29
35
|
description: "Opacity of the button when disabled.",
|
|
36
|
+
defaultValue: 0.8,
|
|
37
|
+
min: 0,
|
|
38
|
+
max: 1,
|
|
39
|
+
step: 0.01,
|
|
40
|
+
precision: 2,
|
|
30
41
|
required: false
|
|
31
42
|
}),
|
|
32
43
|
delayLongPress: (0, _types.createStaticNumberProp)({
|
|
@@ -12,27 +12,35 @@ const SEED_DATA_PROPS = {
|
|
|
12
12
|
props: {
|
|
13
13
|
onPress: (0, _types.createActionProp)(),
|
|
14
14
|
onLongPress: (0, _types.createActionProp)(),
|
|
15
|
-
activeOpacity: (0, _types.
|
|
15
|
+
activeOpacity: (0, _types.createStaticNumberProp)({
|
|
16
16
|
label: "Active Opacity",
|
|
17
17
|
description: "The opacity when the button is pressed.",
|
|
18
18
|
defaultValue: 0.8,
|
|
19
|
-
|
|
19
|
+
min: 0,
|
|
20
|
+
max: 1,
|
|
21
|
+
step: 0.01,
|
|
22
|
+
precision: 2,
|
|
23
|
+
required: false
|
|
20
24
|
}),
|
|
21
|
-
disabledOpacity: (0, _types.
|
|
25
|
+
disabledOpacity: (0, _types.createStaticNumberProp)({
|
|
22
26
|
label: "Disabled Opacity",
|
|
23
27
|
description: "The opacity when the button is disabled.",
|
|
24
28
|
defaultValue: 0.8,
|
|
25
|
-
|
|
29
|
+
min: 0,
|
|
30
|
+
max: 1,
|
|
31
|
+
step: 0.01,
|
|
32
|
+
precision: 2,
|
|
33
|
+
required: false
|
|
26
34
|
}),
|
|
27
|
-
delayLongPress: (0, _types.
|
|
35
|
+
delayLongPress: (0, _types.createStaticNumberProp)({
|
|
28
36
|
label: "Delay Long Press",
|
|
29
37
|
description: "Duration (in milliseconds) from onPressIn before onLongPress is called.",
|
|
30
|
-
|
|
38
|
+
required: false
|
|
31
39
|
}),
|
|
32
|
-
hitSlop: (0, _types.
|
|
40
|
+
hitSlop: (0, _types.createStaticNumberProp)({
|
|
33
41
|
label: "Hit Slop",
|
|
34
42
|
description: "Sets additional distance outside of element in which a press can be detected.",
|
|
35
|
-
|
|
43
|
+
required: false
|
|
36
44
|
})
|
|
37
45
|
}
|
|
38
46
|
};
|
package/lib/module/index.js
CHANGED
|
@@ -26,6 +26,7 @@ export { default as Switch, SwitchRow } from "./components/Switch";
|
|
|
26
26
|
export { default as TextField } from "./components/TextField";
|
|
27
27
|
export { default as ToggleButton } from "./components/ToggleButton";
|
|
28
28
|
export { default as Touchable } from "./components/Touchable";
|
|
29
|
+
export { default as Pressable } from "./components/Pressable";
|
|
29
30
|
export { AccordionGroup, AccordionItem } from "./components/Accordion";
|
|
30
31
|
export { ActionSheet, ActionSheetItem, ActionSheetCancel } from "./components/ActionSheet";
|
|
31
32
|
export { Swiper, SwiperItem } from "./components/Swiper";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { COMPONENT_TYPES, createIconProp, createTextProp, createDisabledProp, createLoadingProp, createActionProp, Triggers, StylesPanelSections, createStaticNumberProp } from "@draftbit/types";
|
|
2
|
-
const SEED_DATA_TRIGGERS = [Triggers.OnPress];
|
|
2
|
+
const SEED_DATA_TRIGGERS = [Triggers.OnPress, Triggers.OnLongPress];
|
|
3
3
|
const SEED_DATA_PROPS = {
|
|
4
4
|
onPress: createActionProp(),
|
|
5
|
+
onLongPress: createActionProp(),
|
|
5
6
|
icon: createIconProp({
|
|
6
7
|
defaultValue: null,
|
|
7
8
|
required: false
|
|
@@ -16,11 +17,21 @@ const SEED_DATA_PROPS = {
|
|
|
16
17
|
activeOpacity: createStaticNumberProp({
|
|
17
18
|
label: "Active Opacity",
|
|
18
19
|
description: "Opacity of the button when active.",
|
|
20
|
+
defaultValue: 0.8,
|
|
21
|
+
min: 0,
|
|
22
|
+
max: 1,
|
|
23
|
+
step: 0.01,
|
|
24
|
+
precision: 2,
|
|
19
25
|
required: false
|
|
20
26
|
}),
|
|
21
27
|
disabledOpacity: createStaticNumberProp({
|
|
22
28
|
label: "Disabled Opacity",
|
|
23
29
|
description: "Opacity of the button when disabled.",
|
|
30
|
+
defaultValue: 0.8,
|
|
31
|
+
min: 0,
|
|
32
|
+
max: 1,
|
|
33
|
+
step: 0.01,
|
|
34
|
+
precision: 2,
|
|
24
35
|
required: false
|
|
25
36
|
}),
|
|
26
37
|
delayLongPress: createStaticNumberProp({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createActionProp, Triggers,
|
|
1
|
+
import { COMPONENT_TYPES, createActionProp, Triggers, createStaticNumberProp, StylesPanelSections } from "@draftbit/types";
|
|
2
2
|
const SEED_DATA_PROPS = {
|
|
3
3
|
stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins, StylesPanelSections.Borders],
|
|
4
4
|
layout: {},
|
|
@@ -6,27 +6,35 @@ const SEED_DATA_PROPS = {
|
|
|
6
6
|
props: {
|
|
7
7
|
onPress: createActionProp(),
|
|
8
8
|
onLongPress: createActionProp(),
|
|
9
|
-
activeOpacity:
|
|
9
|
+
activeOpacity: createStaticNumberProp({
|
|
10
10
|
label: "Active Opacity",
|
|
11
11
|
description: "The opacity when the button is pressed.",
|
|
12
12
|
defaultValue: 0.8,
|
|
13
|
-
|
|
13
|
+
min: 0,
|
|
14
|
+
max: 1,
|
|
15
|
+
step: 0.01,
|
|
16
|
+
precision: 2,
|
|
17
|
+
required: false
|
|
14
18
|
}),
|
|
15
|
-
disabledOpacity:
|
|
19
|
+
disabledOpacity: createStaticNumberProp({
|
|
16
20
|
label: "Disabled Opacity",
|
|
17
21
|
description: "The opacity when the button is disabled.",
|
|
18
22
|
defaultValue: 0.8,
|
|
19
|
-
|
|
23
|
+
min: 0,
|
|
24
|
+
max: 1,
|
|
25
|
+
step: 0.01,
|
|
26
|
+
precision: 2,
|
|
27
|
+
required: false
|
|
20
28
|
}),
|
|
21
|
-
delayLongPress:
|
|
29
|
+
delayLongPress: createStaticNumberProp({
|
|
22
30
|
label: "Delay Long Press",
|
|
23
31
|
description: "Duration (in milliseconds) from onPressIn before onLongPress is called.",
|
|
24
|
-
|
|
32
|
+
required: false
|
|
25
33
|
}),
|
|
26
|
-
hitSlop:
|
|
34
|
+
hitSlop: createStaticNumberProp({
|
|
27
35
|
label: "Hit Slop",
|
|
28
36
|
description: "Sets additional distance outside of element in which a press can be detected.",
|
|
29
|
-
|
|
37
|
+
required: false
|
|
30
38
|
})
|
|
31
39
|
}
|
|
32
40
|
};
|
|
@@ -26,6 +26,7 @@ export { default as Switch, SwitchRow } from "./components/Switch";
|
|
|
26
26
|
export { default as TextField } from "./components/TextField";
|
|
27
27
|
export { default as ToggleButton } from "./components/ToggleButton";
|
|
28
28
|
export { default as Touchable } from "./components/Touchable";
|
|
29
|
+
export { default as Pressable } from "./components/Pressable";
|
|
29
30
|
export { AccordionGroup, AccordionItem } from "./components/Accordion";
|
|
30
31
|
export { ActionSheet, ActionSheetItem, ActionSheetCancel, } from "./components/ActionSheet";
|
|
31
32
|
export { Swiper, SwiperItem } from "./components/Swiper";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D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AAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -22,6 +22,16 @@ export declare const SEED_DATA: ({
|
|
|
22
22
|
defaultValue: null;
|
|
23
23
|
group: string;
|
|
24
24
|
};
|
|
25
|
+
onLongPress: {
|
|
26
|
+
label: string;
|
|
27
|
+
description: string;
|
|
28
|
+
editable: boolean;
|
|
29
|
+
required: boolean;
|
|
30
|
+
formType: string;
|
|
31
|
+
propType: string;
|
|
32
|
+
defaultValue: null;
|
|
33
|
+
group: string;
|
|
34
|
+
};
|
|
25
35
|
icon: {
|
|
26
36
|
label: string;
|
|
27
37
|
description: string;
|
|
@@ -122,6 +132,16 @@ export declare const SEED_DATA: ({
|
|
|
122
132
|
defaultValue: null;
|
|
123
133
|
group: string;
|
|
124
134
|
};
|
|
135
|
+
onLongPress: {
|
|
136
|
+
label: string;
|
|
137
|
+
description: string;
|
|
138
|
+
editable: boolean;
|
|
139
|
+
required: boolean;
|
|
140
|
+
formType: string;
|
|
141
|
+
propType: string;
|
|
142
|
+
defaultValue: null;
|
|
143
|
+
group: string;
|
|
144
|
+
};
|
|
125
145
|
icon: {
|
|
126
146
|
label: string;
|
|
127
147
|
description: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Button.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Button.ts"],"names":[],"mappings":"AA6DA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoErB,CAAC"}
|
|
@@ -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":"AAsDA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAerB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "47.0.1-
|
|
3
|
+
"version": "47.0.1-c14479.2+c14479d",
|
|
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.0.1-
|
|
44
|
+
"@draftbit/types": "^47.0.1-c14479.2+c14479d",
|
|
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": "c14479de6895023d05be3695cd227333d13a3491"
|
|
95
95
|
}
|
package/src/index.js
CHANGED
|
@@ -26,6 +26,7 @@ export { default as Switch, SwitchRow } from "./components/Switch";
|
|
|
26
26
|
export { default as TextField } from "./components/TextField";
|
|
27
27
|
export { default as ToggleButton } from "./components/ToggleButton";
|
|
28
28
|
export { default as Touchable } from "./components/Touchable";
|
|
29
|
+
export { default as Pressable } from "./components/Pressable";
|
|
29
30
|
export { AccordionGroup, AccordionItem } from "./components/Accordion";
|
|
30
31
|
export { ActionSheet, ActionSheetItem, ActionSheetCancel, } from "./components/ActionSheet";
|
|
31
32
|
export { Swiper, SwiperItem } from "./components/Swiper";
|
package/src/index.tsx
CHANGED
|
@@ -27,6 +27,7 @@ export { default as Switch, SwitchRow } from "./components/Switch";
|
|
|
27
27
|
export { default as TextField } from "./components/TextField";
|
|
28
28
|
export { default as ToggleButton } from "./components/ToggleButton";
|
|
29
29
|
export { default as Touchable } from "./components/Touchable";
|
|
30
|
+
export { default as Pressable } from "./components/Pressable";
|
|
30
31
|
export { AccordionGroup, AccordionItem } from "./components/Accordion";
|
|
31
32
|
export {
|
|
32
33
|
ActionSheet,
|
package/src/mappings/Button.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { COMPONENT_TYPES, createIconProp, createTextProp, createDisabledProp, createLoadingProp, createActionProp, Triggers, StylesPanelSections, createStaticNumberProp, } from "@draftbit/types";
|
|
2
|
-
const SEED_DATA_TRIGGERS = [Triggers.OnPress];
|
|
2
|
+
const SEED_DATA_TRIGGERS = [Triggers.OnPress, Triggers.OnLongPress];
|
|
3
3
|
const SEED_DATA_PROPS = {
|
|
4
4
|
onPress: createActionProp(),
|
|
5
|
+
onLongPress: createActionProp(),
|
|
5
6
|
icon: createIconProp({
|
|
6
7
|
defaultValue: null,
|
|
7
8
|
required: false,
|
|
@@ -16,11 +17,21 @@ const SEED_DATA_PROPS = {
|
|
|
16
17
|
activeOpacity: createStaticNumberProp({
|
|
17
18
|
label: "Active Opacity",
|
|
18
19
|
description: "Opacity of the button when active.",
|
|
20
|
+
defaultValue: 0.8,
|
|
21
|
+
min: 0,
|
|
22
|
+
max: 1,
|
|
23
|
+
step: 0.01,
|
|
24
|
+
precision: 2,
|
|
19
25
|
required: false,
|
|
20
26
|
}),
|
|
21
27
|
disabledOpacity: createStaticNumberProp({
|
|
22
28
|
label: "Disabled Opacity",
|
|
23
29
|
description: "Opacity of the button when disabled.",
|
|
30
|
+
defaultValue: 0.8,
|
|
31
|
+
min: 0,
|
|
32
|
+
max: 1,
|
|
33
|
+
step: 0.01,
|
|
34
|
+
precision: 2,
|
|
24
35
|
required: false,
|
|
25
36
|
}),
|
|
26
37
|
delayLongPress: createStaticNumberProp({
|
package/src/mappings/Button.ts
CHANGED
|
@@ -10,9 +10,10 @@ import {
|
|
|
10
10
|
createStaticNumberProp,
|
|
11
11
|
} from "@draftbit/types";
|
|
12
12
|
|
|
13
|
-
const SEED_DATA_TRIGGERS = [Triggers.OnPress];
|
|
13
|
+
const SEED_DATA_TRIGGERS = [Triggers.OnPress, Triggers.OnLongPress];
|
|
14
14
|
const SEED_DATA_PROPS = {
|
|
15
15
|
onPress: createActionProp(),
|
|
16
|
+
onLongPress: createActionProp(),
|
|
16
17
|
icon: createIconProp({
|
|
17
18
|
defaultValue: null,
|
|
18
19
|
required: false,
|
|
@@ -27,11 +28,21 @@ const SEED_DATA_PROPS = {
|
|
|
27
28
|
activeOpacity: createStaticNumberProp({
|
|
28
29
|
label: "Active Opacity",
|
|
29
30
|
description: "Opacity of the button when active.",
|
|
31
|
+
defaultValue: 0.8,
|
|
32
|
+
min: 0,
|
|
33
|
+
max: 1,
|
|
34
|
+
step: 0.01,
|
|
35
|
+
precision: 2,
|
|
30
36
|
required: false,
|
|
31
37
|
}),
|
|
32
38
|
disabledOpacity: createStaticNumberProp({
|
|
33
39
|
label: "Disabled Opacity",
|
|
34
40
|
description: "Opacity of the button when disabled.",
|
|
41
|
+
defaultValue: 0.8,
|
|
42
|
+
min: 0,
|
|
43
|
+
max: 1,
|
|
44
|
+
step: 0.01,
|
|
45
|
+
precision: 2,
|
|
35
46
|
required: false,
|
|
36
47
|
}),
|
|
37
48
|
delayLongPress: createStaticNumberProp({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createActionProp, Triggers,
|
|
1
|
+
import { COMPONENT_TYPES, createActionProp, Triggers, createStaticNumberProp, StylesPanelSections, } from "@draftbit/types";
|
|
2
2
|
const SEED_DATA_PROPS = {
|
|
3
3
|
stylesPanelSections: [
|
|
4
4
|
StylesPanelSections.Size,
|
|
@@ -10,27 +10,35 @@ const SEED_DATA_PROPS = {
|
|
|
10
10
|
props: {
|
|
11
11
|
onPress: createActionProp(),
|
|
12
12
|
onLongPress: createActionProp(),
|
|
13
|
-
activeOpacity:
|
|
13
|
+
activeOpacity: createStaticNumberProp({
|
|
14
14
|
label: "Active Opacity",
|
|
15
15
|
description: "The opacity when the button is pressed.",
|
|
16
16
|
defaultValue: 0.8,
|
|
17
|
-
|
|
17
|
+
min: 0,
|
|
18
|
+
max: 1,
|
|
19
|
+
step: 0.01,
|
|
20
|
+
precision: 2,
|
|
21
|
+
required: false,
|
|
18
22
|
}),
|
|
19
|
-
disabledOpacity:
|
|
23
|
+
disabledOpacity: createStaticNumberProp({
|
|
20
24
|
label: "Disabled Opacity",
|
|
21
25
|
description: "The opacity when the button is disabled.",
|
|
22
26
|
defaultValue: 0.8,
|
|
23
|
-
|
|
27
|
+
min: 0,
|
|
28
|
+
max: 1,
|
|
29
|
+
step: 0.01,
|
|
30
|
+
precision: 2,
|
|
31
|
+
required: false,
|
|
24
32
|
}),
|
|
25
|
-
delayLongPress:
|
|
33
|
+
delayLongPress: createStaticNumberProp({
|
|
26
34
|
label: "Delay Long Press",
|
|
27
35
|
description: "Duration (in milliseconds) from onPressIn before onLongPress is called.",
|
|
28
|
-
|
|
36
|
+
required: false,
|
|
29
37
|
}),
|
|
30
|
-
hitSlop:
|
|
38
|
+
hitSlop: createStaticNumberProp({
|
|
31
39
|
label: "Hit Slop",
|
|
32
40
|
description: "Sets additional distance outside of element in which a press can be detected.",
|
|
33
|
-
|
|
41
|
+
required: false,
|
|
34
42
|
}),
|
|
35
43
|
},
|
|
36
44
|
};
|
|
@@ -2,9 +2,8 @@ import {
|
|
|
2
2
|
COMPONENT_TYPES,
|
|
3
3
|
createActionProp,
|
|
4
4
|
Triggers,
|
|
5
|
-
|
|
5
|
+
createStaticNumberProp,
|
|
6
6
|
StylesPanelSections,
|
|
7
|
-
GROUPS,
|
|
8
7
|
} from "@draftbit/types";
|
|
9
8
|
|
|
10
9
|
const SEED_DATA_PROPS = {
|
|
@@ -18,29 +17,37 @@ const SEED_DATA_PROPS = {
|
|
|
18
17
|
props: {
|
|
19
18
|
onPress: createActionProp(),
|
|
20
19
|
onLongPress: createActionProp(),
|
|
21
|
-
activeOpacity:
|
|
20
|
+
activeOpacity: createStaticNumberProp({
|
|
22
21
|
label: "Active Opacity",
|
|
23
22
|
description: "The opacity when the button is pressed.",
|
|
24
23
|
defaultValue: 0.8,
|
|
25
|
-
|
|
24
|
+
min: 0,
|
|
25
|
+
max: 1,
|
|
26
|
+
step: 0.01,
|
|
27
|
+
precision: 2,
|
|
28
|
+
required: false,
|
|
26
29
|
}),
|
|
27
|
-
disabledOpacity:
|
|
30
|
+
disabledOpacity: createStaticNumberProp({
|
|
28
31
|
label: "Disabled Opacity",
|
|
29
32
|
description: "The opacity when the button is disabled.",
|
|
30
33
|
defaultValue: 0.8,
|
|
31
|
-
|
|
34
|
+
min: 0,
|
|
35
|
+
max: 1,
|
|
36
|
+
step: 0.01,
|
|
37
|
+
precision: 2,
|
|
38
|
+
required: false,
|
|
32
39
|
}),
|
|
33
|
-
delayLongPress:
|
|
40
|
+
delayLongPress: createStaticNumberProp({
|
|
34
41
|
label: "Delay Long Press",
|
|
35
42
|
description:
|
|
36
43
|
"Duration (in milliseconds) from onPressIn before onLongPress is called.",
|
|
37
|
-
|
|
44
|
+
required: false,
|
|
38
45
|
}),
|
|
39
|
-
hitSlop:
|
|
46
|
+
hitSlop: createStaticNumberProp({
|
|
40
47
|
label: "Hit Slop",
|
|
41
48
|
description:
|
|
42
49
|
"Sets additional distance outside of element in which a press can be detected.",
|
|
43
|
-
|
|
50
|
+
required: false,
|
|
44
51
|
}),
|
|
45
52
|
},
|
|
46
53
|
};
|