@draftbit/core 46.8.2-799d91.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.
Files changed (62) hide show
  1. package/lib/commonjs/components/Image.js +2 -17
  2. package/lib/commonjs/components/Portal/PortalHost.js +15 -44
  3. package/lib/commonjs/components/ScreenContainer.js +6 -24
  4. package/lib/commonjs/components/Shadow.js +46 -0
  5. package/lib/commonjs/components/TabView/TabView.js +116 -0
  6. package/lib/commonjs/components/TabView/TabViewItem.js +25 -0
  7. package/lib/commonjs/components/TabView/index.js +20 -0
  8. package/lib/commonjs/index.js +20 -0
  9. package/lib/commonjs/mappings/FlashList.js +2 -8
  10. package/lib/commonjs/mappings/Markdown.js +2 -2
  11. package/lib/commonjs/mappings/Shadow.js +102 -0
  12. package/lib/commonjs/mappings/TabView.js +74 -0
  13. package/lib/commonjs/mappings/TabViewItem.js +37 -0
  14. package/lib/module/components/Shadow.js +38 -0
  15. package/lib/module/components/TabView/TabView.js +107 -0
  16. package/lib/module/components/TabView/TabViewItem.js +20 -0
  17. package/lib/module/components/TabView/index.js +2 -0
  18. package/lib/module/index.js +2 -0
  19. package/lib/module/mappings/FlashList.js +3 -9
  20. package/lib/module/mappings/Markdown.js +2 -2
  21. package/lib/module/mappings/Shadow.js +95 -0
  22. package/lib/module/mappings/TabView.js +67 -0
  23. package/lib/module/mappings/TabViewItem.js +30 -0
  24. package/lib/typescript/src/components/Shadow.d.ts +24 -0
  25. package/lib/typescript/src/components/Shadow.d.ts.map +1 -0
  26. package/lib/typescript/src/components/TabView/TabView.d.ts +26 -0
  27. package/lib/typescript/src/components/TabView/TabView.d.ts.map +1 -0
  28. package/lib/typescript/src/components/TabView/TabViewItem.d.ts +11 -0
  29. package/lib/typescript/src/components/TabView/TabViewItem.d.ts.map +1 -0
  30. package/lib/typescript/src/components/TabView/index.d.ts +3 -0
  31. package/lib/typescript/src/components/TabView/index.d.ts.map +1 -0
  32. package/lib/typescript/src/index.d.ts +2 -0
  33. package/lib/typescript/src/index.d.ts.map +1 -1
  34. package/lib/typescript/src/mappings/FlashList.d.ts +0 -6
  35. package/lib/typescript/src/mappings/FlashList.d.ts.map +1 -1
  36. package/lib/typescript/src/mappings/Shadow.d.ts +173 -0
  37. package/lib/typescript/src/mappings/Shadow.d.ts.map +1 -0
  38. package/lib/typescript/src/mappings/TabView.d.ts +123 -0
  39. package/lib/typescript/src/mappings/TabView.d.ts.map +1 -0
  40. package/lib/typescript/src/mappings/TabViewItem.d.ts +25 -0
  41. package/lib/typescript/src/mappings/TabViewItem.d.ts.map +1 -0
  42. package/package.json +6 -3
  43. package/src/components/Shadow.js +16 -0
  44. package/src/components/Shadow.tsx +62 -0
  45. package/src/components/TabView/TabView.js +54 -0
  46. package/src/components/TabView/TabView.tsx +147 -0
  47. package/src/components/TabView/TabViewItem.js +11 -0
  48. package/src/components/TabView/TabViewItem.tsx +25 -0
  49. package/src/components/TabView/index.js +2 -0
  50. package/src/components/TabView/index.tsx +2 -0
  51. package/src/index.js +2 -0
  52. package/src/index.tsx +3 -0
  53. package/src/mappings/FlashList.js +9 -9
  54. package/src/mappings/FlashList.ts +9 -9
  55. package/src/mappings/Markdown.js +2 -2
  56. package/src/mappings/Markdown.ts +2 -2
  57. package/src/mappings/Shadow.js +95 -0
  58. package/src/mappings/Shadow.ts +104 -0
  59. package/src/mappings/TabView.js +75 -0
  60. package/src/mappings/TabView.ts +85 -0
  61. package/src/mappings/TabViewItem.js +30 -0
  62. package/src/mappings/TabViewItem.ts +38 -0
