@draftbit/core 43.3.4-f04c6f.2 → 43.4.2-80bace.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 (105) hide show
  1. package/lib/commonjs/components/Accordion/AccordionGroup.js +14 -28
  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 +25 -7
  8. package/lib/commonjs/components/FAB.js.map +1 -1
  9. package/lib/commonjs/components/LinearGradient.js +127 -0
  10. package/lib/commonjs/components/LinearGradient.js.map +1 -0
  11. package/lib/commonjs/components/Stepper.js +9 -2
  12. package/lib/commonjs/components/Stepper.js.map +1 -1
  13. package/lib/commonjs/components/Swiper/Swiper.js +23 -1
  14. package/lib/commonjs/components/Swiper/Swiper.js.map +1 -1
  15. package/lib/commonjs/index.js +8 -0
  16. package/lib/commonjs/index.js.map +1 -1
  17. package/lib/commonjs/mappings/{AccordionGroup.js → Accordion.js} +9 -2
  18. package/lib/commonjs/mappings/Accordion.js.map +1 -0
  19. package/lib/commonjs/mappings/AccordionItem.js +1 -1
  20. package/lib/commonjs/mappings/AccordionItem.js.map +1 -1
  21. package/lib/commonjs/mappings/CustomCode.js.map +1 -1
  22. package/lib/commonjs/mappings/FAB.js.map +1 -1
  23. package/lib/commonjs/mappings/Icon.js.map +1 -1
  24. package/lib/commonjs/mappings/LinearGradient.js.map +1 -1
  25. package/lib/commonjs/mappings/RadioButtonGroup.js.map +1 -1
  26. package/lib/commonjs/mappings/RadioButtonRow.js.map +1 -1
  27. package/lib/commonjs/mappings/RowBodyIcon.js.map +1 -1
  28. package/lib/commonjs/mappings/RowHeadlineImageIcon.js.map +1 -1
  29. package/lib/commonjs/mappings/SafeAreaView.js.map +1 -1
  30. package/lib/commonjs/mappings/Stepper.js +1 -2
  31. package/lib/commonjs/mappings/Stepper.js.map +1 -1
  32. package/lib/commonjs/mappings/Swiper.js +14 -0
  33. package/lib/commonjs/mappings/Swiper.js.map +1 -1
  34. package/lib/commonjs/mappings/TextArea.js +1 -3
  35. package/lib/commonjs/mappings/TextArea.js.map +1 -1
  36. package/lib/module/components/Accordion/AccordionGroup.js +13 -28
  37. package/lib/module/components/Accordion/AccordionGroup.js.map +1 -1
  38. package/lib/module/components/FAB.js +6 -2
  39. package/lib/module/components/FAB.js.map +1 -1
  40. package/lib/module/components/LinearGradient.js +111 -0
  41. package/lib/module/components/LinearGradient.js.map +1 -0
  42. package/lib/module/components/Picker/PickerComponent.ios.js +10 -29
  43. package/lib/module/components/Picker/PickerComponent.ios.js.map +1 -1
  44. package/lib/module/components/RowBodyIcon.js.map +1 -1
  45. package/lib/module/components/Stepper.js +9 -2
  46. package/lib/module/components/Stepper.js.map +1 -1
  47. package/lib/module/components/Swiper/Swiper.js +23 -1
  48. package/lib/module/components/Swiper/Swiper.js.map +1 -1
  49. package/lib/module/index.js +1 -0
  50. package/lib/module/index.js.map +1 -1
  51. package/lib/module/mappings/{AccordionGroup.js → Accordion.js} +9 -2
  52. package/lib/module/mappings/Accordion.js.map +1 -0
  53. package/lib/module/mappings/AccordionItem.js +1 -1
  54. package/lib/module/mappings/AccordionItem.js.map +1 -1
  55. package/lib/module/mappings/BlurView.js.map +1 -1
  56. package/lib/module/mappings/Stepper.js +1 -2
  57. package/lib/module/mappings/Stepper.js.map +1 -1
  58. package/lib/module/mappings/Swiper.js +15 -1
  59. package/lib/module/mappings/Swiper.js.map +1 -1
  60. package/lib/module/mappings/TextArea.js +1 -3
  61. package/lib/module/mappings/TextArea.js.map +1 -1
  62. package/lib/typescript/src/{mappings/DeprecatedButton.d.ts → components/LinearGradient.d.ts} +47 -28
  63. package/lib/typescript/src/components/Swiper/Swiper.d.ts +5 -1
  64. package/lib/typescript/src/index.d.ts +1 -0
  65. package/lib/typescript/src/mappings/{AccordionGroup.d.ts → Accordion.d.ts} +7 -0
  66. package/lib/typescript/src/mappings/Swiper.d.ts +40 -0
  67. package/lib/typescript/src/mappings/TextArea.d.ts +0 -2
  68. package/package.json +4 -3
  69. package/src/components/Accordion/AccordionGroup.js +17 -37
  70. package/src/components/Accordion/AccordionGroup.tsx +36 -60
  71. package/src/components/FAB.js +1 -1
  72. package/src/components/FAB.tsx +6 -2
  73. package/src/components/LinearGradient.js +84 -0
  74. package/src/components/LinearGradient.tsx +119 -0
  75. package/src/components/Stepper.js +2 -2
  76. package/src/components/Stepper.tsx +4 -1
  77. package/src/components/Swiper/Swiper.js +9 -1
  78. package/src/components/Swiper/Swiper.tsx +16 -0
  79. package/src/index.js +1 -0
  80. package/src/index.tsx +1 -0
  81. package/src/mappings/{AccordionGroup.js → Accordion.js} +8 -1
  82. package/src/mappings/{AccordionGroup.ts → Accordion.ts} +8 -1
  83. package/src/mappings/AccordionItem.js +1 -1
  84. package/src/mappings/AccordionItem.ts +1 -1
  85. package/src/mappings/Stepper.js +0 -1
  86. package/src/mappings/Stepper.ts +0 -1
  87. package/src/mappings/Swiper.js +15 -1
  88. package/src/mappings/Swiper.ts +15 -0
  89. package/src/mappings/TextArea.js +0 -2
  90. package/src/mappings/TextArea.ts +0 -2
  91. package/lib/commonjs/mappings/AccordionGroup.js.map +0 -1
  92. package/lib/commonjs/mappings/DeprecatedButton.js +0 -111
  93. package/lib/commonjs/mappings/DeprecatedButton.js.map +0 -1
  94. package/lib/commonjs/mappings/DeprecatedFAB.js +0 -147
  95. package/lib/commonjs/mappings/DeprecatedFAB.js.map +0 -1
  96. package/lib/module/mappings/AccordionGroup.js.map +0 -1
  97. package/lib/module/mappings/DeprecatedButton.js +0 -102
  98. package/lib/module/mappings/DeprecatedButton.js.map +0 -1
  99. package/lib/module/mappings/DeprecatedFAB.js +0 -138
  100. package/lib/module/mappings/DeprecatedFAB.js.map +0 -1
  101. package/lib/typescript/src/mappings/DeprecatedFAB.d.ts +0 -178
  102. package/src/mappings/DeprecatedButton.js +0 -106
  103. package/src/mappings/DeprecatedButton.ts +0 -115
  104. package/src/mappings/DeprecatedFAB.js +0 -146
  105. package/src/mappings/DeprecatedFAB.ts +0 -153
