@draftbit/core 46.7.3 → 46.7.5
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 +12 -35
- 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/Elevation.js +14 -2
- package/lib/commonjs/components/IconButton.js +4 -2
- package/lib/commonjs/components/Image.js +2 -17
- package/lib/commonjs/components/NumberInput.js +1 -1
- 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/Pressable.js +2 -2
- package/lib/commonjs/components/ProgressBar.js +7 -37
- 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 +4 -17
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/hooks.js +2 -1
- package/lib/commonjs/index.js +0 -56
- package/lib/commonjs/mappings/Button.js +2 -2
- package/lib/commonjs/mappings/FlashList.js +28 -0
- package/lib/commonjs/mappings/FlatList.js +14 -0
- package/lib/commonjs/mappings/IconButton.js +4 -6
- package/lib/commonjs/mappings/MapView.js +3 -1
- package/lib/commonjs/mappings/ScrollView.js +7 -1
- package/lib/commonjs/mappings/Touchable.js +9 -2
- package/lib/commonjs/styles/overlay.js +1 -3
- package/lib/commonjs/utilities.js +2 -1
- package/lib/module/components/Button.js +12 -35
- 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/IconButton.js +4 -2
- package/lib/module/components/Image.js +2 -18
- package/lib/module/components/Layout.js +21 -42
- package/lib/module/components/NumberInput.js +4 -13
- package/lib/module/components/Picker/PickerComponent.ios.js +11 -36
- package/lib/module/components/Portal/PortalConsumer.js +7 -22
- package/lib/module/components/Pressable.js +2 -2
- 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/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 +4 -17
- package/lib/module/constants.js +2 -1
- package/lib/module/index.js +0 -8
- package/lib/module/mappings/Button.js +2 -2
- package/lib/module/mappings/FieldSearchBarFull.js +1 -4
- package/lib/module/mappings/FlashList.js +29 -1
- package/lib/module/mappings/FlatList.js +15 -1
- package/lib/module/mappings/IconButton.js +5 -7
- package/lib/module/mappings/MapView.js +3 -1
- package/lib/module/mappings/ScrollView.js +8 -2
- package/lib/module/mappings/Touchable.js +10 -3
- package/lib/module/styles/overlay.js +3 -1
- package/lib/module/utilities.js +2 -1
- 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/index.d.ts +0 -8
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mappings/FlashList.d.ts +60 -0
- package/lib/typescript/src/mappings/FlashList.d.ts.map +1 -1
- package/lib/typescript/src/mappings/FlatList.d.ts +30 -0
- package/lib/typescript/src/mappings/FlatList.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/ScrollView.d.ts +21 -0
- package/lib/typescript/src/mappings/ScrollView.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/NumberInput.js +1 -1
- package/src/components/NumberInput.tsx +1 -1
- 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/index.js +0 -8
- package/src/index.tsx +0 -8
- package/src/mappings/Button.js +2 -2
- package/src/mappings/Button.ts +2 -2
- package/src/mappings/FlashList.js +29 -1
- package/src/mappings/FlashList.ts +33 -0
- package/src/mappings/FlatList.js +15 -1
- package/src/mappings/FlatList.ts +17 -0
- 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/ScrollView.js +8 -2
- package/src/mappings/ScrollView.ts +10 -1
- package/src/mappings/Touchable.js +10 -3
- package/src/mappings/Touchable.ts +12 -2
- 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/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/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
|
@@ -5,7 +5,18 @@ export declare const SEED_DATA: {
|
|
|
5
5
|
category: string;
|
|
6
6
|
stylesPanelSections: string[];
|
|
7
7
|
layout: {};
|
|
8
|
+
triggers: string[];
|
|
8
9
|
props: {
|
|
10
|
+
onRefresh: {
|
|
11
|
+
label: string;
|
|
12
|
+
description: string;
|
|
13
|
+
editable: boolean;
|
|
14
|
+
required: boolean;
|
|
15
|
+
formType: string;
|
|
16
|
+
propType: string;
|
|
17
|
+
defaultValue: null;
|
|
18
|
+
group: string;
|
|
19
|
+
};
|
|
9
20
|
horizontal: {
|
|
10
21
|
label: string;
|
|
11
22
|
description: string;
|
|
@@ -46,6 +57,16 @@ export declare const SEED_DATA: {
|
|
|
46
57
|
required: boolean;
|
|
47
58
|
group: string;
|
|
48
59
|
};
|
|
60
|
+
refreshColor: {
|
|
61
|
+
group: string;
|
|
62
|
+
label: string;
|
|
63
|
+
description: string;
|
|
64
|
+
editable: boolean;
|
|
65
|
+
required: boolean;
|
|
66
|
+
defaultValue: null;
|
|
67
|
+
formType: string;
|
|
68
|
+
propType: string;
|
|
69
|
+
};
|
|
49
70
|
};
|
|
50
71
|
};
|
|
51
72
|
//# sourceMappingURL=ScrollView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollView.d.ts","sourceRoot":"","sources":["../../../../src/mappings/ScrollView.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScrollView.d.ts","sourceRoot":"","sources":["../../../../src/mappings/ScrollView.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCrB,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": "46.7.
|
|
3
|
+
"version": "46.7.5",
|
|
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.7.
|
|
44
|
+
"@draftbit/types": "^46.7.5",
|
|
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": "9f8dad5d16a2975162d7bdd23990956d73d9b859"
|
|
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",
|
|
@@ -2,7 +2,7 @@ import React, { useEffect, useState } from "react";
|
|
|
2
2
|
import { TextInput } from "react-native";
|
|
3
3
|
import { isString, isNumber, isNaN } from "lodash";
|
|
4
4
|
const NumberInput = ({ onChangeText, value, defaultValue, ...props }) => {
|
|
5
|
-
const [currentStringNumberValue, setCurrentStringNumberValue] = useState("
|
|
5
|
+
const [currentStringNumberValue, setCurrentStringNumberValue] = useState("");
|
|
6
6
|
const formatValueToStringNumber = (valueToFormat) => {
|
|
7
7
|
if (valueToFormat != null) {
|
|
8
8
|
if (isString(valueToFormat) && valueToFormat !== "") {
|
|
@@ -14,7 +14,7 @@ const NumberInput: FC<Props> = ({
|
|
|
14
14
|
defaultValue,
|
|
15
15
|
...props
|
|
16
16
|
}) => {
|
|
17
|
-
const [currentStringNumberValue, setCurrentStringNumberValue] = useState("
|
|
17
|
+
const [currentStringNumberValue, setCurrentStringNumberValue] = useState("");
|
|
18
18
|
|
|
19
19
|
const formatValueToStringNumber = (valueToFormat?: number | string) => {
|
|
20
20
|
if (valueToFormat != null) {
|
|
@@ -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/index.js
CHANGED
|
@@ -8,7 +8,6 @@ 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";
|
|
11
|
-
export { default as Carousel } from "./components/Carousel";
|
|
12
11
|
export { Checkbox, CheckboxGroup, CheckboxRow } from "./components/Checkbox";
|
|
13
12
|
export { default as CircleImage } from "./components/CircleImage";
|
|
14
13
|
export { default as Container } from "./components/Container";
|
|
@@ -33,14 +32,7 @@ export { Swiper, SwiperItem } from "./components/Swiper";
|
|
|
33
32
|
export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
|
|
34
33
|
export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
|
|
35
34
|
/* Deprecated: Fix or Delete! */
|
|
36
|
-
export { default as CardBlock } from "./components/CardBlock";
|
|
37
|
-
export { default as CardContainer } from "./components/CardContainer";
|
|
38
|
-
export { default as CardContainerRating } from "./components/CardContainerRating";
|
|
39
|
-
export { default as CardInline } from "./components/CardInline";
|
|
40
35
|
export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
41
|
-
export { default as HeaderLarge } from "./components/HeaderLarge";
|
|
42
|
-
export { default as HeaderMedium } from "./components/HeaderMedium";
|
|
43
|
-
export { default as HeaderOverline } from "./components/HeaderOverline";
|
|
44
36
|
export { default as Picker } from "./components/Picker/Picker";
|
|
45
37
|
export { default as ProgressBar } from "./components/ProgressBar";
|
|
46
38
|
export { default as ProgressCircle } from "./components/ProgressCircle";
|
package/src/index.tsx
CHANGED
|
@@ -9,7 +9,6 @@ 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";
|
|
12
|
-
export { default as Carousel } from "./components/Carousel";
|
|
13
12
|
export { Checkbox, CheckboxGroup, CheckboxRow } from "./components/Checkbox";
|
|
14
13
|
export { default as CircleImage } from "./components/CircleImage";
|
|
15
14
|
export { default as Container } from "./components/Container";
|
|
@@ -53,14 +52,7 @@ export {
|
|
|
53
52
|
} from "./components/RadioButton/index";
|
|
54
53
|
|
|
55
54
|
/* Deprecated: Fix or Delete! */
|
|
56
|
-
export { default as CardBlock } from "./components/CardBlock";
|
|
57
|
-
export { default as CardContainer } from "./components/CardContainer";
|
|
58
|
-
export { default as CardContainerRating } from "./components/CardContainerRating";
|
|
59
|
-
export { default as CardInline } from "./components/CardInline";
|
|
60
55
|
export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
61
|
-
export { default as HeaderLarge } from "./components/HeaderLarge";
|
|
62
|
-
export { default as HeaderMedium } from "./components/HeaderMedium";
|
|
63
|
-
export { default as HeaderOverline } from "./components/HeaderOverline";
|
|
64
56
|
export { default as Picker } from "./components/Picker/Picker";
|
|
65
57
|
export { default as ProgressBar } from "./components/ProgressBar";
|
|
66
58
|
export { default as ProgressCircle } from "./components/ProgressCircle";
|
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,4 +1,4 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS, Triggers, createActionProp, createStaticNumberProp, } from "@draftbit/types";
|
|
1
|
+
import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS, Triggers, createActionProp, createStaticNumberProp, createColorProp, } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = [
|
|
3
3
|
{
|
|
4
4
|
name: "Masonry List",
|
|
@@ -35,6 +35,20 @@ export const SEED_DATA = [
|
|
|
35
35
|
description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
|
|
36
36
|
defaultValue: 0.5,
|
|
37
37
|
}),
|
|
38
|
+
refreshColor: createColorProp({
|
|
39
|
+
label: "Refreshing Color",
|
|
40
|
+
description: "Color of the refresh indicator",
|
|
41
|
+
}),
|
|
42
|
+
showsHorizontalScrollIndicator: createStaticBoolProp({
|
|
43
|
+
label: "Show Horizontal Scroll Indicator",
|
|
44
|
+
description: "When true, shows a horizontal scroll indicator. The default value is true.",
|
|
45
|
+
defaultValue: true,
|
|
46
|
+
}),
|
|
47
|
+
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
48
|
+
label: "Show Vertical Scroll Indicator",
|
|
49
|
+
description: "When true, shows a vertical scroll indicator. The default value is true.",
|
|
50
|
+
defaultValue: true,
|
|
51
|
+
}),
|
|
38
52
|
},
|
|
39
53
|
},
|
|
40
54
|
{
|
|
@@ -80,6 +94,20 @@ export const SEED_DATA = [
|
|
|
80
94
|
description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
|
|
81
95
|
defaultValue: 0.5,
|
|
82
96
|
}),
|
|
97
|
+
refreshColor: createColorProp({
|
|
98
|
+
label: "Refreshing Color",
|
|
99
|
+
description: "Color of the refresh indicator",
|
|
100
|
+
}),
|
|
101
|
+
showsHorizontalScrollIndicator: createStaticBoolProp({
|
|
102
|
+
label: "Show Horizontal Scroll Indicator",
|
|
103
|
+
description: "When true, shows a horizontal scroll indicator. The default value is true.",
|
|
104
|
+
defaultValue: true,
|
|
105
|
+
}),
|
|
106
|
+
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
107
|
+
label: "Show Vertical Scroll Indicator",
|
|
108
|
+
description: "When true, shows a vertical scroll indicator. The default value is true.",
|
|
109
|
+
defaultValue: true,
|
|
110
|
+
}),
|
|
83
111
|
},
|
|
84
112
|
},
|
|
85
113
|
];
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
Triggers,
|
|
9
9
|
createActionProp,
|
|
10
10
|
createStaticNumberProp,
|
|
11
|
+
createColorProp,
|
|
11
12
|
} from "@draftbit/types";
|
|
12
13
|
|
|
13
14
|
export const SEED_DATA = [
|
|
@@ -47,6 +48,22 @@ export const SEED_DATA = [
|
|
|
47
48
|
"How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
|
|
48
49
|
defaultValue: 0.5,
|
|
49
50
|
}),
|
|
51
|
+
refreshColor: createColorProp({
|
|
52
|
+
label: "Refreshing Color",
|
|
53
|
+
description: "Color of the refresh indicator",
|
|
54
|
+
}),
|
|
55
|
+
showsHorizontalScrollIndicator: createStaticBoolProp({
|
|
56
|
+
label: "Show Horizontal Scroll Indicator",
|
|
57
|
+
description:
|
|
58
|
+
"When true, shows a horizontal scroll indicator. The default value is true.",
|
|
59
|
+
defaultValue: true,
|
|
60
|
+
}),
|
|
61
|
+
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
62
|
+
label: "Show Vertical Scroll Indicator",
|
|
63
|
+
description:
|
|
64
|
+
"When true, shows a vertical scroll indicator. The default value is true.",
|
|
65
|
+
defaultValue: true,
|
|
66
|
+
}),
|
|
50
67
|
},
|
|
51
68
|
},
|
|
52
69
|
{
|
|
@@ -93,6 +110,22 @@ export const SEED_DATA = [
|
|
|
93
110
|
"How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
|
|
94
111
|
defaultValue: 0.5,
|
|
95
112
|
}),
|
|
113
|
+
refreshColor: createColorProp({
|
|
114
|
+
label: "Refreshing Color",
|
|
115
|
+
description: "Color of the refresh indicator",
|
|
116
|
+
}),
|
|
117
|
+
showsHorizontalScrollIndicator: createStaticBoolProp({
|
|
118
|
+
label: "Show Horizontal Scroll Indicator",
|
|
119
|
+
description:
|
|
120
|
+
"When true, shows a horizontal scroll indicator. The default value is true.",
|
|
121
|
+
defaultValue: true,
|
|
122
|
+
}),
|
|
123
|
+
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
124
|
+
label: "Show Vertical Scroll Indicator",
|
|
125
|
+
description:
|
|
126
|
+
"When true, shows a vertical scroll indicator. The default value is true.",
|
|
127
|
+
defaultValue: true,
|
|
128
|
+
}),
|
|
96
129
|
},
|
|
97
130
|
},
|
|
98
131
|
];
|
package/src/mappings/FlatList.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp, createStaticNumberProp, } from "@draftbit/types";
|
|
1
|
+
import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp, createStaticNumberProp, createColorProp, } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "List",
|
|
4
4
|
tag: "FlatList",
|
|
@@ -33,5 +33,19 @@ export const SEED_DATA = {
|
|
|
33
33
|
description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
|
|
34
34
|
defaultValue: 0.5,
|
|
35
35
|
}),
|
|
36
|
+
refreshColor: createColorProp({
|
|
37
|
+
label: "Refreshing Color",
|
|
38
|
+
description: "Color of the refresh indicator",
|
|
39
|
+
}),
|
|
40
|
+
showsHorizontalScrollIndicator: createStaticBoolProp({
|
|
41
|
+
label: "Show Horizontal Scroll Indicator",
|
|
42
|
+
description: "When true, shows a horizontal scroll indicator. The default value is true.",
|
|
43
|
+
defaultValue: true,
|
|
44
|
+
}),
|
|
45
|
+
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
46
|
+
label: "Show Vertical Scroll Indicator",
|
|
47
|
+
description: "When true, shows a vertical scroll indicator. The default value is true.",
|
|
48
|
+
defaultValue: true,
|
|
49
|
+
}),
|
|
36
50
|
},
|
|
37
51
|
};
|
package/src/mappings/FlatList.ts
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
Triggers,
|
|
7
7
|
createActionProp,
|
|
8
8
|
createStaticNumberProp,
|
|
9
|
+
createColorProp,
|
|
9
10
|
} from "@draftbit/types";
|
|
10
11
|
|
|
11
12
|
export const SEED_DATA = {
|
|
@@ -43,5 +44,21 @@ export const SEED_DATA = {
|
|
|
43
44
|
"How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
|
|
44
45
|
defaultValue: 0.5,
|
|
45
46
|
}),
|
|
47
|
+
refreshColor: createColorProp({
|
|
48
|
+
label: "Refreshing Color",
|
|
49
|
+
description: "Color of the refresh indicator",
|
|
50
|
+
}),
|
|
51
|
+
showsHorizontalScrollIndicator: createStaticBoolProp({
|
|
52
|
+
label: "Show Horizontal Scroll Indicator",
|
|
53
|
+
description:
|
|
54
|
+
"When true, shows a horizontal scroll indicator. The default value is true.",
|
|
55
|
+
defaultValue: true,
|
|
56
|
+
}),
|
|
57
|
+
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
58
|
+
label: "Show Vertical Scroll Indicator",
|
|
59
|
+
description:
|
|
60
|
+
"When true, shows a vertical scroll indicator. The default value is true.",
|
|
61
|
+
defaultValue: true,
|
|
62
|
+
}),
|
|
46
63
|
},
|
|
47
64
|
};
|
|
@@ -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, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, } from "@draftbit/types";
|
|
1
|
+
import { COMPONENT_TYPES, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp, createColorProp, } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "Scroll View",
|
|
4
4
|
tag: "ScrollView",
|
|
@@ -6,7 +6,9 @@ export const SEED_DATA = {
|
|
|
6
6
|
category: COMPONENT_TYPES.view,
|
|
7
7
|
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
8
8
|
layout: {},
|
|
9
|
+
triggers: [Triggers.OnRefresh],
|
|
9
10
|
props: {
|
|
11
|
+
onRefresh: createActionProp(),
|
|
10
12
|
horizontal: createStaticBoolProp({
|
|
11
13
|
label: "Horizontal",
|
|
12
14
|
description: "Render your list horizontally",
|
|
@@ -15,7 +17,7 @@ export const SEED_DATA = {
|
|
|
15
17
|
showsHorizontalScrollIndicator: createStaticBoolProp({
|
|
16
18
|
label: "Show Horizontal Scroll Indicator",
|
|
17
19
|
description: "When true, shows a horizontal scroll indicator. The default value is true.",
|
|
18
|
-
defaultValue:
|
|
20
|
+
defaultValue: true,
|
|
19
21
|
}),
|
|
20
22
|
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
21
23
|
label: "Show Vertical Scroll Indicator",
|
|
@@ -27,5 +29,9 @@ export const SEED_DATA = {
|
|
|
27
29
|
description: "When true, the scroll view bounces when it reaches the end of the content if the content is larger then the scroll view along the axis of the scroll direction.",
|
|
28
30
|
defaultValue: true,
|
|
29
31
|
}),
|
|
32
|
+
refreshColor: createColorProp({
|
|
33
|
+
label: "Refreshing Color",
|
|
34
|
+
description: "Color of the refresh indicator",
|
|
35
|
+
}),
|
|
30
36
|
},
|
|
31
37
|
};
|