@umituz/react-native-design-system 2.3.23 → 2.3.24

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": "@umituz/react-native-design-system",
3
- "version": "2.3.23",
3
+ "version": "2.3.24",
4
4
  "description": "Universal design system for React Native apps - Consolidated package with atoms, molecules, organisms, theme, typography, responsive and safe area utilities",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -24,8 +24,18 @@ export const TimeUnit: React.FC<TimeUnitProps> = ({
24
24
 
25
25
  const config = sizeConfig[size];
26
26
 
27
- // Pad 2-digit values with leading zero, display 3+ digits as-is
28
27
  const displayValue = value >= 100 ? String(value) : String(value).padStart(2, '0');
28
+ const digitCount = String(value).length;
29
+
30
+ // Calculate font size based on digit count for better consistency
31
+ let fontSizeMultiplier = 1;
32
+ if (digitCount >= 4) {
33
+ fontSizeMultiplier = 0.6; // 4+ digits
34
+ } else if (digitCount === 3) {
35
+ fontSizeMultiplier = 0.7; // 3 digits
36
+ }
37
+
38
+ const calculatedFontSize = config.fontSize * fontSizeMultiplier;
29
39
 
30
40
  return (
31
41
  <View
@@ -43,10 +53,8 @@ export const TimeUnit: React.FC<TimeUnitProps> = ({
43
53
  <AtomicText
44
54
  type="displaySmall"
45
55
  color="onSurface"
46
- style={[styles.value, { fontSize: config.fontSize }]}
56
+ style={[styles.value, { fontSize: calculatedFontSize }]}
47
57
  numberOfLines={1}
48
- adjustsFontSizeToFit
49
- minimumFontScale={0.6}
50
58
  >
51
59
  {displayValue}
52
60
  </AtomicText>