Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 0 additions & 96 deletions demo/src/screens/DemoScreen.js

This file was deleted.

8 changes: 0 additions & 8 deletions demo/src/screens/MainScreen.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import _ from 'lodash';
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {StyleSheet, FlatList, SectionList, ScrollView} from 'react-native';
import {ViewPropTypes} from 'deprecated-react-native-prop-types';
import {Navigation} from 'react-native-navigation';
import {
Assets,
Expand All @@ -27,12 +25,6 @@ const chevronIcon = require('../assets/icons/chevronRight.png');
const FADER_SIZE = 50;

class MainScreen extends Component {
static propTypes = {
containerStyle: ViewPropTypes.style,
renderItem: PropTypes.func,
pageStyle: ViewPropTypes.style
};

settingsScreenName = 'unicorn.Settings';

static options() {
Expand Down
8 changes: 0 additions & 8 deletions demo/src/screens/componentScreens/ConversationListScreen.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import _ from 'lodash';
import PropTypes from 'prop-types';
import React, {Component, PureComponent} from 'react';
import {StyleSheet, Alert, FlatList} from 'react-native';
import {Colors, ListItem, Text, Avatar, AvatarHelper, Drawer, Button} from 'react-native-ui-lib'; //eslint-disable-line
Expand Down Expand Up @@ -121,13 +120,6 @@ class ConversationListScreen extends Component {
}

class ContactItem extends PureComponent {
static propTypes = {
item: PropTypes.object,
index: PropTypes.number,
addRef: PropTypes.func,
onSwipeableWillOpen: PropTypes.func
};

render() {
const {item, index, addRef, onSwipeableWillOpen} = this.props;

Expand Down
5 changes: 0 additions & 5 deletions demo/src/screens/foundationScreens/TypographyScreen.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
import _ from 'lodash';
import PropTypes from 'prop-types';
import React, {Component} from 'react';
import {ScrollView} from 'react-native';
import {TabController, Colors, Typography, View, Text} from 'react-native-ui-lib';

const WEIGHTS = ['Thin', 'Light', 'Default', 'Regular', 'Medium', 'Bold', 'Heavy', 'Black'];

export default class TypographyScreen extends Component {
static propTypes = {
color: PropTypes.string
};

static defaultProps = {
color: Colors.grey10
};
Expand Down
6 changes: 0 additions & 6 deletions demo/src/screens/realExamples/ListActions/ActionsList.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import PropTypes from 'prop-types';
import React, {Component} from 'react';
import {Animated, LayoutAnimation, PanResponder, I18nManager} from 'react-native';
import {Constants, Assets, Colors, View, TouchableOpacity, Button, Text} from 'react-native-ui-lib'; //eslint-disable-line
Expand All @@ -17,11 +16,6 @@ const DIRECTIONS = {

export default class ActionsList extends Component {
static displayName = 'ActionsList';

static propTypes = {
item: PropTypes.object,
index: PropTypes.number
}

constructor(props) {
super(props);
Expand Down
2 changes: 1 addition & 1 deletion expoDemo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@react-native-community/cli": "15.0.1",
"@react-native-community/cli-platform-android": "15.0.1",
"@react-native-community/cli-platform-ios": "15.0.1",
"@types/react": "~18.3.24",
"@types/react": "19.0.0",
"typescript": "^4.9.5"
},
"private": true
Expand Down
3 changes: 1 addition & 2 deletions lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
"author": "Ethan Sharabi <ethan.shar@gmail.com>",
"license": "MIT",
"dependencies": {
"lodash": "^4.17.21",
"prop-types": "^15.5.10"
"lodash": "^4.17.21"
},
"devDependencies": {
"shell-utils": "^1.0.10"
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"@types/hoist-non-react-statics": "^3.3.1",
"@types/jest": "^29.5.13",
"@types/lodash": "^4.0.0",
"@types/prop-types": "^15.5.3",
"@types/react": "19.0.0",
"@types/react-test-renderer": "^19.0.0",
"@types/tinycolor2": "^1.4.2",
Expand Down
3 changes: 0 additions & 3 deletions packages/react-native-ui-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,9 @@
"color": "^3.1.0",
"commons-validator-js": "^1.0.237",
"date-fns": "^2.29.3",
"deprecated-react-native-prop-types": "^2.3.0",
"hoist-non-react-statics": "^3.0.0",
"lodash": "^4.17.21",
"memoize-one": "^5.0.5",
"prop-types": "^15.5.10",
"react-freeze": "^1.0.0",
"react-native-redash": "^12.0.3",
"semver": "^5.5.0",
Expand Down Expand Up @@ -70,7 +68,6 @@
"@types/hoist-non-react-statics": "^3.3.1",
"@types/jest": "^29.5.13",
"@types/lodash": "^4.0.0",
"@types/prop-types": "^15.5.3",
"@types/react": "19.0.0",
"@types/react-test-renderer": "19.0.0",
"@types/tinycolor2": "^1.4.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
import PropTypes from 'prop-types';
import {ThemeManager, Colors, Typography, BorderRadiuses, Spacings} from '../../style';
import * as uut from '../modifiers';

describe('Modifiers', () => {
const SampleComponent = () => {};
SampleComponent.displayName = 'SampleComponent';
SampleComponent.propTypes = {
prop1: PropTypes.string,
prop2: PropTypes.number
};

describe('extractColorValue', () => {
it('should return color value according to modifier', () => {
Expand Down
7 changes: 0 additions & 7 deletions packages/react-native-ui-lib/src/commons/baseComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, {ComponentType} from 'react';
// import PropTypes from 'prop-types';
import {StyleSheet} from 'react-native';
import _ from 'lodash';
import {Colors} from '../style';
Expand All @@ -8,12 +7,6 @@ import * as Modifiers from './modifiers';
export default function baseComponent(usePure: boolean): ComponentType {
const parent = usePure ? React.PureComponent : React.Component;
class BaseComponent extends parent {
// static propTypes = {
// ..._.mapValues(Typography, () => PropTypes.bool),
// ..._.mapValues(Colors, () => PropTypes.bool),
// useNativeDriver: PropTypes.bool,
// };

styles: any;
view: any;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import _ from 'lodash';
import {Component} from 'react';
import PropTypes from 'prop-types';
import ReactNative, {DeviceEventEmitter, Keyboard} from 'react-native';

export default class KeyboardAwareBase extends Component {
Expand All @@ -22,12 +21,6 @@ export default class KeyboardAwareBase extends Component {
this._addKeyboardEventListeners();
}

static propTypes = {
startScrolledToBottom: PropTypes.bool,
scrollToBottomOnKBShow: PropTypes.bool,
scrollToInputAdditionalOffset: PropTypes.number
};

static defaultProps = {
startScrolledToBottom: false,
scrollToBottomOnKBShow: false,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import PropTypes from 'prop-types';
import {FlatList} from 'react-native';
import KeyboardAwareBase from './KeyboardAwareBase';

Expand All @@ -10,11 +9,6 @@ import KeyboardAwareBase from './KeyboardAwareBase';
export default class KeyboardAwareFlatList extends KeyboardAwareBase {
static displayName = 'KeyboardAwareFlatList';

static PropTypes = {
getTextInputRefs: PropTypes.func,
onScroll: PropTypes.func
};

static defaultProps = {
...KeyboardAwareBase.defaultProps,
getTextInputRefs: () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import PropTypes from 'prop-types';
import {ScrollView} from 'react-native';
import KeyboardAwareBase from './KeyboardAwareBase';

Expand All @@ -10,11 +9,6 @@ import KeyboardAwareBase from './KeyboardAwareBase';
export default class KeyboardAwareScrollView extends KeyboardAwareBase {
static displayName = 'KeyboardAwareScrollView';

static PropTypes = {
getTextInputRefs: PropTypes.func,
onScroll: PropTypes.func
};

static defaultProps = {
...KeyboardAwareBase.defaultProps,
getTextInputRefs: () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import _ from 'lodash';
import PropTypes from 'prop-types';
import React from 'react';
import {StyleSheet, Animated} from 'react-native';
import {ViewPropTypes} from 'deprecated-react-native-prop-types';
import {Colors} from '../../style';
import {BaseComponent} from '../../commons';
import View from '../../components/view';
Expand All @@ -16,41 +14,6 @@ import View from '../../components/view';
*/
export default class AnimatedScanner extends BaseComponent {
static displayName = 'AnimatedScanner';
static propTypes = {
/**
* animated value between 0 and 100
*/
// progress: PropTypes.object,
progress: PropTypes.number,
/**
* Duration of current break (can be change between breaks)
*/
duration: PropTypes.number,
/**
* scanner opacity
*/
opacity: PropTypes.number,
/**
* scanner background color
*/
backgroundColor: PropTypes.string,
/**
* breakpoint callback - ({progress, isDone}) => {}
*/
onBreakpoint: PropTypes.func,
/**
* should hide the scanner line
*/
hideScannerLine: PropTypes.bool,
/**
* the container style
*/
containerStyle: ViewPropTypes.style,
/**
* Used as a testing identifier
*/
testID: PropTypes.string
};

static defaultProps = {
progress: 0,
Expand Down
8 changes: 5 additions & 3 deletions packages/react-native-ui-lib/src/components/carousel/types.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import {ScrollViewProps, StyleProp, ViewStyle, NativeSyntheticEvent, NativeScrollEvent, Animated} from 'react-native';
// @ts-expect-error No typings available for 'deprecated-react-native-prop-types'
import {PointPropType} from 'deprecated-react-native-prop-types';
import {PageControlProps} from '../pageControl';

export enum PageControlPosition {
OVER = 'over',
UNDER = 'under'
}

export type PointPropType = {
x: number;
y: number;
};

export interface CarouselProps extends ScrollViewProps {
/**
* the first page to start with
Expand Down Expand Up @@ -96,7 +99,6 @@ export interface CarouselProps extends ScrollViewProps {
* Carousel scroll offset (pass new Animated.ValueXY())
*/
animatedScrollOffset?: Animated.ValueXY;

}

export interface CarouselState {
Expand Down
Loading