@towsila/expo-ui-library 1.5.9 → 1.5.11

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@towsila/expo-ui-library",
3
- "version": "1.5.9",
3
+ "version": "1.5.11",
4
4
  "description": "",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -21,32 +21,21 @@ interface Props {
21
21
  function splitIntoSteps(fields: Field[]): Field[][] {
22
22
  const info = fields.filter((f) => f.type !== "password");
23
23
  const security = fields.filter((f) => f.type === "password");
24
-
25
- console.log("DEBUG splitIntoSteps:", {
26
- totalFields: fields.length,
27
- infoFields: info.length,
28
- securityFields: security.length,
29
- });
30
-
31
24
  const steps: Field[][] = [];
32
25
 
33
- // Split info fields if more than 3
34
26
  if (info.length > 4) {
35
- console.log("SPLITTING INFO FIELDS");
36
27
  const mid = Math.ceil(info.length / 2);
37
28
  steps.push(info.slice(0, mid));
38
29
  steps.push(info.slice(mid));
39
30
  } else if (info.length > 0) {
40
- console.log("NOT SPLITTING, ADDING ALL");
41
31
  steps.push(info);
42
32
  }
43
33
 
44
34
  // Add security fields as separate step
45
35
  if (security.length > 0) {
46
- console.log("ADDING SECURITY STEP");
47
36
  steps.push(security);
48
37
  }
49
- console.log("FINAL STEPS:", steps.length);
38
+
50
39
  return steps;
51
40
  }
52
41
 
@@ -113,11 +102,6 @@ export const DynamicForm: React.FC<Props> = ({
113
102
  );
114
103
 
115
104
  return (
116
- <ScrollView
117
- contentContainerStyle={{ flexGrow: 1 }}
118
- showsVerticalScrollIndicator={false}
119
- bounces={false}
120
- >
121
105
  <View style={{ gap: 4, paddingBottom: 20 }}>
122
106
 
123
107
  {/* Stepper — only show if more than 1 step */}
@@ -168,6 +152,5 @@ export const DynamicForm: React.FC<Props> = ({
168
152
  </View>
169
153
  )}
170
154
  </View>
171
- </ScrollView>
172
155
  );
173
156
  };
@@ -17,11 +17,26 @@ interface Props {
17
17
  nextLabel?: string;
18
18
  backLabel?: string;
19
19
  }
20
- // can i split it into 2 not only move the password if the number of fields is > 4
20
+
21
21
  function splitIntoSteps(fields: Field[]): Field[][] {
22
22
  const info = fields.filter((f) => f.type !== "password");
23
23
  const security = fields.filter((f) => f.type === "password");
24
- return [info, security].filter((s) => s.length > 0);
24
+ const steps: Field[][] = [];
25
+
26
+ if (info.length > 4) {
27
+ const mid = Math.ceil(info.length / 2);
28
+ steps.push(info.slice(0, mid));
29
+ steps.push(info.slice(mid));
30
+ } else if (info.length > 0) {
31
+ steps.push(info);
32
+ }
33
+
34
+ // Add security fields as separate step
35
+ if (security.length > 0) {
36
+ steps.push(security);
37
+ }
38
+
39
+ return steps;
25
40
  }
26
41
 
27
42
  export const SharpDynamicForm: React.FC<Props> = ({