@@ -0,0 +1,37 @@
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: "Tab View Item",
10
+ tag: "TabViewItem",
11
+ description: "Single Tab View item to be used in TabView. Each item represents a single tab and its content",
12
+ category: _types.COMPONENT_TYPES.swiper,
13
+ stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS,
14
+ layout: {
15
+ flex: 1
16
+ },
17
+ props: {
18
+ title: (0, _types.createTextProp)({
19
+ label: "Title",
20
+ description: "Title of tab item",
21
+ defaultValue: "Title",
22
+ required: true,
23
+ group: _types.GROUPS.basic
24
+ }),
25
+ icon: (0, _types.createIconProp)({
26
+ defaultValue: null,
27
+ required: false
28
+ }),
29
+ accessibilityLabel: (0, _types.createTextProp)({
30
+ label: "Accessibility Label",
31
+ description: "Accessibility Label",
32
+ defaultValue: null,
33
+ group: _types.GROUPS.accessibility
34
+ })
35
+ }
36
+ };
37
+ exports.SEED_DATA = SEED_DATA;
@@ -0,0 +1,38 @@
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;
@@ -0,0 +1,107 @@
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 * as React from "react";
3
+ import { TabView, TabBar, SceneMap } from "react-native-tab-view";
4
+ import { withTheme } from "../../theming";
5
+ import { extractStyles } from "../../utilities";
6
+ const TabViewComponent = _ref => {
7
+ let {
8
+ Icon,
9
+ onIndexChanged,
10
+ onEndReached,
11
+ tabBarPosition,
12
+ keyboardDismissMode,
13
+ swipeEnabled,
14
+ scrollEnabled,
15
+ activeColor,
16
+ inactiveColor,
17
+ pressColor,
18
+ indicatorColor,
19
+ tabsBackgroundColor,
20
+ style,
21
+ theme,
22
+ children
23
+ } = _ref;
24
+ const [index, setIndex] = React.useState(0);
25
+ const [routes, setRoutes] = React.useState([]);
26
+ const [tabScenes, setTabScenes] = React.useState({});
27
+ const {
28
+ textStyles,
29
+ viewStyles
30
+ } = extractStyles(style);
31
+
32
+ //Check type of child using props
33
+ //Regular '.type' cannot work because Draftbit strips the type in Draft view
34
+ const instanceOfTabViewItemProps = object => {
35
+ return "title" in object;
36
+ };
37
+
38
+ //Populate routes and scenes based on children
39
+ React.useEffect(() => {
40
+ const newRoutes = [];
41
+ const scenes = {};
42
+ React.Children.toArray(children).filter(child => /*#__PURE__*/React.isValidElement(child) && instanceOfTabViewItemProps(child.props)).forEach((item, idx) => {
43
+ const child = item;
44
+ newRoutes.push({
45
+ key: idx.toString(),
46
+ title: child.props.title,
47
+ icon: child.props.icon,
48
+ accessibilityLabel: child.props.accessibilityLabel
49
+ });
50
+ scenes[idx] = () => child;
51
+ });
52
+ setRoutes(newRoutes);
53
+ setTabScenes(scenes);
54
+ }, [children]);
55
+ const indexChangeHandler = i => {
56
+ setIndex(i);
57
+ onIndexChanged === null || onIndexChanged === void 0 ? void 0 : onIndexChanged(i);
58
+ if (i === routes.length) {
59
+ onEndReached === null || onEndReached === void 0 ? void 0 : onEndReached();
60
+ }
61
+ };
62
+ const renderTabBar = props => {
63
+ return /*#__PURE__*/React.createElement(TabBar, _extends({}, props, {
64
+ activeColor: activeColor || theme.colors.primary,
65
+ inactiveColor: inactiveColor || theme.colors.divider,
66
+ pressColor: pressColor || theme.colors.primary,
67
+ scrollEnabled: scrollEnabled,
68
+ indicatorStyle: {
69
+ backgroundColor: indicatorColor || theme.colors.primary
70
+ },
71
+ labelStyle: textStyles,
72
+ renderIcon: _ref2 => {
73
+ let {
74
+ route,
75
+ color
76
+ } = _ref2;
77
+ return route !== null && route !== void 0 && route.icon ? /*#__PURE__*/React.createElement(Icon, {
78
+ name: route.icon,
79
+ color: color,
80
+ size: 16
81
+ }) : null;
82
+ },
83
+ style: {
84
+ backgroundColor: tabsBackgroundColor || theme.colors.background
85
+ }
86
+ }));
87
+ };
88
+
89
+ //Cannot render TabView without at least one tab
90
+ if (!routes.length) {
91
+ return /*#__PURE__*/React.createElement(React.Fragment, null);
92
+ }
93
+ return /*#__PURE__*/React.createElement(TabView, {
94
+ style: [viewStyles],
95
+ navigationState: {
96
+ index,
97
+ routes
98
+ },
99
+ renderScene: SceneMap(tabScenes),
100
+ renderTabBar: renderTabBar,
101
+ onIndexChange: indexChangeHandler,
102
+ tabBarPosition: tabBarPosition,
103
+ keyboardDismissMode: keyboardDismissMode,
104
+ swipeEnabled: swipeEnabled
105
+ });
106
+ };
107
+ export default withTheme(TabViewComponent);
@@ -0,0 +1,20 @@
1
+ import React from "react";
2
+ import { StyleSheet, View } from "react-native";
3
+
4
+ //Props used by parent (TabView) to create tabs
5
+
6
+ const TabViewItem = _ref => {
7
+ let {
8
+ style,
9
+ children
10
+ } = _ref;
11
+ return /*#__PURE__*/React.createElement(View, {
12
+ style: [styles.parentContainer, style]
13
+ }, children);
14
+ };
15
+ const styles = StyleSheet.create({
16
+ parentContainer: {
17
+ flex: 1
18
+ }
19
+ });
20
+ export default TabViewItem;
@@ -0,0 +1,2 @@
1
+ export { default as TabView } from "./TabView";
2
+ export { default as TabViewItem } from "./TabViewItem";
@@ -31,7 +31,9 @@ export { ActionSheet, ActionSheetItem, ActionSheetCancel } from "./components/Ac
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";
36
+ export { TabView, TabViewItem } from "./components/TabView";
35
37
  export { default as Markdown } from "./components/Markdown";
