react-native-ui-lib 8.3.4-snapshot.7807 → 8.3.4-snapshot.7813

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 (125) hide show
  1. package/lib/components/HighlighterOverlayView/index.d.ts +2 -2
  2. package/lib/components/HighlighterOverlayView/index.web.d.ts +2 -2
  3. package/lib/components/Keyboard/KeyboardAccessoryView/CustomKeyboardView/CustomKeyboardViewBase.d.ts +1 -1
  4. package/lib/components/Keyboard/KeyboardAccessoryView/KeyboardRegistry/index.js +5 -1
  5. package/lib/components/Keyboard/KeyboardAccessoryView/index.d.ts +2 -2
  6. package/lib/components/Keyboard/KeyboardAccessoryView/index.js +3 -1
  7. package/lib/components/Keyboard/KeyboardTrackingView/KeyboardTrackingView.ios.js +3 -1
  8. package/lib/components/Keyboard/KeyboardTrackingView/index.d.ts +6 -2
  9. package/lib/components/Keyboard/KeyboardTrackingView/index.js +5 -4
  10. package/lib/components/Keyboard/index.d.ts +2 -1
  11. package/lib/package.json +20 -21
  12. package/lib/react-native.config.js +1 -1
  13. package/package.json +161 -163
  14. package/src/commons/asBaseComponent.js +2 -1
  15. package/src/commons/baseComponent.js +0 -8
  16. package/src/commons/forwardRef.js +1 -4
  17. package/src/commons/modifiers.d.ts +0 -6
  18. package/src/commons/modifiers.js +0 -18
  19. package/src/commons/withScrollEnabler.js +0 -4
  20. package/src/commons/withScrollReached.js +0 -4
  21. package/src/components/KeyboardAwareScrollView/KeyboardAwareBase.js +0 -7
  22. package/src/components/KeyboardAwareScrollView/KeyboardAwareFlatList.js +0 -6
  23. package/src/components/KeyboardAwareScrollView/KeyboardAwareScrollView.js +0 -6
  24. package/src/components/WheelPicker/WheelPicker.driver.d.ts +2 -2
  25. package/src/components/WheelPicker/index.d.ts +2 -2
  26. package/src/components/WheelPicker/index.js +1 -1
  27. package/src/components/WheelPicker/usePresenter.d.ts +1 -1
  28. package/src/components/actionSheet/index.d.ts +1 -1
  29. package/src/components/animatedImage/index.d.ts +1 -1
  30. package/src/components/animatedScanner/index.js +0 -37
  31. package/src/components/avatar/index.d.ts +1 -1
  32. package/src/components/badge/index.d.ts +4 -4
  33. package/src/components/baseInput/index.d.ts +0 -1
  34. package/src/components/baseInput/index.js +1 -49
  35. package/src/components/button/index.d.ts +4 -4
  36. package/src/components/button/types.d.ts +2 -2
  37. package/src/components/carousel/index.d.ts +8 -8
  38. package/src/components/carousel/types.d.ts +4 -1
  39. package/src/components/carousel/types.js +0 -2
  40. package/src/components/checkbox/index.d.ts +1 -1
  41. package/src/components/chip/index.d.ts +1 -1
  42. package/src/components/colorPalette/index.d.ts +1 -1
  43. package/src/components/dateTimePicker/index.d.ts +2 -2
  44. package/src/components/dateTimePicker/index.js +2 -2
  45. package/src/components/dialog/types.d.ts +4 -4
  46. package/src/components/dialog/useDialogContent.d.ts +1 -1
  47. package/src/components/drawer/index.d.ts +1 -1
  48. package/src/components/expandableSection/index.d.ts +2 -2
  49. package/src/components/fadedScrollView/index.js +1 -1
  50. package/src/components/featureHighlight/index.js +5 -7
  51. package/src/components/gridListItem/index.d.ts +7 -7
  52. package/src/components/gridView/index.d.ts +1 -1
  53. package/src/components/hint/HintBubble.d.ts +1 -1
  54. package/src/components/hint/HintOld.d.ts +10 -10
  55. package/src/components/hint/hooks/useHintLayout.d.ts +1 -1
  56. package/src/components/hint/index.d.ts +2 -2
  57. package/src/components/hint/types.d.ts +2 -2
  58. package/src/components/icon/index.js +0 -3
  59. package/src/components/image/index.d.ts +1 -1
  60. package/src/components/image/index.js +20 -17
  61. package/src/components/loaderScreen/index.d.ts +1 -1
  62. package/src/components/loaderScreen/types.d.ts +1 -1
  63. package/src/components/maskedInput/index.d.ts +21 -4
  64. package/src/components/maskedInput/index.js +78 -16
  65. package/src/components/maskedInput/maskedInput.api.json +0 -1
  66. package/src/components/modal/index.d.ts +3 -3
  67. package/src/components/numberInput/index.js +2 -2
  68. package/src/components/overlay/index.d.ts +1 -1
  69. package/src/components/picker/PickerDialog.android.js +0 -15
  70. package/src/components/picker/PickerDialog.js +0 -7
  71. package/src/components/picker/helpers/useImperativePickerHandle.d.ts +1 -1
  72. package/src/components/picker/helpers/useImperativePickerHandle.js +1 -1
  73. package/src/components/picker/types.d.ts +9 -9
  74. package/src/components/progressBar/index.d.ts +2 -2
  75. package/src/components/screenFooter/index.js +1 -1
  76. package/src/components/scrollBar/index.d.ts +11 -4
  77. package/src/components/searchInput/index.js +1 -1
  78. package/src/components/searchInput/types.d.ts +2 -2
  79. package/src/components/sectionsWheelPicker/SectionsWheelPicker.driver.d.ts +2 -2
  80. package/src/components/skeletonView/index.d.ts +4 -4
  81. package/src/components/slider/Thumb.d.ts +1 -1
  82. package/src/components/slider/types.d.ts +1 -1
  83. package/src/components/stackAggregator/index.d.ts +1 -1
  84. package/src/components/tabController/TabBarItem.d.ts +2 -2
  85. package/src/components/tabController/TabBarItem.js +1 -1
  86. package/src/components/tabController/TabPage.d.ts +2 -2
  87. package/src/components/tabController/useScrollToItem.d.ts +1 -1
  88. package/src/components/text/Text.driver.d.ts +1 -1
  89. package/src/components/textArea/index.js +0 -6
  90. package/src/components/textField/types.d.ts +4 -4
  91. package/src/components/textField/useImperativeInputHandle.d.ts +1 -1
  92. package/src/components/textField/useImperativeInputHandle.js +1 -1
  93. package/src/components/textField/usePreset.d.ts +36 -36
  94. package/src/components/timeline/index.js +1 -1
  95. package/src/components/toast/index.js +0 -69
  96. package/src/components/wizard/index.d.ts +1 -1
  97. package/src/components/wizard/types.d.ts +1 -1
  98. package/src/components/wizard/wizard.api.json +1 -1
  99. package/src/hooks/useCombinedRefs/index.js +1 -2
  100. package/src/hooks/useDebounce/index.js +1 -1
  101. package/src/hooks/useHiddenLocation/index.js +2 -2
  102. package/src/hooks/useHiddenLocation/index.web.js +2 -2
  103. package/src/hooks/useMeasure/index.d.ts +1 -1
  104. package/src/hooks/useMeasure/index.js +1 -1
  105. package/src/hooks/useScrollTo/index.d.ts +2 -2
  106. package/src/incubator/calendar/index.js +1 -1
  107. package/src/incubator/calendar/types.d.ts +2 -2
  108. package/src/incubator/expandableOverlay/index.d.ts +2 -2
  109. package/src/incubator/slider/Track.d.ts +1 -1
  110. package/src/incubator/slider/index.d.ts +1 -1
  111. package/src/incubator/toast/helpers/useToastTimer.js +1 -1
  112. package/src/incubator/toast/index.js +1 -1
  113. package/src/incubator/toast/types.d.ts +2 -2
  114. package/src/testkit/Component.driver.d.ts +1 -1
  115. package/src/testkit/drivers/TestingLibraryDriver.d.ts +1 -1
  116. package/src/typings/module.d.ts +12 -3
  117. package/ReactNativeUiLib.podspec +0 -22
  118. package/src/components/maskedInput/new.d.ts +0 -22
  119. package/src/components/maskedInput/new.js +0 -85
  120. package/src/components/maskedInput/old.js +0 -95
  121. package/src/components/textFieldOld/index.d.ts +0 -71
  122. package/src/components/textFieldOld/index.js +0 -807
  123. package/src/helpers/DocsGenerator.js +0 -61
  124. package/textFieldOld.d.ts +0 -2
  125. package/textFieldOld.js +0 -1
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { type JSX } 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): React.JSX.Element;
31
+ (props: HighlighterOverlayViewProps): JSX.Element;
32
32
  displayName: string;
