@draftbit/core 46.10.3-93b2ea.2 → 46.10.3-a5cf6b.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 (112) hide show
  1. package/lib/commonjs/components/Checkbox/CheckboxRow.js +6 -23
  2. package/lib/commonjs/components/DeprecatedButton.js +20 -3
  3. package/lib/commonjs/index.js +0 -28
  4. package/lib/commonjs/mappings/NativeBase/Layout.js +108 -0
  5. package/lib/module/components/TabView/TabView.js +17 -7
  6. package/lib/module/index.js +0 -4
  7. package/lib/module/mappings/NativeBase/Layout.js +101 -0
  8. package/lib/typescript/src/index.d.ts +0 -4
  9. package/lib/typescript/src/index.d.ts.map +1 -1
  10. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +133 -0
  11. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +1 -0
  12. package/package.json +3 -3
  13. package/src/index.js +0 -4
  14. package/src/index.tsx +0 -4
  15. package/src/mappings/NativeBase/Layout.js +124 -0
  16. package/src/mappings/NativeBase/Layout.ts +145 -0
  17. package/lib/commonjs/components/Container.js +0 -93
  18. package/lib/commonjs/components/DeprecatedCardWrapper.js +0 -40
  19. package/lib/commonjs/components/DeprecatedFAB.js +0 -157
  20. package/lib/commonjs/components/ProgressIndicator.js +0 -55
  21. package/lib/commonjs/components/ResizeMode.js +0 -5
  22. package/lib/commonjs/components/Row.js +0 -73
  23. package/lib/commonjs/components/RowBodyIcon.js +0 -45
  24. package/lib/commonjs/components/RowHeadlineImageCaption.js +0 -45
  25. package/lib/commonjs/components/RowHeadlineImageIcon.js +0 -51
  26. package/lib/commonjs/mappings/CardBlock.js +0 -126
  27. package/lib/commonjs/mappings/CardContainer.js +0 -108
  28. package/lib/commonjs/mappings/CardContainerRating.js +0 -130
  29. package/lib/commonjs/mappings/CardContainerShortImage.js +0 -124
  30. package/lib/commonjs/mappings/CardInline.js +0 -59
  31. package/lib/commonjs/mappings/Container.js +0 -37
  32. package/lib/commonjs/mappings/ProgressIndicator.js +0 -188
  33. package/lib/module/components/Container.js +0 -83
  34. package/lib/module/components/DeprecatedCardWrapper.js +0 -32
  35. package/lib/module/components/DeprecatedFAB.js +0 -147
  36. package/lib/module/components/ProgressIndicator.js +0 -45
  37. package/lib/module/components/ResizeMode.js +0 -1
  38. package/lib/module/components/Row.js +0 -63
  39. package/lib/module/components/RowBodyIcon.js +0 -35
  40. package/lib/module/components/RowHeadlineImageCaption.js +0 -35
  41. package/lib/module/components/RowHeadlineImageIcon.js +0 -41
  42. package/lib/module/mappings/CardBlock.js +0 -119
  43. package/lib/module/mappings/CardContainer.js +0 -101
  44. package/lib/module/mappings/CardContainerRating.js +0 -123
  45. package/lib/module/mappings/CardContainerShortImage.js +0 -117
  46. package/lib/module/mappings/CardInline.js +0 -52
  47. package/lib/module/mappings/Container.js +0 -30
  48. package/lib/module/mappings/ProgressIndicator.js +0 -181
  49. package/lib/typescript/src/components/Container.d.ts +0 -21
  50. package/lib/typescript/src/components/Container.d.ts.map +0 -1
  51. package/lib/typescript/src/components/DeprecatedCardWrapper.d.ts +0 -15
  52. package/lib/typescript/src/components/DeprecatedCardWrapper.d.ts.map +0 -1
  53. package/lib/typescript/src/components/DeprecatedFAB.d.ts +0 -56
  54. package/lib/typescript/src/components/DeprecatedFAB.d.ts.map +0 -1
  55. package/lib/typescript/src/components/ProgressIndicator.d.ts +0 -24
  56. package/lib/typescript/src/components/ProgressIndicator.d.ts.map +0 -1
  57. package/lib/typescript/src/components/ResizeMode.d.ts +0 -2
  58. package/lib/typescript/src/components/ResizeMode.d.ts.map +0 -1
  59. package/lib/typescript/src/components/Row.d.ts +0 -21
  60. package/lib/typescript/src/components/Row.d.ts.map +0 -1
  61. package/lib/typescript/src/components/RowBodyIcon.d.ts +0 -16
  62. package/lib/typescript/src/components/RowBodyIcon.d.ts.map +0 -1
  63. package/lib/typescript/src/components/RowHeadlineImageCaption.d.ts +0 -16
  64. package/lib/typescript/src/components/RowHeadlineImageCaption.d.ts.map +0 -1
  65. package/lib/typescript/src/components/RowHeadlineImageIcon.d.ts +0 -18
  66. package/lib/typescript/src/components/RowHeadlineImageIcon.d.ts.map +0 -1
  67. package/lib/typescript/src/mappings/CardBlock.d.ts +0 -289
  68. package/lib/typescript/src/mappings/CardBlock.d.ts.map +0 -1
  69. package/lib/typescript/src/mappings/CardContainer.d.ts +0 -102
  70. package/lib/typescript/src/mappings/CardContainer.d.ts.map +0 -1
  71. package/lib/typescript/src/mappings/CardContainerRating.d.ts +0 -108
  72. package/lib/typescript/src/mappings/CardContainerRating.d.ts.map +0 -1
  73. package/lib/typescript/src/mappings/CardContainerShortImage.d.ts +0 -139
  74. package/lib/typescript/src/mappings/CardContainerShortImage.d.ts.map +0 -1
  75. package/lib/typescript/src/mappings/CardInline.d.ts +0 -62
  76. package/lib/typescript/src/mappings/CardInline.d.ts.map +0 -1
  77. package/lib/typescript/src/mappings/Container.d.ts +0 -55
  78. package/lib/typescript/src/mappings/Container.d.ts.map +0 -1
  79. package/lib/typescript/src/mappings/ProgressIndicator.d.ts +0 -181
  80. package/lib/typescript/src/mappings/ProgressIndicator.d.ts.map +0 -1
  81. package/src/components/Container.js +0 -43
  82. package/src/components/Container.tsx +0 -116
  83. package/src/components/DeprecatedCardWrapper.js +0 -18
  84. package/src/components/DeprecatedCardWrapper.tsx +0 -46
  85. package/src/components/DeprecatedFAB.js +0 -114
  86. package/src/components/DeprecatedFAB.tsx +0 -231
  87. package/src/components/ProgressIndicator.js +0 -27
  88. package/src/components/ProgressIndicator.tsx +0 -71
  89. package/src/components/ResizeMode.js +0 -1
  90. package/src/components/ResizeMode.ts +0 -7
  91. package/src/components/Row.js +0 -48
  92. package/src/components/Row.tsx +0 -108
  93. package/src/components/RowBodyIcon.js +0 -8
  94. package/src/components/RowBodyIcon.tsx +0 -47
  95. package/src/components/RowHeadlineImageCaption.js +0 -12
  96. package/src/components/RowHeadlineImageCaption.tsx +0 -49
  97. package/src/components/RowHeadlineImageIcon.js +0 -14
  98. package/src/components/RowHeadlineImageIcon.tsx +0 -61
  99. package/src/mappings/CardBlock.js +0 -123
  100. package/src/mappings/CardBlock.ts +0 -136
  101. package/src/mappings/CardContainer.js +0 -104
  102. package/src/mappings/CardContainer.ts +0 -116
  103. package/src/mappings/CardContainerRating.js +0 -126
  104. package/src/mappings/CardContainerRating.ts +0 -137
  105. package/src/mappings/CardContainerShortImage.js +0 -120
  106. package/src/mappings/CardContainerShortImage.ts +0 -130
  107. package/src/mappings/CardInline.js +0 -52
  108. package/src/mappings/CardInline.ts +0 -61
  109. package/src/mappings/Container.js +0 -30
  110. package/src/mappings/Container.ts +0 -41
  111. package/src/mappings/ProgressIndicator.js +0 -181
  112. package/src/mappings/ProgressIndicator.ts +0 -190