@@ -1 +1 @@
1
- {"version":3,"sources":["TextArea.ts"],"names":["GROUPS","COMPONENT_TYPES","FORM_TYPES","PROP_TYPES","FIELD_NAME","TEXT_INPUT_PROPS","Triggers","SEED_DATA","name","tag","description","category","input","layout","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth","borderColor","paddingLeft","paddingRight","paddingTop","paddingBottom","borderRadius","textAlignVertical","minHeight","triggers","OnChangeText","props","placeholder","defaultValue","multiline","label","group","uncategorized","formType","boolean","propType","BOOLEAN","editable","required","numberOfLines","basic","number","NUMBER","fieldName","handlerPropName"],"mappings":"AAAA,SACEA,MADF,EAEEC,eAFF,EAGEC,UAHF,EAIEC,UAJF,EAKEC,UALF,EAMEC,gBANF,EAOEC,QAPF,QAQO,iBARP;AAUA,OAAO,MAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,WADiB;AAEvBC,EAAAA,GAAG,EAAE,WAFkB;AAGvBC,EAAAA,WAAW,EAAE,gDAHU;AAIvBC,EAAAA,QAAQ,EAAEV,eAAe,CAACW,KAJH;AAKvBC,EAAAA,MAAM,EAAE;AACNC,IAAAA,eAAe,EAAE,CADX;AAENC,IAAAA,gBAAgB,EAAE,CAFZ;AAGNC,IAAAA,cAAc,EAAE,CAHV;AAINC,IAAAA,iBAAiB,EAAE,CAJb;AAKNC,IAAAA,WAAW,EAAE,SALP;AAMNC,IAAAA,WAAW,EAAE,CANP;AAONC,IAAAA,YAAY,EAAE,CAPR;AAQNC,IAAAA,UAAU,EAAE,CARN;AASNC,IAAAA,aAAa,EAAE,CATT;AAUNC,IAAAA,YAAY,EAAE,CAVR;AAWNC,IAAAA,iBAAiB,EAAE,KAXb;AAYNC,IAAAA,SAAS,EAAE;AAZL,GALe;AAmBvBC,EAAAA,QAAQ,EAAE,CAACpB,QAAQ,CAACqB,YAAV,CAnBa;AAoBvBC,EAAAA,KAAK,EAAE,EACL,GAAGvB,gBADE;AAELwB,IAAAA,WAAW,EAAE,EACX,GAAGxB,gBAAgB,CAACwB,WADT;AAEXC,MAAAA,YAAY,EACV;AAHS,KAFR;AAOLC,IAAAA,SAAS,EAAE;AACTC,MAAAA,KAAK,EAAE,WADE;AAETtB,MAAAA,WAAW,EAAE,WAFJ;AAGTuB,MAAAA,KAAK,EAAEjC,MAAM,CAACkC,aAHL;AAITC,MAAAA,QAAQ,EAAEjC,UAAU,CAACkC,OAJZ;AAKTC,MAAAA,QAAQ,EAAElC,UAAU,CAACmC,OALZ;AAMTR,MAAAA,YAAY,EAAE,IANL;AAOTS,MAAAA,QAAQ,EAAE,IAPD;AAQTC,MAAAA,QAAQ,EAAE;AARD,KAPN;AAiBLC,IAAAA,aAAa,EAAE;AACbT,MAAAA,KAAK,EAAE,iBADM;AAEbtB,MAAAA,WAAW,EAAE,iBAFA;AAGbuB,MAAAA,KAAK,EAAEjC,MAAM,CAAC0C,KAHD;AAIbP,MAAAA,QAAQ,EAAEjC,UAAU,CAACyC,MAJR;AAKbN,MAAAA,QAAQ,EAAElC,UAAU,CAACyC,MALR;AAMbd,MAAAA,YAAY,EAAE,CAND;AAObS,MAAAA,QAAQ,EAAE,IAPG;AAQbC,MAAAA,QAAQ,EAAE;AARG,KAjBV;AA2BLK,IAAAA,SAAS,EAAE,EACT,GAAGzC,UADM;AAET0B,MAAAA,YAAY,EAAE,gBAFL;AAGTgB,MAAAA,eAAe,EAAE;AAHR;AA3BN;AApBgB,CAAlB","sourcesContent":["import {\n GROUPS,\n COMPONENT_TYPES,\n FORM_TYPES,\n PROP_TYPES,\n FIELD_NAME,\n TEXT_INPUT_PROPS,\n Triggers,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Text Area\",\n tag: \"TextInput\",\n description: \"An input field that allows for multiple lines.\",\n category: COMPONENT_TYPES.input,\n layout: {\n borderLeftWidth: 1,\n borderRightWidth: 1,\n borderTopWidth: 1,\n borderBottomWidth: 1,\n borderColor: \"divider\",\n paddingLeft: 8,\n paddingRight: 8,\n paddingTop: 8,\n paddingBottom: 8,\n borderRadius: 8,\n textAlignVertical: \"top\",\n minHeight: 100,\n },\n triggers: [Triggers.OnChangeText],\n props: {\n ...TEXT_INPUT_PROPS,\n placeholder: {\n ...TEXT_INPUT_PROPS.placeholder,\n defaultValue:\n \"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.\",\n },\n multiline: {\n label: \"Multiline\",\n description: \"Multiline\",\n group: GROUPS.uncategorized,\n formType: FORM_TYPES.boolean,\n propType: PROP_TYPES.BOOLEAN,\n defaultValue: true,\n editable: true,\n required: false,\n },\n numberOfLines: {\n label: \"Number Of Lines\",\n description: \"Number Of Lines\",\n group: GROUPS.basic,\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n defaultValue: 4,\n editable: true,\n required: false,\n },\n fieldName: {\n ...FIELD_NAME,\n defaultValue: \"textInputValue\",\n handlerPropName: \"onChangeText\",\n },\n },\n};\n"]}
1
+ {"version":3,"sources":["TextArea.ts"],"names":["GROUPS","COMPONENT_TYPES","FORM_TYPES","PROP_TYPES","FIELD_NAME","TEXT_INPUT_PROPS","Triggers","SEED_DATA","name","tag","description","category","input","layout","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth","borderColor","paddingLeft","paddingRight","paddingTop","paddingBottom","borderRadius","triggers","OnChangeText","props","placeholder","defaultValue","multiline","label","group","uncategorized","formType","boolean","propType","BOOLEAN","editable","required","numberOfLines","basic","number","NUMBER","fieldName","handlerPropName"],"mappings":"AAAA,SACEA,MADF,EAEEC,eAFF,EAGEC,UAHF,EAIEC,UAJF,EAKEC,UALF,EAMEC,gBANF,EAOEC,QAPF,QAQO,iBARP;AAUA,OAAO,MAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,WADiB;AAEvBC,EAAAA,GAAG,EAAE,WAFkB;AAGvBC,EAAAA,WAAW,EAAE,gDAHU;AAIvBC,EAAAA,QAAQ,EAAEV,eAAe,CAACW,KAJH;AAKvBC,EAAAA,MAAM,EAAE;AACNC,IAAAA,eAAe,EAAE,CADX;AAENC,IAAAA,gBAAgB,EAAE,CAFZ;AAGNC,IAAAA,cAAc,EAAE,CAHV;AAINC,IAAAA,iBAAiB,EAAE,CAJb;AAKNC,IAAAA,WAAW,EAAE,SALP;AAMNC,IAAAA,WAAW,EAAE,CANP;AAONC,IAAAA,YAAY,EAAE,CAPR;AAQNC,IAAAA,UAAU,EAAE,CARN;AASNC,IAAAA,aAAa,EAAE,CATT;AAUNC,IAAAA,YAAY,EAAE;AAVR,GALe;AAiBvBC,EAAAA,QAAQ,EAAE,CAAClB,QAAQ,CAACmB,YAAV,CAjBa;AAkBvBC,EAAAA,KAAK,EAAE,EACL,GAAGrB,gBADE;AAELsB,IAAAA,WAAW,EAAE,EACX,GAAGtB,gBAAgB,CAACsB,WADT;AAEXC,MAAAA,YAAY,EACV;AAHS,KAFR;AAOLC,IAAAA,SAAS,EAAE;AACTC,MAAAA,KAAK,EAAE,WADE;AAETpB,MAAAA,WAAW,EAAE,WAFJ;AAGTqB,MAAAA,KAAK,EAAE/B,MAAM,CAACgC,aAHL;AAITC,MAAAA,QAAQ,EAAE/B,UAAU,CAACgC,OAJZ;AAKTC,MAAAA,QAAQ,EAAEhC,UAAU,CAACiC,OALZ;AAMTR,MAAAA,YAAY,EAAE,IANL;AAOTS,MAAAA,QAAQ,EAAE,IAPD;AAQTC,MAAAA,QAAQ,EAAE;AARD,KAPN;AAiBLC,IAAAA,aAAa,EAAE;AACbT,MAAAA,KAAK,EAAE,iBADM;AAEbpB,MAAAA,WAAW,EAAE,iBAFA;AAGbqB,MAAAA,KAAK,EAAE/B,MAAM,CAACwC,KAHD;AAIbP,MAAAA,QAAQ,EAAE/B,UAAU,CAACuC,MAJR;AAKbN,MAAAA,QAAQ,EAAEhC,UAAU,CAACuC,MALR;AAMbd,MAAAA,YAAY,EAAE,CAND;AAObS,MAAAA,QAAQ,EAAE,IAPG;AAQbC,MAAAA,QAAQ,EAAE;AARG,KAjBV;AA2BLK,IAAAA,SAAS,EAAE,EACT,GAAGvC,UADM;AAETwB,MAAAA,YAAY,EAAE,gBAFL;AAGTgB,MAAAA,eAAe,EAAE;AAHR;AA3BN;AAlBgB,CAAlB","sourcesContent":["import {\n GROUPS,\n COMPONENT_TYPES,\n FORM_TYPES,\n PROP_TYPES,\n FIELD_NAME,\n TEXT_INPUT_PROPS,\n Triggers,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Text Area\",\n tag: \"TextInput\",\n description: \"An input field that allows for multiple lines.\",\n category: COMPONENT_TYPES.input,\n layout: {\n borderLeftWidth: 1,\n borderRightWidth: 1,\n borderTopWidth: 1,\n borderBottomWidth: 1,\n borderColor: \"divider\",\n paddingLeft: 8,\n paddingRight: 8,\n paddingTop: 8,\n paddingBottom: 8,\n borderRadius: 8,\n },\n triggers: [Triggers.OnChangeText],\n props: {\n ...TEXT_INPUT_PROPS,\n placeholder: {\n ...TEXT_INPUT_PROPS.placeholder,\n defaultValue:\n \"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.\",\n },\n multiline: {\n label: \"Multiline\",\n description: \"Multiline\",\n group: GROUPS.uncategorized,\n formType: FORM_TYPES.boolean,\n propType: PROP_TYPES.BOOLEAN,\n defaultValue: true,\n editable: true,\n required: false,\n },\n numberOfLines: {\n label: \"Number Of Lines\",\n description: \"Number Of Lines\",\n group: GROUPS.basic,\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n defaultValue: 4,\n editable: true,\n required: false,\n },\n fieldName: {\n ...FIELD_NAME,\n defaultValue: \"textInputValue\",\n handlerPropName: \"onChangeText\",\n },\n },\n};\n"]}
@@ -1,89 +1,108 @@
1
+ import * as React from "react";
2
+ import { StyleProp, ViewStyle } from "react-native";
3
+ declare type LinearGradientComponentProps = {
4
+ color1: string;
5
+ color2: string;
6
+ color3?: string;
7
+ startX: number;
8
+ startY: number;
9
+ endX: number;
10
+ endY: number;
11
+ children?: React.ReactNode;
12
+ style?: StyleProp<ViewStyle>;
13
+ };
14
+ declare const LinearGradientComponent: ({ children, color1, color2, color3, startX, startY, endX, endY, style, }: LinearGradientComponentProps) => JSX.Element;
15
+ export default LinearGradientComponent;
1
16
  export declare const SEED_DATA: {
2
17
  name: string;
3
18
  tag: string;
4
- category: string;
5
- triggers: string[];
19
+ description: string;
6
20
  props: {
7
- type: {
21
+ color1: {
8
22
  group: string;
9
23
  label: string;
10
24
  description: string;
11
25
  editable: boolean;
12
26
  required: boolean;
27
+ defaultValue: null;
13
28
  formType: string;
14
29
  propType: string;
15
- defaultValue: string;
16
30
  };
17
- onPress: {
31
+ color2: {
32
+ group: string;
18
33
  label: string;
19
34
  description: string;
20
35
  editable: boolean;
21
36
  required: boolean;
37
+ defaultValue: null;
22
38
  formType: string;
23
39
  propType: string;
24
- defaultValue: null;
25
- group: string;
26
40
  };
27
- icon: {
41
+ color3: {
28
42
  group: string;
29
43
  label: string;
30
44
  description: string;
31
45
  editable: boolean;
32
46
  required: boolean;
33
- formType: string;
34
- propType: string;
35
47
  defaultValue: null;
36
- };
37
- children: {
38
- group: string;
39
- label: string;
40
- description: string;
41
- required: boolean;
42
- editable: boolean;
43
48
  formType: string;
44
49
  propType: string;
45
- defaultValue: string;
46
50
  };
47
- color: {
51
+ startX: {
48
52
  group: string;
49
53
  label: string;
50
54
  description: string;
51
55
  editable: boolean;
52
56
  required: boolean;
57
+ defaultValue: number;
58
+ min: number;
59
+ max: number;
60
+ step: number;
61
+ precision: number;
53
62
  formType: string;
54
63
  propType: string;
55
- defaultValue: null;
56
64
  };
57
- labelColor: {
65
+ startY: {
58
66
  group: string;
59
67
  label: string;
60
68
  description: string;
61
69
  editable: boolean;
62
70
  required: boolean;
71
+ defaultValue: number;
72
+ min: number;
73
+ max: number;
74
+ step: number;
75
+ precision: number;
63
76
  formType: string;
64
77
  propType: string;
65
- defaultValue: null;
66
78
  };
67
- disabled: {
79
+ endX: {
68
80
  group: string;
69
81
  label: string;
70
82
  description: string;
71
83
  editable: boolean;
72
84
  required: boolean;
85
+ defaultValue: number;
86
+ min: number;
87
+ max: number;
88
+ step: number;
89
+ precision: number;
73
90
  formType: string;
74
91
  propType: string;
75
- defaultValue: null;
76
92
  };
77
- loading: {
93
+ endY: {
78
94
  group: string;
79
95
  label: string;
80
96
  description: string;
81
97
  editable: boolean;
82
98
  required: boolean;
99
+ defaultValue: number;
100
+ min: number;
101
+ max: number;
102
+ step: number;
103
+ precision: number;
83
104
  formType: string;
84
105
  propType: string;
85
- defaultValue: null;
86
106
  };
87
107
  };
88
- layout: {};
89
- }[];
108
+ };
@@ -7,9 +7,13 @@ export interface SwiperProps {
7
7
  timeout?: number;
8
8
  prevTitle?: string;
9
9
  nextTitle?: string;
10
+ prevTitleColor?: string;
11
+ nextTitleColor?: string;
10
12
  dotsTouchable?: boolean;
13
+ dotColor?: string;
14
+ dotActiveColor?: string;
11
15
  children: React.ReactNode;
12
16
  style?: StyleProp<ViewStyle>;
13
17
  }
14
- declare const Swiper: ({ vertical, loop, timeout, from, prevTitle, nextTitle, dotsTouchable, children, style, }: SwiperProps) => JSX.Element;
18
+ declare const Swiper: ({ vertical, loop, timeout, from, prevTitle, nextTitle, prevTitleColor, nextTitleColor, dotsTouchable, dotColor, dotActiveColor, children, style, }: SwiperProps) => JSX.Element;
15
19
  export default Swiper;
@@ -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";
@@ -3,6 +3,13 @@ export declare const SEED_DATA: {
3
3
  tag: string;
4
4
  description: string;
5
5
  category: string;
6
+ layout: {
7
+ paddingTop: number;
8
+ paddingRight: number;
9
+ paddingBottom: number;
10
+ paddingLeft: number;
11
+ fontSize: number;
12
+ };
6
13
  props: {
7
14
  openColor: {
8
15
  group: string;
@@ -52,6 +52,46 @@ export declare const SEED_DATA: {
52
52
  };
53
53
  prevTitle: any;
54
54
  nextTitle: any;
55
+ prevTitleColor: {
56
+ group: string;
57
+ label: string;
58
+ description: string;
59
+ editable: boolean;
60
+ required: boolean;
61
+ defaultValue: null;
62
+ formType: string;
63
+ propType: string;
64
+ };
65
+ nextTitleColor: {
66
+ group: string;
67
+ label: string;
68
+ description: string;
69
+ editable: boolean;
70
+ required: boolean;
71
+ defaultValue: null;
72
+ formType: string;
73
+ propType: string;
74
+ };
75
+ dotColor: {
76
+ group: string;
77
+ label: string;
78
+ description: string;
79
+ editable: boolean;
80
+ required: boolean;
81
+ defaultValue: null;
82
+ formType: string;
83
+ propType: string;
84
+ };
85
+ dotActiveColor: {
86
+ group: string;
87
+ label: string;
88
+ description: string;
89
+ editable: boolean;
90
+ required: boolean;
91
+ defaultValue: null;
92
+ formType: string;
93
+ propType: string;
94
+ };
55
95
  dotsTouchable: {
56
96
  label: string;
57
97
  description: string;
@@ -14,8 +14,6 @@ export declare const SEED_DATA: {
14
14
  paddingTop: number;
15
15
  paddingBottom: number;
16
16
  borderRadius: number;
17
- textAlignVertical: string;
18
- minHeight: number;
19
17
  };
20
18
  triggers: string[];
21
19
  props: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "43.3.4-f04c6f.2+f04c6fc8",
3
+ "version": "43.4.2-80bace.1+80bace74",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -41,7 +41,7 @@
41
41
  "dependencies": {
42
42
  "@date-io/date-fns": "^1.3.13",
43
43
  "@draftbit/react-theme-provider": "^2.1.1",
44
- "@draftbit/types": "^43.3.4-f04c6f.2+f04c6fc8",
44
+ "@draftbit/types": "^43.4.0",
45
45
  "@material-ui/core": "^4.11.0",
46
46
  "@material-ui/pickers": "^3.2.10",
47
47
  "@react-native-community/slider": "4.1.7",
@@ -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": "f04c6fc8cb5966dccdf4503e30a94600f28f4674"
83
+ "gitHead": "80bace74bf70bd1768c7d68c3a02e79f0d1aa3d1"
83
84
  }
@@ -2,63 +2,43 @@ import * as React from "react";
2
2
  import { View, StyleSheet, Pressable, } from "react-native";
3
3
  import Text from "../Text";
4
4
  import { withTheme } from "../../theming";
5
+ import { extractStyles } from "../../utilities";
5
6
  const AccordionGroup = ({ Icon, openColor, closedColor, caretColor, icon, iconSize = 24, style, label, children, expanded: expandedProp, theme, }) => {
6
7
  const [expanded, setExpanded] = React.useState(expandedProp || false);
7
8
  const handlePressAction = () => {
8
- if (expandedProp === undefined) {
9
- setExpanded(!expanded);
10
- }
9
+ setExpanded(!expanded);
11
10
  };
12
11
  const expandedInternal = expandedProp !== undefined ? expandedProp : expanded;
13
12
  const expandedColor = openColor || theme.colors.primary;
14
13
  const collapsedColor = closedColor || theme.colors.primary;
15
14
  const labelColor = expanded ? expandedColor : collapsedColor;
15
+ const { textStyles, viewStyles } = extractStyles(style);
16
16
  return (React.createElement(React.Fragment, null,
17
- React.createElement(Pressable, { style: [style], onPress: handlePressAction, accessibilityRole: "button" },
18
- React.createElement(View, { style: styles.row },
19
- icon ? (React.createElement(Icon, { name: icon, size: iconSize, color: labelColor, style: styles.icon })) : null,
20
- React.createElement(View, { style: [styles.item, styles.content] },
21
- React.createElement(Text, { selectable: false, style: [
22
- styles.label,
23
- {
24
- color: labelColor,
25
- },
26
- style,
27
- ] }, label)),
28
- React.createElement(View, { style: [styles.item] },
29
- React.createElement(Icon, { name: expanded
30
- ? "MaterialIcons/keyboard-arrow-up"
31
- : "MaterialIcons/keyboard-arrow-down", color: caretColor, size: 24 })))),
32
- expandedInternal
33
- ? React.Children.map(children, (child) => {
34
- if (React.isValidElement(child) &&
35
- !child.props.left &&
36
- !child.props.right) {
37
- return React.cloneElement(child, {
38
- style: child.props.style,
39
- });
40
- }
41
- return child;
42
- })
43
- : null));
17
+ React.createElement(Pressable, { style: [styles.row, viewStyles], onPress: handlePressAction, accessibilityRole: "button" },
18
+ icon ? (React.createElement(Icon, { name: icon, size: iconSize, color: labelColor, style: styles.icon })) : null,
19
+ React.createElement(View, { style: styles.content },
20
+ React.createElement(Text, { selectable: false, style: [
21
+ {
22
+ color: labelColor,
23
+ },
24
+ textStyles,
25
+ ] }, label)),
26
+ React.createElement(Icon, { name: expanded
27
+ ? "MaterialIcons/keyboard-arrow-up"
28
+ : "MaterialIcons/keyboard-arrow-down", color: caretColor, size: 24 })),
29
+ expandedInternal ? children : null));
44
30
  };
45
31
  const styles = StyleSheet.create({
46
32
  row: {
47
33
  flexDirection: "row",
48
34
  alignItems: "center",
49
35
  },
50
- label: {
51
- fontSize: 16,
52
- },
53
- item: {
54
- margin: 8,
55
- },
56
36
  content: {
57
37
  flex: 1,
58
38
  justifyContent: "center",
59
39
  },
60
40
  icon: {
61
- marginLeft: 8,
41
+ marginRight: 8,
62
42
  },
63
43
  });
64
44
  export default withTheme(AccordionGroup);
@@ -10,6 +10,7 @@ import Text from "../Text";
10
10
  import { withTheme } from "../../theming";
11
11
  import type { IconSlot } from "../../interfaces/Icon";
12
12
  import type { Theme } from "../../styles/DefaultTheme";
13
+ import { extractStyles } from "../../utilities";
13
14
 
14
15
  type Props = {
15
16
  openColor: string;
@@ -42,9 +43,7 @@ const AccordionGroup = ({
42
43
  );
43
44
 
44
45
  const handlePressAction = () => {
45
- if (expandedProp === undefined) {
46
- setExpanded(!expanded);
47
- }
46
+ setExpanded(!expanded);
48
47
  };
49
48
 
50
49
  const expandedInternal = expandedProp !== undefined ? expandedProp : expanded;
@@ -54,64 +53,47 @@ const AccordionGroup = ({
54
53
 
55
54
  const labelColor = expanded ? expandedColor : collapsedColor;
56
55
 
56
+ const { textStyles, viewStyles } = extractStyles(style);
57
+
57
58
  return (
58
59
  <>
59
60
  <Pressable
60
- style={[style]}
61
+ style={[styles.row, viewStyles]}
61
62
  onPress={handlePressAction}
62
63
  accessibilityRole="button"
63
64
  >
64
- <View style={styles.row}>
65
- {icon ? (
66
- <Icon
67
- name={icon}
68
- size={iconSize}
69
- color={labelColor}
70
- style={styles.icon}
71
- />
72
- ) : null}
73
- <View style={[styles.item, styles.content]}>
74
- <Text
75
- selectable={false}
76
- style={[
77
- styles.label,
78
- {
79
- color: labelColor,
80
- },
81
- style,
82
- ]}
83
- >
84
- {label}
85
- </Text>
86
- </View>
87
- <View style={[styles.item]}>
88
- <Icon
89
- name={
90
- expanded
91
- ? "MaterialIcons/keyboard-arrow-up"
92
- : "MaterialIcons/keyboard-arrow-down"
93
- }
94
- color={caretColor}
95
- size={24}
96
- />
97
- </View>
65
+ {icon ? (
66
+ <Icon
67
+ name={icon}
68
+ size={iconSize}
69
+ color={labelColor}
70
+ style={styles.icon}
71
+ />
72
+ ) : null}
73
+ <View style={styles.content}>
74
+ <Text
75
+ selectable={false}
76
+ style={[
77
+ {
78
+ color: labelColor,
79
+ },
80
+ textStyles,
81
+ ]}
82
+ >
83
+ {label}
84
+ </Text>
98
85
  </View>
86
+ <Icon
87
+ name={
88
+ expanded
89
+ ? "MaterialIcons/keyboard-arrow-up"
90
+ : "MaterialIcons/keyboard-arrow-down"
91
+ }
92
+ color={caretColor}
93
+ size={24}
94
+ />
99
95
  </Pressable>
100
- {expandedInternal
101
- ? React.Children.map(children, (child) => {
102
- if (
103
- React.isValidElement(child) &&
104
- !child.props.left &&
105
- !child.props.right
106
- ) {
107
- return React.cloneElement(child, {
108
- style: child.props.style,
109
- });
110
- }
111
-
112
- return child;
113
- })
114
- : null}
96
+ {expandedInternal ? children : null}
115
97
  </>
116
98
  );
117
99
  };
@@ -121,18 +103,12 @@ const styles = StyleSheet.create({
121
103
  flexDirection: "row",
122
104
  alignItems: "center",
123
105
  },
124
- label: {
125
- fontSize: 16,
126
- },
127
- item: {
128
- margin: 8,
129
- },
130
106
  content: {
131
107
  flex: 1,
132
108
  justifyContent: "center",
133
109
  },
134
110
  icon: {
135
- marginLeft: 8,
111
+ marginRight: 8,
136
112
  },
137
113
  });
138
114
 
@@ -28,7 +28,7 @@ const FAB = ({ onPress, disabled, loading, iconName = "MaterialIcons/add", style
28
28
  },
29
29
  ];
30
30
  }, ...props },
31
- React.createElement(View, null, loading ? (React.createElement(ActivityIndicator, { size: "small", color: color })) : (React.createElement(Icon, { name: iconName, size: 28, color: color }))))));
31
+ React.createElement(View, null, loading ? (React.createElement(ActivityIndicator, { style: size > 50 ? { marginTop: 2, marginLeft: 2 } : undefined, size: size <= 50 ? "small" : "large", color: color })) : (React.createElement(Icon, { name: iconName, size: size, color: color }))))));
32
32
  };
33
33
  const styles = StyleSheet.create({
34
34
  button: {
@@ -77,9 +77,13 @@ const FAB: React.FC<Props> = ({
77
77
  >
78
78
  <View>
79
79
  {loading ? (
80
- <ActivityIndicator size="small" color={color} />
80
+ <ActivityIndicator
81
+ style={size > 50 ? { marginTop: 2, marginLeft: 2 } : undefined}
82
+ size={size <= 50 ? "small" : "large"}
83
+ color={color}
84
+ />
81
85
  ) : (
82
- <Icon name={iconName} size={28} color={color} />
86
+ <Icon name={iconName} size={size} color={color} />
83
87
  )}
84
88
  </View>
85
89
  </Pressable>
@@ -0,0 +1,84 @@
1
+ import * as React from "react";
2
+ import { LinearGradient } from "expo-linear-gradient";
3
+ import { extractStyles } from "../utilities";
4
+ import { createColorProp, FORM_TYPES, GROUPS, PROP_TYPES, } from "@draftbit/types";
5
+ const LinearGradientComponent = ({ children, color1, color2, color3 = undefined, startX = 0, startY = 0, endX = 100, endY = 0, style, }) => {
6
+ const { viewStyles } = extractStyles(style);
7
+ const colors = [color1, color2, color3].filter((color) => color);
8
+ const start = { x: startX / 100, y: startY / 100 };
9
+ const end = { x: endX / 100, y: endY / 100 };
10
+ return (React.createElement(LinearGradient, { colors: colors, start: start, end: end, style: viewStyles }, children));
11
+ };
12
+ export default LinearGradientComponent;
13
+ export const SEED_DATA = {
14
+ name: "LinearGradient",
15
+ tag: "LinearGradient",
16
+ description: "Linear Gradient Component",
17
+ props: {
18
+ color1: createColorProp({
19
+ label: "Color 1",
20
+ }),
21
+ color2: createColorProp({
22
+ label: "Color 2",
23
+ }),
24
+ color3: createColorProp({
25
+ label: "Color 3",
26
+ }),
27
+ startX: {
28
+ group: GROUPS.basic,
29
+ label: "Start X",
30
+ description: "Start position from Left",
31
+ editable: true,
32
+ required: false,
33
+ defaultValue: 0,
34
+ min: 0,
35
+ max: 100,
36
+ step: 1,
37
+ precision: 0,
38
+ formType: FORM_TYPES.number,
39
+ propType: PROP_TYPES.NUMBER,
40
+ },
41
+ startY: {
42
+ group: GROUPS.basic,
43
+ label: "Start Y",
44
+ description: "Start position from Top",
45
+ editable: true,
46
+ required: false,
47
+ defaultValue: 0,
48
+ min: 0,
49
+ max: 100,
50
+ step: 1,
51
+ precision: 0,
52
+ formType: FORM_TYPES.number,
53
+ propType: PROP_TYPES.NUMBER,
54
+ },
55
+ endX: {
56
+ group: GROUPS.basic,
57
+ label: "End Y",
58
+ description: "End position from Right",
59
+ editable: true,
60
+ required: false,
61
+ defaultValue: 100,
62
+ min: 0,
63
+ max: 100,
64
+ step: 1,
65
+ precision: 0,
66
+ formType: FORM_TYPES.number,
67
+ propType: PROP_TYPES.NUMBER,
68
+ },
69
+ endY: {
70
+ group: GROUPS.basic,
71
+ label: "End Y",
72
+ description: "End position from Bottom",
73
+ editable: true,
74
+ required: false,
75
+ defaultValue: 100,
76
+ min: 0,
77
+ max: 100,
78
+ step: 1,
79
+ precision: 0,
80
+ formType: FORM_TYPES.number,
81
+ propType: PROP_TYPES.NUMBER,
82
+ },
83
+ },
84
+ };