@draftbit/core 43.2.3-cee5a8.0 → 43.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/lib/commonjs/components/Accordion/index.js.map +1 -1
  2. package/lib/commonjs/components/CardContainer.js +16 -5
  3. package/lib/commonjs/components/CardContainer.js.map +1 -1
  4. package/lib/commonjs/components/DeprecatedButton.js +19 -4
  5. package/lib/commonjs/components/DeprecatedButton.js.map +1 -1
  6. package/lib/commonjs/components/Picker/PickerComponent.android.js +20 -6
  7. package/lib/commonjs/components/Picker/PickerComponent.android.js.map +1 -1
  8. package/lib/commonjs/components/Swiper/Swiper.js +1 -19
  9. package/lib/commonjs/components/Swiper/Swiper.js.map +1 -1
  10. package/lib/commonjs/components/TextField.js +11 -4
  11. package/lib/commonjs/components/TextField.js.map +1 -1
  12. package/lib/commonjs/index.js.map +1 -1
  13. package/lib/commonjs/mappings/ActionSheet.js.map +1 -1
  14. package/lib/commonjs/mappings/CardBlock.js.map +1 -1
  15. package/lib/commonjs/mappings/CheckboxGroup.js.map +1 -1
  16. package/lib/commonjs/mappings/CircleImage.js.map +1 -1
  17. package/lib/commonjs/mappings/Modal.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/StarRating.js +6 -2
  21. package/lib/commonjs/mappings/StarRating.js.map +1 -1
  22. package/lib/commonjs/mappings/Swiper.js +0 -14
  23. package/lib/commonjs/mappings/Swiper.js.map +1 -1
  24. package/lib/commonjs/mappings/Touchable.js.map +1 -1
  25. package/lib/commonjs/theming.js.map +1 -1
  26. package/lib/module/components/RadioButton/index.js.map +1 -1
  27. package/lib/module/components/Swiper/Swiper.js +1 -19
  28. package/lib/module/components/Swiper/Swiper.js.map +1 -1
  29. package/lib/module/components/TextField.js +11 -4
  30. package/lib/module/components/TextField.js.map +1 -1
  31. package/lib/module/mappings/Swiper.js +1 -15
  32. package/lib/module/mappings/Swiper.js.map +1 -1
  33. package/lib/typescript/src/components/Swiper/Swiper.d.ts +1 -5
  34. package/lib/typescript/src/mappings/Swiper.d.ts +0 -40
  35. package/package.json +2 -2
  36. package/src/components/Swiper/Swiper.js +1 -5
  37. package/src/components/Swiper/Swiper.tsx +0 -12
  38. package/src/components/TextField.js +9 -2
  39. package/src/components/TextField.tsx +8 -2
  40. package/src/mappings/Swiper.js +1 -15
  41. package/src/mappings/Swiper.ts +0 -15
@@ -52,46 +52,6 @@ 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
- };
95
55
  dotsTouchable: {
96
56
  label: string;
97
57
  description: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "43.2.3-cee5a8.0+cee5a899",
3
+ "version": "43.2.3",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -79,5 +79,5 @@
79
79
  ]
80
80
  ]
81
81
  },
82
- "gitHead": "cee5a899e750373fa6a941e2b26620595eb729fa"
82
+ "gitHead": "f3dca473f7dc1323eaf73bb646b2349e97769fba"
83
83
  }
@@ -1,14 +1,10 @@
1
1
  import React from "react";
2
2
  import { View } from "react-native";
3
3
  import SwiperComponent from "react-native-web-swiper";
