Skip to content

Commit 90f9e16

Browse files
authored
V9 - fixes (#3904)
* npx codemod@latest react/19/migration-recipe * npx types-react-codemod@latest preset-19 . * Remove DemoScreen (unused) * Remove prop-types * Remove @types/prop-types * Remove unneeded defaultProps * defaultProps on asBaseComponent * Remove defaultProps (unused af far as we can tell) * Remove DocsGenerator (unused) * Fix (most) typescript issue * Fix button and update @testing-library/react-native version * Remove unsupported modifiers methods, add docs and fix tests The old TextField was the only usage of the removed methods and it was only used by MaskedInput which is deprecated * KeyboardTrackingView - support defaultProps * Bump uilib-native version * uilib-native - fix npm package of uilib-native * Update project.pbxproj * Add check for do not merge * Remove (will be added in master) * Fix types * Checkbox - fix label's type * Update uilib-native to snapshot * "Force" defaultProps on forwardRef
1 parent 8665675 commit 90f9e16

File tree

9 files changed

+80
-68
lines changed

9 files changed

+80
-68
lines changed

lib/components/Keyboard/KeyboardTrackingView/index.tsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,22 @@ export type KeyboardTrackingViewProps = ViewProps & {
8282
children?: React.ReactNode;
8383
};
8484

85+
const defaultProps: KeyboardTrackingViewProps = {};
8586
const KeyboardTrackingView = forwardRef(({children, ...others}: KeyboardTrackingViewProps, ref: any) => {
8687
const KeyboardTrackingViewContainer = isAndroid ? KeyboardTrackingViewAndroid : KeyboardTrackingViewIOS;
8788
return (
88-
<KeyboardTrackingViewContainer {...others} ref={ref}>
89+
<KeyboardTrackingViewContainer {...defaultProps} {...others} ref={ref}>
8990
{children}
9091
</KeyboardTrackingViewContainer>
9192
);
9293
});
9394

94-
export default KeyboardTrackingView as (typeof KeyboardTrackingView & {scrollBehaviors: typeof SCROLL_BEHAVIORS});
95-
// @ts-expect-error
96-
KeyboardTrackingView.scrollBehaviors = SCROLL_BEHAVIORS;
95+
type KeyboardTrackingViewType = typeof KeyboardTrackingView & {
96+
scrollBehaviors: typeof SCROLL_BEHAVIORS;
97+
defaultProps: typeof defaultProps;
98+
};
99+
100+
(KeyboardTrackingView as KeyboardTrackingViewType).defaultProps = defaultProps;
101+
(KeyboardTrackingView as KeyboardTrackingViewType).scrollBehaviors = SCROLL_BEHAVIORS;
102+
103+
export default KeyboardTrackingView as KeyboardTrackingViewType;

lib/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "uilib-native",
3-
"version": "5.0.1",
3+
"version": "5.1.0",
44
"homepage": "https://github.com/wix/react-native-ui-lib",
55
"description": "uilib native components (separated from js components)",
66
"main": "components/index",

packages/react-native-ui-lib/ios/rnuilib.xcodeproj/project.pbxproj

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
10C29C852DCE7AED0050BB15 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 10C29C842DCE7AED0050BB15 /* main.m */; };
1313
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
1414
2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
15-
6EAFD7E7529D6AB2A14B24D0 /* libPods-rnuilib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A5F4BED900EB839D3EF75D75 /* libPods-rnuilib.a */; };
15+
47EF422756B5B59E050F6650 /* libPods-rnuilib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 915D61EED47E4EEAC9E3939E /* libPods-rnuilib.a */; };
1616
8E52CBDF2887DD21009D5EC5 /* DesignTokens.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8E52CBDE2887DD21009D5EC5 /* DesignTokens.xcassets */; };
1717
8E8B0D662744D9CD0026B520 /* void.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E8B0D652744D9CD0026B520 /* void.swift */; };
1818
8EA1FC8C2519E7F7008B4B36 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8EA1FC8B2519E7F7008B4B36 /* LaunchScreen.storyboard */; };
@@ -50,13 +50,13 @@
5050
2D02E47B1E0B4A5D006451C7 /* rnuilib-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "rnuilib-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
5151
2D02E4901E0B4A5D006451C7 /* rnuilib-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "rnuilib-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
5252
411699F1CD4A37F8779A4620 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = rnuilib/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
53-
89D43FD524252AEE9A5E7F9C /* Pods-rnuilib.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-rnuilib.debug.xcconfig"; path = "Target Support Files/Pods-rnuilib/Pods-rnuilib.debug.xcconfig"; sourceTree = "<group>"; };
53+
67B8F278E58645A4FFC68F0C /* Pods-rnuilib.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-rnuilib.release.xcconfig"; path = "Target Support Files/Pods-rnuilib/Pods-rnuilib.release.xcconfig"; sourceTree = "<group>"; };
5454
8E52CBDE2887DD21009D5EC5 /* DesignTokens.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = DesignTokens.xcassets; sourceTree = "<group>"; };
5555
8E8B0D652744D9CD0026B520 /* void.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = void.swift; sourceTree = "<group>"; };
5656
8EA1FC8B2519E7F7008B4B36 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = rnuilib/LaunchScreen.storyboard; sourceTree = "<group>"; };
57-
9EA158686F413620FCD02168 /* Pods-rnuilib.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-rnuilib.release.xcconfig"; path = "Target Support Files/Pods-rnuilib/Pods-rnuilib.release.xcconfig"; sourceTree = "<group>"; };
58-
A5F4BED900EB839D3EF75D75 /* libPods-rnuilib.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-rnuilib.a"; sourceTree = BUILT_PRODUCTS_DIR; };
57+
915D61EED47E4EEAC9E3939E /* libPods-rnuilib.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-rnuilib.a"; sourceTree = BUILT_PRODUCTS_DIR; };
5958
DED5A85D4BF49DFA47437893 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = rnuilib/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
59+
EC2782D69A183B3AC6D25662 /* Pods-rnuilib.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-rnuilib.debug.xcconfig"; path = "Target Support Files/Pods-rnuilib/Pods-rnuilib.debug.xcconfig"; sourceTree = "<group>"; };
6060
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
6161
ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
6262
/* End PBXFileReference section */
@@ -73,7 +73,7 @@
7373
isa = PBXFrameworksBuildPhase;
7474
buildActionMask = 2147483647;
7575
files = (
76-
6EAFD7E7529D6AB2A14B24D0 /* libPods-rnuilib.a in Frameworks */,
76+
47EF422756B5B59E050F6650 /* libPods-rnuilib.a in Frameworks */,
7777
);
7878
runOnlyForDeploymentPostprocessing = 0;
7979
};
@@ -117,7 +117,7 @@
117117
children = (
118118
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
119119
ED2971642150620600B7C4FE /* JavaScriptCore.framework */,
120-
A5F4BED900EB839D3EF75D75 /* libPods-rnuilib.a */,
120+
915D61EED47E4EEAC9E3939E /* libPods-rnuilib.a */,
121121
);
122122
name = Frameworks;
123123
sourceTree = "<group>";
@@ -158,8 +158,8 @@
158158
D99C980AB24A05601E0007F9 /* Pods */ = {
159159
isa = PBXGroup;
160160
children = (
161-
89D43FD524252AEE9A5E7F9C /* Pods-rnuilib.debug.xcconfig */,
162-
9EA158686F413620FCD02168 /* Pods-rnuilib.release.xcconfig */,
161+
EC2782D69A183B3AC6D25662 /* Pods-rnuilib.debug.xcconfig */,
162+
67B8F278E58645A4FFC68F0C /* Pods-rnuilib.release.xcconfig */,
163163
);
164164
path = Pods;
165165
sourceTree = "<group>";
@@ -189,14 +189,14 @@
189189
isa = PBXNativeTarget;
190190
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "rnuilib" */;
191191
buildPhases = (
192-
2B3E3342862A1D4E28900479 /* [CP] Check Pods Manifest.lock */,
192+
D78E9F4BA4EF6F012B5BDA3E /* [CP] Check Pods Manifest.lock */,
193193
FD10A7F022414F080027D42C /* Start Packager */,
194194
13B07F871A680F5B00A75B9A /* Sources */,
195195
13B07F8C1A680F5B00A75B9A /* Frameworks */,
196196
13B07F8E1A680F5B00A75B9A /* Resources */,
197197
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
198-
1B61ADD6D1E9D386513664AA /* [CP] Embed Pods Frameworks */,
199-
E08E7F233B2BD017DCECEA3C /* [CP] Copy Pods Resources */,
198+
F7959C68F26F6BEE34F78D43 /* [CP] Embed Pods Frameworks */,
199+
1516A2CEA36A1193FED081AC /* [CP] Copy Pods Resources */,
200200
);
201201
buildRules = (
202202
);
@@ -345,86 +345,86 @@
345345
shellPath = /bin/sh;
346346
shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
347347
};
348-
1B61ADD6D1E9D386513664AA /* [CP] Embed Pods Frameworks */ = {
348+
1516A2CEA36A1193FED081AC /* [CP] Copy Pods Resources */ = {
349349
isa = PBXShellScriptBuildPhase;
350350
buildActionMask = 2147483647;
351351
files = (
352352
);
353353
inputPaths = (
354-
"${PODS_ROOT}/Target Support Files/Pods-rnuilib/Pods-rnuilib-frameworks.sh",
355-
"${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes",
354+
"${PODS_ROOT}/Target Support Files/Pods-rnuilib/Pods-rnuilib-resources.sh",
355+
"${PODS_CONFIGURATION_BUILD_DIR}/RCT-Folly/RCT-Folly_privacy.bundle",
356+
"${PODS_CONFIGURATION_BUILD_DIR}/RNSVG/RNSVGFilters.bundle",
357+
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/React-Core_privacy.bundle",
358+
"${PODS_CONFIGURATION_BUILD_DIR}/React-cxxreact/React-cxxreact_privacy.bundle",
359+
"${PODS_CONFIGURATION_BUILD_DIR}/boost/boost_privacy.bundle",
360+
"${PODS_CONFIGURATION_BUILD_DIR}/glog/glog_privacy.bundle",
356361
);
357-
name = "[CP] Embed Pods Frameworks";
362+
name = "[CP] Copy Pods Resources";
358363
outputPaths = (
359-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
364+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCT-Folly_privacy.bundle",
365+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RNSVGFilters.bundle",
366+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/React-Core_privacy.bundle",
367+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/React-cxxreact_privacy.bundle",
368+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/boost_privacy.bundle",
369+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/glog_privacy.bundle",
360370
);
361371
runOnlyForDeploymentPostprocessing = 0;
362372
shellPath = /bin/sh;
363-
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-rnuilib/Pods-rnuilib-frameworks.sh\"\n";
373+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-rnuilib/Pods-rnuilib-resources.sh\"\n";
364374
showEnvVarsInLog = 0;
365375
};
366-
2B3E3342862A1D4E28900479 /* [CP] Check Pods Manifest.lock */ = {
376+
2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = {
367377
isa = PBXShellScriptBuildPhase;
368378
buildActionMask = 2147483647;
369379
files = (
370380
);
371-
inputFileListPaths = (
372-
);
373381
inputPaths = (
374-
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
375-
"${PODS_ROOT}/Manifest.lock",
376-
);
377-
name = "[CP] Check Pods Manifest.lock";
378-
outputFileListPaths = (
379382
);
383+
name = "Bundle React Native Code And Images";
380384
outputPaths = (
381-
"$(DERIVED_FILE_DIR)/Pods-rnuilib-checkManifestLockResult.txt",
382385
);
383386
runOnlyForDeploymentPostprocessing = 0;
384387
shellPath = /bin/sh;
385-
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
386-
showEnvVarsInLog = 0;
388+
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
387389
};
388-
2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = {
390+
D78E9F4BA4EF6F012B5BDA3E /* [CP] Check Pods Manifest.lock */ = {
389391
isa = PBXShellScriptBuildPhase;
390392
buildActionMask = 2147483647;
391393
files = (
392394
);
395+
inputFileListPaths = (
396+
);
393397
inputPaths = (
398+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
399+
"${PODS_ROOT}/Manifest.lock",
400+
);
401+
name = "[CP] Check Pods Manifest.lock";
402+
outputFileListPaths = (
394403
);
395-
name = "Bundle React Native Code And Images";
396404
outputPaths = (
405+
"$(DERIVED_FILE_DIR)/Pods-rnuilib-checkManifestLockResult.txt",
397406
);
398407
runOnlyForDeploymentPostprocessing = 0;
399408
shellPath = /bin/sh;
400-
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
409+
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
410+
showEnvVarsInLog = 0;
401411
};
402-
E08E7F233B2BD017DCECEA3C /* [CP] Copy Pods Resources */ = {
412+
F7959C68F26F6BEE34F78D43 /* [CP] Embed Pods Frameworks */ = {
403413
isa = PBXShellScriptBuildPhase;
404414
buildActionMask = 2147483647;
405415
files = (
406416
);
407417
inputPaths = (
408-
"${PODS_ROOT}/Target Support Files/Pods-rnuilib/Pods-rnuilib-resources.sh",
409-
"${PODS_CONFIGURATION_BUILD_DIR}/RCT-Folly/RCT-Folly_privacy.bundle",
410-
"${PODS_CONFIGURATION_BUILD_DIR}/RNSVG/RNSVGFilters.bundle",
411-
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/React-Core_privacy.bundle",
412-
"${PODS_CONFIGURATION_BUILD_DIR}/React-cxxreact/React-cxxreact_privacy.bundle",
413-
"${PODS_CONFIGURATION_BUILD_DIR}/boost/boost_privacy.bundle",
414-
"${PODS_CONFIGURATION_BUILD_DIR}/glog/glog_privacy.bundle",
418+
"${PODS_ROOT}/Target Support Files/Pods-rnuilib/Pods-rnuilib-frameworks.sh",
419+
"${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes",
415420
);
416-
name = "[CP] Copy Pods Resources";
421+
name = "[CP] Embed Pods Frameworks";
417422
outputPaths = (
418-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCT-Folly_privacy.bundle",
419-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RNSVGFilters.bundle",
420-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/React-Core_privacy.bundle",
421-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/React-cxxreact_privacy.bundle",
422-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/boost_privacy.bundle",
423-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/glog_privacy.bundle",
423+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
424424
);
425425
runOnlyForDeploymentPostprocessing = 0;
426426
shellPath = /bin/sh;
427-
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-rnuilib/Pods-rnuilib-resources.sh\"\n";
427+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-rnuilib/Pods-rnuilib-frameworks.sh\"\n";
428428
showEnvVarsInLog = 0;
429429
};
430430
FD10A7F022414F080027D42C /* Start Packager */ = {
@@ -562,7 +562,7 @@
562562
};
563563
13B07F941A680F5B00A75B9A /* Debug */ = {
564564
isa = XCBuildConfiguration;
565-
baseConfigurationReference = 89D43FD524252AEE9A5E7F9C /* Pods-rnuilib.debug.xcconfig */;
565+
baseConfigurationReference = EC2782D69A183B3AC6D25662 /* Pods-rnuilib.debug.xcconfig */;
566566
buildSettings = {
567567
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
568568
CLANG_ENABLE_MODULES = YES;
@@ -594,7 +594,7 @@
594594
};
595595
13B07F951A680F5B00A75B9A /* Release */ = {
596596
isa = XCBuildConfiguration;
597-
baseConfigurationReference = 9EA158686F413620FCD02168 /* Pods-rnuilib.release.xcconfig */;
597+
baseConfigurationReference = 67B8F278E58645A4FFC68F0C /* Pods-rnuilib.release.xcconfig */;
598598
buildSettings = {
599599
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
600600
CLANG_ENABLE_MODULES = YES;

packages/react-native-ui-lib/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,15 @@
101101
"setimmediate": "^1.0.5",
102102
"shell-utils": "^1.0.10",
103103
"typescript": "5.0.4",
104-
"uilib-native": "^5.0.1"
104+
"uilib-native": "5.1.0-snapshot.7635"
105105
},
106106
"peerDependencies": {
107107
"react": ">=19.0.0",
108108
"react-native": ">=0.77.3",
109109
"react-native-gesture-handler": ">=2.24.0",
110110
"react-native-reanimated": ">=3.19.4",
111111
"react-native-ui-lib": "*",
112-
"uilib-native": "^5.0.1"
112+
"uilib-native": "5.1.0-snapshot.7635"
113113
},
114114
"jest": {
115115
"preset": "react-native",

packages/react-native-ui-lib/scripts/build/build.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const childProcess = require('child_process');
22
const fs = require('fs');
33

4-
const BABEL_OPTIONS = `--config-file ./scripts/build/.babelrc.json --extensions '.ts,.tsx' --ignore "src/**/*.d.ts"`;
4+
const BABEL_OPTIONS = `--config-file ./scripts/build/.babelrc.json --extensions '.ts,.tsx' --ignore "src/**/*.d.ts,**/node_modules/**,lib/**/*.d.ts,../../lib/node_modules/**"`;
55
const BABEL_INDEX_EXPORTS_OPTIONS = `--config-file ./scripts/build/.babelrc.exports.js`;
66

77
console.info('## Start RNUILib Build ##');
@@ -21,6 +21,9 @@ childProcess.execSync(`../../node_modules/.bin/babel src --out-dir src ${BABEL_O
2121
console.info('## Build lib (native component) files - convert TS to JS files ##');
2222
childProcess.execSync(`../../node_modules/.bin/babel lib --out-dir lib ${BABEL_OPTIONS}`);
2323

24+
console.info('## in uilib-native - Build lib (native component) files - convert TS to JS files ##');
25+
childProcess.execSync(`../../node_modules/.bin/babel ../../lib --out-dir ../../lib ${BABEL_OPTIONS}`);
26+
2427
console.info('## Build main index file - for lazy load exports ##');
2528
childProcess.execSync(`../../node_modules/.bin/babel ./src/index.js -o ./src/index.js ${BABEL_INDEX_EXPORTS_OPTIONS}`);
2629

packages/react-native-ui-lib/src/commons/forwardRef.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ export default function forwardRef<P, STATICS = {}, RefInterface = any>(WrappedC
1818

1919
hoistStatics(ForwardedComponent, WrappedComponent);
2020
ForwardedComponent.displayName = WrappedComponent.displayName;
21+
// @ts-expect-error
22+
ForwardedComponent.defaultProps = WrappedComponent.defaultProps;
2123

2224
return ForwardedComponent as typeof ForwardedComponent & STATICS;
2325
}

packages/react-native-ui-lib/src/components/checkbox/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export interface CheckboxProps extends TouchableOpacityProps {
7676
/**
7777
* The label of the checkbox
7878
*/
79-
label?: string;
79+
label?: string | React.ReactElement<Text>;
8080
/**
8181
* The style of the label
8282
*/

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"include": [
3333
"packages/react-native-ui-lib/src/**/*",
3434
"packages/react-native-ui-lib/lib/**/*",
35+
"lib/**/*",
3536
"typings/**/*",
3637
"packages/unicorn-demo-app/**/*",
3738
"packages/uilib-native/components/**/*"

yarn.lock

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9302,7 +9302,7 @@ __metadata:
93029302
languageName: node
93039303
linkType: hard
93049304

9305-
"prop-types@npm:15.8.1, prop-types@npm:15.x.x, prop-types@npm:^15.5.10, prop-types@npm:^15.8.1":
9305+
"prop-types@npm:15.8.1, prop-types@npm:15.x.x, prop-types@npm:^15.8.1":
93069306
version: 15.8.1
93079307
resolution: "prop-types@npm:15.8.1"
93089308
dependencies:
@@ -9733,7 +9733,7 @@ __metadata:
97339733
shell-utils: "npm:^1.0.10"
97349734
tinycolor2: "npm:^1.4.2"
97359735
typescript: "npm:5.0.4"
9736-
uilib-native: "npm:^5.0.1"
9736+
uilib-native: "npm:5.1.0-snapshot.7635"
97379737
url-parse: "npm:^1.2.0"
97389738
wix-react-native-text-size: "npm:1.0.9"
97399739
peerDependencies:
@@ -9742,7 +9742,7 @@ __metadata:
97429742
react-native-gesture-handler: ">=2.24.0"
97439743
react-native-reanimated: ">=3.19.4"
97449744
react-native-ui-lib: "*"
9745-
uilib-native: ^5.0.1
9745+
uilib-native: 5.1.0-snapshot.7635
97469746
languageName: unknown
97479747
linkType: soft
97489748

@@ -11285,16 +11285,15 @@ __metadata:
1128511285
languageName: node
1128611286
linkType: hard
1128711287

11288-
"uilib-native@npm:^5.0.1":
11289-
version: 5.0.1
11290-
resolution: "uilib-native@npm:5.0.1"
11288+
"uilib-native@npm:5.1.0-snapshot.7635":
11289+
version: 5.1.0-snapshot.7635
11290+
resolution: "uilib-native@npm:5.1.0-snapshot.7635"
1129111291
dependencies:
1129211292
lodash: "npm:^4.17.21"
11293-
prop-types: "npm:^15.5.10"
1129411293
peerDependencies:
11295-
react: ">=18.3.1"
11296-
react-native: ">=0.77.3"
11297-
checksum: 10c0/234d02fd8dd5005c816b2a292d87d205b37e45885eccdf545ab80052ad6eb2761034af6acb58ae31468d66b59a4c869b25a670a5a2a784d26206c92e7f27025d
11294+
react: ">=19.0.0"
11295+
react-native: ">=0.78.3"
11296+
checksum: 10c0/f98238f78e3c291cda5111459dc08d3acddbf38f37f2febb6e7743f0c663c47ab9e0cb9e2558dd044710365640b6c52ada47aec925dfee1386b05fd34e7becad
1129811297
languageName: node
1129911298
linkType: hard
1130011299

0 commit comments

Comments
 (0)