@@ -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,126 +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_PROPS = {
9
- image: {
10
- group: _types.GROUPS.data,
11
- label: "Image",
12
- description: "Image",
13
- formType: _types.FORM_TYPES.image,
14
- propType: _types.PROP_TYPES.ASSET,
15
- defaultValue: null,
16
- editable: true,
17
- required: false
18
- },
19
- title: {
20
- group: _types.GROUPS.data,
21
- label: "Title",
22
- description: "Text to display",
23
- formType: _types.FORM_TYPES.string,
24
- propType: _types.PROP_TYPES.STRING,
25
- defaultValue: "Beautiful West Coast Villa",
26
- editable: true,
27
- required: false
28
- },
29
- leftDescription: {
30
- group: _types.GROUPS.data,
31
- label: "Left description",
32
- description: "Text to display on the left",
33
- formType: _types.FORM_TYPES.string,
34
- propType: _types.PROP_TYPES.STRING,
35
- defaultValue: "San Diego",
36
- editable: true,
37
- required: false
38
- },
39
- rightDescription: {
40
- group: _types.GROUPS.data,
41
- label: "Right description",
42
- description: "Text to display on the right",
43
- formType: _types.FORM_TYPES.string,
44
- propType: _types.PROP_TYPES.STRING,
45
- defaultValue: "$100",
46
- editable: true,
47
- required: false
48
- },
49
- aspectRatio: {
50
- group: _types.GROUPS.basic,
51
- label: "Aspect ratio",
52
- description: "Aspect ratio of the image",
53
- formType: _types.FORM_TYPES.aspectRatio,
54
- propType: _types.PROP_TYPES.NUMBER,
55
- defaultValue: 1.5,
56
- editable: true,
57
- required: false
58
- },
59
- titleCentered: {
60
- group: _types.GROUPS.basic,
61
- label: "Title centered",
62
- description: "Whether to center the title",
63
- formType: _types.FORM_TYPES.boolean,
64
- propType: _types.PROP_TYPES.BOOLEAN,
65
- defaultValue: false,
66
- editable: true,
67
- required: false
68
- },
69
- elevation: (0, _types.createElevationType)(2)
70
- };
71
- const SEED_DATA = [{
72
- name: "Small Card",
73
- tag: "CardBlock",
74
- description: "An elevated card with a title and description, that takes up one third of its container.",
75
- category: _types.COMPONENT_TYPES.card,
76
- props: {
77
- ...SEED_DATA_PROPS,
78
- numColumns: (0, _types.createNumColumnsType)({
79
- defaultValue: 1
80
- })
81
- }
82
- }, {
83
- name: "Medium Block Card",
84
- tag: "CardBlock",
85
- description: "An elevated card with a title and description, that takes up one half of its container.",
86
- category: _types.COMPONENT_TYPES.card,
87
- props: {
88
- ...SEED_DATA_PROPS,
89
- icon: {
90
- group: _types.GROUPS.basic,
91
- label: "Icon",
92
- description: "Icon to display on the top right",
93
- formType: _types.FORM_TYPES.icon,
94
- propType: _types.PROP_TYPES.STRING,
95
- defaultValue: null,
96
- editable: true,
97
- required: true
98
- },
99
- numColumns: (0, _types.createNumColumnsType)({
100
- defaultValue: 2
101
- })
102
- }
103
- }, {
104
- name: "Large Block Card",
105
- tag: "CardBlock",
106
- description: "An elevated card with a title and description, that takes up the full width its container.",
107
- category: _types.COMPONENT_TYPES.card,
108
- stylesPanelSections: _types.BLOCK_STYLES_SECTIONS,
109
- props: {
110
- ...SEED_DATA_PROPS,
111
- icon: {
112
- group: _types.GROUPS.basic,
113
- label: "Icon",
114
- description: "Icon to display on the top right",
115
- formType: _types.FORM_TYPES.icon,
116
- propType: _types.PROP_TYPES.STRING,
117
- defaultValue: null,
118
- editable: true,
119
- required: true
120
- },
121
- numColumns: (0, _types.createNumColumnsType)({
122
- defaultValue: 3
123
- })
124
- }
125
- }];
126
- exports.SEED_DATA = SEED_DATA;
@@ -1,108 +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_PROPS = {
9
- image: {
10
- label: "Image",
11
- description: "Image",
12
- formType: _types.FORM_TYPES.image,
13
- propType: _types.PROP_TYPES.ASSET,
14
- defaultValue: null,
15
- editable: true,
16
- required: true,
17
- group: _types.GROUPS.data
18
- },
19
- title: {
20
- label: "Title",
21
- description: "Text to display",
22
- formType: _types.FORM_TYPES.string,
23
- propType: _types.PROP_TYPES.STRING,
24
- defaultValue: "Beautiful West Coast Villa",
25
- editable: true,
26
- required: false,
27
- group: _types.GROUPS.data
28
- },
29
- leftDescription: {
30
- label: "Left description",
31
- description: "Text to display on the left",
32
- formType: _types.FORM_TYPES.string,
33
- propType: _types.PROP_TYPES.STRING,
34
- defaultValue: "San Diego",
35
- editable: true,
36
- required: false,
37
- group: _types.GROUPS.data
38
- },
39
- rightDescription: {
40
- label: "Right description",
41
- description: "Text to display on the right",
42
- formType: _types.FORM_TYPES.string,
43
- propType: _types.PROP_TYPES.STRING,
44
- defaultValue: "$100",
45
- editable: true,
46
- required: false,
47
- group: _types.GROUPS.data
48
- },
49
- icon: {
50
- label: "Icon",
51
- description: "Icon to display on the top right",
52
- formType: _types.FORM_TYPES.icon,
53
- propType: _types.PROP_TYPES.STRING /* OR ASSET TODO TEST ME */,
54
- defaultValue: null,
55
- editable: true,
56
- required: false,
57
- group: _types.GROUPS.basic
58
- },
59
- aspectRatio: {
60
- label: "Aspect ratio",
61
- description: "Aspect ratio of the image",
62
- formType: _types.FORM_TYPES.aspectRatio,
63
- propType: _types.PROP_TYPES.NUMBER,
64
- defaultValue: 1.5,
65
- editable: true,
66
- required: false,
67
- group: _types.GROUPS.basic
68
- },
69
- textCentered: {
70
- label: "Centered Text",
71
- description: "Whether to center the text",
72
- formType: _types.FORM_TYPES.boolean,
73
- propType: _types.PROP_TYPES.BOOLEAN,
74
- defaultValue: false,
75
- editable: true,
76
- required: false,
77
- group: _types.GROUPS.basic
78
- },
79
- elevation: (0, _types.createElevationType)(2)
80
- };
81
- const SEED_DATA = [{
82
- name: "Medium Card",
83
- tag: "CardContainer",
84
- description: "An elevated card with a title and description, that takes up half of its container.",
85
- category: _types.COMPONENT_TYPES.card,
86
- stylesPanelSections: _types.BLOCK_STYLES_SECTIONS,
87
- layout: null,
88
- props: {
89
- ...SEED_DATA_PROPS,
90
- numColumns: (0, _types.createNumColumnsType)({
91
- defaultValue: 2
92
- })
93
- }
94
- }, {
95
- name: "Large Card",
96
- tag: "CardContainer",
97
- description: "An elevated card with a title and description, that takes up its full container.",
98
- category: _types.COMPONENT_TYPES.card,
99
- stylesPanelSections: _types.BLOCK_STYLES_SECTIONS,
100
- layout: null,
101
- props: {
102
- ...SEED_DATA_PROPS,
103
- numColumns: (0, _types.createNumColumnsType)({
104
- defaultValue: 3
105
- })
106
- }
107
- }];
108
- exports.SEED_DATA = SEED_DATA;
@@ -1,130 +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_PROPS = {
9
- image: {
10
- group: _types.GROUPS.data,
11
- label: "Image",
12
- description: "Image",
13
- formType: _types.FORM_TYPES.image,
14
- propType: _types.PROP_TYPES.ASSET,
15
- defaultValue: null,
16
- editable: true,
17
- required: false
18
- },
19
- title: {
20
- group: _types.GROUPS.data,
21
- label: "Title",
22
- description: "Text to display",
23
- formType: _types.FORM_TYPES.string,
24
- propType: _types.PROP_TYPES.STRING,
25
- defaultValue: "Beautiful West Coast Villa",
26
- editable: true,
27
- required: false
28
- },
29
- leftDescription: {
30
- group: _types.GROUPS.data,
31
- label: "Left description",
32
- description: "Text to display on the left",
33
- formType: _types.FORM_TYPES.string,
34
- propType: _types.PROP_TYPES.STRING,
35
- defaultValue: "San Diego",
36
- editable: true,
37
- required: false
38
- },
39
- rightDescription: {
40
- group: _types.GROUPS.data,
41
- label: "Right description",
42
- description: "Text to display on the right",
43
- formType: _types.FORM_TYPES.string,
44
- propType: _types.PROP_TYPES.STRING,
45
- defaultValue: "$100",
46
- editable: true,
47
- required: false
48
- },
49
- icon: {
50
- group: _types.GROUPS.basic,
51
- label: "Icon",
52
- description: "Icon to display on the top right",
53
- formType: _types.FORM_TYPES.icon,
54
- propType: _types.PROP_TYPES.ASSET,
55
- defaultValue: null,
56
- editable: true,
57
- required: false
58
- },
59
- aspectRatio: {
60
- group: _types.GROUPS.basic,
61
- label: "Aspect ratio",
62
- description: "Aspect ratio of the image",
63
- formType: _types.FORM_TYPES.aspectRatio,
64
- propType: _types.PROP_TYPES.NUMBER,
65
- defaultValue: 1.5,
66
- editable: true,
67
- required: false
68
- },
69
- rating: {
70
- group: _types.GROUPS.data,
71
- label: "Rating",
72
- description: "Number of stars to show. A number 0-5.",
73
- formType: _types.FORM_TYPES.number,
74
- propType: _types.PROP_TYPES.NUMBER,
75
- defaultValue: 5,
76
- min: 0,
77
- max: 5,
78
- step: 1,
79
- precision: 0,
80
- editable: true,
81
- required: false
82
- },
83
- elevation: (0, _types.createElevationType)(2)
84
- };
85
- const SEED_DATA = [{
86
- name: "Medium Card (Rating)",
87
- tag: "CardContainerRating",
88
- description: "An elevated card with a title and description, that takes up half of its container.",
89
- category: _types.COMPONENT_TYPES.card,
90
- stylesPanelSections: _types.BLOCK_STYLES_SECTIONS,
91
- preview_image_url: "{CLOUDINARY_URL}/Card_ContainerRating_2col.png",
92
- supports_list_render: true,
93
- props: {
94
- ...SEED_DATA_PROPS,
95
- numColumns: {
96
- label: "Number of Columns",
97
- description: "Numbre of columns",
98
- group: _types.GROUPS.uncategorized,
99
- formType: _types.FORM_TYPES.number,
100
- propType: _types.PROP_TYPES.NUMBER,
101
- defaultValue: 2,
102
- editable: false,
103
- required: false
104
- }
105
- },
106
- layout: {}
107
- }, {
108
- name: "Large Card (Rating)",
109
- tag: "CardContainerRating",
110
- description: "An elevated card with a title and description, that takes up its full container.",
111
- category: _types.COMPONENT_TYPES.card,
112
- stylesPanelSections: _types.BLOCK_STYLES_SECTIONS,
113
- preview_image_url: "{CLOUDINARY_URL}/Card_ContainerRating_3col.png",
114
- supports_list_render: true,
115
- props: {
116
- ...SEED_DATA_PROPS,
117
- numColumns: {
118
- label: "Number of Columns",
119
- description: "Numbre of columns",
120
- group: _types.GROUPS.uncategorized,
121
- formType: _types.FORM_TYPES.number,
122
- propType: _types.PROP_TYPES.NUMBER,
123
- defaultValue: 3,
124
- editable: false,
125
- required: false
126
- }
127
- },
128
- layout: {}
129
- }];
130
- exports.SEED_DATA = SEED_DATA;