@draftbit/core 46.8.2-81337b.2 → 46.8.2-877fc5.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/DeprecatedCardWrapper.js +1 -15
- package/lib/commonjs/components/Markdown.js +30 -0
- package/lib/commonjs/components/Shadow.js +46 -0
- package/lib/commonjs/components/TabView/TabView.js +22 -6
- package/lib/commonjs/index.js +14 -0
- package/lib/commonjs/mappings/FlashList.js +2 -8
- package/lib/commonjs/mappings/Markdown.js +27 -0
- package/lib/commonjs/mappings/Shadow.js +102 -0
- package/lib/commonjs/mappings/TabView.js +2 -2
- package/lib/commonjs/styles/overlay.js +3 -1
- package/lib/commonjs/utilities.js +2 -1
- package/lib/module/components/Markdown.js +20 -0
- package/lib/module/components/Shadow.js +38 -0
- package/lib/module/components/TabView/TabView.js +22 -5
- package/lib/module/index.js +2 -0
- package/lib/module/mappings/FlashList.js +3 -9
- package/lib/module/mappings/Markdown.js +20 -0
- package/lib/module/mappings/Shadow.js +95 -0
- package/lib/module/mappings/TabView.js +3 -3
- package/lib/typescript/src/components/Markdown.d.ts +8 -0
- package/lib/typescript/src/components/Markdown.d.ts.map +1 -0
- 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/components/TabView/TabView.d.ts.map +1 -1
- package/lib/typescript/src/components/TabView/TabViewItem.d.ts +1 -1
- package/lib/typescript/src/components/TabView/TabViewItem.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +2 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mappings/FlashList.d.ts +0 -6
- package/lib/typescript/src/mappings/FlashList.d.ts.map +1 -1
- package/lib/typescript/src/mappings/Markdown.d.ts +20 -0
- package/lib/typescript/src/mappings/Markdown.d.ts.map +1 -0
- package/lib/typescript/src/mappings/Shadow.d.ts +173 -0
- package/lib/typescript/src/mappings/Shadow.d.ts.map +1 -0
- package/lib/typescript/src/mappings/TabView.d.ts.map +1 -1
- package/package.json +5 -3
- package/src/components/Markdown.js +10 -0
- package/src/components/Markdown.tsx +22 -0
- package/src/components/Shadow.js +16 -0
- package/src/components/Shadow.tsx +62 -0
- package/src/components/TabView/TabView.js +16 -7
- package/src/components/TabView/TabView.tsx +25 -7
- package/src/components/TabView/TabViewItem.tsx +1 -1
- package/src/index.js +2 -0
- package/src/index.tsx +3 -0
- package/src/mappings/FlashList.js +9 -9
- package/src/mappings/FlashList.ts +9 -9
- package/src/mappings/Markdown.js +25 -0
- package/src/mappings/Markdown.ts +32 -0
- package/src/mappings/Shadow.js +95 -0
- package/src/mappings/Shadow.ts +104 -0
- package/src/mappings/TabView.js +8 -3
- package/src/mappings/TabView.ts +7 -3
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, CONTAINER_COMPONENT_STYLES_SECTIONS, createColorProp, createStaticNumberProp, createStaticBoolProp, createDisabledProp, GROUPS } 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
|
+
group: GROUPS.advanced
|
|
51
|
+
}),
|
|
52
|
+
showShadowSideEnd: createStaticBoolProp({
|
|
53
|
+
label: "Show Shadow End",
|
|
54
|
+
description: "Whether to show shadow on the end side or not",
|
|
55
|
+
defaultValue: true,
|
|
56
|
+
group: GROUPS.advanced
|
|
57
|
+
}),
|
|
58
|
+
showShadowSideTop: createStaticBoolProp({
|
|
59
|
+
label: "Show Shadow Top",
|
|
60
|
+
description: "Whether to show shadow on the top side or not",
|
|
61
|
+
defaultValue: true,
|
|
62
|
+
group: GROUPS.advanced
|
|
63
|
+
}),
|
|
64
|
+
showShadowSideBottom: createStaticBoolProp({
|
|
65
|
+
label: "Show Shadow Bottom",
|
|
66
|
+
description: "Whether to show shadow on the bottom side or not",
|
|
67
|
+
defaultValue: true,
|
|
68
|
+
group: GROUPS.advanced
|
|
69
|
+
}),
|
|
70
|
+
showShadowCornerTopStart: createStaticBoolProp({
|
|
71
|
+
label: "Show Shadow Top Start Corner",
|
|
72
|
+
description: "Whether to show shadow on the top start corner or not",
|
|
73
|
+
defaultValue: true,
|
|
74
|
+
group: GROUPS.advanced
|
|
75
|
+
}),
|
|
76
|
+
showShadowCornerTopEnd: createStaticBoolProp({
|
|
77
|
+
label: "Show Shadow Top End Corner",
|
|
78
|
+
description: "Whether to show shadow on the top end corner or not",
|
|
79
|
+
defaultValue: true,
|
|
80
|
+
group: GROUPS.advanced
|
|
81
|
+
}),
|
|
82
|
+
showShadowCornerBottomStart: createStaticBoolProp({
|
|
83
|
+
label: "Show Shadow Bottom Start Corner",
|
|
84
|
+
description: "Whether to show shadow on the bottom start corner or not",
|
|
85
|
+
defaultValue: true,
|
|
86
|
+
group: GROUPS.advanced
|
|
87
|
+
}),
|
|
88
|
+
showShadowCornerBottomEnd: createStaticBoolProp({
|
|
89
|
+
label: "Show Shadow Bottom End Corner",
|
|
90
|
+
description: "Whether to show shadow on the bottom end corner or not",
|
|
91
|
+
defaultValue: true,
|
|
92
|
+
group: GROUPS.advanced
|
|
93
|
+
})
|
|
94
|
+
}
|
|
95
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createTextEnumProp, createColorProp,
|
|
1
|
+
import { COMPONENT_TYPES, createTextEnumProp, createColorProp, StylesPanelSections, Triggers, createActionProp, createStaticBoolProp, GROUPS } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "Tab View",
|
|
4
4
|
tag: "TabView",
|
|
5
5
|
description: "Tab view container",
|
|
6
6
|
category: COMPONENT_TYPES.swiper,
|
|
7
|
-
stylesPanelSections: [
|
|
7
|
+
stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position, StylesPanelSections.Effects, StylesPanelSections.LayoutSelectedItem, StylesPanelSections.Background, StylesPanelSections.Typography],
|
|
8
8
|
triggers: [Triggers.OnIndexChanged, Triggers.OnEndReached],
|
|
9
9
|
props: {
|
|
10
10
|
onIndexChanged: createActionProp({
|
|
@@ -33,7 +33,7 @@ export const SEED_DATA = {
|
|
|
33
33
|
defaultValue: true
|
|
34
34
|
}),
|
|
35
35
|
scrollEnabled: createStaticBoolProp({
|
|
36
|
-
label: "Scroll Enabled",
|
|
36
|
+
label: "Tab Scroll Enabled",
|
|
37
37
|
description: "Whether scrolling of tabs is enabled or not",
|
|
38
38
|
defaultValue: false
|
|
39
39
|
}),
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StyleProp, ViewStyle } from "react-native";
|
|
3
|
+
interface ShadowProps {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
startColor?: string;
|
|
6
|
+
endColor?: string;
|
|
7
|
+
distance?: number;
|
|
8
|
+
paintInside?: boolean;
|
|
9
|
+
stretch?: boolean;
|
|
10
|
+
offsetX?: number;
|
|
11
|
+
offsetY?: number;
|
|
12
|
+
showShadowSideStart?: boolean;
|
|
13
|
+
showShadowSideEnd?: boolean;
|
|
14
|
+
showShadowSideTop?: boolean;
|
|
15
|
+
showShadowSideBottom?: boolean;
|
|
16
|
+
showShadowCornerTopStart?: boolean;
|
|
17
|
+
showShadowCornerTopEnd?: boolean;
|
|
18
|
+
showShadowCornerBottomStart?: boolean;
|
|
19
|
+
showShadowCornerBottomEnd?: boolean;
|
|
20
|
+
style?: StyleProp<ViewStyle>;
|
|
21
|
+
}
|
|
22
|
+
declare const Shadow: React.FC<React.PropsWithChildren<ShadowProps>>;
|
|
23
|
+
export default Shadow;
|
|
24
|
+
//# sourceMappingURL=Shadow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Shadow.d.ts","sourceRoot":"","sources":["../../../../src/components/Shadow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpD,UAAU,WAAW;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAmC1D,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabView.d.ts","sourceRoot":"","sources":["../../../../../src/components/TabView/TabView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAWpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"TabView.d.ts","sourceRoot":"","sources":["../../../../../src/components/TabView/TabView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAWpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAMvD,aAAK,cAAc,GAAG,KAAK,GAAG,QAAQ,CAAC;AACvC,aAAK,mBAAmB,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;AAEvD,aAAK,YAAY,GAAG;IAClB,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,KAAK,EAAE,KAAK,CAAC;CACd,GAAG,QAAQ,CAAC;;;;AA6Gb,wBAA2C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabViewItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/TabView/TabViewItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAoB,MAAM,cAAc,CAAC;AAGtE,
|
|
1
|
+
{"version":3,"file":"TabViewItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/TabView/TabViewItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAoB,MAAM,cAAc,CAAC;AAGtE,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAKpE,CAAC;AAQF,eAAe,WAAW,CAAC"}
|
|
@@ -31,8 +31,10 @@ 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
36
|
export { TabView, TabViewItem } from "./components/TabView";
|
|
37
|
+
export { default as Markdown } from "./components/Markdown";
|
|
36
38
|
export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
37
39
|
export { default as Picker } from "./components/Picker/Picker";
|
|
38
40
|
export { default as ProgressBar } from "./components/ProgressBar";
|
|
@@ -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,QAAQ,EAAE,aAAa,EAAE,WAAW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AM,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"}
|
|
@@ -5,9 +5,6 @@ export declare const SEED_DATA: ({
|
|
|
5
5
|
packageName: string;
|
|
6
6
|
category: string;
|
|
7
7
|
stylesPanelSections: string[];
|
|
8
|
-
layout: {
|
|
9
|
-
flex: number;
|
|
10
|
-
};
|
|
11
8
|
triggers: string[];
|
|
12
9
|
props: {
|
|
13
10
|
onRefresh: {
|
|
@@ -113,9 +110,6 @@ export declare const SEED_DATA: ({
|
|
|
113
110
|
packageName: string;
|
|
114
111
|
category: string;
|
|
115
112
|
stylesPanelSections: string[];
|
|
116
|
-
layout: {
|
|
117
|
-
flex: number;
|
|
118
|
-
};
|
|
119
113
|
triggers: string[];
|
|
120
114
|
props: {
|
|
121
115
|
onRefresh: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlashList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlashList.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"FlashList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlashList.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqHrB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Markdown.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;CAuBrB,CAAC"}
|
|
@@ -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":"AAUA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6FrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabView.d.ts","sourceRoot":"","sources":["../../../../src/mappings/TabView.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TabView.d.ts","sourceRoot":"","sources":["../../../../src/mappings/TabView.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyErB,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-877fc5.2+877fc57",
|
|
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-877fc5.2+877fc57",
|
|
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,10 @@
|
|
|
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",
|
|
57
58
|
"react-native-modal-datetime-picker": "^13.0.0",
|
|
58
59
|
"react-native-pager-view": "5.4.24",
|
|
60
|
+
"react-native-shadow-2": "^7.0.6",
|
|
59
61
|
"react-native-svg": "12.3.0",
|
|
60
62
|
"react-native-tab-view": "^3.4.0",
|
|
61
63
|
"react-native-typography": "^1.4.1",
|
|
@@ -94,5 +96,5 @@
|
|
|
94
96
|
]
|
|
95
97
|
]
|
|
96
98
|
},
|
|
97
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "877fc579598a9ddfeb2d1096939c0b24d920f823"
|
|
98
100
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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;
|
|
@@ -0,0 +1,22 @@
|
|
|
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;
|
|
@@ -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;
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { TabView, TabBar, SceneMap, } from "react-native-tab-view";
|
|
3
|
-
import TabViewItem from "./TabViewItem";
|
|
4
3
|
import { withTheme } from "../../theming";
|
|
4
|
+
import { extractStyles } from "../../utilities";
|
|
5
5
|
const TabViewComponent = ({ Icon, onIndexChanged, onEndReached, tabBarPosition, keyboardDismissMode, swipeEnabled, scrollEnabled, activeColor, inactiveColor, pressColor, indicatorColor, tabsBackgroundColor, style, theme, children, }) => {
|
|
6
6
|
const [index, setIndex] = React.useState(0);
|
|
7
7
|
const [routes, setRoutes] = React.useState([]);
|
|
8
8
|
const [tabScenes, setTabScenes] = React.useState({});
|
|
9
|
+
const { textStyles, viewStyles } = extractStyles(style);
|
|
10
|
+
//Check type of child using props
|
|
11
|
+
//Regular '.type' cannot work because Draftbit strips the type in Draft view
|
|
12
|
+
const instanceOfTabViewItemProps = (object) => {
|
|
13
|
+
return "title" in object;
|
|
14
|
+
};
|
|
9
15
|
//Populate routes and scenes based on children
|
|
10
16
|
React.useEffect(() => {
|
|
11
17
|
const newRoutes = [];
|
|
12
18
|
const scenes = {};
|
|
13
19
|
React.Children.toArray(children)
|
|
14
|
-
.filter((child) => React.isValidElement(child) && child.
|
|
20
|
+
.filter((child) => React.isValidElement(child) && instanceOfTabViewItemProps(child.props))
|
|
15
21
|
.forEach((item, idx) => {
|
|
16
22
|
const child = item;
|
|
17
23
|
newRoutes.push({
|
|
@@ -35,11 +41,14 @@ const TabViewComponent = ({ Icon, onIndexChanged, onEndReached, tabBarPosition,
|
|
|
35
41
|
const renderTabBar = (props) => {
|
|
36
42
|
return (React.createElement(TabBar, { ...props, activeColor: activeColor || theme.colors.primary, inactiveColor: inactiveColor || theme.colors.divider, pressColor: pressColor || theme.colors.primary, scrollEnabled: scrollEnabled, indicatorStyle: {
|
|
37
43
|
backgroundColor: indicatorColor || theme.colors.primary,
|
|
38
|
-
}, renderIcon: ({ route, color }) => (route === null || route === void 0 ? void 0 : route.icon) ? (React.createElement(Icon, { name: route.icon, color: color, size:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
] }));
|
|
44
|
+
}, labelStyle: textStyles, renderIcon: ({ route, color }) => (route === null || route === void 0 ? void 0 : route.icon) ? (React.createElement(Icon, { name: route.icon, color: color, size: 16 })) : null, style: {
|
|
45
|
+
backgroundColor: tabsBackgroundColor || theme.colors.background,
|
|
46
|
+
} }));
|
|
42
47
|
};
|
|
43
|
-
|
|
48
|
+
//Cannot render TabView without at least one tab
|
|
49
|
+
if (!routes.length) {
|
|
50
|
+
return React.createElement(React.Fragment, null);
|
|
51
|
+
}
|
|
52
|
+
return (React.createElement(TabView, { style: [viewStyles], navigationState: { index, routes }, renderScene: SceneMap(tabScenes), renderTabBar: renderTabBar, onIndexChange: indexChangeHandler, tabBarPosition: tabBarPosition, keyboardDismissMode: keyboardDismissMode, swipeEnabled: swipeEnabled }));
|
|
44
53
|
};
|
|
45
54
|
export default withTheme(TabViewComponent);
|