@widergy/mobile-ui 0.37.6 → 0.38.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,18 @@
1
+ # [0.38.0](https://github.com/widergy/mobile-ui/compare/v0.37.7...v0.38.0) (2023-08-11)
2
+
3
+
4
+ ### Features
5
+
6
+ * add disabled prop ([139f5ba](https://github.com/widergy/mobile-ui/commit/139f5ba1c9247d2e1dd5c38c5868cff1ea02e676))
7
+ * fix comments ([6731f8e](https://github.com/widergy/mobile-ui/commit/6731f8e3b33b28d68ce1dfd5ceebb2ae12b54099))
8
+
9
+ ## [0.37.7](https://github.com/widergy/mobile-ui/compare/v0.37.6...v0.37.7) (2023-07-26)
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * hide step number ([#243](https://github.com/widergy/mobile-ui/issues/243)) ([fa8cb6f](https://github.com/widergy/mobile-ui/commit/fa8cb6fa98c0cc8d1400ff3cdf467c75f84f5d1c))
15
+
1
16
  ## [0.37.6](https://github.com/widergy/mobile-ui/compare/v0.37.5...v0.37.6) (2023-06-27)
2
17
 
3
18
 
@@ -81,7 +81,7 @@ class FilePicker extends Component {
81
81
  };
82
82
 
83
83
  render() {
84
- const { error, title, filePlaceholder, style, withMarkdownTitle, markdownStyles } = this.props;
84
+ const { error, title, filePlaceholder, style, withMarkdownTitle, markdownStyles, disabled } = this.props;
85
85
  const { fileName } = this.state;
86
86
  return (
87
87
  <View style={style}>
@@ -95,6 +95,7 @@ class FilePicker extends Component {
95
95
  title={title}
96
96
  withMarkdownTitle={withMarkdownTitle}
97
97
  markdownStyles={markdownStyles}
98
+ disabled={disabled}
98
99
  />
99
100
  </View>
100
101
  );
@@ -12,5 +12,6 @@ export default {
12
12
  fileTypeError: string,
13
13
  allowedPDFUploadSizes: arrayOf(
14
14
  shape({ name: string, heightInPt: number, widthInPt: number, tolerance: number })
15
- )
15
+ ),
16
+ disabled: bool
16
17
  };
@@ -21,7 +21,8 @@ const Picker = ({
21
21
  title,
22
22
  theme,
23
23
  withMarkdownTitle,
24
- markdownStyles
24
+ markdownStyles,
25
+ disabled
25
26
  }) => (
26
27
  <Fragment>
27
28
  {!!title && (
@@ -46,7 +47,8 @@ const Picker = ({
46
47
  showButton && {
47
48
  name: fileName ? 'delete' : icon,
48
49
  color: theme.picker.iconColor,
49
- onPress: fileName ? onDelete : onAdd
50
+ onPress: fileName ? onDelete : onAdd,
51
+ disabled
50
52
  }
51
53
  }
52
54
  error={error}
@@ -67,7 +69,8 @@ Picker.propTypes = {
67
69
  showButton: bool,
68
70
  theme: themeType,
69
71
  withMarkdownTitle: bool,
70
- markdownStyles: shape({ ViewPropTypes })
72
+ markdownStyles: shape({ ViewPropTypes }),
73
+ disabled: bool
71
74
  };
72
75
 
73
76
  Picker.defaultProps = {
@@ -8,7 +8,7 @@ import Label from '../../../Label';
8
8
  import { CHECK_ICON_SIZE } from '../../styles';
9
9
  import { stepPropType } from '../../proptypes';
10
10
 
11
- const CircleNumber = ({ index, step, themedStyles, status }) => {
11
+ const CircleNumber = ({ index, step, themedStyles, status, hideStepNumber }) => {
12
12
  const complementaryStyle =
13
13
  (status.isFuture && themedStyles.futureStep) ||
14
14
  (status.isComplete && themedStyles.completedStep) ||
@@ -16,7 +16,7 @@ const CircleNumber = ({ index, step, themedStyles, status }) => {
16
16
 
17
17
  return (
18
18
  <View style={{ ...themedStyles.step, ...complementaryStyle }}>
19
- <Label
19
+ {!hideStepNumber && <Label
20
20
  color={
21
21
  (status.isComplete && themedStyles.stepLabel.complete) ||
22
22
  (status.isActive && themedStyles.stepLabel.active) ||
@@ -25,7 +25,7 @@ const CircleNumber = ({ index, step, themedStyles, status }) => {
25
25
  bold
26
26
  >
27
27
  {step.stepShortLabel || index + 1}
28
- </Label>
28
+ </Label>}
29
29
  {status.isComplete && (
30
30
  <View style={themedStyles.checkContainer}>
31
31
  <Icon name="check" color={themedStyles.checkIcon.color} size={CHECK_ICON_SIZE} />
@@ -39,7 +39,8 @@ CircleNumber.propTypes = {
39
39
  index: number.isRequired,
40
40
  status: shape({ isFuture: bool, isComplete: bool, isActive: bool }).isRequired,
41
41
  step: stepPropType,
42
- themedStyles: ViewPropTypes.style
42
+ themedStyles: ViewPropTypes.style,
43
+ hideStepNumber: bool
43
44
  };
44
45
 
45
46
  export default CircleNumber;
@@ -18,13 +18,14 @@ import stepFeedbackProptypes from './proptypes';
18
18
 
19
19
  const StepFeedback = ({
20
20
  currentStep,
21
- steps,
22
- onClose,
21
+ disableTriangle,
22
+ hideStepNumber,
23
23
  iconSize,
24
- variant = 'default',
24
+ labelsCentered,
25
+ onClose,
26
+ steps,
25
27
  titleBottom,
26
- disableTriangle,
27
- labelsCentered
28
+ variant = 'default',
28
29
  }) => {
29
30
  const [offset, setOffset] = useState(0);
30
31
 
@@ -105,7 +106,7 @@ const StepFeedback = ({
105
106
  <Fragment>
106
107
  <View style={styles.stepContainer}>
107
108
  <View style={styles.centerStepContainer}>
108
- <CircleNumber index={index} status={status} step={step} themedStyles={styles} variant={variant} />
109
+ <CircleNumber hideStepNumber={hideStepNumber} index={index} status={status} step={step} themedStyles={styles} variant={variant} />
109
110
  </View>
110
111
  </View>
111
112
  {index < steps.length - 1 && (
@@ -8,10 +8,11 @@ export const stepPropType = shape({
8
8
 
9
9
  export default {
10
10
  currentStep: string.isRequired,
11
- steps: arrayOf(stepPropType).isRequired,
12
- onClose: func,
11
+ disableTriangle: bool,
12
+ hideStepNumber: bool,
13
13
  iconSize: number,
14
- variant: string,
14
+ onClose: func,
15
+ steps: arrayOf(stepPropType).isRequired,
15
16
  titleBottom: bool,
16
- disableTriangle: bool
17
+ variant: string,
17
18
  };
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": "0.37.6",
5
+ "version": "0.38.0",
6
6
  "repository": "https://github.com/widergy/mobile-ui.git",
7
7
  "main": "lib/index.js",
8
8
  "files": [