@draftbit/core 46.10.3-a5cf6b.2 → 46.10.3-af3058.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 (35) 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/DeprecatedButton.js +3 -20
  4. package/lib/commonjs/mappings/CardBlock.js +126 -0
  5. package/lib/commonjs/mappings/CardContainer.js +108 -0
  6. package/lib/commonjs/mappings/CardContainerRating.js +130 -0
  7. package/lib/commonjs/mappings/CardContainerShortImage.js +124 -0
  8. package/lib/commonjs/mappings/CardInline.js +59 -0
  9. package/lib/module/components/TabView/TabView.js +7 -17
  10. package/lib/module/mappings/CardBlock.js +119 -0
  11. package/lib/module/mappings/CardContainer.js +101 -0
  12. package/lib/module/mappings/CardContainerRating.js +123 -0
  13. package/lib/module/mappings/CardContainerShortImage.js +117 -0
  14. package/lib/module/mappings/CardInline.js +52 -0
  15. package/lib/typescript/src/mappings/CardBlock.d.ts +289 -0
  16. package/lib/typescript/src/mappings/CardBlock.d.ts.map +1 -0
  17. package/lib/typescript/src/mappings/CardContainer.d.ts +102 -0
  18. package/lib/typescript/src/mappings/CardContainer.d.ts.map +1 -0
  19. package/lib/typescript/src/mappings/CardContainerRating.d.ts +108 -0
  20. package/lib/typescript/src/mappings/CardContainerRating.d.ts.map +1 -0
  21. package/lib/typescript/src/mappings/CardContainerShortImage.d.ts +139 -0
  22. package/lib/typescript/src/mappings/CardContainerShortImage.d.ts.map +1 -0
  23. package/lib/typescript/src/mappings/CardInline.d.ts +62 -0
  24. package/lib/typescript/src/mappings/CardInline.d.ts.map +1 -0
  25. package/package.json +3 -3
  26. package/src/mappings/CardBlock.js +123 -0
  27. package/src/mappings/CardBlock.ts +136 -0
  28. package/src/mappings/CardContainer.js +104 -0
  29. package/src/mappings/CardContainer.ts +116 -0
  30. package/src/mappings/CardContainerRating.js +126 -0
  31. package/src/mappings/CardContainerRating.ts +137 -0
  32. package/src/mappings/CardContainerShortImage.js +120 -0
  33. package/src/mappings/CardContainerShortImage.ts +130 -0
  34. package/src/mappings/CardInline.js +52 -0
  35. package/src/mappings/CardInline.ts +61 -0
@@ -14,8 +14,7 @@ var _Checkbox = _interopRequireDefault(require("./Checkbox"));
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
  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); }
16
16
  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; }
17
- 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); }
18
- let Direction;
17
+ var Direction;
19
18
  exports.Direction = Direction;
20
19
  (function (Direction) {
21
20
  Direction["Row"] = "row";
@@ -58,7 +57,6 @@ const CheckboxRow = _ref => {
58
57
  setInternalValue(status);
59
58
  }
60
59
  }, [status]);
61
-
62
60
  // This special logic is to handle weird APIs like Airtable that return
63
61
  // true or undefined for a boolean
64
62
  const previousDefaultValue = (0, _hooks.usePrevious)(defaultValue);
@@ -82,13 +80,14 @@ const CheckboxRow = _ref => {
82
80
  textStyles,
83
81
  viewStyles
84
82
  } = (0, _utilities.extractStyles)(style);
85
- return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
83
+ return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
86
84
  onPress: handlePress,
87
85
  style: [viewStyles, styles.mainParent, {
88
86
  flexDirection: direction
89
87
  }],
90
- disabled: disabled
91
- }, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
88
+ disabled: disabled,
89
+ ...rest
90
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
92
91
  style: [styles.label, {
93
92
  alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
94
93
  }, labelContainerStyle]
@@ -125,4 +124,22 @@ const styles = _reactNative.StyleSheet.create({
125
124
  }
126
125
  });
127
126
  var _default = CheckboxRow;
127
+ exports.default = _default;ems: "center",
128
+ justifyContent: "space-around",
129
+ paddingStart: 20,
130
+ minHeight: 50,
131
+ paddingEnd: 20,
132
+ display: "flex",
133
+ ..._reactNative.Platform.select({
134
+ web: {
135
+ cursor: "pointer",
136
+ userSelect: "none"
137
+ }
138
+ })
139
+ },
140
+ label: {
141
+ flex: 3
142
+ }
143
+ });
144
+ var _default = CheckboxRow;
128
145
  exports.default = _default;
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.checkboxGroupContext = exports.Direction = void 0;
7
7
  exports.useCheckboxGroupContext = useCheckboxGroupContext;
