@widergy/mobile-ui 2.5.2 → 2.7.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.
Files changed (52) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/lib/components/CheckList/index.js +1 -1
  3. package/lib/components/Dropdown/index.js +3 -3
  4. package/lib/components/ImageLabel/layout.js +3 -3
  5. package/lib/components/ImagePicker/layout.js +1 -1
  6. package/lib/components/ImageRadio/index.js +0 -1
  7. package/lib/components/Label/utils.js +0 -3
  8. package/lib/components/MultipleFilePicker/constants.js +0 -1
  9. package/lib/components/MultipleFilePicker/index.js +2 -5
  10. package/lib/components/MultipleFilePicker/utils.js +0 -1
  11. package/lib/components/PhotoAlbum/index.js +3 -3
  12. package/lib/components/Portal/components/GlobalHost/index.js +1 -2
  13. package/lib/components/Portal/components/Host/index.js +1 -2
  14. package/lib/components/Portal/components/Manager/index.js +0 -1
  15. package/lib/components/RadioGroup/index.js +1 -0
  16. package/lib/components/RateChart/components/RateStagesGraph/components/Bars/index.js +1 -1
  17. package/lib/components/TransformView/index.js +0 -1
  18. package/lib/components/TransformView/utils.js +5 -7
  19. package/lib/components/UTBaseInputField/components/TooltipAdornment/constants.js +1 -0
  20. package/lib/components/UTBaseInputField/components/TooltipAdornment/index.js +16 -6
  21. package/lib/components/UTCBUInput/index.js +0 -1
  22. package/lib/components/UTDataCategory/index.js +2 -3
  23. package/lib/components/UTDataElement/index.js +0 -1
  24. package/lib/components/UTFieldLabel/index.js +2 -10
  25. package/lib/components/UTLabel/proptypes.js +1 -1
  26. package/lib/components/UTMenu/components/ListView/index.js +1 -1
  27. package/lib/components/UTMenu/components/MenuOption/index.js +0 -1
  28. package/lib/components/UTOnBoarding/components/CardContent/index.js +2 -3
  29. package/lib/components/UTPasswordField/versions/V0/proptypes.js +1 -1
  30. package/lib/components/UTProgressBar/index.js +1 -1
  31. package/lib/components/UTSelect/versions/V0/componentes/MultipleItem/index.js +0 -1
  32. package/lib/components/UTSelect/versions/V0/index.js +1 -1
  33. package/lib/components/UTSelect/versions/V0/proptypes.js +0 -1
  34. package/lib/components/UTSelect/versions/V1/index.js +2 -0
  35. package/lib/components/UTSelect/versions/V1/proptypes.js +3 -0
  36. package/lib/components/UTSwitch/proptypes.js +0 -1
  37. package/lib/components/UTTabs/index.js +0 -1
  38. package/lib/components/UTTextInput/versions/V0/flavors/OutlinedInput/index.js +1 -1
  39. package/lib/components/UTTextInput/versions/V0/proptypes.js +0 -1
  40. package/lib/components/UTTextInput/versions/V1/index.js +4 -0
  41. package/lib/components/UTTopbar/index.js +0 -1
  42. package/lib/components/UTTracker/components/Step/components/BarMask/index.js +0 -1
  43. package/lib/components/UTTracker/components/Step/components/StepMask/index.js +0 -2
  44. package/lib/components/UTTracker/components/Step/index.js +1 -2
  45. package/lib/components/UTTracker/index.js +0 -1
  46. package/lib/components/UTWorkflowContainer/versions/V0/components/BottomStepHandler/index.js +0 -1
  47. package/lib/components/UTWorkflowContainer/versions/V0/components/StepsHandler/index.js +0 -1
  48. package/lib/components/UTWorkflowContainer/versions/V1/index.js +2 -3
  49. package/lib/reactotronConfig.js +0 -1
  50. package/lib/theming/DefaultTheme.js +0 -1
  51. package/lib/types/UTFieldLabelTypes.js +11 -0
  52. package/package.json +26 -9
