@draftbit/core 46.8.2-a9cd67.2 → 46.8.2-e0b610.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/Elevation.js +14 -2
- package/lib/commonjs/components/Portal/PortalConsumer.js +7 -22
- package/lib/commonjs/components/Shadow.js +46 -0
- package/lib/commonjs/index.js +7 -7
- package/lib/commonjs/mappings/Shadow.js +94 -0
- package/lib/module/components/AspectRatio.js +18 -1
- package/lib/module/components/Checkbox/CheckboxGroupRow.js +24 -5
- package/lib/module/components/CircularProgress.js +8 -28
- package/lib/module/components/Shadow.js +38 -0
- package/lib/module/index.js +1 -1
- package/lib/module/mappings/Shadow.js +87 -0
- package/lib/module/styles/overlay.js +3 -1
- package/lib/typescript/src/components/Shadow.d.ts +24 -0
- package/lib/typescript/src/components/Shadow.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mappings/Shadow.d.ts +173 -0
- package/lib/typescript/src/mappings/Shadow.d.ts.map +1 -0
- package/package.json +4 -4
- package/src/components/Shadow.js +16 -0
- package/src/components/Shadow.tsx +62 -0
- package/src/index.js +1 -1
- package/src/index.tsx +2 -2
- package/src/mappings/Shadow.js +87 -0
- package/src/mappings/Shadow.ts +95 -0
- package/lib/commonjs/components/Markdown.js +0 -30
- package/lib/commonjs/mappings/Markdown.js +0 -27
- package/lib/module/components/Markdown.js +0 -20
- package/lib/module/mappings/Markdown.js +0 -20
- package/lib/typescript/src/components/Markdown.d.ts +0 -8
- package/lib/typescript/src/components/Markdown.d.ts.map +0 -1
- package/lib/typescript/src/mappings/Markdown.d.ts +0 -20
- package/lib/typescript/src/mappings/Markdown.d.ts.map +0 -1
- package/src/components/Markdown.js +0 -10
- package/src/components/Markdown.tsx +0 -22
- package/src/mappings/Markdown.js +0 -25
- package/src/mappings/Markdown.ts +0 -32
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
export declare const SEED_DATA: {
|
|
2
|
+
name: string;
|
|
3
|
+
tag: string;
|
|
4
|
+
description: string;
|
|
5
|
+
category: string;
|
|
6
|
+
stylesPanelSections: string[];
|
|
7
|
+
props: {
|
|
8
|
+
disabled: {
|
|
9
|
+
label: string;
|
|
10
|
+
description: string;
|
|
11
|
+
group: string;
|
|
12
|
+
editable: boolean;
|
|
13
|
+
required: boolean;
|
|
14
|
+
formType: string;
|
|
15
|
+
propType: string;
|
|
16
|
+
defaultValue: null;
|
|
17
|
+
};
|
|
18
|
+
startColor: {
|
|
19
|
+
group: string;
|
|
20
|
+
label: string;
|
|
21
|
+
description: string;
|
|
22
|
+
editable: boolean;
|
|
23
|
+
required: boolean;
|
|
24
|
+
defaultValue: null;
|
|
25
|
+
formType: string;
|
|
26
|
+
propType: string;
|
|
27
|
+
};
|
|
28
|
+
endColor: {
|
|
29
|
+
group: string;
|
|
30
|
+
label: string;
|
|
31
|
+
description: string;
|
|
32
|
+
editable: boolean;
|
|
33
|
+
required: boolean;
|
|
34
|
+
defaultValue: null;
|
|
35
|
+
formType: string;
|
|
36
|
+
propType: string;
|
|
37
|
+
};
|
|
38
|
+
distance: {
|
|
39
|
+
label: string;
|
|
40
|
+
description: string;
|
|
41
|
+
formType: string;
|
|
42
|
+
propType: string;
|
|
43
|
+
group: string;
|
|
44
|
+
defaultValue: null;
|
|
45
|
+
editable: boolean;
|
|
46
|
+
required: boolean;
|
|
47
|
+
step: number;
|
|
48
|
+
};
|
|
49
|
+
paintInside: {
|
|
50
|
+
label: string;
|
|
51
|
+
description: string;
|
|
52
|
+
formType: string;
|
|
53
|
+
propType: string;
|
|
54
|
+
defaultValue: boolean;
|
|
55
|
+
editable: boolean;
|
|
56
|
+
required: boolean;
|
|
57
|
+
group: string;
|
|
58
|
+
};
|
|
59
|
+
stretch: {
|
|
60
|
+
label: string;
|
|
61
|
+
description: string;
|
|
62
|
+
formType: string;
|
|
63
|
+
propType: string;
|
|
64
|
+
defaultValue: boolean;
|
|
65
|
+
editable: boolean;
|
|
66
|
+
required: boolean;
|
|
67
|
+
group: string;
|
|
68
|
+
};
|
|
69
|
+
offsetX: {
|
|
70
|
+
label: string;
|
|
71
|
+
description: string;
|
|
72
|
+
formType: string;
|
|
73
|
+
propType: string;
|
|
74
|
+
group: string;
|
|
75
|
+
defaultValue: null;
|
|
76
|
+
editable: boolean;
|
|
77
|
+
required: boolean;
|
|
78
|
+
step: number;
|
|
79
|
+
};
|
|
80
|
+
offsetY: {
|
|
81
|
+
label: string;
|
|
82
|
+
description: string;
|
|
83
|
+
formType: string;
|
|
84
|
+
propType: string;
|
|
85
|
+
group: string;
|
|
86
|
+
defaultValue: null;
|
|
87
|
+
editable: boolean;
|
|
88
|
+
required: boolean;
|
|
89
|
+
step: number;
|
|
90
|
+
};
|
|
91
|
+
showShadowSideStart: {
|
|
92
|
+
label: string;
|
|
93
|
+
description: string;
|
|
94
|
+
formType: string;
|
|
95
|
+
propType: string;
|
|
96
|
+
defaultValue: boolean;
|
|
97
|
+
editable: boolean;
|
|
98
|
+
required: boolean;
|
|
99
|
+
group: string;
|
|
100
|
+
};
|
|
101
|
+
showShadowSideEnd: {
|
|
102
|
+
label: string;
|
|
103
|
+
description: string;
|
|
104
|
+
formType: string;
|
|
105
|
+
propType: string;
|
|
106
|
+
defaultValue: boolean;
|
|
107
|
+
editable: boolean;
|
|
108
|
+
required: boolean;
|
|
109
|
+
group: string;
|
|
110
|
+
};
|
|
111
|
+
showShadowSideTop: {
|
|
112
|
+
label: string;
|
|
113
|
+
description: string;
|
|
114
|
+
formType: string;
|
|
115
|
+
propType: string;
|
|
116
|
+
defaultValue: boolean;
|
|
117
|
+
editable: boolean;
|
|
118
|
+
required: boolean;
|
|
119
|
+
group: string;
|
|
120
|
+
};
|
|
121
|
+
showShadowSideBottom: {
|
|
122
|
+
label: string;
|
|
123
|
+
description: string;
|
|
124
|
+
formType: string;
|
|
125
|
+
propType: string;
|
|
126
|
+
defaultValue: boolean;
|
|
127
|
+
editable: boolean;
|
|
128
|
+
required: boolean;
|
|
129
|
+
group: string;
|
|
130
|
+
};
|
|
131
|
+
showShadowCornerTopStart: {
|
|
132
|
+
label: string;
|
|
133
|
+
description: string;
|
|
134
|
+
formType: string;
|
|
135
|
+
propType: string;
|
|
136
|
+
defaultValue: boolean;
|
|
137
|
+
editable: boolean;
|
|
138
|
+
required: boolean;
|
|
139
|
+
group: string;
|
|
140
|
+
};
|
|
141
|
+
showShadowCornerTopEnd: {
|
|
142
|
+
label: string;
|
|
143
|
+
description: string;
|
|
144
|
+
formType: string;
|
|
145
|
+
propType: string;
|
|
146
|
+
defaultValue: boolean;
|
|
147
|
+
editable: boolean;
|
|
148
|
+
required: boolean;
|
|
149
|
+
group: string;
|
|
150
|
+
};
|
|
151
|
+
showShadowCornerBottomStart: {
|
|
152
|
+
label: string;
|
|
153
|
+
description: string;
|
|
154
|
+
formType: string;
|
|
155
|
+
propType: string;
|
|
156
|
+
defaultValue: boolean;
|
|
157
|
+
editable: boolean;
|
|
158
|
+
required: boolean;
|
|
159
|
+
group: string;
|
|
160
|
+
};
|
|
161
|
+
showShadowCornerBottomEnd: {
|
|
162
|
+
label: string;
|
|
163
|
+
description: string;
|
|
164
|
+
formType: string;
|
|
165
|
+
propType: string;
|
|
166
|
+
defaultValue: boolean;
|
|
167
|
+
editable: boolean;
|
|
168
|
+
required: boolean;
|
|
169
|
+
group: string;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
//# sourceMappingURL=Shadow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Shadow.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Shadow.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqFrB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "46.8.2-
|
|
3
|
+
"version": "46.8.2-e0b610.2+e0b6100",
|
|
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.8.2-
|
|
44
|
+
"@draftbit/types": "^46.8.2-e0b610.2+e0b6100",
|
|
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",
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"lodash.omit": "^4.5.0",
|
|
55
55
|
"lodash.tonumber": "^4.0.3",
|
|
56
56
|
"react-native-deck-swiper": "^2.0.12",
|
|
57
|
-
"react-native-markdown-display": "^7.0.0-alpha.2",
|
|
58
57
|
"react-native-modal-datetime-picker": "^13.0.0",
|
|
58
|
+
"react-native-shadow-2": "^7.0.6",
|
|
59
59
|
"react-native-svg": "12.3.0",
|
|
60
60
|
"react-native-typography": "^1.4.1",
|
|
61
61
|
"react-native-web-swiper": "^2.2.3"
|
|
@@ -93,5 +93,5 @@
|
|
|
93
93
|
]
|
|
94
94
|
]
|
|
95
95
|
},
|
|
96
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "e0b61000d1889f05058ae29887cfb22e6cf0e3bd"
|
|
97
97
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Shadow as ShadowComponent } from "react-native-shadow-2";
|
|
3
|
+
const Shadow = ({ offsetX = 0, offsetY = 0, showShadowSideStart = true, showShadowSideEnd = true, showShadowSideTop = true, showShadowSideBottom = true, showShadowCornerTopStart = true, showShadowCornerTopEnd = true, showShadowCornerBottomStart = true, showShadowCornerBottomEnd = true, paintInside = false, style, ...rest }) => {
|
|
4
|
+
return (React.createElement(ShadowComponent, { offset: [offsetX, offsetY], sides: {
|
|
5
|
+
start: showShadowSideStart,
|
|
6
|
+
end: showShadowSideEnd,
|
|
7
|
+
top: showShadowSideTop,
|
|
8
|
+
bottom: showShadowSideBottom,
|
|
9
|
+
}, corners: {
|
|
10
|
+
topStart: showShadowCornerTopStart,
|
|
11
|
+
topEnd: showShadowCornerTopEnd,
|
|
12
|
+
bottomStart: showShadowCornerBottomStart,
|
|
13
|
+
bottomEnd: showShadowCornerBottomEnd,
|
|
14
|
+
}, containerStyle: style, paintInside: paintInside, ...rest }));
|
|
15
|
+
};
|
|
16
|
+
export default Shadow;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StyleProp, ViewStyle } from "react-native";
|
|
3
|
+
import { Shadow as ShadowComponent } from "react-native-shadow-2";
|
|
4
|
+
|
|
5
|
+
interface ShadowProps {
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
startColor?: string;
|
|
8
|
+
endColor?: string;
|
|
9
|
+
distance?: number;
|
|
10
|
+
paintInside?: boolean;
|
|
11
|
+
stretch?: boolean;
|
|
12
|
+
offsetX?: number;
|
|
13
|
+
offsetY?: number;
|
|
14
|
+
showShadowSideStart?: boolean;
|
|
15
|
+
showShadowSideEnd?: boolean;
|
|
16
|
+
showShadowSideTop?: boolean;
|
|
17
|
+
showShadowSideBottom?: boolean;
|
|
18
|
+
showShadowCornerTopStart?: boolean;
|
|
19
|
+
showShadowCornerTopEnd?: boolean;
|
|
20
|
+
showShadowCornerBottomStart?: boolean;
|
|
21
|
+
showShadowCornerBottomEnd?: boolean;
|
|
22
|
+
style?: StyleProp<ViewStyle>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const Shadow: React.FC<React.PropsWithChildren<ShadowProps>> = ({
|
|
26
|
+
offsetX = 0,
|
|
27
|
+
offsetY = 0,
|
|
28
|
+
showShadowSideStart = true,
|
|
29
|
+
showShadowSideEnd = true,
|
|
30
|
+
showShadowSideTop = true,
|
|
31
|
+
showShadowSideBottom = true,
|
|
32
|
+
showShadowCornerTopStart = true,
|
|
33
|
+
showShadowCornerTopEnd = true,
|
|
34
|
+
showShadowCornerBottomStart = true,
|
|
35
|
+
showShadowCornerBottomEnd = true,
|
|
36
|
+
paintInside = false,
|
|
37
|
+
style,
|
|
38
|
+
...rest
|
|
39
|
+
}) => {
|
|
40
|
+
return (
|
|
41
|
+
<ShadowComponent
|
|
42
|
+
offset={[offsetX, offsetY]}
|
|
43
|
+
sides={{
|
|
44
|
+
start: showShadowSideStart,
|
|
45
|
+
end: showShadowSideEnd,
|
|
46
|
+
top: showShadowSideTop,
|
|
47
|
+
bottom: showShadowSideBottom,
|
|
48
|
+
}}
|
|
49
|
+
corners={{
|
|
50
|
+
topStart: showShadowCornerTopStart,
|
|
51
|
+
topEnd: showShadowCornerTopEnd,
|
|
52
|
+
bottomStart: showShadowCornerBottomStart,
|
|
53
|
+
bottomEnd: showShadowCornerBottomEnd,
|
|
54
|
+
}}
|
|
55
|
+
containerStyle={style}
|
|
56
|
+
paintInside={paintInside}
|
|
57
|
+
{...rest}
|
|
58
|
+
/>
|
|
59
|
+
);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export default Shadow;
|
package/src/index.js
CHANGED
|
@@ -31,8 +31,8 @@ export { ActionSheet, ActionSheetItem, ActionSheetCancel, } from "./components/A
|
|
|
31
31
|
export { Swiper, SwiperItem } from "./components/Swiper";
|
|
32
32
|
export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
|
|
33
33
|
export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
|
|
34
|
+
export { default as Shadow } from "./components/Shadow";
|
|
34
35
|
export { DeckSwiper, DeckSwiperCard } from "./components/DeckSwiper";
|
|
35
|
-
export { default as Markdown } from "./components/Markdown";
|
|
36
36
|
/* Deprecated: Fix or Delete! */
|
|
37
37
|
export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
38
38
|
export { default as Picker } from "./components/Picker/Picker";
|
package/src/index.tsx
CHANGED
|
@@ -51,9 +51,9 @@ export {
|
|
|
51
51
|
RadioButtonFieldGroup,
|
|
52
52
|
} from "./components/RadioButton/index";
|
|
53
53
|
|
|
54
|
-
export {
|
|
54
|
+
export { default as Shadow } from "./components/Shadow";
|
|
55
55
|
|
|
56
|
-
export {
|
|
56
|
+
export { DeckSwiper, DeckSwiperCard } from "./components/DeckSwiper";
|
|
57
57
|
|
|
58
58
|
/* Deprecated: Fix or Delete! */
|
|
59
59
|
export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
@@ -0,0 +1,87 @@
|
|
|
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",
|
|
5
|
+
description: "A cross-platform, universal shadow.",
|
|
6
|
+
category: COMPONENT_TYPES.view,
|
|
7
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
8
|
+
props: {
|
|
9
|
+
disabled: createDisabledProp({
|
|
10
|
+
description: "Disables the shadow.",
|
|
11
|
+
}),
|
|
12
|
+
startColor: createColorProp({
|
|
13
|
+
label: "Start Color",
|
|
14
|
+
description: "The initial gradient color of the shadow.",
|
|
15
|
+
defaultValue: null,
|
|
16
|
+
}),
|
|
17
|
+
endColor: createColorProp({
|
|
18
|
+
label: "End Color",
|
|
19
|
+
description: "The final gradient color of the shadow.",
|
|
20
|
+
defaultValue: null,
|
|
21
|
+
}),
|
|
22
|
+
distance: createStaticNumberProp({
|
|
23
|
+
label: "Distance",
|
|
24
|
+
description: "The distance of the shadow.",
|
|
25
|
+
}),
|
|
26
|
+
paintInside: createStaticBoolProp({
|
|
27
|
+
label: "Paint Inside",
|
|
28
|
+
description: "Apply the shadow below/inside the content.",
|
|
29
|
+
defaultValue: false,
|
|
30
|
+
}),
|
|
31
|
+
stretch: createStaticBoolProp({
|
|
32
|
+
label: "Stretch",
|
|
33
|
+
description: "Force children to occupy all available horizontal space.",
|
|
34
|
+
defaultValue: null,
|
|
35
|
+
}),
|
|
36
|
+
offsetX: createStaticNumberProp({
|
|
37
|
+
label: "Offset X",
|
|
38
|
+
description: "Moves the shadow in the x direction",
|
|
39
|
+
defeaultValue: 0,
|
|
40
|
+
}),
|
|
41
|
+
offsetY: createStaticNumberProp({
|
|
42
|
+
label: "Offset Y",
|
|
43
|
+
description: "Moves the shadow in the y direction",
|
|
44
|
+
defeaultValue: 0,
|
|
45
|
+
}),
|
|
46
|
+
showShadowSideStart: createStaticBoolProp({
|
|
47
|
+
label: "Show Shadow Start",
|
|
48
|
+
description: "Whether to show shadow on the start side or not",
|
|
49
|
+
defaultValue: true,
|
|
50
|
+
}),
|
|
51
|
+
showShadowSideEnd: createStaticBoolProp({
|
|
52
|
+
label: "Show Shadow End",
|
|
53
|
+
description: "Whether to show shadow on the end side or not",
|
|
54
|
+
defaultValue: true,
|
|
55
|
+
}),
|
|
56
|
+
showShadowSideTop: createStaticBoolProp({
|
|
57
|
+
label: "Show Shadow Top",
|
|
58
|
+
description: "Whether to show shadow on the top side or not",
|
|
59
|
+
defaultValue: true,
|
|
60
|
+
}),
|
|
61
|
+
showShadowSideBottom: createStaticBoolProp({
|
|
62
|
+
label: "Show Shadow Bottom",
|
|
63
|
+
description: "Whether to show shadow on the bottom side or not",
|
|
64
|
+
defaultValue: true,
|
|
65
|
+
}),
|
|
66
|
+
showShadowCornerTopStart: createStaticBoolProp({
|
|
67
|
+
label: "Show Shadow Top Start Corner",
|
|
68
|
+
description: "Whether to show shadow on the top start corner or not",
|
|
69
|
+
defaultValue: true,
|
|
70
|
+
}),
|
|
71
|
+
showShadowCornerTopEnd: createStaticBoolProp({
|
|
72
|
+
label: "Show Shadow Top End Corner",
|
|
73
|
+
description: "Whether to show shadow on the top end corner or not",
|
|
74
|
+
defaultValue: true,
|
|
75
|
+
}),
|
|
76
|
+
showShadowCornerBottomStart: createStaticBoolProp({
|
|
77
|
+
label: "Show Shadow Bottom Start Corner",
|
|
78
|
+
description: "Whether to show shadow on the bottom start corner or not",
|
|
79
|
+
defaultValue: true,
|
|
80
|
+
}),
|
|
81
|
+
showShadowCornerBottomEnd: createStaticBoolProp({
|
|
82
|
+
label: "Show Shadow Bottom End Corner",
|
|
83
|
+
description: "Whether to show shadow on the bottom end corner or not",
|
|
84
|
+
defaultValue: true,
|
|
85
|
+
}),
|
|
86
|
+
},
|
|
87
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
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",
|
|
13
|
+
description: "A cross-platform, universal shadow.",
|
|
14
|
+
category: COMPONENT_TYPES.view,
|
|
15
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
16
|
+
props: {
|
|
17
|
+
disabled: createDisabledProp({
|
|
18
|
+
description: "Disables the shadow.",
|
|
19
|
+
}),
|
|
20
|
+
startColor: createColorProp({
|
|
21
|
+
label: "Start Color",
|
|
22
|
+
description: "The initial gradient color of the shadow.",
|
|
23
|
+
defaultValue: null,
|
|
24
|
+
}),
|
|
25
|
+
endColor: createColorProp({
|
|
26
|
+
label: "End Color",
|
|
27
|
+
description: "The final gradient color of the shadow.",
|
|
28
|
+
defaultValue: null,
|
|
29
|
+
}),
|
|
30
|
+
distance: createStaticNumberProp({
|
|
31
|
+
label: "Distance",
|
|
32
|
+
description: "The distance of the shadow.",
|
|
33
|
+
}),
|
|
34
|
+
paintInside: createStaticBoolProp({
|
|
35
|
+
label: "Paint Inside",
|
|
36
|
+
description: "Apply the shadow below/inside the content.",
|
|
37
|
+
defaultValue: false,
|
|
38
|
+
}),
|
|
39
|
+
stretch: createStaticBoolProp({
|
|
40
|
+
label: "Stretch",
|
|
41
|
+
description: "Force children to occupy all available horizontal space.",
|
|
42
|
+
defaultValue: null,
|
|
43
|
+
}),
|
|
44
|
+
offsetX: createStaticNumberProp({
|
|
45
|
+
label: "Offset X",
|
|
46
|
+
description: "Moves the shadow in the x direction",
|
|
47
|
+
defeaultValue: 0,
|
|
48
|
+
}),
|
|
49
|
+
offsetY: createStaticNumberProp({
|
|
50
|
+
label: "Offset Y",
|
|
51
|
+
description: "Moves the shadow in the y direction",
|
|
52
|
+
defeaultValue: 0,
|
|
53
|
+
}),
|
|
54
|
+
showShadowSideStart: createStaticBoolProp({
|
|
55
|
+
label: "Show Shadow Start",
|
|
56
|
+
description: "Whether to show shadow on the start side or not",
|
|
57
|
+
defaultValue: true,
|
|
58
|
+
}),
|
|
59
|
+
showShadowSideEnd: createStaticBoolProp({
|
|
60
|
+
label: "Show Shadow End",
|
|
61
|
+
description: "Whether to show shadow on the end side or not",
|
|
62
|
+
defaultValue: true,
|
|
63
|
+
}),
|
|
64
|
+
showShadowSideTop: createStaticBoolProp({
|
|
65
|
+
label: "Show Shadow Top",
|
|
66
|
+
description: "Whether to show shadow on the top side or not",
|
|
67
|
+
defaultValue: true,
|
|
68
|
+
}),
|
|
69
|
+
showShadowSideBottom: createStaticBoolProp({
|
|
70
|
+
label: "Show Shadow Bottom",
|
|
71
|
+
description: "Whether to show shadow on the bottom side or not",
|
|
72
|
+
defaultValue: true,
|
|
73
|
+
}),
|
|
74
|
+
showShadowCornerTopStart: createStaticBoolProp({
|
|
75
|
+
label: "Show Shadow Top Start Corner",
|
|
76
|
+
description: "Whether to show shadow on the top start corner or not",
|
|
77
|
+
defaultValue: true,
|
|
78
|
+
}),
|
|
79
|
+
showShadowCornerTopEnd: createStaticBoolProp({
|
|
80
|
+
label: "Show Shadow Top End Corner",
|
|
81
|
+
description: "Whether to show shadow on the top end corner or not",
|
|
82
|
+
defaultValue: true,
|
|
83
|
+
}),
|
|
84
|
+
showShadowCornerBottomStart: createStaticBoolProp({
|
|
85
|
+
label: "Show Shadow Bottom Start Corner",
|
|
86
|
+
description: "Whether to show shadow on the bottom start corner or not",
|
|
87
|
+
defaultValue: true,
|
|
88
|
+
}),
|
|
89
|
+
showShadowCornerBottomEnd: createStaticBoolProp({
|
|
90
|
+
label: "Show Shadow Bottom End Corner",
|
|
91
|
+
description: "Whether to show shadow on the bottom end corner or not",
|
|
92
|
+
defaultValue: true,
|
|
93
|
+
}),
|
|
94
|
+
},
|
|
95
|
+
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var React = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _reactNativeMarkdownDisplay = _interopRequireDefault(require("react-native-markdown-display"));
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
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); }
|
|
12
|
-
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; }
|
|
13
|
-
const Markdown = _ref => {
|
|
14
|
-
let {
|
|
15
|
-
children,
|
|
16
|
-
style
|
|
17
|
-
} = _ref;
|
|
18
|
-
return (
|
|
19
|
-
/*#__PURE__*/
|
|
20
|
-
//'body' style applies to all markdown components
|
|
21
|
-
//@ts-ignore TS does not like the type of this named style for some reason
|
|
22
|
-
React.createElement(_reactNativeMarkdownDisplay.default, {
|
|
23
|
-
style: {
|
|
24
|
-
body: _reactNative.StyleSheet.flatten(style)
|
|
25
|
-
}
|
|
26
|
-
}, children)
|
|
27
|
-
);
|
|
28
|
-
};
|
|
29
|
-
var _default = Markdown;
|
|
30
|
-
exports.default = _default;
|
|
@@ -1,27 +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: "Markdown",
|
|
10
|
-
tag: "Markdown",
|
|
11
|
-
description: "A component that renders markdown",
|
|
12
|
-
category: _types.COMPONENT_TYPES.text,
|
|
13
|
-
stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.LayoutSelectedItem, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Effects],
|
|
14
|
-
props: {
|
|
15
|
-
children: {
|
|
16
|
-
group: _types.GROUPS.data,
|
|
17
|
-
label: "Markdown Text",
|
|
18
|
-
description: "Markdown text to be rendered ",
|
|
19
|
-
editable: true,
|
|
20
|
-
required: true,
|
|
21
|
-
formType: _types.FORM_TYPES.string,
|
|
22
|
-
propType: _types.PROP_TYPES.STRING,
|
|
23
|
-
defaultValue: "### Markdown"
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
exports.SEED_DATA = SEED_DATA;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { StyleSheet } from "react-native";
|
|
3
|
-
import MarkdownComponent from "react-native-markdown-display";
|
|
4
|
-
const Markdown = _ref => {
|
|
5
|
-
let {
|
|
6
|
-
children,
|
|
7
|
-
style
|
|
8
|
-
} = _ref;
|
|
9
|
-
return (
|
|
10
|
-
/*#__PURE__*/
|
|
11
|
-
//'body' style applies to all markdown components
|
|
12
|
-
//@ts-ignore TS does not like the type of this named style for some reason
|
|
13
|
-
React.createElement(MarkdownComponent, {
|
|
14
|
-
style: {
|
|
15
|
-
body: StyleSheet.flatten(style)
|
|
16
|
-
}
|
|
17
|
-
}, children)
|
|
18
|
-
);
|
|
19
|
-
};
|
|
20
|
-
export default Markdown;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, FORM_TYPES, GROUPS, PROP_TYPES, StylesPanelSections } from "@draftbit/types";
|
|
2
|
-
export const SEED_DATA = {
|
|
3
|
-
name: "Markdown",
|
|
4
|
-
tag: "Markdown",
|
|
5
|
-
description: "A component that renders markdown",
|
|
6
|
-
category: COMPONENT_TYPES.text,
|
|
7
|
-
stylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.LayoutSelectedItem, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Effects],
|
|
8
|
-
props: {
|
|
9
|
-
children: {
|
|
10
|
-
group: GROUPS.data,
|
|
11
|
-
label: "Markdown Text",
|
|
12
|
-
description: "Markdown text to be rendered ",
|
|
13
|
-
editable: true,
|
|
14
|
-
required: true,
|
|
15
|
-
formType: FORM_TYPES.string,
|
|
16
|
-
propType: PROP_TYPES.STRING,
|
|
17
|
-
defaultValue: "### Markdown"
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { StyleProp, ViewStyle } from "react-native";
|
|
3
|
-
declare type MarkdownProps = {
|
|
4
|
-
style?: StyleProp<ViewStyle>;
|
|
5
|
-
};
|
|
6
|
-
declare const Markdown: React.FC<React.PropsWithChildren<MarkdownProps>>;
|
|
7
|
-
export default Markdown;
|
|
8
|
-
//# sourceMappingURL=Markdown.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../../src/components/Markdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAc,MAAM,cAAc,CAAC;AAGhE,aAAK,aAAa,GAAG;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC;AAEF,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAW9D,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export declare const SEED_DATA: {
|
|
2
|
-
name: string;
|
|
3
|
-
tag: string;
|
|
4
|
-
description: string;
|
|
5
|
-
category: string;
|
|
6
|
-
stylesPanelSections: string[];
|
|
7
|
-
props: {
|
|
8
|
-
children: {
|
|
9
|
-
group: string;
|
|
10
|
-
label: string;
|
|
11
|
-
description: string;
|
|
12
|
-
editable: boolean;
|
|
13
|
-
required: boolean;
|
|
14
|
-
formType: string;
|
|
15
|
-
propType: string;
|
|
16
|
-
defaultValue: string;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=Markdown.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Markdown.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;CAuBrB,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { StyleSheet } from "react-native";
|
|
3
|
-
import MarkdownComponent from "react-native-markdown-display";
|
|
4
|
-
const Markdown = ({ children, style, }) => {
|
|
5
|
-
return (
|
|
6
|
-
//'body' style applies to all markdown components
|
|
7
|
-
//@ts-ignore TS does not like the type of this named style for some reason
|
|
8
|
-
React.createElement(MarkdownComponent, { style: { body: StyleSheet.flatten(style) } }, children));
|
|
9
|
-
};
|
|
10
|
-
export default Markdown;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { StyleProp, ViewStyle, StyleSheet } from "react-native";
|
|
3
|
-
import MarkdownComponent from "react-native-markdown-display";
|
|
4
|
-
|
|
5
|
-
type MarkdownProps = {
|
|
6
|
-
style?: StyleProp<ViewStyle>;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
const Markdown: React.FC<React.PropsWithChildren<MarkdownProps>> = ({
|
|
10
|
-
children,
|
|
11
|
-
style,
|
|
12
|
-
}) => {
|
|
13
|
-
return (
|
|
14
|
-
//'body' style applies to all markdown components
|
|
15
|
-
//@ts-ignore TS does not like the type of this named style for some reason
|
|
16
|
-
<MarkdownComponent style={{ body: StyleSheet.flatten(style) }}>
|
|
17
|
-
{children}
|
|
18
|
-
</MarkdownComponent>
|
|
19
|
-
);
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export default Markdown;
|