react-native-ui-lib 8.3.4-snapshot.7795 → 8.3.4-snapshot.7802

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 (126) hide show
  1. package/ReactNativeUiLib.podspec +22 -0
  2. package/lib/components/HighlighterOverlayView/index.d.ts +2 -2
  3. package/lib/components/HighlighterOverlayView/index.web.d.ts +2 -2
  4. package/lib/components/Keyboard/KeyboardAccessoryView/CustomKeyboardView/CustomKeyboardViewBase.d.ts +1 -1
  5. package/lib/components/Keyboard/KeyboardAccessoryView/KeyboardRegistry/index.js +1 -5
  6. package/lib/components/Keyboard/KeyboardAccessoryView/index.d.ts +2 -2
  7. package/lib/components/Keyboard/KeyboardAccessoryView/index.js +1 -3
  8. package/lib/components/Keyboard/KeyboardTrackingView/KeyboardTrackingView.ios.js +1 -3
  9. package/lib/components/Keyboard/KeyboardTrackingView/index.d.ts +2 -6
  10. package/lib/components/Keyboard/KeyboardTrackingView/index.js +4 -5
  11. package/lib/components/Keyboard/index.d.ts +1 -2
  12. package/lib/package.json +21 -20
  13. package/lib/react-native.config.js +1 -1
  14. package/package.json +163 -161
  15. package/src/commons/asBaseComponent.js +1 -2
  16. package/src/commons/baseComponent.js +8 -0
  17. package/src/commons/forwardRef.js +4 -1
  18. package/src/commons/modifiers.d.ts +6 -0
  19. package/src/commons/modifiers.js +18 -0
  20. package/src/commons/withScrollEnabler.js +4 -0
  21. package/src/commons/withScrollReached.js +4 -0
  22. package/src/components/KeyboardAwareScrollView/KeyboardAwareBase.js +7 -0
  23. package/src/components/KeyboardAwareScrollView/KeyboardAwareFlatList.js +6 -0
  24. package/src/components/KeyboardAwareScrollView/KeyboardAwareScrollView.js +6 -0
  25. package/src/components/WheelPicker/WheelPicker.driver.d.ts +2 -2
  26. package/src/components/WheelPicker/index.d.ts +2 -2
  27. package/src/components/WheelPicker/index.js +1 -1
  28. package/src/components/WheelPicker/usePresenter.d.ts +1 -1
  29. package/src/components/actionSheet/index.d.ts +1 -1
  30. package/src/components/animatedImage/index.d.ts +1 -1
  31. package/src/components/animatedScanner/index.js +37 -0
  32. package/src/components/avatar/index.d.ts +1 -1
  33. package/src/components/badge/index.d.ts +4 -4
  34. package/src/components/baseInput/index.d.ts +1 -0
  35. package/src/components/baseInput/index.js +49 -1
  36. package/src/components/button/index.d.ts +4 -4
  37. package/src/components/button/types.d.ts +2 -2
  38. package/src/components/carousel/index.d.ts +8 -8
  39. package/src/components/carousel/types.d.ts +1 -4
  40. package/src/components/carousel/types.js +2 -0
  41. package/src/components/checkbox/index.d.ts +1 -1
  42. package/src/components/chip/index.d.ts +1 -1
  43. package/src/components/colorPalette/index.d.ts +1 -1
  44. package/src/components/dateTimePicker/index.d.ts +2 -2
  45. package/src/components/dateTimePicker/index.js +2 -2
  46. package/src/components/dialog/types.d.ts +4 -4
  47. package/src/components/dialog/useDialogContent.d.ts +1 -1
  48. package/src/components/drawer/index.d.ts +1 -1
  49. package/src/components/expandableSection/index.d.ts +2 -2
  50. package/src/components/fadedScrollView/index.js +1 -1
  51. package/src/components/featureHighlight/index.js +7 -5
  52. package/src/components/gridListItem/index.d.ts +7 -7
  53. package/src/components/gridView/index.d.ts +1 -1
  54. package/src/components/hint/HintBubble.d.ts +1 -1
  55. package/src/components/hint/HintOld.d.ts +10 -10
  56. package/src/components/hint/hooks/useHintLayout.d.ts +1 -1
  57. package/src/components/hint/index.d.ts +2 -2
  58. package/src/components/hint/types.d.ts +2 -2
  59. package/src/components/icon/index.js +3 -0
  60. package/src/components/image/index.d.ts +1 -1
  61. package/src/components/image/index.js +17 -20
  62. package/src/components/loaderScreen/index.d.ts +1 -1
  63. package/src/components/loaderScreen/types.d.ts +1 -1
  64. package/src/components/maskedInput/index.d.ts +4 -21
  65. package/src/components/maskedInput/index.js +16 -78
  66. package/src/components/maskedInput/maskedInput.api.json +1 -0
  67. package/src/components/maskedInput/new.d.ts +22 -0
  68. package/src/components/maskedInput/new.js +85 -0
  69. package/src/components/maskedInput/old.js +95 -0
  70. package/src/components/modal/index.d.ts +3 -3
  71. package/src/components/numberInput/index.js +2 -2
  72. package/src/components/overlay/index.d.ts +1 -1
  73. package/src/components/picker/PickerDialog.android.js +15 -0
  74. package/src/components/picker/PickerDialog.js +7 -0
  75. package/src/components/picker/helpers/useImperativePickerHandle.d.ts +1 -1
  76. package/src/components/picker/helpers/useImperativePickerHandle.js +1 -1
  77. package/src/components/picker/types.d.ts +9 -9
  78. package/src/components/progressBar/index.d.ts +2 -2
  79. package/src/components/scrollBar/index.d.ts +4 -11
  80. package/src/components/searchInput/index.js +1 -1
  81. package/src/components/searchInput/types.d.ts +2 -2
  82. package/src/components/sectionsWheelPicker/SectionsWheelPicker.driver.d.ts +2 -2
  83. package/src/components/skeletonView/index.d.ts +4 -4
  84. package/src/components/slider/Thumb.d.ts +1 -1
  85. package/src/components/slider/types.d.ts +1 -1
  86. package/src/components/stackAggregator/index.d.ts +1 -1
  87. package/src/components/tabController/TabBarItem.d.ts +2 -2
  88. package/src/components/tabController/TabBarItem.js +1 -1
  89. package/src/components/tabController/TabPage.d.ts +2 -2
  90. package/src/components/tabController/useScrollToItem.d.ts +1 -1
  91. package/src/components/text/Text.driver.d.ts +1 -1
  92. package/src/components/textArea/index.js +6 -0
  93. package/src/components/textField/TextField.driver.new.js +12 -7
  94. package/src/components/textField/index.js +31 -9
  95. package/src/components/textField/types.d.ts +4 -4
  96. package/src/components/textField/useImperativeInputHandle.d.ts +1 -1
  97. package/src/components/textField/useImperativeInputHandle.js +1 -1
  98. package/src/components/textField/usePreset.d.ts +36 -36
  99. package/src/components/textFieldOld/index.d.ts +71 -0
  100. package/src/components/textFieldOld/index.js +807 -0
  101. package/src/components/timeline/index.js +1 -1
  102. package/src/components/toast/index.js +69 -0
  103. package/src/components/wizard/index.d.ts +1 -1
  104. package/src/components/wizard/types.d.ts +1 -1
  105. package/src/components/wizard/wizard.api.json +1 -1
  106. package/src/helpers/DocsGenerator.js +61 -0
  107. package/src/hooks/useCombinedRefs/index.js +2 -1
  108. package/src/hooks/useDebounce/index.js +1 -1
  109. package/src/hooks/useHiddenLocation/index.js +2 -2
  110. package/src/hooks/useHiddenLocation/index.web.js +2 -2
  111. package/src/hooks/useMeasure/index.d.ts +1 -1
  112. package/src/hooks/useMeasure/index.js +1 -1
  113. package/src/hooks/useScrollTo/index.d.ts +2 -2
  114. package/src/incubator/calendar/index.js +1 -1
  115. package/src/incubator/calendar/types.d.ts +2 -2
  116. package/src/incubator/expandableOverlay/index.d.ts +2 -2
  117. package/src/incubator/slider/Track.d.ts +1 -1
  118. package/src/incubator/slider/index.d.ts +1 -1
  119. package/src/incubator/toast/helpers/useToastTimer.js +1 -1
  120. package/src/incubator/toast/index.js +1 -1
  121. package/src/incubator/toast/types.d.ts +2 -2
  122. package/src/testkit/Component.driver.d.ts +1 -1
  123. package/src/testkit/drivers/TestingLibraryDriver.d.ts +1 -1
  124. package/src/typings/module.d.ts +3 -12
  125. package/textFieldOld.d.ts +2 -0
  126. package/textFieldOld.js +1 -0
