@draftbit/core 46.10.2 → 46.10.3-0bad1e.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 (41) hide show
  1. package/lib/commonjs/components/Checkbox/CheckboxRow.js +23 -6
  2. package/lib/commonjs/components/Checkbox/context.js +1 -1
  3. package/lib/commonjs/components/FAB.js +18 -4
  4. package/lib/commonjs/constants.js +1 -1
  5. package/lib/commonjs/index.js +0 -21
  6. package/lib/commonjs/mappings/NativeBase/Layout.js +97 -0
  7. package/lib/module/index.js +0 -3
  8. package/lib/module/mappings/NativeBase/Layout.js +90 -0
  9. package/lib/typescript/src/index.d.ts +0 -3
  10. package/lib/typescript/src/index.d.ts.map +1 -1
  11. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +107 -0
  12. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +1 -0
  13. package/package.json +3 -3
  14. package/src/index.js +0 -3
  15. package/src/index.tsx +0 -3
  16. package/src/mappings/NativeBase/Layout.js +101 -0
  17. package/src/mappings/NativeBase/Layout.ts +116 -0
  18. package/lib/commonjs/components/Row.js +0 -73
  19. package/lib/commonjs/components/RowBodyIcon.js +0 -45
  20. package/lib/commonjs/components/RowHeadlineImageCaption.js +0 -45
  21. package/lib/commonjs/components/RowHeadlineImageIcon.js +0 -51
  22. package/lib/module/components/Row.js +0 -63
  23. package/lib/module/components/RowBodyIcon.js +0 -35
  24. package/lib/module/components/RowHeadlineImageCaption.js +0 -35
  25. package/lib/module/components/RowHeadlineImageIcon.js +0 -41
  26. package/lib/typescript/src/components/Row.d.ts +0 -21
  27. package/lib/typescript/src/components/Row.d.ts.map +0 -1
  28. package/lib/typescript/src/components/RowBodyIcon.d.ts +0 -16
  29. package/lib/typescript/src/components/RowBodyIcon.d.ts.map +0 -1
  30. package/lib/typescript/src/components/RowHeadlineImageCaption.d.ts +0 -16
  31. package/lib/typescript/src/components/RowHeadlineImageCaption.d.ts.map +0 -1
  32. package/lib/typescript/src/components/RowHeadlineImageIcon.d.ts +0 -18
  33. package/lib/typescript/src/components/RowHeadlineImageIcon.d.ts.map +0 -1
  34. package/src/components/Row.js +0 -48
  35. package/src/components/Row.tsx +0 -108
  36. package/src/components/RowBodyIcon.js +0 -8
  37. package/src/components/RowBodyIcon.tsx +0 -47
  38. package/src/components/RowHeadlineImageCaption.js +0 -12
  39. package/src/components/RowHeadlineImageCaption.tsx +0 -49
  40. package/src/components/RowHeadlineImageIcon.js +0 -14
  41. package/src/components/RowHeadlineImageIcon.tsx +0 -61
