Skip to content

Commit f3a9424

Browse files
authored
Merge branch 'main' into fix-input-import-error
2 parents c84aacc + 384b5a7 commit f3a9424

File tree

6 files changed

+89
-118
lines changed

6 files changed

+89
-118
lines changed

example/src/AppRoot.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ import {
1414
DrawerContentScrollView,
1515
DrawerItem,
1616
} from "@react-navigation/drawer";
17-
import { createStackNavigator } from "@react-navigation/stack";
17+
import { useNavigation } from "@react-navigation/native";
18+
import {
19+
createStackNavigator,
20+
StackNavigationProp,
21+
} from "@react-navigation/stack";
1822

1923
import AboutScreen from "./pages/AboutScreen";
2024
import {
@@ -38,10 +42,11 @@ import {
3842
TextAreaScreen,
3943
TooltipScreen,
4044
} from "./modules";
45+
import { DrawerParamList, RootStackParamList } from "./types";
4146

42-
const Stack = createStackNavigator();
47+
const Stack = createStackNavigator<RootStackParamList>();
4348

44-
const Drawer = createDrawerNavigator();
49+
const Drawer = createDrawerNavigator<DrawerParamList>();
4550

4651
const CustomDrawerSection = (props: DrawerContentComponentProps) => {
4752
const { state, descriptors, navigation } = props;
@@ -102,8 +107,9 @@ const CustomDrawerSection = (props: DrawerContentComponentProps) => {
102107
);
103108
};
104109

105-
const ScreenOptions = ({ navigation }) => {
110+
const ScreenOptions = () => {
106111
const tailwind = useTheme();
112+
const navigation = useNavigation<StackNavigationProp<RootStackParamList>>();
107113
return {
108114
headerRight: () => (
109115
<Box style={tailwind.style("mr-2")}>

example/src/components/Background.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { useMemo } from "react";
22
import { Path, Pattern, Rect, Svg } from "react-native-svg";
33
import { useTheme } from "@adaptui/react-native-tailwind";
44

5-
const Background = props => {
5+
const Background = (props: any) => {
66
const tailwind = useTheme();
77
const { color, stroke, gap, transform } = props;
88
const { x, y, k } = transform || { x: 0, y: 0, k: 1 };

example/src/pages/AboutScreen.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,20 @@ import {
1010
Text,
1111
useTheme,
1212
} from "@adaptui/react-native-tailwind";
13+
import { useNavigation } from "@react-navigation/native";
14+
import { StackNavigationProp } from "@react-navigation/stack";
1315
import Constants from "expo-constants";
1416

1517
import Background from "../components/Background";
1618
import EasingLogo from "../components/EasingLogo";
19+
import { RootStackParamList } from "../types";
1720

18-
const AboutScreen = ({ navigation }) => {
21+
const AboutScreen = () => {
1922
const { bottom } = useSafeAreaInsets();
2023
const tailwind = useTheme();
2124

25+
const navigation = useNavigation<StackNavigationProp<RootStackParamList>>();
26+
2227
return (
2328
<Box style={tailwind.style("flex-1 mx-2 ")}>
2429
<Background color={tailwind.getColor("text-gray-300")} />
@@ -31,7 +36,7 @@ const AboutScreen = ({ navigation }) => {
3136
<EasingLogo />
3237
<Text style={tailwind.style("font-bold text-2xl")}>AdaptUI</Text>
3338
<Text style={tailwind.style("p-2 text-center")}>
34-
{Constants.manifest.description}
39+
{Constants.manifest?.description}
3540
</Text>
3641
<Text style={tailwind.style("font-medium")}>
3742
Made with 💖 by
@@ -88,7 +93,7 @@ const AboutScreen = ({ navigation }) => {
8893
</Box>
8994
</Box>
9095
<Text style={tailwind.style("font-medium pt-2")}>
91-
version: {Constants.manifest.version}(11)
96+
version: {Constants.manifest?.version}(11)
9297
</Text>
9398
</Box>
9499
</Box>

example/src/types.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
export type RootStackParamList = {
2+
About: undefined;
3+
Components: undefined;
4+
};
5+
6+
export type DrawerParamList = {
7+
AvatarScreen: undefined;
8+
AvatarGroupScreen: undefined;
9+
BadgeScreen: undefined;
10+
ButtonScreen: undefined;
11+
CheckboxScreen: undefined;
12+
CheckboxGroupScreen: undefined;
13+
CircularProgressScreen: undefined;
14+
DividerScreen: undefined;
15+
InputScreen: undefined;
16+
MeterComponentScreen: undefined;
17+
ProgressScreen: undefined;
18+
RadioComponentScreen: undefined;
19+
SelectScreen: undefined;
20+
SliderComponentScreen: undefined;
21+
SpinnerScreen: undefined;
22+
SwitchComponentScreen: undefined;
23+
TagScreen: undefined;
24+
TextAreaScreen: undefined;
25+
TooltipScreen: undefined;
26+
};

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@
8181
"@gorhom/bottom-sheet": "4.4.6",
8282
"@react-aria/focus": "^3.10.0",
8383
"@react-aria/visually-hidden": "^3.6.0",
84-
"@react-native-aria/checkbox": "^0.2.3",
85-
"@react-stately/toggle": "^3.3.0",
84+
"@react-stately/toggle": "^3.6.0",
85+
"@react-stately/checkbox": "^3.4.3",
8686
"lodash": "^4.17.21",
8787
"react-native-popper": "^0.3.2",
8888
"tailwind-merge": "^1.10.0",

yarn.lock

Lines changed: 42 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -2044,20 +2044,6 @@
20442044
"@pnpm/network.ca-file" "^1.0.1"
20452045
config-chain "^1.1.11"
20462046

2047-
"@react-aria/checkbox@^3.2.1":
2048-
version "3.7.1"
2049-
resolved "https://registry.yarnpkg.com/@react-aria/checkbox/-/checkbox-3.7.1.tgz#217ea3173ad37ae85cb39bcb9932eb5c1cde2e0b"
2050-
integrity sha512-3KRg/KrTRwQdw5Yg7gpbIKWWVt57PbGSEXAS/diQvRf9pTXbOuChTES8uVlcwF8q+3mKXc4ppzE3gsNQ5jOMqg==
2051-
dependencies:
2052-
"@react-aria/label" "^3.4.4"
2053-
"@react-aria/toggle" "^3.4.2"
2054-
"@react-aria/utils" "^3.14.2"
2055-
"@react-stately/checkbox" "^3.3.2"
2056-
"@react-stately/toggle" "^3.4.4"
2057-
"@react-types/checkbox" "^3.4.1"
2058-
"@react-types/shared" "^3.16.0"
2059-
"@swc/helpers" "^0.4.14"
2060-
20612047
"@react-aria/focus@^3.10.0", "@react-aria/focus@^3.10.1", "@react-aria/focus@^3.2.3":
20622048
version "3.10.1"
20632049
resolved "https://registry.yarnpkg.com/@react-aria/focus/-/focus-3.10.1.tgz#624d02d2565151030a4156aeb17685d87f18ad58"
@@ -2092,16 +2078,6 @@
20922078
"@react-types/shared" "^3.16.0"
20932079
"@swc/helpers" "^0.4.14"
20942080

2095-
"@react-aria/label@^3.4.4":
2096-
version "3.4.4"
2097-
resolved "https://registry.yarnpkg.com/@react-aria/label/-/label-3.4.4.tgz#b891d3cebeeffc7a1413a492d8a694083dc3253e"
2098-
integrity sha512-1fuYf2UctNhBy31uYN7OhdcrwzlB5GS0+C49gDkwWzccB7yr+CoOJ5UQUoVB7WBmzrc+CuzwWxSDd4OupSYIZQ==
2099-
dependencies:
2100-
"@react-aria/utils" "^3.14.2"
2101-
"@react-types/label" "^3.7.1"
2102-
"@react-types/shared" "^3.16.0"
2103-
"@swc/helpers" "^0.4.14"
2104-
21052081
"@react-aria/overlays@^3.7.0":
21062082
version "3.12.1"
21072083
resolved "https://registry.yarnpkg.com/@react-aria/overlays/-/overlays-3.12.1.tgz#429fe33b0da7b920334f241c688d73dc9a750a28"
@@ -2126,21 +2102,7 @@
21262102
dependencies:
21272103
"@swc/helpers" "^0.4.14"
21282104

2129-
"@react-aria/toggle@^3.4.2":
2130-
version "3.4.2"
2131-
resolved "https://registry.yarnpkg.com/@react-aria/toggle/-/toggle-3.4.2.tgz#1c57539a26722219979c80dcebfbd0701c518789"
2132-
integrity sha512-xokCGf0fn96mOMqQku5QW672iQoMsN9RMpFbKvvgg2seceh8ifblyAXElWf/6YmluOZSgUSZljDkFrbMMYlzVA==
2133-
dependencies:
2134-
"@react-aria/focus" "^3.10.1"
2135-
"@react-aria/interactions" "^3.13.1"
2136-
"@react-aria/utils" "^3.14.2"
2137-
"@react-stately/toggle" "^3.4.4"
2138-
"@react-types/checkbox" "^3.4.1"
2139-
"@react-types/shared" "^3.16.0"
2140-
"@react-types/switch" "^3.2.5"
2141-
"@swc/helpers" "^0.4.14"
2142-
2143-
"@react-aria/utils@^3.14.2", "@react-aria/utils@^3.3.0", "@react-aria/utils@^3.6.0":
2105+
"@react-aria/utils@^3.14.2", "@react-aria/utils@^3.3.0":
21442106
version "3.14.2"
21452107
resolved "https://registry.yarnpkg.com/@react-aria/utils/-/utils-3.14.2.tgz#3a8d0d14abab4bb1095e101ee44dc5e3e43e6217"
21462108
integrity sha512-3nr5gsAf/J/W+6Tu4NF3Q7m+1mXjfpXESh7TPa6UR6v3tVDTsJVMrITg2BkHN1jM8xELcl2ZxyUffOWqOXzWuA==
@@ -2162,33 +2124,13 @@
21622124
"@swc/helpers" "^0.4.14"
21632125
clsx "^1.1.1"
21642126

2165-
"@react-native-aria/checkbox@^0.2.3":
2166-
version "0.2.3"
2167-
resolved "https://registry.yarnpkg.com/@react-native-aria/checkbox/-/checkbox-0.2.3.tgz#b6c99c215677df872f1bb4e596b54573f1c7a5f0"
2168-
integrity sha512-YtWtXGg5tvOaV6v1CmbusXoOZvGRAVYygms9qNeUF7/B8/iDNGSKjlxHE5LVOLRtJO/B9ndZnr6RkL326ceyng==
2169-
dependencies:
2170-
"@react-aria/checkbox" "^3.2.1"
2171-
"@react-aria/utils" "^3.6.0"
2172-
"@react-native-aria/toggle" "^0.2.3"
2173-
"@react-native-aria/utils" "^0.2.6"
2174-
"@react-stately/toggle" "^3.2.1"
2175-
21762127
"@react-native-aria/focus@^0.2.5":
21772128
version "0.2.7"
21782129
resolved "https://registry.yarnpkg.com/@react-native-aria/focus/-/focus-0.2.7.tgz#fd339d5ec8384cee6afe0c0115a528f360d04a27"
21792130
integrity sha512-7Ol8AoTzEN7qC4t4AzclPzjQZ0oRkNBePmVBm2lAQwOnmkKwa+TdiVGtU7MgvsQxUV3aTTMY2Nu1Z5YwCwhUkA==
21802131
dependencies:
21812132
"@react-aria/focus" "^3.2.3"
21822133

2183-
"@react-native-aria/interactions@^0.2.3":
2184-
version "0.2.8"
2185-
resolved "https://registry.yarnpkg.com/@react-native-aria/interactions/-/interactions-0.2.8.tgz#5ced4bd3391c647699fa79275472f784a44c2488"
2186-
integrity sha512-+LsLghBnp1fEVdLdIZGfE2izbZS0GPwc7eyiLHndnAXwXdLmyDRw71UCEjsUuNh7SO7BBR5QjHlk0cTHmyynQg==
2187-
dependencies:
2188-
"@react-aria/interactions" "^3.3.2"
2189-
"@react-aria/utils" "^3.6.0"
2190-
"@react-native-aria/utils" "^0.2.6"
2191-
21922134
"@react-native-aria/overlays@^0.3.1":
21932135
version "0.3.3"
21942136
resolved "https://registry.yarnpkg.com/@react-native-aria/overlays/-/overlays-0.3.3.tgz#52c45a43cd4620cd20c3dda8fc7560a807949373"
@@ -2201,19 +2143,7 @@
22012143
"@react-types/overlays" "^3.4.0"
22022144
dom-helpers "^5.0.0"
22032145

2204-
"@react-native-aria/toggle@^0.2.3":
2205-
version "0.2.3"
2206-
resolved "https://registry.yarnpkg.com/@react-native-aria/toggle/-/toggle-0.2.3.tgz#a387f03480aa0d97dc0191acbcae66122f7bcf7f"
2207-
integrity sha512-3aOlchMxpR0b2h3Z7V0aYZaQMVJD6uKOWKWJm82VsLrni4iDnDX/mLv30ujuuK3+LclUhVlJd2kRuCl+xnf3XQ==
2208-
dependencies:
2209-
"@react-aria/focus" "^3.2.3"
2210-
"@react-aria/utils" "^3.6.0"
2211-
"@react-native-aria/interactions" "^0.2.3"
2212-
"@react-native-aria/utils" "^0.2.6"
2213-
"@react-stately/toggle" "^3.2.1"
2214-
"@react-types/checkbox" "^3.2.1"
2215-
2216-
"@react-native-aria/utils@^0.2.6", "@react-native-aria/utils@^0.2.8":
2146+
"@react-native-aria/utils@^0.2.8":
22172147
version "0.2.8"
22182148
resolved "https://registry.yarnpkg.com/@react-native-aria/utils/-/utils-0.2.8.tgz#da433606506125483080f18dbcd97b526ca46fd5"
22192149
integrity sha512-x375tG1itv3irLFRnURLsdK2djuvhFJHizSDUtLCo8skQwfjslED5t4sUkQ49di4G850gaVJz0fCcCx/pHX7CA==
@@ -2422,16 +2352,16 @@
24222352
resolved "https://registry.yarnpkg.com/@react-native/polyfills/-/polyfills-2.0.0.tgz#4c40b74655c83982c8cf47530ee7dc13d957b6aa"
24232353
integrity sha512-K0aGNn1TjalKj+65D7ycc1//H9roAQ51GJVk5ZJQFb2teECGmzd86bYDC0aYdbRf7gtovescq4Zt6FR0tgXiHQ==
24242354

2425-
"@react-stately/checkbox@^3.3.2":
2426-
version "3.3.2"
2427-
resolved "https://registry.yarnpkg.com/@react-stately/checkbox/-/checkbox-3.3.2.tgz#fd81866a7624c79cab2ec2c32234f164205a85e8"
2428-
integrity sha512-eU3zvWgQrcqS8UK8ZVkb3fMP816PeuN9N0/dOJKuOXXhkoLPuxtuja1oEqKU3sFMa5+bx3czZhhNIRpr60NAdw==
2355+
"@react-stately/checkbox@^3.4.3":
2356+
version "3.4.3"
2357+
resolved "https://registry.yarnpkg.com/@react-stately/checkbox/-/checkbox-3.4.3.tgz#ffbf8109ca903e502a1e42cf0863e22c8f75c07e"
2358+
integrity sha512-TEd50vrUTHZWt8qO7ySLG2MlWJbsCvyx+pA1VhLJw6hRfjqorAjmCcpV2sEdu3EkLG7hA/Jw+7iBmGPlxmBN6A==
24292359
dependencies:
2430-
"@react-stately/toggle" "^3.4.4"
2431-
"@react-stately/utils" "^3.5.2"
2432-
"@react-types/checkbox" "^3.4.1"
2433-
"@react-types/shared" "^3.16.0"
2434-
"@swc/helpers" "^0.4.14"
2360+
"@react-stately/toggle" "^3.6.0"
2361+
"@react-stately/utils" "^3.7.0"
2362+
"@react-types/checkbox" "^3.4.4"
2363+
"@react-types/shared" "^3.18.1"
2364+
"@swc/helpers" "^0.5.0"
24352365

24362366
"@react-stately/overlays@^3.1.1", "@react-stately/overlays@^3.4.4":
24372367
version "3.4.4"
@@ -2442,15 +2372,15 @@
24422372
"@react-types/overlays" "^3.6.5"
24432373
"@swc/helpers" "^0.4.14"
24442374

2445-
"@react-stately/toggle@^3.2.1", "@react-stately/toggle@^3.3.0", "@react-stately/toggle@^3.4.4":
2446-
version "3.4.4"
2447-
resolved "https://registry.yarnpkg.com/@react-stately/toggle/-/toggle-3.4.4.tgz#b7825bf900725dcee0444fe6132b06948be36b44"
2448-
integrity sha512-OwVJpd2M7P7fekTWpl3TUdD3Brq+Z/xElOCJYP5QuVytXCa5seKsk40YPld8JQnA5dRKojpbUxMDOJpb6hOOfw==
2375+
"@react-stately/toggle@^3.6.0":
2376+
version "3.6.0"
2377+
resolved "https://registry.yarnpkg.com/@react-stately/toggle/-/toggle-3.6.0.tgz#d1cd5a316ee1ee23003c2ed950816b8d314239fe"
2378+
integrity sha512-w+Aqh78H9MLs0FDUYTjAzYhrHQWaDJ2zWjyg2oYcSvERES0+D0obmPvtJLWsFrJ8fHJrTmxd7ezVFBY9BbPeFQ==
24492379
dependencies:
2450-
"@react-stately/utils" "^3.5.2"
2451-
"@react-types/checkbox" "^3.4.1"
2452-
"@react-types/shared" "^3.16.0"
2453-
"@swc/helpers" "^0.4.14"
2380+
"@react-stately/utils" "^3.7.0"
2381+
"@react-types/checkbox" "^3.4.4"
2382+
"@react-types/shared" "^3.18.1"
2383+
"@swc/helpers" "^0.5.0"
24542384

24552385
"@react-stately/utils@^3.5.2":
24562386
version "3.5.2"
@@ -2459,26 +2389,26 @@
24592389
dependencies:
24602390
"@swc/helpers" "^0.4.14"
24612391

2392+
"@react-stately/utils@^3.7.0":
2393+
version "3.7.0"
2394+
resolved "https://registry.yarnpkg.com/@react-stately/utils/-/utils-3.7.0.tgz#ea99c2c4b5fba7e5079434a1de1ef53fbb21f6a8"
2395+
integrity sha512-VbApRiUV2rhozOfk0Qj9xt0qjVbQfLTgAzXLdrfeZSBnyIgo1bFRnjDpnDZKZUUCeGQcJJI03I9niaUtY+kwJQ==
2396+
dependencies:
2397+
"@swc/helpers" "^0.5.0"
2398+
24622399
"@react-types/button@^3.7.0":
24632400
version "3.7.0"
24642401
resolved "https://registry.yarnpkg.com/@react-types/button/-/button-3.7.0.tgz#774c043d8090a505e60fdf26f026d5f0cc968f0f"
24652402
integrity sha512-81BQO3QxSgF9PTXsVozNdNCKxBOB1lpbCWocV99dN1ws9s8uaYw8pmJJZ0LJKLiOsIECQ/3QrhQjmWTDW/qTug==
24662403
dependencies:
24672404
"@react-types/shared" "^3.16.0"
24682405

2469-
"@react-types/checkbox@^3.2.1", "@react-types/checkbox@^3.4.1":
2470-
version "3.4.1"
2471-
resolved "https://registry.yarnpkg.com/@react-types/checkbox/-/checkbox-3.4.1.tgz#75a78b3f21f4cc72d2382761ba4c326aefd699db"
2472-
integrity sha512-kDMpy9SntjGQ7x00m5zmW8GENPouOtyiDgiEDKsPXUr2iYqHsNtricqVyG9S9+6hqpzuu8BzTcvZamc/xYjzlg==
2406+
"@react-types/checkbox@^3.4.4":
2407+
version "3.4.4"
2408+
resolved "https://registry.yarnpkg.com/@react-types/checkbox/-/checkbox-3.4.4.tgz#cf55e9fd0cabef6e4408d03b308c754e1add3bc1"
2409+
integrity sha512-rJNhbW4R9HTvdbF2oTZmqGiZ/WVP3/XsU4gae7tfdhSYjG+5T5h9zau1vRhz++zwKn57wfcyNn6a83GDhhgkVw==
24732410
dependencies:
2474-
"@react-types/shared" "^3.16.0"
2475-
2476-
"@react-types/label@^3.7.1":
2477-
version "3.7.1"
2478-
resolved "https://registry.yarnpkg.com/@react-types/label/-/label-3.7.1.tgz#ad4d3d7a6b5ea6aca70f89661d7c358cf2ab5f94"
2479-
integrity sha512-wFpdtjSDBWO4xQQGF57V3PqvVVyE9TPj9ELWLs1yzL09fpXosycuEl5d79RywVlC9aF9dQYUfES09q/DZhRhMQ==
2480-
dependencies:
2481-
"@react-types/shared" "^3.16.0"
2411+
"@react-types/shared" "^3.18.1"
24822412

24832413
"@react-types/overlays@^3.4.0", "@react-types/overlays@^3.6.5":
24842414
version "3.6.5"
@@ -2492,13 +2422,10 @@
24922422
resolved "https://registry.yarnpkg.com/@react-types/shared/-/shared-3.16.0.tgz#cab7bf0376969d1773480ecb2d6da5aa91391db5"
24932423
integrity sha512-IQgU4oAEvMwylEvaTsr2XB1G/mAoMe1JFYLD6G78v++oAR9l8o9MQxZ0YSeANDkqTamb2gKezGoT1RxvSKjVxw==
24942424

2495-
"@react-types/switch@^3.2.5":
2496-
version "3.2.5"
2497-
resolved "https://registry.yarnpkg.com/@react-types/switch/-/switch-3.2.5.tgz#e1db722e8beeed846cfcf9de94cad81b4e0ead78"
2498-
integrity sha512-DlUL0Bz79SUTRje/i8m6qn4Ipn+q8QnyIkyJhkoHeH1R0YNude8xZrBPWbj3zfdddAGDFSF1NzP69q0xmNAcTQ==
2499-
dependencies:
2500-
"@react-types/checkbox" "^3.4.1"
2501-
"@react-types/shared" "^3.16.0"
2425+
"@react-types/shared@^3.18.1":
2426+
version "3.18.1"
2427+
resolved "https://registry.yarnpkg.com/@react-types/shared/-/shared-3.18.1.tgz#45bac7a1a433916d16535ea583d86a2b4c72ff8c"
2428+
integrity sha512-OpTYRFS607Ctfd6Tmhyk6t6cbFyDhO5K+etU35X50pMzpypo1b7vF0mkngEeTc0Xwl0e749ONZNPZskMyu5k8w==
25022429

25032430
"@release-it/[email protected]":
25042431
version "5.0.0"
@@ -2581,6 +2508,13 @@
25812508
dependencies:
25822509
tslib "^2.4.0"
25832510

2511+
"@swc/helpers@^0.5.0":
2512+
version "0.5.1"
2513+
resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.1.tgz#e9031491aa3f26bfcc974a67f48bd456c8a5357a"
2514+
integrity sha512-sJ902EfIzn1Fa+qYmjdQqh8tPsoxyBz+8yBKC2HKUxyezKJFwPGOn7pv4WY6QuQW//ySQi5lJjA/ZT9sNWWNTg==
2515+
dependencies:
2516+
tslib "^2.4.0"
2517+
25842518
"@szmarczak/http-timer@^1.1.2":
25852519
version "1.1.2"
25862520
resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421"

0 commit comments

Comments
 (0)