33
33
  };
34
34
  export default HighlighterOverlayView;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { type JSX } 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): React.JSX.Element;
31
+ (props: HighlighterOverlayViewProps): 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.ReactChild | React.ReactChild[];
12
+ children?: React.ReactNode;
13
13
  };
14
14
  export default class CustomKeyboardViewBase<T extends CustomKeyboardViewBaseProps> extends Component<T> {
15
15
  static defaultProps: {
@@ -33,6 +33,8 @@ 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
36
38
  console.error(`KeyboardRegistry.registerKeyboard: ${componentID} you must register a generator function`);
37
39
  return;
38
40
  }
@@ -50,7 +52,9 @@ export default class KeyboardRegistry {
50
52
  */
51
53
  static getKeyboard = componentID => {
52
54
  const res = KeyboardRegistry.registeredKeyboards[componentID];
53
- if (!res || !res.generator) {
55
+ if (!res?.generator) {
56
+ // TODO: do we want to add a util for this?
57
+ // eslint-disable-next-line no-restricted-syntax
54
58
  console.error(`KeyboardRegistry.getKeyboard: ${componentID} used but not yet registered`);
55
59
  return undefined;
56
60
  }
@@ -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;
9
+ renderContent?: () => React.ReactElement<any>;
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.ReactChild;
40
+ children?: React.ReactNode;
41
41
  };
42
42
  /**
43
43
  * @description: View that allows replacing the default keyboard with other components
@@ -141,7 +141,9 @@ class KeyboardAccessoryView extends Component {
141
141
  scrollBehavior,
142
142
  ...others
143
143
  } = this.props;
144
- return <KeyboardTrackingView {...others} scrollBehavior={scrollBehavior} ref={r => this.trackingViewRef = r} style={styles.trackingToolbarContainer} onLayout={this.onContainerComponentHeightChanged}>
144
+ return <KeyboardTrackingView {...others} scrollBehavior={scrollBehavior} ref={r => {
145
+ this.trackingViewRef = r;
146
+ }} style={styles.trackingToolbarContainer} onLayout={this.onContainerComponentHeightChanged}>
145
147
  <KeyboardHeightListener id={`${this.id}`} onDismiss={this.onDismiss} onKeyboardHeightChange={this.onKeyboardHeightChange} />
146
148
  <>{renderContent?.()}</>
147
149
  <CustomKeyboardView keyboardHeight={keyboardHeight} shouldFocus={shouldFocus} onKeyboardDismiss={this.onKeyboardDismiss} inputRef={kbInputRef} component={kbComponent} initialProps={this.processInitialProps()} onItemSelected={onItemSelected} onRequestShowKeyboard={onRequestShowKeyboard} useSafeArea={others.useSafeArea} />
@@ -18,7 +18,9 @@ class KeyboardTrackingView extends PureComponent {
18
18
  useSafeArea: false
19
19
  };
20
20
  render() {
21
- return <KeyboardTrackingViewNativeComponent {...this.props} ref={r => this.ref = r} />;
21
+ return <KeyboardTrackingViewNativeComponent {...this.props} ref={r => {
22
+ this.ref = r;
23
+ }} />;
22
24
  }
23
25
  async getNativeProps() {
24
26
  if (this.ref && KeyboardTrackingViewTempManager && KeyboardTrackingViewTempManager.getNativeProps) {
@@ -73,9 +73,13 @@ export type KeyboardTrackingViewProps = ViewProps & {
73
73
  usesBottomTabs?: boolean;
74
74
  ref?: any;
75
75
  style?: StyleProp<ViewStyle>;
76
- children?: React.ReactChild | React.ReactChild[];
76
+ children?: React.ReactNode;
77
77
  };
78
- declare const _default: React.ForwardRefExoticComponent<Omit<KeyboardTrackingViewProps, "ref"> & React.RefAttributes<unknown>> & {
78
+ declare const defaultProps: KeyboardTrackingViewProps;
79
+ declare const KeyboardTrackingView: React.ForwardRefExoticComponent<Omit<KeyboardTrackingViewProps, "ref"> & React.RefAttributes<unknown>>;
80
+ type KeyboardTrackingViewType = typeof KeyboardTrackingView & {
79
81
  scrollBehaviors: typeof SCROLL_BEHAVIORS;
82
+ defaultProps: typeof defaultProps;
80
83
  };
84
+ declare const _default: KeyboardTrackingViewType;
81
85
  export default _default;
@@ -8,15 +8,16 @@ 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 = {};
11
12
  const KeyboardTrackingView = forwardRef(({
12
13
  children,
13
14
  ...others
14
15
  }, ref) => {
15
16
  const KeyboardTrackingViewContainer = isAndroid ? KeyboardTrackingViewAndroid : KeyboardTrackingViewIOS;
16
- return <KeyboardTrackingViewContainer {...others} ref={ref}>
17
+ return <KeyboardTrackingViewContainer {...defaultProps} {...others} ref={ref}>
17
18
  {children}
18
19
  </KeyboardTrackingViewContainer>;
19
20
  });
20
- export default KeyboardTrackingView;
21
- // @ts-expect-error
22
- KeyboardTrackingView.scrollBehaviors = SCROLL_BEHAVIORS;
21
+ KeyboardTrackingView.defaultProps = defaultProps;
22
+ KeyboardTrackingView.scrollBehaviors = SCROLL_BEHAVIORS;
23
+ export default KeyboardTrackingView;
@@ -11,6 +11,7 @@ declare const _default: {
11
11
  SCROLL_TO_BOTTOM_INVERTED_ONLY: any;
12
12
  FIXED_OFFSET: any;
13
13
  };
14
+ defaultProps: KeyboardTrackingViewProps;
14
15
  };
15
16
  KeyboardAwareInsetsView: {
16
17
  (props: import("react-native/types").ViewProps & {
@@ -27,7 +28,7 @@ declare const _default: {
27
28
  usesBottomTabs?: boolean | undefined;
28
29
  ref?: any;
29
30
  style?: import("react-native/types").StyleProp<import("react-native/types").ViewStyle>;
30
- children?: import("react").ReactChild | import("react").ReactChild[] | undefined;
31
+ children?: import("react").ReactNode;
31
32
  } & {
32
33
  offset?: number | undefined;
33
34
  }): import("react").JSX.Element;
package/lib/package.json CHANGED
@@ -1,23 +1,22 @@
1
1
  {
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
- }
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
+ }
23
22
  }
@@ -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: './lib/ReactNativeUiLib.podspec'
7
+ // podspecPath: './uilib-native/ReactNativeUiLib.podspec'
8
8
  // },
9
9
  android: {
10
10
  sourceDir: './android/',
package/package.json CHANGED
@@ -1,165 +1,163 @@
1
1
  {
2
- "name": "react-native-ui-lib",
3
- "version": "8.3.4-snapshot.7807",
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
- ]
2
+ "name": "react-native-ui-lib",
3
+ "version": "8.3.4-snapshot.7813",
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.7813"
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
+ ]
165
163
  }
@@ -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, WrappedComponent.defaultProps);
35
+ UIComponent.defaultProps?.onError?.(error);
36
36
  return {
37
37
  error: true
38
38
  };
@@ -55,6 +55,7 @@ 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
58
59
  BaseComponent.defaultProps = WrappedComponent.defaultProps;
59
60
  const ThemeContext = ThemeManager.getThemeContext();
60
61
  if (ThemeContext) {
@@ -8,20 +8,12 @@ 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';
12
11
  import { StyleSheet } from 'react-native';
13
12
  import { Colors } from "../style";
14
13
  import * as Modifiers from "./modifiers";
15
14
  export default function baseComponent(usePure) {
16
15
  const parent = usePure ? React.PureComponent : React.Component;
17
16
  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;
25
17
  constructor(props) {
26
18
  super(props);
27
19
  if (!this.styles) {
@@ -8,11 +8,8 @@ export default function forwardRef(WrappedComponent) {
8
8
  // @ts-expect-error
9
9
  const ForwardedComponent = React.forwardRef(forwardRef);
10
10
  hoistStatics(ForwardedComponent, WrappedComponent);
11
- //@ts-ignore
12
11
  ForwardedComponent.displayName = WrappedComponent.displayName;
13
- //@ts-ignore
14
- ForwardedComponent.propTypes = WrappedComponent.propTypes;
15
- //@ts-ignore
12
+ // @ts-expect-error
16
13
  ForwardedComponent.defaultProps = WrappedComponent.defaultProps;
17
14
  return ForwardedComponent;
18
15
  }
@@ -105,12 +105,6 @@ export declare function extractAccessibilityProps(props?: any): Partial<any>;
105
105
  export declare function extractAnimationProps(props?: any): Pick<any, "animation" | "duration" | "delay" | "direction" | "easing" | "iterationCount" | "transition" | "onAnimationBegin" | "onAnimationEnd" | "useNativeDriver">;
106
106
  export declare function extractBorderRadiusValue(props: Dictionary<any>): number | undefined;
107
107
  export declare function extractModifierProps(props: Dictionary<any>): _.Dictionary<any>;
108
- /**
109
- * TODO:
110
- * @deprecated switch to Modifiers#extractComponentProps
111
- */
112
- export declare function extractOwnProps(props: Dictionary<any>, ignoreProps: string[]): _.Omit<_.Dictionary<any>, string>;
113
- export declare function extractComponentProps(component: any, props: Dictionary<any>, ignoreProps?: string[]): _.Omit<_.Dictionary<any>, string>;
114
108
  export declare function getComponentName(componentDisplayName: string): any;
115
109
  export declare function getThemeProps<T extends object>(props?: T, context?: any, componentDisplayName?: string): T;
116
110
  export declare function generateModifiersStyle(options: ModifiersOptions | undefined, props: Dictionary<any>): ExtractedStyle;