@klyftig/mobile-ui 1.9.0 → 1.10.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.
package/README.md CHANGED
@@ -15,7 +15,10 @@ version history.
15
15
  `expo`, `react`, `react-native`, `@expo/vector-icons`, `expo-blur`,
16
16
  `expo-glass-effect`, `expo-linear-gradient`, `react-native-svg`,
17
17
  `react-native-safe-area-context`, `expo-store-review` (native module, needs a
18
- dev-client rebuild when added), and `zustand` (>= 5).
18
+ dev-client rebuild when added), and `zustand` (>= 5). `react-native` >= 0.83;
19
+ developed and typechecked against 0.88.1 / Expo SDK 58 (1.10.1 fixed the
20
+ removed `StyleSheet.absoluteFillObject` and other 0.88 type changes — apps on
21
+ RN 0.88 need >= 1.10.1).
19
22
 
20
23
  ## Review ("Rate Us") module
21
24
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@klyftig/mobile-ui",
3
- "version": "1.9.0",
3
+ "version": "1.10.1",
4
4
  "scripts": {
5
5
  "test": "jest",
6
6
  "sync": "bash scripts/sync-to-kaelo.sh",
@@ -40,14 +40,14 @@
40
40
  "devDependencies": {
41
41
  "@testing-library/react-native": "^13.3.3",
42
42
  "@types/jest": "^29.5.14",
43
- "@types/react": "~19.2.0",
44
- "expo": "~55.0.11",
45
- "expo-store-review": "~55.0.14",
43
+ "@types/react": "~19.3.0",
44
+ "expo": "~58.0.23",
45
+ "expo-store-review": "~58.0.2",
46
46
  "jest": "^29.7.0",
47
- "jest-expo": "~55.0.14",
48
- "react": "19.2.0",
49
- "react-native": "0.83.4",
50
- "react-test-renderer": "^19.2.0",
47
+ "jest-expo": "~58.0.14",
48
+ "react": "19.3.0",
49
+ "react-native": "0.88.1",
50
+ "react-test-renderer": "19.3.0",
51
51
  "typescript": "^6.0.3",
52
52
  "zustand": "^5.0.15"
53
53
  },
@@ -71,7 +71,7 @@ const styles = StyleSheet.create({
71
71
  alignItems: 'center',
72
72
  },
73
73
  backdrop: {
74
- ...StyleSheet.absoluteFillObject,
74
+ ...StyleSheet.absoluteFill,
75
75
  backgroundColor: 'rgba(0,0,0,0.4)',
76
76
  },
77
77
  content: {
@@ -211,7 +211,7 @@ const styles = StyleSheet.create({
211
211
  alignItems: 'center',
212
212
  },
213
213
  backdrop: {
214
- ...StyleSheet.absoluteFillObject,
214
+ ...StyleSheet.absoluteFill,
215
215
  backgroundColor: 'rgba(0, 0, 0, 0.3)',
216
216
  zIndex: 99,
217
217
  },
@@ -13,7 +13,8 @@ interface GlassButtonProps {
13
13
  disabled?: boolean;
14
14
  icon?: string;
15
15
  fullWidth?: boolean;
16
- size?: 'normal' | 'compact';
16
+ /** normal = 56 pt, medium = 48 pt (same text, a slimmer bar), compact = 40 pt with smaller text. */
17
+ size?: 'normal' | 'medium' | 'compact';
17
18
  }
18
19
 
19
20
  export const GlassButton: React.FC<GlassButtonProps> = ({
@@ -28,6 +29,7 @@ export const GlassButton: React.FC<GlassButtonProps> = ({
28
29
  }) => {
29
30
  const isDisabled = disabled || loading;
30
31
  const isCompact = size === 'compact';
32
+ const isMedium = size === 'medium';
31
33
  const scaleAnim = useRef(new Animated.Value(1)).current;
32
34
 
33
35
  const handlePressIn = () => {
@@ -85,6 +87,7 @@ export const GlassButton: React.FC<GlassButtonProps> = ({
85
87
  style={[
86
88
  styles.primaryButton,
87
89
  isDisabled && styles.primaryButtonDisabled,
90
+ isMedium && styles.primaryButtonMedium,
88
91
  isCompact && styles.primaryButtonCompact,
89
92
  ]}
90
93
  >
@@ -120,6 +123,7 @@ export const GlassButton: React.FC<GlassButtonProps> = ({
120
123
  style={[
121
124
  styles.dangerButton,
122
125
  isDisabled && styles.primaryButtonDisabled,
126
+ isMedium && styles.buttonMedium,
123
127
  isCompact && styles.primaryButtonCompact,
124
128
  ]}
125
129
  >
@@ -155,6 +159,7 @@ export const GlassButton: React.FC<GlassButtonProps> = ({
155
159
  style={[
156
160
  styles.secondaryButton,
157
161
  isDisabled && styles.primaryButtonDisabled,
162
+ isMedium && styles.buttonMedium,
158
163
  isCompact && styles.secondaryButtonCompact,
159
164
  ]}
160
165
  >
@@ -184,6 +189,13 @@ const styles = StyleSheet.create({
184
189
  borderColor: 'rgba(255,255,255,0.15)',
185
190
  ...shadows.lg,
186
191
  },
192
+ primaryButtonMedium: {
193
+ height: 48,
194
+ borderRadius: 24,
195
+ },
196
+ buttonMedium: {
197
+ height: 48,
198
+ },
187
199
  primaryButtonCompact: {
188
200
  height: 40,
189
201
  borderRadius: theme.borderRadius.control,
@@ -103,7 +103,7 @@ const styles = StyleSheet.create({
103
103
  height: GLASS_FOOTER_FADE,
104
104
  },
105
105
  scrim: {
106
- ...StyleSheet.absoluteFillObject,
106
+ ...StyleSheet.absoluteFill,
107
107
  backgroundColor: 'rgba(250,249,246,0.72)',
108
108
  },
109
109
  content: {
@@ -1,6 +1,6 @@
1
1
  import React, { useState, useCallback, memo } from 'react';
2
2
  import { View, TextInput as RNTextInput, Text, TouchableOpacity, StyleSheet } from 'react-native';
3
- import type { NativeSyntheticEvent, StyleProp, TextInputContentSizeChangeEventData, ViewStyle } from 'react-native';
3
+ import type { StyleProp, TextInputContentSizeChangeEvent, ViewStyle } from 'react-native';
4
4
  import { MaterialCommunityIcons as Icon } from '@expo/vector-icons';
5
5
  import { useTheme } from '../hooks/useTheme';
6
6
  import { colors } from '../theme/colors';
@@ -94,7 +94,7 @@ const GlassInputComponent: React.FC<GlassInputProps> = ({
94
94
  const [contentHeight, setContentHeight] = useState(0);
95
95
  const isAutoGrow = multiline && autoGrow;
96
96
 
97
- const handleContentSizeChange = useCallback((e: NativeSyntheticEvent<TextInputContentSizeChangeEventData>) => {
97
+ const handleContentSizeChange = useCallback((e: TextInputContentSizeChangeEvent) => {
98
98
  setContentHeight(e.nativeEvent.contentSize.height);
99
99
  }, []);
100
100
 
@@ -1,4 +1,5 @@
1
1
  import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
2
+ import type { ComponentRef } from 'react';
2
3
  import {
3
4
  ScrollView,
4
5
  View,
@@ -59,7 +60,7 @@ export function WheelPicker({
59
60
  loop = false,
60
61
  }: WheelPickerProps) {
61
62
  const { colors } = useTheme();
62
- const scrollRef = useRef<ScrollView>(null);
63
+ const scrollRef = useRef<ComponentRef<typeof ScrollView>>(null);
63
64
  const containerHeight = itemHeight * visibleCount;
64
65
  const padding = (containerHeight - itemHeight) / 2;
65
66
  const lastIndexRef = useRef<number>(-1);