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
24 changes: 1 addition & 23 deletions example/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,8 @@
const path = require('path');

const pak = require('../package.json');

module.exports = function (api) {
api.cache(true);

return {
presets: ['babel-preset-expo'],
plugins: [
[
'module-resolver',
{
extensions: ['.tsx', '.ts', '.js', '.json'],
alias: {
[`${pak.name}/package.json`]: path.join(
__dirname,
'..',
'package.json'
),
// For development, we want to alias the library to the source
[pak.name]: path.join(__dirname, '..', 'src'),
},
},
],
['@babel/plugin-proposal-export-namespace-from'],
['react-native-reanimated/plugin'],
],
plugins: [['@babel/plugin-proposal-export-namespace-from']],
};
};
1 change: 1 addition & 0 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"devDependencies": {
"@babel/core": "^7.29.0",
"babel-preset-expo": "~56.0.0",
"react-native-builder-bob": "^0.41.0",
"react-native-monorepo-config": "^0.3.4"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion example/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "../tsconfig",
}
}
9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
"name": "react-native-paper",
"version": "5.15.1",
"description": "Material design for React Native",
"main": "lib/commonjs/index.js",
"module": "lib/module/index.js",
"react-native": "src/index.tsx",
"main": "lib/module/index.js",
"source": "src/index.tsx",
"types": "lib/typescript/index.d.ts",
"types": "lib/typescript/src/index.d.ts",
"files": [
"src",
"lib",
Expand Down Expand Up @@ -96,7 +94,7 @@
"react": "19.2.3",
"react-dom": "19.2.3",
"react-native": "0.85.3",
"react-native-builder-bob": "^0.21.3",
"react-native-builder-bob": "^0.41.0",
"react-native-reanimated": "4.3.1",
"react-native-safe-area-context": "5.7.0",
"react-native-worklets": "0.8.3",
Expand Down Expand Up @@ -159,7 +157,6 @@
"source": "src",
"output": "lib",
"targets": [
"commonjs",
"module",
[
"typescript",
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate-mappings.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const ast = parser.parse(source, {
],
});

const index = packageJson.module;
const index = packageJson.main;
const relative = (value /* : string */) =>
path.relative(root, path.resolve(path.dirname(index), value));

Expand Down
4 changes: 1 addition & 3 deletions src/components/Appbar/AppbarAction.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import * as React from 'react';
import type { Animated, StyleProp, View, ViewStyle } from 'react-native';

import type { ThemeProp } from 'src/types';

import { useInternalTheme } from '../../core/theming';
import type { Theme } from '../../types';
import type { Theme, ThemeProp } from '../../types';
import { forwardRef } from '../../utils/forwardRef';
import type { IconSource } from '../Icon';
import IconButton from '../IconButton/IconButton';
Expand Down
3 changes: 1 addition & 2 deletions src/components/Card/CardActions.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import * as React from 'react';
import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';

import type { ThemeProp } from 'src/types';

import { CardActionChildProps } from './utils';
import { useInternalTheme } from '../../core/theming';
import type { ThemeProp } from '../../types';

export type Props = React.ComponentPropsWithRef<typeof View> & {
/**
Expand Down
3 changes: 1 addition & 2 deletions src/components/DataTable/DataTablePagination.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import * as React from 'react';
import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';

import type { ThemeProp } from 'src/types';

import { useLocale } from '../../core/locale';
import { useInternalTheme } from '../../core/theming';
import type { ThemeProp } from '../../types';
import Button from '../Button/Button';
import IconButton from '../IconButton/IconButton';
import MaterialCommunityIcon from '../MaterialCommunityIcon';
Expand Down
3 changes: 1 addition & 2 deletions src/components/Dialog/DialogActions.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import * as React from 'react';
import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';

import type { ThemeProp } from 'src/types';

import { DialogActionChildProps } from './utils';
import { useInternalTheme } from '../../core/theming';
import type { ThemeProp } from '../../types';

export type Props = React.ComponentPropsWithRef<typeof View> & {
/**
Expand Down
3 changes: 1 addition & 2 deletions src/components/Dialog/DialogIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import * as React from 'react';
import { StyleSheet, View } from 'react-native';

import type { ThemeProp } from 'src/types';

import { useInternalTheme } from '../../core/theming';
import type { ThemeProp } from '../../types';
import type { Theme } from '../../types';
import Icon, { IconSource } from '../Icon';

Expand Down
3 changes: 1 addition & 2 deletions src/components/Dialog/DialogScrollArea.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import * as React from 'react';
import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';

import type { ThemeProp } from 'src/types';

import { useInternalTheme } from '../../core/theming';
import type { ThemeProp } from '../../types';
import type { Theme } from '../../types';

export type Props = React.ComponentPropsWithRef<typeof View> & {
Expand Down
3 changes: 1 addition & 2 deletions src/components/List/ListSubheader.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import * as React from 'react';
import { StyleProp, StyleSheet, TextStyle } from 'react-native';

import type { ThemeProp } from 'src/types';

import { useInternalTheme } from '../../core/theming';
import type { ThemeProp } from '../../types';
import Text from '../Typography/Text';

export type Props = React.ComponentProps<typeof Text> & {
Expand Down
2 changes: 1 addition & 1 deletion src/components/List/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { StyleSheet, StyleProp, ViewStyle } from 'react-native';

import type { EllipsizeProp, InternalTheme, ThemeProp } from 'src/types';
import type { EllipsizeProp, InternalTheme, ThemeProp } from '../../types';

type Description =
| React.ReactNode
Expand Down
3 changes: 1 addition & 2 deletions src/components/Portal/Portal.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import * as React from 'react';

import type { InternalTheme } from 'src/types';

import PortalConsumer from './PortalConsumer';
import PortalHost, { PortalContext, PortalMethods } from './PortalHost';
import { LocaleContext, LocaleProvider } from '../../core/locale';
Expand All @@ -10,6 +8,7 @@ import {
Provider as SettingsProvider,
} from '../../core/settings';
import { ThemeProvider, withInternalTheme } from '../../core/theming';
import type { InternalTheme } from '../../types';

export type Props = {
/**
Expand Down
3 changes: 1 addition & 2 deletions src/components/SegmentedButtons/SegmentedButtonItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ import {
ViewStyle,
} from 'react-native';

import type { ThemeProp } from 'src/types';

import {
getSegmentedButtonBorderRadius,
getSegmentedButtonColors,
getSegmentedButtonDensityPadding,
} from './utils';
import { useInternalTheme } from '../../core/theming';
import type { ThemeProp } from '../../types';
import type { IconSource } from '../Icon';
import Icon from '../Icon';
import TouchableRipple, {
Expand Down
3 changes: 1 addition & 2 deletions src/components/SegmentedButtons/SegmentedButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ import {
ViewStyle,
} from 'react-native';

import type { ThemeProp } from 'src/types';

import SegmentedButtonItem from './SegmentedButtonItem';
import { getDisabledSegmentedButtonStyle } from './utils';
import { useInternalTheme } from '../../core/theming';
import type { ThemeProp } from '../../types';
import type { IconSource } from '../Icon';

type ConditionalValue<T extends string = string> =
Expand Down
2 changes: 1 addition & 1 deletion src/components/TextInput/Addons/Underline.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import { Animated, StyleSheet, StyleProp, ViewStyle } from 'react-native';

import type { ThemeProp } from 'src/types';
import type { ThemeProp } from '../../../types';

type UnderlineProps = {
parentState: {
Expand Down
3 changes: 1 addition & 2 deletions src/components/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ import {
ViewStyle,
} from 'react-native';

import type { ThemeProp } from 'src/types';

import { getTooltipPosition, Measurement, TooltipChildProps } from './utils';
import { useInternalTheme } from '../../core/theming';
import type { ThemeProp } from '../../types';
import { addEventListener } from '../../utils/addEventListener';
import Portal from '../Portal/Portal';
import Text from '../Typography/Text';
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"baseUrl": ".",
"rootDir": ".",
"paths": {
"react-native-paper": [
"./src/index"
Expand Down
Loading
Loading