@mr.dj2u/library-registry 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +42 -0
- package/THIRD_PARTY_NOTICES.md +90 -0
- package/assets/create-expo-app/sdk-56/assets/images/expo-badge-white.png +0 -0
- package/assets/create-expo-app/sdk-56/assets/images/expo-badge.png +0 -0
- package/assets/create-expo-app/sdk-56/assets/images/expo-logo.png +0 -0
- package/assets/create-expo-app/sdk-56/assets/images/logo-glow.png +0 -0
- package/assets/create-expo-app/sdk-56/assets/images/react-logo.png +0 -0
- package/assets/create-expo-app/sdk-56/assets/images/react-logo@2x.png +0 -0
- package/assets/create-expo-app/sdk-56/assets/images/react-logo@3x.png +0 -0
- package/assets/create-expo-app/sdk-56/assets/images/tabIcons/explore.png +0 -0
- package/assets/create-expo-app/sdk-56/assets/images/tabIcons/explore@2x.png +0 -0
- package/assets/create-expo-app/sdk-56/assets/images/tabIcons/explore@3x.png +0 -0
- package/assets/create-expo-app/sdk-56/assets/images/tabIcons/home.png +0 -0
- package/assets/create-expo-app/sdk-56/assets/images/tabIcons/home@2x.png +0 -0
- package/assets/create-expo-app/sdk-56/assets/images/tabIcons/home@3x.png +0 -0
- package/assets/create-expo-app/sdk-56/assets/images/tutorial-web.png +0 -0
- package/assets/create-expo-app/sdk-56/src/app/_layout.tsx +15 -0
- package/assets/create-expo-app/sdk-56/src/app/explore.tsx +180 -0
- package/assets/create-expo-app/sdk-56/src/app/index.tsx +98 -0
- package/assets/create-expo-app/sdk-56/src/components/animated-icon.module.css +6 -0
- package/assets/create-expo-app/sdk-56/src/components/animated-icon.tsx +132 -0
- package/assets/create-expo-app/sdk-56/src/components/animated-icon.web.tsx +108 -0
- package/assets/create-expo-app/sdk-56/src/components/app-tabs.tsx +32 -0
- package/assets/create-expo-app/sdk-56/src/components/app-tabs.web.tsx +115 -0
- package/assets/create-expo-app/sdk-56/src/components/external-link.tsx +25 -0
- package/assets/create-expo-app/sdk-56/src/components/hint-row.tsx +35 -0
- package/assets/create-expo-app/sdk-56/src/components/themed-text.tsx +73 -0
- package/assets/create-expo-app/sdk-56/src/components/themed-view.tsx +16 -0
- package/assets/create-expo-app/sdk-56/src/components/ui/collapsible.tsx +65 -0
- package/assets/create-expo-app/sdk-56/src/components/web-badge.tsx +43 -0
- package/assets/create-expo-app/sdk-56/src/constants/theme.ts +65 -0
- package/assets/create-expo-app/sdk-56/src/global.css +9 -0
- package/assets/create-expo-app/sdk-56/src/hooks/use-color-scheme.ts +1 -0
- package/assets/create-expo-app/sdk-56/src/hooks/use-color-scheme.web.ts +21 -0
- package/assets/create-expo-app/sdk-56/src/hooks/use-theme.ts +14 -0
- package/assets/create-expo-stack/2.21.3/base/components/BackButton.tsx +23 -0
- package/assets/create-expo-stack/2.21.3/base/components/Button.tsx +42 -0
- package/assets/create-expo-stack/2.21.3/base/components/Container.tsx +14 -0
- package/assets/create-expo-stack/2.21.3/base/components/EditScreenInfo.tsx +36 -0
- package/assets/create-expo-stack/2.21.3/base/components/HeaderButton.tsx +31 -0
- package/assets/create-expo-stack/2.21.3/base/components/ScreenContent.tsx +40 -0
- package/assets/create-expo-stack/2.21.3/base/components/TabBarIcon.tsx +15 -0
- package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/ActivityIndicator.tsx +10 -0
- package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/Avatar.tsx +32 -0
- package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/Button.tsx +141 -0
- package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/DatePicker/DatePicker.android.tsx +77 -0
- package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/DatePicker/DatePicker.tsx +23 -0
- package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/DatePicker/index.ts +1 -0
- package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/Icon/Icon.ios.tsx +55 -0
- package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/Icon/Icon.tsx +58 -0
- package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/Icon/index.ts +16 -0
- package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/Icon/types.ts +19 -0
- package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/Picker.tsx +42 -0
- package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/ProgressIndicator.tsx +68 -0
- package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/Slider.tsx +28 -0
- package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/Text.tsx +55 -0
- package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/ThemeToggle.tsx +33 -0
- package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/Toggle.tsx +20 -0
- package/assets/create-expo-stack/2.21.3-mrdj.2/src/lib/cn.ts +6 -0
- package/assets/create-expo-stack/2.21.3-mrdj.2/src/lib/useColorScheme.tsx +21 -0
- package/assets/create-expo-stack/2.21.3-mrdj.2/src/lib/useHeaderSearchBar.tsx +33 -0
- package/assets/create-expo-stack/2.21.3-mrdj.2/src/theme/colors.ts +123 -0
- package/assets/create-expo-stack/2.21.3-mrdj.2/src/theme/index.ts +32 -0
- package/assets/create-expo-stack/2.21.3-mrdj.2/src/theme/with-opacity.ts +155 -0
- package/assets/mds/routes/drawer-tabs/data.tsx +1 -0
- package/assets/mds/routes/drawer-tabs/index.tsx +1 -0
- package/assets/mds/routes/drawer-tabs/nativewindui.tsx +1 -0
- package/assets/mds/routes/drawer-tabs/sdk-56.tsx +1 -0
- package/assets/mds/routes/drawer-tabs/stylist.tsx +1 -0
- package/assets/mds/scripts/stylist-sync-android.mjs +39 -0
- package/assets/mds/src/app/exposition/data.tsx +1 -0
- package/assets/mds/src/app/exposition/index.tsx +1 -0
- package/assets/mds/src/app/exposition/nativewindui.tsx +1 -0
- package/assets/mds/src/app/exposition/sdk-56.tsx +1 -0
- package/assets/mds/src/app/exposition/stylist-sync+api.ts +241 -0
- package/assets/mds/src/app/exposition/stylist.tsx +1 -0
- package/assets/mds/src/app/onboarding/account-setup.tsx +1 -0
- package/assets/mds/src/app/onboarding/agreement.tsx +1 -0
- package/assets/mds/src/app/onboarding/terms.tsx +1 -0
- package/assets/mds/src/app/onboarding.tsx +1 -0
- package/assets/mds/src/app/settings.tsx +1 -0
- package/assets/mds/src/components/exposition/index.ts +8 -0
- package/assets/mds/src/components/exposition/notice.tsx +3 -0
- package/assets/mds/src/components/exposition/package-card.tsx +76 -0
- package/assets/mds/src/components/swmansion/animated-pressable.tsx +54 -0
- package/assets/mds/src/components/swmansion/gesture-card.tsx +54 -0
- package/assets/mds/src/components/swmansion/keyboard-form.tsx +73 -0
- package/assets/mds/src/components/swmansion/screens-card.tsx +40 -0
- package/assets/mds/src/components/swmansion/software-mansion-logo.tsx +15 -0
- package/assets/mds/src/components/swmansion/svg-mark.tsx +16 -0
- package/assets/mds/src/data/mock-app.ts +21 -0
- package/assets/mds/src/features/exposition/data-screen.tsx +152 -0
- package/assets/mds/src/features/exposition/embedded-fonts.ts +72 -0
- package/assets/mds/src/features/exposition/expo-sdk-56-screen.tsx +709 -0
- package/assets/mds/src/features/exposition/exposition-screen.tsx +191 -0
- package/assets/mds/src/features/exposition/nativewindui-screen.tsx +125 -0
- package/assets/mds/src/features/exposition/stylist-screen.tsx +3456 -0
- package/assets/mds/src/features/onboarding/account-setup-screen.tsx +54 -0
- package/assets/mds/src/features/onboarding/agreement-screen.tsx +6 -0
- package/assets/mds/src/features/onboarding/components/legal-document-view.tsx +103 -0
- package/assets/mds/src/features/onboarding/legal-documents.ts +80 -0
- package/assets/mds/src/features/onboarding/onboarding-screen.tsx +167 -0
- package/assets/mds/src/features/onboarding/terms-screen.tsx +6 -0
- package/assets/mds/src/features/settings/settings-screen.tsx +57 -0
- package/assets/mds/src/services/local-data.native.ts +103 -0
- package/assets/mds/src/services/local-data.ts +38 -0
- package/assets/mds/src/theme/font-assets.ts +3 -0
- package/assets/mds/src/theme/provider.tsx +59 -0
- package/assets/mds/src/theme/tokens.ts +180 -0
- package/dist/catalog.d.ts +3 -0
- package/dist/catalog.d.ts.map +1 -0
- package/dist/catalog.js +1110 -0
- package/dist/catalog.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/registry.d.ts +7 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +479 -0
- package/dist/registry.js.map +1 -0
- package/dist/types.d.ts +169 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/validation.d.ts +6 -0
- package/dist/validation.d.ts.map +1 -0
- package/dist/validation.js +209 -0
- package/dist/validation.js.map +1 -0
- package/package.json +51 -0
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { Linking, Platform, ScrollView, StyleSheet, Text, View } from 'react-native';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
AnimatedPressable,
|
|
5
|
+
ExpositionNotice,
|
|
6
|
+
GestureCard,
|
|
7
|
+
KeyboardForm,
|
|
8
|
+
PackageCard,
|
|
9
|
+
ScreensCard,
|
|
10
|
+
SoftwareMansionLogo,
|
|
11
|
+
} from '../../components/exposition';
|
|
12
|
+
import { useAppTheme } from '../../theme/provider';
|
|
13
|
+
|
|
14
|
+
export default function ExpositionScreen() {
|
|
15
|
+
const theme = useAppTheme();
|
|
16
|
+
const colors = theme.activeColors;
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<ScrollView
|
|
20
|
+
contentInsetAdjustmentBehavior="automatic"
|
|
21
|
+
contentContainerStyle={styles.content}
|
|
22
|
+
style={[styles.screen, { backgroundColor: colors.background }]}>
|
|
23
|
+
<Text
|
|
24
|
+
style={[
|
|
25
|
+
styles.title,
|
|
26
|
+
{
|
|
27
|
+
color: colors.text,
|
|
28
|
+
fontFamily: theme.typography.fontFamily,
|
|
29
|
+
fontWeight:
|
|
30
|
+
theme.typography.fontFamily === 'System' ||
|
|
31
|
+
theme.typography.fontFamily === 'monospace'
|
|
32
|
+
? '800'
|
|
33
|
+
: 'normal',
|
|
34
|
+
},
|
|
35
|
+
]}>
|
|
36
|
+
Package Exposition
|
|
37
|
+
</Text>
|
|
38
|
+
<Text style={[styles.intro, { color: colors.text }]}>
|
|
39
|
+
Browse the included Software Mansion packages, then keep only what your app needs.
|
|
40
|
+
</Text>
|
|
41
|
+
<ExpositionNotice />
|
|
42
|
+
<PackageCard
|
|
43
|
+
packageName="reanimated-color-picker"
|
|
44
|
+
title="Stylist color editing"
|
|
45
|
+
body="Stylist uses this package for the hue slider, color preview, and manual palette picker that writes theme tokens.">
|
|
46
|
+
<Text
|
|
47
|
+
style={styles.link}
|
|
48
|
+
onPress={() => Linking.openURL('https://github.com/alabsi91/reanimated-color-picker')}>
|
|
49
|
+
Reanimated Color Picker
|
|
50
|
+
</Text>
|
|
51
|
+
</PackageCard>
|
|
52
|
+
<PackageCard
|
|
53
|
+
packageName="@react-native-async-storage/async-storage"
|
|
54
|
+
title="Stylist local preferences"
|
|
55
|
+
body="Stylist stores local-only preferences such as the Google Fonts API key, dismissed banners, and editor settings with Async Storage.">
|
|
56
|
+
<Text
|
|
57
|
+
style={styles.link}
|
|
58
|
+
onPress={() =>
|
|
59
|
+
Linking.openURL('https://react-native-async-storage.github.io/async-storage/')
|
|
60
|
+
}>
|
|
61
|
+
Async Storage Docs
|
|
62
|
+
</Text>
|
|
63
|
+
</PackageCard>
|
|
64
|
+
<PackageCard
|
|
65
|
+
packageName="react-native-safe-area-context"
|
|
66
|
+
title="Stylist safe spacing"
|
|
67
|
+
body="Stylist reads safe-area insets so editor controls stay clear of cutouts, native tabs, and device navigation areas.">
|
|
68
|
+
<Text
|
|
69
|
+
style={styles.link}
|
|
70
|
+
onPress={() =>
|
|
71
|
+
Linking.openURL('https://docs.expo.dev/versions/latest/sdk/safe-area-context/')
|
|
72
|
+
}>
|
|
73
|
+
Expo SDK - SafeAreaContext
|
|
74
|
+
</Text>
|
|
75
|
+
</PackageCard>
|
|
76
|
+
<PackageCard
|
|
77
|
+
packageName="tailwindcss/colors"
|
|
78
|
+
title="Stylist palette families"
|
|
79
|
+
body="Stylist uses Tailwind color families and shade scales to drive the palette-family mode and accessible token previews.">
|
|
80
|
+
<Text
|
|
81
|
+
style={styles.link}
|
|
82
|
+
onPress={() => Linking.openURL('https://tailwindcss.com/docs/customizing-colors')}>
|
|
83
|
+
Tailwind CSS - Colors
|
|
84
|
+
</Text>
|
|
85
|
+
</PackageCard>
|
|
86
|
+
<PackageCard
|
|
87
|
+
packageName="expo-router API routes"
|
|
88
|
+
title="Stylist sync endpoint"
|
|
89
|
+
body="Stylist uses an Expo Router +api route so both native and web can sync theme output files by calling /exposition/stylist-sync.">
|
|
90
|
+
<Text
|
|
91
|
+
style={styles.link}
|
|
92
|
+
onPress={() => Linking.openURL('https://docs.expo.dev/router/web/api-routes/')}>
|
|
93
|
+
Expo Router - API Routes
|
|
94
|
+
</Text>
|
|
95
|
+
</PackageCard>
|
|
96
|
+
<PackageCard
|
|
97
|
+
packageName="react-native-reanimated + react-native-worklets"
|
|
98
|
+
title="Motion that feels native"
|
|
99
|
+
body="Press the button to see the Reanimated timing demo. Worklets make this kind of UI-thread animation possible.">
|
|
100
|
+
<AnimatedPressable label="Press and hold" />
|
|
101
|
+
<Text
|
|
102
|
+
style={styles.link}
|
|
103
|
+
onPress={() => Linking.openURL('https://docs.swmansion.com/react-native-reanimated')}>
|
|
104
|
+
Software Mansion - Reanimated
|
|
105
|
+
</Text>
|
|
106
|
+
</PackageCard>
|
|
107
|
+
<PackageCard
|
|
108
|
+
packageName="react-native-gesture-handler"
|
|
109
|
+
title="Gesture-first interactions"
|
|
110
|
+
body="Drag the card below. If your product does not need touch-heavy interactions, this demo helps you decide what to remove.">
|
|
111
|
+
<GestureCard title="Drag me" body="This card springs back when the gesture ends." />
|
|
112
|
+
<Text
|
|
113
|
+
style={styles.link}
|
|
114
|
+
onPress={() =>
|
|
115
|
+
Linking.openURL('https://docs.swmansion.com/react-native-gesture-handler')
|
|
116
|
+
}>
|
|
117
|
+
Software Mansion - Gesture Handler
|
|
118
|
+
</Text>
|
|
119
|
+
</PackageCard>
|
|
120
|
+
<PackageCard
|
|
121
|
+
packageName="react-native-screens"
|
|
122
|
+
title="Native navigation primitives"
|
|
123
|
+
body="Screens support the navigation layer with native lifecycle and memory behavior.">
|
|
124
|
+
<ScreensCard />
|
|
125
|
+
<Text
|
|
126
|
+
style={styles.link}
|
|
127
|
+
onPress={() => Linking.openURL('https://docs.swmansion.com/react-native-screens')}>
|
|
128
|
+
Software Mansion - Screens
|
|
129
|
+
</Text>
|
|
130
|
+
</PackageCard>
|
|
131
|
+
<PackageCard
|
|
132
|
+
packageName="react-native-svg"
|
|
133
|
+
title="Portable vector UI"
|
|
134
|
+
body="Use SVG for marks, badges, charts, and vector states that need to scale cleanly.">
|
|
135
|
+
<View style={styles.svgDemo}>
|
|
136
|
+
<SoftwareMansionLogo width={150} height={80} />
|
|
137
|
+
</View>
|
|
138
|
+
<Text
|
|
139
|
+
style={styles.link}
|
|
140
|
+
onPress={() => Linking.openURL('https://docs.expo.dev/versions/latest/sdk/svg')}>
|
|
141
|
+
Expo SDK - SVG
|
|
142
|
+
</Text>
|
|
143
|
+
</PackageCard>
|
|
144
|
+
<PackageCard
|
|
145
|
+
packageName="react-native-keyboard-controller"
|
|
146
|
+
title="Keyboard-heavy screens"
|
|
147
|
+
body="Use this when forms, chat, notes, or auth flows need better keyboard control than manual offsets.">
|
|
148
|
+
<KeyboardForm />
|
|
149
|
+
<Text
|
|
150
|
+
style={styles.link}
|
|
151
|
+
onPress={() =>
|
|
152
|
+
Linking.openURL('https://kirillzyusko.github.io/react-native-keyboard-controller/')
|
|
153
|
+
}>
|
|
154
|
+
Kirill Zyusko - Keyboard Controller
|
|
155
|
+
</Text>
|
|
156
|
+
</PackageCard>
|
|
157
|
+
</ScrollView>
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
const styles = StyleSheet.create({
|
|
162
|
+
screen: {
|
|
163
|
+
backgroundColor: '#f9fafb',
|
|
164
|
+
flex: 1,
|
|
165
|
+
},
|
|
166
|
+
content: {
|
|
167
|
+
gap: 16,
|
|
168
|
+
padding: 20,
|
|
169
|
+
paddingTop: Platform.OS === 'web' ? 92 : 20,
|
|
170
|
+
},
|
|
171
|
+
title: {
|
|
172
|
+
color: '#111827',
|
|
173
|
+
fontSize: 30,
|
|
174
|
+
fontWeight: '900',
|
|
175
|
+
},
|
|
176
|
+
intro: {
|
|
177
|
+
color: '#4b5563',
|
|
178
|
+
fontSize: 16,
|
|
179
|
+
lineHeight: 24,
|
|
180
|
+
},
|
|
181
|
+
link: {
|
|
182
|
+
color: '#1d4ed8',
|
|
183
|
+
fontSize: 14,
|
|
184
|
+
fontWeight: '800',
|
|
185
|
+
lineHeight: 20,
|
|
186
|
+
},
|
|
187
|
+
svgDemo: {
|
|
188
|
+
alignItems: 'center',
|
|
189
|
+
paddingVertical: 8,
|
|
190
|
+
},
|
|
191
|
+
});
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { useMemo, useState } from 'react';
|
|
2
|
+
import { Linking, Platform, ScrollView, StyleSheet, View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { ActivityIndicator } from '../../components/nativewindui/ActivityIndicator';
|
|
5
|
+
import { Avatar, AvatarFallback } from '../../components/nativewindui/Avatar';
|
|
6
|
+
import { Button } from '../../components/nativewindui/Button';
|
|
7
|
+
import { DatePicker } from '../../components/nativewindui/DatePicker';
|
|
8
|
+
import { Picker, PickerItem } from '../../components/nativewindui/Picker';
|
|
9
|
+
import { ProgressIndicator } from '../../components/nativewindui/ProgressIndicator';
|
|
10
|
+
import { Slider } from '../../components/nativewindui/Slider';
|
|
11
|
+
import { Text } from '../../components/nativewindui/Text';
|
|
12
|
+
import { ThemeToggle } from '../../components/nativewindui/ThemeToggle';
|
|
13
|
+
import { Toggle } from '../../components/nativewindui/Toggle';
|
|
14
|
+
import { ExpositionNotice } from '../../components/exposition';
|
|
15
|
+
import { useAppTheme } from '../../theme/provider';
|
|
16
|
+
|
|
17
|
+
export default function NativeWindUiScreen() {
|
|
18
|
+
const theme = useAppTheme();
|
|
19
|
+
const colors = theme.activeColors;
|
|
20
|
+
const [enabled, setEnabled] = useState(true);
|
|
21
|
+
const [intensity, setIntensity] = useState(0.64);
|
|
22
|
+
const [density, setDensity] = useState('balanced');
|
|
23
|
+
const [appointmentDate, setAppointmentDate] = useState<Date>(new Date());
|
|
24
|
+
const progress = useMemo(() => Math.round(intensity * 100), [intensity]);
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<ScrollView contentInsetAdjustmentBehavior="automatic" contentContainerStyle={styles.content} style={[styles.screen, { backgroundColor: colors.background }]}>
|
|
28
|
+
<View style={styles.header}>
|
|
29
|
+
<Text variant="largeTitle" className="font-black text-slate-950 dark:text-white">NativeWindUI Exposition</Text>
|
|
30
|
+
<Text variant="body" color="secondary">Generated when NativeWindUI is selected; this page exercises the local NativeWindUI primitives that create-expo-stack installs.</Text>
|
|
31
|
+
</View>
|
|
32
|
+
<ExpositionNotice />
|
|
33
|
+
<View style={[styles.card, { backgroundColor: colors.surface, borderColor: colors.primary, borderRadius: theme.layout.radius }]}>
|
|
34
|
+
<Text variant="heading">Interactive primitives</Text>
|
|
35
|
+
<View style={styles.feedbackRow}>
|
|
36
|
+
<Avatar className="h-12 w-12">
|
|
37
|
+
<AvatarFallback>
|
|
38
|
+
<Text variant="caption2">NW</Text>
|
|
39
|
+
</AvatarFallback>
|
|
40
|
+
</Avatar>
|
|
41
|
+
<View style={styles.feedbackBody}>
|
|
42
|
+
<Text variant="subhead">Theme preview controls</Text>
|
|
43
|
+
<Text variant="footnote" color="secondary">Avatar and ThemeToggle are local NativeWindUI primitives.</Text>
|
|
44
|
+
</View>
|
|
45
|
+
<ThemeToggle />
|
|
46
|
+
</View>
|
|
47
|
+
<View style={styles.row}>
|
|
48
|
+
<Button onPress={() => Linking.openURL('https://nativewindui.com')} variant="primary">
|
|
49
|
+
<Text>Open NativeWindUI docs</Text>
|
|
50
|
+
</Button>
|
|
51
|
+
<Button variant="tonal">
|
|
52
|
+
<Text>{density}</Text>
|
|
53
|
+
</Button>
|
|
54
|
+
</View>
|
|
55
|
+
<View style={styles.controlRow}>
|
|
56
|
+
<Text variant="callout">Enable generated theme bridge</Text>
|
|
57
|
+
<Toggle value={enabled} onValueChange={setEnabled} />
|
|
58
|
+
</View>
|
|
59
|
+
<Slider value={intensity} onValueChange={setIntensity} />
|
|
60
|
+
<ProgressIndicator value={progress} />
|
|
61
|
+
<Text variant="footnote" color="secondary">Progress {progress}% - Toggle {enabled ? 'on' : 'off'}</Text>
|
|
62
|
+
</View>
|
|
63
|
+
<View style={[styles.card, { backgroundColor: colors.surface, borderColor: colors.primary, borderRadius: theme.layout.radius }]}>
|
|
64
|
+
<Text variant="heading">Picker, DatePicker, and feedback</Text>
|
|
65
|
+
<Picker selectedValue={density} onValueChange={(value) => setDensity(String(value))}>
|
|
66
|
+
<PickerItem label="Compact density" value="compact" />
|
|
67
|
+
<PickerItem label="Balanced density" value="balanced" />
|
|
68
|
+
<PickerItem label="Spacious density" value="spacious" />
|
|
69
|
+
</Picker>
|
|
70
|
+
{Platform.OS !== "web" ? (
|
|
71
|
+
<DatePicker mode="date" value={appointmentDate} onChange={(_event, selected) => selected && setAppointmentDate(selected)} />
|
|
72
|
+
) : (
|
|
73
|
+
<Text variant="footnote" color="secondary">DatePicker preview appears on native targets.</Text>
|
|
74
|
+
)}
|
|
75
|
+
<View style={styles.feedbackRow}>
|
|
76
|
+
<ActivityIndicator />
|
|
77
|
+
<View style={styles.feedbackBody}>
|
|
78
|
+
<Text variant="subhead" color="secondary">NativeWind class tokens, generated theme colors, and Expo web are rendering together.</Text>
|
|
79
|
+
<Text variant="footnote" color="secondary">Date: {appointmentDate.toDateString()}</Text>
|
|
80
|
+
</View>
|
|
81
|
+
</View>
|
|
82
|
+
</View>
|
|
83
|
+
</ScrollView>
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const styles = StyleSheet.create({
|
|
88
|
+
screen: {
|
|
89
|
+
backgroundColor: '#f8fafc',
|
|
90
|
+
flex: 1,
|
|
91
|
+
},
|
|
92
|
+
content: {
|
|
93
|
+
gap: 16,
|
|
94
|
+
padding: 20,
|
|
95
|
+
paddingTop: 84,
|
|
96
|
+
},
|
|
97
|
+
header: {
|
|
98
|
+
gap: 8,
|
|
99
|
+
},
|
|
100
|
+
card: {
|
|
101
|
+
borderWidth: 1,
|
|
102
|
+
gap: 16,
|
|
103
|
+
padding: 16,
|
|
104
|
+
},
|
|
105
|
+
row: {
|
|
106
|
+
flexDirection: 'row',
|
|
107
|
+
flexWrap: 'wrap',
|
|
108
|
+
gap: 10,
|
|
109
|
+
},
|
|
110
|
+
controlRow: {
|
|
111
|
+
alignItems: 'center',
|
|
112
|
+
flexDirection: 'row',
|
|
113
|
+
gap: 12,
|
|
114
|
+
justifyContent: 'space-between',
|
|
115
|
+
},
|
|
116
|
+
feedbackRow: {
|
|
117
|
+
alignItems: 'center',
|
|
118
|
+
flexDirection: 'row',
|
|
119
|
+
gap: 12,
|
|
120
|
+
},
|
|
121
|
+
feedbackBody: {
|
|
122
|
+
flex: 1,
|
|
123
|
+
gap: 4,
|
|
124
|
+
},
|
|
125
|
+
});
|