@@ -0,0 +1,116 @@
1
+ import {
2
+ COMPONENT_TYPES,
3
+ createTextEnumProp,
4
+ createBoolProp,
5
+ CONTAINER_COMPONENT_STYLES_SECTIONS,
6
+ createStaticNumberProp,
7
+ } from "@draftbit/types";
8
+
9
+ const SHARED_SEED_DATA = {
10
+ category: COMPONENT_TYPES.layout,
11
+ packageName: "native-base",
12
+ stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
13
+ };
14
+
15
+ export const SEED_DATA = [
16
+ {
17
+ name: "Aspect Ratio",
18
+ tag: "AspectRatio",
19
+ description:
20
+ "Controls the size of the undefined dimension of a node or child component using an aspect ratio",
21
+ ...SHARED_SEED_DATA,
22
+ props: {
23
+ ratio: createStaticNumberProp({
24
+ label: "Ratio",
25
+ description:
26
+ "The aspect ratio of the container in decimal format (ex: 3/4 -> 1.33)",
27
+ defaultValue: 1.33,
28
+ }),
29
+ },
30
+ },
31
+ {
32
+ name: "Box",
33
+ tag: "Box",
34
+ description:
35
+ "This is a generic component for low level layout needs. It is similar to a div in HTML",
36
+ ...SHARED_SEED_DATA,
37
+ },
38
+ {
39
+ name: "Center",
40
+ tag: "Center",
41
+ description: "Center aligns its contents to the center within itself",
42
+ ...SHARED_SEED_DATA,
43
+ },
44
+ {
45
+ name: "Circle",
46
+ tag: "Circle",
47
+ description:
48
+ "Center aligns its contents to the center within itself with a round border radius",
49
+ ...SHARED_SEED_DATA,
50
+ },
51
+ {
52
+ name: "Container",
53
+ tag: "Container",
54
+ description:
55
+ "The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
56
+ ...SHARED_SEED_DATA,
57
+ },
58
+ {
59
+ name: "Column",
60
+ tag: "Column",
61
+ description: "Column aligns items vertically",
62
+ ...SHARED_SEED_DATA,
63
+ },
64
+ {
65
+ name: "Row",
66
+ tag: "Row",
67
+ description: "Column aligns items horizontally",
68
+ ...SHARED_SEED_DATA,
69
+ },
70
+ {
71
+ name: "Spacer",
72
+ tag: "Spacer",
73
+ description:
74
+ "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
75
+ ...SHARED_SEED_DATA,
76
+ },
77
+ {
78
+ name: "Stack",
79
+ tag: "Stack",
80
+ description:
81
+ "Stack aligns items vertically or horizontally based on the direction prop",
82
+ ...SHARED_SEED_DATA,
83
+ props: {
84
+ direction: createTextEnumProp({
85
+ label: "Direction",
86
+ description: "The direction of the Stack",
87
+ options: ["row", "column"],
88
+ defaultValue: "column",
89
+ }),
90
+ reversed: createBoolProp({
91
+ label: "Reversed",
92
+ description: "Determines whether to reverse the direction of items",
93
+ }),
94
+ isDisabled: createBoolProp({
95
+ label: "Disabled",
96
+ description: "If true, the Stack will be disabled",
97
+ }),
98
+ isInvalid: createBoolProp({
99
+ label: "Invalid",
100
+ description: "If true, the Stack will be invalid",
101
+ }),
102
+ },
103
+ },
104
+ {
105
+ name: "ZStack",
106
+ tag: "ZStack",
107
+ description: "ZStack aligns items to the z-axis",
108
+ ...SHARED_SEED_DATA,
109
+ props: {
110
+ reversed: createBoolProp({
111
+ label: "Reversed",
112
+ description: "Determines whether to reverse the direction of items",
113
+ }),
114
+ },
115
+ },
116
+ ];
@@ -1,73 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var React = _interopRequireWildcard(require("react"));
8
- var _reactNative = require("react-native");
9
- var _theming = require("../theming");
10
- var _Config = _interopRequireDefault(require("./Config"));
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
- const Row = _ref => {
15
- let {
16
- titleTypeStyle,
17
- titleColor,
18
- subtitleTypeStyle,
19
- subtitleColor,
20
- title,
21
- subtitle,
22
- multilineSubtitle,
23
- image,
24
- right,
25
- style
26
- } = _ref;
27
- return /*#__PURE__*/React.createElement(_reactNative.View, {
28
- style: [styles.container, {
29
- padding: 16
30
- }, style]
31
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
32
- style: styles.leftContainer
33
- }, image && /*#__PURE__*/React.createElement(_reactNative.Image, {
34
- source: typeof image === "string" ? {
35
- uri: image
36
- } : image,
37
- style: {
38
- marginRight: 12,
39
- width: subtitle ? _Config.default.rowMultiLineImageSize : _Config.default.rowSingleLineImageSize,
40
- height: subtitle ? _Config.default.rowMultiLineImageSize : _Config.default.rowSingleLineImageSize
41
- }
42
- }), /*#__PURE__*/React.createElement(_reactNative.View, {
43
- style: styles.textContainer
44
- }, /*#__PURE__*/React.createElement(_reactNative.Text, {
45
- style: [titleTypeStyle, {
46
- color: titleColor
47
- }],
48
- numberOfLines: 1
49
- }, title), subtitle ? /*#__PURE__*/React.createElement(_reactNative.Text, {
50
- style: [subtitleTypeStyle, {
51
- color: subtitleColor,
52
- marginTop: 4
53
- }],
54
- numberOfLines: multilineSubtitle ? undefined : 1
55
- }, subtitle) : null)), right && right());
56
- };
57
- const styles = _reactNative.StyleSheet.create({
58
- leftContainer: {
59
- flexDirection: "row",
60
- flex: 1
61
- },
62
- container: {
63
- flexDirection: "row",
64
- justifyContent: "space-between",
65
- alignItems: "center"
66
- },
67
- textContainer: {
68
- flex: 1,
69
- justifyContent: "center"
70
- }
71
- });
72
- var _default = (0, _theming.withTheme)(Row);
73
- exports.default = _default;
@@ -1,45 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var React = _interopRequireWildcard(require("react"));
8
- var _theming = require("../theming");
9
- var _Row = _interopRequireDefault(require("./Row"));
10
- var _Config = _interopRequireDefault(require("./Config"));
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
- const RowBodyIcon = _ref => {
15
- let {
16
- Icon,
17
- title,
18
- subtitle,
19
- icon,
20
- style,
21
- theme: {
22
- colors,
23
- typography
24
- }
25
- } = _ref;
26
- return /*#__PURE__*/React.createElement(_Row.default, {
27
- titleTypeStyle: typography.body1,
28
- titleColor: colors.medium,
29
- subtitleTypeStyle: typography.subtitle2,
30
- subtitleColor: colors.light,
31
- title: title,
32
- subtitle: subtitle,
33
- right: () => /*#__PURE__*/React.createElement(Icon, {
34
- name: icon,
35
- size: _Config.default.rowSingleLineIconSize,
36
- color: colors.light,
37
- style: {
38
- marginLeft: 16
39
- }
40
- }),
41
- style: style
42
- });
43
- };
44
- var _default = (0, _theming.withTheme)(RowBodyIcon);
45
- exports.default = _default;
@@ -1,45 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var React = _interopRequireWildcard(require("react"));
8
- var _reactNative = require("react-native");
9
- var _theming = require("../theming");
10
- var _Row = _interopRequireDefault(require("./Row"));
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
- const RowHeadlineImageCaption = _ref => {
15
- let {
16
- title,
17
- subtitle,
18
- caption,
19
- image,
20
- style,
21
- theme: {
22
- colors,
23
- typography
24
- }
25
- } = _ref;
26
- return /*#__PURE__*/React.createElement(_Row.default, {
27
- titleTypeStyle: typography.headline6,
28
- titleColor: colors.strong,
29
- subtitleTypeStyle: typography.body2,
30
- subtitleColor: colors.medium,
31
- title: title,
32
- subtitle: subtitle,
33
- image: image,
34
- right: () => /*#__PURE__*/React.createElement(_reactNative.Text, {
35
- style: {
36
- ...typography.caption,
37
- color: colors.strong,
38
- marginLeft: 16
39
- }
40
- }, caption),
41
- style: style
42
- });
43
- };
44
- var _default = (0, _theming.withTheme)(RowHeadlineImageCaption);
45
- exports.default = _default;
@@ -1,51 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var React = _interopRequireWildcard(require("react"));
8
- var _theming = require("../theming");
9
- var _Row = _interopRequireDefault(require("./Row"));
10
- var _Config = _interopRequireDefault(require("./Config"));
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
- const RowHeadlineImageIcon = _ref => {
15
- let {
16
- Icon,
17
- icon,
18
- title,
19
- image,
20
- subtitle,
21
- multilineSubtitle = false,
22
- style,
23
- theme: {
24
- colors,
25
- typography
26
- }
27
- } = _ref;
28
- return /*#__PURE__*/React.createElement(_Row.default, {
29
- titleTypeStyle: typography.headline6,
30
- titleColor: colors.strong,
31
- subtitleTypeStyle: typography.body2,
32
- subtitleColor: colors.medium,
33
- title: title,
34
- subtitle: subtitle,
35
- multilineSubtitle: multilineSubtitle,
36
- image: image,
37
- right: () => /*#__PURE__*/React.createElement(Icon, {
38
- name: icon,
39
- size: multilineSubtitle ? _Config.default.rowMultiLineIconSize : _Config.default.rowSingleLineIconSize,
40
- color: colors.light,
41
- style: {
42
- marginLeft: 16,
43
- alignSelf: multilineSubtitle ? "flex-start" : "center",
44
- marginTop: multilineSubtitle ? 4 : 0
45
- }
46
- }),
47
- style: style
48
- });
49
- };
50
- var _default = (0, _theming.withTheme)(RowHeadlineImageIcon);
51
- exports.default = _default;
@@ -1,63 +0,0 @@
1
- import * as React from "react";
2
- import { View, Text, Image, StyleSheet } from "react-native";
3
- import { withTheme } from "../theming";
4
- import Config from "./Config";
5
- const Row = _ref => {
6
- let {
7
- titleTypeStyle,
8
- titleColor,
9
- subtitleTypeStyle,
10
- subtitleColor,
11
- title,
12
- subtitle,
13
- multilineSubtitle,
14
- image,
15
- right,
16
- style
17
- } = _ref;
18
- return /*#__PURE__*/React.createElement(View, {
19
- style: [styles.container, {
20
- padding: 16
21
- }, style]
22
- }, /*#__PURE__*/React.createElement(View, {
23
- style: styles.leftContainer
24
- }, image && /*#__PURE__*/React.createElement(Image, {
25
- source: typeof image === "string" ? {
26
- uri: image
27
- } : image,
28
- style: {
29
- marginRight: 12,
30
- width: subtitle ? Config.rowMultiLineImageSize : Config.rowSingleLineImageSize,
31
- height: subtitle ? Config.rowMultiLineImageSize : Config.rowSingleLineImageSize
32
- }
33
- }), /*#__PURE__*/React.createElement(View, {
34
- style: styles.textContainer
35
- }, /*#__PURE__*/React.createElement(Text, {
36
- style: [titleTypeStyle, {
37
- color: titleColor
38
- }],
39
- numberOfLines: 1
40
- }, title), subtitle ? /*#__PURE__*/React.createElement(Text, {
41
- style: [subtitleTypeStyle, {
42
- color: subtitleColor,
43
- marginTop: 4
44
- }],
45
- numberOfLines: multilineSubtitle ? undefined : 1
46
- }, subtitle) : null)), right && right());
47
- };
48
- const styles = StyleSheet.create({
49
- leftContainer: {
50
- flexDirection: "row",
51
- flex: 1
52
- },
53
- container: {
54
- flexDirection: "row",
55
- justifyContent: "space-between",
56
- alignItems: "center"
57
- },
58
- textContainer: {
59
- flex: 1,
60
- justifyContent: "center"
61
- }
62
- });
63
- export default withTheme(Row);
@@ -1,35 +0,0 @@
1
- import * as React from "react";
2
- import { withTheme } from "../theming";
3
- import Row from "./Row";
4
- import Config from "./Config";
5
- const RowBodyIcon = _ref => {
6
- let {
7
- Icon,
8
- title,
9
- subtitle,
10
- icon,
11
- style,
12
- theme: {
13
- colors,
14
- typography
15
- }
16
- } = _ref;
17
- return /*#__PURE__*/React.createElement(Row, {
18
- titleTypeStyle: typography.body1,
19
- titleColor: colors.medium,
20
- subtitleTypeStyle: typography.subtitle2,
21
- subtitleColor: colors.light,
22
- title: title,
23
- subtitle: subtitle,
24
- right: () => /*#__PURE__*/React.createElement(Icon, {
25
- name: icon,
26
- size: Config.rowSingleLineIconSize,
27
- color: colors.light,
28
- style: {
29
- marginLeft: 16
30
- }
31
- }),
32
- style: style
33
- });
34
- };
35
- export default withTheme(RowBodyIcon);
@@ -1,35 +0,0 @@
1
- import * as React from "react";
2
- import { Text } from "react-native";
3
- import { withTheme } from "../theming";
4
- import Row from "./Row";
5
- const RowHeadlineImageCaption = _ref => {
6
- let {
7
- title,
8
- subtitle,
9
- caption,
10
- image,
11
- style,
12
- theme: {
13
- colors,
14
- typography
15
- }
16
- } = _ref;
17
- return /*#__PURE__*/React.createElement(Row, {
18
- titleTypeStyle: typography.headline6,
19
- titleColor: colors.strong,
20
- subtitleTypeStyle: typography.body2,
21
- subtitleColor: colors.medium,
22
- title: title,
23
- subtitle: subtitle,
24
- image: image,
25
- right: () => /*#__PURE__*/React.createElement(Text, {
26
- style: {
27
- ...typography.caption,
28
- color: colors.strong,
29
- marginLeft: 16
30
- }
31
- }, caption),
32
- style: style
33
- });
34
- };
35
- export default withTheme(RowHeadlineImageCaption);
@@ -1,41 +0,0 @@
1
- import * as React from "react";
2
- import { withTheme } from "../theming";
3
- import Row from "./Row";
4
- import Config from "./Config";
5
- const RowHeadlineImageIcon = _ref => {
6
- let {
7
- Icon,
8
- icon,
9
- title,
10
- image,
11
- subtitle,
12
- multilineSubtitle = false,
13
- style,
14
- theme: {
15
- colors,
16
- typography
17
- }
18
- } = _ref;
19
- return /*#__PURE__*/React.createElement(Row, {
20
- titleTypeStyle: typography.headline6,
21
- titleColor: colors.strong,
22
- subtitleTypeStyle: typography.body2,
23
- subtitleColor: colors.medium,
24
- title: title,
25
- subtitle: subtitle,
26
- multilineSubtitle: multilineSubtitle,
27
- image: image,
28
- right: () => /*#__PURE__*/React.createElement(Icon, {
29
- name: icon,
30
- size: multilineSubtitle ? Config.rowMultiLineIconSize : Config.rowSingleLineIconSize,
31
- color: colors.light,
32
- style: {
33
- marginLeft: 16,
34
- alignSelf: multilineSubtitle ? "flex-start" : "center",
35
- marginTop: multilineSubtitle ? 4 : 0
36
- }
37
- }),
38
- style: style
39
- });
40
- };
41
- export default withTheme(RowHeadlineImageIcon);
@@ -1,21 +0,0 @@
1
- import * as React from "react";
2
- import { ImageSourcePropType, StyleProp, TextStyle, ViewStyle } from "react-native";
3
- import theme from "../styles/DefaultTheme";
4
- declare type Props = {
5
- titleTypeStyle?: StyleProp<TextStyle>;
6
- titleColor?: string;
7
- subtitleTypeStyle?: StyleProp<TextStyle>;
8
- subtitleColor?: string;
9
- title?: string;
10
- subtitle?: string;
11
- multilineSubtitle?: boolean;
12
- image?: string | ImageSourcePropType;
13
- right?: () => React.ReactNode;
14
- style?: StyleProp<ViewStyle>;
15
- theme: typeof theme;
16
- };
17
- declare const _default: React.ComponentType<import("@draftbit/react-theme-provider").$Without<React.PropsWithChildren<Props>, "theme"> & {
18
- theme?: import("@draftbit/react-theme-provider").$DeepPartial<any> | undefined;
19
- }> & import("@draftbit/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<React.PropsWithChildren<Props>> & React.FC<React.PropsWithChildren<Props>>, {}>;
20
- export default _default;
21
- //# sourceMappingURL=Row.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Row.d.ts","sourceRoot":"","sources":["../../../../src/components/Row.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAIL,mBAAmB,EAEnB,SAAS,EACT,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,MAAM,wBAAwB,CAAC;AAE3C,aAAK,KAAK,GAAG;IACX,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACzC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,mBAAmB,CAAC;IACrC,KAAK,CAAC,EAAE,MAAM,KAAK,CAAC,SAAS,CAAC;IAC9B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,KAAK,EAAE,OAAO,KAAK,CAAC;CACrB,CAAC;;;;AAgFF,wBAA8B"}
@@ -1,16 +0,0 @@
1
- import * as React from "react";
2
- import type { Theme } from "../styles/DefaultTheme";
3
- import type { IconSlot } from "../interfaces/Icon";
4
- import { StyleProp, ViewStyle } from "react-native";
5
- declare type Props = {
6
- title?: string;
7
- subtitle?: string;
8
- icon: string;
9
- style?: StyleProp<ViewStyle>;
10
- theme: Theme;
11
- } & IconSlot;
12
- declare const _default: React.ComponentType<import("@draftbit/react-theme-provider").$Without<React.PropsWithChildren<Props>, "theme"> & {
13
- theme?: import("@draftbit/react-theme-provider").$DeepPartial<any> | undefined;
14
- }> & import("@draftbit/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<React.PropsWithChildren<Props>> & React.FC<React.PropsWithChildren<Props>>, {}>;
15
- export default _default;
16
- //# sourceMappingURL=RowBodyIcon.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RowBodyIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/RowBodyIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAInD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,aAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,KAAK,EAAE,KAAK,CAAC;CACd,GAAG,QAAQ,CAAC;;;;AA+Bb,wBAAsC"}
@@ -1,16 +0,0 @@
1
- import * as React from "react";
2
- import { ImageSourcePropType, StyleProp, ViewStyle } from "react-native";
3
- import theme from "../styles/DefaultTheme";
4
- declare type Props = {
5
- title?: string;
6
- subtitle?: string;
7
- caption?: string;
8
- image: string | ImageSourcePropType;
9
- style?: StyleProp<ViewStyle>;
10
- theme: typeof theme;
11
- };
12
- declare const _default: React.ComponentType<import("@draftbit/react-theme-provider").$Without<React.PropsWithChildren<Props>, "theme"> & {
13
- theme?: import("@draftbit/react-theme-provider").$DeepPartial<any> | undefined;
14
- }> & import("@draftbit/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<React.PropsWithChildren<Props>> & React.FC<React.PropsWithChildren<Props>>, {}>;
15
- export default _default;
16
- //# sourceMappingURL=RowHeadlineImageCaption.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RowHeadlineImageCaption.d.ts","sourceRoot":"","sources":["../../../../src/components/RowHeadlineImageCaption.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAQ,mBAAmB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG/E,OAAO,KAAK,MAAM,wBAAwB,CAAC;AAE3C,aAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,mBAAmB,CAAC;IACpC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,KAAK,EAAE,OAAO,KAAK,CAAC;CACrB,CAAC;;;;AAmCF,wBAAkD"}
@@ -1,18 +0,0 @@
1
- import * as React from "react";
2
- import type { Theme } from "../styles/DefaultTheme";
3
- import type { IconSlot } from "../interfaces/Icon";
4
- import { ImageSourcePropType, StyleProp, ViewStyle } from "react-native";
5
- declare type Props = {
6
- title?: string;
7
- image: string | ImageSourcePropType;
8
- subtitle?: string;
9
- multilineSubtitle?: boolean;
10
- icon: string;
11
- style?: StyleProp<ViewStyle>;
12
- theme: Theme;
13
- } & IconSlot;
14
- declare const _default: React.ComponentType<import("@draftbit/react-theme-provider").$Without<React.PropsWithChildren<Props>, "theme"> & {
15
- theme?: import("@draftbit/react-theme-provider").$DeepPartial<any> | undefined;
16
- }> & import("@draftbit/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<React.PropsWithChildren<Props>> & React.FC<React.PropsWithChildren<Props>>, {}>;
17
- export default _default;
18
- //# sourceMappingURL=RowHeadlineImageIcon.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RowHeadlineImageIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/RowHeadlineImageIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAInD,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzE,aAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,GAAG,mBAAmB,CAAC;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,KAAK,EAAE,KAAK,CAAC;CACd,GAAG,QAAQ,CAAC;;;;AA2Cb,wBAA+C"}
@@ -1,48 +0,0 @@
1
- import * as React from "react";
2
- import { View, Text, Image, StyleSheet, } from "react-native";
3
- import { withTheme } from "../theming";
4
- import Config from "./Config";
5
- const Row = ({ titleTypeStyle, titleColor, subtitleTypeStyle, subtitleColor, title, subtitle, multilineSubtitle, image, right, style, }) => {
6
- return (React.createElement(View, { style: [styles.container, { padding: 16 }, style] },
7
- React.createElement(View, { style: styles.leftContainer },
8
- image && (React.createElement(Image, { source: typeof image === "string" ? { uri: image } : image, style: {
9
- marginRight: 12,
10
- width: subtitle
11
- ? Config.rowMultiLineImageSize
12
- : Config.rowSingleLineImageSize,
13
- height: subtitle
14
- ? Config.rowMultiLineImageSize
15
- : Config.rowSingleLineImageSize,
16
- } })),
17
- React.createElement(View, { style: styles.textContainer },
18
- React.createElement(Text, { style: [
19
- titleTypeStyle,
20
- {
21
- color: titleColor,
22
- },
23
- ], numberOfLines: 1 }, title),
24
- subtitle ? (React.createElement(Text, { style: [
25
- subtitleTypeStyle,
26
- {
27
- color: subtitleColor,
28
- marginTop: 4,
29
- },
30
- ], numberOfLines: multilineSubtitle ? undefined : 1 }, subtitle)) : null)),
31
- right && right()));
32
- };
33
- const styles = StyleSheet.create({
34
- leftContainer: {
35
- flexDirection: "row",
36
- flex: 1,
37
- },
38
- container: {
39
- flexDirection: "row",
40
- justifyContent: "space-between",
41
- alignItems: "center",
42
- },
43
- textContainer: {
44
- flex: 1,
45
- justifyContent: "center",
46
- },
47
- });
48
- export default withTheme(Row);