@draftbit/core 43.4.0 → 43.4.2-b9b13c.1

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 (66) hide show
  1. package/lib/commonjs/components/Accordion/AccordionGroup.js +3 -5
  2. package/lib/commonjs/components/Accordion/AccordionGroup.js.map +1 -1
  3. package/lib/commonjs/components/DeprecatedFAB.js +4 -20
  4. package/lib/commonjs/components/DeprecatedFAB.js.map +1 -1
  5. package/lib/commonjs/components/Divider.js +3 -13
  6. package/lib/commonjs/components/Divider.js.map +1 -1
  7. package/lib/commonjs/components/FAB.js +19 -5
  8. package/lib/commonjs/components/FAB.js.map +1 -1
  9. package/lib/commonjs/components/FieldSearchBarFull.js.map +1 -1
  10. package/lib/commonjs/components/LinearGradient.js +52 -0
  11. package/lib/commonjs/components/LinearGradient.js.map +1 -0
  12. package/lib/commonjs/components/Stepper.js +9 -2
  13. package/lib/commonjs/components/Stepper.js.map +1 -1
  14. package/lib/commonjs/index.js +8 -0
  15. package/lib/commonjs/index.js.map +1 -1
  16. package/lib/commonjs/mappings/LinearGradient.js +63 -11
  17. package/lib/commonjs/mappings/LinearGradient.js.map +1 -1
  18. package/lib/commonjs/mappings/RadioButtonGroup.js.map +1 -1
  19. package/lib/commonjs/mappings/RadioButtonRow.js.map +1 -1
  20. package/lib/commonjs/mappings/RowHeadlineImageIcon.js.map +1 -1
  21. package/lib/commonjs/mappings/Stepper.js +1 -2
  22. package/lib/commonjs/mappings/Stepper.js.map +1 -1
  23. package/lib/module/components/Accordion/AccordionGroup.js +3 -5
  24. package/lib/module/components/Accordion/AccordionGroup.js.map +1 -1
  25. package/lib/module/components/LinearGradient.js +38 -0
  26. package/lib/module/components/LinearGradient.js.map +1 -0
  27. package/lib/module/components/Stepper.js +9 -2
  28. package/lib/module/components/Stepper.js.map +1 -1
  29. package/lib/module/index.js +1 -0
  30. package/lib/module/index.js.map +1 -1
  31. package/lib/module/mappings/Carousel.js.map +1 -1
  32. package/lib/module/mappings/LinearGradient.js +64 -12
  33. package/lib/module/mappings/LinearGradient.js.map +1 -1
  34. package/lib/module/mappings/ScrollView.js.map +1 -1
  35. package/lib/module/mappings/Stepper.js +1 -2
  36. package/lib/module/mappings/Stepper.js.map +1 -1
  37. package/lib/typescript/src/components/LinearGradient.d.ts +15 -0
  38. package/lib/typescript/src/index.d.ts +1 -0
  39. package/lib/typescript/src/mappings/LinearGradient.d.ts +79 -6
  40. package/package.json +3 -2
  41. package/src/components/Accordion/AccordionGroup.js +2 -5
  42. package/src/components/Accordion/AccordionGroup.tsx +9 -5
  43. package/src/components/LinearGradient.js +11 -0
  44. package/src/components/LinearGradient.tsx +40 -0
  45. package/src/components/Stepper.js +2 -2
  46. package/src/components/Stepper.tsx +4 -1
  47. package/src/index.js +1 -0
  48. package/src/index.tsx +1 -0
  49. package/src/mappings/LinearGradient.js +64 -12
  50. package/src/mappings/LinearGradient.ts +69 -13
  51. package/src/mappings/Stepper.js +0 -1
  52. package/src/mappings/Stepper.ts +0 -1
  53. package/lib/commonjs/mappings/DeprecatedButton.js +0 -111
  54. package/lib/commonjs/mappings/DeprecatedButton.js.map +0 -1
  55. package/lib/commonjs/mappings/DeprecatedFAB.js +0 -147
  56. package/lib/commonjs/mappings/DeprecatedFAB.js.map +0 -1
  57. package/lib/module/mappings/DeprecatedButton.js +0 -102
  58. package/lib/module/mappings/DeprecatedButton.js.map +0 -1
  59. package/lib/module/mappings/DeprecatedFAB.js +0 -138
  60. package/lib/module/mappings/DeprecatedFAB.js.map +0 -1
  61. package/lib/typescript/src/mappings/DeprecatedButton.d.ts +0 -89
  62. package/lib/typescript/src/mappings/DeprecatedFAB.d.ts +0 -178
  63. package/src/mappings/DeprecatedButton.js +0 -106
  64. package/src/mappings/DeprecatedButton.ts +0 -115
  65. package/src/mappings/DeprecatedFAB.js +0 -146
  66. package/src/mappings/DeprecatedFAB.ts +0 -153
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "43.4.0",
3
+ "version": "43.4.2-b9b13c.1+b9b13ca3",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -49,6 +49,7 @@
49
49
  "color": "^3.1.2",
