@draftbit/core 46.8.1-a386d4.2 → 46.8.1-ae3332.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/Accordion/AccordionItem.js +23 -4
- package/lib/commonjs/components/DeckSwiper/DeckSwiper.js +38 -4
- package/lib/commonjs/components/Picker/Picker.js +8 -9
- package/lib/commonjs/components/ScreenContainer.js +2 -1
- package/lib/commonjs/index.js +0 -7
- package/lib/commonjs/mappings/Accordion.js +1 -0
- package/lib/commonjs/mappings/AccordionItem.js +1 -0
- package/lib/commonjs/mappings/ActionSheet.js +1 -0
- package/lib/commonjs/mappings/ActionSheetCancel.js +1 -0
- package/lib/commonjs/mappings/ActionSheetItem.js +1 -0
- package/lib/commonjs/mappings/LinearGradient.js +1 -0
- package/lib/commonjs/mappings/MapCallout.js +1 -0
- package/lib/commonjs/mappings/MapMarker.js +1 -0
- package/lib/commonjs/mappings/MapView.js +1 -0
- package/lib/commonjs/mappings/Swiper.js +1 -0
- package/lib/commonjs/mappings/SwiperItem.js +2 -1
- package/lib/commonjs/mappings/TextArea.js +1 -0
- package/lib/commonjs/mappings/TextField.js +1 -0
- package/lib/module/components/DeckSwiper/DeckSwiper.js +38 -4
- package/lib/module/components/NumberInput.js +3 -11
- package/lib/module/components/Picker/Picker.js +8 -9
- package/lib/module/components/Picker/PickerComponent.ios.js +36 -11
- package/lib/module/components/Portal/PortalHost.js +45 -15
- package/lib/module/components/ScreenContainer.js +2 -1
- package/lib/module/components/Switch.js +21 -10
- package/lib/module/index.js +0 -1
- package/lib/module/mappings/Accordion.js +2 -1
- package/lib/module/mappings/AccordionItem.js +2 -1
- package/lib/module/mappings/ActionSheet.js +2 -1
- package/lib/module/mappings/ActionSheetCancel.js +2 -1
- package/lib/module/mappings/ActionSheetItem.js +2 -1
- package/lib/module/mappings/LinearGradient.js +2 -1
- package/lib/module/mappings/MapCallout.js +2 -1
- package/lib/module/mappings/MapMarker.js +2 -1
- package/lib/module/mappings/MapView.js +2 -1
- package/lib/module/mappings/Swiper.js +2 -1
- package/lib/module/mappings/SwiperItem.js +3 -2
- package/lib/module/mappings/TextArea.js +2 -1
- package/lib/module/mappings/TextField.js +1 -0
- package/lib/typescript/src/components/DeckSwiper/DeckSwiper.d.ts +8 -2
- package/lib/typescript/src/components/DeckSwiper/DeckSwiper.d.ts.map +1 -1
- package/lib/typescript/src/components/DeckSwiper/DeckSwiperCard.d.ts +2 -3
- package/lib/typescript/src/components/DeckSwiper/DeckSwiperCard.d.ts.map +1 -1
- package/lib/typescript/src/components/Picker/Picker.d.ts.map +1 -1
- package/lib/typescript/src/components/ScreenContainer.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +0 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mappings/Accordion.d.ts +1 -0
- package/lib/typescript/src/mappings/Accordion.d.ts.map +1 -1
- package/lib/typescript/src/mappings/AccordionItem.d.ts +1 -0
- package/lib/typescript/src/mappings/AccordionItem.d.ts.map +1 -1
- package/lib/typescript/src/mappings/ActionSheet.d.ts +1 -0
- package/lib/typescript/src/mappings/ActionSheet.d.ts.map +1 -1
- package/lib/typescript/src/mappings/ActionSheetCancel.d.ts +1 -0
- package/lib/typescript/src/mappings/ActionSheetCancel.d.ts.map +1 -1
- package/lib/typescript/src/mappings/ActionSheetItem.d.ts +1 -0
- package/lib/typescript/src/mappings/ActionSheetItem.d.ts.map +1 -1
- package/lib/typescript/src/mappings/LinearGradient.d.ts +1 -0
- package/lib/typescript/src/mappings/LinearGradient.d.ts.map +1 -1
- package/lib/typescript/src/mappings/MapCallout.d.ts +1 -0
- package/lib/typescript/src/mappings/MapCallout.d.ts.map +1 -1
- package/lib/typescript/src/mappings/MapMarker.d.ts +1 -0
- package/lib/typescript/src/mappings/MapMarker.d.ts.map +1 -1
- package/lib/typescript/src/mappings/MapView.d.ts +1 -0
- package/lib/typescript/src/mappings/MapView.d.ts.map +1 -1
- package/lib/typescript/src/mappings/Swiper.d.ts +1 -0
- package/lib/typescript/src/mappings/Swiper.d.ts.map +1 -1
- package/lib/typescript/src/mappings/SwiperItem.d.ts +1 -0
- package/lib/typescript/src/mappings/SwiperItem.d.ts.map +1 -1
- package/lib/typescript/src/mappings/TextArea.d.ts +1 -0
- package/lib/typescript/src/mappings/TextArea.d.ts.map +1 -1
- package/lib/typescript/src/mappings/TextField.d.ts +1 -1
- package/lib/typescript/src/mappings/TextField.d.ts.map +1 -1
- package/package.json +3 -4
- package/src/components/DeckSwiper/DeckSwiper.js +33 -3
- package/src/components/DeckSwiper/DeckSwiper.tsx +51 -9
- package/src/components/DeckSwiper/DeckSwiperCard.js +1 -1
- package/src/components/DeckSwiper/DeckSwiperCard.tsx +3 -6
- package/src/components/Picker/Picker.js +7 -8
- package/src/components/Picker/Picker.tsx +7 -9
- package/src/components/ScreenContainer.js +2 -1
- package/src/components/ScreenContainer.tsx +2 -1
- package/src/index.js +0 -1
- package/src/index.tsx +0 -2
- package/src/mappings/Accordion.js +10 -1
- package/src/mappings/Accordion.ts +10 -0
- package/src/mappings/AccordionItem.js +2 -1
- package/src/mappings/AccordionItem.ts +2 -0
- package/src/mappings/ActionSheet.js +2 -1
- package/src/mappings/ActionSheet.ts +7 -1
- package/src/mappings/ActionSheetCancel.js +2 -1
- package/src/mappings/ActionSheetCancel.ts +2 -0
- package/src/mappings/ActionSheetItem.js +2 -1
- package/src/mappings/ActionSheetItem.ts +2 -0
- package/src/mappings/LinearGradient.js +6 -1
- package/src/mappings/LinearGradient.ts +6 -0
- package/src/mappings/MapCallout.js +2 -1
- package/src/mappings/MapCallout.ts +2 -0
- package/src/mappings/MapMarker.js +2 -1
- package/src/mappings/MapMarker.ts +2 -0
- package/src/mappings/MapView.js +2 -1
- package/src/mappings/MapView.ts +2 -0
- package/src/mappings/Swiper.js +10 -1
- package/src/mappings/Swiper.ts +10 -0
- package/src/mappings/SwiperItem.js +2 -1
- package/src/mappings/SwiperItem.ts +5 -1
- package/src/mappings/TextArea.js +10 -1
- package/src/mappings/TextArea.ts +10 -0
- package/src/mappings/TextField.js +9 -0
- package/src/mappings/TextField.ts +9 -0
- package/lib/commonjs/components/Shadow.js +0 -46
- package/lib/commonjs/mappings/Shadow.js +0 -94
- package/lib/module/components/Shadow.js +0 -38
- package/lib/module/mappings/Shadow.js +0 -87
- package/lib/typescript/src/components/Shadow.d.ts +0 -24
- package/lib/typescript/src/components/Shadow.d.ts.map +0 -1
- package/lib/typescript/src/mappings/Shadow.d.ts +0 -173
- package/lib/typescript/src/mappings/Shadow.d.ts.map +0 -1
- package/src/components/Shadow.js +0 -16
- package/src/components/Shadow.tsx +0 -62
- package/src/mappings/Shadow.js +0 -87
- package/src/mappings/Shadow.ts +0 -95
package/src/mappings/Swiper.ts
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
GROUPS,
|
|
8
8
|
Triggers,
|
|
9
9
|
createActionProp,
|
|
10
|
+
StylesPanelSections,
|
|
10
11
|
} from "@draftbit/types";
|
|
11
12
|
|
|
12
13
|
export const SEED_DATA = {
|
|
@@ -14,6 +15,15 @@ export const SEED_DATA = {
|
|
|
14
15
|
tag: "Swiper",
|
|
15
16
|
description: "Swiper container",
|
|
16
17
|
category: COMPONENT_TYPES.swiper,
|
|
18
|
+
stylesPanelSections: [
|
|
19
|
+
StylesPanelSections.LayoutSelectedItem,
|
|
20
|
+
StylesPanelSections.Background,
|
|
21
|
+
StylesPanelSections.Size,
|
|
22
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
23
|
+
StylesPanelSections.Position,
|
|
24
|
+
StylesPanelSections.Borders,
|
|
25
|
+
StylesPanelSections.Effects,
|
|
26
|
+
],
|
|
17
27
|
layout: {
|
|
18
28
|
height: 300,
|
|
19
29
|
width: "100%",
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { COMPONENT_TYPES } from "@draftbit/types";
|
|
1
|
+
import { COMPONENT_TYPES, CONTAINER_COMPONENT_STYLES_SECTIONS, } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "Swiper Item",
|
|
4
4
|
tag: "SwiperItem",
|
|
5
5
|
description: "Swiper item",
|
|
6
6
|
category: COMPONENT_TYPES.swiper,
|
|
7
7
|
props: {},
|
|
8
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
8
9
|
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
COMPONENT_TYPES,
|
|
3
|
+
CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
4
|
+
} from "@draftbit/types";
|
|
2
5
|
|
|
3
6
|
export const SEED_DATA = {
|
|
4
7
|
name: "Swiper Item",
|
|
@@ -6,4 +9,5 @@ export const SEED_DATA = {
|
|
|
6
9
|
description: "Swiper item",
|
|
7
10
|
category: COMPONENT_TYPES.swiper,
|
|
8
11
|
props: {},
|
|
12
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
9
13
|
};
|
package/src/mappings/TextArea.js
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
|
-
import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, Triggers, createDisabledProp, } from "@draftbit/types";
|
|
1
|
+
import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, Triggers, createDisabledProp, StylesPanelSections, } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "Text Area",
|
|
4
4
|
tag: "TextInput",
|
|
5
5
|
description: "An input field that allows for multiple lines.",
|
|
6
6
|
category: COMPONENT_TYPES.input,
|
|
7
|
+
stylesPanelSections: [
|
|
8
|
+
StylesPanelSections.Typography,
|
|
9
|
+
StylesPanelSections.Background,
|
|
10
|
+
StylesPanelSections.Size,
|
|
11
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
12
|
+
StylesPanelSections.Position,
|
|
13
|
+
StylesPanelSections.Borders,
|
|
14
|
+
StylesPanelSections.Effects,
|
|
15
|
+
],
|
|
7
16
|
layout: {
|
|
8
17
|
borderLeftWidth: 1,
|
|
9
18
|
borderRightWidth: 1,
|
package/src/mappings/TextArea.ts
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
FIELD_NAME,
|
|
7
7
|
Triggers,
|
|
8
8
|
createDisabledProp,
|
|
9
|
+
StylesPanelSections,
|
|
9
10
|
} from "@draftbit/types";
|
|
10
11
|
|
|
11
12
|
export const SEED_DATA = {
|
|
@@ -13,6 +14,15 @@ export const SEED_DATA = {
|
|
|
13
14
|
tag: "TextInput",
|
|
14
15
|
description: "An input field that allows for multiple lines.",
|
|
15
16
|
category: COMPONENT_TYPES.input,
|
|
17
|
+
stylesPanelSections: [
|
|
18
|
+
StylesPanelSections.Typography,
|
|
19
|
+
StylesPanelSections.Background,
|
|
20
|
+
StylesPanelSections.Size,
|
|
21
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
22
|
+
StylesPanelSections.Position,
|
|
23
|
+
StylesPanelSections.Borders,
|
|
24
|
+
StylesPanelSections.Effects,
|
|
25
|
+
],
|
|
16
26
|
layout: {
|
|
17
27
|
borderLeftWidth: 1,
|
|
18
28
|
borderRightWidth: 1,
|
|
@@ -302,6 +302,15 @@ export const SEED_DATA = [
|
|
|
302
302
|
preview_image_url: "{CLOUDINARY_URL}/Textfield.png",
|
|
303
303
|
supports_list_render: false,
|
|
304
304
|
triggers: SEED_DATA_TRIGGERS,
|
|
305
|
+
stylesPanelSections: [
|
|
306
|
+
StylesPanelSections.Typography,
|
|
307
|
+
StylesPanelSections.Background,
|
|
308
|
+
StylesPanelSections.Size,
|
|
309
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
310
|
+
StylesPanelSections.Position,
|
|
311
|
+
StylesPanelSections.Borders,
|
|
312
|
+
StylesPanelSections.Effects,
|
|
313
|
+
],
|
|
305
314
|
props: {
|
|
306
315
|
...SEED_DATA_PROPS,
|
|
307
316
|
type: {
|
|
@@ -324,6 +324,15 @@ export const SEED_DATA = [
|
|
|
324
324
|
preview_image_url: "{CLOUDINARY_URL}/Textfield.png",
|
|
325
325
|
supports_list_render: false,
|
|
326
326
|
triggers: SEED_DATA_TRIGGERS,
|
|
327
|
+
stylesPanelSections: [
|
|
328
|
+
StylesPanelSections.Typography,
|
|
329
|
+
StylesPanelSections.Background,
|
|
330
|
+
StylesPanelSections.Size,
|
|
331
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
332
|
+
StylesPanelSections.Position,
|
|
333
|
+
StylesPanelSections.Borders,
|
|
334
|
+
StylesPanelSections.Effects,
|
|
335
|
+
],
|
|
327
336
|
props: {
|
|
328
337
|
...SEED_DATA_PROPS,
|
|
329
338
|
type: {
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _reactNativeShadow = require("react-native-shadow-2");
|
|
9
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
11
|
-
const Shadow = _ref => {
|
|
12
|
-
let {
|
|
13
|
-
offsetX = 0,
|
|
14
|
-
offsetY = 0,
|
|
15
|
-
showShadowSideStart = true,
|
|
16
|
-
showShadowSideEnd = true,
|
|
17
|
-
showShadowSideTop = true,
|
|
18
|
-
showShadowSideBottom = true,
|
|
19
|
-
showShadowCornerTopStart = true,
|
|
20
|
-
showShadowCornerTopEnd = true,
|
|
21
|
-
showShadowCornerBottomStart = true,
|
|
22
|
-
showShadowCornerBottomEnd = true,
|
|
23
|
-
paintInside = false,
|
|
24
|
-
style,
|
|
25
|
-
...rest
|
|
26
|
-
} = _ref;
|
|
27
|
-
return /*#__PURE__*/_react.default.createElement(_reactNativeShadow.Shadow, _extends({
|
|
28
|
-
offset: [offsetX, offsetY],
|
|
29
|
-
sides: {
|
|
30
|
-
start: showShadowSideStart,
|
|
31
|
-
end: showShadowSideEnd,
|
|
32
|
-
top: showShadowSideTop,
|
|
33
|
-
bottom: showShadowSideBottom
|
|
34
|
-
},
|
|
35
|
-
corners: {
|
|
36
|
-
topStart: showShadowCornerTopStart,
|
|
37
|
-
topEnd: showShadowCornerTopEnd,
|
|
38
|
-
bottomStart: showShadowCornerBottomStart,
|
|
39
|
-
bottomEnd: showShadowCornerBottomEnd
|
|
40
|
-
},
|
|
41
|
-
containerStyle: style,
|
|
42
|
-
paintInside: paintInside
|
|
43
|
-
}, rest));
|
|
44
|
-
};
|
|
45
|
-
var _default = Shadow;
|
|
46
|
-
exports.default = _default;
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.SEED_DATA = void 0;
|
|
7
|
-
var _types = require("@draftbit/types");
|
|
8
|
-
const SEED_DATA = {
|
|
9
|
-
name: "Shadow",
|
|
10
|
-
tag: "Shadow",
|
|
11
|
-
description: "A cross-platform, universal shadow.",
|
|
12
|
-
category: _types.COMPONENT_TYPES.view,
|
|
13
|
-
stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
14
|
-
props: {
|
|
15
|
-
disabled: (0, _types.createDisabledProp)({
|
|
16
|
-
description: "Disables the shadow."
|
|
17
|
-
}),
|
|
18
|
-
startColor: (0, _types.createColorProp)({
|
|
19
|
-
label: "Start Color",
|
|
20
|
-
description: "The initial gradient color of the shadow.",
|
|
21
|
-
defaultValue: null
|
|
22
|
-
}),
|
|
23
|
-
endColor: (0, _types.createColorProp)({
|
|
24
|
-
label: "End Color",
|
|
25
|
-
description: "The final gradient color of the shadow.",
|
|
26
|
-
defaultValue: null
|
|
27
|
-
}),
|
|
28
|
-
distance: (0, _types.createStaticNumberProp)({
|
|
29
|
-
label: "Distance",
|
|
30
|
-
description: "The distance of the shadow."
|
|
31
|
-
}),
|
|
32
|
-
paintInside: (0, _types.createStaticBoolProp)({
|
|
33
|
-
label: "Paint Inside",
|
|
34
|
-
description: "Apply the shadow below/inside the content.",
|
|
35
|
-
defaultValue: false
|
|
36
|
-
}),
|
|
37
|
-
stretch: (0, _types.createStaticBoolProp)({
|
|
38
|
-
label: "Stretch",
|
|
39
|
-
description: "Force children to occupy all available horizontal space.",
|
|
40
|
-
defaultValue: null
|
|
41
|
-
}),
|
|
42
|
-
offsetX: (0, _types.createStaticNumberProp)({
|
|
43
|
-
label: "Offset X",
|
|
44
|
-
description: "Moves the shadow in the x direction",
|
|
45
|
-
defeaultValue: 0
|
|
46
|
-
}),
|
|
47
|
-
offsetY: (0, _types.createStaticNumberProp)({
|
|
48
|
-
label: "Offset Y",
|
|
49
|
-
description: "Moves the shadow in the y direction",
|
|
50
|
-
defeaultValue: 0
|
|
51
|
-
}),
|
|
52
|
-
showShadowSideStart: (0, _types.createStaticBoolProp)({
|
|
53
|
-
label: "Show Shadow Start",
|
|
54
|
-
description: "Whether to show shadow on the start side or not",
|
|
55
|
-
defaultValue: true
|
|
56
|
-
}),
|
|
57
|
-
showShadowSideEnd: (0, _types.createStaticBoolProp)({
|
|
58
|
-
label: "Show Shadow End",
|
|
59
|
-
description: "Whether to show shadow on the end side or not",
|
|
60
|
-
defaultValue: true
|
|
61
|
-
}),
|
|
62
|
-
showShadowSideTop: (0, _types.createStaticBoolProp)({
|
|
63
|
-
label: "Show Shadow Top",
|
|
64
|
-
description: "Whether to show shadow on the top side or not",
|
|
65
|
-
defaultValue: true
|
|
66
|
-
}),
|
|
67
|
-
showShadowSideBottom: (0, _types.createStaticBoolProp)({
|
|
68
|
-
label: "Show Shadow Bottom",
|
|
69
|
-
description: "Whether to show shadow on the bottom side or not",
|
|
70
|
-
defaultValue: true
|
|
71
|
-
}),
|
|
72
|
-
showShadowCornerTopStart: (0, _types.createStaticBoolProp)({
|
|
73
|
-
label: "Show Shadow Top Start Corner",
|
|
74
|
-
description: "Whether to show shadow on the top start corner or not",
|
|
75
|
-
defaultValue: true
|
|
76
|
-
}),
|
|
77
|
-
showShadowCornerTopEnd: (0, _types.createStaticBoolProp)({
|
|
78
|
-
label: "Show Shadow Top End Corner",
|
|
79
|
-
description: "Whether to show shadow on the top end corner or not",
|
|
80
|
-
defaultValue: true
|
|
81
|
-
}),
|
|
82
|
-
showShadowCornerBottomStart: (0, _types.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
|
-
}),
|
|
87
|
-
showShadowCornerBottomEnd: (0, _types.createStaticBoolProp)({
|
|
88
|
-
label: "Show Shadow Bottom End Corner",
|
|
89
|
-
description: "Whether to show shadow on the bottom end corner or not",
|
|
90
|
-
defaultValue: true
|
|
91
|
-
})
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
exports.SEED_DATA = SEED_DATA;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { Shadow as ShadowComponent } from "react-native-shadow-2";
|
|
4
|
-
const Shadow = _ref => {
|
|
5
|
-
let {
|
|
6
|
-
offsetX = 0,
|
|
7
|
-
offsetY = 0,
|
|
8
|
-
showShadowSideStart = true,
|
|
9
|
-
showShadowSideEnd = true,
|
|
10
|
-
showShadowSideTop = true,
|
|
11
|
-
showShadowSideBottom = true,
|
|
12
|
-
showShadowCornerTopStart = true,
|
|
13
|
-
showShadowCornerTopEnd = true,
|
|
14
|
-
showShadowCornerBottomStart = true,
|
|
15
|
-
showShadowCornerBottomEnd = true,
|
|
16
|
-
paintInside = false,
|
|
17
|
-
style,
|
|
18
|
-
...rest
|
|
19
|
-
} = _ref;
|
|
20
|
-
return /*#__PURE__*/React.createElement(ShadowComponent, _extends({
|
|
21
|
-
offset: [offsetX, offsetY],
|
|
22
|
-
sides: {
|
|
23
|
-
start: showShadowSideStart,
|
|
24
|
-
end: showShadowSideEnd,
|
|
25
|
-
top: showShadowSideTop,
|
|
26
|
-
bottom: showShadowSideBottom
|
|
27
|
-
},
|
|
28
|
-
corners: {
|
|
29
|
-
topStart: showShadowCornerTopStart,
|
|
30
|
-
topEnd: showShadowCornerTopEnd,
|
|
31
|
-
bottomStart: showShadowCornerBottomStart,
|
|
32
|
-
bottomEnd: showShadowCornerBottomEnd
|
|
33
|
-
},
|
|
34
|
-
containerStyle: style,
|
|
35
|
-
paintInside: paintInside
|
|
36
|
-
}, rest));
|
|
37
|
-
};
|
|
38
|
-
export default Shadow;
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, CONTAINER_COMPONENT_STYLES_SECTIONS, createColorProp, createStaticNumberProp, createStaticBoolProp, createDisabledProp } from "@draftbit/types";
|
|
2
|
-
export const SEED_DATA = {
|
|
3
|
-
name: "Shadow",
|
|
4
|
-
tag: "Shadow",
|
|
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
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,173 +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
|
-
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Shadow.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Shadow.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqFrB,CAAC"}
|
package/src/components/Shadow.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
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;
|
|
@@ -1,62 +0,0 @@
|
|
|
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;
|