package/CHANGELOG.md CHANGED
@@ -1,3 +1,25 @@
1
+ # [2.7.0](https://github.com/widergy/mobile-ui/compare/v2.6.0...v2.7.0) (2026-02-18)
2
+
3
+
4
+ ### Features
5
+
6
+ * [DEV-766] mvp widergy/eslint-config package ([#465](https://github.com/widergy/mobile-ui/issues/465)) ([4c0f9e4](https://github.com/widergy/mobile-ui/commit/4c0f9e4abc7de0adc664db512767a85be53c52a3))
7
+ * [EGIT-29] markdown in labels ([#478](https://github.com/widergy/mobile-ui/issues/478)) ([1805092](https://github.com/widergy/mobile-ui/commit/18050920a71e4295cdc5d66dbec5b52ace80d865))
8
+ * [EGIT-29] markdown in labels ([#479](https://github.com/widergy/mobile-ui/issues/479)) ([25c13da](https://github.com/widergy/mobile-ui/commit/25c13da980b3aa64c128128581e645d74175b5dc))
9
+ * [EGIT-29] markdown in labels ([#480](https://github.com/widergy/mobile-ui/issues/480)) ([0e7a20a](https://github.com/widergy/mobile-ui/commit/0e7a20a06d62a84046d3c0deb3de7738983b44bb))
10
+ * [EGIT-29] markdown in labels ([#481](https://github.com/widergy/mobile-ui/issues/481)) ([21d0b8e](https://github.com/widergy/mobile-ui/commit/21d0b8e70184b9822ea9247aab66e52a853ba332))
11
+ * [EGIT-29] markdown in labels ([#482](https://github.com/widergy/mobile-ui/issues/482)) ([0326e2c](https://github.com/widergy/mobile-ui/commit/0326e2ccf673466d8a54142fc24053aa34f3716f))
12
+ * [EGIT-29] markdown in labels ([#483](https://github.com/widergy/mobile-ui/issues/483)) ([d197382](https://github.com/widergy/mobile-ui/commit/d19738218c8f98e49befca0846653d861c75c5e7))
13
+ * [EGIT-29] markdown in labels ([#484](https://github.com/widergy/mobile-ui/issues/484)) ([1f37636](https://github.com/widergy/mobile-ui/commit/1f37636c1da7b16fcfc43085e1cc23662f777420))
14
+ * [NTGE-184] add image in tooltips ([#476](https://github.com/widergy/mobile-ui/issues/476)) ([59485b2](https://github.com/widergy/mobile-ui/commit/59485b2ad54b25b1036170a9b5eee2b88a77fc40))
15
+
16
+ # [2.6.0](https://github.com/widergy/mobile-ui/compare/v2.5.2...v2.6.0) (2026-02-09)
17
+
18
+
19
+ ### Features
20
+
21
+ * [EGIT-7] account association label ([#477](https://github.com/widergy/mobile-ui/issues/477)) ([b2a60c7](https://github.com/widergy/mobile-ui/commit/b2a60c70d91af103af0c6621cafe8a37a1c62457))
22
+
1
23
  ## [2.5.2](https://github.com/widergy/mobile-ui/compare/v2.5.1...v2.5.2) (2026-01-28)
2
24
 
3
25
 
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable react/sort-comp */
2
- /* eslint-disable class-methods-use-this */
2
+
3
3
  import React, { PureComponent } from 'react';
4
4
  import { View, FlatList } from 'react-native';
5
5
  import { isEmpty } from '@widergy/web-utils/lib/array';
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable react/sort-comp */
2
- /* eslint-disable class-methods-use-this */
2
+
3
3
  // TODO implement horizontal repositioning.
4
4
  import React, { Component, createRef, Fragment } from 'react';
5
5
  import { Animated, ScrollView, View } from 'react-native';
@@ -246,7 +246,7 @@ class Dropdown extends Component {
246
246
  });
247
247
 
248
248
  return (
249
- <Fragment>
249
+ <>
250
250
  <View collapsable={false} ref={this.anchor}>
251
251
  {anchor}
252
252
  </View>
@@ -295,7 +295,7 @@ class Dropdown extends Component {
295
295
  </TransformView>
296
296
  </View>
297
297
  </Overlay>
298
- </Fragment>
298
+ </>
299
299
  );
300
300
  }
301
301
  }
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { View, TouchableWithoutFeedback } from 'react-native';
3
3
 
4
4
  import Modal from '../Modal';
5
- import Label from '../Label';
5
+ import UTLabel from '../UTLabel';
6
6
  import UTImage from '../UTImage';
7
7
 
8
8
  import styles from './styles';
@@ -24,9 +24,9 @@ const ImageLabel = ({
24
24
  }) => (
25
25
  <View style={[styles.container, style]}>
26
26
  {!!imageTitle && (
27
- <Label {...titleProps} style={titleStyle}>
27
+ <UTLabel {...titleProps} style={titleStyle} withMarkdown>
28
28
  {imageTitle}
29
- </Label>
29
+ </UTLabel>
30
30
  )}
31
31
  {!!imageSource && (
32
32
  <TouchableWithoutFeedback onPress={onOpenImageModal}>
@@ -1,5 +1,5 @@
1
1
  import React, { useState } from 'react';
2
- // eslint-disable-next-line react-native/split-platform-components
2
+
3
3
  import { View, Image, TouchableWithoutFeedback, PermissionsAndroid } from 'react-native';
4
4
  // eslint-disable-next-line import/no-unresolved
5
5
  import { launchCamera, launchImageLibrary } from 'react-native-image-picker';
@@ -93,7 +93,6 @@ ImageRadio.propTypes = {
93
93
  onChange: func,
94
94
  value: string,
95
95
  style: ViewPropTypes.style,
96
- // eslint-disable-next-line react/forbid-prop-types
97
96
  variant: shape(any)
98
97
  };
99
98
 
@@ -1,6 +1,3 @@
1
- /* eslint-disable camelcase */
2
- /* eslint-disable react/display-name */
3
- /* eslint-disable no-undef */
4
1
  import { isEmpty } from 'lodash';
5
2
 
6
3
  import { markdownStyles } from './styles';
@@ -1,4 +1,3 @@
1
- // eslint-disable-next-line import/no-unresolved
2
1
  import { MEGABYTE } from '../../utils/fileUtils.js';
3
2
 
4
3
  export const DEFAULT_MAX_SIZE = 10 * MEGABYTE;
@@ -1,9 +1,8 @@
1
- /* eslint-disable no-undef */
2
1
  import isEmpty from 'lodash/isEmpty';
3
2
  import isArray from 'lodash/isArray';
4
3
  // eslint-disable-next-line import/no-unresolved
5
4
  import { launchCamera, launchImageLibrary } from 'react-native-image-picker';
6
- // eslint-disable-next-line react-native/split-platform-components
5
+
7
6
  import React, { View, PermissionsAndroid, Alert } from 'react-native';
8
7
  import { useEffect, useState } from 'react';
9
8
  import * as ExpoImagePicker from 'expo-image-picker';
@@ -67,7 +66,6 @@ const MultipleFilePicker = ({
67
66
 
68
67
  useEffect(() => {
69
68
  onChange?.(isEmpty(rawFiles) ? null : { files: rawFiles });
70
- // eslint-disable-next-line react-hooks/exhaustive-deps
71
69
  }, [rawFiles, onChange]);
72
70
 
73
71
  useEffect(() => {
@@ -142,7 +140,7 @@ const MultipleFilePicker = ({
142
140
  // eslint-disable-next-line no-restricted-syntax
143
141
  for (const asset of documents) {
144
142
  if (added >= slots) break;
145
- // eslint-disable-next-line no-await-in-loop
143
+
146
144
  const document = {
147
145
  uri: asset.uri,
148
146
  type: asset.mimeType || asset.type || 'application/octet-stream',
@@ -184,7 +182,6 @@ const MultipleFilePicker = ({
184
182
  }
185
183
  };
186
184
 
187
- // eslint-disable-next-line consistent-return
188
185
  const requestPermissionCamera = async () => {
189
186
  try {
190
187
  const granted = await PermissionsAndroid.request(
@@ -149,7 +149,6 @@ export const isFileFormatInvalid = async (file, allowedPDFUploadSizes, onError)
149
149
  export const getInitialValuesFrom = files =>
150
150
  files
151
151
  ?.map(fileBlob => {
152
- // eslint-disable-next-line no-underscore-dangle
153
152
  const fileData = fileBlob?._data || {};
154
153
 
155
154
  return fileData ? { name: fileBlob?.name || fileData?.name, size: fileData?.size } : null;
@@ -1,5 +1,5 @@
1
1
  import React, { Fragment, useEffect, useState } from 'react';
2
- // eslint-disable-next-line react-native/split-platform-components
2
+
3
3
  import { View, TouchableOpacity, PermissionsAndroid } from 'react-native';
4
4
  // eslint-disable-next-line import/no-unresolved
5
5
  import { launchCamera } from 'react-native-image-picker';
@@ -132,7 +132,7 @@ const PhotoAlbum = ({
132
132
  }, [selectedImages]);
133
133
 
134
134
  return (
135
- <Fragment>
135
+ <>
136
136
  {title && (
137
137
  <UTLabel variant="subtitle1" weight="semibold" colorTheme="gray" style={styles.title}>
138
138
  {title}
@@ -187,7 +187,7 @@ const PhotoAlbum = ({
187
187
  </Portal>
188
188
  )}
189
189
  </View>
190
- </Fragment>
190
+ </>
191
191
  );
192
192
  };
193
193
 
@@ -51,7 +51,6 @@ class GlobalHost extends Component {
51
51
  };
52
52
 
53
53
  mount = children => {
54
- // eslint-disable-next-line no-plusplus
55
54
  const key = this.nextKey++;
56
55
 
57
56
  if (this.manager) {
@@ -91,7 +90,7 @@ class GlobalHost extends Component {
91
90
  const { mount, update, unmount } = this;
92
91
  return (
93
92
  <Provider value={{ mount, update, unmount }}>
94
- <View style={[container]}>{children}</View>
93
+ <View style={container}>{children}</View>
95
94
  <Manager ref={this.setManager} />
96
95
  </Provider>
97
96
  );
@@ -51,7 +51,6 @@ class Host extends Component {
51
51
  };
52
52
 
53
53
  mount = children => {
54
- // eslint-disable-next-line no-plusplus
55
54
  const key = this.nextKey++;
56
55
 
57
56
  if (this.manager) {
@@ -91,7 +90,7 @@ class Host extends Component {
91
90
  const { mount, update, unmount } = this;
92
91
  return (
93
92
  <Provider value={{ mount, update, unmount }}>
94
- <View style={[container]}>{children}</View>
93
+ <View style={container}>{children}</View>
95
94
  <Manager ref={this.setManager} />
96
95
  </Provider>
97
96
  );
@@ -1,4 +1,3 @@
1
- /* eslint-disable class-methods-use-this */
2
1
  /* eslint-disable react/no-unused-class-component-methods */
3
2
  /* eslint-disable react/sort-comp */
4
3
  import React, { PureComponent } from 'react';
@@ -49,6 +49,7 @@ class RadioGroup extends Component {
49
49
  dataTestId={dataTestId ? `${dataTestId}.${titleTestId}` : undefined}
50
50
  variant="medium"
51
51
  {...titleProps}
52
+ withMarkdown
52
53
  >
53
54
  {title}
54
55
  </UTLabel>
@@ -17,7 +17,7 @@ const Bars = ({ rateStages, withoutStages }) => {
17
17
  );
18
18
 
19
19
  const totalRange = getTotalRange(rateStagesToUse);
20
- // eslint-disable-next-line camelcase
20
+
21
21
  const subStages = rateStagesToUse.flatMap(rate => rate?.sub_rate_stages);
22
22
 
23
23
  return (
@@ -6,7 +6,6 @@ import propTypes from './propTypes';
6
6
  import styles from './styles';
7
7
 
8
8
  class TransformView extends Component {
9
- // eslint-disable-next-line react/sort-comp
10
9
  static TransformOrigins = TRANSFORM_ORIGINS;
11
10
 
12
11
  constructor(props) {
@@ -1,6 +1,5 @@
1
- /* eslint-disable consistent-return */
2
1
  /* eslint-disable prefer-destructuring */
3
- /* eslint-disable camelcase */
2
+
4
3
  /**
5
4
  * Copyright (c) Facebook, Inc. and its affiliates.
6
5
  *
@@ -539,10 +538,10 @@ const MatrixMath = {
539
538
  }
540
539
  const matrix = [];
541
540
  const perspectiveMatrix = [];
542
- // eslint-disable-next-line no-plusplus
541
+
543
542
  for (let i = 0; i < 4; i++) {
544
543
  matrix.push([]);
545
- // eslint-disable-next-line no-plusplus
544
+
546
545
  for (let j = 0; j < 4; j++) {
547
546
  const value = transformMatrix[i * 4 + j] / transformMatrix[15];
548
547
  matrix[i].push(value);
@@ -575,7 +574,7 @@ const MatrixMath = {
575
574
  }
576
575
 
577
576
  // translation is simple
578
- // eslint-disable-next-line no-plusplus
577
+
579
578
  for (let i = 0; i < 3; i++) {
580
579
  translation[i] = matrix[3][i];
581
580
  }
@@ -583,7 +582,7 @@ const MatrixMath = {
583
582
  // Now get scale and shear.
584
583
  // 'row' is a 3 element array of 3 component vectors
585
584
  const row = [];
586
- // eslint-disable-next-line no-plusplus
585
+
587
586
  for (let i = 0; i < 3; i++) {
588
587
  row[i] = [matrix[i][0], matrix[i][1], matrix[i][2]];
589
588
  }
@@ -618,7 +617,6 @@ const MatrixMath = {
618
617
  // is -1, then negate the matrix and the scaling factors.
619
618
  const pdum3 = MatrixMath.v3Cross(row[1], row[2]);
620
619
  if (MatrixMath.v3Dot(row[0], pdum3) < 0) {
621
- // eslint-disable-next-line no-plusplus
622
620
  for (let i = 0; i < 3; i++) {
623
621
  scale[i] *= -1;
624
622
  row[i][0] *= -1;
@@ -0,0 +1 @@
1
+ export const IMAGE_REGEX = /!\[.*?\]\((.*?)\)/;
@@ -4,20 +4,30 @@ import { object, shape, string } from 'prop-types';
4
4
  import UTTooltip from '../../../UTTooltip';
5
5
  import UTIcon from '../../../UTIcon';
6
6
  import UTLabel from '../../../UTLabel';
7
+ import UTImage from '../../../UTImage';
8
+
9
+ import { IMAGE_REGEX } from './constants';
7
10
 
8
11
  const TooltipAdornment = ({ dataTestId, tooltip, tooltipProps }) => {
9
12
  const { tooltip: tooltipStyles, arrowTouchable, labelProps } = tooltipProps || {};
13
+ const match = tooltip?.match(IMAGE_REGEX);
14
+ const imageUrl = match?.[1];
15
+
10
16
  return tooltip ? (
11
17
  <UTTooltip
12
18
  dataTestId={dataTestId ? `${dataTestId}.tooltipAdornment` : undefined}
13
19
  styles={{ tooltip: tooltipStyles, arrow: arrowTouchable }}
14
20
  content={
15
- <UTLabel
16
- dataTestId={dataTestId ? `${dataTestId}.tooltipAdornment.content` : undefined}
17
- {...labelProps}
18
- >
19
- {tooltip}
20
- </UTLabel>
21
+ imageUrl ? (
22
+ <UTImage source={{ uri: imageUrl }} widthSize={230} />
23
+ ) : (
24
+ <UTLabel
25
+ dataTestId={dataTestId ? `${dataTestId}.tooltipAdornment.content` : undefined}
26
+ {...labelProps}
27
+ >
28
+ {tooltip}
29
+ </UTLabel>
30
+ )
21
31
  }
22
32
  >
23
33
  <UTIcon
@@ -20,7 +20,6 @@ const UTCBUInput = ({ input, field, ...props }) => {
20
20
  };
21
21
 
22
22
  const handleOnBlur = () => {
23
- // eslint-disable-next-line no-unused-expressions
24
23
  onBlur?.(value);
25
24
  };
26
25
 
@@ -1,4 +1,3 @@
1
- /* eslint-disable no-underscore-dangle */
2
1
  import { Animated, View } from 'react-native';
3
2
  import { array, bool, object, string } from 'prop-types';
4
3
  import React, { useCallback, useRef, useState } from 'react';
@@ -32,7 +31,7 @@ const UTDataCategory = ({ area, collapsable = true, elements, style, theme, titl
32
31
  return (
33
32
  <View style={[styles.container(area), style]}>
34
33
  {title && (
35
- <View style={[styles.title]}>
34
+ <View style={styles.title}>
36
35
  <UTLabel colorTheme="gray" weight="medium" {...titleProps}>
37
36
  {title}
38
37
  </UTLabel>
@@ -43,7 +42,7 @@ const UTDataCategory = ({ area, collapsable = true, elements, style, theme, titl
43
42
  )}
44
43
  </View>
45
44
  )}
46
- <Animated.View style={[styles.childrenAnimation(collapsed, childrenHeight)]}>
45
+ <Animated.View style={styles.childrenAnimation(collapsed, childrenHeight)}>
47
46
  <View style={styles.childrenContainer} onLayout={onLayout}>
48
47
  {elements.map(element => (
49
48
  <UTDataElement {...element} key={element.key} />
@@ -1,4 +1,3 @@
1
- /* eslint-disable no-underscore-dangle */
2
1
  import { Animated, View } from 'react-native';
3
2
  import { bool, element, number, object, oneOfType, string } from 'prop-types';
4
3
  import React, { useCallback, useRef, useState } from 'react';
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- import { bool, elementType, string } from 'prop-types';
3
2
  import { View } from 'react-native';
4
3
 
5
4
  import UTLabel from '../UTLabel';
6
5
  import { TEST_ID_CONSTANTS } from '../../constants/testIds';
6
+ import UTFieldLabelTypes from '../../types/UTFieldLabelTypes';
7
7
 
8
8
  import { REQUIRED_LABEL } from './constants';
9
9
  import styles from './styles';
@@ -50,14 +50,6 @@ const UTFieldLabel = ({
50
50
  );
51
51
  };
52
52
 
53
- UTFieldLabel.propTypes = {
54
- colorTheme: string,
55
- CustomTitleComponent: elementType,
56
- dataTestId: string,
57
- required: bool,
58
- variant: string,
59
- weight: string,
60
- withMarkdown: bool
61
- };
53
+ UTFieldLabel.propTypes = UTFieldLabelTypes;
62
54
 
63
55
  export default UTFieldLabel;
@@ -15,7 +15,7 @@ export const DEFAULT_PROPS = {
15
15
  export const propTypes = {
16
16
  colorTheme: string,
17
17
  dataTestId: string,
18
- // eslint-disable-next-line react/forbid-prop-types
18
+
19
19
  field: any,
20
20
  markdownStyles: object,
21
21
  numberOfLines: number,
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable react/sort-comp */
2
- /* eslint-disable class-methods-use-this */
2
+
3
3
  import React, { PureComponent } from 'react';
4
4
  import { FlatList } from 'react-native';
5
5
 
@@ -25,7 +25,6 @@ MenuOption.propTypes = {
25
25
  label: string,
26
26
  selected: bool,
27
27
  styles: ViewPropTypes.style,
28
- // eslint-disable-next-line react/forbid-prop-types
29
28
  item: shape(any),
30
29
  dataTestId: string
31
30
  };
@@ -1,4 +1,3 @@
1
- /* eslint-disable react-native/no-inline-styles */
2
1
  import React, { Fragment } from 'react';
3
2
  import { Animated } from 'react-native';
4
3
 
@@ -9,7 +8,7 @@ import propTypes from './propTypes';
9
8
  import ownStyles from './styles';
10
9
 
11
10
  const CardContent = ({ onPress, currentPage, opacity, styles, buttonTitle = '', disabled }) => (
12
- <Fragment>
11
+ <>
13
12
  <Animated.View style={[styles?.textContainer, { opacity }]}>
14
13
  <UTLabel variant="subtitle1" weight="bold" style={styles?.title}>
15
14
  {currentPage?.title || ''}
@@ -25,7 +24,7 @@ const CardContent = ({ onPress, currentPage, opacity, styles, buttonTitle = '',
25
24
  >
26
25
  {buttonTitle || ''}
27
26
  </UTButton>
28
- </Fragment>
27
+ </>
29
28
  );
30
29
 
31
30
  CardContent.propTypes = propTypes;
@@ -13,6 +13,6 @@ export default {
13
13
  input: shape({ value: string, onChange: func }).isRequired,
14
14
  error: oneOfType([string, bool]),
15
15
  shouldShowError: bool.isRequired,
16
- // eslint-disable-next-line react/forbid-prop-types
16
+
17
17
  field: any
18
18
  };
@@ -3,7 +3,7 @@ import { ViewPropTypes } from 'deprecated-react-native-prop-types';
3
3
  import { View, Animated, Easing } from 'react-native';
4
4
  import { number, shape, bool } from 'prop-types';
5
5
  import _ from 'lodash';
6
- // eslint-disable-next-line import/no-unresolved
6
+
7
7
  import { Svg, Defs, Pattern, Path, Rect } from 'react-native-svg';
8
8
 
9
9
  import { useTheme } from '../../theming';
@@ -1,4 +1,3 @@
1
- /* eslint-disable react/forbid-prop-types */
2
1
  import { any, bool, func, shape, string } from 'prop-types';
3
2
  import React, { memo } from 'react';
4
3
 
@@ -51,7 +51,7 @@ const UTSelect = ({
51
51
  };
52
52
 
53
53
  const handleOpen = () => setFocused(true);
54
- // eslint-disable-next-line consistent-return
54
+
55
55
  const handleClose = () => {
56
56
  setFocused(false);
57
57
  if (changeOnClose) {
@@ -4,7 +4,6 @@ const optionType = shape({
4
4
  label: string.isRequired,
5
5
  id: string.isRequired,
6
6
  action: func,
7
- // eslint-disable-next-line react/forbid-prop-types
8
7
  value: any.isRequired
9
8
  });
10
9
 
@@ -38,6 +38,7 @@ const UTSelect = ({
38
38
  style,
39
39
  suffix,
40
40
  title,
41
+ fieldLabelProps,
41
42
  value,
42
43
  onChangeSearchTerm,
43
44
  disableFilterOptions,
@@ -151,6 +152,7 @@ const UTSelect = ({
151
152
  required={required}
152
153
  variant="body"
153
154
  dataTestId={dataTestId ? `${dataTestId}.title` : undefined}
155
+ {...fieldLabelProps}
154
156
  >
155
157
  {title}
156
158
  </UTFieldLabel>
@@ -1,5 +1,7 @@
1
1
  import { array, arrayOf, bool, func, number, oneOfType, shape, string, object } from 'prop-types';
2
2
 
3
+ import UTFieldLabelTypes from '../../../../types/UTFieldLabelTypes';
4
+
3
5
  export const defaultProps = {
4
6
  alwaysShowPlaceholder: true,
5
7
  clearable: true,
@@ -23,6 +25,7 @@ export const propTypes = {
23
25
  dataTestId: string,
24
26
  disabled: bool,
25
27
  error: string,
28
+ fieldLabelProps: UTFieldLabelTypes,
26
29
  helpText: string,
27
30
  multiple: bool,
28
31
  noMatchesText: string,
@@ -14,7 +14,6 @@ export default {
14
14
  trackSize: number,
15
15
  thumbSize: number,
16
16
  theme: number,
17
- // eslint-disable-next-line react/forbid-prop-types
18
17
  input: shape({ onChange: func.isRequired, value: any }),
19
18
  hitSlop: shape({
20
19
  bottom: number,
@@ -1,4 +1,3 @@
1
- /* eslint-disable react-hooks/exhaustive-deps */
2
1
  import { Animated, View, Pressable, PanResponder, ScrollView } from 'react-native';
3
2
  import { array, bool, func, object, string, number } from 'prop-types';
4
3
  import React, { useEffect, useRef, useState } from 'react';
@@ -104,7 +104,7 @@ const OutlinedInput = ({
104
104
  ownStyles.input,
105
105
  themeStyles?.input,
106
106
  disabled && themeStyles?.inputDisabled,
107
- // eslint-disable-next-line react-native/no-inline-styles
107
+
108
108
  {
109
109
  fontSize,
110
110
  fontFamily: theme.fonts.fontFamily,
@@ -1,6 +1,5 @@
1
1
  import { string, func, bool, any, shape, elementType, oneOfType } from 'prop-types';
2
2
 
3
- // eslint-disable-next-line react/forbid-prop-types
4
3
  const refPropType = oneOfType([func, shape({ current: any })]);
5
4
 
6
5
  export default {
@@ -7,6 +7,7 @@ import { TITLE_VARIANTS } from '../../../../constants/inputs';
7
7
  import UTFieldLabel from '../../../UTFieldLabel';
8
8
  import UTLabel from '../../../UTLabel';
9
9
  import UTValidation, { validationDataProptypes } from '../../../UTValidation';
10
+ import UTFieldLabelTypes from '../../../../types/UTFieldLabelTypes';
10
11
 
11
12
  import styles from './styles';
12
13
  import TextInputField from './components/TextInputField';
@@ -19,6 +20,7 @@ const UTTextInput = ({
19
20
  dataTestId,
20
21
  disabled,
21
22
  error,
23
+ fieldLabelProps,
22
24
  helpText,
23
25
  id,
24
26
  inputRef,
@@ -62,6 +64,7 @@ const UTTextInput = ({
62
64
  dataTestId={dataTestId ? `${dataTestId}.title` : undefined}
63
65
  required={required}
64
66
  variant={TITLE_VARIANTS[titleVariant]}
67
+ {...fieldLabelProps}
65
68
  >
66
69
  {title}
67
70
  </UTFieldLabel>
@@ -154,6 +157,7 @@ export const propTypes = {
154
157
  }),
155
158
  suffix: string,
156
159
  title: string,
160
+ fieldLabelProps: UTFieldLabelTypes,
157
161
  titleVariant: string,
158
162
  tooltipProps: shape({
159
163
  tooltip: object,
@@ -24,7 +24,6 @@ const UTTopbar = ({
24
24
  }) => {
25
25
  const ownTheme = theme.UTWorkflowContainer?.topbar?.[colorTheme];
26
26
 
27
- // eslint-disable-next-line react-hooks/exhaustive-deps
28
27
  useEffect(
29
28
  useCallback(() => {
30
29
  const onBackPress = () => {
@@ -35,7 +35,6 @@ const BarMask = ({ stepCompleted, height, variant }) => {
35
35
  useEffect(() => {
36
36
  if (stepCompleted) animateCompleted();
37
37
  else setInverted(false);
38
- // eslint-disable-next-line react-hooks/exhaustive-deps
39
38
  }, [stepCompleted]);
40
39
 
41
40
  return (
@@ -46,12 +46,10 @@ const StepMask = ({ stepCompleted, stepActive, variant }) => {
46
46
 
47
47
  useEffect(() => {
48
48
  if (stepCompleted) handleCompleted();
49
- // eslint-disable-next-line react-hooks/exhaustive-deps
50
49
  }, [stepCompleted]);
51
50
 
52
51
  useEffect(() => {
53
52
  if (stepActive) handleActive();
54
- // eslint-disable-next-line react-hooks/exhaustive-deps
55
53
  }, [stepActive]);
56
54
 
57
55
  return (
@@ -47,7 +47,7 @@ const Step = ({
47
47
  };
48
48
 
49
49
  const [delayedStepActive, setDelayedStepActive] = useState(false);
50
- // eslint-disable-next-line consistent-return
50
+
51
51
  useEffect(() => {
52
52
  if (stepActive) {
53
53
  const timer = setTimeout(() => setDelayedStepActive(true), index === 0 ? 0 : ACTIVE_STEP_DELAY);
@@ -67,7 +67,6 @@ const Step = ({
67
67
  useEffect(() => {
68
68
  if (stepCompleted) animateCompleted();
69
69
  else opacityAnim.setValue(1);
70
- // eslint-disable-next-line react-hooks/exhaustive-deps
71
70
  }, [stepCompleted]);
72
71
 
73
72
  const barHeight = Math.max((stepsPositions[index + 1] ?? 0) - (stepsPositions[index] ?? 0) - OVAL_SIZE, 24);
@@ -127,7 +127,6 @@ UTTracker.propTypes = {
127
127
  mode: ModePropTypes,
128
128
  steps: StepsPropTypes,
129
129
  subtitle: string,
130
- // eslint-disable-next-line react/forbid-prop-types
131
130
  style: object,
132
131
  title: string,
133
132
  variant: VariantPropTypes
@@ -44,7 +44,6 @@ BottomStepHandler.propTypes = {
44
44
  stepCounter: oneOf([func, string]),
45
45
  stepsCount: number.isRequired,
46
46
  styles: shape(ViewPropTypes?.style),
47
- // eslint-disable-next-line react/forbid-prop-types
48
47
  themedStyles: any
49
48
  };
50
49
 
@@ -73,7 +73,6 @@ StepsHandler.propTypes = {
73
73
  StepCounterComponent: elementType,
74
74
  stepsCount: number.isRequired,
75
75
  styles: shape(ViewPropTypes?.style),
76
- // eslint-disable-next-line react/forbid-prop-types
77
76
  themedStyles: any
78
77
  };
79
78
 
@@ -18,7 +18,7 @@ import { MessagePropTypes, SummaryPropTypes } from './types';
18
18
 
19
19
  let useSafeAreaInsets;
20
20
  try {
21
- // eslint-disable-next-line no-eval, global-require
21
+ // eslint-disable-next-line global-require
22
22
  const safeArea = require('react-native-safe-area-context');
23
23
  useSafeAreaInsets = safeArea?.useSafeAreaInsets;
24
24
  } catch (e) {
@@ -51,7 +51,7 @@ const UTWorkflowContainer = ({
51
51
  topSafeAreaDisabled = false
52
52
  }) => {
53
53
  const { bottom: bottomSafeArea, top: topSafeArea } = useSafeAreaInsets?.() || {};
54
- // eslint-disable-next-line react-hooks/exhaustive-deps
54
+
55
55
  useEffect(() => () => onExit?.(), []);
56
56
 
57
57
  const [isKeyboardVisible, setKeyboardVisible] = useState(false);
@@ -134,7 +134,6 @@ UTWorkflowContainer.propTypes = {
134
134
  requiredFieldInfo: string,
135
135
  returnButton: ActionButtonPropTypes,
136
136
  scrollable: bool,
137
- // eslint-disable-next-line react/forbid-prop-types
138
137
  scrollViewRef: shape({ current: any }),
139
138
  stages: StagesPropTypes,
140
139
  stepsCount: number.isRequired,
@@ -1,4 +1,3 @@
1
- /* eslint-disable import/no-extraneous-dependencies */
2
1
  /*
3
2
  Reactotron opcional: no importamos el paquete directamente para evitar fallos
4
3
  cuando no está instalado en el consumidor. Si el consumidor quiere usarlo,
@@ -266,7 +266,6 @@ export const themeType = shape({
266
266
  xbig: number
267
267
  }),
268
268
  fontColor: string,
269
- // eslint-disable-next-line react/forbid-prop-types
270
269
  customVariants: object,
271
270
  fontFamily: string
272
271
  }),
@@ -0,0 +1,11 @@
1
+ import { string, elementType, bool } from 'prop-types';
2
+
3
+ export default {
4
+ colorTheme: string,
5
+ CustomTitleComponent: elementType,
6
+ dataTestId: string,
7
+ required: bool,
8
+ variant: string,
9
+ weight: string,
10
+ withMarkdown: bool
11
+ };
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.5.2",
5
+ "version": "2.7.0",
6
6
  "repository": "https://github.com/widergy/mobile-ui.git",
7
7
  "main": "lib/index.js",
8
8
  "files": [
@@ -11,7 +11,12 @@
11
11
  "license": "MIT",
12
12
  "scripts": {
13
13
  "lint:fix": "eslint --fix lib example/src",
14
- "lint": "eslint lib example/src",
14
+ "lint": "yarn lint:example && yarn lint:root",
15
+ "lint-suppress": "yarn lint-suppress:example & yarn lint-suppress:root",
16
+ "lint:example": "eslint --config example/eslint.config.mjs --suppressions-location ./example/eslint-suppressions.json --cache --prune-suppressions example/src",
17
+ "lint:root": "eslint --config eslint.config.mjs --suppressions-location ./eslint-suppressions.json --cache --prune-suppressions lib",
18
+ "lint-suppress:example": "eslint --config example/eslint.config.mjs --suppressions-location ./example/eslint-suppressions.json --cache --suppress-all example/src",
19
+ "lint-suppress:root": "eslint --config eslint.config.mjs --suppressions-location ./eslint-suppressions.json --cache --suppress-all lib",
15
20
  "lint-diff": "git diff --name-only --cached --relative --diff-filter=ACM | grep \\.js$ | xargs ./node_modules/eslint/bin/eslint.js",
16
21
  "build": "babel lib --out-dir dist",
17
22
  "test": "jest",
@@ -19,7 +24,7 @@
19
24
  "android": "cd example && yarn android",
20
25
  "android:clean": "cd example/android && ./gradlew clean",
21
26
  "ios": "cd example && yarn ios",
22
- "start": "cd example && yarn start",
27
+ "start": "ESLINT_NO_DEV_ERRORS=true cd example && yarn start",
23
28
  "prepare": "husky install"
24
29
  },
25
30
  "peerDependencies": {
@@ -33,6 +38,7 @@
33
38
  "react-native-vector-icons": "^10.0.0"
34
39
  },
35
40
  "dependencies": {
41
+ "@expo/config": "^11.0.12",
36
42
  "@react-native-masked-view/masked-view": "^0.3.2",
37
43
  "@react-navigation/native": "^6.1.9",
38
44
  "@tabler/icons-react-native": "^3.34.1",
@@ -53,7 +59,8 @@
53
59
  "react-native-pager-view": "^6.8.0",
54
60
  "react-native-safe-area-context": "^5.2.0",
55
61
  "react-native-svg": "^15.11.2",
56
- "react-native-uuid": "^2.0.3"
62
+ "react-native-uuid": "^2.0.3",
63
+ "react-native-worklets": "^0.5.0"
57
64
  },
58
65
  "devDependencies": {
59
66
  "@babel/cli": "^7.22.10",
@@ -65,12 +72,23 @@
65
72
  "@babel/runtime": "^7.22.10",
66
73
  "@commitlint/cli": "^17.7.1",
67
74
  "@commitlint/config-conventional": "^17.7.0",
75
+ "@eslint/compat": "^1.4.0",
76
+ "@eslint/eslintrc": "^3.3.0",
77
+ "@react-native/babel-preset": "0.73.0",
78
+ "@widergy/eslint-config": "^1.0.0",
68
79
  "@widergy/semantic-release-package-config": "^1.0.0",
69
80
  "babel-jest": "^29.6.2",
81
+ "babel-plugin-import-glob": "^2.0.0",
82
+ "babel-plugin-module-resolver": "^5.0.0",
83
+ "babel-preset-expo": "^13.2.4",
70
84
  "babel-preset-minify": "^0.5.2",
71
- "eslint": "^8.47.0",
85
+ "babel-preset-react-native": "^4.0.1",
86
+ "eslint": "^9.38.0",
72
87
  "eslint-config-airbnb": "^19.0.4",
73
88
  "eslint-config-prettier": "^9.0.0",
89
+ "eslint-import-resolver-babel-module": "^5.3.2",
90
+ "eslint-import-resolver-react-native": "^0.2.0",
91
+ "eslint-import-resolver-typescript": "^4.4.4",
74
92
  "eslint-plugin-flowtype": "^8.0.3",
75
93
  "eslint-plugin-import": "^2.28.0",
76
94
  "eslint-plugin-jsx-a11y": "^6.7.1",
@@ -78,6 +96,7 @@
78
96
  "eslint-plugin-react": "^7.33.1",
79
97
  "eslint-plugin-react-hooks": "^4.6.0",
80
98
  "eslint-plugin-react-native": "^4.0.0",
99
+ "globals": "^16.4.0",
81
100
  "husky": "^8.0.0",
82
101
  "jest": "^29.6.2",
83
102
  "prettier": "^3.0.1",
@@ -88,12 +107,10 @@
88
107
  "react-native-vector-icons": "^10.0.0",
89
108
  "react-native-version": "^4.0.0",
90
109
  "reactotron-react-native": "^5.1.7",
91
- "semantic-release": "^15.13.31"
110
+ "semantic-release": "^15.13.31",
111
+ "typescript-eslint": "^8.46.4"
92
112
  },
93
113
  "release": {
94
114
  "extends": "@widergy/semantic-release-package-config"
95
- },
96
- "resolutions": {
97
- "minimatch": "9.0.5"
98
115
  }
99
116
  }