50
50
  "date-fns": "^2.16.1",
51
51
  "dateformat": "^3.0.3",
52
+ "expo-linear-gradient": "^9.2.0",
52
53
  "lodash.isnumber": "^3.0.3",
53
54
  "lodash.omit": "^4.5.0",
54
55
  "lodash.tonumber": "^4.0.3",
@@ -79,5 +80,5 @@
79
80
  ]
80
81
  ]
81
82
  },
82
- "gitHead": "0a899449b1da634c8dc74ec64f1c78f5af3283e3"
83
+ "gitHead": "b9b13ca37a0752d2dcc86f09458ddbf6f321eca5"
83
84
  }
@@ -15,7 +15,7 @@ const AccordionGroup = ({ Icon, openColor, closedColor, caretColor, icon, iconSi
15
15
  const { textStyles, viewStyles } = extractStyles(style);
16
16
  return (React.createElement(React.Fragment, null,
17
17
  React.createElement(Pressable, { style: [styles.row, viewStyles], onPress: handlePressAction, accessibilityRole: "button" },
18
- icon ? React.createElement(Icon, { name: icon, size: iconSize, color: labelColor }) : null,
18
+ icon ? (React.createElement(Icon, { name: icon, size: iconSize, color: labelColor, style: styles.icon })) : null,
19
19
  React.createElement(View, { style: styles.content },
20
20
  React.createElement(Text, { selectable: false, style: [
21
21
  {
@@ -33,15 +33,12 @@ const styles = StyleSheet.create({
33
33
  flexDirection: "row",
34
34
  alignItems: "center",
35
35
  },
36
- label: {
37
- fontSize: 16,
38
- },
39
36
  content: {
40
37
  flex: 1,
41
38
  justifyContent: "center",
42
39
  },
43
40
  icon: {
44
- marginLeft: 8,
41
+ marginRight: 8,
45
42
  },
46
43
  });
47
44
  export default withTheme(AccordionGroup);
@@ -62,7 +62,14 @@ const AccordionGroup = ({
62
62
  onPress={handlePressAction}
63
63
  accessibilityRole="button"
64
64
  >
65
- {icon ? <Icon name={icon} size={iconSize} color={labelColor} /> : null}
65
+ {icon ? (
66
+ <Icon
67
+ name={icon}
68
+ size={iconSize}
69
+ color={labelColor}
70
+ style={styles.icon}
71
+ />
72
+ ) : null}
66
73
  <View style={styles.content}>
67
74
  <Text
68
75
  selectable={false}
@@ -96,15 +103,12 @@ const styles = StyleSheet.create({
96
103
  flexDirection: "row",
97
104
  alignItems: "center",
98
105
  },
99
- label: {
100
- fontSize: 16,
101
- },
102
106
  content: {
103
107
  flex: 1,
104
108
  justifyContent: "center",
105
109
  },
106
110
  icon: {
107
- marginLeft: 8,
111
+ marginRight: 8,
108
112
  },
109
113
  });
110
114
 
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ import { LinearGradient } from "expo-linear-gradient";
3
+ import { extractStyles } from "../utilities";
4
+ const LinearGradientComponent = ({ children, color1, color2, color3 = undefined, startX = 0, startY = 0, endX = 100, endY = 100, style, }) => {
5
+ const { viewStyles } = extractStyles(style);
6
+ const colors = [color1, color2, color3].filter((color) => color);
7
+ const start = { x: startX / 100, y: startY / 100 };
8
+ const end = { x: endX / 100, y: endY / 100 };
9
+ return (React.createElement(LinearGradient, { colors: colors, start: start, end: end, style: viewStyles }, children));
10
+ };
11
+ export default LinearGradientComponent;
@@ -0,0 +1,40 @@
1
+ import * as React from "react";
2
+ import { StyleProp, ViewStyle } from "react-native";
3
+ import { LinearGradient } from "expo-linear-gradient";
4
+ import { extractStyles } from "../utilities";
5
+
6
+ type LinearGradientComponentProps = {
7
+ color1: string;
8
+ color2: string;
9
+ color3?: string;
10
+ startX: number;
11
+ startY: number;
12
+ endX: number;
13
+ endY: number;
14
+ children?: React.ReactNode;
15
+ style?: StyleProp<ViewStyle>;
16
+ };
17
+
18
+ const LinearGradientComponent = ({
19
+ children,
20
+ color1,
21
+ color2,
22
+ color3 = undefined,
23
+ startX = 0,
24
+ startY = 0,
25
+ endX = 100,
26
+ endY = 100,
27
+ style,
28
+ }: LinearGradientComponentProps) => {
29
+ const { viewStyles } = extractStyles(style);
30
+ const colors = [color1, color2, color3].filter((color) => color) as string[];
31
+ const start = { x: startX / 100, y: startY / 100 };
32
+ const end = { x: endX / 100, y: endY / 100 };
33
+ return (
34
+ <LinearGradient colors={colors} start={start} end={end} style={viewStyles}>
35
+ {children}
36
+ </LinearGradient>
37
+ );
38
+ };
39
+
40
+ export default LinearGradientComponent;
@@ -37,7 +37,7 @@ const Stepper = ({ Icon, value, min, max, style, onChange, defaultValue, theme:
37
37
  style,
38
38
  borderRadius ? { borderRadius } : {},
39
39
  ] },
40
- React.createElement(IconButton, { Icon: Icon, icon: "MaterialIcons/remove", onPress: handleMinus, size: iconSize, color: iconColor, disabled: stateValue === 0 }),
40
+ React.createElement(IconButton, { Icon: Icon, icon: "MaterialIcons/remove", onPress: handleMinus, size: iconSize, color: iconColor, disabled: stateValue === min, style: stateValue === min ? { opacity: 0.5 } : {} }),
41
41
  React.createElement(Text, { style: [
42
42
  typography.body1,
43
43
  {
@@ -48,6 +48,6 @@ const Stepper = ({ Icon, value, min, max, style, onChange, defaultValue, theme:
48
48
  },
49
49
  typeStyle,
50
50
  ] }, value || stateValue),
51
- React.createElement(IconButton, { Icon: Icon, icon: "MaterialIcons/add", onPress: handlePlus, size: iconSize, color: iconColor })));
51
+ React.createElement(IconButton, { Icon: Icon, icon: "MaterialIcons/add", onPress: handlePlus, size: iconSize, color: iconColor, disabled: stateValue === max, style: stateValue === max ? { opacity: 0.5 } : {} })));
52
52
  };
53
53
  export default withTheme(Stepper);
@@ -84,7 +84,8 @@ const Stepper: React.FC<Props> = ({
84
84
  onPress={handleMinus}
85
85
  size={iconSize}
86
86
  color={iconColor}
87
- disabled={stateValue === 0}
87
+ disabled={stateValue === min}
88
+ style={stateValue === min ? { opacity: 0.5 } : {}}
88
89
  />
89
90
  <Text
90
91
  style={[
@@ -106,6 +107,8 @@ const Stepper: React.FC<Props> = ({
106
107
  onPress={handlePlus}
107
108
  size={iconSize}
108
109
  color={iconColor}
110
+ disabled={stateValue === max}
111
+ style={stateValue === max ? { opacity: 0.5 } : {}}
109
112
  />
110
113
  </View>
111
114
  );
package/src/index.js CHANGED
@@ -25,6 +25,7 @@ export { default as TextField } from "./components/TextField";
25
25
  export { default as ToggleButton } from "./components/ToggleButton";
26
26
  export { default as Touchable } from "./components/Touchable";
27
27
  export { AccordionGroup, AccordionItem } from "./components/Accordion";
28
+ export { default as LinearGradient } from "./components/LinearGradient";
28
29
  export { ActionSheet, ActionSheetItem, ActionSheetCancel, } from "./components/ActionSheet";
29
30
  export { Swiper, SwiperItem } from "./components/Swiper";
30
31
  export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
package/src/index.tsx CHANGED
@@ -26,6 +26,7 @@ export { default as TextField } from "./components/TextField";
26
26
  export { default as ToggleButton } from "./components/ToggleButton";
27
27
  export { default as Touchable } from "./components/Touchable";
28
28
  export { AccordionGroup, AccordionItem } from "./components/Accordion";
29
+ export { default as LinearGradient } from "./components/LinearGradient";
29
30
  export {
30
31
  ActionSheet,
31
32
  ActionSheetItem,
@@ -1,21 +1,73 @@
1
- import { GROUPS, COMPONENT_TYPES, FORM_TYPES } from "@draftbit/types";
1
+ import { createColorProp, FORM_TYPES, GROUPS, PROP_TYPES, } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Linear Gradient",
4
4
  tag: "LinearGradient",
5
- doc_link: "https://docs.expo.io/versions/latest/sdk/linear-gradient/",
6
- code_link: "https://github.com/expo/expo/blob/master/packages/expo/src/effects/LinearGradient.d.ts",
7
- category: COMPONENT_TYPES.layout,
8
- supports_list_render: false,
9
- layout: {},
5
+ description: "Linear Gradient Component",
10
6
  props: {
11
- colors: {
7
+ color1: createColorProp({
8
+ label: "Color 1",
9
+ }),
10
+ color2: createColorProp({
11
+ label: "Color 2",
12
+ }),
13
+ color3: createColorProp({
14
+ label: "Color 3",
15
+ }),
16
+ startX: {
12
17
  group: GROUPS.basic,
13
- label: "Colors",
14
- description: "The colors required for your gradient",
18
+ label: "Start X",
19
+ description: "Start position from Left",
15
20
  editable: true,
16
- required: true,
17
- defaultValue: null,
18
- formType: FORM_TYPES.color,
21
+ required: false,
22
+ defaultValue: 0,
23
+ min: 0,
24
+ max: 100,
25
+ step: 1,
26
+ precision: 0,
27
+ formType: FORM_TYPES.number,
28
+ propType: PROP_TYPES.NUMBER,
29
+ },
30
+ startY: {
31
+ group: GROUPS.basic,
32
+ label: "Start Y",
33
+ description: "Start position from Top",
34
+ editable: true,
35
+ required: false,
36
+ defaultValue: 0,
37
+ min: 0,
38
+ max: 100,
39
+ step: 1,
40
+ precision: 0,
41
+ formType: FORM_TYPES.number,
42
+ propType: PROP_TYPES.NUMBER,
43
+ },
44
+ endX: {
45
+ group: GROUPS.basic,
46
+ label: "End Y",
47
+ description: "End position from Right",
48
+ editable: true,
49
+ required: false,
50
+ defaultValue: 100,
51
+ min: 0,
52
+ max: 100,
53
+ step: 1,
54
+ precision: 0,
55
+ formType: FORM_TYPES.number,
56
+ propType: PROP_TYPES.NUMBER,
57
+ },
58
+ endY: {
59
+ group: GROUPS.basic,
60
+ label: "End Y",
61
+ description: "End position from Bottom",
62
+ editable: true,
63
+ required: false,
64
+ defaultValue: 100,
65
+ min: 0,
66
+ max: 100,
67
+ step: 1,
68
+ precision: 0,
69
+ formType: FORM_TYPES.number,
70
+ propType: PROP_TYPES.NUMBER,
19
71
  },
20
72
  },
21
73
  };
@@ -1,23 +1,79 @@
1
- import { GROUPS, COMPONENT_TYPES, FORM_TYPES } from "@draftbit/types";
1
+ import {
2
+ createColorProp,
3
+ FORM_TYPES,
4
+ GROUPS,
5
+ PROP_TYPES,
6
+ } from "@draftbit/types";
2
7
 
3
8
  export const SEED_DATA = {
4
9
  name: "Linear Gradient",
5
10
  tag: "LinearGradient",
6
- doc_link: "https://docs.expo.io/versions/latest/sdk/linear-gradient/",
7
- code_link:
8
- "https://github.com/expo/expo/blob/master/packages/expo/src/effects/LinearGradient.d.ts",
9
- category: COMPONENT_TYPES.layout,
10
- supports_list_render: false,
11
- layout: {},
11
+ description: "Linear Gradient Component",
12
12
  props: {
13
- colors: {
13
+ color1: createColorProp({
14
+ label: "Color 1",
15
+ }),
16
+ color2: createColorProp({
17
+ label: "Color 2",
18
+ }),
19
+ color3: createColorProp({
20
+ label: "Color 3",
21
+ }),
22
+ startX: {
14
23
  group: GROUPS.basic,
15
- label: "Colors",
16
- description: "The colors required for your gradient",
24
+ label: "Start X",
25
+ description: "Start position from Left",
17
26
  editable: true,
18
- required: true,
19
- defaultValue: null,
20
- formType: FORM_TYPES.color,
27
+ required: false,
28
+ defaultValue: 0,
29
+ min: 0,
30
+ max: 100,
31
+ step: 1,
32
+ precision: 0,
33
+ formType: FORM_TYPES.number,
34
+ propType: PROP_TYPES.NUMBER,
35
+ },
36
+ startY: {
37
+ group: GROUPS.basic,
38
+ label: "Start Y",
39
+ description: "Start position from Top",
40
+ editable: true,
41
+ required: false,
42
+ defaultValue: 0,
43
+ min: 0,
44
+ max: 100,
45
+ step: 1,
46
+ precision: 0,
47
+ formType: FORM_TYPES.number,
48
+ propType: PROP_TYPES.NUMBER,
49
+ },
50
+ endX: {
51
+ group: GROUPS.basic,
52
+ label: "End Y",
53
+ description: "End position from Right",
54
+ editable: true,
55
+ required: false,
56
+ defaultValue: 100,
57
+ min: 0,
58
+ max: 100,
59
+ step: 1,
60
+ precision: 0,
61
+ formType: FORM_TYPES.number,
62
+ propType: PROP_TYPES.NUMBER,
63
+ },
64
+ endY: {
65
+ group: GROUPS.basic,
66
+ label: "End Y",
67
+ description: "End position from Bottom",
68
+ editable: true,
69
+ required: false,
70
+ defaultValue: 100,
71
+ min: 0,
72
+ max: 100,
73
+ step: 1,
74
+ precision: 0,
75
+ formType: FORM_TYPES.number,
76
+ propType: PROP_TYPES.NUMBER,
21
77
  },
22
78
  },
23
79
  };
@@ -18,7 +18,6 @@ export const SEED_DATA = [
18
18
  min: createStaticNumberProp({
19
19
  label: "Minimum",
20
20
  description: "Minimum Number",
21
- defaultValue: 0,
22
21
  }),
23
22
  max: createStaticNumberProp({
24
23
  label: "Maximum",
@@ -26,7 +26,6 @@ export const SEED_DATA = [
26
26
  min: createStaticNumberProp({
27
27
  label: "Minimum",
28
28
  description: "Minimum Number",
29
- defaultValue: 0,
30
29
  }),
31
30
  max: createStaticNumberProp({
32
31
  label: "Maximum",
@@ -1,111 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.SEED_DATA = void 0;
7
-
8
- var _types = require("@draftbit/types");
9
-
10
- const SEED_DATA_PROPS = {
11
- onPress: (0, _types.createActionProp)(),
12
- icon: {
13
- group: _types.GROUPS.basic,
14
- label: "Icon Name",
15
- description: "Name of the icon",
16
- editable: true,
17
- required: true,
18
- formType: _types.FORM_TYPES.icon,
19
- propType: _types.PROP_TYPES.STRING,
20
- defaultValue: null
21
- },
22
- children: {
23
- group: _types.GROUPS.data,
24
- label: "Label",
25
- description: "Button label",
26
- required: true,
27
- editable: true,
28
- formType: _types.FORM_TYPES.string,
29
- propType: _types.PROP_TYPES.STRING,
30
- defaultValue: "Get Started"
31
- },
32
- color: {
33
- group: _types.GROUPS.basic,
34
- label: "Color Override",
35
- description: "Override the background color of the button",
36
- editable: true,
37
- required: false,
38
- formType: _types.FORM_TYPES.color,
39
- propType: _types.PROP_TYPES.THEME,
40
- defaultValue: null
41
- },
42
- labelColor: {
43
- group: _types.GROUPS.basic,
44
- label: "Label Color Override",
45
- description: "Override the label color of the button",
46
- editable: true,
47
- required: false,
48
- formType: _types.FORM_TYPES.color,
49
- propType: _types.PROP_TYPES.THEME,
50
- defaultValue: null
51
- },
52
- disabled: {
53
- group: _types.GROUPS.basic,
54
- label: "Disabled",
55
- description: "Whether the button should be disabled",
56
- editable: true,
57
- required: false,
58
- formType: _types.FORM_TYPES.boolean,
59
- propType: _types.PROP_TYPES.BOOLEAN,
60
- defaultValue: null
61
- },
62
- loading: {
63
- group: _types.GROUPS.data,
64
- label: "Loading",
65
- description: "Whether to show a loading indicator",
66
- editable: true,
67
- required: false,
68
- formType: _types.FORM_TYPES.boolean,
69
- propType: _types.PROP_TYPES.BOOLEAN,
70
- defaultValue: null
71
- }
72
- };
73
- const SEED_DATA = [{
74
- name: "Button Outline",
75
- tag: "Button",
76
- category: _types.COMPONENT_TYPES.deprecated,
77
- triggers: [_types.Triggers.OnPress],
78
- props: { ...SEED_DATA_PROPS,
79
- type: {
80
- group: _types.GROUPS.uncategorized,
81
- label: "Type",
82
- description: "Button type",
83
- editable: false,
84
- required: true,
85
- formType: _types.FORM_TYPES.string,
86
- propType: _types.PROP_TYPES.STRING,
87
- defaultValue: "outline"
88
- }
89
- },
90
- layout: {}
91
- }, {
92
- name: "Button Solid",
93
- tag: "Button",
94
- category: _types.COMPONENT_TYPES.deprecated,
95
- triggers: [_types.Triggers.OnPress],
96
- props: { ...SEED_DATA_PROPS,
97
- type: {
98
- group: _types.GROUPS.uncategorized,
99
- label: "Type",
100
- description: "Button type",
101
- editable: false,
102
- required: true,
103
- formType: _types.FORM_TYPES.string,
104
- propType: _types.PROP_TYPES.STRING,
105
- defaultValue: "solid"
106
- }
107
- },
108
- layout: {}
109
- }];
110
- exports.SEED_DATA = SEED_DATA;
111
- //# sourceMappingURL=DeprecatedButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["DeprecatedButton.ts"],"names":["SEED_DATA_PROPS","onPress","icon","group","GROUPS","basic","label","description","editable","required","formType","FORM_TYPES","propType","PROP_TYPES","STRING","defaultValue","children","data","string","color","THEME","labelColor","disabled","boolean","BOOLEAN","loading","SEED_DATA","name","tag","category","COMPONENT_TYPES","deprecated","triggers","Triggers","OnPress","props","type","uncategorized","layout"],"mappings":";;;;;;;AAAA;;AASA,MAAMA,eAAe,GAAG;AACtBC,EAAAA,OAAO,EAAE,8BADa;AAEtBC,EAAAA,IAAI,EAAE;AACJC,IAAAA,KAAK,EAAEC,cAAOC,KADV;AAEJC,IAAAA,KAAK,EAAE,WAFH;AAGJC,IAAAA,WAAW,EAAE,kBAHT;AAI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,cADR;AAEEC,EAAAA,GAAG,EAAE,QAFP;AAGEC,EAAAA,QAAQ,EAAEC,uBAAgBC,UAH5B;AAIEC,EAAAA,QAAQ,EAAE,CAACC,gBAASC,OAAV,CAJZ;AAKEC,EAAAA,KAAK,EAAE,EACL,GAAGnC,eADE;AAELoC,IAAAA,IAAI,EAAE;AACJjC,MAAAA,KAAK,EAAEC,cAAOiC,aADV;AAEJ/B,MAAAA,KAAK,EAAE,MAFH;AAGJC,MAAAA,WAAW,EAAE,aAHT;AAIJC,MAAAA,QAAQ,EAAE,KAJN;AAKJC,MAAAA,QAAQ,EAAE,IALN;AAMJC,MAAAA,QAAQ,EAAEC,kBAAWO,MANjB;AAOJN,MAAAA,QAAQ,EAAEC,kBAAWC,MAPjB;AAQJC,MAAAA,YAAY,EAAE;AARV;AAFD,GALT;AAkBEuB,EAAAA,MAAM,EAAE;AAlBV,CArBuB,CAAlB","sourcesContent":["import {\n GROUPS,\n FORM_TYPES,\n PROP_TYPES,\n COMPONENT_TYPES,\n createActionProp,\n Triggers,\n} from \"@draftbit/types\";\n\nconst SEED_DATA_PROPS = {\n onPress: createActionProp(),\n icon: {\n group: GROUPS.basic,\n label: \"Icon Name\",\n description: \"Name of the icon\",\n editable: true,\n required: true,\n formType: FORM_TYPES.icon,\n propType: PROP_TYPES.STRING,\n defaultValue: null,\n },\n children: {\n group: GROUPS.data,\n label: \"Label\",\n description: \"Button label\",\n required: true,\n editable: true,\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n defaultValue: \"Get Started\",\n },\n color: {\n group: GROUPS.basic,\n label: \"Color Override\",\n description: \"Override the background color of the button\",\n editable: true,\n required: false,\n formType: FORM_TYPES.color,\n propType: PROP_TYPES.THEME,\n defaultValue: null,\n },\n labelColor: {\n group: GROUPS.basic,\n label: \"Label Color Override\",\n description: \"Override the label color of the button\",\n editable: true,\n required: false,\n formType: FORM_TYPES.color,\n propType: PROP_TYPES.THEME,\n defaultValue: null,\n },\n disabled: {\n group: GROUPS.basic,\n label: \"Disabled\",\n description: \"Whether the button should be disabled\",\n editable: true,\n required: false,\n formType: FORM_TYPES.boolean,\n propType: PROP_TYPES.BOOLEAN,\n defaultValue: null,\n },\n loading: {\n group: GROUPS.data,\n label: \"Loading\",\n description: \"Whether to show a loading indicator\",\n editable: true,\n required: false,\n formType: FORM_TYPES.boolean,\n propType: PROP_TYPES.BOOLEAN,\n defaultValue: null,\n },\n};\n\nexport const SEED_DATA = [\n {\n name: \"Button Outline\",\n tag: \"Button\",\n category: COMPONENT_TYPES.deprecated,\n triggers: [Triggers.OnPress],\n props: {\n ...SEED_DATA_PROPS,\n type: {\n group: GROUPS.uncategorized,\n label: \"Type\",\n description: \"Button type\",\n editable: false,\n required: true,\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n defaultValue: \"outline\",\n },\n },\n layout: {},\n },\n {\n name: \"Button Solid\",\n tag: \"Button\",\n category: COMPONENT_TYPES.deprecated,\n triggers: [Triggers.OnPress],\n props: {\n ...SEED_DATA_PROPS,\n type: {\n group: GROUPS.uncategorized,\n label: \"Type\",\n description: \"Button type\",\n editable: false,\n required: true,\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n defaultValue: \"solid\",\n },\n },\n layout: {},\n },\n];\n"]}
@@ -1,147 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.SEED_DATA = void 0;
7
-
8
- var _types = require("@draftbit/types");
9
-
10
- const SEED_DATA_PROPS = {
11
- icon: {
12
- group: _types.GROUPS.basic,
13
- label: "Icon Name",
14
- description: "Name of the icon",
15
- editable: true,
16
- required: true,
17
- formType: _types.FORM_TYPES.icon,
18
- propType: _types.PROP_TYPES.ASSET,
19
- defaultValue: null
20
- },
21
- label: {
22
- group: _types.GROUPS.basic,
23
- label: "Label",
24
- description: "Button label",
25
- required: true,
26
- editable: true,
27
- formType: _types.FORM_TYPES.string,
28
- propType: _types.PROP_TYPES.STRING,
29
- defaultValue: "GET STARTED"
30
- },
31
- color: {
32
- group: _types.GROUPS.basic,
33
- label: "Color Override",
34
- description: "Override the background color of the button",
35
- editable: true,
36
- required: false,
37
- formType: _types.FORM_TYPES.color,
38
- propType: _types.PROP_TYPES.THEME,
39
- defaultValue: null
40
- },
41
- onPress: {
42
- group: _types.GROUPS.basic,
43
- label: "Action",
44
- description: "Action to execute when button pressed",
45
- editable: true,
46
- required: false,
47
- formType: _types.FORM_TYPES.action,
48
- propType: _types.PROP_TYPES.STRING,
49
- defaultValue: null
50
- }
51
- };
52
- const SEED_DATA = [{
53
- name: "FAB Mini",
54
- tag: "FAB",
55
- category: _types.COMPONENT_TYPES.deprecated,
56
- description: "A round, mini FAB",
57
- preview_image_url: "{CLOUDINARY_URL}/Button_FABMini.png",
58
- props: { ...SEED_DATA_PROPS,
59
- type: {
60
- group: _types.GROUPS.uncategorized,
61
- label: "Type",
62
- description: "Button type",
63
- editable: false,
64
- required: true,
65
- formType: _types.FORM_TYPES.icon,
66
- propType: _types.PROP_TYPES.STRING,
67
- defaultValue: "standard"
68
- },
69
- label: {
70
- group: _types.GROUPS.data,
71
- label: "Label",
72
- description: "Button label",
73
- required: false,
74
- editable: false,
75
- formType: _types.FORM_TYPES.string,
76
- propType: _types.PROP_TYPES.STRING,
77
- defaultValue: null
78
- }
79
- },
80
- layout: {}
81
- }, {
82
- name: "FAB Outline",
83
- tag: "FAB",
84
- category: _types.COMPONENT_TYPES.deprecated,
85
- preview_image_url: "{CLOUDINARY_URL}/Button_FABMini.png",
86
- props: { ...SEED_DATA_PROPS,
87
- type: {
88
- group: _types.GROUPS.uncategorized,
89
- label: "Type",
90
- description: "Button type",
91
- editable: false,
92
- required: true,
93
- propType: _types.PROP_TYPES.STRING,
94
- formType: _types.FORM_TYPES.string,
95
- defaultValue: "outline"
96
- },
97
- label: {
98
- group: _types.GROUPS.uncategorized,
99
- label: "Label",
100
- description: "Button label",
101
- required: false,
102
- editable: false,
103
- formType: _types.FORM_TYPES.string,
104
- propType: _types.PROP_TYPES.STRING,
105
- defaultValue: null
106
- }
107
- },
108
- layout: {}
109
- }, {
110
- name: "FAB Extended",
111
- tag: "FAB",
112
- category: _types.COMPONENT_TYPES.deprecated,
113
- preview_image_url: "{CLOUDINARY_URL}/Button_FABExtended.png",
114
- props: { ...SEED_DATA_PROPS,
115
- type: {
116
- group: _types.GROUPS.uncategorized,
117
- label: "Type",
118
- description: "Button type",
119
- editable: false,
120
- required: true,
121
- formType: _types.FORM_TYPES.string,
122
- propType: _types.PROP_TYPES.STRING,
123
- defaultValue: "extended"
124
- }
125
- },
126
- layout: {}
127
- }, {
128
- name: "FAB Fixed",
129
- tag: "FAB",
130
- category: _types.COMPONENT_TYPES.deprecated,
131
- preview_image_url: "{CLOUDINARY_URL}/Button_FABFixed.png",
132
- props: { ...SEED_DATA_PROPS,
133
- type: {
134
- group: _types.GROUPS.uncategorized,
135
- label: "Type",
136
- description: "Button type",
137
- editable: false,
138
- required: true,
139
- formType: _types.FORM_TYPES.string,
140
- propType: _types.PROP_TYPES.STRING,
141
- defaultValue: "fixed"
142
- }
143
- },
144
- layout: {}
145
- }];
146
- exports.SEED_DATA = SEED_DATA;
147
- //# sourceMappingURL=DeprecatedFAB.js.map