Skip to content
Merged
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
2 changes: 1 addition & 1 deletion demo/src/screens/componentScreens/ChipScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {Component} from 'react';
import React, {Component, type JSX} from 'react';
import {Alert} from 'react-native';
import {Chip, Colors, Spacings, Text, Typography, View, Image} from 'react-native-ui-lib';

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
6 changes: 5 additions & 1 deletion demo/src/screens/componentScreens/FeatureHighlightScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,11 @@ class FeatureHighlightScreen extends Component<{}, State> {
</View>
</View>
<View center padding-25>
<View ref={r => (this.viewRef = r)}>
<View
ref={r => {
this.viewRef = r;
}}
>
<Text marginT-20>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the
industry&apos;s standard dummy text ever since the 1500s, when an unknown printer took a galley of type
Expand Down
2 changes: 1 addition & 1 deletion demo/src/screens/componentScreens/NumberInputScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const DISCOUNT_PERCENTAGE = {min: 1, max: 80};
const DISCOUNT_PERCENTAGE_VALIDATION_MESSAGE = `Make sure your number is between ${DISCOUNT_PERCENTAGE.min} and ${DISCOUNT_PERCENTAGE.max}`;

const NumberInputScreen = () => {
const currentData = useRef<NumberInputData>();
const currentData = useRef<NumberInputData>(undefined);
const [text, setText] = useState<string>('');
const [showLabel, setShowLabel] = useState<boolean>(true);
const [exampleType, setExampleType] = useState<ExampleType>('price');
Expand Down
2 changes: 1 addition & 1 deletion demo/src/screens/componentScreens/OverlaysScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {Component} from 'react';
import React, {Component, type JSX} from 'react';
import {StyleSheet, ScrollView} from 'react-native';
import {View, Text, Image, Card, Constants, Colors} from 'react-native-ui-lib'; // eslint-disable-line

Expand Down
2 changes: 1 addition & 1 deletion demo/src/screens/componentScreens/SearchInputScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const SearchInputScreen = () => {
const [showCancelBtn, setShowCancelBtn] = useState(false);
const [showLoader, setShowLoader] = useState(false);
const [showCustomRightElement, setShowCustomRightElement] = useState(false);
const searchInput = useRef<SearchInputRef>();
const searchInput = useRef<SearchInputRef>(undefined);

const onChangeText = (text: string) => {
console.log('UILIB text: ', text);
Expand Down
2 changes: 1 addition & 1 deletion demo/src/screens/componentScreens/TimelineScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const contents = [
const TimelineScreen = () => {
const [anchorIndex, setAnchorIndex] = useState(0);
const [expand, setExpand] = useState(false);
const anchor = useRef();
const anchor = useRef(undefined);

const onPress = useCallback(() => {
setAnchorIndex(anchorIndex === 0 ? 1 : 0);
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
3 changes: 2 additions & 1 deletion docs/getting-started/v8.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
sidebar_position: 5
sidebar_position: 6
sidebar_label: Migrating v7 -> v8
title: "Migrating v7 -> v8"
# path: "/getting-started/v8"
---
## `react-native-ui-lib@8.x.x`

## General
Now supports react-native 0.77
`uilib-native` (our native library) has been moved from `dependencies` to `peerDependencies`.
Make sure to `pod install` after updating.
We do plan on making this optional in the future.
Expand Down
21 changes: 21 additions & 0 deletions docs/getting-started/v9.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
sidebar_position: 7
sidebar_label: Migrating v8 -> v9
title: "Migrating v8 -> v9"
# path: "/getting-started/v9"
---
## `react-native-ui-lib@9.x.x`

## General
Now supports react-native 0.78 and React 19

## Components

### MaskedInput
Only the newer version is now available (the `migrate` prop is removed)

## Utils

### modifiers
extractOwnProps - removed
extractComponentProps - removed
2 changes: 1 addition & 1 deletion docuilib/src/components/HomepageFeatures.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import React, {type JSX} from 'react';
import clsx from 'clsx';
import styles from './HomepageFeatures.module.css';

Expand Down
2 changes: 1 addition & 1 deletion docuilib/src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, {type JSX} from 'react';
import Layout from '@theme/Layout';
import BrowserOnly from '@docusaurus/BrowserOnly';
// import clsx from 'clsx';
Expand Down
2 changes: 1 addition & 1 deletion docuilib/src/theme/DocCard/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {type ReactNode} from 'react';
import React, {type ReactNode, type JSX} from 'react';
import clsx from 'clsx';
import Link from '@docusaurus/Link';
import {findFirstSidebarItemLink} from '@docusaurus/plugin-content-docs/client';
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
2 changes: 1 addition & 1 deletion lib/components/HighlighterOverlayView/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, {type JSX} from 'react';
import {processColor, StyleSheet, Modal, ViewStyle} from 'react-native';
// Import the Codegen specification for New Architecture
import HighlighterViewNativeComponent, {
Expand Down
2 changes: 1 addition & 1 deletion lib/components/HighlighterOverlayView/index.web.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, {type JSX} from 'react';
import {Modal, ViewStyle} from 'react-native';

type HighlightFrameType = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export type CustomKeyboardViewBaseProps = {
component?: string;
onItemSelected?: (component?: string, args?: any) => void;
onRequestShowKeyboard?: (keyboardId: string) => void;
children?: React.ReactChild | React.ReactChild[];
children?: React.ReactNode;
};

export default class CustomKeyboardViewBase<T extends CustomKeyboardViewBaseProps> extends Component<T> {
Expand Down
8 changes: 5 additions & 3 deletions lib/components/Keyboard/KeyboardAccessoryView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export type KeyboardAccessoryViewProps = kbTrackingViewProps & {
/**
* Content to be rendered above the keyboard
*/
renderContent?: () => React.ReactElement;
renderContent?: () => React.ReactElement<any>;
/**
* iOS only.
* The reference to the actual text input (or the keyboard may not reset when instructed to, etc.).
Expand Down Expand Up @@ -53,7 +53,7 @@ export type KeyboardAccessoryViewProps = kbTrackingViewProps & {
* Callback that will be called once the keyboard has been closed
*/
onKeyboardResigned?: () => void;
children?: React.ReactChild;
children?: React.ReactNode;
};

/**
Expand Down Expand Up @@ -204,7 +204,9 @@ class KeyboardAccessoryView extends Component<KeyboardAccessoryViewProps> {
<KeyboardTrackingView
{...others}
scrollBehavior={scrollBehavior}
ref={(r: any) => (this.trackingViewRef = r)}
ref={(r: any) => {
(this.trackingViewRef = r);
}}
style={styles.trackingToolbarContainer}
onLayout={this.onContainerComponentHeightChanged}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,14 @@ class KeyboardTrackingView extends PureComponent<KeyboardTrackingViewProps> {
ref?: any;

render() {
return <KeyboardTrackingViewNativeComponent {...this.props} ref={r => (this.ref = r)}/>;
return (
<KeyboardTrackingViewNativeComponent
{...this.props}
ref={r => {
this.ref = r;
}}
/>
);
}

async getNativeProps() {
Expand Down
2 changes: 1 addition & 1 deletion lib/components/Keyboard/KeyboardTrackingView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export type KeyboardTrackingViewProps = ViewProps & {
usesBottomTabs?: boolean;
ref?: any;
style?: StyleProp<ViewStyle>;
children?: React.ReactChild | React.ReactChild[];
children?: React.ReactNode;
};

const KeyboardTrackingView = forwardRef(({children, ...others}: KeyboardTrackingViewProps, ref: any) => {
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
Loading