@react-native-segmented-control/segmented-control 2.4.2 → 2.4.3

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/README.md CHANGED
@@ -23,13 +23,22 @@ This module is NOT supported in the Expo Go app on iOS, because it requires cust
23
23
 
24
24
  ## Getting started
25
25
 
26
- Install the library using either Yarn:
26
+ Install the library using your package manager:
27
+
28
+ pnpm:
29
+
30
+ ```
31
+ pnpm install --save @react-native-segmented-control/segmented-control
32
+ ```
33
+
34
+
35
+ yarn:
27
36
 
28
37
  ```
29
38
  yarn add @react-native-segmented-control/segmented-control
30
39
  ```
31
40
 
32
- or npm:
41
+ npm:
33
42
 
34
43
  ```
35
44
  npm install --save @react-native-segmented-control/segmented-control
package/index.d.ts CHANGED
@@ -134,9 +134,7 @@ export interface SegmentedControlProps extends ViewProps {
134
134
  * ````
135
135
  */
136
136
 
137
- declare class SegmentedControlComponent extends React.Component<
138
- SegmentedControlProps
139
- > {}
137
+ declare class SegmentedControlComponent extends React.Component<SegmentedControlProps> {}
140
138
  declare const SegmentedControlBase: Constructor<NativeMethods> &
141
139
  typeof SegmentedControlComponent;
142
140
  export default class SegmentedControl extends SegmentedControlBase {}
@@ -60,15 +60,6 @@
60
60
  __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0
61
61
  if (@available(iOS 13.0, *)) {
62
62
  [self setSelectedSegmentTintColor:tintColor];
63
- NSDictionary *attributes = [NSDictionary
64
- dictionaryWithObjectsAndKeys:tintColor, NSForegroundColorAttributeName,
65
- nil];
66
- NSDictionary *activeAttributes = [NSDictionary
67
- dictionaryWithObjectsAndKeys:UIColor.labelColor,
68
- NSForegroundColorAttributeName, nil];
69
- [self setTitleTextAttributes:attributes forState:UIControlStateNormal];
70
- [self setTitleTextAttributes:activeAttributes
71
- forState:UIControlStateSelected];
72
63
  }
73
64
  #endif
74
65
  }
@@ -55,13 +55,8 @@ class SegmentedControlIOS extends React.Component<Props> {
55
55
  };
56
56
 
57
57
  render() {
58
- const {
59
- forwardedRef,
60
- fontStyle,
61
- activeFontStyle,
62
- values,
63
- ...props
64
- } = this.props;
58
+ const {forwardedRef, fontStyle, activeFontStyle, values, ...props} =
59
+ this.props;
65
60
  return (
66
61
  <RNCSegmentedControlNativeComponent
67
62
  fontStyle={
@@ -30,7 +30,8 @@ type Props = $ReadOnly<{|
30
30
  |}>;
31
31
 
32
32
  function isBase64(str) {
33
- const regex = /^data:image\/(?:gif|png|jpeg|bmp|webp)(?:;charset=utf-8)?;base64,(?:[A-Za-z0-9]|[+/])+={0,2}/;
33
+ const regex =
34
+ /^data:image\/(?:gif|png|jpeg|bmp|webp)(?:;charset=utf-8)?;base64,(?:[A-Za-z0-9]|[+/])+={0,2}/;
34
35
  return str && regex.test(str);
35
36
  }
36
37
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-segmented-control/segmented-control",
3
- "version": "2.4.2",
3
+ "version": "2.4.3",
4
4
  "description": "React Native SegmentedControlIOS library",
5
5
  "main": "js/index.js",
6
6
  "types": "index.d.ts",
@@ -12,14 +12,14 @@
12
12
  ],
13
13
  "scripts": {
14
14
  "start": "react-native start",
15
- "test": "yarn flow && yarn lint",
15
+ "test": "pnpm flow && pnpm lint",
16
16
  "ios": "cd example && react-native run-ios",
17
17
  "web": "expo web",
18
18
  "android": "react-native run-android",
19
19
  "flow": "flow",
20
20
  "lint": "eslint . --cache",
21
21
  "tsc": "tsc --noEmit",
22
- "ci:publish": "yarn semantic-release"
22
+ "ci:publish": "pnpm semantic-release"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "react": ">=16.0",
@@ -28,30 +28,31 @@
28
28
  "devDependencies": {
29
29
  "@babel/core": "^7.10.2",
30
30
  "@babel/runtime": "^7.10.2",
31
- "@expo/webpack-config": "^0.17.2",
32
- "@react-native-community/eslint-config": "^3.0.0",
31
+ "@expo/webpack-config": "^18.0.4",
32
+ "@react-native-community/eslint-config": "^3.2.0",
33
33
  "@semantic-release/git": "^10.0.1",
34
34
  "@types/react": "^17.0.0",
35
35
  "@types/react-native": "^0.64.4",
36
36
  "babel-eslint": "^10.1.0",
37
37
  "babel-jest": "^29.0.3",
38
38
  "babel-preset-expo": "^9.2.0",
39
- "eslint": "7",
40
- "eslint-plugin-prettier": "^4.2.1",
39
+ "eslint": "8",
40
+ "eslint-plugin-prettier": "^5.0.0",
41
+ "prettier": "^3.0.0",
41
42
  "expo": "^46.0.16",
42
43
  "flow-bin": "^0.142.0",
43
44
  "husky": "^8.0.1",
44
45
  "jest": "^29.2.1",
45
46
  "metro-react-native-babel-preset": "0.73.3",
46
- "react": "16.13.1",
47
- "react-dom": "16.13.1",
47
+ "react": "17.0.2",
48
+ "react-dom": "17.0.2",
48
49
  "react-native": "0.63.4",
49
50
  "react-native-test-app": "1.4.6",
50
51
  "react-native-web": "^0.14.10",
51
- "react-test-renderer": "16.13.1",
52
+ "react-test-renderer": "17.0.2",
52
53
  "rimraf": "^3.0.2",
53
54
  "semantic-release": "^19.0.5",
54
- "typescript": "^4.1.5"
55
+ "typescript": "^4"
55
56
  },
56
57
  "resolutions": {
57
58
  "@react-native-community/cli": "4.10.0"