@widergy/mobile-ui 2.3.5 → 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,17 @@
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
+
8
+ # [2.4.0](https://github.com/widergy/mobile-ui/compare/v2.3.5...v2.4.0) (2026-01-19)
9
+
10
+
11
+ ### Features
12
+
13
+ * [AUTO-166] Test id support for UTActionCard ([#472](https://github.com/widergy/mobile-ui/issues/472)) ([d72795e](https://github.com/widergy/mobile-ui/commit/d72795e52300e174f9ae7e4165b496ab380a74c0))
14
+
1
15
  ## [2.3.5](https://github.com/widergy/mobile-ui/compare/v2.3.4...v2.3.5) (2025-12-18)
2
16
 
3
17
 
@@ -28,6 +28,7 @@ import ownStyles from './styles';
28
28
  const Header = ({
29
29
  adornment,
30
30
  classNames,
31
+ dataTestId,
31
32
  description,
32
33
  descriptionProps,
33
34
  headerActionLabel,
@@ -52,7 +53,7 @@ const Header = ({
52
53
  <View style={styles.headerTitles}>
53
54
  {renderAdornment(adornment, 'top')}
54
55
  <View style={styles.titleAndDescription}>
55
- <UTLabel variant="title3" weight="medium" {...titleProps}>
56
+ <UTLabel dataTestId={`${dataTestId}.title`} variant="title3" weight="medium" {...titleProps}>
56
57
  {title}
57
58
  </UTLabel>
58
59
  {description && (
@@ -86,6 +87,7 @@ const Header = ({
86
87
  Header.propTypes = {
87
88
  adornment: shape({ position: string, props: object, type: string }),
88
89
  classNames: objectOf(string),
90
+ dataTestId: string,
89
91
  description: string,
90
92
  descriptionProps: shape({ colorTheme: string, variant: string }),
91
93
  headerActionLabel: string,
@@ -43,6 +43,7 @@ const UTActionCard = ({
43
43
  bottomActionsVariant,
44
44
  children,
45
45
  classNames = {},
46
+ dataTestId,
46
47
  description,
47
48
  descriptionProps = {},
48
49
  headerActionLabel,
@@ -76,6 +77,7 @@ const UTActionCard = ({
76
77
  disabled={!mainAction || loading}
77
78
  onPress={mainAction && (() => mainAction?.())}
78
79
  style={[styles.innerContainer, classNames.innerContainer, mainAction && styles.withMainAction]}
80
+ testID={dataTestId}
79
81
  >
80
82
  <View>
81
83
  {BackgroundImage && (
@@ -91,6 +93,7 @@ const UTActionCard = ({
91
93
  {...{
92
94
  adornment,
93
95
  classNames,
96
+ dataTestId,
94
97
  description,
95
98
  descriptionProps,
96
99
  headerActionLabel,
@@ -162,6 +165,7 @@ UTActionCard.propTypes = {
162
165
  ),
163
166
  bottomActionsVariant: oneOf([ACTION_TYPES.DEFAULT, ACTION_TYPES.REDIRECTION]),
164
167
  classNames: objectOf(string),
168
+ dataTestId: string,
165
169
  description: string,
166
170
  descriptionProps: shape({ colorTheme: string, variant: string }),
167
171
  headerActionLabel: string,
@@ -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.3.5",
5
+ "version": "2.5.0",
6
6
  "repository": "https://github.com/widergy/mobile-ui.git",
7
7
  "main": "lib/index.js",
8
8
  "files": [