36
38
 
37
39
  /* Deprecated: Fix or Delete! */
@@ -1,14 +1,11 @@
1
- import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS, Triggers, createActionProp, createStaticNumberProp, createColorProp } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, GROUPS, Triggers, createActionProp, createStaticNumberProp, createColorProp, StylesPanelSections } from "@draftbit/types";
2
2
  export const SEED_DATA = [{
3
3
  name: "Masonry List",
4
4
  tag: "MasonryFlashList",
5
5
  description: "Masonry Flashlist by Shopify",
6
6
  packageName: "@shopify/flash-list",
7
7
  category: COMPONENT_TYPES.data,
8
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
9
- layout: {
10
- flex: 1
11
- },
8
+ stylesPanelSections: [StylesPanelSections.Background, StylesPanelSections.MarginsAndPaddings],
12
9
  triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
13
10
  props: {
14
11
  onRefresh: createActionProp(),
@@ -55,10 +52,7 @@ export const SEED_DATA = [{
55
52
  description: "Flashlist by Shopify",
56
53
  packageName: "@shopify/flash-list",
57
54
  category: COMPONENT_TYPES.data,
58
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
59
- layout: {
60
- flex: 1
61
- },
55
+ stylesPanelSections: [StylesPanelSections.Background, StylesPanelSections.MarginsAndPaddings],
62
56
  triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
63
57
  props: {
64
58
  onRefresh: createActionProp(),
@@ -3,7 +3,7 @@ export const SEED_DATA = {
3
3
  name: "Markdown",
4
4
  tag: "Markdown",
5
5
  description: "A component that renders markdown",
6
- category: COMPONENT_TYPES.basic,
6
+ category: COMPONENT_TYPES.text,
7
7
  stylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.LayoutSelectedItem, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Effects],
8
8
  props: {
9
9
  children: {
@@ -14,7 +14,7 @@ export const SEED_DATA = {
14
14
  required: true,
15
15
  formType: FORM_TYPES.string,
16
16
  propType: PROP_TYPES.STRING,
17
- defaultValue: "## Double click me to edit 👀"
17
+ defaultValue: "### Markdown"
18
18
  }
19
19
  }
20
20
  };
@@ -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
+ };
@@ -0,0 +1,67 @@
1
+ import { COMPONENT_TYPES, createTextEnumProp, createColorProp, StylesPanelSections, Triggers, createActionProp, createStaticBoolProp, GROUPS } from "@draftbit/types";
2
+ export const SEED_DATA = {
3
+ name: "Tab View",
4
+ tag: "TabView",
5
+ description: "Tab view container",
6
+ category: COMPONENT_TYPES.swiper,
7
+ stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position, StylesPanelSections.Effects, StylesPanelSections.LayoutSelectedItem, StylesPanelSections.Background, StylesPanelSections.Typography],
8
+ triggers: [Triggers.OnIndexChanged, Triggers.OnEndReached],
9
+ props: {
10
+ onIndexChanged: createActionProp({
11
+ label: "On index changed",
12
+ description: "Action to execute when swipe to new index"
13
+ }),
14
+ onEndReached: createActionProp({
15
+ label: "On end reached",
16
+ description: "Action to execute when end of swiping reached"
17
+ }),
18
+ tabBarPosition: createTextEnumProp({
19
+ label: "Tab Bar Position",
20
+ description: "Position of tab bar",
21
+ options: ["top", "bottom"],
22
+ defaultValue: "top"
23
+ }),
24
+ keyboardDismissMode: createTextEnumProp({
25
+ label: "Keyboard Dismiss Mode",
26
+ description: "Keyboard Dismiss Mode",
27
+ options: ["auto", "on-drag", "none"],
28
+ defaultValue: "auto"
29
+ }),
30
+ swipeEnabled: createStaticBoolProp({
31
+ label: "Swipe Enabled",
32
+ description: "Whether swiping is enabled or not",
33
+ defaultValue: true
34
+ }),
35
+ scrollEnabled: createStaticBoolProp({
36
+ label: "Tab Scroll Enabled",
37
+ description: "Whether scrolling of tabs is enabled or not",
38
+ defaultValue: false
39
+ }),
40
+ activeColor: createColorProp({
41
+ label: "Active Color",
42
+ description: "Color of icon and text of active tab",
43
+ defaultValue: "primary"
44
+ }),
45
+ inactiveColor: createColorProp({
46
+ label: "Inactive Color",
47
+ description: "Color of icon and text of inactive tab(s)",
48
+ defaultValue: null
49
+ }),
50
+ pressColor: createColorProp({
51
+ label: "Press Color",
52
+ description: "Color of ripple when pressed",
53
+ defaultValue: "primary",
54
+ group: GROUPS.android
55
+ }),
56
+ indicatorColor: createColorProp({
57
+ label: "Indicator Color",
58
+ description: "Color of indicator",
59
+ defaultValue: "primary"
60
+ }),
61
+ tabsBackgroundColor: createColorProp({
62
+ label: "Tabs Background Color",
63
+ description: "Background color of tabs container",
64
+ defaultValue: "background"
65
+ })
66
+ }
67
+ };
@@ -0,0 +1,30 @@
1
+ import { COMPONENT_TYPES, createTextProp, createIconProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS } from "@draftbit/types";
2
+ export const SEED_DATA = {
3
+ name: "Tab View Item",
4
+ tag: "TabViewItem",
5
+ description: "Single Tab View item to be used in TabView. Each item represents a single tab and its content",
6
+ category: COMPONENT_TYPES.swiper,
7
+ stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
8
+ layout: {
9
+ flex: 1
10
+ },
11
+ props: {
12
+ title: createTextProp({
13
+ label: "Title",
14
+ description: "Title of tab item",
15
+ defaultValue: "Title",
16
+ required: true,
17
+ group: GROUPS.basic
18
+ }),
19
+ icon: createIconProp({
20
+ defaultValue: null,
21
+ required: false
22
+ }),
23
+ accessibilityLabel: createTextProp({
24
+ label: "Accessibility Label",
25
+ description: "Accessibility Label",
26
+ defaultValue: null,
27
+ group: GROUPS.accessibility
28
+ })
29
+ }
30
+ };
@@ -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"}
@@ -0,0 +1,26 @@
1
+ import * as React from "react";
2
+ import { StyleProp, ViewStyle } from "react-native";
3
+ import type { IconSlot } from "../../interfaces/Icon";
4
+ import type { Theme } from "../../styles/DefaultTheme";
5
+ declare type TabBarPosition = "top" | "bottom";
6
+ declare type KeyboardDismissMode = "none" | "auto" | "on-drag";
7
+ declare type TabViewProps = {
8
+ onIndexChanged?: (index: number) => void;
9
+ onEndReached?: () => void;
10
+ tabBarPosition?: TabBarPosition;
11
+ keyboardDismissMode?: KeyboardDismissMode;
12
+ swipeEnabled?: boolean;
13
+ scrollEnabled?: boolean;
14
+ activeColor?: string;
15
+ inactiveColor?: string;
16
+ pressColor?: string;
17
+ indicatorColor?: string;
18
+ tabsBackgroundColor?: string;
19
+ style?: StyleProp<ViewStyle>;
20
+ theme: Theme;
21
+ } & IconSlot;
22
+ declare const _default: React.ComponentType<import("@draftbit/react-theme-provider").$Without<React.PropsWithChildren<TabViewProps>, "theme"> & {
23
+ theme?: import("@draftbit/react-theme-provider").$DeepPartial<any> | undefined;
24
+ }> & import("@draftbit/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<React.PropsWithChildren<TabViewProps>> & React.FC<React.PropsWithChildren<TabViewProps>>, {}>;
25
+ export default _default;
26
+ //# sourceMappingURL=TabView.d.ts.map
@@ -0,0 +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;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"}
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { StyleProp, ViewStyle } from "react-native";
3
+ export interface TabViewItemProps {
4
+ title: string;
5
+ icon?: string;
6
+ accessibilityLabel?: string;
7
+ style?: StyleProp<ViewStyle>;
8
+ }
9
+ declare const TabViewItem: React.FC<React.PropsWithChildren<TabViewItemProps>>;
10
+ export default TabViewItem;
11
+ //# sourceMappingURL=TabViewItem.d.ts.map
@@ -0,0 +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,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"}
@@ -0,0 +1,3 @@
1
+ export { default as TabView } from "./TabView";
2
+ export { default as TabViewItem } from "./TabViewItem";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/TabView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC"}
@@ -31,7 +31,9 @@ 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";
36
+ export { TabView, TabViewItem } from "./components/TabView";
35
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";
@@ -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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AM,qBAAqB,CAAC;AAE7B,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,qBAAqB,GACtB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAErE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC"}
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqHrB,CAAC"}
1
+ {"version":3,"file":"FlashList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlashList.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqHrB,CAAC"}