@expokit/cli 0.4.3 → 0.5.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/README.md +30 -3
- package/bin/expo-kit.js +749 -288
- package/bin/lib.mjs +313 -4
- package/package.json +1 -1
- package/registry/_docs/action-sheet.json +1 -1
- package/registry/_docs/alert.json +6 -0
- package/registry/_docs/bottom-sheet.json +6 -0
- package/registry/_docs/bullet.json +6 -0
- package/registry/_docs/dialog.json +1 -1
- package/registry/_docs/drawer.json +3 -3
- package/registry/_docs/flip-calendar.json +106 -0
- package/registry/_docs/glass-search-bar.json +1 -1
- package/registry/_docs/grain.json +6 -1
- package/registry/_docs/isometric-bar.json +6 -0
- package/registry/_docs/liquidglass-tab.json +1 -1
- package/registry/_docs/password-input.json +1 -1
- package/registry/_docs/paywall.json +144 -0
- package/registry/_docs/pixel-bar.json +6 -0
- package/registry/_docs/polar-area.json +6 -0
- package/registry/_docs/qr-code-button.json +9 -3
- package/registry/_docs/ruler-time-picker.json +147 -0
- package/registry/_docs/scratch-card.json +7 -1
- package/registry/_docs/search-bar.json +1 -1
- package/registry/_docs/select.json +2 -2
- package/registry/_docs/slide-to-confirm.json +2 -2
- package/registry/_docs/spinner.json +1 -1
- package/registry/_docs/stateful-button.json +2 -2
- package/registry/_docs/swipe-deck.json +1 -1
- package/registry/_docs/time-picker.json +2 -2
- package/registry/_docs/timeline-chart.json +6 -0
- package/registry/_docs/toast.json +15 -3
- package/registry/_docs/treemap.json +6 -0
- package/registry/_docs/waterfall.json +6 -0
- package/registry/accordion/files/src/components/ui/accordion.tsx +6 -4
- package/registry/accordion/files/src/lib/kit.tsx +462 -12
- package/registry/accordion.json +1 -0
- package/registry/action-sheet/files/src/components/ui/action-sheet.tsx +50 -58
- package/registry/action-sheet/files/src/lib/kit.tsx +462 -12
- package/registry/action-sheet.json +1 -0
- package/registry/alert/files/src/components/ui/alert.tsx +20 -13
- package/registry/alert/files/src/lib/kit.tsx +462 -12
- package/registry/alert.json +3 -4
- package/registry/assistant-app.json +1 -0
- package/registry/avatar/files/src/components/ui/avatar.tsx +89 -74
- package/registry/avatar/files/src/lib/kit.tsx +462 -12
- package/registry/avatar.json +1 -0
- package/registry/badge/files/src/components/ui/badge.tsx +36 -36
- package/registry/badge/files/src/lib/kit.tsx +462 -12
- package/registry/badge.json +1 -0
- package/registry/bottom-nav/files/src/components/ui/bottom-nav.tsx +39 -44
- package/registry/bottom-nav/files/src/lib/kit.tsx +462 -12
- package/registry/bottom-nav.json +5 -0
- package/registry/bottom-sheet/files/src/components/ui/bottom-sheet.tsx +357 -300
- package/registry/bottom-sheet/files/src/lib/kit.tsx +462 -12
- package/registry/bottom-sheet.json +5 -1
- package/registry/bullet.json +1 -0
- package/registry/button/files/src/components/ui/button.tsx +23 -34
- package/registry/button/files/src/lib/kit.tsx +462 -12
- package/registry/button-3d/files/src/components/ui/button-3d.tsx +6 -9
- package/registry/button-3d/files/src/lib/kit.tsx +462 -12
- package/registry/button-3d.json +1 -0
- package/registry/button.json +1 -0
- package/registry/calendar/files/src/components/ui/calendar.tsx +77 -79
- package/registry/calendar/files/src/lib/kit.tsx +462 -12
- package/registry/calendar.json +1 -0
- package/registry/card/files/src/components/ui/card.tsx +7 -6
- package/registry/card/files/src/lib/kit.tsx +462 -12
- package/registry/card-stack.json +1 -0
- package/registry/card.json +1 -0
- package/registry/carousel.json +1 -0
- package/registry/chat.json +7 -0
- package/registry/checkbox/files/src/components/ui/checkbox.tsx +4 -4
- package/registry/checkbox/files/src/lib/kit.tsx +462 -12
- package/registry/checkbox.json +1 -0
- package/registry/checkout.json +1 -0
- package/registry/chip-group/files/src/components/ui/chip-group.tsx +24 -24
- package/registry/chip-group/files/src/lib/kit.tsx +462 -12
- package/registry/chip-group.json +1 -0
- package/registry/confetti/files/src/components/ui/confetti.tsx +15 -14
- package/registry/confetti.json +3 -6
- package/registry/coupon/files/src/components/ui/coupon.tsx +47 -52
- package/registry/coupon/files/src/components/ui/flip-card.tsx +9 -14
- package/registry/coupon/files/src/components/ui/tilt-card.tsx +80 -101
- package/registry/coupon/files/src/lib/kit.tsx +462 -12
- package/registry/coupon/files/src/lib/ticket-shape.tsx +54 -44
- package/registry/coupon.json +1 -0
- package/registry/cube-pager.json +1 -0
- package/registry/dashboard.json +1 -0
- package/registry/date-picker/files/src/components/ui/calendar.tsx +77 -79
- package/registry/date-picker/files/src/components/ui/date-picker.tsx +64 -71
- package/registry/date-picker/files/src/lib/kit.tsx +462 -12
- package/registry/date-picker.json +1 -0
- package/registry/dialog/files/src/components/ui/dialog.tsx +66 -68
- package/registry/dialog/files/src/lib/kit.tsx +462 -12
- package/registry/dialog.json +1 -0
- package/registry/donut-shop.json +1 -0
- package/registry/drawer/files/src/components/ui/drawer.tsx +76 -88
- package/registry/drawer/files/src/lib/kit.tsx +462 -12
- package/registry/drawer.json +1 -0
- package/registry/fab.json +1 -0
- package/registry/fintech-app.json +1 -0
- package/registry/flip-calendar/files/src/components/ui/flip-calendar.tsx +632 -0
- package/registry/flip-calendar/files/src/lib/kit.tsx +672 -0
- package/registry/flip-calendar.json +24 -0
- package/registry/flip-card/files/src/components/ui/flip-card.tsx +9 -14
- package/registry/flip-card/files/src/lib/kit.tsx +462 -12
- package/registry/flip-card.json +1 -0
- package/registry/floating-input/files/src/components/ui/floating-input.tsx +33 -33
- package/registry/floating-input/files/src/lib/kit.tsx +462 -12
- package/registry/floating-input.json +1 -0
- package/registry/food-app.json +1 -0
- package/registry/gift-card.json +1 -0
- package/registry/glass-button.json +5 -0
- package/registry/glass-nav-bar.json +1 -0
- package/registry/glass-search-bar.json +1 -0
- package/registry/glass-segmented.json +1 -0
- package/registry/glass-sheet.json +1 -0
- package/registry/glass-tab-bar.json +5 -0
- package/registry/glass.json +1 -0
- package/registry/grain/files/src/components/ui/grain.tsx +16 -14
- package/registry/grain.json +8 -6
- package/registry/inbox.json +1 -0
- package/registry/isometric-bar.json +1 -0
- package/registry/kit/files/src/lib/kit.tsx +462 -12
- package/registry/kit.json +1 -0
- package/registry/liquidglass-tab/files/src/app/_layout.tsx +0 -1
- package/registry/liquidglass-tab/files/src/components/GlassTabBar.tsx +29 -16
- package/registry/liquidglass-tab/files/src/components/TabScreen.tsx +33 -19
- package/registry/liquidglass-tab/files/src/lib/tab-icons.ts +1 -1
- package/registry/liquidglass-tab.json +1 -0
- package/registry/list-item/files/src/components/ui/list-item.tsx +43 -43
- package/registry/list-item/files/src/lib/kit.tsx +462 -12
- package/registry/list-item.json +1 -0
- package/registry/loyalty-card.json +1 -0
- package/registry/morphing-button-group.json +1 -0
- package/registry/number-ticker.json +1 -0
- package/registry/offers.json +1 -0
- package/registry/onboarding.json +1 -0
- package/registry/orb-reveal.json +1 -0
- package/registry/otp-input/files/src/components/ui/otp-input.tsx +49 -30
- package/registry/otp-input/files/src/lib/kit.tsx +462 -12
- package/registry/otp-input.json +1 -0
- package/registry/parallax-layers.json +1 -0
- package/registry/parallax-scroll.json +1 -0
- package/registry/password-input/files/src/components/ui/floating-input.tsx +33 -33
- package/registry/password-input/files/src/components/ui/password-input.tsx +29 -25
- package/registry/password-input/files/src/lib/kit.tsx +462 -12
- package/registry/password-input.json +1 -0
- package/registry/payment-card/files/src/components/ui/flip-card.tsx +9 -14
- package/registry/payment-card/files/src/components/ui/payment-card.tsx +26 -20
- package/registry/payment-card/files/src/components/ui/tilt-card.tsx +80 -101
- package/registry/payment-card/files/src/lib/kit.tsx +462 -12
- package/registry/payment-card.json +1 -0
- package/registry/paywall.json +23 -0
- package/registry/pixel-bar.json +1 -0
- package/registry/polar-area.json +1 -0
- package/registry/profile.json +1 -0
- package/registry/progress/files/src/components/ui/progress.tsx +31 -29
- package/registry/progress/files/src/lib/kit.tsx +462 -12
- package/registry/progress-steps/files/src/components/ui/progress-steps.tsx +21 -21
- package/registry/progress-steps/files/src/lib/kit.tsx +462 -12
- package/registry/progress-steps.json +1 -0
- package/registry/progress.json +1 -0
- package/registry/qr-code-button.json +1 -0
- package/registry/radio-group/files/src/components/ui/radio-group.tsx +19 -19
- package/registry/radio-group/files/src/lib/kit.tsx +462 -12
- package/registry/radio-group.json +1 -0
- package/registry/rating.json +1 -0
- package/registry/ring-carousel.json +1 -0
- package/registry/ruler-time-picker/files/src/components/ui/ruler-time-picker.tsx +832 -0
- package/registry/ruler-time-picker/files/src/lib/kit.tsx +672 -0
- package/registry/ruler-time-picker.json +26 -0
- package/registry/scratch-card.json +1 -0
- package/registry/search-bar/files/src/components/ui/search-bar.tsx +28 -28
- package/registry/search-bar/files/src/lib/kit.tsx +462 -12
- package/registry/search-bar.json +1 -0
- package/registry/search-results.json +4 -0
- package/registry/segmented-control/files/src/components/ui/segmented-control.tsx +11 -17
- package/registry/segmented-control/files/src/lib/kit.tsx +462 -12
- package/registry/segmented-control.json +1 -0
- package/registry/select/files/src/components/ui/select.tsx +107 -104
- package/registry/select/files/src/lib/kit.tsx +462 -12
- package/registry/select.json +6 -0
- package/registry/settings.json +1 -0
- package/registry/sign-in.json +1 -0
- package/registry/skeleton/files/src/components/ui/skeleton.tsx +149 -80
- package/registry/skeleton/files/src/lib/kit.tsx +462 -12
- package/registry/skeleton.json +1 -0
- package/registry/slide-to-confirm.json +1 -0
- package/registry/slider/files/src/components/ui/slider.tsx +106 -108
- package/registry/slider/files/src/lib/kit.tsx +462 -12
- package/registry/slider.json +5 -0
- package/registry/spin-wheel.json +1 -0
- package/registry/spinner/files/src/components/ui/spinner.tsx +39 -29
- package/registry/spinner/files/src/lib/kit.tsx +462 -12
- package/registry/spinner.json +6 -0
- package/registry/stateful-button/files/src/components/ui/stateful-button.tsx +39 -32
- package/registry/stateful-button/files/src/lib/kit.tsx +462 -12
- package/registry/stateful-button.json +5 -0
- package/registry/stepper/files/src/components/ui/stepper.tsx +40 -38
- package/registry/stepper/files/src/lib/kit.tsx +462 -12
- package/registry/stepper.json +1 -0
- package/registry/swipe-deck.json +1 -0
- package/registry/swipeable-row.json +4 -0
- package/registry/switch/files/src/components/ui/switch.tsx +41 -47
- package/registry/switch/files/src/lib/kit.tsx +462 -12
- package/registry/switch.json +1 -0
- package/registry/tabs/files/src/components/ui/tabs.tsx +61 -64
- package/registry/tabs/files/src/lib/kit.tsx +462 -12
- package/registry/tabs.json +1 -0
- package/registry/text-animation/files/src/components/ui/text-animation.tsx +55 -42
- package/registry/text-animation/files/src/lib/kit.tsx +462 -12
- package/registry/text-animation.json +7 -0
- package/registry/textarea/files/src/components/ui/textarea.tsx +10 -10
- package/registry/textarea/files/src/lib/kit.tsx +462 -12
- package/registry/textarea.json +1 -0
- package/registry/ticket-card.json +1 -0
- package/registry/ticket-shape/files/src/lib/kit.tsx +462 -12
- package/registry/ticket-shape/files/src/lib/ticket-shape.tsx +54 -44
- package/registry/ticket-shape.json +1 -0
- package/registry/tilt-card/files/src/components/ui/tilt-card.tsx +80 -101
- package/registry/tilt-card/files/src/lib/kit.tsx +462 -12
- package/registry/tilt-card.json +1 -0
- package/registry/time-picker/files/src/components/ui/time-picker.tsx +136 -131
- package/registry/time-picker/files/src/lib/kit.tsx +462 -12
- package/registry/time-picker.json +1 -0
- package/registry/timeline/files/src/components/ui/avatar.tsx +89 -74
- package/registry/timeline/files/src/components/ui/timeline.tsx +49 -57
- package/registry/timeline/files/src/lib/kit.tsx +462 -12
- package/registry/timeline-chart.json +1 -0
- package/registry/timeline.json +1 -0
- package/registry/toast/files/src/components/ui/toast.tsx +543 -465
- package/registry/toast/files/src/lib/kit.tsx +462 -12
- package/registry/toast.json +7 -5
- package/registry/treemap.json +1 -0
- package/registry/waterfall.json +1 -0
- package/registry/wheel-list.json +1 -0
- package/schema/components.schema.json +1 -0
- package/registry/alert/files/src/components/ui/button.tsx +0 -303
- package/registry/confetti/files/src/lib/kit.tsx +0 -222
- package/registry/grain/files/src/lib/kit.tsx +0 -222
- package/registry/toast/files/src/components/ui/button.tsx +0 -303
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import * as Haptics from 'expo-haptics';
|
|
2
|
-
import React, { useEffect,
|
|
2
|
+
import React, { useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
3
3
|
import {
|
|
4
4
|
AccessibilityInfo,
|
|
5
5
|
Animated,
|
|
6
6
|
Easing,
|
|
7
7
|
Modal,
|
|
8
|
-
PanResponder,
|
|
9
8
|
Platform,
|
|
10
9
|
Pressable,
|
|
11
10
|
StyleSheet,
|
|
@@ -17,7 +16,7 @@ import {
|
|
|
17
16
|
} from 'react-native';
|
|
18
17
|
import Svg, { Path } from 'react-native-svg';
|
|
19
18
|
|
|
20
|
-
import { alpha, motion, readableOn, useKit } from '@/lib/kit';
|
|
19
|
+
import { alpha, motion, readableOn, useKit, useLayout, usePanResponder } from '@/lib/kit';
|
|
21
20
|
|
|
22
21
|
/**
|
|
23
22
|
* `inset` — iOS: grouped rounded cards floating above the home indicator, with a separate Cancel card (default).
|
|
@@ -128,7 +127,7 @@ export function ActionSheet({
|
|
|
128
127
|
title,
|
|
129
128
|
message,
|
|
130
129
|
actions,
|
|
131
|
-
cancelLabel
|
|
130
|
+
cancelLabel: cancelLabelProp,
|
|
132
131
|
onCancel,
|
|
133
132
|
variant = 'inset',
|
|
134
133
|
bottomInset = DEFAULT_BOTTOM_INSET,
|
|
@@ -137,22 +136,25 @@ export function ActionSheet({
|
|
|
137
136
|
haptics = true,
|
|
138
137
|
style,
|
|
139
138
|
}: ActionSheetProps) {
|
|
140
|
-
const { colors, radius, dark, font } = useKit();
|
|
139
|
+
const { colors, radius, dark, font, labels } = useKit();
|
|
140
|
+
const cancelLabel = cancelLabelProp === undefined ? labels.cancel : cancelLabelProp; // null hides it
|
|
141
141
|
const ff = font.family ? { fontFamily: font.family } : null;
|
|
142
142
|
const { height: winH } = useWindowDimensions();
|
|
143
|
+
// Full width on portrait phones; a centred, width-capped card on foldables, tablets and landscape.
|
|
144
|
+
const { sheetWidth } = useLayout();
|
|
143
145
|
const reduceMotion = useReduceMotion();
|
|
144
146
|
const tint = accent ?? colors.accent;
|
|
145
147
|
const [inner, setInner] = useState(defaultOpen);
|
|
146
148
|
const isOpen = open ?? inner;
|
|
147
149
|
// Stays mounted while the exit animation runs; cleared in its completion callback.
|
|
148
|
-
const keep =
|
|
149
|
-
|
|
150
|
-
const mounted = isOpen || keep
|
|
150
|
+
const [keep, setKeep] = useState(isOpen);
|
|
151
|
+
if (isOpen && !keep) setKeep(true);
|
|
152
|
+
const mounted = isOpen || keep;
|
|
151
153
|
|
|
152
154
|
// Both native-driven, on the sheet node: open progress (0 → 1) and finger offset.
|
|
153
|
-
const t =
|
|
154
|
-
const drag =
|
|
155
|
-
const sheetH =
|
|
155
|
+
const [t] = useState(() => new Animated.Value(0));
|
|
156
|
+
const [drag] = useState(() => new Animated.Value(0));
|
|
157
|
+
const [sheetH, setSheetH] = useState(320);
|
|
156
158
|
const flung = useRef(false);
|
|
157
159
|
|
|
158
160
|
const setOpen = (next: boolean) => {
|
|
@@ -165,11 +167,12 @@ export function ActionSheet({
|
|
|
165
167
|
setOpen(false);
|
|
166
168
|
};
|
|
167
169
|
const live = useRef({ dismiss, dismissible });
|
|
168
|
-
|
|
170
|
+
useLayoutEffect(() => {
|
|
171
|
+
live.current = { dismiss, dismissible };
|
|
172
|
+
});
|
|
169
173
|
|
|
170
174
|
useEffect(() => {
|
|
171
175
|
if (isOpen) {
|
|
172
|
-
keep.current = true;
|
|
173
176
|
drag.setValue(0);
|
|
174
177
|
flung.current = false;
|
|
175
178
|
if (haptics) Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light).catch(() => {});
|
|
@@ -185,9 +188,7 @@ export function ActionSheet({
|
|
|
185
188
|
easing: flung.current ? Easing.out(Easing.cubic) : Easing.in(Easing.quad),
|
|
186
189
|
useNativeDriver: true,
|
|
187
190
|
}).start(({ finished }) => {
|
|
188
|
-
if (
|
|
189
|
-
keep.current = false;
|
|
190
|
-
rerender((n) => n + 1);
|
|
191
|
+
if (finished) setKeep(false);
|
|
191
192
|
});
|
|
192
193
|
}
|
|
193
194
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -202,32 +203,30 @@ export function ActionSheet({
|
|
|
202
203
|
}, [isOpen]);
|
|
203
204
|
|
|
204
205
|
// Drag anywhere on the sheet: a vertical move steals the touch from the row under the finger.
|
|
205
|
-
const
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
});
|
|
226
|
-
}, [drag]);
|
|
206
|
+
const settle = (velocity = 0) =>
|
|
207
|
+
Animated.spring(drag, { toValue: 0, velocity, useNativeDriver: true, ...motion.snappy }).start();
|
|
208
|
+
const pan = usePanResponder({
|
|
209
|
+
onMoveShouldSetPanResponderCapture: (_, g) => Math.abs(g.dy) > 8 && Math.abs(g.dy) > Math.abs(g.dx) * 1.4,
|
|
210
|
+
onPanResponderGrant: () => drag.stopAnimation(),
|
|
211
|
+
onPanResponderMove: (_, g) => {
|
|
212
|
+
const down = dismissible ? g.dy : rubber(g.dy, 90);
|
|
213
|
+
drag.setValue(g.dy > 0 ? down : -rubber(-g.dy, 70));
|
|
214
|
+
},
|
|
215
|
+
onPanResponderRelease: (_, g) => {
|
|
216
|
+
const far = g.dy > sheetH * 0.3;
|
|
217
|
+
const flick = g.vy > 0.9 && g.dy > 12;
|
|
218
|
+
if (dismissible && (far || flick)) {
|
|
219
|
+
flung.current = true;
|
|
220
|
+
dismiss();
|
|
221
|
+
} else settle(g.vy);
|
|
222
|
+
},
|
|
223
|
+
onPanResponderTerminationRequest: () => false,
|
|
224
|
+
onPanResponderTerminate: () => settle(),
|
|
225
|
+
});
|
|
227
226
|
|
|
228
227
|
const scrim = Animated.multiply(
|
|
229
228
|
t,
|
|
230
|
-
drag.interpolate({ inputRange: [0, Math.max(200, sheetH
|
|
229
|
+
drag.interpolate({ inputRange: [0, Math.max(200, sheetH)], outputRange: [1, 0], extrapolate: 'clamp' }),
|
|
231
230
|
);
|
|
232
231
|
|
|
233
232
|
const pick = (a: ActionSheetAction) => {
|
|
@@ -320,7 +319,7 @@ export function ActionSheet({
|
|
|
320
319
|
borderTopLeftRadius: radius.scale(28),
|
|
321
320
|
borderTopRightRadius: radius.scale(28),
|
|
322
321
|
borderColor: edge,
|
|
323
|
-
|
|
322
|
+
boxShadow: `0px -6px 48px rgba(0,0,0,${dark ? 0.5 : 0.12})`,
|
|
324
323
|
},
|
|
325
324
|
]}
|
|
326
325
|
>
|
|
@@ -408,20 +407,19 @@ export function ActionSheet({
|
|
|
408
407
|
style={StyleSheet.absoluteFill}
|
|
409
408
|
onPress={dismiss}
|
|
410
409
|
accessibilityRole="button"
|
|
411
|
-
accessibilityLabel=
|
|
410
|
+
accessibilityLabel={labels.dismiss}
|
|
412
411
|
importantForAccessibility={cancelLabel !== null ? 'no' : 'auto'}
|
|
413
412
|
accessible={cancelLabel === null}
|
|
414
413
|
/>
|
|
415
414
|
</Animated.View>
|
|
416
415
|
<View style={styles.host} pointerEvents="box-none">
|
|
417
416
|
<Animated.View
|
|
418
|
-
{...pan
|
|
417
|
+
{...pan}
|
|
419
418
|
accessibilityViewIsModal
|
|
420
|
-
onLayout={(e) =>
|
|
421
|
-
sheetH.current = Math.max(1, Math.round(e.nativeEvent.layout.height));
|
|
422
|
-
}}
|
|
419
|
+
onLayout={(e) => setSheetH(Math.max(1, Math.round(e.nativeEvent.layout.height)))}
|
|
423
420
|
style={[
|
|
424
421
|
styles.sheet,
|
|
422
|
+
{ maxWidth: sheetWidth },
|
|
425
423
|
inset && { paddingHorizontal: 8, paddingBottom: 8 + bottomInset },
|
|
426
424
|
{
|
|
427
425
|
opacity: reduceMotion ? t : 1,
|
|
@@ -459,8 +457,8 @@ function Card({
|
|
|
459
457
|
children: React.ReactNode;
|
|
460
458
|
}) {
|
|
461
459
|
return (
|
|
462
|
-
<View style={
|
|
463
|
-
<View style={
|
|
460
|
+
<View style={{ borderRadius: corner, backgroundColor: bg, boxShadow: `0px 10px 48px rgba(0,0,0,${dark ? 0.5 : 0.14})` }}>
|
|
461
|
+
<View style={{ borderRadius: corner, backgroundColor: bg, boxShadow: `0px 1px 4px rgba(0,0,0,${dark ? 0.3 : 0.06})` }}>
|
|
464
462
|
<View style={{ borderRadius: corner, overflow: 'hidden', borderWidth: StyleSheet.hairlineWidth, borderColor: edge }}>
|
|
465
463
|
{children}
|
|
466
464
|
</View>
|
|
@@ -480,14 +478,14 @@ function Row({
|
|
|
480
478
|
children,
|
|
481
479
|
}: {
|
|
482
480
|
onPress: () => void;
|
|
483
|
-
disabled?: boolean;
|
|
481
|
+
disabled?: boolean | undefined;
|
|
484
482
|
label: string;
|
|
485
483
|
highlight: string;
|
|
486
|
-
corner?: number;
|
|
487
|
-
style?: StyleProp<ViewStyle
|
|
484
|
+
corner?: number | undefined;
|
|
485
|
+
style?: StyleProp<ViewStyle> | undefined;
|
|
488
486
|
children: React.ReactNode;
|
|
489
487
|
}) {
|
|
490
|
-
const hl =
|
|
488
|
+
const [hl] = useState(() => new Animated.Value(0));
|
|
491
489
|
return (
|
|
492
490
|
<Pressable
|
|
493
491
|
onPress={onPress}
|
|
@@ -546,9 +544,7 @@ function useReduceMotion() {
|
|
|
546
544
|
|
|
547
545
|
const styles = StyleSheet.create({
|
|
548
546
|
host: { flex: 1, justifyContent: 'flex-end', alignItems: 'center' },
|
|
549
|
-
sheet: { width: '100%',
|
|
550
|
-
cardAmbient: { shadowColor: '#000', shadowRadius: 24, shadowOffset: { width: 0, height: 10 }, elevation: 10 },
|
|
551
|
-
cardContact: { shadowColor: '#000', shadowRadius: 2, shadowOffset: { width: 0, height: 1 } },
|
|
547
|
+
sheet: { width: '100%', gap: 8 },
|
|
552
548
|
head: { paddingHorizontal: 24, paddingTop: 15, paddingBottom: 14, alignItems: 'center', gap: 4 },
|
|
553
549
|
headLeft: { paddingHorizontal: 20, paddingTop: 6, paddingBottom: 10, gap: 4 },
|
|
554
550
|
title: { fontSize: 13.5, lineHeight: 18, fontWeight: '400', textAlign: 'center' },
|
|
@@ -566,10 +562,6 @@ const styles = StyleSheet.create({
|
|
|
566
562
|
borderWidth: StyleSheet.hairlineWidth,
|
|
567
563
|
borderBottomWidth: 0,
|
|
568
564
|
paddingHorizontal: 8,
|
|
569
|
-
shadowColor: '#000',
|
|
570
|
-
shadowRadius: 24,
|
|
571
|
-
shadowOffset: { width: 0, height: -6 },
|
|
572
|
-
elevation: 16,
|
|
573
565
|
},
|
|
574
566
|
listRow: { minHeight: 56, flexDirection: 'row', alignItems: 'center', paddingHorizontal: 16, gap: 16 },
|
|
575
567
|
listIcon: { width: 24, alignItems: 'center' },
|