@klyftig/mobile-ui 1.8.0 → 1.10.0

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": "@klyftig/mobile-ui",
3
- "version": "1.8.0",
3
+ "version": "1.10.0",
4
4
  "scripts": {
5
5
  "test": "jest",
6
6
  "sync": "bash scripts/sync-to-kaelo.sh",
@@ -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,
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { View, Text, TouchableOpacity, StyleSheet, StyleProp, ViewStyle } from 'react-native';
2
+ import { View, Text, TouchableOpacity, StyleSheet, StyleProp, TextStyle, ViewStyle } from 'react-native';
3
3
  import { MaterialCommunityIcons as Icon } from '@expo/vector-icons';
4
4
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
5
5
  import { useTheme } from '../hooks/useTheme';
@@ -17,6 +17,8 @@ export interface ScreenHeaderProps {
17
17
  /** Render below the title row — e.g. a tab bar or period toggle that should stay pinned with the header. */
18
18
  below?: React.ReactNode;
19
19
  style?: StyleProp<ViewStyle>;
20
+ /** Merged over the title's own style — e.g. an app's display (serif) face. */
21
+ titleStyle?: StyleProp<TextStyle>;
20
22
  }
21
23
 
22
24
  /**
@@ -30,6 +32,7 @@ export function ScreenHeader({
30
32
  leftIcon = 'home-outline',
31
33
  leftAccessibilityLabel = 'Go to Dashboard',
32
34
  onLeftPress,
35
+ titleStyle,
33
36
  right,
34
37
  below,
35
38
  style,
@@ -55,7 +58,7 @@ export function ScreenHeader({
55
58
  </View>
56
59
  <View style={styles.center}>
57
60
  <Text
58
- style={[styles.title, { color: colors.text.primary }]}
61
+ style={[styles.title, { color: colors.text.primary }, titleStyle]}
59
62
  numberOfLines={1}
60
63
  >
61
64
  {title}