Skip to content

Commit 111c849

Browse files
authored
Merge pull request #404 from web-ridge/remove-unused-styles
Improve maintainability and misc fixes
2 parents 6325690 + 1a4bad9 commit 111c849

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+7773
-6601
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18.15.0
1+
18.18.0

docusaurus/docs/contributing.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,8 @@ Community leaders will follow these Community Impact Guidelines in determining t
165165

166166
### Attribution
167167

168-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
169-
available at <https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>.
168+
This Code of Conduct is adapted from the [Contributor Covenant homepage](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html).
170169

171170
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
172171

173-
[homepage]: https://www.contributor-covenant.org
174-
175-
For answers to common questions about this code of conduct, see the FAQ at
176-
<https://www.contributor-covenant.org/faq>. Translations are available at <https://www.contributor-covenant.org/translations>.
172+
For answers to common questions about this code of conduct, see the [FAQ](https://www.contributor-covenant.org/faq). Translations are [here](https://www.contributor-covenant.org/translations).

docusaurus/docusaurus.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// @ts-check
22
// Note: type annotations allow type checking and IDEs autocompletion
33

4-
const lightCodeTheme = require('prism-react-renderer/themes/github')
5-
const darkCodeTheme = require('prism-react-renderer/themes/dracula')
4+
const lightCodeTheme = require('prism-react-renderer').themes.github;
5+
const darkCodeTheme = require('prism-react-renderer').themes.dracula;
66

77
/** @type {import('@docusaurus/types').Config} */
88
const config = {

docusaurus/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@
1515
"typecheck": "tsc"
1616
},
1717
"dependencies": {
18-
"@docusaurus/core": "2.2.0",
19-
"@docusaurus/preset-classic": "2.2.0",
20-
"@mdx-js/react": "^1.6.22",
21-
"clsx": "^1.2.1",
18+
"@docusaurus/core": "3.4.0",
19+
"@docusaurus/preset-classic": "3.4.0",
20+
"@mdx-js/react": "^3.0.1",
21+
"clsx": "^2.1.1",
2222
"color": "^4.2.3",
23-
"prism-react-renderer": "^1.3.5",
24-
"react": "^17.0.2",
25-
"react-dom": "^17.0.2"
23+
"prism-react-renderer": "^2.3.1",
24+
"react": "^18.3.1",
25+
"react-dom": "^18.3.1"
2626
},
2727
"devDependencies": {
28-
"@docusaurus/module-type-aliases": "2.2.0",
29-
"@tsconfig/docusaurus": "^1.0.7",
30-
"typescript": "^4.9.5"
28+
"@docusaurus/module-type-aliases": "3.4.0",
29+
"@tsconfig/docusaurus": "^2.0.3",
30+
"typescript": "^5.5.3"
3131
},
3232
"browserslist": {
3333
"production": [

docusaurus/yarn.lock

Lines changed: 4904 additions & 4092 deletions
Large diffs are not rendered by default.

example/app.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
},
2727
"assetBundlePatterns": [
2828
"**/*"
29-
]
29+
],
30+
"userInterfaceStyle": "automatic"
3031
}
3132
}

example/babel.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module.exports = function (api) {
1414
alias: {
1515
// For development, we want to alias the library to the source
1616
[pak.name]: path.join(__dirname, '..', pak.source),
17+
'react-native-vector-icons': '@expo/vector-icons',
1718
},
1819
},
1920
],

example/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@
1212
"test": "jest"
1313
},
1414
"dependencies": {
15-
"expo": "^50.0.8",
16-
"expo-splash-screen": "~0.26.4",
15+
"expo": "^50.0.19",
16+
"expo-splash-screen": "~0.26.5",
1717
"expo-status-bar": "~1.11.1",
1818
"react": "18.2.0",
1919
"react-dom": "18.2.0",
20-
"react-native": "0.73.4",
20+
"react-native": "0.73.6",
2121
"react-native-paper": "^5.12.3",
22-
"react-native-web": "~0.19.10"
22+
"react-native-web": "~0.19.12"
2323
},
2424
"devDependencies": {
25-
"@babel/core": "^7.24.0",
25+
"@babel/core": "^7.24.8",
2626
"@expo/webpack-config": "^19.0.1",
2727
"babel-loader": "^9.1.3",
28-
"babel-plugin-module-resolver": "^5.0.0"
28+
"babel-plugin-module-resolver": "^5.0.2"
2929
}
3030
}

example/src/App.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import * as React from 'react'
21
import {
32
StyleSheet,
43
ScrollView,
@@ -7,7 +6,6 @@ import {
76
Image,
87
useWindowDimensions,
98
useColorScheme,
10-
StatusBar,
119
} from 'react-native'
1210
import {
1311
SafeAreaProvider,
@@ -25,6 +23,7 @@ import {
2523
MD3DarkTheme,
2624
MD3LightTheme,
2725
MD2LightTheme,
26+
MD2DarkTheme,
2827
} from 'react-native-paper'
2928
import {
3029
DatePickerModal,
@@ -57,7 +56,9 @@ import {
5756
ja,
5857
th,
5958
} from 'react-native-paper-dates'
60-
import { useCallback, useState } from 'react'
59+
import { useCallback, useMemo, useState } from 'react'
60+
import React from 'react'
61+
import { StatusBar } from 'expo-status-bar'
6162

6263
const presentationStyles = ['overFullScreen', 'pageSheet'] as const
6364
const locales: [string, TranslationsType][] = [
@@ -124,7 +125,7 @@ function App({
124125

125126
/** Constants. */
126127
const maxFontSizeMultiplier = 1.5
127-
const dateFormatter = React.useMemo(
128+
const dateFormatter = useMemo(
128129
() =>
129130
new Intl.DateTimeFormat(locale, {
130131
day: 'numeric',
@@ -133,12 +134,12 @@ function App({
133134
}),
134135
[locale]
135136
)
136-
const timeFormatter = React.useMemo(
137+
const timeFormatter = useMemo(
137138
() =>
138139
new Intl.DateTimeFormat(locale, {
139140
hour: '2-digit',
140141
minute: '2-digit',
141-
hour12: false,
142+
hour12: locale === 'en',
142143
}),
143144
[locale]
144145
)
@@ -570,9 +571,9 @@ function App({
570571

571572
export default function AppWithProviders() {
572573
const colorScheme = useColorScheme()
573-
const [materialYouEnabled, setMaterialYouEnabled] = React.useState(true)
574+
const [materialYouEnabled, setMaterialYouEnabled] = useState(true)
574575
const m3Theme = colorScheme === 'dark' ? MD3DarkTheme : MD3LightTheme
575-
const m2Theme = colorScheme === 'dark' ? MD2LightTheme : MD2LightTheme
576+
const m2Theme = colorScheme === 'dark' ? MD2DarkTheme : MD2LightTheme
576577

577578
return (
578579
<SafeAreaProvider>

example/src/ReadMeExampleDatePickerInput.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import * as React from 'react'
2-
1+
import React from 'react'
2+
import { useState } from 'react'
33
import { DatePickerInput } from 'react-native-paper-dates'
44

55
export default function ReadMeExampleDatePickerInput() {
6-
const [inputDate, setInputDate] = React.useState<Date | undefined>(undefined)
6+
const [inputDate, setInputDate] = useState<Date | undefined>(undefined)
77

88
return (
99
<>

0 commit comments

Comments
 (0)