@lmb-it/kitsconcerto-native 0.1.266 → 0.1.267
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/components/overlay/ConfirmDialog/index.cjs +3 -5
- package/components/overlay/ConfirmDialog/index.cjs.map +1 -1
- package/components/overlay/ConfirmDialog/index.js +5 -7
- package/components/overlay/ConfirmDialog/index.js.map +1 -1
- package/components/overlay/Dialog/index.cjs +3 -2
- package/components/overlay/Dialog/index.cjs.map +1 -1
- package/components/overlay/Dialog/index.js +4 -3
- package/components/overlay/Dialog/index.js.map +1 -1
- package/components/overlay/sheetMotion.cjs +46 -0
- package/components/overlay/sheetMotion.cjs.map +1 -0
- package/components/overlay/sheetMotion.js +43 -0
- package/components/overlay/sheetMotion.js.map +1 -0
- package/package.json +1 -1
|
@@ -11,6 +11,7 @@ var useSeverityColors = require('../../../hooks/useSeverityColors.cjs');
|
|
|
11
11
|
require('../../../contexts/DialogContext.cjs');
|
|
12
12
|
var useResolvedStyle = require('../../../hooks/useResolvedStyle.cjs');
|
|
13
13
|
var index = require('../../../animations/index.cjs');
|
|
14
|
+
var sheetMotion_native = require('../sheetMotion.cjs');
|
|
14
15
|
var KitsThemeProvider_native = require('../../../contexts/Theme/KitsThemeProvider.cjs');
|
|
15
16
|
var index_native = require('../../../primitives/Text/index.cjs');
|
|
16
17
|
var index_native$1 = require('../../../primitives/Icon/index.cjs');
|
|
@@ -150,11 +151,8 @@ function KitsConfirm(props) {
|
|
|
150
151
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
151
152
|
Animated.View,
|
|
152
153
|
{
|
|
153
|
-
entering:
|
|
154
|
-
exiting:
|
|
155
|
-
"worklet";
|
|
156
|
-
if (finished) Animated.runOnJS(handleExitFinished)();
|
|
157
|
-
}),
|
|
154
|
+
entering: sheetMotion_native.sheetEnter(index.overlayAnimations.sheet.enter),
|
|
155
|
+
exiting: sheetMotion_native.sheetExit(index.overlayAnimations.sheet.exitDuration, handleExitFinished),
|
|
158
156
|
style: [
|
|
159
157
|
styles.sheetPanel,
|
|
160
158
|
{ backgroundColor: panelBg, paddingBottom: 24 + insets.bottom },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../../src/components/overlay/ConfirmDialog/index.native.tsx"],"sourcesContent":["import React from \"react\";\nimport {Modal, Pressable, StyleSheet, View} from \"react-native\";\nimport Animated, {Easing, FadeIn, FadeOut, runOnJS, SlideInDown, SlideOutDown, ZoomIn, ZoomOut} from \"react-native-reanimated\";\nimport {useSafeAreaInsets} from \"react-native-safe-area-context\";\nimport {Icon, Text} from \"../../../_compat\";\nimport type {IConfirmDialogProps} from \"@lmb-it/kitsconcerto-types\";\nimport {useKitsTheme} from \"../../../contexts/Theme\";\nimport {useSeverityColors, useAllSeverityColors} from \"../../../hooks/useSeverityColors\";\nimport {useResolvedStyle} from \"../../../hooks\";\nimport {overlayAnimations as anim, scrimExitDuration} from \"../../../animations\";\n\n/**\n * Keeps the RN Modal mounted through the exit animation. `visible` drives the\n * inner scrim + panel entering/exiting; the Modal itself stays mounted until\n * the panel's exit animation reports finished, then unmounts.\n *\n * Re-entrancy: a new `visible=true` during an exit cancels the panel's exit\n * (reanimated reports `finished=false`, so the unmount is skipped) and the\n * inner re-enters cleanly; `visibleRef` is a second guard for the case where\n * the exit had already completed.\n */\nfunction useOverlayPresence(visible: boolean) {\n const [mounted, setMounted] = React.useState(visible);\n const visibleRef = React.useRef(visible);\n React.useEffect(() => {\n visibleRef.current = visible;\n if (visible) setMounted(true);\n }, [visible]);\n // Runs on the JS thread (dispatched via runOnJS from the exit worklet).\n const handleExitFinished = React.useCallback(() => {\n if (!visibleRef.current) setMounted(false);\n }, []);\n return {mounted, handleExitFinished};\n}\n\nexport default function KitsConfirm(props: IConfirmDialogProps) {\n const {\n visible,\n header,\n message,\n icon,\n type = \"secondary\",\n accept,\n reject,\n acceptLabel = \"Accept\",\n rejectLabel = \"Reject\",\n buttons,\n headless,\n defaultUI,\n async: asyncMode,\n onHide,\n content,\n children,\n position = \"center\",\n style,\n contentStyle,\n headerStyle,\n maskStyle,\n // LEGIT-PLATFORM-ONLY (web): acceptIcon/rejectIcon take PrimeReact\n // icon classes ('pi pi-*') with no native rendering path — use the\n // `buttons` array for custom native actions. acceptClassName/\n // rejectClassName are CSS classes; appendTo is a DOM portal target.\n ...rest\n } = props;\n\n const {resolveToken, theme} = useKitsTheme();\n const colors = useSeverityColors(type);\n const allColors = useAllSeverityColors();\n const insets = useSafeAreaInsets();\n\n const surfaceColor = resolveToken('surface-card');\n const textColor = resolveToken('text');\n const subtextColor = resolveToken('gray.500');\n const grabberColor = resolveToken('gray.300');\n // Scrim via the literal alpha overlay token → rgba(0,0,0,0.4) in both modes.\n const scrimColor = resolveToken('black-alpha-40');\n const brandLogo = type === 'brand' ? theme.config.logo : null;\n\n const resolvedStyle = useResolvedStyle(style || {});\n const resolvedContentStyle = useResolvedStyle(contentStyle || {});\n const resolvedHeaderStyle = useResolvedStyle(headerStyle || {});\n const resolvedMaskStyle = useResolvedStyle(maskStyle || {});\n\n const {mounted, handleExitFinished} = useOverlayPresence(!!visible);\n if (!mounted) return null;\n\n const isSheet = position === 'bottom';\n const hide = () => onHide?.('hide');\n\n const doClick = async (callback?: () => void) => {\n if (asyncMode) {\n await callback?.();\n hide();\n } else {\n hide();\n callback?.();\n }\n };\n\n const showIcon = icon != null || brandLogo != null;\n // Panel always uses surface-card. Severity (danger/success/...) only colours\n // the icon bubble and the action button — not the whole panel — otherwise\n // a danger confirm renders as a red wash with the underlying screen\n // bleeding through.\n const panelBg = surfaceColor;\n\n // Shared action row. `stretch` makes each button flex:1 (bottom-sheet,\n // full-width). The default accept/reject pair is ordered accept-first in the\n // centered card but reject-first (Cancel | Confirm) in the sheet, matching\n // the platform-native bottom-sheet convention.\n const renderActions = (stretch: boolean) => {\n if (buttons?.length) {\n return (\n <View style={styles.buttonRow}>\n {buttons.map((b, i) => {\n const btnColor = allColors[b.type ?? type]?.solid ?? colors.solid;\n return (\n <Pressable\n key={i}\n disabled={b.disabled}\n style={[\n styles.actionBtn,\n stretch && styles.actionBtnSheet,\n stretch && {flex: 1},\n b.outlined\n ? {backgroundColor: \"transparent\", borderColor: btnColor, borderWidth: 1.5}\n : {backgroundColor: btnColor},\n b.rounded && {borderRadius: 999},\n b.disabled && {opacity: 0.5},\n ]}\n onPress={() => b.onClick(hide, accept, reject)}\n >\n <Text style={{\n color: b.outlined ? btnColor : \"#fff\",\n fontWeight: \"600\",\n fontSize: 14,\n }}>\n {b.title}\n </Text>\n </Pressable>\n );\n })}\n </View>\n );\n }\n\n const acceptBtn = (\n <Pressable\n key=\"accept\"\n style={[styles.actionBtn, stretch && styles.actionBtnSheet, {backgroundColor: colors.solid, flex: 1}]}\n onPress={() => doClick(accept)}\n >\n <Text style={styles.btnTextPrimary}>{acceptLabel}</Text>\n </Pressable>\n );\n const rejectBtn = !defaultUI ? (\n <Pressable\n key=\"reject\"\n style={[styles.actionBtn, styles.actionBtnOutlined, stretch && styles.actionBtnSheet, {borderColor: colors.solid, flex: 1}]}\n onPress={() => doClick(reject)}\n >\n <Text style={[styles.btnTextOutlined, {color: colors.solid}]}>{rejectLabel}</Text>\n </Pressable>\n ) : null;\n\n return (\n <View style={styles.buttonRow}>\n {stretch ? <>{rejectBtn}{acceptBtn}</> : <>{acceptBtn}{rejectBtn}</>}\n </View>\n );\n };\n\n // ── Bottom sheet ────────────────────────────────────────\n if (isSheet) {\n return (\n <Modal visible transparent animationType=\"none\" onRequestClose={hide}>\n {visible && (\n <Animated.View\n entering={FadeIn.duration(anim.scrim.enterDuration)}\n /* Contains the sheet — see `scrimExitDuration`. */\n exiting={FadeOut.duration(scrimExitDuration(anim.sheet.exitDuration))}\n style={[styles.sheetOverlay, {backgroundColor: scrimColor}, resolvedMaskStyle as any]}\n >\n <Pressable style={StyleSheet.absoluteFill} onPress={hide}/>\n <Animated.View\n entering={SlideInDown.springify().damping(anim.sheet.enter.damping).stiffness(anim.sheet.enter.stiffness).mass(anim.sheet.enter.mass ?? 1)}\n exiting={SlideOutDown.duration(anim.sheet.exitDuration).easing(Easing.in(Easing.ease)).withCallback((finished) => {\n 'worklet';\n if (finished) runOnJS(handleExitFinished)();\n })}\n style={[\n styles.sheetPanel,\n {backgroundColor: panelBg, paddingBottom: 24 + insets.bottom},\n resolvedStyle as any,\n resolvedContentStyle as any,\n ]}\n >\n {/* Grabber */}\n <View style={[styles.grabber, {backgroundColor: grabberColor}]}/>\n\n {/* Header */}\n {header != null && (\n <Text style={[styles.sheetHeader, {color: textColor}, resolvedHeaderStyle as any]}>\n {header as React.ReactNode}\n </Text>\n )}\n\n {/* Message */}\n {message != null && (\n <Text style={[styles.sheetMessage, {color: subtextColor}]}>\n {message as React.ReactNode}\n </Text>\n )}\n\n {/* Injected item / extra content */}\n {children}\n\n {/* Actions */}\n {renderActions(true)}\n </Animated.View>\n </Animated.View>\n )}\n </Modal>\n );\n }\n\n // ── Content-only mode (prompt) ──────────────────────────\n if (content) {\n return (\n <Modal visible transparent animationType=\"none\" onRequestClose={hide}>\n {visible && (\n <Animated.View\n entering={FadeIn.duration(anim.scrim.enterDuration)}\n /* Contains the centred panel — see `scrimExitDuration`. */\n exiting={FadeOut.duration(scrimExitDuration(anim.confirm.exitDuration))}\n style={[styles.overlay, {backgroundColor: scrimColor}, resolvedMaskStyle as any]}\n >\n <Pressable style={StyleSheet.absoluteFill} onPress={hide}/>\n <Animated.View\n entering={ZoomIn.springify().damping(anim.confirm.content.damping).stiffness(anim.confirm.content.stiffness).mass(anim.confirm.content.mass ?? 1)}\n exiting={ZoomOut.duration(anim.confirm.exitDuration).easing(Easing.in(Easing.ease)).withCallback((finished) => {\n 'worklet';\n if (finished) runOnJS(handleExitFinished)();\n })}\n style={[\n styles.panel,\n {backgroundColor: surfaceColor, minWidth: 250, maxWidth: 380},\n resolvedStyle as any,\n resolvedContentStyle as any,\n ]}\n >\n {content as React.ReactNode}\n </Animated.View>\n </Animated.View>\n )}\n </Modal>\n );\n }\n\n return (\n <Modal visible transparent animationType=\"none\" onRequestClose={hide}>\n {visible && (\n <Animated.View\n entering={FadeIn.duration(anim.scrim.enterDuration)}\n /* Contains the centred panel — see `scrimExitDuration`. */\n exiting={FadeOut.duration(scrimExitDuration(anim.confirm.exitDuration))}\n style={[styles.overlay, {backgroundColor: scrimColor}, resolvedMaskStyle as any]}\n >\n <Pressable style={StyleSheet.absoluteFill} onPress={hide}/>\n\n {/* Card + icon stack: icon sits above the card */}\n <View style={styles.cardStack}>\n {/* Soft-circle icon bubble */}\n {showIcon && (\n <Animated.View\n entering={ZoomIn.springify().damping(anim.confirm.icon.damping).stiffness(anim.confirm.icon.stiffness).mass(anim.confirm.icon.mass ?? 1).delay(anim.confirm.icon.delay ?? 0)}\n exiting={ZoomOut.duration(anim.confirm.exitDuration).easing(Easing.in(Easing.ease))}\n style={[styles.iconBubble, {backgroundColor: colors.iconBg}]}\n >\n {brandLogo ? brandLogo : typeof icon === \"string\" ? (\n <Icon name={icon as never} size={'xl'} color={colors.iconFg}/>\n ) : (\n icon\n )}\n </Animated.View>\n )}\n\n {/* Panel */}\n <Animated.View\n entering={ZoomIn.springify().damping(anim.confirm.enter.damping).stiffness(anim.confirm.enter.stiffness).mass(anim.confirm.enter.mass ?? 1)}\n exiting={ZoomOut.duration(anim.confirm.exitDuration).easing(Easing.in(Easing.ease)).withCallback((finished) => {\n 'worklet';\n if (finished) runOnJS(handleExitFinished)();\n })}\n style={[\n styles.panel,\n {\n backgroundColor: panelBg,\n paddingTop: showIcon ? 48 : 24,\n gap: 10,\n },\n resolvedStyle as any,\n resolvedContentStyle as any,\n ]}\n >\n {/* Close button */}\n <Pressable style={styles.closeBtn} onPress={hide} hitSlop={12}>\n <Text style={{fontSize: 18, color: subtextColor}}>✕</Text>\n </Pressable>\n\n {/* Header */}\n {header != null && (\n <Text style={[styles.header, {color: textColor}, resolvedHeaderStyle as any]}>\n {header as React.ReactNode}\n </Text>\n )}\n\n {/* Message */}\n {message != null && (\n <Text style={[styles.message, {color: subtextColor}]}>\n {message as React.ReactNode}\n </Text>\n )}\n\n {/* Children */}\n {children}\n\n {/* Buttons */}\n {renderActions(false)}\n </Animated.View>\n </View>\n </Animated.View>\n )}\n </Modal>\n );\n}\n\nconst styles = StyleSheet.create({\n overlay: {\n flex: 1,\n justifyContent: \"center\",\n alignItems: \"center\",\n padding: 28,\n },\n sheetOverlay: {\n flex: 1,\n justifyContent: \"flex-end\",\n },\n sheetPanel: {\n // 24 == radii.2xl, top corners only (bottom stays square).\n borderTopLeftRadius: 24,\n borderTopRightRadius: 24,\n paddingHorizontal: 24,\n paddingTop: 10,\n gap: 14,\n // Subtle elevation (upward for a sheet): low opacity, wide blur, minimal offset.\n elevation: 6,\n shadowColor: \"#000\",\n shadowOffset: {width: 0, height: -2},\n shadowOpacity: 0.15,\n shadowRadius: 20,\n },\n grabber: {\n width: 40,\n height: 5,\n borderRadius: 999,\n alignSelf: \"center\",\n marginBottom: 6,\n },\n sheetHeader: {\n fontSize: 24,\n fontWeight: \"700\",\n textAlign: \"left\",\n },\n sheetMessage: {\n fontSize: 15,\n lineHeight: 22,\n textAlign: \"left\",\n },\n cardStack: {\n minWidth: 250,\n maxWidth: 380,\n alignItems: \"center\",\n },\n iconBubble: {\n width: 72,\n height: 72,\n borderRadius: 36,\n justifyContent: \"center\",\n alignItems: \"center\",\n zIndex: 2,\n marginBottom: -36,\n elevation: 8,\n shadowColor: \"#000\",\n shadowOffset: {width: 0, height: 4},\n shadowOpacity: 0.15,\n shadowRadius: 8,\n },\n panel: {\n alignSelf: \"stretch\",\n // 20 == radii.xl. Side padding (24) == bottom padding (24) for even rhythm.\n borderRadius: 20,\n paddingHorizontal: 24,\n paddingBottom: 24,\n // Subtle elevation: low opacity, wide blur, minimal offset.\n elevation: 6,\n shadowColor: \"#000\",\n shadowOffset: {width: 0, height: 2},\n shadowOpacity: 0.15,\n shadowRadius: 20,\n alignItems: \"center\",\n },\n closeBtn: {\n position: \"absolute\",\n top: 12,\n right: 14,\n zIndex: 3,\n },\n header: {\n fontSize: 22,\n fontWeight: \"700\",\n textAlign: \"center\",\n marginBottom: 8,\n },\n message: {\n fontSize: 14,\n textAlign: \"center\",\n lineHeight: 20,\n // Tightened so top/bottom whitespace around the actions reads balanced.\n marginBottom: 16,\n },\n buttonRow: {\n flexDirection: \"row\",\n justifyContent: \"center\",\n gap: 12,\n width: \"100%\",\n },\n actionBtn: {\n paddingVertical: 12,\n paddingHorizontal: 24,\n // Pill (== radii.pill). Buttons here are raw Pressables, not kits Button,\n // so the pill comes from borderRadius — the pattern the `buttons` array\n // path (`b.rounded && {borderRadius: 999}`) already uses in this file.\n borderRadius: 999,\n minWidth: 100,\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n // Taller buttons for the bottom-sheet action row (pill shape shared).\n actionBtnSheet: {\n paddingVertical: 16,\n borderRadius: 999,\n },\n actionBtnOutlined: {\n backgroundColor: \"transparent\",\n borderWidth: 1.5,\n },\n btnTextPrimary: {\n color: \"#fff\",\n fontWeight: \"600\",\n fontSize: 14,\n },\n btnTextOutlined: {\n fontWeight: \"600\",\n fontSize: 14,\n },\n});\n"],"names":["useKitsTheme","useSeverityColors","useAllSeverityColors","useSafeAreaInsets","useResolvedStyle","jsx","View","Pressable","Text","jsxs","Fragment","Modal","FadeIn","anim","FadeOut","scrimExitDuration","StyleSheet","SlideInDown","SlideOutDown","Easing","runOnJS","ZoomIn","ZoomOut","Icon"],"mappings":";;;;;;;;;;;;;;;;;AAqBA,SAAS,mBAAmB,OAAA,EAAkB;AAC1C,EAAA,MAAM,CAAC,OAAA,EAAS,UAAU,CAAA,GAAI,KAAA,CAAM,SAAS,OAAO,CAAA;AACpD,EAAA,MAAM,UAAA,GAAa,KAAA,CAAM,MAAA,CAAO,OAAO,CAAA;AACvC,EAAA,KAAA,CAAM,UAAU,MAAM;AAClB,IAAA,UAAA,CAAW,OAAA,GAAU,OAAA;AACrB,IAAA,IAAI,OAAA,a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"],"sourcesContent":["import React from \"react\";\nimport {Modal, Pressable, StyleSheet, View} from \"react-native\";\nimport Animated, {Easing, FadeIn, FadeOut, runOnJS, ZoomIn, ZoomOut} from \"react-native-reanimated\";\nimport {useSafeAreaInsets} from \"react-native-safe-area-context\";\nimport {Icon, Text} from \"../../../_compat\";\nimport type {IConfirmDialogProps} from \"@lmb-it/kitsconcerto-types\";\nimport {useKitsTheme} from \"../../../contexts/Theme\";\nimport {useSeverityColors, useAllSeverityColors} from \"../../../hooks/useSeverityColors\";\nimport {useResolvedStyle} from \"../../../hooks\";\nimport {overlayAnimations as anim, scrimExitDuration} from \"../../../animations\";\nimport {sheetEnter, sheetExit} from \"../sheetMotion\";\n\n/**\n * Keeps the RN Modal mounted through the exit animation. `visible` drives the\n * inner scrim + panel entering/exiting; the Modal itself stays mounted until\n * the panel's exit animation reports finished, then unmounts.\n *\n * Re-entrancy: a new `visible=true` during an exit cancels the panel's exit\n * (reanimated reports `finished=false`, so the unmount is skipped) and the\n * inner re-enters cleanly; `visibleRef` is a second guard for the case where\n * the exit had already completed.\n */\nfunction useOverlayPresence(visible: boolean) {\n const [mounted, setMounted] = React.useState(visible);\n const visibleRef = React.useRef(visible);\n React.useEffect(() => {\n visibleRef.current = visible;\n if (visible) setMounted(true);\n }, [visible]);\n // Runs on the JS thread (dispatched via runOnJS from the exit worklet).\n const handleExitFinished = React.useCallback(() => {\n if (!visibleRef.current) setMounted(false);\n }, []);\n return {mounted, handleExitFinished};\n}\n\nexport default function KitsConfirm(props: IConfirmDialogProps) {\n const {\n visible,\n header,\n message,\n icon,\n type = \"secondary\",\n accept,\n reject,\n acceptLabel = \"Accept\",\n rejectLabel = \"Reject\",\n buttons,\n headless,\n defaultUI,\n async: asyncMode,\n onHide,\n content,\n children,\n position = \"center\",\n style,\n contentStyle,\n headerStyle,\n maskStyle,\n // LEGIT-PLATFORM-ONLY (web): acceptIcon/rejectIcon take PrimeReact\n // icon classes ('pi pi-*') with no native rendering path — use the\n // `buttons` array for custom native actions. acceptClassName/\n // rejectClassName are CSS classes; appendTo is a DOM portal target.\n ...rest\n } = props;\n\n const {resolveToken, theme} = useKitsTheme();\n const colors = useSeverityColors(type);\n const allColors = useAllSeverityColors();\n const insets = useSafeAreaInsets();\n\n const surfaceColor = resolveToken('surface-card');\n const textColor = resolveToken('text');\n const subtextColor = resolveToken('gray.500');\n const grabberColor = resolveToken('gray.300');\n // Scrim via the literal alpha overlay token → rgba(0,0,0,0.4) in both modes.\n const scrimColor = resolveToken('black-alpha-40');\n const brandLogo = type === 'brand' ? theme.config.logo : null;\n\n const resolvedStyle = useResolvedStyle(style || {});\n const resolvedContentStyle = useResolvedStyle(contentStyle || {});\n const resolvedHeaderStyle = useResolvedStyle(headerStyle || {});\n const resolvedMaskStyle = useResolvedStyle(maskStyle || {});\n\n const {mounted, handleExitFinished} = useOverlayPresence(!!visible);\n if (!mounted) return null;\n\n const isSheet = position === 'bottom';\n const hide = () => onHide?.('hide');\n\n const doClick = async (callback?: () => void) => {\n if (asyncMode) {\n await callback?.();\n hide();\n } else {\n hide();\n callback?.();\n }\n };\n\n const showIcon = icon != null || brandLogo != null;\n // Panel always uses surface-card. Severity (danger/success/...) only colours\n // the icon bubble and the action button — not the whole panel — otherwise\n // a danger confirm renders as a red wash with the underlying screen\n // bleeding through.\n const panelBg = surfaceColor;\n\n // Shared action row. `stretch` makes each button flex:1 (bottom-sheet,\n // full-width). The default accept/reject pair is ordered accept-first in the\n // centered card but reject-first (Cancel | Confirm) in the sheet, matching\n // the platform-native bottom-sheet convention.\n const renderActions = (stretch: boolean) => {\n if (buttons?.length) {\n return (\n <View style={styles.buttonRow}>\n {buttons.map((b, i) => {\n const btnColor = allColors[b.type ?? type]?.solid ?? colors.solid;\n return (\n <Pressable\n key={i}\n disabled={b.disabled}\n style={[\n styles.actionBtn,\n stretch && styles.actionBtnSheet,\n stretch && {flex: 1},\n b.outlined\n ? {backgroundColor: \"transparent\", borderColor: btnColor, borderWidth: 1.5}\n : {backgroundColor: btnColor},\n b.rounded && {borderRadius: 999},\n b.disabled && {opacity: 0.5},\n ]}\n onPress={() => b.onClick(hide, accept, reject)}\n >\n <Text style={{\n color: b.outlined ? btnColor : \"#fff\",\n fontWeight: \"600\",\n fontSize: 14,\n }}>\n {b.title}\n </Text>\n </Pressable>\n );\n })}\n </View>\n );\n }\n\n const acceptBtn = (\n <Pressable\n key=\"accept\"\n style={[styles.actionBtn, stretch && styles.actionBtnSheet, {backgroundColor: colors.solid, flex: 1}]}\n onPress={() => doClick(accept)}\n >\n <Text style={styles.btnTextPrimary}>{acceptLabel}</Text>\n </Pressable>\n );\n const rejectBtn = !defaultUI ? (\n <Pressable\n key=\"reject\"\n style={[styles.actionBtn, styles.actionBtnOutlined, stretch && styles.actionBtnSheet, {borderColor: colors.solid, flex: 1}]}\n onPress={() => doClick(reject)}\n >\n <Text style={[styles.btnTextOutlined, {color: colors.solid}]}>{rejectLabel}</Text>\n </Pressable>\n ) : null;\n\n return (\n <View style={styles.buttonRow}>\n {stretch ? <>{rejectBtn}{acceptBtn}</> : <>{acceptBtn}{rejectBtn}</>}\n </View>\n );\n };\n\n // ── Bottom sheet ────────────────────────────────────────\n if (isSheet) {\n return (\n <Modal visible transparent animationType=\"none\" onRequestClose={hide}>\n {visible && (\n <Animated.View\n entering={FadeIn.duration(anim.scrim.enterDuration)}\n /* Contains the sheet — see `scrimExitDuration`. */\n exiting={FadeOut.duration(scrimExitDuration(anim.sheet.exitDuration))}\n style={[styles.sheetOverlay, {backgroundColor: scrimColor}, resolvedMaskStyle as any]}\n >\n <Pressable style={StyleSheet.absoluteFill} onPress={hide}/>\n <Animated.View\n /* ⛔ THE SAME FAULT AS `Dialog`'s SHEET, AND THE SAME ANSWER —\n see `../sheetMotion`. `SlideInDown` takes its travel from\n the window, and inside an RN `Modal` the window it measures\n is not the screen, so the panel is placed at rest on frame\n one. Measured on the Dialog, 30 September 2026; this file\n has the identical shape, so it takes the identical fix\n rather than a second one (§5).\n ⚠️ AND THIS FILE IS NOT YET WHOLE. Its panel is still a\n CHILD of the scrim above, so it still inherits the scrim's\n fade — the defect `Dialog` had corrected on 29 September and\n that was recorded then as this file's own next unit. The\n sheet will now slide AND fade here. That is better than not\n sliding, and it is still not the ruled motion. Not fixed in\n this unit, and not left unsaid. */\n entering={sheetEnter(anim.sheet.enter)}\n exiting={sheetExit(anim.sheet.exitDuration, handleExitFinished)}\n style={[\n styles.sheetPanel,\n {backgroundColor: panelBg, paddingBottom: 24 + insets.bottom},\n resolvedStyle as any,\n resolvedContentStyle as any,\n ]}\n >\n {/* Grabber */}\n <View style={[styles.grabber, {backgroundColor: grabberColor}]}/>\n\n {/* Header */}\n {header != null && (\n <Text style={[styles.sheetHeader, {color: textColor}, resolvedHeaderStyle as any]}>\n {header as React.ReactNode}\n </Text>\n )}\n\n {/* Message */}\n {message != null && (\n <Text style={[styles.sheetMessage, {color: subtextColor}]}>\n {message as React.ReactNode}\n </Text>\n )}\n\n {/* Injected item / extra content */}\n {children}\n\n {/* Actions */}\n {renderActions(true)}\n </Animated.View>\n </Animated.View>\n )}\n </Modal>\n );\n }\n\n // ── Content-only mode (prompt) ──────────────────────────\n if (content) {\n return (\n <Modal visible transparent animationType=\"none\" onRequestClose={hide}>\n {visible && (\n <Animated.View\n entering={FadeIn.duration(anim.scrim.enterDuration)}\n /* Contains the centred panel — see `scrimExitDuration`. */\n exiting={FadeOut.duration(scrimExitDuration(anim.confirm.exitDuration))}\n style={[styles.overlay, {backgroundColor: scrimColor}, resolvedMaskStyle as any]}\n >\n <Pressable style={StyleSheet.absoluteFill} onPress={hide}/>\n <Animated.View\n entering={ZoomIn.springify().damping(anim.confirm.content.damping).stiffness(anim.confirm.content.stiffness).mass(anim.confirm.content.mass ?? 1)}\n exiting={ZoomOut.duration(anim.confirm.exitDuration).easing(Easing.in(Easing.ease)).withCallback((finished) => {\n 'worklet';\n if (finished) runOnJS(handleExitFinished)();\n })}\n style={[\n styles.panel,\n {backgroundColor: surfaceColor, minWidth: 250, maxWidth: 380},\n resolvedStyle as any,\n resolvedContentStyle as any,\n ]}\n >\n {content as React.ReactNode}\n </Animated.View>\n </Animated.View>\n )}\n </Modal>\n );\n }\n\n return (\n <Modal visible transparent animationType=\"none\" onRequestClose={hide}>\n {visible && (\n <Animated.View\n entering={FadeIn.duration(anim.scrim.enterDuration)}\n /* Contains the centred panel — see `scrimExitDuration`. */\n exiting={FadeOut.duration(scrimExitDuration(anim.confirm.exitDuration))}\n style={[styles.overlay, {backgroundColor: scrimColor}, resolvedMaskStyle as any]}\n >\n <Pressable style={StyleSheet.absoluteFill} onPress={hide}/>\n\n {/* Card + icon stack: icon sits above the card */}\n <View style={styles.cardStack}>\n {/* Soft-circle icon bubble */}\n {showIcon && (\n <Animated.View\n entering={ZoomIn.springify().damping(anim.confirm.icon.damping).stiffness(anim.confirm.icon.stiffness).mass(anim.confirm.icon.mass ?? 1).delay(anim.confirm.icon.delay ?? 0)}\n exiting={ZoomOut.duration(anim.confirm.exitDuration).easing(Easing.in(Easing.ease))}\n style={[styles.iconBubble, {backgroundColor: colors.iconBg}]}\n >\n {brandLogo ? brandLogo : typeof icon === \"string\" ? (\n <Icon name={icon as never} size={'xl'} color={colors.iconFg}/>\n ) : (\n icon\n )}\n </Animated.View>\n )}\n\n {/* Panel */}\n <Animated.View\n entering={ZoomIn.springify().damping(anim.confirm.enter.damping).stiffness(anim.confirm.enter.stiffness).mass(anim.confirm.enter.mass ?? 1)}\n exiting={ZoomOut.duration(anim.confirm.exitDuration).easing(Easing.in(Easing.ease)).withCallback((finished) => {\n 'worklet';\n if (finished) runOnJS(handleExitFinished)();\n })}\n style={[\n styles.panel,\n {\n backgroundColor: panelBg,\n paddingTop: showIcon ? 48 : 24,\n gap: 10,\n },\n resolvedStyle as any,\n resolvedContentStyle as any,\n ]}\n >\n {/* Close button */}\n <Pressable style={styles.closeBtn} onPress={hide} hitSlop={12}>\n <Text style={{fontSize: 18, color: subtextColor}}>✕</Text>\n </Pressable>\n\n {/* Header */}\n {header != null && (\n <Text style={[styles.header, {color: textColor}, resolvedHeaderStyle as any]}>\n {header as React.ReactNode}\n </Text>\n )}\n\n {/* Message */}\n {message != null && (\n <Text style={[styles.message, {color: subtextColor}]}>\n {message as React.ReactNode}\n </Text>\n )}\n\n {/* Children */}\n {children}\n\n {/* Buttons */}\n {renderActions(false)}\n </Animated.View>\n </View>\n </Animated.View>\n )}\n </Modal>\n );\n}\n\nconst styles = StyleSheet.create({\n overlay: {\n flex: 1,\n justifyContent: \"center\",\n alignItems: \"center\",\n padding: 28,\n },\n sheetOverlay: {\n flex: 1,\n justifyContent: \"flex-end\",\n },\n sheetPanel: {\n // 24 == radii.2xl, top corners only (bottom stays square).\n borderTopLeftRadius: 24,\n borderTopRightRadius: 24,\n paddingHorizontal: 24,\n paddingTop: 10,\n gap: 14,\n // Subtle elevation (upward for a sheet): low opacity, wide blur, minimal offset.\n elevation: 6,\n shadowColor: \"#000\",\n shadowOffset: {width: 0, height: -2},\n shadowOpacity: 0.15,\n shadowRadius: 20,\n },\n grabber: {\n width: 40,\n height: 5,\n borderRadius: 999,\n alignSelf: \"center\",\n marginBottom: 6,\n },\n sheetHeader: {\n fontSize: 24,\n fontWeight: \"700\",\n textAlign: \"left\",\n },\n sheetMessage: {\n fontSize: 15,\n lineHeight: 22,\n textAlign: \"left\",\n },\n cardStack: {\n minWidth: 250,\n maxWidth: 380,\n alignItems: \"center\",\n },\n iconBubble: {\n width: 72,\n height: 72,\n borderRadius: 36,\n justifyContent: \"center\",\n alignItems: \"center\",\n zIndex: 2,\n marginBottom: -36,\n elevation: 8,\n shadowColor: \"#000\",\n shadowOffset: {width: 0, height: 4},\n shadowOpacity: 0.15,\n shadowRadius: 8,\n },\n panel: {\n alignSelf: \"stretch\",\n // 20 == radii.xl. Side padding (24) == bottom padding (24) for even rhythm.\n borderRadius: 20,\n paddingHorizontal: 24,\n paddingBottom: 24,\n // Subtle elevation: low opacity, wide blur, minimal offset.\n elevation: 6,\n shadowColor: \"#000\",\n shadowOffset: {width: 0, height: 2},\n shadowOpacity: 0.15,\n shadowRadius: 20,\n alignItems: \"center\",\n },\n closeBtn: {\n position: \"absolute\",\n top: 12,\n right: 14,\n zIndex: 3,\n },\n header: {\n fontSize: 22,\n fontWeight: \"700\",\n textAlign: \"center\",\n marginBottom: 8,\n },\n message: {\n fontSize: 14,\n textAlign: \"center\",\n lineHeight: 20,\n // Tightened so top/bottom whitespace around the actions reads balanced.\n marginBottom: 16,\n },\n buttonRow: {\n flexDirection: \"row\",\n justifyContent: \"center\",\n gap: 12,\n width: \"100%\",\n },\n actionBtn: {\n paddingVertical: 12,\n paddingHorizontal: 24,\n // Pill (== radii.pill). Buttons here are raw Pressables, not kits Button,\n // so the pill comes from borderRadius — the pattern the `buttons` array\n // path (`b.rounded && {borderRadius: 999}`) already uses in this file.\n borderRadius: 999,\n minWidth: 100,\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n // Taller buttons for the bottom-sheet action row (pill shape shared).\n actionBtnSheet: {\n paddingVertical: 16,\n borderRadius: 999,\n },\n actionBtnOutlined: {\n backgroundColor: \"transparent\",\n borderWidth: 1.5,\n },\n btnTextPrimary: {\n color: \"#fff\",\n fontWeight: \"600\",\n fontSize: 14,\n },\n btnTextOutlined: {\n fontWeight: \"600\",\n fontSize: 14,\n },\n});\n"],"names":["useKitsTheme","useSeverityColors","useAllSeverityColors","useSafeAreaInsets","useResolvedStyle","jsx","View","Pressable","Text","jsxs","Fragment","Modal","FadeIn","anim","FadeOut","scrimExitDuration","StyleSheet","sheetEnter","sheetExit","ZoomIn","ZoomOut","Easing","runOnJS","Icon"],"mappings":";;;;;;;;;;;;;;;;;;AAsBA,SAAS,mBAAmB,OAAA,EAAkB;AAC1C,EAAA,MAAM,CAAC,OAAA,EAAS,UAAU,CAAA,GAAI,KAAA,CAAM,SAAS,OAAO,CAAA;AACpD,EAAA,MAAM,UAAA,GAAa,KAAA,CAAM,MAAA,CAAO,OAAO,CAAA;AACvC,EAAA,KAAA,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AAA;AAAA,IACV,SAAA,EAAW,QAAA;AAAA,IACX,UAAA,EAAY,EAAA;AAAA;AAAA,IAEZ,YAAA,EAAc;AAAA,GAClB;AAAA,EACA,SAAA,EAAW;AAAA,IACP,aAAA,EAAe,KAAA;AAAA,IACf,cAAA,EAAgB,QAAA;AAAA,IAChB,GAAA,EAAK,EAAA;AAAA,IACL,KAAA,EAAO;AAAA,GACX;AAAA,EACA,SAAA,EAAW;AAAA,IACP,eAAA,EAAiB,EAAA;AAAA,IACjB,iBAAA,EAAmB,EAAA;AAAA;AAAA;AAAA;AAAA,IAInB,YAAA,EAAc,GAAA;AAAA,IACd,QAAA,EAAU,GAAA;AAAA,IACV,UAAA,EAAY,QAAA;AAAA,IACZ,cAAA,EAAgB;AAAA,GACpB;AAAA;AAAA,EAEA,cAAA,EAAgB;AAAA,IACZ,eAAA,EAAiB,EAAA;AAAA,IACjB,YAAA,EAAc;AAAA,GAClB;AAAA,EACA,iBAAA,EAAmB;AAAA,IACf,eAAA,EAAiB,aAAA;AAAA,IACjB,WAAA,EAAa;AAAA,GACjB;AAAA,EACA,cAAA,EAAgB;AAAA,IACZ,KAAA,EAAO,MAAA;AAAA,IACP,UAAA,EAAY,KAAA;AAAA,IACZ,QAAA,EAAU;AAAA,GACd;AAAA,EACA,eAAA,EAAiB;AAAA,IACb,UAAA,EAAY,KAAA;AAAA,IACZ,QAAA,EAAU;AAAA;AAElB,CAAC,CAAA;;;;"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Modal, Pressable, StyleSheet, View } from 'react-native';
|
|
4
|
-
import Animated, {
|
|
4
|
+
import Animated, { FadeOut, FadeIn, ZoomOut, Easing, runOnJS, ZoomIn } from 'react-native-reanimated';
|
|
5
5
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
6
6
|
import { useSeverityColors, useAllSeverityColors } from '../../../hooks/useSeverityColors.js';
|
|
7
7
|
import '../../../contexts/DialogContext.js';
|
|
8
8
|
import useResolvedStyle from '../../../hooks/useResolvedStyle.js';
|
|
9
|
-
import {
|
|
9
|
+
import { scrimExitDuration, overlayAnimations } from '../../../animations/index.js';
|
|
10
|
+
import { sheetExit, sheetEnter } from '../sheetMotion.js';
|
|
10
11
|
import { useKitsTheme } from '../../../contexts/Theme/KitsThemeProvider.js';
|
|
11
12
|
import Text from '../../../primitives/Text/index.js';
|
|
12
13
|
import { Icon } from '../../../primitives/Icon/index.js';
|
|
@@ -146,11 +147,8 @@ function KitsConfirm(props) {
|
|
|
146
147
|
/* @__PURE__ */ jsxs(
|
|
147
148
|
Animated.View,
|
|
148
149
|
{
|
|
149
|
-
entering:
|
|
150
|
-
exiting:
|
|
151
|
-
"worklet";
|
|
152
|
-
if (finished) runOnJS(handleExitFinished)();
|
|
153
|
-
}),
|
|
150
|
+
entering: sheetEnter(overlayAnimations.sheet.enter),
|
|
151
|
+
exiting: sheetExit(overlayAnimations.sheet.exitDuration, handleExitFinished),
|
|
154
152
|
style: [
|
|
155
153
|
styles.sheetPanel,
|
|
156
154
|
{ backgroundColor: panelBg, paddingBottom: 24 + insets.bottom },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/components/overlay/ConfirmDialog/index.native.tsx"],"sourcesContent":["import React from \"react\";\nimport {Modal, Pressable, StyleSheet, View} from \"react-native\";\nimport Animated, {Easing, FadeIn, FadeOut, runOnJS, SlideInDown, SlideOutDown, ZoomIn, ZoomOut} from \"react-native-reanimated\";\nimport {useSafeAreaInsets} from \"react-native-safe-area-context\";\nimport {Icon, Text} from \"../../../_compat\";\nimport type {IConfirmDialogProps} from \"@lmb-it/kitsconcerto-types\";\nimport {useKitsTheme} from \"../../../contexts/Theme\";\nimport {useSeverityColors, useAllSeverityColors} from \"../../../hooks/useSeverityColors\";\nimport {useResolvedStyle} from \"../../../hooks\";\nimport {overlayAnimations as anim, scrimExitDuration} from \"../../../animations\";\n\n/**\n * Keeps the RN Modal mounted through the exit animation. `visible` drives the\n * inner scrim + panel entering/exiting; the Modal itself stays mounted until\n * the panel's exit animation reports finished, then unmounts.\n *\n * Re-entrancy: a new `visible=true` during an exit cancels the panel's exit\n * (reanimated reports `finished=false`, so the unmount is skipped) and the\n * inner re-enters cleanly; `visibleRef` is a second guard for the case where\n * the exit had already completed.\n */\nfunction useOverlayPresence(visible: boolean) {\n const [mounted, setMounted] = React.useState(visible);\n const visibleRef = React.useRef(visible);\n React.useEffect(() => {\n visibleRef.current = visible;\n if (visible) setMounted(true);\n }, [visible]);\n // Runs on the JS thread (dispatched via runOnJS from the exit worklet).\n const handleExitFinished = React.useCallback(() => {\n if (!visibleRef.current) setMounted(false);\n }, []);\n return {mounted, handleExitFinished};\n}\n\nexport default function KitsConfirm(props: IConfirmDialogProps) {\n const {\n visible,\n header,\n message,\n icon,\n type = \"secondary\",\n accept,\n reject,\n acceptLabel = \"Accept\",\n rejectLabel = \"Reject\",\n buttons,\n headless,\n defaultUI,\n async: asyncMode,\n onHide,\n content,\n children,\n position = \"center\",\n style,\n contentStyle,\n headerStyle,\n maskStyle,\n // LEGIT-PLATFORM-ONLY (web): acceptIcon/rejectIcon take PrimeReact\n // icon classes ('pi pi-*') with no native rendering path — use the\n // `buttons` array for custom native actions. acceptClassName/\n // rejectClassName are CSS classes; appendTo is a DOM portal target.\n ...rest\n } = props;\n\n const {resolveToken, theme} = useKitsTheme();\n const colors = useSeverityColors(type);\n const allColors = useAllSeverityColors();\n const insets = useSafeAreaInsets();\n\n const surfaceColor = resolveToken('surface-card');\n const textColor = resolveToken('text');\n const subtextColor = resolveToken('gray.500');\n const grabberColor = resolveToken('gray.300');\n // Scrim via the literal alpha overlay token → rgba(0,0,0,0.4) in both modes.\n const scrimColor = resolveToken('black-alpha-40');\n const brandLogo = type === 'brand' ? theme.config.logo : null;\n\n const resolvedStyle = useResolvedStyle(style || {});\n const resolvedContentStyle = useResolvedStyle(contentStyle || {});\n const resolvedHeaderStyle = useResolvedStyle(headerStyle || {});\n const resolvedMaskStyle = useResolvedStyle(maskStyle || {});\n\n const {mounted, handleExitFinished} = useOverlayPresence(!!visible);\n if (!mounted) return null;\n\n const isSheet = position === 'bottom';\n const hide = () => onHide?.('hide');\n\n const doClick = async (callback?: () => void) => {\n if (asyncMode) {\n await callback?.();\n hide();\n } else {\n hide();\n callback?.();\n }\n };\n\n const showIcon = icon != null || brandLogo != null;\n // Panel always uses surface-card. Severity (danger/success/...) only colours\n // the icon bubble and the action button — not the whole panel — otherwise\n // a danger confirm renders as a red wash with the underlying screen\n // bleeding through.\n const panelBg = surfaceColor;\n\n // Shared action row. `stretch` makes each button flex:1 (bottom-sheet,\n // full-width). The default accept/reject pair is ordered accept-first in the\n // centered card but reject-first (Cancel | Confirm) in the sheet, matching\n // the platform-native bottom-sheet convention.\n const renderActions = (stretch: boolean) => {\n if (buttons?.length) {\n return (\n <View style={styles.buttonRow}>\n {buttons.map((b, i) => {\n const btnColor = allColors[b.type ?? type]?.solid ?? colors.solid;\n return (\n <Pressable\n key={i}\n disabled={b.disabled}\n style={[\n styles.actionBtn,\n stretch && styles.actionBtnSheet,\n stretch && {flex: 1},\n b.outlined\n ? {backgroundColor: \"transparent\", borderColor: btnColor, borderWidth: 1.5}\n : {backgroundColor: btnColor},\n b.rounded && {borderRadius: 999},\n b.disabled && {opacity: 0.5},\n ]}\n onPress={() => b.onClick(hide, accept, reject)}\n >\n <Text style={{\n color: b.outlined ? btnColor : \"#fff\",\n fontWeight: \"600\",\n fontSize: 14,\n }}>\n {b.title}\n </Text>\n </Pressable>\n );\n })}\n </View>\n );\n }\n\n const acceptBtn = (\n <Pressable\n key=\"accept\"\n style={[styles.actionBtn, stretch && styles.actionBtnSheet, {backgroundColor: colors.solid, flex: 1}]}\n onPress={() => doClick(accept)}\n >\n <Text style={styles.btnTextPrimary}>{acceptLabel}</Text>\n </Pressable>\n );\n const rejectBtn = !defaultUI ? (\n <Pressable\n key=\"reject\"\n style={[styles.actionBtn, styles.actionBtnOutlined, stretch && styles.actionBtnSheet, {borderColor: colors.solid, flex: 1}]}\n onPress={() => doClick(reject)}\n >\n <Text style={[styles.btnTextOutlined, {color: colors.solid}]}>{rejectLabel}</Text>\n </Pressable>\n ) : null;\n\n return (\n <View style={styles.buttonRow}>\n {stretch ? <>{rejectBtn}{acceptBtn}</> : <>{acceptBtn}{rejectBtn}</>}\n </View>\n );\n };\n\n // ── Bottom sheet ────────────────────────────────────────\n if (isSheet) {\n return (\n <Modal visible transparent animationType=\"none\" onRequestClose={hide}>\n {visible && (\n <Animated.View\n entering={FadeIn.duration(anim.scrim.enterDuration)}\n /* Contains the sheet — see `scrimExitDuration`. */\n exiting={FadeOut.duration(scrimExitDuration(anim.sheet.exitDuration))}\n style={[styles.sheetOverlay, {backgroundColor: scrimColor}, resolvedMaskStyle as any]}\n >\n <Pressable style={StyleSheet.absoluteFill} onPress={hide}/>\n <Animated.View\n entering={SlideInDown.springify().damping(anim.sheet.enter.damping).stiffness(anim.sheet.enter.stiffness).mass(anim.sheet.enter.mass ?? 1)}\n exiting={SlideOutDown.duration(anim.sheet.exitDuration).easing(Easing.in(Easing.ease)).withCallback((finished) => {\n 'worklet';\n if (finished) runOnJS(handleExitFinished)();\n })}\n style={[\n styles.sheetPanel,\n {backgroundColor: panelBg, paddingBottom: 24 + insets.bottom},\n resolvedStyle as any,\n resolvedContentStyle as any,\n ]}\n >\n {/* Grabber */}\n <View style={[styles.grabber, {backgroundColor: grabberColor}]}/>\n\n {/* Header */}\n {header != null && (\n <Text style={[styles.sheetHeader, {color: textColor}, resolvedHeaderStyle as any]}>\n {header as React.ReactNode}\n </Text>\n )}\n\n {/* Message */}\n {message != null && (\n <Text style={[styles.sheetMessage, {color: subtextColor}]}>\n {message as React.ReactNode}\n </Text>\n )}\n\n {/* Injected item / extra content */}\n {children}\n\n {/* Actions */}\n {renderActions(true)}\n </Animated.View>\n </Animated.View>\n )}\n </Modal>\n );\n }\n\n // ── Content-only mode (prompt) ──────────────────────────\n if (content) {\n return (\n <Modal visible transparent animationType=\"none\" onRequestClose={hide}>\n {visible && (\n <Animated.View\n entering={FadeIn.duration(anim.scrim.enterDuration)}\n /* Contains the centred panel — see `scrimExitDuration`. */\n exiting={FadeOut.duration(scrimExitDuration(anim.confirm.exitDuration))}\n style={[styles.overlay, {backgroundColor: scrimColor}, resolvedMaskStyle as any]}\n >\n <Pressable style={StyleSheet.absoluteFill} onPress={hide}/>\n <Animated.View\n entering={ZoomIn.springify().damping(anim.confirm.content.damping).stiffness(anim.confirm.content.stiffness).mass(anim.confirm.content.mass ?? 1)}\n exiting={ZoomOut.duration(anim.confirm.exitDuration).easing(Easing.in(Easing.ease)).withCallback((finished) => {\n 'worklet';\n if (finished) runOnJS(handleExitFinished)();\n })}\n style={[\n styles.panel,\n {backgroundColor: surfaceColor, minWidth: 250, maxWidth: 380},\n resolvedStyle as any,\n resolvedContentStyle as any,\n ]}\n >\n {content as React.ReactNode}\n </Animated.View>\n </Animated.View>\n )}\n </Modal>\n );\n }\n\n return (\n <Modal visible transparent animationType=\"none\" onRequestClose={hide}>\n {visible && (\n <Animated.View\n entering={FadeIn.duration(anim.scrim.enterDuration)}\n /* Contains the centred panel — see `scrimExitDuration`. */\n exiting={FadeOut.duration(scrimExitDuration(anim.confirm.exitDuration))}\n style={[styles.overlay, {backgroundColor: scrimColor}, resolvedMaskStyle as any]}\n >\n <Pressable style={StyleSheet.absoluteFill} onPress={hide}/>\n\n {/* Card + icon stack: icon sits above the card */}\n <View style={styles.cardStack}>\n {/* Soft-circle icon bubble */}\n {showIcon && (\n <Animated.View\n entering={ZoomIn.springify().damping(anim.confirm.icon.damping).stiffness(anim.confirm.icon.stiffness).mass(anim.confirm.icon.mass ?? 1).delay(anim.confirm.icon.delay ?? 0)}\n exiting={ZoomOut.duration(anim.confirm.exitDuration).easing(Easing.in(Easing.ease))}\n style={[styles.iconBubble, {backgroundColor: colors.iconBg}]}\n >\n {brandLogo ? brandLogo : typeof icon === \"string\" ? (\n <Icon name={icon as never} size={'xl'} color={colors.iconFg}/>\n ) : (\n icon\n )}\n </Animated.View>\n )}\n\n {/* Panel */}\n <Animated.View\n entering={ZoomIn.springify().damping(anim.confirm.enter.damping).stiffness(anim.confirm.enter.stiffness).mass(anim.confirm.enter.mass ?? 1)}\n exiting={ZoomOut.duration(anim.confirm.exitDuration).easing(Easing.in(Easing.ease)).withCallback((finished) => {\n 'worklet';\n if (finished) runOnJS(handleExitFinished)();\n })}\n style={[\n styles.panel,\n {\n backgroundColor: panelBg,\n paddingTop: showIcon ? 48 : 24,\n gap: 10,\n },\n resolvedStyle as any,\n resolvedContentStyle as any,\n ]}\n >\n {/* Close button */}\n <Pressable style={styles.closeBtn} onPress={hide} hitSlop={12}>\n <Text style={{fontSize: 18, color: subtextColor}}>✕</Text>\n </Pressable>\n\n {/* Header */}\n {header != null && (\n <Text style={[styles.header, {color: textColor}, resolvedHeaderStyle as any]}>\n {header as React.ReactNode}\n </Text>\n )}\n\n {/* Message */}\n {message != null && (\n <Text style={[styles.message, {color: subtextColor}]}>\n {message as React.ReactNode}\n </Text>\n )}\n\n {/* Children */}\n {children}\n\n {/* Buttons */}\n {renderActions(false)}\n </Animated.View>\n </View>\n </Animated.View>\n )}\n </Modal>\n );\n}\n\nconst styles = StyleSheet.create({\n overlay: {\n flex: 1,\n justifyContent: \"center\",\n alignItems: \"center\",\n padding: 28,\n },\n sheetOverlay: {\n flex: 1,\n justifyContent: \"flex-end\",\n },\n sheetPanel: {\n // 24 == radii.2xl, top corners only (bottom stays square).\n borderTopLeftRadius: 24,\n borderTopRightRadius: 24,\n paddingHorizontal: 24,\n paddingTop: 10,\n gap: 14,\n // Subtle elevation (upward for a sheet): low opacity, wide blur, minimal offset.\n elevation: 6,\n shadowColor: \"#000\",\n shadowOffset: {width: 0, height: -2},\n shadowOpacity: 0.15,\n shadowRadius: 20,\n },\n grabber: {\n width: 40,\n height: 5,\n borderRadius: 999,\n alignSelf: \"center\",\n marginBottom: 6,\n },\n sheetHeader: {\n fontSize: 24,\n fontWeight: \"700\",\n textAlign: \"left\",\n },\n sheetMessage: {\n fontSize: 15,\n lineHeight: 22,\n textAlign: \"left\",\n },\n cardStack: {\n minWidth: 250,\n maxWidth: 380,\n alignItems: \"center\",\n },\n iconBubble: {\n width: 72,\n height: 72,\n borderRadius: 36,\n justifyContent: \"center\",\n alignItems: \"center\",\n zIndex: 2,\n marginBottom: -36,\n elevation: 8,\n shadowColor: \"#000\",\n shadowOffset: {width: 0, height: 4},\n shadowOpacity: 0.15,\n shadowRadius: 8,\n },\n panel: {\n alignSelf: \"stretch\",\n // 20 == radii.xl. Side padding (24) == bottom padding (24) for even rhythm.\n borderRadius: 20,\n paddingHorizontal: 24,\n paddingBottom: 24,\n // Subtle elevation: low opacity, wide blur, minimal offset.\n elevation: 6,\n shadowColor: \"#000\",\n shadowOffset: {width: 0, height: 2},\n shadowOpacity: 0.15,\n shadowRadius: 20,\n alignItems: \"center\",\n },\n closeBtn: {\n position: \"absolute\",\n top: 12,\n right: 14,\n zIndex: 3,\n },\n header: {\n fontSize: 22,\n fontWeight: \"700\",\n textAlign: \"center\",\n marginBottom: 8,\n },\n message: {\n fontSize: 14,\n textAlign: \"center\",\n lineHeight: 20,\n // Tightened so top/bottom whitespace around the actions reads balanced.\n marginBottom: 16,\n },\n buttonRow: {\n flexDirection: \"row\",\n justifyContent: \"center\",\n gap: 12,\n width: \"100%\",\n },\n actionBtn: {\n paddingVertical: 12,\n paddingHorizontal: 24,\n // Pill (== radii.pill). Buttons here are raw Pressables, not kits Button,\n // so the pill comes from borderRadius — the pattern the `buttons` array\n // path (`b.rounded && {borderRadius: 999}`) already uses in this file.\n borderRadius: 999,\n minWidth: 100,\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n // Taller buttons for the bottom-sheet action row (pill shape shared).\n actionBtnSheet: {\n paddingVertical: 16,\n borderRadius: 999,\n },\n actionBtnOutlined: {\n backgroundColor: \"transparent\",\n borderWidth: 1.5,\n },\n btnTextPrimary: {\n color: \"#fff\",\n fontWeight: \"600\",\n fontSize: 14,\n },\n btnTextOutlined: {\n fontWeight: \"600\",\n fontSize: 14,\n },\n});\n"],"names":["anim"],"mappings":";;;;;;;;;;;;;AAqBA,SAAS,mBAAmB,OAAA,EAAkB;AAC1C,EAAA,MAAM,CAAC,OAAA,EAAS,UAAU,CAAA,GAAI,KAAA,CAAM,SAAS,OAAO,CAAA;AACpD,EAAA,MAAM,UAAA,GAAa,KAAA,CAAM,MAAA,CAAO,OAAO,CAAA;AACvC,EAAA,KAAA,CAAM,UAAU,MAAM;AAClB,IAAA,UAAA,CAAW,OAAA,GAAU,OAAA;AACrB,IAAA,IAAI,OAAA,aAAoB,IAAI,CAAA;AAAA,EAChC,CAAA,EAAG,CAAC,OAAO,CAAC,CAAA;AAEZ,EAAA,MAAM,kBAAA,GAAqB,KAAA,CAAM,WAAA,CAAY,MAAM;AAC/C,IAAA,IAAI,CAAC,UAAA,CAAW,OAAA,EAAS,UAAA,CAAW,KAAK,CAAA;AAAA,EAC7C,CAAA,EAAG,EAAE,CAAA;AACL,EAAA,OAAO,EAAC,SAAS,kBAAA,EAAkB;AACvC;AAEA,SAAwB,YAAY,KAAA,EAA4B;AAC5D,EAAA,MAAM;AAAA,IACF,OAAA;AAAA,IACA,MAAA;AAAA,IACA,OAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA,GAAO,WAAA;AAAA,IACP,MAAA;AAAA,IACA,MAAA;AAAA,IACA,WAAA,GAAc,QAAA;AAAA,IACd,WAAA,GAAc,QAAA;AAAA,IACd,OAAA;AAAA,IACA,QAAA;AAAA,IACA,SAAA;AAAA,IACA,KAAA,EAAO,SAAA;AAAA,IACP,MAAA;AAAA,IACA,OAAA;AAAA,IACA,QAAA;AAAA,IACA,QAAA,GAAW,QAAA;AAAA,IACX,KAAA;AAAA,IACA,YAAA;AAAA,IACA,WAAA;AAAA,IACA,SAAA;AAAA;AAAA;AAAA;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jB,WAAA,EAAa;AAAA,GACjB;AAAA,EACA,cAAA,EAAgB;AAAA,IACZ,KAAA,EAAO,MAAA;AAAA,IACP,UAAA,EAAY,KAAA;AAAA,IACZ,QAAA,EAAU;AAAA,GACd;AAAA,EACA,eAAA,EAAiB;AAAA,IACb,UAAA,EAAY,KAAA;AAAA,IACZ,QAAA,EAAU;AAAA;AAElB,CAAC,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/components/overlay/ConfirmDialog/index.native.tsx"],"sourcesContent":["import React from \"react\";\nimport {Modal, Pressable, StyleSheet, View} from \"react-native\";\nimport Animated, {Easing, FadeIn, FadeOut, runOnJS, ZoomIn, ZoomOut} from \"react-native-reanimated\";\nimport {useSafeAreaInsets} from \"react-native-safe-area-context\";\nimport {Icon, Text} from \"../../../_compat\";\nimport type {IConfirmDialogProps} from \"@lmb-it/kitsconcerto-types\";\nimport {useKitsTheme} from \"../../../contexts/Theme\";\nimport {useSeverityColors, useAllSeverityColors} from \"../../../hooks/useSeverityColors\";\nimport {useResolvedStyle} from \"../../../hooks\";\nimport {overlayAnimations as anim, scrimExitDuration} from \"../../../animations\";\nimport {sheetEnter, sheetExit} from \"../sheetMotion\";\n\n/**\n * Keeps the RN Modal mounted through the exit animation. `visible` drives the\n * inner scrim + panel entering/exiting; the Modal itself stays mounted until\n * the panel's exit animation reports finished, then unmounts.\n *\n * Re-entrancy: a new `visible=true` during an exit cancels the panel's exit\n * (reanimated reports `finished=false`, so the unmount is skipped) and the\n * inner re-enters cleanly; `visibleRef` is a second guard for the case where\n * the exit had already completed.\n */\nfunction useOverlayPresence(visible: boolean) {\n const [mounted, setMounted] = React.useState(visible);\n const visibleRef = React.useRef(visible);\n React.useEffect(() => {\n visibleRef.current = visible;\n if (visible) setMounted(true);\n }, [visible]);\n // Runs on the JS thread (dispatched via runOnJS from the exit worklet).\n const handleExitFinished = React.useCallback(() => {\n if (!visibleRef.current) setMounted(false);\n }, []);\n return {mounted, handleExitFinished};\n}\n\nexport default function KitsConfirm(props: IConfirmDialogProps) {\n const {\n visible,\n header,\n message,\n icon,\n type = \"secondary\",\n accept,\n reject,\n acceptLabel = \"Accept\",\n rejectLabel = \"Reject\",\n buttons,\n headless,\n defaultUI,\n async: asyncMode,\n onHide,\n content,\n children,\n position = \"center\",\n style,\n contentStyle,\n headerStyle,\n maskStyle,\n // LEGIT-PLATFORM-ONLY (web): acceptIcon/rejectIcon take PrimeReact\n // icon classes ('pi pi-*') with no native rendering path — use the\n // `buttons` array for custom native actions. acceptClassName/\n // rejectClassName are CSS classes; appendTo is a DOM portal target.\n ...rest\n } = props;\n\n const {resolveToken, theme} = useKitsTheme();\n const colors = useSeverityColors(type);\n const allColors = useAllSeverityColors();\n const insets = useSafeAreaInsets();\n\n const surfaceColor = resolveToken('surface-card');\n const textColor = resolveToken('text');\n const subtextColor = resolveToken('gray.500');\n const grabberColor = resolveToken('gray.300');\n // Scrim via the literal alpha overlay token → rgba(0,0,0,0.4) in both modes.\n const scrimColor = resolveToken('black-alpha-40');\n const brandLogo = type === 'brand' ? theme.config.logo : null;\n\n const resolvedStyle = useResolvedStyle(style || {});\n const resolvedContentStyle = useResolvedStyle(contentStyle || {});\n const resolvedHeaderStyle = useResolvedStyle(headerStyle || {});\n const resolvedMaskStyle = useResolvedStyle(maskStyle || {});\n\n const {mounted, handleExitFinished} = useOverlayPresence(!!visible);\n if (!mounted) return null;\n\n const isSheet = position === 'bottom';\n const hide = () => onHide?.('hide');\n\n const doClick = async (callback?: () => void) => {\n if (asyncMode) {\n await callback?.();\n hide();\n } else {\n hide();\n callback?.();\n }\n };\n\n const showIcon = icon != null || brandLogo != null;\n // Panel always uses surface-card. Severity (danger/success/...) only colours\n // the icon bubble and the action button — not the whole panel — otherwise\n // a danger confirm renders as a red wash with the underlying screen\n // bleeding through.\n const panelBg = surfaceColor;\n\n // Shared action row. `stretch` makes each button flex:1 (bottom-sheet,\n // full-width). The default accept/reject pair is ordered accept-first in the\n // centered card but reject-first (Cancel | Confirm) in the sheet, matching\n // the platform-native bottom-sheet convention.\n const renderActions = (stretch: boolean) => {\n if (buttons?.length) {\n return (\n <View style={styles.buttonRow}>\n {buttons.map((b, i) => {\n const btnColor = allColors[b.type ?? type]?.solid ?? colors.solid;\n return (\n <Pressable\n key={i}\n disabled={b.disabled}\n style={[\n styles.actionBtn,\n stretch && styles.actionBtnSheet,\n stretch && {flex: 1},\n b.outlined\n ? {backgroundColor: \"transparent\", borderColor: btnColor, borderWidth: 1.5}\n : {backgroundColor: btnColor},\n b.rounded && {borderRadius: 999},\n b.disabled && {opacity: 0.5},\n ]}\n onPress={() => b.onClick(hide, accept, reject)}\n >\n <Text style={{\n color: b.outlined ? btnColor : \"#fff\",\n fontWeight: \"600\",\n fontSize: 14,\n }}>\n {b.title}\n </Text>\n </Pressable>\n );\n })}\n </View>\n );\n }\n\n const acceptBtn = (\n <Pressable\n key=\"accept\"\n style={[styles.actionBtn, stretch && styles.actionBtnSheet, {backgroundColor: colors.solid, flex: 1}]}\n onPress={() => doClick(accept)}\n >\n <Text style={styles.btnTextPrimary}>{acceptLabel}</Text>\n </Pressable>\n );\n const rejectBtn = !defaultUI ? (\n <Pressable\n key=\"reject\"\n style={[styles.actionBtn, styles.actionBtnOutlined, stretch && styles.actionBtnSheet, {borderColor: colors.solid, flex: 1}]}\n onPress={() => doClick(reject)}\n >\n <Text style={[styles.btnTextOutlined, {color: colors.solid}]}>{rejectLabel}</Text>\n </Pressable>\n ) : null;\n\n return (\n <View style={styles.buttonRow}>\n {stretch ? <>{rejectBtn}{acceptBtn}</> : <>{acceptBtn}{rejectBtn}</>}\n </View>\n );\n };\n\n // ── Bottom sheet ────────────────────────────────────────\n if (isSheet) {\n return (\n <Modal visible transparent animationType=\"none\" onRequestClose={hide}>\n {visible && (\n <Animated.View\n entering={FadeIn.duration(anim.scrim.enterDuration)}\n /* Contains the sheet — see `scrimExitDuration`. */\n exiting={FadeOut.duration(scrimExitDuration(anim.sheet.exitDuration))}\n style={[styles.sheetOverlay, {backgroundColor: scrimColor}, resolvedMaskStyle as any]}\n >\n <Pressable style={StyleSheet.absoluteFill} onPress={hide}/>\n <Animated.View\n /* ⛔ THE SAME FAULT AS `Dialog`'s SHEET, AND THE SAME ANSWER —\n see `../sheetMotion`. `SlideInDown` takes its travel from\n the window, and inside an RN `Modal` the window it measures\n is not the screen, so the panel is placed at rest on frame\n one. Measured on the Dialog, 30 September 2026; this file\n has the identical shape, so it takes the identical fix\n rather than a second one (§5).\n ⚠️ AND THIS FILE IS NOT YET WHOLE. Its panel is still a\n CHILD of the scrim above, so it still inherits the scrim's\n fade — the defect `Dialog` had corrected on 29 September and\n that was recorded then as this file's own next unit. The\n sheet will now slide AND fade here. That is better than not\n sliding, and it is still not the ruled motion. Not fixed in\n this unit, and not left unsaid. */\n entering={sheetEnter(anim.sheet.enter)}\n exiting={sheetExit(anim.sheet.exitDuration, handleExitFinished)}\n style={[\n styles.sheetPanel,\n {backgroundColor: panelBg, paddingBottom: 24 + insets.bottom},\n resolvedStyle as any,\n resolvedContentStyle as any,\n ]}\n >\n {/* Grabber */}\n <View style={[styles.grabber, {backgroundColor: grabberColor}]}/>\n\n {/* Header */}\n {header != null && (\n <Text style={[styles.sheetHeader, {color: textColor}, resolvedHeaderStyle as any]}>\n {header as React.ReactNode}\n </Text>\n )}\n\n {/* Message */}\n {message != null && (\n <Text style={[styles.sheetMessage, {color: subtextColor}]}>\n {message as React.ReactNode}\n </Text>\n )}\n\n {/* Injected item / extra content */}\n {children}\n\n {/* Actions */}\n {renderActions(true)}\n </Animated.View>\n </Animated.View>\n )}\n </Modal>\n );\n }\n\n // ── Content-only mode (prompt) ──────────────────────────\n if (content) {\n return (\n <Modal visible transparent animationType=\"none\" onRequestClose={hide}>\n {visible && (\n <Animated.View\n entering={FadeIn.duration(anim.scrim.enterDuration)}\n /* Contains the centred panel — see `scrimExitDuration`. */\n exiting={FadeOut.duration(scrimExitDuration(anim.confirm.exitDuration))}\n style={[styles.overlay, {backgroundColor: scrimColor}, resolvedMaskStyle as any]}\n >\n <Pressable style={StyleSheet.absoluteFill} onPress={hide}/>\n <Animated.View\n entering={ZoomIn.springify().damping(anim.confirm.content.damping).stiffness(anim.confirm.content.stiffness).mass(anim.confirm.content.mass ?? 1)}\n exiting={ZoomOut.duration(anim.confirm.exitDuration).easing(Easing.in(Easing.ease)).withCallback((finished) => {\n 'worklet';\n if (finished) runOnJS(handleExitFinished)();\n })}\n style={[\n styles.panel,\n {backgroundColor: surfaceColor, minWidth: 250, maxWidth: 380},\n resolvedStyle as any,\n resolvedContentStyle as any,\n ]}\n >\n {content as React.ReactNode}\n </Animated.View>\n </Animated.View>\n )}\n </Modal>\n );\n }\n\n return (\n <Modal visible transparent animationType=\"none\" onRequestClose={hide}>\n {visible && (\n <Animated.View\n entering={FadeIn.duration(anim.scrim.enterDuration)}\n /* Contains the centred panel — see `scrimExitDuration`. */\n exiting={FadeOut.duration(scrimExitDuration(anim.confirm.exitDuration))}\n style={[styles.overlay, {backgroundColor: scrimColor}, resolvedMaskStyle as any]}\n >\n <Pressable style={StyleSheet.absoluteFill} onPress={hide}/>\n\n {/* Card + icon stack: icon sits above the card */}\n <View style={styles.cardStack}>\n {/* Soft-circle icon bubble */}\n {showIcon && (\n <Animated.View\n entering={ZoomIn.springify().damping(anim.confirm.icon.damping).stiffness(anim.confirm.icon.stiffness).mass(anim.confirm.icon.mass ?? 1).delay(anim.confirm.icon.delay ?? 0)}\n exiting={ZoomOut.duration(anim.confirm.exitDuration).easing(Easing.in(Easing.ease))}\n style={[styles.iconBubble, {backgroundColor: colors.iconBg}]}\n >\n {brandLogo ? brandLogo : typeof icon === \"string\" ? (\n <Icon name={icon as never} size={'xl'} color={colors.iconFg}/>\n ) : (\n icon\n )}\n </Animated.View>\n )}\n\n {/* Panel */}\n <Animated.View\n entering={ZoomIn.springify().damping(anim.confirm.enter.damping).stiffness(anim.confirm.enter.stiffness).mass(anim.confirm.enter.mass ?? 1)}\n exiting={ZoomOut.duration(anim.confirm.exitDuration).easing(Easing.in(Easing.ease)).withCallback((finished) => {\n 'worklet';\n if (finished) runOnJS(handleExitFinished)();\n })}\n style={[\n styles.panel,\n {\n backgroundColor: panelBg,\n paddingTop: showIcon ? 48 : 24,\n gap: 10,\n },\n resolvedStyle as any,\n resolvedContentStyle as any,\n ]}\n >\n {/* Close button */}\n <Pressable style={styles.closeBtn} onPress={hide} hitSlop={12}>\n <Text style={{fontSize: 18, color: subtextColor}}>✕</Text>\n </Pressable>\n\n {/* Header */}\n {header != null && (\n <Text style={[styles.header, {color: textColor}, resolvedHeaderStyle as any]}>\n {header as React.ReactNode}\n </Text>\n )}\n\n {/* Message */}\n {message != null && (\n <Text style={[styles.message, {color: subtextColor}]}>\n {message as React.ReactNode}\n </Text>\n )}\n\n {/* Children */}\n {children}\n\n {/* Buttons */}\n {renderActions(false)}\n </Animated.View>\n </View>\n </Animated.View>\n )}\n </Modal>\n );\n}\n\nconst styles = StyleSheet.create({\n overlay: {\n flex: 1,\n justifyContent: \"center\",\n alignItems: \"center\",\n padding: 28,\n },\n sheetOverlay: {\n flex: 1,\n justifyContent: \"flex-end\",\n },\n sheetPanel: {\n // 24 == radii.2xl, top corners only (bottom stays square).\n borderTopLeftRadius: 24,\n borderTopRightRadius: 24,\n paddingHorizontal: 24,\n paddingTop: 10,\n gap: 14,\n // Subtle elevation (upward for a sheet): low opacity, wide blur, minimal offset.\n elevation: 6,\n shadowColor: \"#000\",\n shadowOffset: {width: 0, height: -2},\n shadowOpacity: 0.15,\n shadowRadius: 20,\n },\n grabber: {\n width: 40,\n height: 5,\n borderRadius: 999,\n alignSelf: \"center\",\n marginBottom: 6,\n },\n sheetHeader: {\n fontSize: 24,\n fontWeight: \"700\",\n textAlign: \"left\",\n },\n sheetMessage: {\n fontSize: 15,\n lineHeight: 22,\n textAlign: \"left\",\n },\n cardStack: {\n minWidth: 250,\n maxWidth: 380,\n alignItems: \"center\",\n },\n iconBubble: {\n width: 72,\n height: 72,\n borderRadius: 36,\n justifyContent: \"center\",\n alignItems: \"center\",\n zIndex: 2,\n marginBottom: -36,\n elevation: 8,\n shadowColor: \"#000\",\n shadowOffset: {width: 0, height: 4},\n shadowOpacity: 0.15,\n shadowRadius: 8,\n },\n panel: {\n alignSelf: \"stretch\",\n // 20 == radii.xl. Side padding (24) == bottom padding (24) for even rhythm.\n borderRadius: 20,\n paddingHorizontal: 24,\n paddingBottom: 24,\n // Subtle elevation: low opacity, wide blur, minimal offset.\n elevation: 6,\n shadowColor: \"#000\",\n shadowOffset: {width: 0, height: 2},\n shadowOpacity: 0.15,\n shadowRadius: 20,\n alignItems: \"center\",\n },\n closeBtn: {\n position: \"absolute\",\n top: 12,\n right: 14,\n zIndex: 3,\n },\n header: {\n fontSize: 22,\n fontWeight: \"700\",\n textAlign: \"center\",\n marginBottom: 8,\n },\n message: {\n fontSize: 14,\n textAlign: \"center\",\n lineHeight: 20,\n // Tightened so top/bottom whitespace around the actions reads balanced.\n marginBottom: 16,\n },\n buttonRow: {\n flexDirection: \"row\",\n justifyContent: \"center\",\n gap: 12,\n width: \"100%\",\n },\n actionBtn: {\n paddingVertical: 12,\n paddingHorizontal: 24,\n // Pill (== radii.pill). Buttons here are raw Pressables, not kits Button,\n // so the pill comes from borderRadius — the pattern the `buttons` array\n // path (`b.rounded && {borderRadius: 999}`) already uses in this file.\n borderRadius: 999,\n minWidth: 100,\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n // Taller buttons for the bottom-sheet action row (pill shape shared).\n actionBtnSheet: {\n paddingVertical: 16,\n borderRadius: 999,\n },\n actionBtnOutlined: {\n backgroundColor: \"transparent\",\n borderWidth: 1.5,\n },\n btnTextPrimary: {\n color: \"#fff\",\n fontWeight: \"600\",\n fontSize: 14,\n },\n btnTextOutlined: {\n fontWeight: \"600\",\n fontSize: 14,\n },\n});\n"],"names":["anim"],"mappings":";;;;;;;;;;;;;;AAsBA,SAAS,mBAAmB,OAAA,EAAkB;AAC1C,EAAA,MAAM,CAAC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,QAAA,EAAU,EAAA;AAAA,IACV,SAAA,EAAW,QAAA;AAAA,IACX,UAAA,EAAY,EAAA;AAAA;AAAA,IAEZ,YAAA,EAAc;AAAA,GAClB;AAAA,EACA,SAAA,EAAW;AAAA,IACP,aAAA,EAAe,KAAA;AAAA,IACf,cAAA,EAAgB,QAAA;AAAA,IAChB,GAAA,EAAK,EAAA;AAAA,IACL,KAAA,EAAO;AAAA,GACX;AAAA,EACA,SAAA,EAAW;AAAA,IACP,eAAA,EAAiB,EAAA;AAAA,IACjB,iBAAA,EAAmB,EAAA;AAAA;AAAA;AAAA;AAAA,IAInB,YAAA,EAAc,GAAA;AAAA,IACd,QAAA,EAAU,GAAA;AAAA,IACV,UAAA,EAAY,QAAA;AAAA,IACZ,cAAA,EAAgB;AAAA,GACpB;AAAA;AAAA,EAEA,cAAA,EAAgB;AAAA,IACZ,eAAA,EAAiB,EAAA;AAAA,IACjB,YAAA,EAAc;AAAA,GAClB;AAAA,EACA,iBAAA,EAAmB;AAAA,IACf,eAAA,EAAiB,aAAA;AAAA,IACjB,WAAA,EAAa;AAAA,GACjB;AAAA,EACA,cAAA,EAAgB;AAAA,IACZ,KAAA,EAAO,MAAA;AAAA,IACP,UAAA,EAAY,KAAA;AAAA,IACZ,QAAA,EAAU;AAAA,GACd;AAAA,EACA,eAAA,EAAiB;AAAA,IACb,UAAA,EAAY,KAAA;AAAA,IACZ,QAAA,EAAU;AAAA;AAElB,CAAC,CAAA;;;;"}
|
|
@@ -11,6 +11,7 @@ var useSeverityColors = require('../../../hooks/useSeverityColors.cjs');
|
|
|
11
11
|
require('../../../contexts/DialogContext.cjs');
|
|
12
12
|
var useResolvedStyle = require('../../../hooks/useResolvedStyle.cjs');
|
|
13
13
|
var index = require('../../../animations/index.cjs');
|
|
14
|
+
var sheetMotion_native = require('../sheetMotion.cjs');
|
|
14
15
|
var KitsThemeProvider_native = require('../../../contexts/Theme/KitsThemeProvider.cjs');
|
|
15
16
|
var index_native = require('../../../primitives/Icon/index.cjs');
|
|
16
17
|
var index_native$1 = require('../../../primitives/Text/index.cjs');
|
|
@@ -117,8 +118,8 @@ function KitsDialogControlled({ state, onHide }) {
|
|
|
117
118
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
118
119
|
Animated.View,
|
|
119
120
|
{
|
|
120
|
-
entering: isSheet ?
|
|
121
|
-
exiting:
|
|
121
|
+
entering: isSheet ? sheetMotion_native.sheetEnter(index.overlayAnimations.sheet.enter) : Animated.ZoomIn.springify().damping(index.overlayAnimations.dialog.enter.damping).stiffness(index.overlayAnimations.dialog.enter.stiffness).mass(index.overlayAnimations.dialog.enter.mass),
|
|
122
|
+
exiting: isSheet ? sheetMotion_native.sheetExit(index.overlayAnimations.sheet.exitDuration, handleExitFinished) : Animated.ZoomOut.duration(index.overlayAnimations.dialog.exitDuration).easing(Animated.Easing.in(Animated.Easing.ease)).withCallback((finished) => {
|
|
122
123
|
"worklet";
|
|
123
124
|
if (finished) Animated.runOnJS(handleExitFinished)();
|
|
124
125
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../../src/components/overlay/Dialog/index.native.tsx"],"sourcesContent":["import React from \"react\";\nimport {Modal, Pressable, ScrollView, StyleSheet, View, useWindowDimensions} from \"react-native\";\nimport Animated, {Easing, FadeIn, FadeOut, ReduceMotion, runOnJS, SlideInDown, SlideOutDown, ZoomIn, ZoomOut} from \"react-native-reanimated\";\nimport {useSafeAreaInsets} from \"react-native-safe-area-context\";\nimport {Icon, Text} from \"../../../_compat\";\nimport type {IKitsDialogControlled} from \"@lmb-it/kitsconcerto-types\";\nimport {useKitsTheme} from \"../../../contexts/Theme\";\nimport {useSeverityColors} from \"../../../hooks/useSeverityColors\";\nimport {useResolvedStyle} from \"../../../hooks\";\nimport {overlayAnimations as anim, scrimExitDuration} from \"../../../animations\";\n\n/**\n * Keeps the RN Modal mounted through the exit animation. `visible` drives the\n * inner scrim + panel entering/exiting; the Modal itself stays mounted until\n * the panel's exit animation reports finished, then unmounts.\n *\n * Re-entrancy: a new `visible=true` during an exit re-renders the inner (which\n * re-enters), and the still-pending exit callback is ignored because\n * `visibleRef` is already back to `true` — so the Modal is never torn down\n * mid-reopen.\n */\nfunction useOverlayPresence(visible: boolean) {\n const [mounted, setMounted] = React.useState(visible);\n const visibleRef = React.useRef(visible);\n React.useEffect(() => {\n visibleRef.current = visible;\n if (visible) setMounted(true);\n }, [visible]);\n // Runs on the JS thread (dispatched via runOnJS from the exit worklet).\n const handleExitFinished = React.useCallback(() => {\n if (!visibleRef.current) setMounted(false);\n }, []);\n return {mounted, handleExitFinished};\n}\n\n/**\n * The scrim: it fades AND it is the thing you tap to dismiss, in one element.\n *\n * ⛔ THIS IS THE ACTIONSHEET'S SHAPE, NOT A THIRD PATTERN (§5). Two components in\n * this library already keep the backdrop a sibling of the panel:\n * `apps/mobile/src/ui/actionsheet/index.tsx:53` declares `Backdrop:\n * AnimatedPressable` — an animated, tappable element in its own right — and\n * `apps/mobile/src/ui/bottomsheet/index.tsx:124` passes `backdropComponent` to\n * `@gorhom/bottom-sheet`. The gorhom one is a prop-injection API belonging to a\n * sheet container that owns its own presentation; this Dialog owns its own RN\n * `Modal`, so there is nothing to inject into. The actionsheet's shape is the one\n * that fits, and it also collapses the separate `absoluteFill` Pressable this\n * component used to need into the scrim itself.\n *\n * ⚠️ BUILT WITH REANIMATED, NOT WITH THE ACTIONSHEET'S `createMotionAnimatedComponent`.\n * That helper wraps a different animation engine; this file's entering/exiting are\n * reanimated layout animations throughout, and mixing two engines in one overlay\n * would be inventing the third pattern §5 forbids.\n */\nconst AnimatedPressable = Animated.createAnimatedComponent(Pressable);\n\nexport default function KitsDialogControlled({state, onHide}: IKitsDialogControlled) {\n const {\n children,\n content: contentProp,\n onClose,\n asyncClose,\n type,\n icon,\n style,\n contentStyle,\n headerStyle,\n maskStyle,\n position = 'center',\n responsive = true,\n hideHeader,\n headerRender,\n footerRender,\n footerStyle,\n canClose,\n bodyStyle,\n closeIcon,\n // Native default true preserves historical tap-to-dismiss; web's\n // PrimeReact default is false — pass explicitly in shared code.\n dismissableMask = true,\n breakpoints,\n ...rest\n } = state;\n const {resolveToken, theme} = useKitsTheme();\n const severityColors = useSeverityColors(type || 'secondary');\n const colors = type ? severityColors : null;\n const insets = useSafeAreaInsets();\n const isSheet = position === 'bottom';\n\n const surfaceColor = resolveToken('surface-card');\n const textColor = resolveToken('text');\n const borderColor = colors?.border ?? resolveToken('border');\n const subtextColor = resolveToken('gray.500');\n const grabberColor = resolveToken('gray.300');\n // Scrim via the literal alpha overlay token → rgba(0,0,0,0.4) in both modes.\n const scrimColor = resolveToken('black-alpha-40');\n const brandLogo = type === 'brand' ? theme.config.logo : null;\n\n const resolvedStyle = useResolvedStyle(style || {});\n const resolvedContentStyle = useResolvedStyle(contentStyle || {});\n const resolvedHeaderStyle = useResolvedStyle(headerStyle || {});\n const resolvedMaskStyle = useResolvedStyle(maskStyle || {});\n const resolvedFooterStyle = useResolvedStyle(footerStyle || {});\n const resolvedBodyStyle = useResolvedStyle(bodyStyle || {});\n\n const {width: screenWidth} = useWindowDimensions();\n // Consumer `breakpoints` ({'960px': '75vw'}) mirrors the web prop: the\n // smallest max-width threshold >= the screen width wins; vw/% both map\n // to a percentage of the window width. Falls back to the responsive\n // default (50% tablets/desktop, 95% phones <=641px).\n const breakpointWidth = (() => {\n if (!breakpoints) return null;\n const matches = Object.entries(breakpoints)\n .map(([k, v]) => [parseFloat(k), v] as const)\n .filter(([px]) => !Number.isNaN(px) && screenWidth <= px)\n .sort(([a], [b]) => a - b);\n const value = matches[0]?.[1];\n if (value == null) return null;\n const num = parseFloat(value);\n return Number.isNaN(num) ? null : `${num}%`;\n })();\n const responsiveWidth = breakpointWidth ?? (screenWidth > 641 ? '50%' : '95%');\n const hasExplicitWidth = (resolvedStyle as any).width != null;\n\n const hide = async () => {\n // canClose gate — intercepts every close path (backdrop Pressable,\n // built-in X Pressable, RN Modal onRequestClose). When blocked,\n // onClose is suppressed and the dialog stays open.\n if (canClose === false || (typeof canClose === 'function' && !canClose())) {\n return;\n }\n if (asyncClose && typeof onClose === \"function\") {\n await onClose();\n } else {\n onClose?.();\n }\n onHide();\n };\n\n const {mounted, handleExitFinished} = useOverlayPresence(!!state.visible);\n if (!mounted) return null;\n\n const content = typeof children === \"function\" ? children(hide) : children;\n // Content-mode override (mirrors web): consumer node replaces the whole\n // header / body / footer template inside the panel.\n const contentMode = contentProp != null\n ? (typeof contentProp === \"function\" ? contentProp({hide}) : contentProp)\n : null;\n\n return (\n <Modal visible transparent animationType=\"none\" onRequestClose={hide}>\n {state.visible && (\n <View style={styles.root}>\n {/*\n ⛔ THE SCRIM IS A SIBLING OF THE PANEL, NOT ITS PARENT.\n It used to be the panel's parent, and opacity composes down a\n view tree — so the scrim's FadeIn/FadeOut multiplied the panel's\n opacity for the whole of both animations and the panel faded as\n well as travelled. `SlideInDown` animates `originY` only and\n never touched opacity; the fade was entirely inherited. Fixed\n 29 September 2026 — the structure is the fix, and no duration\n was tuned to make it look better (§12.5).\n\n ⚠️ IT IS ALSO THE DISMISS TARGET. The component used to draw a\n separate `absoluteFill` Pressable inside the scrim; scrim and\n target are one element now, which is the actionsheet's shape.\n */}\n <AnimatedPressable\n entering={FadeIn.duration(anim.scrim.enterDuration)}\n exiting={FadeOut.duration(scrimExitDuration(isSheet ? anim.sheet.exitDuration : anim.dialog.exitDuration))}\n style={[StyleSheet.absoluteFill, {backgroundColor: scrimColor}, resolvedMaskStyle as any]}\n onPress={dismissableMask ? hide : undefined}\n />\n {/*\n ⚠️ `pointerEvents=\"box-none\"` IS LOAD-BEARING. This view spans the\n screen so it can place the panel — centred, or pinned to the\n bottom — and it sits ON TOP of the scrim. Without `box-none` it\n would swallow every tap meant for the scrim and tap-to-dismiss\n would stop working. With it, the empty area passes taps through\n to the scrim beneath while the panel still receives its own.\n */}\n <View\n style={isSheet ? styles.sheetArrange : styles.centerArrange}\n pointerEvents=\"box-none\"\n >\n <Animated.View\n /* The sheet asks Reanimated to keep moving under iOS\n \"Reduce Motion\" — see `overlayAnimations.sheet`. Without\n it the panel appears in one frame and the only motion\n left is the scrim, which reads as a fade. The centred\n dialog keeps the system default. */\n entering={isSheet\n ? SlideInDown.springify().damping(anim.sheet.enter.damping).stiffness(anim.sheet.enter.stiffness).mass(anim.sheet.enter.mass ?? 1)\n .reduceMotion(anim.sheet.keepMotionWhenReduced ? ReduceMotion.Never : ReduceMotion.System)\n : ZoomIn.springify().damping(anim.dialog.enter.damping).stiffness(anim.dialog.enter.stiffness).mass(anim.dialog.enter.mass ?? 1)}\n exiting={(isSheet\n ? SlideOutDown.duration(anim.sheet.exitDuration).easing(Easing.in(Easing.ease))\n .reduceMotion(anim.sheet.keepMotionWhenReduced ? ReduceMotion.Never : ReduceMotion.System)\n : ZoomOut.duration(anim.dialog.exitDuration).easing(Easing.in(Easing.ease))\n ).withCallback((finished) => {\n 'worklet';\n if (finished) runOnJS(handleExitFinished)();\n })}\n style={[\n styles.panel,\n isSheet && styles.sheetPanel,\n {backgroundColor: surfaceColor, borderColor},\n // Explicit `breakpoints` win even when responsive=false (web parity)\n !isSheet && !hasExplicitWidth && (breakpoints != null || responsive) ? {width: responsiveWidth} : null,\n resolvedStyle as any,\n resolvedContentStyle as any,\n ]}\n >\n {contentMode != null ? contentMode : <>\n {/* Grabber (bottom-sheet) */}\n {isSheet && <View style={[styles.grabber, {backgroundColor: grabberColor}]}/>}\n\n {/* Severity accent strip */}\n {colors && !isSheet && (\n <View style={{height: 4, backgroundColor: colors.solid, borderTopLeftRadius: 20, borderTopRightRadius: 20}}/>\n )}\n\n {/* Custom header (headerRender) — fully replaces the built-in header\n View when provided. Wins over the default header even if `header`\n is also set. */}\n {!hideHeader && headerRender != null && headerRender({close: () => { void hide(); }})}\n\n {/* Header (default) — rendered when no headerRender and `header` is set. */}\n {!hideHeader && headerRender == null && rest.header != null && (\n <View style={[styles.header, {borderBottomColor: borderColor}, resolvedHeaderStyle as any]}>\n {/* Inline severity icon */}\n {(icon || brandLogo) && colors && (\n <View style={{\n width: 36,\n height: 36,\n borderRadius: 18,\n backgroundColor: colors.iconBg,\n alignItems: 'center',\n justifyContent: 'center',\n marginRight: 12,\n }}>\n {brandLogo ? brandLogo : typeof icon === 'string' ? (\n <Icon name={icon as never} size={'lg'} color={colors.iconFg}/>\n ) : icon}\n </View>\n )}\n <Text style={{fontSize: 18, fontWeight: \"700\", color: textColor, flex: 1}}>\n {rest.header as React.ReactNode}\n </Text>\n <Pressable onPress={hide} hitSlop={8}>\n {closeIcon ?? <Text style={{fontSize: 18, color: subtextColor}}>✕</Text>}\n </Pressable>\n </View>\n )}\n\n {/* Body — bodyStyle is applied AFTER the built-in maxHeight: 400,\n so consumers can lift the cap (`maxHeight: 600`) or unlock flex\n sizing (`minHeight: 0`) without losing the default behavior when\n bodyStyle is unset. */}\n <ScrollView\n style={[styles.body, resolvedBodyStyle as any]}\n contentContainerStyle={styles.bodyContent}\n showsVerticalScrollIndicator={false}\n >\n {content}\n </ScrollView>\n\n {/* Footer — footerRender takes precedence over `footer`. footerStyle\n is merged AFTER the built-in flex defaults so consumers can override\n alignment (e.g. justifyContent: 'space-between' for left-delete /\n right-actions layouts) without losing the borderTop / padding. */}\n {(footerRender != null || rest.footer != null) && (\n <View style={[\n styles.footer,\n {borderTopColor: borderColor},\n isSheet && {paddingBottom: 12 + insets.bottom},\n resolvedFooterStyle as any,\n ]}>\n {footerRender\n ? footerRender({close: () => { void hide(); }})\n : (rest.footer as React.ReactNode)}\n </View>\n )}\n </>}\n </Animated.View>\n </View>\n </View>\n )}\n </Modal>\n );\n}\n\nconst styles = StyleSheet.create({\n /**\n * The container. ⛔ IT IS NEVER ANIMATED AND CARRIES NO OPACITY — that is the\n * whole point of the change. It only exists to give the scrim and the panel a\n * shared parent so they can be siblings.\n */\n root: {\n flex: 1,\n },\n /**\n * Places the panel. ⚠️ The 24 padding moved here from the old `overlay` style,\n * and it had to: `position: absolute` resolves against a parent's PADDING box\n * in React Native, so a scrim absolutely filling a padded parent would have\n * stopped 24 short of every screen edge and left an undimmed frame. The scrim\n * now fills `root`, which has no padding, and the inset belongs to the layer\n * that positions the panel.\n */\n centerArrange: {\n ...StyleSheet.absoluteFillObject,\n justifyContent: \"center\",\n alignItems: \"center\",\n padding: 24,\n },\n sheetArrange: {\n ...StyleSheet.absoluteFillObject,\n justifyContent: \"flex-end\",\n },\n sheetPanel: {\n width: \"100%\",\n maxWidth: \"100%\",\n maxHeight: \"90%\",\n borderWidth: 0,\n borderTopLeftRadius: 24,\n borderTopRightRadius: 24,\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0,\n paddingTop: 10,\n },\n grabber: {\n width: 40,\n height: 5,\n borderRadius: 999,\n alignSelf: \"center\",\n marginBottom: 6,\n },\n panel: {\n // 20 == radii.xl (no numeric radii resolver on native — see report).\n borderRadius: 20,\n borderWidth: 1,\n minWidth: 250,\n maxWidth: \"90%\",\n maxHeight: \"80%\",\n overflow: \"hidden\",\n // Subtle elevation: low opacity, wide blur, minimal offset.\n elevation: 6,\n shadowColor: \"#000\",\n shadowOffset: {width: 0, height: 2},\n shadowOpacity: 0.15,\n shadowRadius: 20,\n },\n header: {\n flexDirection: \"row\",\n alignItems: \"center\",\n paddingHorizontal: 20,\n paddingVertical: 16,\n borderBottomWidth: 1,\n },\n body: {\n maxHeight: 400,\n },\n bodyContent: {\n padding: 20,\n },\n footer: {\n flexDirection: \"row\",\n justifyContent: \"flex-end\",\n paddingHorizontal: 20,\n paddingVertical: 12,\n borderTopWidth: 1,\n gap: 8,\n },\n});\n"],"names":["Pressable","useKitsTheme","useSeverityColors","useSafeAreaInsets","useResolvedStyle","useWindowDimensions","Modal","jsxs","View","jsx","FadeIn","anim","FadeOut","scrimExitDuration","StyleSheet","SlideInDown","ReduceMotion","ZoomIn","SlideOutDown","Easing","ZoomOut","runOnJS","Fragment","Icon","Text","ScrollView"],"mappings":";;;;;;;;;;;;;;;;;AAqBA,SAAS,mBAAmB,OAAA,E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W,CAAA;AAAA,IACX,WAAA,EAAa,MAAA;AAAA,IACb,YAAA,EAAc,EAAC,KAAA,EAAO,CAAA,EAAG,QAAQ,CAAA,EAAC;AAAA,IAClC,aAAA,EAAe,IAAA;AAAA,IACf,YAAA,EAAc;AAAA,GAClB;AAAA,EACA,MAAA,EAAQ;AAAA,IACJ,aAAA,EAAe,KAAA;AAAA,IACf,UAAA,EAAY,QAAA;AAAA,IACZ,iBAAA,EAAmB,EAAA;AAAA,IACnB,eAAA,EAAiB,EAAA;AAAA,IACjB,iBAAA,EAAmB;AAAA,GACvB;AAAA,EACA,IAAA,EAAM;AAAA,IACF,SAAA,EAAW;AAAA,GACf;AAAA,EACA,WAAA,EAAa;AAAA,IACT,OAAA,EAAS;AAAA,GACb;AAAA,EACA,MAAA,EAAQ;AAAA,IACJ,aAAA,EAAe,KAAA;AAAA,IACf,cAAA,EAAgB,UAAA;AAAA,IAChB,iBAAA,EAAmB,EAAA;AAAA,IACnB,eAAA,EAAiB,EAAA;AAAA,IACjB,cAAA,EAAgB,CAAA;AAAA,IAChB,GAAA,EAAK;AAAA;AAEb,CAAC,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../../src/components/overlay/Dialog/index.native.tsx"],"sourcesContent":["import React from \"react\";\nimport {Modal, Pressable, ScrollView, StyleSheet, View, useWindowDimensions} from \"react-native\";\n/* ⛔ `ReduceMotion` IS GONE FROM THIS FILE, AND THAT IS A STATEMENT, NOT A\n TIDY-UP. The sheet used to carry `.reduceMotion(ReduceMotion.Never)` — an\n instruction to keep moving when the device asks for less motion — and it is\n on record that the modifier does not hold: the sheet was skipped anyway, in\n this library's own Storybook as well as in the App. It was a claim the code\n could not deliver, so it is removed rather than left to be believed.\n ⚠️ A CUSTOM entering/exiting is outside Reanimated's reduce-motion handling\n altogether, so the sheet now genuinely keeps its motion — which is what the\n modifier was asking for and never achieved. `anim.sheet.keepMotionWhenReduced`\n is left in the presets: ConfirmDialog is a separate unit and no preset should\n change under it. */\nimport Animated, {Easing, FadeIn, FadeOut, runOnJS, ZoomIn, ZoomOut} from \"react-native-reanimated\";\nimport {useSafeAreaInsets} from \"react-native-safe-area-context\";\nimport {Icon, Text} from \"../../../_compat\";\nimport type {IKitsDialogControlled} from \"@lmb-it/kitsconcerto-types\";\nimport {useKitsTheme} from \"../../../contexts/Theme\";\nimport {useSeverityColors} from \"../../../hooks/useSeverityColors\";\nimport {useResolvedStyle} from \"../../../hooks\";\nimport {overlayAnimations as anim, scrimExitDuration} from \"../../../animations\";\nimport {sheetEnter, sheetExit} from \"../sheetMotion\";\n\n/**\n * Keeps the RN Modal mounted through the exit animation. `visible` drives the\n * inner scrim + panel entering/exiting; the Modal itself stays mounted until\n * the panel's exit animation reports finished, then unmounts.\n *\n * Re-entrancy: a new `visible=true` during an exit re-renders the inner (which\n * re-enters), and the still-pending exit callback is ignored because\n * `visibleRef` is already back to `true` — so the Modal is never torn down\n * mid-reopen.\n */\nfunction useOverlayPresence(visible: boolean) {\n const [mounted, setMounted] = React.useState(visible);\n const visibleRef = React.useRef(visible);\n React.useEffect(() => {\n visibleRef.current = visible;\n if (visible) setMounted(true);\n }, [visible]);\n // Runs on the JS thread (dispatched via runOnJS from the exit worklet).\n const handleExitFinished = React.useCallback(() => {\n if (!visibleRef.current) setMounted(false);\n }, []);\n return {mounted, handleExitFinished};\n}\n\n/**\n * The scrim: it fades AND it is the thing you tap to dismiss, in one element.\n *\n * ⛔ THIS IS THE ACTIONSHEET'S SHAPE, NOT A THIRD PATTERN (§5). Two components in\n * this library already keep the backdrop a sibling of the panel:\n * `apps/mobile/src/ui/actionsheet/index.tsx:53` declares `Backdrop:\n * AnimatedPressable` — an animated, tappable element in its own right — and\n * `apps/mobile/src/ui/bottomsheet/index.tsx:124` passes `backdropComponent` to\n * `@gorhom/bottom-sheet`. The gorhom one is a prop-injection API belonging to a\n * sheet container that owns its own presentation; this Dialog owns its own RN\n * `Modal`, so there is nothing to inject into. The actionsheet's shape is the one\n * that fits, and it also collapses the separate `absoluteFill` Pressable this\n * component used to need into the scrim itself.\n *\n * ⚠️ BUILT WITH REANIMATED, NOT WITH THE ACTIONSHEET'S `createMotionAnimatedComponent`.\n * That helper wraps a different animation engine; this file's entering/exiting are\n * reanimated layout animations throughout, and mixing two engines in one overlay\n * would be inventing the third pattern §5 forbids.\n */\nconst AnimatedPressable = Animated.createAnimatedComponent(Pressable);\n\nexport default function KitsDialogControlled({state, onHide}: IKitsDialogControlled) {\n const {\n children,\n content: contentProp,\n onClose,\n asyncClose,\n type,\n icon,\n style,\n contentStyle,\n headerStyle,\n maskStyle,\n position = 'center',\n responsive = true,\n hideHeader,\n headerRender,\n footerRender,\n footerStyle,\n canClose,\n bodyStyle,\n closeIcon,\n // Native default true preserves historical tap-to-dismiss; web's\n // PrimeReact default is false — pass explicitly in shared code.\n dismissableMask = true,\n breakpoints,\n ...rest\n } = state;\n const {resolveToken, theme} = useKitsTheme();\n const severityColors = useSeverityColors(type || 'secondary');\n const colors = type ? severityColors : null;\n const insets = useSafeAreaInsets();\n const isSheet = position === 'bottom';\n\n const surfaceColor = resolveToken('surface-card');\n const textColor = resolveToken('text');\n const borderColor = colors?.border ?? resolveToken('border');\n const subtextColor = resolveToken('gray.500');\n const grabberColor = resolveToken('gray.300');\n // Scrim via the literal alpha overlay token → rgba(0,0,0,0.4) in both modes.\n const scrimColor = resolveToken('black-alpha-40');\n const brandLogo = type === 'brand' ? theme.config.logo : null;\n\n const resolvedStyle = useResolvedStyle(style || {});\n const resolvedContentStyle = useResolvedStyle(contentStyle || {});\n const resolvedHeaderStyle = useResolvedStyle(headerStyle || {});\n const resolvedMaskStyle = useResolvedStyle(maskStyle || {});\n const resolvedFooterStyle = useResolvedStyle(footerStyle || {});\n const resolvedBodyStyle = useResolvedStyle(bodyStyle || {});\n\n const {width: screenWidth} = useWindowDimensions();\n // Consumer `breakpoints` ({'960px': '75vw'}) mirrors the web prop: the\n // smallest max-width threshold >= the screen width wins; vw/% both map\n // to a percentage of the window width. Falls back to the responsive\n // default (50% tablets/desktop, 95% phones <=641px).\n const breakpointWidth = (() => {\n if (!breakpoints) return null;\n const matches = Object.entries(breakpoints)\n .map(([k, v]) => [parseFloat(k), v] as const)\n .filter(([px]) => !Number.isNaN(px) && screenWidth <= px)\n .sort(([a], [b]) => a - b);\n const value = matches[0]?.[1];\n if (value == null) return null;\n const num = parseFloat(value);\n return Number.isNaN(num) ? null : `${num}%`;\n })();\n const responsiveWidth = breakpointWidth ?? (screenWidth > 641 ? '50%' : '95%');\n const hasExplicitWidth = (resolvedStyle as any).width != null;\n\n const hide = async () => {\n // canClose gate — intercepts every close path (backdrop Pressable,\n // built-in X Pressable, RN Modal onRequestClose). When blocked,\n // onClose is suppressed and the dialog stays open.\n if (canClose === false || (typeof canClose === 'function' && !canClose())) {\n return;\n }\n if (asyncClose && typeof onClose === \"function\") {\n await onClose();\n } else {\n onClose?.();\n }\n onHide();\n };\n\n const {mounted, handleExitFinished} = useOverlayPresence(!!state.visible);\n if (!mounted) return null;\n\n const content = typeof children === \"function\" ? children(hide) : children;\n // Content-mode override (mirrors web): consumer node replaces the whole\n // header / body / footer template inside the panel.\n const contentMode = contentProp != null\n ? (typeof contentProp === \"function\" ? contentProp({hide}) : contentProp)\n : null;\n\n return (\n <Modal visible transparent animationType=\"none\" onRequestClose={hide}>\n {state.visible && (\n <View style={styles.root}>\n {/*\n ⛔ THE SCRIM IS A SIBLING OF THE PANEL, NOT ITS PARENT.\n It used to be the panel's parent, and opacity composes down a\n view tree — so the scrim's FadeIn/FadeOut multiplied the panel's\n opacity for the whole of both animations and the panel faded as\n well as travelled. `SlideInDown` animates `originY` only and\n never touched opacity; the fade was entirely inherited. Fixed\n 29 September 2026 — the structure is the fix, and no duration\n was tuned to make it look better (§12.5).\n\n ⚠️ IT IS ALSO THE DISMISS TARGET. The component used to draw a\n separate `absoluteFill` Pressable inside the scrim; scrim and\n target are one element now, which is the actionsheet's shape.\n */}\n <AnimatedPressable\n entering={FadeIn.duration(anim.scrim.enterDuration)}\n exiting={FadeOut.duration(scrimExitDuration(isSheet ? anim.sheet.exitDuration : anim.dialog.exitDuration))}\n style={[StyleSheet.absoluteFill, {backgroundColor: scrimColor}, resolvedMaskStyle as any]}\n onPress={dismissableMask ? hide : undefined}\n />\n {/*\n ⚠️ `pointerEvents=\"box-none\"` IS LOAD-BEARING. This view spans the\n screen so it can place the panel — centred, or pinned to the\n bottom — and it sits ON TOP of the scrim. Without `box-none` it\n would swallow every tap meant for the scrim and tap-to-dismiss\n would stop working. With it, the empty area passes taps through\n to the scrim beneath while the panel still receives its own.\n */}\n <View\n style={isSheet ? styles.sheetArrange : styles.centerArrange}\n pointerEvents=\"box-none\"\n >\n <Animated.View\n /* The sheet asks Reanimated to keep moving under iOS\n \"Reduce Motion\" — see `overlayAnimations.sheet`. Without\n it the panel appears in one frame and the only motion\n left is the scrim, which reads as a fade. The centred\n dialog keeps the system default. */\n entering={isSheet\n ? sheetEnter(anim.sheet.enter)\n : ZoomIn.springify().damping(anim.dialog.enter.damping).stiffness(anim.dialog.enter.stiffness).mass(anim.dialog.enter.mass ?? 1)}\n exiting={isSheet\n ? sheetExit(anim.sheet.exitDuration, handleExitFinished)\n : ZoomOut.duration(anim.dialog.exitDuration).easing(Easing.in(Easing.ease))\n .withCallback((finished) => {\n 'worklet';\n if (finished) runOnJS(handleExitFinished)();\n })}\n style={[\n styles.panel,\n isSheet && styles.sheetPanel,\n {backgroundColor: surfaceColor, borderColor},\n // Explicit `breakpoints` win even when responsive=false (web parity)\n !isSheet && !hasExplicitWidth && (breakpoints != null || responsive) ? {width: responsiveWidth} : null,\n resolvedStyle as any,\n resolvedContentStyle as any,\n ]}\n >\n {contentMode != null ? contentMode : <>\n {/* Grabber (bottom-sheet) */}\n {isSheet && <View style={[styles.grabber, {backgroundColor: grabberColor}]}/>}\n\n {/* Severity accent strip */}\n {colors && !isSheet && (\n <View style={{height: 4, backgroundColor: colors.solid, borderTopLeftRadius: 20, borderTopRightRadius: 20}}/>\n )}\n\n {/* Custom header (headerRender) — fully replaces the built-in header\n View when provided. Wins over the default header even if `header`\n is also set. */}\n {!hideHeader && headerRender != null && headerRender({close: () => { void hide(); }})}\n\n {/* Header (default) — rendered when no headerRender and `header` is set. */}\n {!hideHeader && headerRender == null && rest.header != null && (\n <View style={[styles.header, {borderBottomColor: borderColor}, resolvedHeaderStyle as any]}>\n {/* Inline severity icon */}\n {(icon || brandLogo) && colors && (\n <View style={{\n width: 36,\n height: 36,\n borderRadius: 18,\n backgroundColor: colors.iconBg,\n alignItems: 'center',\n justifyContent: 'center',\n marginRight: 12,\n }}>\n {brandLogo ? brandLogo : typeof icon === 'string' ? (\n <Icon name={icon as never} size={'lg'} color={colors.iconFg}/>\n ) : icon}\n </View>\n )}\n <Text style={{fontSize: 18, fontWeight: \"700\", color: textColor, flex: 1}}>\n {rest.header as React.ReactNode}\n </Text>\n <Pressable onPress={hide} hitSlop={8}>\n {closeIcon ?? <Text style={{fontSize: 18, color: subtextColor}}>✕</Text>}\n </Pressable>\n </View>\n )}\n\n {/* Body — bodyStyle is applied AFTER the built-in maxHeight: 400,\n so consumers can lift the cap (`maxHeight: 600`) or unlock flex\n sizing (`minHeight: 0`) without losing the default behavior when\n bodyStyle is unset. */}\n <ScrollView\n style={[styles.body, resolvedBodyStyle as any]}\n contentContainerStyle={styles.bodyContent}\n showsVerticalScrollIndicator={false}\n >\n {content}\n </ScrollView>\n\n {/* Footer — footerRender takes precedence over `footer`. footerStyle\n is merged AFTER the built-in flex defaults so consumers can override\n alignment (e.g. justifyContent: 'space-between' for left-delete /\n right-actions layouts) without losing the borderTop / padding. */}\n {(footerRender != null || rest.footer != null) && (\n <View style={[\n styles.footer,\n {borderTopColor: borderColor},\n isSheet && {paddingBottom: 12 + insets.bottom},\n resolvedFooterStyle as any,\n ]}>\n {footerRender\n ? footerRender({close: () => { void hide(); }})\n : (rest.footer as React.ReactNode)}\n </View>\n )}\n </>}\n </Animated.View>\n </View>\n </View>\n )}\n </Modal>\n );\n}\n\nconst styles = StyleSheet.create({\n /**\n * The container. ⛔ IT IS NEVER ANIMATED AND CARRIES NO OPACITY — that is the\n * whole point of the change. It only exists to give the scrim and the panel a\n * shared parent so they can be siblings.\n */\n root: {\n flex: 1,\n },\n /**\n * Places the panel. ⚠️ The 24 padding moved here from the old `overlay` style,\n * and it had to: `position: absolute` resolves against a parent's PADDING box\n * in React Native, so a scrim absolutely filling a padded parent would have\n * stopped 24 short of every screen edge and left an undimmed frame. The scrim\n * now fills `root`, which has no padding, and the inset belongs to the layer\n * that positions the panel.\n */\n centerArrange: {\n ...StyleSheet.absoluteFillObject,\n justifyContent: \"center\",\n alignItems: \"center\",\n padding: 24,\n },\n sheetArrange: {\n ...StyleSheet.absoluteFillObject,\n justifyContent: \"flex-end\",\n },\n sheetPanel: {\n width: \"100%\",\n maxWidth: \"100%\",\n maxHeight: \"90%\",\n borderWidth: 0,\n borderTopLeftRadius: 24,\n borderTopRightRadius: 24,\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0,\n paddingTop: 10,\n },\n grabber: {\n width: 40,\n height: 5,\n borderRadius: 999,\n alignSelf: \"center\",\n marginBottom: 6,\n },\n panel: {\n // 20 == radii.xl (no numeric radii resolver on native — see report).\n borderRadius: 20,\n borderWidth: 1,\n minWidth: 250,\n maxWidth: \"90%\",\n maxHeight: \"80%\",\n overflow: \"hidden\",\n // Subtle elevation: low opacity, wide blur, minimal offset.\n elevation: 6,\n shadowColor: \"#000\",\n shadowOffset: {width: 0, height: 2},\n shadowOpacity: 0.15,\n shadowRadius: 20,\n },\n header: {\n flexDirection: \"row\",\n alignItems: \"center\",\n paddingHorizontal: 20,\n paddingVertical: 16,\n borderBottomWidth: 1,\n },\n body: {\n maxHeight: 400,\n },\n bodyContent: {\n padding: 20,\n },\n footer: {\n flexDirection: \"row\",\n justifyContent: \"flex-end\",\n paddingHorizontal: 20,\n paddingVertical: 12,\n borderTopWidth: 1,\n gap: 8,\n },\n});\n"],"names":["Pressable","useKitsTheme","useSeverityColors","useSafeAreaInsets","useResolvedStyle","useWindowDimensions","Modal","jsxs","View","jsx","FadeIn","anim","FadeOut","scrimExitDuration","StyleSheet","sheetEnter","ZoomIn","sheetExit","ZoomOut","Easing","runOnJS","Fragment","Icon","Text","ScrollView"],"mappings":";;;;;;;;;;;;;;;;;;AAiCA,SAAS,mBAAmB,OAAA,EAAkB;AAC1C,EAAA,MAAM,CAAC,OAAA,EAAS,UAAU,CAAA,GAAI,KAAA,CAAM,SAAS,OAAO,CAAA;AACpD,EAAA,MAAM,UAAA,GAAa,KAAA,CAAM,MAAA,CAAO,OAAO,CAAA;AACvC,EAAA,KAAA,CAAM,UAAU,MAAM;AAClB,IAAA,UAAA,CAAW,OAAA,GAAU,OAAA;AACrB,IAAA,IAAI,OAAA,aAAoB,IAAI,CAAA;AAAA,EAChC,CAAA,EAAG,CAAC,OAAO,CAAC,CAAA;AAEZ,EAAA,MAAM,kBAAA,GAAqB,KAAA,CAAM,WAAA,CAAY,MAAM;AAC/C,IAAA,IAAI,CAAC,UAAA,CAAW,OAAA,EAAS,UAAA,CAAW,KAAK,CAAA;AAAA,EAC7C,CAAA,EAAG,EAAE,CAAA;AACL,EAAA,OAAO,EAAC,SAAS,kBAAA,EAAkB;AACvC;AAqBA,MAAM,iBAAA,GAAoB,QAAA,CAAS,uBAAA,CAAwBA,qBAAS,CAAA;AAEpE,SAAwB,oBAAA,CAAqB,EAAC,KAAA,EAAO,MAAA,EAAM,EAA0B;AACjF,EAAA,MAAM;AAAA,IACF,QAAA;AAAA,IACA,OAAA,EAAS,WAAA;AAAA,IACT,OAAA;AAAA,IACA,UAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,KAAA;AAAA,IACA,YAAA;AAAA,IACA,WAAA;AAAA,IACA,SAAA;AAAA,IACA,QAAA,GAAW,QAAA;AAAA,IACX,UAAA,GAAa,IAAA;AAAA,IACb,UAAA;AAAA,IACA,YAAA;AAAA,IACA,YAAA;A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A,EAAG,QAAQ,CAAA,EAAC;AAAA,IAClC,aAAA,EAAe,IAAA;AAAA,IACf,YAAA,EAAc;AAAA,GAClB;AAAA,EACA,MAAA,EAAQ;AAAA,IACJ,aAAA,EAAe,KAAA;AAAA,IACf,UAAA,EAAY,QAAA;AAAA,IACZ,iBAAA,EAAmB,EAAA;AAAA,IACnB,eAAA,EAAiB,EAAA;AAAA,IACjB,iBAAA,EAAmB;AAAA,GACvB;AAAA,EACA,IAAA,EAAM;AAAA,IACF,SAAA,EAAW;AAAA,GACf;AAAA,EACA,WAAA,EAAa;AAAA,IACT,OAAA,EAAS;AAAA,GACb;AAAA,EACA,MAAA,EAAQ;AAAA,IACJ,aAAA,EAAe,KAAA;AAAA,IACf,cAAA,EAAgB,UAAA;AAAA,IAChB,iBAAA,EAAmB,EAAA;AAAA,IACnB,eAAA,EAAiB,EAAA;AAAA,IACjB,cAAA,EAAgB,CAAA;AAAA,IAChB,GAAA,EAAK;AAAA;AAEb,CAAC,CAAA;;;;"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { useWindowDimensions, Modal, View, StyleSheet, Pressable, ScrollView } from 'react-native';
|
|
4
|
-
import Animated, { FadeOut, FadeIn,
|
|
4
|
+
import Animated, { FadeOut, FadeIn, ZoomOut, Easing, runOnJS, ZoomIn } from 'react-native-reanimated';
|
|
5
5
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
6
6
|
import { useSeverityColors } from '../../../hooks/useSeverityColors.js';
|
|
7
7
|
import '../../../contexts/DialogContext.js';
|
|
8
8
|
import useResolvedStyle from '../../../hooks/useResolvedStyle.js';
|
|
9
9
|
import { scrimExitDuration, overlayAnimations } from '../../../animations/index.js';
|
|
10
|
+
import { sheetExit, sheetEnter } from '../sheetMotion.js';
|
|
10
11
|
import { useKitsTheme } from '../../../contexts/Theme/KitsThemeProvider.js';
|
|
11
12
|
import { Icon } from '../../../primitives/Icon/index.js';
|
|
12
13
|
import Text from '../../../primitives/Text/index.js';
|
|
@@ -113,8 +114,8 @@ function KitsDialogControlled({ state, onHide }) {
|
|
|
113
114
|
children: /* @__PURE__ */ jsx(
|
|
114
115
|
Animated.View,
|
|
115
116
|
{
|
|
116
|
-
entering: isSheet ?
|
|
117
|
-
exiting:
|
|
117
|
+
entering: isSheet ? sheetEnter(overlayAnimations.sheet.enter) : ZoomIn.springify().damping(overlayAnimations.dialog.enter.damping).stiffness(overlayAnimations.dialog.enter.stiffness).mass(overlayAnimations.dialog.enter.mass),
|
|
118
|
+
exiting: isSheet ? sheetExit(overlayAnimations.sheet.exitDuration, handleExitFinished) : ZoomOut.duration(overlayAnimations.dialog.exitDuration).easing(Easing.in(Easing.ease)).withCallback((finished) => {
|
|
118
119
|
"worklet";
|
|
119
120
|
if (finished) runOnJS(handleExitFinished)();
|
|
120
121
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/components/overlay/Dialog/index.native.tsx"],"sourcesContent":["import React from \"react\";\nimport {Modal, Pressable, ScrollView, StyleSheet, View, useWindowDimensions} from \"react-native\";\nimport Animated, {Easing, FadeIn, FadeOut, ReduceMotion, runOnJS, SlideInDown, SlideOutDown, ZoomIn, ZoomOut} from \"react-native-reanimated\";\nimport {useSafeAreaInsets} from \"react-native-safe-area-context\";\nimport {Icon, Text} from \"../../../_compat\";\nimport type {IKitsDialogControlled} from \"@lmb-it/kitsconcerto-types\";\nimport {useKitsTheme} from \"../../../contexts/Theme\";\nimport {useSeverityColors} from \"../../../hooks/useSeverityColors\";\nimport {useResolvedStyle} from \"../../../hooks\";\nimport {overlayAnimations as anim, scrimExitDuration} from \"../../../animations\";\n\n/**\n * Keeps the RN Modal mounted through the exit animation. `visible` drives the\n * inner scrim + panel entering/exiting; the Modal itself stays mounted until\n * the panel's exit animation reports finished, then unmounts.\n *\n * Re-entrancy: a new `visible=true` during an exit re-renders the inner (which\n * re-enters), and the still-pending exit callback is ignored because\n * `visibleRef` is already back to `true` — so the Modal is never torn down\n * mid-reopen.\n */\nfunction useOverlayPresence(visible: boolean) {\n const [mounted, setMounted] = React.useState(visible);\n const visibleRef = React.useRef(visible);\n React.useEffect(() => {\n visibleRef.current = visible;\n if (visible) setMounted(true);\n }, [visible]);\n // Runs on the JS thread (dispatched via runOnJS from the exit worklet).\n const handleExitFinished = React.useCallback(() => {\n if (!visibleRef.current) setMounted(false);\n }, []);\n return {mounted, handleExitFinished};\n}\n\n/**\n * The scrim: it fades AND it is the thing you tap to dismiss, in one element.\n *\n * ⛔ THIS IS THE ACTIONSHEET'S SHAPE, NOT A THIRD PATTERN (§5). Two components in\n * this library already keep the backdrop a sibling of the panel:\n * `apps/mobile/src/ui/actionsheet/index.tsx:53` declares `Backdrop:\n * AnimatedPressable` — an animated, tappable element in its own right — and\n * `apps/mobile/src/ui/bottomsheet/index.tsx:124` passes `backdropComponent` to\n * `@gorhom/bottom-sheet`. The gorhom one is a prop-injection API belonging to a\n * sheet container that owns its own presentation; this Dialog owns its own RN\n * `Modal`, so there is nothing to inject into. The actionsheet's shape is the one\n * that fits, and it also collapses the separate `absoluteFill` Pressable this\n * component used to need into the scrim itself.\n *\n * ⚠️ BUILT WITH REANIMATED, NOT WITH THE ACTIONSHEET'S `createMotionAnimatedComponent`.\n * That helper wraps a different animation engine; this file's entering/exiting are\n * reanimated layout animations throughout, and mixing two engines in one overlay\n * would be inventing the third pattern §5 forbids.\n */\nconst AnimatedPressable = Animated.createAnimatedComponent(Pressable);\n\nexport default function KitsDialogControlled({state, onHide}: IKitsDialogControlled) {\n const {\n children,\n content: contentProp,\n onClose,\n asyncClose,\n type,\n icon,\n style,\n contentStyle,\n headerStyle,\n maskStyle,\n position = 'center',\n responsive = true,\n hideHeader,\n headerRender,\n footerRender,\n footerStyle,\n canClose,\n bodyStyle,\n closeIcon,\n // Native default true preserves historical tap-to-dismiss; web's\n // PrimeReact default is false — pass explicitly in shared code.\n dismissableMask = true,\n breakpoints,\n ...rest\n } = state;\n const {resolveToken, theme} = useKitsTheme();\n const severityColors = useSeverityColors(type || 'secondary');\n const colors = type ? severityColors : null;\n const insets = useSafeAreaInsets();\n const isSheet = position === 'bottom';\n\n const surfaceColor = resolveToken('surface-card');\n const textColor = resolveToken('text');\n const borderColor = colors?.border ?? resolveToken('border');\n const subtextColor = resolveToken('gray.500');\n const grabberColor = resolveToken('gray.300');\n // Scrim via the literal alpha overlay token → rgba(0,0,0,0.4) in both modes.\n const scrimColor = resolveToken('black-alpha-40');\n const brandLogo = type === 'brand' ? theme.config.logo : null;\n\n const resolvedStyle = useResolvedStyle(style || {});\n const resolvedContentStyle = useResolvedStyle(contentStyle || {});\n const resolvedHeaderStyle = useResolvedStyle(headerStyle || {});\n const resolvedMaskStyle = useResolvedStyle(maskStyle || {});\n const resolvedFooterStyle = useResolvedStyle(footerStyle || {});\n const resolvedBodyStyle = useResolvedStyle(bodyStyle || {});\n\n const {width: screenWidth} = useWindowDimensions();\n // Consumer `breakpoints` ({'960px': '75vw'}) mirrors the web prop: the\n // smallest max-width threshold >= the screen width wins; vw/% both map\n // to a percentage of the window width. Falls back to the responsive\n // default (50% tablets/desktop, 95% phones <=641px).\n const breakpointWidth = (() => {\n if (!breakpoints) return null;\n const matches = Object.entries(breakpoints)\n .map(([k, v]) => [parseFloat(k), v] as const)\n .filter(([px]) => !Number.isNaN(px) && screenWidth <= px)\n .sort(([a], [b]) => a - b);\n const value = matches[0]?.[1];\n if (value == null) return null;\n const num = parseFloat(value);\n return Number.isNaN(num) ? null : `${num}%`;\n })();\n const responsiveWidth = breakpointWidth ?? (screenWidth > 641 ? '50%' : '95%');\n const hasExplicitWidth = (resolvedStyle as any).width != null;\n\n const hide = async () => {\n // canClose gate — intercepts every close path (backdrop Pressable,\n // built-in X Pressable, RN Modal onRequestClose). When blocked,\n // onClose is suppressed and the dialog stays open.\n if (canClose === false || (typeof canClose === 'function' && !canClose())) {\n return;\n }\n if (asyncClose && typeof onClose === \"function\") {\n await onClose();\n } else {\n onClose?.();\n }\n onHide();\n };\n\n const {mounted, handleExitFinished} = useOverlayPresence(!!state.visible);\n if (!mounted) return null;\n\n const content = typeof children === \"function\" ? children(hide) : children;\n // Content-mode override (mirrors web): consumer node replaces the whole\n // header / body / footer template inside the panel.\n const contentMode = contentProp != null\n ? (typeof contentProp === \"function\" ? contentProp({hide}) : contentProp)\n : null;\n\n return (\n <Modal visible transparent animationType=\"none\" onRequestClose={hide}>\n {state.visible && (\n <View style={styles.root}>\n {/*\n ⛔ THE SCRIM IS A SIBLING OF THE PANEL, NOT ITS PARENT.\n It used to be the panel's parent, and opacity composes down a\n view tree — so the scrim's FadeIn/FadeOut multiplied the panel's\n opacity for the whole of both animations and the panel faded as\n well as travelled. `SlideInDown` animates `originY` only and\n never touched opacity; the fade was entirely inherited. Fixed\n 29 September 2026 — the structure is the fix, and no duration\n was tuned to make it look better (§12.5).\n\n ⚠️ IT IS ALSO THE DISMISS TARGET. The component used to draw a\n separate `absoluteFill` Pressable inside the scrim; scrim and\n target are one element now, which is the actionsheet's shape.\n */}\n <AnimatedPressable\n entering={FadeIn.duration(anim.scrim.enterDuration)}\n exiting={FadeOut.duration(scrimExitDuration(isSheet ? anim.sheet.exitDuration : anim.dialog.exitDuration))}\n style={[StyleSheet.absoluteFill, {backgroundColor: scrimColor}, resolvedMaskStyle as any]}\n onPress={dismissableMask ? hide : undefined}\n />\n {/*\n ⚠️ `pointerEvents=\"box-none\"` IS LOAD-BEARING. This view spans the\n screen so it can place the panel — centred, or pinned to the\n bottom — and it sits ON TOP of the scrim. Without `box-none` it\n would swallow every tap meant for the scrim and tap-to-dismiss\n would stop working. With it, the empty area passes taps through\n to the scrim beneath while the panel still receives its own.\n */}\n <View\n style={isSheet ? styles.sheetArrange : styles.centerArrange}\n pointerEvents=\"box-none\"\n >\n <Animated.View\n /* The sheet asks Reanimated to keep moving under iOS\n \"Reduce Motion\" — see `overlayAnimations.sheet`. Without\n it the panel appears in one frame and the only motion\n left is the scrim, which reads as a fade. The centred\n dialog keeps the system default. */\n entering={isSheet\n ? SlideInDown.springify().damping(anim.sheet.enter.damping).stiffness(anim.sheet.enter.stiffness).mass(anim.sheet.enter.mass ?? 1)\n .reduceMotion(anim.sheet.keepMotionWhenReduced ? ReduceMotion.Never : ReduceMotion.System)\n : ZoomIn.springify().damping(anim.dialog.enter.damping).stiffness(anim.dialog.enter.stiffness).mass(anim.dialog.enter.mass ?? 1)}\n exiting={(isSheet\n ? SlideOutDown.duration(anim.sheet.exitDuration).easing(Easing.in(Easing.ease))\n .reduceMotion(anim.sheet.keepMotionWhenReduced ? ReduceMotion.Never : ReduceMotion.System)\n : ZoomOut.duration(anim.dialog.exitDuration).easing(Easing.in(Easing.ease))\n ).withCallback((finished) => {\n 'worklet';\n if (finished) runOnJS(handleExitFinished)();\n })}\n style={[\n styles.panel,\n isSheet && styles.sheetPanel,\n {backgroundColor: surfaceColor, borderColor},\n // Explicit `breakpoints` win even when responsive=false (web parity)\n !isSheet && !hasExplicitWidth && (breakpoints != null || responsive) ? {width: responsiveWidth} : null,\n resolvedStyle as any,\n resolvedContentStyle as any,\n ]}\n >\n {contentMode != null ? contentMode : <>\n {/* Grabber (bottom-sheet) */}\n {isSheet && <View style={[styles.grabber, {backgroundColor: grabberColor}]}/>}\n\n {/* Severity accent strip */}\n {colors && !isSheet && (\n <View style={{height: 4, backgroundColor: colors.solid, borderTopLeftRadius: 20, borderTopRightRadius: 20}}/>\n )}\n\n {/* Custom header (headerRender) — fully replaces the built-in header\n View when provided. Wins over the default header even if `header`\n is also set. */}\n {!hideHeader && headerRender != null && headerRender({close: () => { void hide(); }})}\n\n {/* Header (default) — rendered when no headerRender and `header` is set. */}\n {!hideHeader && headerRender == null && rest.header != null && (\n <View style={[styles.header, {borderBottomColor: borderColor}, resolvedHeaderStyle as any]}>\n {/* Inline severity icon */}\n {(icon || brandLogo) && colors && (\n <View style={{\n width: 36,\n height: 36,\n borderRadius: 18,\n backgroundColor: colors.iconBg,\n alignItems: 'center',\n justifyContent: 'center',\n marginRight: 12,\n }}>\n {brandLogo ? brandLogo : typeof icon === 'string' ? (\n <Icon name={icon as never} size={'lg'} color={colors.iconFg}/>\n ) : icon}\n </View>\n )}\n <Text style={{fontSize: 18, fontWeight: \"700\", color: textColor, flex: 1}}>\n {rest.header as React.ReactNode}\n </Text>\n <Pressable onPress={hide} hitSlop={8}>\n {closeIcon ?? <Text style={{fontSize: 18, color: subtextColor}}>✕</Text>}\n </Pressable>\n </View>\n )}\n\n {/* Body — bodyStyle is applied AFTER the built-in maxHeight: 400,\n so consumers can lift the cap (`maxHeight: 600`) or unlock flex\n sizing (`minHeight: 0`) without losing the default behavior when\n bodyStyle is unset. */}\n <ScrollView\n style={[styles.body, resolvedBodyStyle as any]}\n contentContainerStyle={styles.bodyContent}\n showsVerticalScrollIndicator={false}\n >\n {content}\n </ScrollView>\n\n {/* Footer — footerRender takes precedence over `footer`. footerStyle\n is merged AFTER the built-in flex defaults so consumers can override\n alignment (e.g. justifyContent: 'space-between' for left-delete /\n right-actions layouts) without losing the borderTop / padding. */}\n {(footerRender != null || rest.footer != null) && (\n <View style={[\n styles.footer,\n {borderTopColor: borderColor},\n isSheet && {paddingBottom: 12 + insets.bottom},\n resolvedFooterStyle as any,\n ]}>\n {footerRender\n ? footerRender({close: () => { void hide(); }})\n : (rest.footer as React.ReactNode)}\n </View>\n )}\n </>}\n </Animated.View>\n </View>\n </View>\n )}\n </Modal>\n );\n}\n\nconst styles = StyleSheet.create({\n /**\n * The container. ⛔ IT IS NEVER ANIMATED AND CARRIES NO OPACITY — that is the\n * whole point of the change. It only exists to give the scrim and the panel a\n * shared parent so they can be siblings.\n */\n root: {\n flex: 1,\n },\n /**\n * Places the panel. ⚠️ The 24 padding moved here from the old `overlay` style,\n * and it had to: `position: absolute` resolves against a parent's PADDING box\n * in React Native, so a scrim absolutely filling a padded parent would have\n * stopped 24 short of every screen edge and left an undimmed frame. The scrim\n * now fills `root`, which has no padding, and the inset belongs to the layer\n * that positions the panel.\n */\n centerArrange: {\n ...StyleSheet.absoluteFillObject,\n justifyContent: \"center\",\n alignItems: \"center\",\n padding: 24,\n },\n sheetArrange: {\n ...StyleSheet.absoluteFillObject,\n justifyContent: \"flex-end\",\n },\n sheetPanel: {\n width: \"100%\",\n maxWidth: \"100%\",\n maxHeight: \"90%\",\n borderWidth: 0,\n borderTopLeftRadius: 24,\n borderTopRightRadius: 24,\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0,\n paddingTop: 10,\n },\n grabber: {\n width: 40,\n height: 5,\n borderRadius: 999,\n alignSelf: \"center\",\n marginBottom: 6,\n },\n panel: {\n // 20 == radii.xl (no numeric radii resolver on native — see report).\n borderRadius: 20,\n borderWidth: 1,\n minWidth: 250,\n maxWidth: \"90%\",\n maxHeight: \"80%\",\n overflow: \"hidden\",\n // Subtle elevation: low opacity, wide blur, minimal offset.\n elevation: 6,\n shadowColor: \"#000\",\n shadowOffset: {width: 0, height: 2},\n shadowOpacity: 0.15,\n shadowRadius: 20,\n },\n header: {\n flexDirection: \"row\",\n alignItems: \"center\",\n paddingHorizontal: 20,\n paddingVertical: 16,\n borderBottomWidth: 1,\n },\n body: {\n maxHeight: 400,\n },\n bodyContent: {\n padding: 20,\n },\n footer: {\n flexDirection: \"row\",\n justifyContent: \"flex-end\",\n paddingHorizontal: 20,\n paddingVertical: 12,\n borderTopWidth: 1,\n gap: 8,\n },\n});\n"],"names":["anim"],"mappings":";;;;;;;;;;;;;AAqBA,SAAS,mBAAmB,OAAA,EAAkB;AAC1C,EAAA,MAAM,CAAC,OAAA,EAAS,UAAU,CAAA,GAAI,KAAA,CAAM,SAAS,OAAO,CAAA;AACpD,EAAA,MAAM,UAAA,GAAa,KAAA,CAAM,MAAA,CAAO,OAAO,CAAA;AACvC,EAAA,KAAA,CAAM,UAAU,MAAM;AAClB,IAAA,UAAA,CAAW,OAAA,GAAU,OAAA;AACrB,IAAA,IA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BAAA,EAAmB;AAAA,GACvB;AAAA,EACA,IAAA,EAAM;AAAA,IACF,SAAA,EAAW;AAAA,GACf;AAAA,EACA,WAAA,EAAa;AAAA,IACT,OAAA,EAAS;AAAA,GACb;AAAA,EACA,MAAA,EAAQ;AAAA,IACJ,aAAA,EAAe,KAAA;AAAA,IACf,cAAA,EAAgB,UAAA;AAAA,IAChB,iBAAA,EAAmB,EAAA;AAAA,IACnB,eAAA,EAAiB,EAAA;AAAA,IACjB,cAAA,EAAgB,CAAA;AAAA,IAChB,GAAA,EAAK;AAAA;AAEb,CAAC,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/components/overlay/Dialog/index.native.tsx"],"sourcesContent":["import React from \"react\";\nimport {Modal, Pressable, ScrollView, StyleSheet, View, useWindowDimensions} from \"react-native\";\n/* ⛔ `ReduceMotion` IS GONE FROM THIS FILE, AND THAT IS A STATEMENT, NOT A\n TIDY-UP. The sheet used to carry `.reduceMotion(ReduceMotion.Never)` — an\n instruction to keep moving when the device asks for less motion — and it is\n on record that the modifier does not hold: the sheet was skipped anyway, in\n this library's own Storybook as well as in the App. It was a claim the code\n could not deliver, so it is removed rather than left to be believed.\n ⚠️ A CUSTOM entering/exiting is outside Reanimated's reduce-motion handling\n altogether, so the sheet now genuinely keeps its motion — which is what the\n modifier was asking for and never achieved. `anim.sheet.keepMotionWhenReduced`\n is left in the presets: ConfirmDialog is a separate unit and no preset should\n change under it. */\nimport Animated, {Easing, FadeIn, FadeOut, runOnJS, ZoomIn, ZoomOut} from \"react-native-reanimated\";\nimport {useSafeAreaInsets} from \"react-native-safe-area-context\";\nimport {Icon, Text} from \"../../../_compat\";\nimport type {IKitsDialogControlled} from \"@lmb-it/kitsconcerto-types\";\nimport {useKitsTheme} from \"../../../contexts/Theme\";\nimport {useSeverityColors} from \"../../../hooks/useSeverityColors\";\nimport {useResolvedStyle} from \"../../../hooks\";\nimport {overlayAnimations as anim, scrimExitDuration} from \"../../../animations\";\nimport {sheetEnter, sheetExit} from \"../sheetMotion\";\n\n/**\n * Keeps the RN Modal mounted through the exit animation. `visible` drives the\n * inner scrim + panel entering/exiting; the Modal itself stays mounted until\n * the panel's exit animation reports finished, then unmounts.\n *\n * Re-entrancy: a new `visible=true` during an exit re-renders the inner (which\n * re-enters), and the still-pending exit callback is ignored because\n * `visibleRef` is already back to `true` — so the Modal is never torn down\n * mid-reopen.\n */\nfunction useOverlayPresence(visible: boolean) {\n const [mounted, setMounted] = React.useState(visible);\n const visibleRef = React.useRef(visible);\n React.useEffect(() => {\n visibleRef.current = visible;\n if (visible) setMounted(true);\n }, [visible]);\n // Runs on the JS thread (dispatched via runOnJS from the exit worklet).\n const handleExitFinished = React.useCallback(() => {\n if (!visibleRef.current) setMounted(false);\n }, []);\n return {mounted, handleExitFinished};\n}\n\n/**\n * The scrim: it fades AND it is the thing you tap to dismiss, in one element.\n *\n * ⛔ THIS IS THE ACTIONSHEET'S SHAPE, NOT A THIRD PATTERN (§5). Two components in\n * this library already keep the backdrop a sibling of the panel:\n * `apps/mobile/src/ui/actionsheet/index.tsx:53` declares `Backdrop:\n * AnimatedPressable` — an animated, tappable element in its own right — and\n * `apps/mobile/src/ui/bottomsheet/index.tsx:124` passes `backdropComponent` to\n * `@gorhom/bottom-sheet`. The gorhom one is a prop-injection API belonging to a\n * sheet container that owns its own presentation; this Dialog owns its own RN\n * `Modal`, so there is nothing to inject into. The actionsheet's shape is the one\n * that fits, and it also collapses the separate `absoluteFill` Pressable this\n * component used to need into the scrim itself.\n *\n * ⚠️ BUILT WITH REANIMATED, NOT WITH THE ACTIONSHEET'S `createMotionAnimatedComponent`.\n * That helper wraps a different animation engine; this file's entering/exiting are\n * reanimated layout animations throughout, and mixing two engines in one overlay\n * would be inventing the third pattern §5 forbids.\n */\nconst AnimatedPressable = Animated.createAnimatedComponent(Pressable);\n\nexport default function KitsDialogControlled({state, onHide}: IKitsDialogControlled) {\n const {\n children,\n content: contentProp,\n onClose,\n asyncClose,\n type,\n icon,\n style,\n contentStyle,\n headerStyle,\n maskStyle,\n position = 'center',\n responsive = true,\n hideHeader,\n headerRender,\n footerRender,\n footerStyle,\n canClose,\n bodyStyle,\n closeIcon,\n // Native default true preserves historical tap-to-dismiss; web's\n // PrimeReact default is false — pass explicitly in shared code.\n dismissableMask = true,\n breakpoints,\n ...rest\n } = state;\n const {resolveToken, theme} = useKitsTheme();\n const severityColors = useSeverityColors(type || 'secondary');\n const colors = type ? severityColors : null;\n const insets = useSafeAreaInsets();\n const isSheet = position === 'bottom';\n\n const surfaceColor = resolveToken('surface-card');\n const textColor = resolveToken('text');\n const borderColor = colors?.border ?? resolveToken('border');\n const subtextColor = resolveToken('gray.500');\n const grabberColor = resolveToken('gray.300');\n // Scrim via the literal alpha overlay token → rgba(0,0,0,0.4) in both modes.\n const scrimColor = resolveToken('black-alpha-40');\n const brandLogo = type === 'brand' ? theme.config.logo : null;\n\n const resolvedStyle = useResolvedStyle(style || {});\n const resolvedContentStyle = useResolvedStyle(contentStyle || {});\n const resolvedHeaderStyle = useResolvedStyle(headerStyle || {});\n const resolvedMaskStyle = useResolvedStyle(maskStyle || {});\n const resolvedFooterStyle = useResolvedStyle(footerStyle || {});\n const resolvedBodyStyle = useResolvedStyle(bodyStyle || {});\n\n const {width: screenWidth} = useWindowDimensions();\n // Consumer `breakpoints` ({'960px': '75vw'}) mirrors the web prop: the\n // smallest max-width threshold >= the screen width wins; vw/% both map\n // to a percentage of the window width. Falls back to the responsive\n // default (50% tablets/desktop, 95% phones <=641px).\n const breakpointWidth = (() => {\n if (!breakpoints) return null;\n const matches = Object.entries(breakpoints)\n .map(([k, v]) => [parseFloat(k), v] as const)\n .filter(([px]) => !Number.isNaN(px) && screenWidth <= px)\n .sort(([a], [b]) => a - b);\n const value = matches[0]?.[1];\n if (value == null) return null;\n const num = parseFloat(value);\n return Number.isNaN(num) ? null : `${num}%`;\n })();\n const responsiveWidth = breakpointWidth ?? (screenWidth > 641 ? '50%' : '95%');\n const hasExplicitWidth = (resolvedStyle as any).width != null;\n\n const hide = async () => {\n // canClose gate — intercepts every close path (backdrop Pressable,\n // built-in X Pressable, RN Modal onRequestClose). When blocked,\n // onClose is suppressed and the dialog stays open.\n if (canClose === false || (typeof canClose === 'function' && !canClose())) {\n return;\n }\n if (asyncClose && typeof onClose === \"function\") {\n await onClose();\n } else {\n onClose?.();\n }\n onHide();\n };\n\n const {mounted, handleExitFinished} = useOverlayPresence(!!state.visible);\n if (!mounted) return null;\n\n const content = typeof children === \"function\" ? children(hide) : children;\n // Content-mode override (mirrors web): consumer node replaces the whole\n // header / body / footer template inside the panel.\n const contentMode = contentProp != null\n ? (typeof contentProp === \"function\" ? contentProp({hide}) : contentProp)\n : null;\n\n return (\n <Modal visible transparent animationType=\"none\" onRequestClose={hide}>\n {state.visible && (\n <View style={styles.root}>\n {/*\n ⛔ THE SCRIM IS A SIBLING OF THE PANEL, NOT ITS PARENT.\n It used to be the panel's parent, and opacity composes down a\n view tree — so the scrim's FadeIn/FadeOut multiplied the panel's\n opacity for the whole of both animations and the panel faded as\n well as travelled. `SlideInDown` animates `originY` only and\n never touched opacity; the fade was entirely inherited. Fixed\n 29 September 2026 — the structure is the fix, and no duration\n was tuned to make it look better (§12.5).\n\n ⚠️ IT IS ALSO THE DISMISS TARGET. The component used to draw a\n separate `absoluteFill` Pressable inside the scrim; scrim and\n target are one element now, which is the actionsheet's shape.\n */}\n <AnimatedPressable\n entering={FadeIn.duration(anim.scrim.enterDuration)}\n exiting={FadeOut.duration(scrimExitDuration(isSheet ? anim.sheet.exitDuration : anim.dialog.exitDuration))}\n style={[StyleSheet.absoluteFill, {backgroundColor: scrimColor}, resolvedMaskStyle as any]}\n onPress={dismissableMask ? hide : undefined}\n />\n {/*\n ⚠️ `pointerEvents=\"box-none\"` IS LOAD-BEARING. This view spans the\n screen so it can place the panel — centred, or pinned to the\n bottom — and it sits ON TOP of the scrim. Without `box-none` it\n would swallow every tap meant for the scrim and tap-to-dismiss\n would stop working. With it, the empty area passes taps through\n to the scrim beneath while the panel still receives its own.\n */}\n <View\n style={isSheet ? styles.sheetArrange : styles.centerArrange}\n pointerEvents=\"box-none\"\n >\n <Animated.View\n /* The sheet asks Reanimated to keep moving under iOS\n \"Reduce Motion\" — see `overlayAnimations.sheet`. Without\n it the panel appears in one frame and the only motion\n left is the scrim, which reads as a fade. The centred\n dialog keeps the system default. */\n entering={isSheet\n ? sheetEnter(anim.sheet.enter)\n : ZoomIn.springify().damping(anim.dialog.enter.damping).stiffness(anim.dialog.enter.stiffness).mass(anim.dialog.enter.mass ?? 1)}\n exiting={isSheet\n ? sheetExit(anim.sheet.exitDuration, handleExitFinished)\n : ZoomOut.duration(anim.dialog.exitDuration).easing(Easing.in(Easing.ease))\n .withCallback((finished) => {\n 'worklet';\n if (finished) runOnJS(handleExitFinished)();\n })}\n style={[\n styles.panel,\n isSheet && styles.sheetPanel,\n {backgroundColor: surfaceColor, borderColor},\n // Explicit `breakpoints` win even when responsive=false (web parity)\n !isSheet && !hasExplicitWidth && (breakpoints != null || responsive) ? {width: responsiveWidth} : null,\n resolvedStyle as any,\n resolvedContentStyle as any,\n ]}\n >\n {contentMode != null ? contentMode : <>\n {/* Grabber (bottom-sheet) */}\n {isSheet && <View style={[styles.grabber, {backgroundColor: grabberColor}]}/>}\n\n {/* Severity accent strip */}\n {colors && !isSheet && (\n <View style={{height: 4, backgroundColor: colors.solid, borderTopLeftRadius: 20, borderTopRightRadius: 20}}/>\n )}\n\n {/* Custom header (headerRender) — fully replaces the built-in header\n View when provided. Wins over the default header even if `header`\n is also set. */}\n {!hideHeader && headerRender != null && headerRender({close: () => { void hide(); }})}\n\n {/* Header (default) — rendered when no headerRender and `header` is set. */}\n {!hideHeader && headerRender == null && rest.header != null && (\n <View style={[styles.header, {borderBottomColor: borderColor}, resolvedHeaderStyle as any]}>\n {/* Inline severity icon */}\n {(icon || brandLogo) && colors && (\n <View style={{\n width: 36,\n height: 36,\n borderRadius: 18,\n backgroundColor: colors.iconBg,\n alignItems: 'center',\n justifyContent: 'center',\n marginRight: 12,\n }}>\n {brandLogo ? brandLogo : typeof icon === 'string' ? (\n <Icon name={icon as never} size={'lg'} color={colors.iconFg}/>\n ) : icon}\n </View>\n )}\n <Text style={{fontSize: 18, fontWeight: \"700\", color: textColor, flex: 1}}>\n {rest.header as React.ReactNode}\n </Text>\n <Pressable onPress={hide} hitSlop={8}>\n {closeIcon ?? <Text style={{fontSize: 18, color: subtextColor}}>✕</Text>}\n </Pressable>\n </View>\n )}\n\n {/* Body — bodyStyle is applied AFTER the built-in maxHeight: 400,\n so consumers can lift the cap (`maxHeight: 600`) or unlock flex\n sizing (`minHeight: 0`) without losing the default behavior when\n bodyStyle is unset. */}\n <ScrollView\n style={[styles.body, resolvedBodyStyle as any]}\n contentContainerStyle={styles.bodyContent}\n showsVerticalScrollIndicator={false}\n >\n {content}\n </ScrollView>\n\n {/* Footer — footerRender takes precedence over `footer`. footerStyle\n is merged AFTER the built-in flex defaults so consumers can override\n alignment (e.g. justifyContent: 'space-between' for left-delete /\n right-actions layouts) without losing the borderTop / padding. */}\n {(footerRender != null || rest.footer != null) && (\n <View style={[\n styles.footer,\n {borderTopColor: borderColor},\n isSheet && {paddingBottom: 12 + insets.bottom},\n resolvedFooterStyle as any,\n ]}>\n {footerRender\n ? footerRender({close: () => { void hide(); }})\n : (rest.footer as React.ReactNode)}\n </View>\n )}\n </>}\n </Animated.View>\n </View>\n </View>\n )}\n </Modal>\n );\n}\n\nconst styles = StyleSheet.create({\n /**\n * The container. ⛔ IT IS NEVER ANIMATED AND CARRIES NO OPACITY — that is the\n * whole point of the change. It only exists to give the scrim and the panel a\n * shared parent so they can be siblings.\n */\n root: {\n flex: 1,\n },\n /**\n * Places the panel. ⚠️ The 24 padding moved here from the old `overlay` style,\n * and it had to: `position: absolute` resolves against a parent's PADDING box\n * in React Native, so a scrim absolutely filling a padded parent would have\n * stopped 24 short of every screen edge and left an undimmed frame. The scrim\n * now fills `root`, which has no padding, and the inset belongs to the layer\n * that positions the panel.\n */\n centerArrange: {\n ...StyleSheet.absoluteFillObject,\n justifyContent: \"center\",\n alignItems: \"center\",\n padding: 24,\n },\n sheetArrange: {\n ...StyleSheet.absoluteFillObject,\n justifyContent: \"flex-end\",\n },\n sheetPanel: {\n width: \"100%\",\n maxWidth: \"100%\",\n maxHeight: \"90%\",\n borderWidth: 0,\n borderTopLeftRadius: 24,\n borderTopRightRadius: 24,\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0,\n paddingTop: 10,\n },\n grabber: {\n width: 40,\n height: 5,\n borderRadius: 999,\n alignSelf: \"center\",\n marginBottom: 6,\n },\n panel: {\n // 20 == radii.xl (no numeric radii resolver on native — see report).\n borderRadius: 20,\n borderWidth: 1,\n minWidth: 250,\n maxWidth: \"90%\",\n maxHeight: \"80%\",\n overflow: \"hidden\",\n // Subtle elevation: low opacity, wide blur, minimal offset.\n elevation: 6,\n shadowColor: \"#000\",\n shadowOffset: {width: 0, height: 2},\n shadowOpacity: 0.15,\n shadowRadius: 20,\n },\n header: {\n flexDirection: \"row\",\n alignItems: \"center\",\n paddingHorizontal: 20,\n paddingVertical: 16,\n borderBottomWidth: 1,\n },\n body: {\n maxHeight: 400,\n },\n bodyContent: {\n padding: 20,\n },\n footer: {\n flexDirection: \"row\",\n justifyContent: \"flex-end\",\n paddingHorizontal: 20,\n paddingVertical: 12,\n borderTopWidth: 1,\n gap: 8,\n },\n});\n"],"names":["anim"],"mappings":";;;;;;;;;;;;;;AAiCA,SAAS,mBAAmB,OAAA,EAAkB;AAC1C,EAAA,MAAM,CAAC,OAAA,EAAS,UAAU,CAAA,GAAI,KAAA,CAAM,SAAS,OAAO,CAAA;AACpD,EAAA,MAAM,UAAA,GAAa,KAAA,CAAM,MAAA,CAAO,OAAO,CAAA;AACvC,EAAA,KAAA,CAAM,UAAU,MAAM;AAClB,IAAA,UAAA,CAAW,OAAA,GAAU,OAAA;AACrB,IAAA,IAAI,OAAA,aAAoB,IAAI,CAAA;AA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AAA;AAEb,CAAC,CAAA;;;;"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var Animated = require('react-native-reanimated');
|
|
4
|
+
|
|
5
|
+
const sheetEnter = (spring) => (values) => {
|
|
6
|
+
"worklet";
|
|
7
|
+
return {
|
|
8
|
+
initialValues: { transform: [{ translateY: values.targetHeight }] },
|
|
9
|
+
animations: {
|
|
10
|
+
transform: [{
|
|
11
|
+
translateY: Animated.withSpring(0, {
|
|
12
|
+
damping: spring.damping,
|
|
13
|
+
stiffness: spring.stiffness,
|
|
14
|
+
mass: spring.mass ?? 1
|
|
15
|
+
/* The spec keeps the entrance a spring, so no duration
|
|
16
|
+
is introduced here — only the distance changed. */
|
|
17
|
+
})
|
|
18
|
+
}]
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
const sheetExit = (duration, onFinished) => (values) => {
|
|
23
|
+
"worklet";
|
|
24
|
+
return {
|
|
25
|
+
initialValues: { transform: [{ translateY: 0 }] },
|
|
26
|
+
animations: {
|
|
27
|
+
transform: [{
|
|
28
|
+
translateY: Animated.withTiming(values.currentHeight, {
|
|
29
|
+
duration,
|
|
30
|
+
easing: Animated.Easing.in(Animated.Easing.ease)
|
|
31
|
+
})
|
|
32
|
+
}]
|
|
33
|
+
},
|
|
34
|
+
/* ⛔ THE MODAL UNMOUNTS ON THIS. A custom exiting reports through
|
|
35
|
+
`callback`, where a built-in used `.withCallback`. Losing it
|
|
36
|
+
would leave the RN Modal mounted over the app for ever. */
|
|
37
|
+
callback: (finished) => {
|
|
38
|
+
"worklet";
|
|
39
|
+
if (finished) Animated.runOnJS(onFinished)();
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
exports.sheetEnter = sheetEnter;
|
|
45
|
+
exports.sheetExit = sheetExit;
|
|
46
|
+
//# sourceMappingURL=sheetMotion.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sheetMotion.cjs","sources":["../../../../src/components/overlay/sheetMotion.native.ts"],"sourcesContent":["import {Easing, runOnJS, withSpring, withTiming} from \"react-native-reanimated\";\n\n/**\n * The bottom sheet's entering and exiting motion, for every overlay in this\n * library that presents one. ⛔ ONE DEFINITION, TWO CALLERS — `Dialog` and\n * `ConfirmDialog` both draw a sheet inside their own RN `Modal`, both hit the\n * same fault, and two copies of an animation drift the moment one is tuned.\n *\n**\n * ⛔ THE SHEET'S SLIDE IS WRITTEN BY HAND, BECAUSE `SlideInDown` DOES NOT MOVE\n * THIS PANEL AT ALL — measured on an iPhone 16 Pro simulator, 30 September 2026.\n *\n * ⚠️ THE MEASUREMENT, because three earlier rounds of this hunt cited\n * instruments that exist in no repository. One view, one tree, one Modal, one\n * method — a tap followed by a screenshot — and only the animation changed:\n *\n * FadeIn.duration(10000) the panel is caught HALF TRANSPARENT\n * SlideInDown.duration(10000) the panel is at rest and fully opaque\n * translateY 700 -> 0, 10000ms the panel is caught PARTWAY UP THE SCREEN\n *\n * So the view can be faded, and it can be translated. What fails is\n * `SlideInDown`'s own arithmetic for HOW FAR to travel. It derives that from\n * the window — and inside a React Native `Modal`, which hosts its own native\n * view hierarchy, the window it measures is not the screen. The distance comes\n * out as nothing, so the panel is placed at its resting position on frame one.\n *\n * ⚠️ THE DURATIONS ABOVE ARE THE INSTRUMENT, NOT THE PRODUCT. 10000ms was used\n * because the only method available — tap, then screenshot — has a round trip\n * longer than three seconds, which silently invalidated an earlier round of\n * 3000ms probes: every one of them showed a finished animation and read as\n * \"nothing ran\". No shipped duration was touched to make anything look better\n * (§12.5); the numbers below are still `overlayAnimations`'.\n *\n * ⛔ AND THIS IS WHY THE SCRIM-AND-PANEL SIBLING FIX CHANGED NOTHING VISIBLE.\n * That fix was real: the panel had been inheriting the scrim's fade. But the\n * panel's own slide had never run, so removing the inherited fade left a panel\n * that simply appears. The fix made the sheet strictly LESS animated, and the\n * report that \"it is the same\" was correct.\n *\n * WHAT THESE USE INSTEAD. `targetHeight` and `currentHeight` are the PANEL's\n * own box, laid out inside the Modal's own hierarchy, so they are the one\n * distance that is right in this coordinate space. A sheet travels its own\n * height; it never needed the window.\n */\nexport const sheetEnter = (spring: {damping: number; stiffness: number; mass?: number}) =>\n (values: any) => {\n 'worklet';\n return {\n initialValues: {transform: [{translateY: values.targetHeight}]},\n animations: {\n transform: [{\n translateY: withSpring(0, {\n damping: spring.damping,\n stiffness: spring.stiffness,\n mass: spring.mass ?? 1,\n /* The spec keeps the entrance a spring, so no duration\n is introduced here — only the distance changed. */\n }),\n }],\n },\n };\n };\n\nexport const sheetExit = (duration: number, onFinished: () => void) =>\n (values: any) => {\n 'worklet';\n return {\n initialValues: {transform: [{translateY: 0}]},\n animations: {\n transform: [{\n translateY: withTiming(values.currentHeight, {\n duration,\n easing: Easing.in(Easing.ease),\n }),\n }],\n },\n /* ⛔ THE MODAL UNMOUNTS ON THIS. A custom exiting reports through\n `callback`, where a built-in used `.withCallback`. Losing it\n would leave the RN Modal mounted over the app for ever. */\n callback: (finished: boolean) => {\n 'worklet';\n if (finished) runOnJS(onFinished)();\n },\n };\n };\n\n\n"],"names":["withSpring","withTiming","Easing","runOnJS"],"mappings":";;;;AA4CO,MAAM,UAAA,GAAa,CAAC,MAAA,KACvB,CAAC,MAAA,KAAgB;AACb,EAAA,SAAA;AACA,EAAA,OAAO;AAAA,IACH,aAAA,EAAe,EAAC,SAAA,EAAW,CAAC,EAAC,UAAA,EAAY,MAAA,CAAO,YAAA,EAAa,CAAA,EAAC;AAAA,IAC9D,UAAA,EAAY;AAAA,MACR,WAAW,CAAC;AAAA,QACR,UAAA,EAAYA,oBAAW,CAAA,EAAG;AAAA,UACtB,SAAS,MAAA,CAAO,OAAA;AAAA,UAChB,WAAW,MAAA,CAAO,SAAA;AAAA,UAClB,IAAA,EAAM,OAAO,IAAA,IAAQ;AAAA;AAAA;AAAA,SAGxB;AAAA,OACJ;AAAA;AACL,GACJ;AACJ;AAEG,MAAM,SAAA,GAAY,CAAC,QAAA,EAAkB,UAAA,KACxC,CAAC,MAAA,KAAgB;AACb,EAAA,SAAA;AACA,EAAA,OAAO;AAAA,IACH,aAAA,EAAe,EAAC,SAAA,EAAW,CAAC,EAAC,UAAA,EAAY,CAAA,EAAE,CAAA,EAAC;AAAA,IAC5C,UAAA,EAAY;AAAA,MACR,WAAW,CAAC;AAAA,QACR,UAAA,EAAYC,mBAAA,CAAW,MAAA,CAAO,aAAA,EAAe;AAAA,UACzC,QAAA;AAAA,UACA,MAAA,EAAQC,eAAA,CAAO,EAAA,CAAGA,eAAA,CAAO,IAAI;AAAA,SAChC;AAAA,OACJ;AAAA,KACL;AAAA;AAAA;AAAA;AAAA,IAIA,QAAA,EAAU,CAAC,QAAA,KAAsB;AAC7B,MAAA,SAAA;AACA,MAAA,IAAI,QAAA,EAAUC,gBAAA,CAAQ,UAAU,CAAA,EAAE;AAAA,IACtC;AAAA,GACJ;AACJ;;;;;"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { runOnJS, withTiming, Easing, withSpring } from 'react-native-reanimated';
|
|
2
|
+
|
|
3
|
+
const sheetEnter = (spring) => (values) => {
|
|
4
|
+
"worklet";
|
|
5
|
+
return {
|
|
6
|
+
initialValues: { transform: [{ translateY: values.targetHeight }] },
|
|
7
|
+
animations: {
|
|
8
|
+
transform: [{
|
|
9
|
+
translateY: withSpring(0, {
|
|
10
|
+
damping: spring.damping,
|
|
11
|
+
stiffness: spring.stiffness,
|
|
12
|
+
mass: spring.mass ?? 1
|
|
13
|
+
/* The spec keeps the entrance a spring, so no duration
|
|
14
|
+
is introduced here — only the distance changed. */
|
|
15
|
+
})
|
|
16
|
+
}]
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
const sheetExit = (duration, onFinished) => (values) => {
|
|
21
|
+
"worklet";
|
|
22
|
+
return {
|
|
23
|
+
initialValues: { transform: [{ translateY: 0 }] },
|
|
24
|
+
animations: {
|
|
25
|
+
transform: [{
|
|
26
|
+
translateY: withTiming(values.currentHeight, {
|
|
27
|
+
duration,
|
|
28
|
+
easing: Easing.in(Easing.ease)
|
|
29
|
+
})
|
|
30
|
+
}]
|
|
31
|
+
},
|
|
32
|
+
/* ⛔ THE MODAL UNMOUNTS ON THIS. A custom exiting reports through
|
|
33
|
+
`callback`, where a built-in used `.withCallback`. Losing it
|
|
34
|
+
would leave the RN Modal mounted over the app for ever. */
|
|
35
|
+
callback: (finished) => {
|
|
36
|
+
"worklet";
|
|
37
|
+
if (finished) runOnJS(onFinished)();
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export { sheetEnter, sheetExit };
|
|
43
|
+
//# sourceMappingURL=sheetMotion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sheetMotion.js","sources":["../../../../src/components/overlay/sheetMotion.native.ts"],"sourcesContent":["import {Easing, runOnJS, withSpring, withTiming} from \"react-native-reanimated\";\n\n/**\n * The bottom sheet's entering and exiting motion, for every overlay in this\n * library that presents one. ⛔ ONE DEFINITION, TWO CALLERS — `Dialog` and\n * `ConfirmDialog` both draw a sheet inside their own RN `Modal`, both hit the\n * same fault, and two copies of an animation drift the moment one is tuned.\n *\n**\n * ⛔ THE SHEET'S SLIDE IS WRITTEN BY HAND, BECAUSE `SlideInDown` DOES NOT MOVE\n * THIS PANEL AT ALL — measured on an iPhone 16 Pro simulator, 30 September 2026.\n *\n * ⚠️ THE MEASUREMENT, because three earlier rounds of this hunt cited\n * instruments that exist in no repository. One view, one tree, one Modal, one\n * method — a tap followed by a screenshot — and only the animation changed:\n *\n * FadeIn.duration(10000) the panel is caught HALF TRANSPARENT\n * SlideInDown.duration(10000) the panel is at rest and fully opaque\n * translateY 700 -> 0, 10000ms the panel is caught PARTWAY UP THE SCREEN\n *\n * So the view can be faded, and it can be translated. What fails is\n * `SlideInDown`'s own arithmetic for HOW FAR to travel. It derives that from\n * the window — and inside a React Native `Modal`, which hosts its own native\n * view hierarchy, the window it measures is not the screen. The distance comes\n * out as nothing, so the panel is placed at its resting position on frame one.\n *\n * ⚠️ THE DURATIONS ABOVE ARE THE INSTRUMENT, NOT THE PRODUCT. 10000ms was used\n * because the only method available — tap, then screenshot — has a round trip\n * longer than three seconds, which silently invalidated an earlier round of\n * 3000ms probes: every one of them showed a finished animation and read as\n * \"nothing ran\". No shipped duration was touched to make anything look better\n * (§12.5); the numbers below are still `overlayAnimations`'.\n *\n * ⛔ AND THIS IS WHY THE SCRIM-AND-PANEL SIBLING FIX CHANGED NOTHING VISIBLE.\n * That fix was real: the panel had been inheriting the scrim's fade. But the\n * panel's own slide had never run, so removing the inherited fade left a panel\n * that simply appears. The fix made the sheet strictly LESS animated, and the\n * report that \"it is the same\" was correct.\n *\n * WHAT THESE USE INSTEAD. `targetHeight` and `currentHeight` are the PANEL's\n * own box, laid out inside the Modal's own hierarchy, so they are the one\n * distance that is right in this coordinate space. A sheet travels its own\n * height; it never needed the window.\n */\nexport const sheetEnter = (spring: {damping: number; stiffness: number; mass?: number}) =>\n (values: any) => {\n 'worklet';\n return {\n initialValues: {transform: [{translateY: values.targetHeight}]},\n animations: {\n transform: [{\n translateY: withSpring(0, {\n damping: spring.damping,\n stiffness: spring.stiffness,\n mass: spring.mass ?? 1,\n /* The spec keeps the entrance a spring, so no duration\n is introduced here — only the distance changed. */\n }),\n }],\n },\n };\n };\n\nexport const sheetExit = (duration: number, onFinished: () => void) =>\n (values: any) => {\n 'worklet';\n return {\n initialValues: {transform: [{translateY: 0}]},\n animations: {\n transform: [{\n translateY: withTiming(values.currentHeight, {\n duration,\n easing: Easing.in(Easing.ease),\n }),\n }],\n },\n /* ⛔ THE MODAL UNMOUNTS ON THIS. A custom exiting reports through\n `callback`, where a built-in used `.withCallback`. Losing it\n would leave the RN Modal mounted over the app for ever. */\n callback: (finished: boolean) => {\n 'worklet';\n if (finished) runOnJS(onFinished)();\n },\n };\n };\n\n\n"],"names":[],"mappings":";;AA4CO,MAAM,UAAA,GAAa,CAAC,MAAA,KACvB,CAAC,MAAA,KAAgB;AACb,EAAA,SAAA;AACA,EAAA,OAAO;AAAA,IACH,aAAA,EAAe,EAAC,SAAA,EAAW,CAAC,EAAC,UAAA,EAAY,MAAA,CAAO,YAAA,EAAa,CAAA,EAAC;AAAA,IAC9D,UAAA,EAAY;AAAA,MACR,WAAW,CAAC;AAAA,QACR,UAAA,EAAY,WAAW,CAAA,EAAG;AAAA,UACtB,SAAS,MAAA,CAAO,OAAA;AAAA,UAChB,WAAW,MAAA,CAAO,SAAA;AAAA,UAClB,IAAA,EAAM,OAAO,IAAA,IAAQ;AAAA;AAAA;AAAA,SAGxB;AAAA,OACJ;AAAA;AACL,GACJ;AACJ;AAEG,MAAM,SAAA,GAAY,CAAC,QAAA,EAAkB,UAAA,KACxC,CAAC,MAAA,KAAgB;AACb,EAAA,SAAA;AACA,EAAA,OAAO;AAAA,IACH,aAAA,EAAe,EAAC,SAAA,EAAW,CAAC,EAAC,UAAA,EAAY,CAAA,EAAE,CAAA,EAAC;AAAA,IAC5C,UAAA,EAAY;AAAA,MACR,WAAW,CAAC;AAAA,QACR,UAAA,EAAY,UAAA,CAAW,MAAA,CAAO,aAAA,EAAe;AAAA,UACzC,QAAA;AAAA,UACA,MAAA,EAAQ,MAAA,CAAO,EAAA,CAAG,MAAA,CAAO,IAAI;AAAA,SAChC;AAAA,OACJ;AAAA,KACL;AAAA;AAAA;AAAA;AAAA,IAIA,QAAA,EAAU,CAAC,QAAA,KAAsB;AAC7B,MAAA,SAAA;AACA,MAAA,IAAI,QAAA,EAAU,OAAA,CAAQ,UAAU,CAAA,EAAE;AAAA,IACtC;AAAA,GACJ;AACJ;;;;"}
|