import { StyleSheet } from 'react-native'; import { fixed, fw, r, pressedOpacity, radius, space, type as typography, } from '../../../theme'; import type { ColorTokens, ShadowTokens } from '../../../theme'; export const makeStyles = (c: ColorTokens, shadows: ShadowTokens) => StyleSheet.create({ popoverRoot: { width: r(240), maxWidth: '100%', borderRadius: radius['3xl'], backgroundColor: 'transparent', ...shadows.card, }, popoverMaterial: { borderRadius: radius['3xl'] }, popoverCard: { borderRadius: radius['3xl'], overflow: 'hidden', paddingVertical: space[2], }, popoverRow: { minHeight: fixed.hitTarget, flexDirection: 'row', alignItems: 'center', gap: space[4], paddingVertical: space[3], paddingHorizontal: space[6], }, popoverRowPressed: { backgroundColor: c.glassSeparator }, popoverRowDisabled: { opacity: 0.4 }, popoverIcon: { width: 24, height: 24, alignItems: 'center', justifyContent: 'center', }, popoverLabel: { flex: 1, minWidth: 0, fontSize: typography.body, color: c.foreground, }, popoverConfirmRoot: { width: r(260) }, popoverConfirmCard: { paddingHorizontal: space[8], paddingVertical: space[7], gap: space[3], }, popoverTitle: { textAlign: 'left', fontSize: typography.h2, lineHeight: typography.h2 * 1.3, paddingHorizontal: 0, paddingTop: 0, paddingBottom: 0, }, popoverConfirmation: { textAlign: 'left', fontSize: typography.sm, fontWeight: fw.regular, lineHeight: typography.sm * 1.5, }, popoverConfirmationActions: { paddingTop: space[2], gap: space[2] }, popoverConfirmButton: { borderRadius: radius.lg, backgroundColor: c.surfaceContainerHigh, minHeight: fixed.hitTarget, }, popoverConfirmDanger: { backgroundColor: c.errorContainer }, popoverConfirmPressed: { opacity: pressedOpacity }, popoverConfirmLabel: { textAlign: 'center', fontSize: typography.sm, fontWeight: fw.semi, }, pointer: { position: 'absolute', overflow: 'hidden' }, // 实色箭头盖住卡片接边,不给旋转菱形重复描边。 pointerFallback: { zIndex: 1 }, dialogRoot: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: c.scrim, }, sheetRoot: { flex: 1, justifyContent: 'flex-end', backgroundColor: c.scrim, }, dialogMaterial: { borderRadius: radius['3xl'] }, sheetMaterial: { borderTopLeftRadius: radius.xl, borderTopRightRadius: radius.xl, }, dialogCard: { backgroundColor: 'transparent', borderRadius: radius['3xl'], padding: space[6], width: '86%', maxWidth: 400, gap: space[2], }, sheetCard: { backgroundColor: 'transparent', borderTopLeftRadius: radius.xl, borderTopRightRadius: radius.xl, paddingHorizontal: space[5], paddingTop: space[5], gap: space[3], }, title: { color: c.foreground, fontSize: typography.h2, lineHeight: typography.h2 * 1.3, fontWeight: fw.semi, textAlign: 'left', paddingBottom: space[1], }, message: { color: c.foregroundMuted, fontSize: typography.sm, lineHeight: typography.sm * 1.5, paddingBottom: space[3], }, dialogActions: { gap: space[3] }, cancelAction: { borderRadius: radius.pill }, confirmation: { color: c.foregroundMuted, fontSize: typography.xs, textAlign: 'center', }, sheetActions: { flexDirection: 'row', flexWrap: 'wrap', gap: space[3] }, sheetAction: { flex: 1 }, });