8
8
  var _react = require("react");
9
- let Direction;
9
+ var Direction;
10
10
  exports.Direction = Direction;
11
11
  (function (Direction) {
12
12
  Direction["Horizontal"] = "horizontal";
@@ -13,6 +13,7 @@ var _theming = require("../theming");
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
14
  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); }
15
15
  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; }
16
+ 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); }
16
17
  const Button = _ref => {
17
18
  let {
18
19
  Icon,
@@ -83,8 +84,7 @@ const Button = _ref => {
83
84
  elevation,
84
85
  alignSelf: "stretch"
85
86
  }
86
- }, /*#__PURE__*/React.createElement(_reactNative.Pressable, {
87
- ...rest,
87
+ }, /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({}, rest, {
88
88
  onPress: onPress,
89
89
  accessibilityState: {
90
90
  disabled
@@ -92,7 +92,7 @@ const Button = _ref => {
92
92
  accessibilityRole: "button",
93
93
  disabled: disabled || loading,
94
94
  style: [styles.button, buttonStyle]
95
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
95
+ }), /*#__PURE__*/React.createElement(_reactNative.View, {
96
96
  style: styles.content
97
97
  }, icon && loading !== true ? /*#__PURE__*/React.createElement(_reactNative.View, {
98
98
  style: iconStyle
@@ -124,21 +124,4 @@ const styles = _reactNative.StyleSheet.create({
124
124
  }
125
125
  });
126
126
  var _default = (0, _theming.withTheme)(Button);
127
- exports.default = _default;;
128
- };
129
- const styles = _reactNative.StyleSheet.create({
130
- button: {
131
- minWidth: 64,
132
- borderStyle: "solid"
133
- },
134
- content: {
135
- flexDirection: "row",
136
- alignItems: "center",
137
- justifyContent: "center"
138
- },
139
- icon: {
140
- width: _Config.default.buttonIconSize
141
- }
142
- });
143
- var _default = (0, _theming.withTheme)(Button);
144
127
  exports.default = _default;
@@ -0,0 +1,126 @@
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;
@@ -0,0 +1,108 @@
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;
@@ -0,0 +1,130 @@
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;
@@ -0,0 +1,124 @@
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: "Short Card (Left)",
10
+ tag: "CardContainerShortImage",
11
+ description: "An elevated card with a left aligned image and a title and subtitle",
12
+ category: _types.COMPONENT_TYPES.card,
13
+ stylesPanelSections: _types.BLOCK_STYLES_SECTIONS,
14
+ preview_image_url: "{CLOUDINARY_URL}/Card_ContainerShortLeftImage.png",
15
+ supports_list_render: true,
16
+ props: {
17
+ image: {
18
+ group: _types.GROUPS.data,
19
+ label: "Image",
20
+ description: "Image",
21
+ formType: _types.FORM_TYPES.image,
22
+ propType: _types.PROP_TYPES.ASSET,
23
+ defaultValue: null,
24
+ editable: true,
25
+ required: false
26
+ },
27
+ title: {
28
+ group: _types.GROUPS.data,
29
+ label: "Title",
30
+ description: "Title to display",
31
+ formType: _types.FORM_TYPES.string,
32
+ propType: _types.PROP_TYPES.STRING,
33
+ defaultValue: "Beautiful West Coast Villa",
34
+ editable: true,
35
+ required: false
36
+ },
37
+ subtitle: {
38
+ group: _types.GROUPS.data,
39
+ label: "Subtitle",
40
+ description: "Subtitle to display",
41
+ formType: _types.FORM_TYPES.string,
42
+ propType: _types.PROP_TYPES.STRING,
43
+ defaultValue: "San Diego",
44
+ editable: true,
45
+ required: false
46
+ },
47
+ aspectRatio: {
48
+ group: _types.GROUPS.basic,
49
+ label: "Aspect ratio",
50
+ description: "Aspect ratio of the image",
51
+ formType: _types.FORM_TYPES.aspectRatio,
52
+ propType: _types.PROP_TYPES.STRING,
53
+ defaultValue: null,
54
+ editable: true,
55
+ required: false
56
+ },
57
+ elevation: (0, _types.createElevationType)(2),
58
+ mode: {
59
+ group: _types.GROUPS.uncategorized,
60
+ label: "Image Side",
61
+ description: "The side on which the image is on (left or right)",
62
+ formType: _types.FORM_TYPES.flatArray,
63
+ propType: _types.PROP_TYPES.STRING,
64
+ defaultValue: "left",
65
+ options: ["left", "right"],
66
+ editable: false,
67
+ required: false
68
+ }
69
+ },
70
+ layout: {}
71
+ }, {
72
+ name: "Short Card (Right)",
73
+ tag: "CardContainerShortImage",
74
+ description: "An elevated card with a right aligned image and a title and subtitle",
75
+ category: _types.COMPONENT_TYPES.card,
76
+ stylesPanelSections: _types.BLOCK_STYLES_SECTIONS,
77
+ preview_image_url: "{CLOUDINARY_URL}/Card_ContainerShortRightImage.png",
78
+ supports_list_render: true,
79
+ props: {
80
+ image: {
81
+ group: _types.GROUPS.data,
82
+ label: "Image",
83
+ description: "Image",
84
+ formType: _types.FORM_TYPES.image,
85
+ propType: _types.PROP_TYPES.ASSET,
86
+ defaultValue: null,
87
+ editable: true,
88
+ required: false
89
+ },
90
+ title: {
91
+ group: _types.GROUPS.data,
92
+ label: "Title",
93
+ description: "Title to display",
94
+ formType: _types.FORM_TYPES.string,
95
+ propType: _types.PROP_TYPES.STRING,
96
+ defaultValue: "Beautiful West Coast Villa",
97
+ editable: true,
98
+ required: false
99
+ },
100
+ subtitle: {
101
+ group: _types.GROUPS.data,
102
+ label: "Subtitle",
103
+ description: "Subtitle to display",
104
+ formType: _types.FORM_TYPES.string,
105
+ propType: _types.PROP_TYPES.STRING,
106
+ defaultValue: "San Diego",
107
+ editable: true,
108
+ required: false
109
+ },
110
+ elevation: (0, _types.createElevationType)(2),
111
+ mode: {
112
+ label: "Mode",
113
+ description: "Mode",
114
+ group: _types.GROUPS.uncategorized,
115
+ formType: _types.FORM_TYPES.string,
116
+ propType: _types.PROP_TYPES.STRING,
117
+ defaultValue: "right",
118
+ editable: false,
119
+ required: false
120
+ }
121
+ },
122
+ layout: {}
123
+ }];
124
+ exports.SEED_DATA = SEED_DATA;
@@ -0,0 +1,59 @@
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: "Inline Card",
10
+ tag: "CardInline",
11
+ description: "An elevated card with image and a title and description overlayed, that takes up the full width of its container.",
12
+ category: _types.COMPONENT_TYPES.card,
13
+ stylesPanelSections: _types.BLOCK_STYLES_SECTIONS,
14
+ layout: {},
15
+ props: {
16
+ image: {
17
+ group: _types.GROUPS.data,
18
+ label: "Image",
19
+ description: "Image",
20
+ formType: _types.FORM_TYPES.image,
21
+ propType: _types.PROP_TYPES.ASSET,
22
+ defaultValue: null,
23
+ editable: true,
24
+ required: false
25
+ },
26
+ title: {
27
+ group: _types.GROUPS.data,
28
+ label: "Title",
29
+ description: "Text to display",
30
+ formType: _types.FORM_TYPES.string,
31
+ propType: _types.PROP_TYPES.STRING,
32
+ defaultValue: "Beautiful West Coast Villa",
33
+ editable: true,
34
+ required: false
35
+ },
36
+ subtitle: {
37
+ group: _types.GROUPS.data,
38
+ label: "Subtitle",
39
+ description: "Subtitle text",
40
+ formType: _types.FORM_TYPES.string,
41
+ propType: _types.PROP_TYPES.STRING,
42
+ defaultValue: "San Diego",
43
+ editable: true,
44
+ required: false
45
+ },
46
+ aspectRatio: {
47
+ group: _types.GROUPS.basic,
48
+ label: "Aspect ratio",
49
+ description: "Aspect ratio of the image",
50
+ formType: _types.FORM_TYPES.aspectRatio,
51
+ propType: _types.PROP_TYPES.NUMBER,
52
+ defaultValue: 1.5,
53
+ editable: true,
54
+ required: false
55
+ },
56
+ elevation: (0, _types.createElevationType)(2)
57
+ }
58
+ };
59
+ exports.SEED_DATA = SEED_DATA;