@umituz/react-native-design-system 2.3.20 → 2.3.22

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.20",
3
+ "version": "2.3.22",
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",
@@ -46,11 +46,15 @@ export const Countdown: React.FC<CountdownProps> = ({
46
46
  );
47
47
  const currentTarget = allTargets[currentTargetIndex];
48
48
 
49
- const { timeRemaining } = useCountdown(currentTarget, {
49
+ const { timeRemaining, setTarget: updateTarget } = useCountdown(currentTarget, {
50
50
  interval,
51
51
  onExpire,
52
52
  });
53
53
 
54
+ React.useEffect(() => {
55
+ updateTarget(currentTarget);
56
+ }, [currentTarget, updateTarget]);
57
+
54
58
  const handleToggle = () => {
55
59
  const nextIndex = (currentTargetIndex + 1) % allTargets.length;
56
60
  setCurrentTargetIndex(nextIndex);
@@ -24,6 +24,9 @@ export const TimeUnit: React.FC<TimeUnitProps> = ({
24
24
 
25
25
  const config = sizeConfig[size];
26
26
 
27
+ // 2 basamaklı sayılar için 0 padding, 3+ basamak için olduğu gibi
28
+ const displayValue = value >= 100 ? String(value) : String(value).padStart(2, '0');
29
+
27
30
  return (
28
31
  <View
29
32
  style={[
@@ -33,6 +36,7 @@ export const TimeUnit: React.FC<TimeUnitProps> = ({
33
36
  borderRadius: tokens.borders.radius.lg,
34
37
  paddingVertical: config.padding,
35
38
  minHeight: config.minHeight,
39
+ paddingHorizontal: tokens.spacing.xs,
36
40
  },
37
41
  ]}
38
42
  >
@@ -40,8 +44,11 @@ export const TimeUnit: React.FC<TimeUnitProps> = ({
40
44
  type="displaySmall"
41
45
  color="onSurface"
42
46
  style={[styles.value, { fontSize: config.fontSize }]}
47
+ numberOfLines={1}
48
+ adjustsFontSizeToFit
49
+ minimumFontScale={0.6}
43
50
  >
44
- {String(value).padStart(2, '0')}
51
+ {displayValue}
45
52
  </AtomicText>
46
53
  <AtomicText
47
54
  type="labelSmall"