@widergy/mobile-ui 2.4.0 → 2.5.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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [2.5.0](https://github.com/widergy/mobile-ui/compare/v2.4.0...v2.5.0) (2026-01-22)
2
+
3
+
4
+ ### Features
5
+
6
+ * index prop ([#473](https://github.com/widergy/mobile-ui/issues/473)) ([f229d77](https://github.com/widergy/mobile-ui/commit/f229d771a38e9b9cb9573bc27d7d78e7e257e7d1))
7
+
1
8
  # [2.4.0](https://github.com/widergy/mobile-ui/compare/v2.3.5...v2.4.0) (2026-01-19)
2
9
 
3
10
 
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable react-hooks/exhaustive-deps */
2
2
  import { Animated, View, Pressable, PanResponder, ScrollView } from 'react-native';
3
- import { array, bool, func, object, string } from 'prop-types';
3
+ import { array, bool, func, object, string, number } from 'prop-types';
4
4
  import React, { useEffect, useRef, useState } from 'react';
5
5
 
6
6
  import { withTheme } from '../../theming';
@@ -20,10 +20,11 @@ const UTTabs = ({
20
20
  tabs,
21
21
  theme,
22
22
  withTabSliding = true,
23
- scrollableTabs = false
23
+ scrollableTabs = false,
24
+ selectedIndex = 0
24
25
  }) => {
25
26
  const styles = styleSheet(theme);
26
- const [selectedTab, setSelectedTab] = useState(0);
27
+ const [selectedTab, setSelectedTab] = useState(selectedIndex);
27
28
  const [scrollOffset, setScrollOffset] = useState(0);
28
29
  const position = useRef(new Animated.Value(0)).current;
29
30
  const indicatorPos = useRef(new Animated.Value(0)).current;
@@ -207,7 +208,8 @@ UTTabs.propTypes = {
207
208
  tabs: array,
208
209
  theme: object,
209
210
  withTabSliding: bool,
210
- scrollableTabs: bool
211
+ scrollableTabs: bool,
212
+ selectedIndex: number
211
213
  };
212
214
 
213
215
  export default withTheme(UTTabs);
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@widergy/mobile-ui",
3
3
  "description": "Widergy Mobile Components",
4
4
  "author": "widergy",
5
- "version": "2.4.0",
5
+ "version": "2.5.0",
6
6
  "repository": "https://github.com/widergy/mobile-ui.git",
7
7
  "main": "lib/index.js",
8
8
  "files": [