@@ -0,0 +1,22 @@
1
+ require 'json'
2
+
3
+ package = JSON.parse(File.read(File.join(__dir__, 'lib/package.json')))
4
+
5
+ Pod::Spec.new do |s|
6
+ s.name = "ReactNativeUiLib"
7
+ s.version = package['version']
8
+ s.summary = "React Native UI Library"
9
+
10
+ s.authors = "Wix.com"
11
+ s.homepage = package['homepage']
12
+ s.license = package['license']
13
+ s.platforms = { :ios => "9.0", :tvos => "9.2" }
14
+
15
+ s.module_name = 'ReactNativeUiLib'
16
+
17
+ s.source = { :git => "https://github.com/wix/react-native-ui-lib.git", :tag => "#{s.version}" }
18
+ s.source_files = "lib/ios/**/*.{h,m}"
19
+
20
+ s.dependency 'React'
21
+ s.frameworks = 'UIKit'
22
+ end
@@ -1,4 +1,4 @@
1
- import { type JSX } from 'react';
1
+ import React from 'react';
2
2
  import { ViewStyle } from 'react-native';
3
3
  type HighlightFrameType = {
4
4
  x: number;
@@ -28,7 +28,7 @@ export type HighlighterOverlayViewProps = {
28
28
  testID?: string;
29
29
  };
30
30
  declare const HighlighterOverlayView: {
31
- (props: HighlighterOverlayViewProps): JSX.Element;
31
+ (props: HighlighterOverlayViewProps): React.JSX.Element;
32
32
  displayName: string;
33
33
  };
34
34
  export default HighlighterOverlayView;
@@ -1,4 +1,4 @@
1
- import { type JSX } from 'react';
1
+ import React from 'react';
2
2
  import { ViewStyle } from 'react-native';
3
3
  type HighlightFrameType = {
4
4
  x: number;
@@ -28,7 +28,7 @@ export type HighlighterOverlayViewProps = {
28
28
  testID?: string;
29
29
  };
30
30
  declare const HighlighterOverlayView: {
31
- (props: HighlighterOverlayViewProps): JSX.Element;
31
+ (props: HighlighterOverlayViewProps): React.JSX.Element;
32
32
  displayName: string;
33
33
  };
34
34
  export default HighlighterOverlayView;
@@ -9,7 +9,7 @@ export type CustomKeyboardViewBaseProps = {
9
9
  component?: string;
10
10
  onItemSelected?: (component?: string, args?: any) => void;
11
11
  onRequestShowKeyboard?: (keyboardId: string) => void;
12
- children?: React.ReactNode;
12
+ children?: React.ReactChild | React.ReactChild[];
13
13
  };
14
14
  export default class CustomKeyboardViewBase<T extends CustomKeyboardViewBaseProps> extends Component<T> {
15
15
  static defaultProps: {
@@ -33,8 +33,6 @@ export default class KeyboardRegistry {
33
33
  */
34
34
  static registerKeyboard = (componentID, generator, params = {}) => {
35
35
  if (!_isFunction(generator)) {
36
- // TODO: do we want to add a util for this?
37
- // eslint-disable-next-line no-restricted-syntax
38
36
  console.error(`KeyboardRegistry.registerKeyboard: ${componentID} you must register a generator function`);
39
37
  return;
40
38
  }
@@ -52,9 +50,7 @@ export default class KeyboardRegistry {
52
50
  */
53
51
  static getKeyboard = componentID => {
54
52
  const res = KeyboardRegistry.registeredKeyboards[componentID];
55
- if (!res?.generator) {
56
- // TODO: do we want to add a util for this?
57
- // eslint-disable-next-line no-restricted-syntax
53
+ if (!res || !res.generator) {
58
54
  console.error(`KeyboardRegistry.getKeyboard: ${componentID} used but not yet registered`);
59
55
  return undefined;
60
56
  }
@@ -6,7 +6,7 @@ export type KeyboardAccessoryViewProps = kbTrackingViewProps & {
6
6
  /**
7
7
  * Content to be rendered above the keyboard
8
8
  */
9
- renderContent?: () => React.ReactElement<any>;
9
+ renderContent?: () => React.ReactElement;
10
10
  /**
11
11
  * iOS only.
12
12
  * The reference to the actual text input (or the keyboard may not reset when instructed to, etc.).
@@ -37,7 +37,7 @@ export type KeyboardAccessoryViewProps = kbTrackingViewProps & {
37
37
  * Callback that will be called once the keyboard has been closed
38
38
  */
39
39
  onKeyboardResigned?: () => void;
40
- children?: React.ReactNode;
40
+ children?: React.ReactChild;
41
41
  };
42
42
  /**
43
43
  * @description: View that allows replacing the default keyboard with other components
@@ -141,9 +141,7 @@ class KeyboardAccessoryView extends Component {
141
141
  scrollBehavior,
142
142
  ...others
143
143
  } = this.props;
144
- return <KeyboardTrackingView {...others} scrollBehavior={scrollBehavior} ref={r => {
145
- this.trackingViewRef = r;
146
- }} style={styles.trackingToolbarContainer} onLayout={this.onContainerComponentHeightChanged}>
144
+ return <KeyboardTrackingView {...others} scrollBehavior={scrollBehavior} ref={r => this.trackingViewRef = r} style={styles.trackingToolbarContainer} onLayout={this.onContainerComponentHeightChanged}>
147
145
  <KeyboardHeightListener id={`${this.id}`} onDismiss={this.onDismiss} onKeyboardHeightChange={this.onKeyboardHeightChange} />
148
146
  <>{renderContent?.()}</>
149
147
  <CustomKeyboardView keyboardHeight={keyboardHeight} shouldFocus={shouldFocus} onKeyboardDismiss={this.onKeyboardDismiss} inputRef={kbInputRef} component={kbComponent} initialProps={this.processInitialProps()} onItemSelected={onItemSelected} onRequestShowKeyboard={onRequestShowKeyboard} useSafeArea={others.useSafeArea} />
@@ -18,9 +18,7 @@ class KeyboardTrackingView extends PureComponent {
18
18
  useSafeArea: false
19
19
  };
20
20
  render() {
21
- return <KeyboardTrackingViewNativeComponent {...this.props} ref={r => {
22
- this.ref = r;
23
- }} />;
21
+ return <KeyboardTrackingViewNativeComponent {...this.props} ref={r => this.ref = r} />;
24
22
  }
25
23
  async getNativeProps() {
26
24
  if (this.ref && KeyboardTrackingViewTempManager && KeyboardTrackingViewTempManager.getNativeProps) {
@@ -73,13 +73,9 @@ export type KeyboardTrackingViewProps = ViewProps & {
73
73
  usesBottomTabs?: boolean;
74
74
  ref?: any;
75
75
  style?: StyleProp<ViewStyle>;
76
- children?: React.ReactNode;
76
+ children?: React.ReactChild | React.ReactChild[];
77
77
  };
78
- declare const defaultProps: KeyboardTrackingViewProps;
79
- declare const KeyboardTrackingView: React.ForwardRefExoticComponent<Omit<KeyboardTrackingViewProps, "ref"> & React.RefAttributes<unknown>>;
80
- type KeyboardTrackingViewType = typeof KeyboardTrackingView & {
78
+ declare const _default: React.ForwardRefExoticComponent<Omit<KeyboardTrackingViewProps, "ref"> & React.RefAttributes<unknown>> & {
81
79
  scrollBehaviors: typeof SCROLL_BEHAVIORS;
82
- defaultProps: typeof defaultProps;
83
80
  };
84
- declare const _default: KeyboardTrackingViewType;
85
81
  export default _default;
@@ -8,16 +8,15 @@ const SCROLL_BEHAVIORS = {
8
8
  SCROLL_TO_BOTTOM_INVERTED_ONLY: NativeModules.KeyboardTrackingViewTempManager?.KeyboardTrackingScrollBehaviorScrollToBottomInvertedOnly,
9
9
  FIXED_OFFSET: NativeModules.KeyboardTrackingViewTempManager?.KeyboardTrackingScrollBehaviorFixedOffset
10
10
  };
11
- const defaultProps = {};
12
11
  const KeyboardTrackingView = forwardRef(({
13
12
  children,
14
13
  ...others
15
14
  }, ref) => {
16
15
  const KeyboardTrackingViewContainer = isAndroid ? KeyboardTrackingViewAndroid : KeyboardTrackingViewIOS;
17
- return <KeyboardTrackingViewContainer {...defaultProps} {...others} ref={ref}>
16
+ return <KeyboardTrackingViewContainer {...others} ref={ref}>
18
17
  {children}
19
18
  </KeyboardTrackingViewContainer>;
20
19
  });
21
- KeyboardTrackingView.defaultProps = defaultProps;
22
- KeyboardTrackingView.scrollBehaviors = SCROLL_BEHAVIORS;
23
- export default KeyboardTrackingView;
20
+ export default KeyboardTrackingView;
21
+ // @ts-expect-error
22
+ KeyboardTrackingView.scrollBehaviors = SCROLL_BEHAVIORS;
@@ -11,7 +11,6 @@ declare const _default: {
11
11
  SCROLL_TO_BOTTOM_INVERTED_ONLY: any;
12
12
  FIXED_OFFSET: any;
13
13
  };
14
- defaultProps: KeyboardTrackingViewProps;
15
14
  };
16
15
  KeyboardAwareInsetsView: {
17
16
  (props: import("react-native/types").ViewProps & {
@@ -28,7 +27,7 @@ declare const _default: {
28
27
  usesBottomTabs?: boolean | undefined;
29
28
  ref?: any;
30
29
  style?: import("react-native/types").StyleProp<import("react-native/types").ViewStyle>;
31
- children?: import("react").ReactNode;
30
+ children?: import("react").ReactChild | import("react").ReactChild[] | undefined;
32
31
  } & {
33
32
  offset?: number | undefined;
34
33
  }): import("react").JSX.Element;
package/lib/package.json CHANGED
@@ -1,22 +1,23 @@
1
1
  {
2
- "name": "uilib-native",
3
- "version": "5.1.0",
4
- "homepage": "https://github.com/wix/react-native-ui-lib",
5
- "description": "uilib native components (separated from js components)",
6
- "main": "components/index",
7
- "scripts": {
8
- "releaseNative": ""
9
- },
10
- "author": "Ethan Sharabi <ethan.shar@gmail.com>",
11
- "license": "MIT",
12
- "dependencies": {
13
- "lodash": "^4.17.21"
14
- },
15
- "devDependencies": {
16
- "shell-utils": "^1.0.10"
17
- },
18
- "peerDependencies": {
19
- "react": ">=19.0.0",
20
- "react-native": ">=0.78.3"
21
- }
2
+ "name": "uilib-native",
3
+ "version": "5.0.1",
4
+ "homepage": "https://github.com/wix/react-native-ui-lib",
5
+ "description": "uilib native components (separated from js components)",
6
+ "main": "components/index",
7
+ "scripts": {
8
+ "releaseNative": "node ./scripts/releaseNative.js"
9
+ },
10
+ "author": "Ethan Sharabi <ethan.shar@gmail.com>",
11
+ "license": "MIT",
12
+ "dependencies": {
13
+ "lodash": "^4.17.21",
14
+ "prop-types": "^15.5.10"
15
+ },
16
+ "devDependencies": {
17
+ "shell-utils": "^1.0.10"
18
+ },
19
+ "peerDependencies": {
20
+ "react": ">=18.3.1",
21
+ "react-native": ">=0.77.3"
22
+ }
22
23
  }
@@ -4,7 +4,7 @@ module.exports = {
4
4
  /* TODO: Once we upgrade to RN69 we should try using podspecPath again, for now I copied ReactNativeUiLib.podspec file to the root - it seems to work
5
5
  I copied it, because we need it for both the main uilib and the uilib-native package */
6
6
  // ios: {
7
- // podspecPath: './uilib-native/ReactNativeUiLib.podspec'
7
+ // podspecPath: './lib/ReactNativeUiLib.podspec'
8
8
  // },
9
9
  android: {
10
10
  sourceDir: './android/',
package/package.json CHANGED
@@ -1,163 +1,165 @@
1
1
  {
2
- "name": "react-native-ui-lib",
3
- "version": "8.3.4-snapshot.7795",
4
- "main": "src/index.js",
5
- "types": "src/index.d.ts",
6
- "author": "Ethan Sharabi <ethan.shar@gmail.com>",
7
- "homepage": "https://github.com/wix/react-native-ui-lib",
8
- "license": "MIT",
9
- "publishConfig": {
10
- "registry": "https://registry.npmjs.org/"
11
- },
12
- "repository": {
13
- "type": "git",
14
- "url": "https://github.com/wix/react-native-ui-lib"
15
- },
16
- "scripts": {
17
- "start": "watchman watch-del-all && react-native start --client-logs",
18
- "pod-install": "(cd ios && pod install)",
19
- "ios": "react-native run-ios",
20
- "android": "react-native run-android",
21
- "iPad": "react-native run-ios --simulator='iPad Pro (9.7 inch)'",
22
- "test": "jest",
23
- "test:watch": "jest --watch",
24
- "test:perf": "TEST_RUNNER_ARGS='--testMatch **/*.perf.js' reassure measure",
25
- "xcode": "xed ios",
26
- "build": "node scripts/build/build.js",
27
- "build:local": "./scripts/build/createLocalPackage.sh",
28
- "release": ""
29
- },
30
- "dependencies": {
31
- "babel-plugin-transform-inline-environment-variables": "^0.0.2",
32
- "color": "^3.1.0",
33
- "commons-validator-js": "^1.0.237",
34
- "date-fns": "^2.29.3",
35
- "hoist-non-react-statics": "^3.0.0",
36
- "lodash": "^4.17.21",
37
- "memoize-one": "^5.0.5",
38
- "react-freeze": "^1.0.0",
39
- "react-native-redash": "^12.0.3",
40
- "semver": "^5.5.0",
41
- "tinycolor2": "^1.4.2",
42
- "url-parse": "^1.2.0",
43
- "wix-react-native-text-size": "1.0.9"
44
- },
45
- "devDependencies": {
46
- "@babel/cli": "^7.16.8",
47
- "@babel/core": "^7.25.2",
48
- "@babel/plugin-transform-modules-commonjs": "^7.17.9",
49
- "@babel/preset-env": "^7.25.3",
50
- "@babel/preset-react": "^7.10.1",
51
- "@babel/runtime": "^7.26.10",
52
- "@formatjs/intl-datetimeformat": "^6.0.3",
53
- "@formatjs/intl-getcanonicallocales": "^2.0.2",
54
- "@formatjs/intl-locale": "^3.0.3",
55
- "@formatjs/intl-numberformat": "^8.0.4",
56
- "@formatjs/intl-pluralrules": "^5.0.3",
57
- "@react-native-community/blur": "4.4.1",
58
- "@react-native-community/cli": "15.0.1",
59
- "@react-native-community/cli-platform-android": "15.0.1",
60
- "@react-native-community/cli-platform-ios": "15.0.1",
61
- "@react-native-community/datetimepicker": "8.2.0",
62
- "@react-native-community/netinfo": "11.3.3",
63
- "@react-native/babel-preset": "0.78.3",
64
- "@react-native/metro-config": "0.78.3",
65
- "@react-native/typescript-config": "0.78.3",
66
- "@shopify/flash-list": "1.7.6",
67
- "@testing-library/react-native": "^13.3.3",
68
- "@types/hoist-non-react-statics": "^3.3.7",
69
- "@types/jest": "^29.5.13",
70
- "@types/lodash": "^4.0.0",
71
- "@types/react": "19.0.0",
72
- "@types/react-test-renderer": "19.0.0",
73
- "@types/tinycolor2": "^1.4.2",
74
- "@types/url-parse": "^1.4.3",
75
- "@welldone-software/why-did-you-render": "^3.2.1",
76
- "babel-plugin-lodash": "^3.3.4",
77
- "babel-plugin-module-resolver": "^5.0.0",
78
- "jest": "^29.6.3",
79
- "light-date": "^1.2.0",
80
- "moment": "^2.24.0",
81
- "object-hash": "^3.0.0",
82
- "postcss": "^8.4.21",
83
- "postcss-js": "^4.0.0",
84
- "prettier": "^3.2.5",
85
- "react": "19.0.0",
86
- "react-autobind": "^1.0.6",
87
- "react-dom": "19.0.0",
88
- "react-native": "0.78.3",
89
- "react-native-fs": "^2.20.0",
90
- "react-native-gesture-handler": "2.24.0",
91
- "react-native-haptic-feedback": "^1.11.0",
92
- "react-native-linear-gradient": "2.6.2",
93
- "react-native-mmkv": "3.2.0",
94
- "react-native-navigation": "8.4.3",
95
- "react-native-reanimated": "3.19.4",
96
- "react-native-safe-area-context": "5.6.2",
97
- "react-native-shimmer-placeholder": "^2.0.6",
98
- "react-native-svg": "15.11.2",
99
- "react-native-svg-transformer": "1.5.0",
100
- "react-test-renderer": "19.0.0",
101
- "reassure": "^0.4.1",
102
- "setimmediate": "^1.0.5",
103
- "shell-utils": "^1.0.10",
104
- "typescript": "5.0.4",
105
- "uilib-native": "5.0.1-snapshot.7795"
106
- },
107
- "peerDependencies": {
108
- "react": ">=19.0.0",
109
- "react-native": ">=0.77.3",
110
- "react-native-gesture-handler": ">=2.24.0",
111
- "react-native-reanimated": ">=3.19.4",
112
- "react-native-ui-lib": "*",
113
- "uilib-native": "5.1.0-snapshot.7635"
114
- },
115
- "jest": {
116
- "preset": "react-native",
117
- "transformIgnorePatterns": [
118
- "node_modules/(?!(@react-native|react-native|react-native-reanimated|react-native-redash|uilib-native)/)"
119
- ],
120
- "testPathIgnorePatterns": [
121
- "/e2e/",
122
- "/node_modules/",
123
- "/typings/",
124
- "/expoDemo/",
125
- "/uilib-docs/"
126
- ],
127
- "setupFiles": [
128
- "./jestSetup/jest-setup.js"
129
- ],
130
- "testMatch": [
131
- "**/*.spec.(js|ts|tsx)"
132
- ],
133
- "fakeTimers": {
134
- "legacyFakeTimers": true
135
- }
136
- },
137
- "engines": {
138
- "node": ">=18"
139
- },
140
- "files": [
141
- "*.js",
142
- "*.d.ts",
143
- "!scripts",
144
- "scripts/release/prReleaseNotesCommon.js",
145
- "scripts/docs/buildDocsCommon.js",
146
- "src",
147
- "testkit",
148
- "ReactNativeUILib.podspec",
149
- "!babel.config.js",
150
- "!src/**/*.ts",
151
- "src/**/*.d.ts",
152
- "!src/**/*.tsx",
153
- "!src/**/__tests__",
154
- "!**/.DS_Store",
155
- "lib/components",
156
- "lib/ios",
157
- "lib/android",
158
- "!lib/android/build",
159
- "!lib/scripts",
160
- "lib/package.json",
161
- "lib/ReactNativeUILib.podspec"
162
- ]
2
+ "name": "react-native-ui-lib",
3
+ "version": "8.3.4-snapshot.7802",
4
+ "main": "src/index.js",
5
+ "types": "src/index.d.ts",
6
+ "author": "Ethan Sharabi <ethan.shar@gmail.com>",
7
+ "homepage": "https://github.com/wix/react-native-ui-lib",
8
+ "license": "MIT",
9
+ "publishConfig": {
10
+ "registry": "https://registry.npmjs.org/"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://github.com/wix/react-native-ui-lib"
15
+ },
16
+ "scripts": {
17
+ "start": "watchman watch-del-all && react-native start --client-logs",
18
+ "pod-install": "(cd ios && pod install)",
19
+ "ios": "react-native run-ios",
20
+ "android": "react-native run-android",
21
+ "iPad": "react-native run-ios --simulator='iPad Pro (9.7 inch)'",
22
+ "test": "jest",
23
+ "test:watch": "jest --watch",
24
+ "test:perf": "TEST_RUNNER_ARGS='--testMatch **/*.perf.js' reassure measure",
25
+ "xcode": "xed ios",
26
+ "build": "node scripts/build/build.js",
27
+ "build:local": "./scripts/build/createLocalPackage.sh",
28
+ "release": "node ./scripts/release/release.js"
29
+ },
30
+ "dependencies": {
31
+ "babel-plugin-transform-inline-environment-variables": "^0.0.2",
32
+ "color": "^3.1.0",
33
+ "commons-validator-js": "^1.0.237",
34
+ "date-fns": "^2.29.3",
35
+ "deprecated-react-native-prop-types": "^2.3.0",
36
+ "hoist-non-react-statics": "^3.0.0",
37
+ "lodash": "^4.17.21",
38
+ "memoize-one": "^5.0.5",
39
+ "prop-types": "^15.5.10",
40
+ "react-freeze": "^1.0.0",
41
+ "react-native-redash": "^12.0.3",
42
+ "semver": "^5.5.0",
43
+ "tinycolor2": "^1.4.2",
44
+ "url-parse": "^1.2.0",
45
+ "wix-react-native-text-size": "1.0.9"
46
+ },
47
+ "devDependencies": {
48
+ "@babel/cli": "^7.16.8",
49
+ "@babel/core": "^7.25.2",
50
+ "@babel/plugin-transform-modules-commonjs": "^7.17.9",
51
+ "@babel/preset-env": "^7.25.3",
52
+ "@babel/preset-react": "^7.10.1",
53
+ "@babel/runtime": "^7.26.10",
54
+ "@formatjs/intl-datetimeformat": "^6.0.3",
55
+ "@formatjs/intl-getcanonicallocales": "^2.0.2",
56
+ "@formatjs/intl-locale": "^3.0.3",
57
+ "@formatjs/intl-numberformat": "^8.0.4",
58
+ "@formatjs/intl-pluralrules": "^5.0.3",
59
+ "@react-native-community/blur": "4.4.1",
60
+ "@react-native-community/cli": "15.0.1",
61
+ "@react-native-community/cli-platform-android": "15.0.1",
62
+ "@react-native-community/cli-platform-ios": "15.0.1",
63
+ "@react-native-community/datetimepicker": "8.2.0",
64
+ "@react-native-community/netinfo": "11.3.3",
65
+ "@react-native/babel-preset": "0.77.3",
66
+ "@react-native/metro-config": "0.77.3",
67
+ "@react-native/typescript-config": "0.77.3",
68
+ "@shopify/flash-list": "1.7.6",
69
+ "@testing-library/react-native": "^11.5.1",
70
+ "@types/hoist-non-react-statics": "^3.3.1",
71
+ "@types/jest": "^29.5.13",
72
+ "@types/lodash": "^4.0.0",
73
+ "@types/prop-types": "^15.5.3",
74
+ "@types/react": "18.3.24",
75
+ "@types/react-test-renderer": "^18.3.0",
76
+ "@types/tinycolor2": "^1.4.2",
77
+ "@types/url-parse": "^1.4.3",
78
+ "@welldone-software/why-did-you-render": "^3.2.1",
79
+ "babel-plugin-lodash": "^3.3.4",
80
+ "babel-plugin-module-resolver": "^5.0.0",
81
+ "jest": "^29.6.3",
82
+ "light-date": "^1.2.0",
83
+ "moment": "^2.24.0",
84
+ "object-hash": "^3.0.0",
85
+ "postcss": "^8.4.21",
86
+ "postcss-js": "^4.0.0",
87
+ "prettier": "^3.2.5",
88
+ "react": "18.3.1",
89
+ "react-autobind": "^1.0.6",
90
+ "react-dom": "18.3.1",
91
+ "react-native": "0.77.3",
92
+ "react-native-fs": "^2.20.0",
93
+ "react-native-gesture-handler": "2.24.0",
94
+ "react-native-haptic-feedback": "^1.11.0",
95
+ "react-native-linear-gradient": "2.6.2",
96
+ "react-native-mmkv": "3.2.0",
97
+ "react-native-navigation": "8.1.2",
98
+ "react-native-reanimated": "3.18.0",
99
+ "react-native-safe-area-context": "5.6.2",
100
+ "react-native-shimmer-placeholder": "^2.0.6",
101
+ "react-native-svg": "15.11.2",
102
+ "react-native-svg-transformer": "1.5.0",
103
+ "react-test-renderer": "18.3.1",
104
+ "reassure": "^0.4.1",
105
+ "setimmediate": "^1.0.5",
106
+ "shell-utils": "^1.0.10",
107
+ "typescript": "5.0.4",
108
+ "uilib-native": "^5.0.1"
109
+ },
110
+ "peerDependencies": {
111
+ "react": ">=18.3.1",
112
+ "react-native": ">=0.77.3",
113
+ "react-native-gesture-handler": ">=2.24.0",
114
+ "react-native-reanimated": ">=3.17.5",
115
+ "uilib-native": "^5.0.1"
116
+ },
117
+ "jest": {
118
+ "preset": "react-native",
119
+ "transformIgnorePatterns": [
120
+ "node_modules/(?!(@react-native|react-native|react-native-reanimated|react-native-redash|uilib-native)/)"
121
+ ],
122
+ "testPathIgnorePatterns": [
123
+ "/e2e/",
124
+ "/node_modules/",
125
+ "/typings/",
126
+ "/expoDemo/",
127
+ "/uilib-docs/"
128
+ ],
129
+ "setupFiles": [
130
+ "./jestSetup/jest-setup.js"
131
+ ],
132
+ "testMatch": [
133
+ "**/*.spec.(js|ts|tsx)"
134
+ ],
135
+ "fakeTimers": {
136
+ "legacyFakeTimers": true
137
+ }
138
+ },
139
+ "engines": {
140
+ "node": ">=18"
141
+ },
142
+ "files": [
143
+ "*.js",
144
+ "*.d.ts",
145
+ "!scripts",
146
+ "scripts/release/prReleaseNotesCommon.js",
147
+ "scripts/docs/buildDocsCommon.js",
148
+ "src",
149
+ "testkit",
150
+ "ReactNativeUILib.podspec",
151
+ "!babel.config.js",
152
+ "!src/**/*.ts",
153
+ "src/**/*.d.ts",
154
+ "!src/**/*.tsx",
155
+ "!src/**/__tests__",
156
+ "!**/.DS_Store",
157
+ "lib/components",
158
+ "lib/ios",
159
+ "lib/android",
160
+ "!lib/android/build",
161
+ "!lib/scripts",
162
+ "lib/package.json",
163
+ "lib/ReactNativeUILib.podspec"
164
+ ]
163
165
  }
@@ -32,7 +32,7 @@ function asBaseComponent(WrappedComponent, options = {}) {
32
32
  return Modifiers.getThemeProps.call(WrappedComponent, props, context);
33
33
  };
34
34
  static getDerivedStateFromError(error) {
35
- UIComponent.defaultProps?.onError?.(error);
35
+ UIComponent.defaultProps?.onError?.(error, WrappedComponent.defaultProps);
36
36
  return {
37
37
  error: true
38
38
  };
@@ -55,7 +55,6 @@ function asBaseComponent(WrappedComponent, options = {}) {
55
55
  hoistStatics(BaseComponent, WrappedComponent);
56
56
  BaseComponent.displayName = WrappedComponent.displayName;
57
57
  BaseComponent.propTypes = WrappedComponent.propTypes;
58
- // @ts-expect-error class component have defaultProps and functions do not and so should not be affected by this
59
58
  BaseComponent.defaultProps = WrappedComponent.defaultProps;
60
59
  const ThemeContext = ThemeManager.getThemeContext();
61
60
  if (ThemeContext) {
@@ -8,12 +8,20 @@ import _includes from "lodash/includes";
8
8
  import _pickBy from "lodash/pickBy";
9
9
  import _pick from "lodash/pick";
10
10
  import React from 'react';
11
+ // import PropTypes from 'prop-types';
11
12
  import { StyleSheet } from 'react-native';
12
13
  import { Colors } from "../style";
13
14
  import * as Modifiers from "./modifiers";
14
15
  export default function baseComponent(usePure) {
15
16
  const parent = usePure ? React.PureComponent : React.Component;
16
17
  class BaseComponent extends parent {
18
+ // static propTypes = {
19
+ // ..._.mapValues(Typography, () => PropTypes.bool),
20
+ // ..._.mapValues(Colors, () => PropTypes.bool),
21
+ // useNativeDriver: PropTypes.bool,
22
+ // };
23
+
24
+ static extractOwnProps = Modifiers.extractOwnProps;
17
25
  constructor(props) {
18
26
  super(props);
19
27
  if (!this.styles) {