4
- const Swiper = ({ vertical = false, loop = false, timeout = 0, from = 0, prevTitle = "", nextTitle = "", prevTitleColor = "red", nextTitleColor = "blue", dotsTouchable = true, dotColor, dotActiveColor, children, style, }) => (React.createElement(View, { style: style },
4
+ const Swiper = ({ vertical = false, loop = false, timeout = 0, from = 0, prevTitle = "", nextTitle = "", dotsTouchable = true, children, style, }) => (React.createElement(View, { style: style },
5
5
  React.createElement(SwiperComponent, { from: from, loop: loop, timeout: timeout, vertical: vertical, controlsProps: {
6
6
  prevTitle,
7
7
  nextTitle,
8
- prevTitleStyle: { color: prevTitleColor },
9
- nextTitleStyle: { color: nextTitleColor },
10
8
  dotsTouchable,
11
- dotActiveStyle: { backgroundColor: dotActiveColor },
12
- dotProps: { badgeStyle: { backgroundColor: dotColor } },
13
9
  } }, children)));
14
10
  export default Swiper;
@@ -9,11 +9,7 @@ export interface SwiperProps {
9
9
  timeout?: number;
10
10
  prevTitle?: string;
11
11
  nextTitle?: string;
12
- prevTitleColor: string;
13
- nextTitleColor: string;
14
12
  dotsTouchable?: boolean;
15
- dotColor?: string;
16
- dotActiveColor?: string;
17
13
  children: React.ReactNode;
18
14
  style?: StyleProp<ViewStyle>;
19
15
  }
@@ -25,11 +21,7 @@ const Swiper = ({
25
21
  from = 0,
26
22
  prevTitle = "",
27
23
  nextTitle = "",
28
- prevTitleColor = "red",
29
- nextTitleColor = "blue",
30
24
  dotsTouchable = true,
31
- dotColor,
32
- dotActiveColor,
33
25
  children,
34
26
  style,
35
27
  }: SwiperProps) => (
@@ -42,11 +34,7 @@ const Swiper = ({
42
34
  controlsProps={{
43
35
  prevTitle,
44
36
  nextTitle,
45
- prevTitleStyle: { color: prevTitleColor },
46
- nextTitleStyle: { color: nextTitleColor },
47
37
  dotsTouchable,
48
- dotActiveStyle: { backgroundColor: dotActiveColor },
49
- dotProps: { badgeStyle: { backgroundColor: dotColor } },
50
38
  }}
51
39
  >
52
40
  {children}
@@ -100,8 +100,15 @@ class TextField extends React.Component {
100
100
  if (this.props.disabled) {
101
101
  return;
102
102
  }
103
- this.setState({ value: value });
104
- this.props.onChangeText && this.props.onChangeText(value);
103
+ if (typeof value === "string") {
104
+ this.setState({ value });
105
+ this.props.onChangeText && this.props.onChangeText(value);
106
+ }
107
+ else {
108
+ this.setState({ value: value.nativeEvent.text });
109
+ this.props.onChangeText &&
110
+ this.props.onChangeText(value.nativeEvent.text);
111
+ }
105
112
  };
106
113
  toggleFocus() {
107
114
  this.setState((prevState) => ({ focused: !prevState.focused }));
@@ -187,8 +187,14 @@ class TextField extends React.Component<Props, State> {
187
187
  return;
188
188
  }
189
189
 
190
- this.setState({ value: value as string });
191
- this.props.onChangeText && this.props.onChangeText(value);
190
+ if (typeof value === "string") {
191
+ this.setState({ value });
192
+ this.props.onChangeText && this.props.onChangeText(value);
193
+ } else {
194
+ this.setState({ value: value.nativeEvent.text });
195
+ this.props.onChangeText &&
196
+ this.props.onChangeText(value.nativeEvent.text);
197
+ }
192
198
  };
193
199
 
194
200
  toggleFocus() {
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createBoolProp, createNumberProp, createTextProp, createColorProp, GROUPS, } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createBoolProp, createNumberProp, createTextProp, GROUPS, } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Swiper",
4
4
  tag: "Swiper",
@@ -37,20 +37,6 @@ export const SEED_DATA = {
37
37
  label: "Next Title",
38
38
  defaultValue: "",
39
39
  }),
40
- prevTitleColor: createColorProp({
41
- label: "Previous Title Color",
42
- }),
43
- nextTitleColor: createColorProp({
44
- label: "Next Title Color",
45
- }),
46
- dotColor: createColorProp({
47
- label: "Dot Color",
48
- defaultValue: "light",
49
- }),
50
- dotActiveColor: createColorProp({
51
- label: "Dot Active Color",
52
- defaultValue: "primary",
53
- }),
54
40
  dotsTouchable: createBoolProp({
55
41
  group: GROUPS.basic,
56
42
  label: "Dots Touchable",
@@ -3,7 +3,6 @@ import {
3
3
  createBoolProp,
4
4
  createNumberProp,
5
5
  createTextProp,
6
- createColorProp,
7
6
  GROUPS,
8
7
  } from "@draftbit/types";
9
8
 
@@ -45,20 +44,6 @@ export const SEED_DATA = {
45
44
  label: "Next Title",
46
45
  defaultValue: "",
47
46
  }),
48
- prevTitleColor: createColorProp({
49
- label: "Previous Title Color",
50
- }),
51
- nextTitleColor: createColorProp({
52
- label: "Next Title Color",
53
- }),
54
- dotColor: createColorProp({
55
- label: "Dot Color",
56
- defaultValue: "light",
57
- }),
58
- dotActiveColor: createColorProp({
59
- label: "Dot Active Color",
60
- defaultValue: "primary",
61
- }),
62
47
  dotsTouchable: createBoolProp({
63
48
  group: GROUPS.basic,
64
49
  label: "Dots Touchable",