@marktiderman/genesis-ui-native 2.1.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +134 -0
- package/dist/chunk-7PCWEY6R.js +27 -0
- package/dist/chunk-7PCWEY6R.js.map +1 -0
- package/dist/chunk-D5RKSPMH.js +24 -0
- package/dist/chunk-D5RKSPMH.js.map +1 -0
- package/dist/{chunk-5HRGIA6F.js → chunk-EFXCJ5AN.js} +76 -3
- package/dist/chunk-EFXCJ5AN.js.map +1 -0
- package/dist/{chunk-ULS7I6ZS.js → chunk-ERHGCWTY.js} +81 -12
- package/dist/chunk-ERHGCWTY.js.map +1 -0
- package/dist/{chunk-3LK5ZJ4M.js → chunk-FIITITXO.js} +67 -108
- package/dist/chunk-FIITITXO.js.map +1 -0
- package/dist/chunk-FZY2IXOX.js +1559 -0
- package/dist/chunk-FZY2IXOX.js.map +1 -0
- package/dist/{chunk-TXJT55JC.js → chunk-W7BK3ARU.js} +715 -293
- package/dist/chunk-W7BK3ARU.js.map +1 -0
- package/dist/components/index.d.ts +143 -17
- package/dist/components/index.js +6 -4
- package/dist/data/index.d.ts +7 -1
- package/dist/data/index.js +31 -6
- package/dist/data/index.js.map +1 -1
- package/dist/hooks/index.js +2 -1
- package/dist/icons/lucide.d.ts +7 -0
- package/dist/icons/lucide.js +47 -0
- package/dist/icons/lucide.js.map +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +7 -6
- package/dist/layouts/index.d.ts +399 -7
- package/dist/layouts/index.js +3 -3
- package/dist/native-modules-BSVaEb3D.d.ts +206 -0
- package/package.json +34 -5
- package/src/__tests__/fake-modules.tsx +134 -0
- package/src/__tests__/native-modules-lists.test.tsx +70 -0
- package/src/__tests__/native-modules.test.tsx +631 -0
- package/src/components/__tests__/sheet.test.tsx +193 -0
- package/src/components/__tests__/toast.test.tsx +15 -0
- package/src/components/avatar.tsx +69 -16
- package/src/components/date-time-picker.tsx +128 -10
- package/src/components/drawer.tsx +158 -68
- package/src/components/dropdown-menu.tsx +7 -6
- package/src/components/glass-surface.tsx +150 -0
- package/src/components/icon.tsx +66 -0
- package/src/components/image.tsx +89 -0
- package/src/components/index.ts +33 -2
- package/src/components/list-item.tsx +29 -9
- package/src/components/popover.tsx +12 -9
- package/src/components/segmented-control.tsx +7 -1
- package/src/components/sheet.tsx +276 -133
- package/src/components/skeleton.tsx +75 -53
- package/src/components/textarea.tsx +1 -0
- package/src/components/toast.tsx +185 -87
- package/src/data/NativeResourcePage.tsx +48 -3
- package/src/data/__tests__/resource-page-offline.test.tsx +47 -0
- package/src/hooks/use-reduced-motion.ts +24 -10
- package/src/icon-names.ts +49 -0
- package/src/icons/lucide.ts +88 -0
- package/src/layouts/__tests__/apple-sign-in.test.tsx +97 -0
- package/src/layouts/__tests__/google-sign-in.test.tsx +26 -0
- package/src/layouts/__tests__/inbox-page.test.tsx +155 -0
- package/src/layouts/__tests__/keyboard-scroll.test.tsx +42 -1
- package/src/layouts/__tests__/settings-page-native-look.test.tsx +142 -0
- package/src/layouts/__tests__/thread-page.test.tsx +128 -0
- package/src/layouts/apple-sign-in.tsx +136 -0
- package/src/layouts/auth-screen.tsx +17 -8
- package/src/layouts/auth.tsx +29 -19
- package/src/layouts/google-sign-in.tsx +42 -0
- package/src/layouts/inbox-page.tsx +408 -0
- package/src/layouts/index.ts +45 -2
- package/src/layouts/keyboard.tsx +61 -9
- package/src/layouts/notifications-page.tsx +133 -16
- package/src/layouts/screen-container.tsx +6 -2
- package/src/layouts/settings-page.tsx +117 -14
- package/src/layouts/settings-sub-page.tsx +9 -3
- package/src/layouts/thread-page.tsx +444 -0
- package/src/native-modules.tsx +186 -0
- package/dist/chunk-3LK5ZJ4M.js.map +0 -1
- package/dist/chunk-5HRGIA6F.js.map +0 -1
- package/dist/chunk-F2TGDKOO.js +0 -43
- package/dist/chunk-F2TGDKOO.js.map +0 -1
- package/dist/chunk-TXJT55JC.js.map +0 -1
- package/dist/chunk-U2SPACTV.js +0 -876
- package/dist/chunk-U2SPACTV.js.map +0 -1
- package/dist/chunk-ULS7I6ZS.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/layouts/screen-container.tsx","../src/layouts/nav-bar.tsx","../src/layouts/settings-page.tsx","../src/layouts/keyboard.tsx","../src/layouts/settings-sub-page.tsx","../src/layouts/notifications-page.tsx","../src/layouts/auth.tsx","../src/layouts/auth-screen.tsx"],"names":["jsx","jsxs","View","Fragment","Platform","Pressable","Text","SafeAreaView","renderSlot","DefaultSectionHeader","DefaultRow","useCallback","KeyboardAvoidingView"],"mappings":";;;;;;;;;;;AA2GO,SAAS,qBACd,KAAA,EACyB;AACzB,EAAA,MAAM;AAAA,IACJ,WAAA;AAAA,IACA,UAAA;AAAA,IACA,WAAA;AAAA,IACA,KAAA;AAAA,IACA,kBAAA;AAAA,IACA;AAAA,GACF,GAAI,KAAA;AAEJ,EAAA,MAAM,OAAgC,EAAC;AACvC,EAAA,IAAI,WAAA,KAAgB,MAAA,EAAW,IAAA,CAAK,KAAA,GAAQ,WAAA;AAC5C,EAAA,IAAI,UAAA,OAAiB,UAAA,GAAa,UAAA;AAClC,EAAA,IAAI,WAAA,OAAkB,WAAA,GAAc,WAAA;AACpC,EAAA,IAAI,KAAA,EAAO;AAET,IAAA,IAAA,CAAK,gBAAA,GAAmB,IAAA;AACxB,IAAA,IAAI,uBAAuB,aAAA,EAAe;AACxC,MAAA,IAAA,CAAK,iBAAA,GAAoB,IAAA;AAAA,IAC3B,CAAA,MAAA,IAAW,uBAAuB,QAAA,EAAU;AAC1C,MAAA,IAAA,CAAK,6BAAA,GAAgC,IAAA;AAAA,IACvC;AAAA,EACF;AAEA,EAAA,IAAI,aAAA,EAAe;AACjB,IAAA,MAAA,CAAO,MAAA,CAAO,MAAM,aAAa,CAAA;AAAA,EACnC;AACA,EAAA,OAAO,IAAA;AACT;AAEA,IAAM,aAAA,GAAgC,CAAC,MAAA,EAA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/C,EAAA,IAAI,aAAA,CAAc,GAAA,CAAI,GAAG,CAAA,EAAG;AAC5B,EAAA,aAAA,CAAc,IAAI,GAAG,CAAA;AACrB,EAAA,OAAA,CAAQ,IAAA;AAAA,IACN,CAAA,4BAAA,EAA+B,SAAA,CAAU,GAAA,CAAI,CAAC,CAAA,KAAM,EAAE,KAAK,CAAA,CAAE,IAAA,CAAK,IAAI,CAAC,CAAA,+GAAA;AAAA,GACzE;AACF;AAEA,SAAS,aAAA,CAAc,EAAE,SAAA,EAAW,MAAA,EAAO,EAAgC;AACzE,EAAA,uBAAOJ,GAAAA,CAAC,aAAA,EAAA,EAAc,SAAA,EAAsB,MAAA,EAAgB,CAAA;AAC9D;AAEA,SAAS,aAAA,CAAc,EAAE,QAAA,EAAU,MAAA,EAAO,EAAgC;AACxE,EAAA,uBACEA,GAAAA,CAACE,IAAAA,EAAA,EAAK,MAAA,EAAgB,SAAA,EAAU,gBAC7B,QAAA,EACH,CAAA;AAEJ","file":"chunk-U2SPACTV.js","sourcesContent":["/**\n * ScreenContainer — Layer-2 page primitive.\n *\n * Wires the chrome every layout needs without imposing layout structure:\n * - Safe-area edges (configurable via `safeAreaEdges`)\n * - StatusBar style (light / dark / auto)\n * - Scroll vs static body\n * - Tokens-aware background (`bg-background`)\n *\n * Header customization is delegated: pass `headerLeft`, `headerRight`,\n * `large`, `scrollEdgeBehavior`, `safeAreaEdges`, plus any direct\n * `headerOptions` passthrough to `<Stack.Screen options={...} />`. We\n * **do not** render the navigation header ourselves — Expo Router /\n * React Navigation render the platform-native header. Consumer either:\n *\n * (a) Wraps the screen in `<ScreenContainer>` and ALSO declares\n * `<Stack.Screen options={headerOptionsFromProps(props)} />` at the\n * top of the screen (we export a helper `composeHeaderOptions` for\n * this), OR\n * (b) Imports `<NavBarTitle>` / `<NavBarSearchBar>` / `<NavBarSaveButton>`\n * sub-primitives and threads them through `headerLeft` / `headerRight`\n * options manually.\n *\n * The Layer-3/4 layouts (SettingsPage, etc.) compose ScreenContainer + a\n * helper that wires Stack.Screen so consumers get the 3-line ergonomics.\n *\n * @stability Beta\n */\nimport type { ReactNode } from \"react\";\nimport { ScrollView, StatusBar, View, type ViewStyle } from \"react-native\";\nimport { SafeAreaView } from \"react-native-safe-area-context\";\nimport { cn } from \"../utils\";\nimport { useThemeMode } from \"../hooks/use-theme-mode\";\n\nexport type SafeAreaEdge = \"top\" | \"bottom\" | \"left\" | \"right\";\n\nexport type ScrollEdgeBehavior = \"match\" | \"transparent\" | \"opaque\";\n\nexport interface ScreenContainerProps {\n /** Screen body. Pass any node tree. */\n children: ReactNode;\n /** When `true`, the body is wrapped in a vertical ScrollView. Default `false`. */\n scroll?: boolean;\n /**\n * SafeAreaView edges. Defaults to `[\"left\", \"right\"]` — top/bottom are\n * normally handled by the navigation header / tab bar.\n */\n safeAreaEdges?: SafeAreaEdge[];\n /**\n * StatusBar appearance. `\"auto\"` follows the resolved theme mode.\n */\n statusBar?: \"light\" | \"dark\" | \"auto\" | \"hidden\";\n /**\n * Force light or dark theme on this screen regardless of OS preference.\n * Default `\"system\"` (follow OS).\n */\n themeMode?: \"light\" | \"dark\" | \"system\";\n /** Override root container className. */\n className?: string;\n /** Override inner content container className (the ScrollView's contentContainerClassName when scroll=true). */\n contentClassName?: string;\n /**\n * `keyboardShouldPersistTaps` for the inner ScrollView. Default `\"handled\"`.\n * Only used when `scroll` is true.\n */\n keyboardShouldPersistTaps?: \"always\" | \"never\" | \"handled\";\n /** Style on the root, e.g. a theme-role background color. */\n style?: ViewStyle;\n /** testID on the root container. */\n testID?: string;\n}\n\n/**\n * Layer-3 named-prop slots that layouts can accept and forward to\n * `composeHeaderOptions()` for `<Stack.Screen options={...}>`.\n */\nexport interface ScreenHeaderProps {\n /** Custom header title. Falls back to `<Stack.Screen name>` mapping. */\n headerTitle?: string;\n /** Custom node rendered on the left of the nav bar. */\n headerLeft?: () => ReactNode;\n /** Custom node rendered on the right of the nav bar. */\n headerRight?: () => ReactNode;\n /** When true, iOS uses large-title mode + scroll-edge appearance. */\n large?: boolean;\n /** iOS scroll-edge behavior. `\"match\"` collapses, `\"transparent\"` always transparent, `\"opaque\"` always opaque. */\n scrollEdgeBehavior?: ScrollEdgeBehavior;\n /** Direct passthrough merged INTO the resolved options object. Wins over named props. */\n headerOptions?: Record<string, unknown>;\n}\n\n/**\n * Compose a `<Stack.Screen options={...}>` object from Layer-3 named\n * props + a direct `headerOptions` passthrough. Layouts call this and\n * pass the result to `<Stack.Screen>` so the host's expo-router stack\n * renders a platform-native large title / scroll-edge appearance.\n *\n * Usage (in a layout primitive):\n *\n * const opts = composeHeaderOptions({\n * headerTitle: \"Settings\",\n * large: true,\n * scrollEdgeBehavior: \"match\",\n * headerOptions: rest.headerOptions,\n * });\n * return <><Stack.Screen options={opts} /><ScreenContainer>...</ScreenContainer></>;\n */\nexport function composeHeaderOptions(\n props: ScreenHeaderProps,\n): Record<string, unknown> {\n const {\n headerTitle,\n headerLeft,\n headerRight,\n large,\n scrollEdgeBehavior,\n headerOptions,\n } = props;\n\n const opts: Record<string, unknown> = {};\n if (headerTitle !== undefined) opts.title = headerTitle;\n if (headerLeft) opts.headerLeft = headerLeft;\n if (headerRight) opts.headerRight = headerRight;\n if (large) {\n // iOS large-title mode. Android falls back to standard.\n opts.headerLargeTitle = true;\n if (scrollEdgeBehavior === \"transparent\") {\n opts.headerTransparent = true;\n } else if (scrollEdgeBehavior === \"opaque\") {\n opts.headerLargeTitleShadowVisible = true;\n }\n }\n // Direct passthrough wins.\n if (headerOptions) {\n Object.assign(opts, headerOptions);\n }\n return opts;\n}\n\nconst DEFAULT_EDGES: SafeAreaEdge[] = [\"left\", \"right\"];\n\n/**\n * Resolve the StatusBar bar style from the user's `statusBar` setting +\n * the resolved theme mode. `\"auto\"` follows theme; explicit overrides\n * win; anything else falls back to `\"default\"`.\n */\nfunction resolveBarStyle(\n statusBar: \"light\" | \"dark\" | \"auto\" | \"hidden\",\n resolvedMode: \"light\" | \"dark\",\n): \"default\" | \"light-content\" | \"dark-content\" {\n if (statusBar === \"auto\") {\n return resolvedMode === \"dark\" ? \"light-content\" : \"dark-content\";\n }\n if (statusBar === \"light\") return \"light-content\";\n if (statusBar === \"dark\") return \"dark-content\";\n return \"default\";\n}\n\nexport function ScreenContainer({\n children,\n scroll = false,\n safeAreaEdges = DEFAULT_EDGES,\n statusBar = \"auto\",\n themeMode = \"system\",\n className,\n contentClassName,\n keyboardShouldPersistTaps = \"handled\",\n style,\n testID,\n}: ScreenContainerProps) {\n const osMode = useThemeMode();\n const resolvedMode = themeMode === \"system\" ? osMode : themeMode;\n const barStyle = resolveBarStyle(statusBar, resolvedMode);\n\n const body = scroll ? (\n <ScrollView\n testID={testID ? `${testID}-scroll` : undefined}\n keyboardShouldPersistTaps={keyboardShouldPersistTaps}\n contentInsetAdjustmentBehavior=\"automatic\"\n contentContainerClassName={cn(\"flex-grow\", contentClassName)}\n >\n {children}\n </ScrollView>\n ) : (\n <View\n testID={testID ? `${testID}-body` : undefined}\n className={cn(\"flex-1\", contentClassName)}\n >\n {children}\n </View>\n );\n\n return (\n <SafeAreaView\n testID={testID ?? \"screen-container\"}\n edges={safeAreaEdges}\n className={cn(\"flex-1 bg-background\", className)}\n style={style}\n >\n {statusBar !== \"hidden\" ? (\n <StatusBar\n barStyle={\n barStyle as\n | \"default\"\n | \"light-content\"\n | \"dark-content\"\n }\n translucent\n backgroundColor=\"transparent\"\n />\n ) : (\n <StatusBar hidden />\n )}\n {body}\n </SafeAreaView>\n );\n}\n","/**\n * Nav-bar sub-primitives — escape hatches for `<Stack.Screen>` `headerLeft`,\n * `headerRight`, and custom title view.\n *\n * Use these when the named-prop slots on a layout aren't enough — e.g.,\n * a screen needs a save button on the right that's wired to dirty-state,\n * or a search bar replaces the title on a results screen.\n *\n * Pass directly into `headerLeft={() => <NavBarSearchBar ... />}` or\n * compose into a custom `headerTitle={() => <NavBarTitle ... />}` slot.\n *\n * @stability Beta\n */\nimport { Pressable, Text, TextInput, View } from \"react-native\";\nimport { nativeColors } from \"@marktiderman/genesis-design-system/tokens/native\";\nimport { cn } from \"../utils\";\n\n// ---------------------------------------------------------------------------\n// NavBarSaveButton\n// ---------------------------------------------------------------------------\n\nexport interface NavBarSaveButtonProps {\n /** Press handler. Disabled when not provided OR when `disabled`/`loading`. */\n onPress?: () => void;\n /** Visible label. Default `\"Save\"`. */\n label?: string;\n /** When true, the button is muted and not pressable. Use this for clean / pristine forms. */\n disabled?: boolean;\n /** When true, label switches to a busy indicator and presses are blocked. */\n loading?: boolean;\n /** When true, render label in destructive tone. */\n destructive?: boolean;\n className?: string;\n testID?: string;\n}\n\nexport function NavBarSaveButton({\n onPress,\n label = \"Save\",\n disabled,\n loading,\n destructive,\n className,\n testID,\n}: NavBarSaveButtonProps) {\n const isDisabled = !!disabled || !!loading || !onPress;\n return (\n <Pressable\n testID={testID ?? \"nav-bar-save-button\"}\n accessibilityRole=\"button\"\n accessibilityLabel={label}\n accessibilityState={{ disabled: isDisabled, busy: !!loading }}\n onPress={isDisabled ? undefined : onPress}\n disabled={isDisabled}\n className={cn(\"min-h-[44px] justify-center px-3\", className)}\n hitSlop={8}\n >\n <Text\n className={cn(\n \"text-base font-semibold\",\n destructive ? \"text-destructive\" : \"text-primary\",\n isDisabled && \"opacity-40\"\n )}\n >\n {loading ? \"…\" : label}\n </Text>\n </Pressable>\n );\n}\n\n// ---------------------------------------------------------------------------\n// NavBarTitle\n// ---------------------------------------------------------------------------\n\nexport interface NavBarTitleProps {\n /** Title text. */\n title: string;\n /** Optional smaller subtitle line under the title. */\n subtitle?: string;\n /** Optional press handler — turns the title row into a tap target (e.g., reveal a picker). */\n onPress?: () => void;\n className?: string;\n testID?: string;\n}\n\nexport function NavBarTitle({\n title,\n subtitle,\n onPress,\n className,\n testID,\n}: NavBarTitleProps) {\n const inner = (\n <View className={cn(\"items-center justify-center\", className)}>\n <Text\n testID={testID ? `${testID}-title` : undefined}\n className=\"text-base font-semibold text-foreground\"\n numberOfLines={1}\n >\n {title}\n </Text>\n {subtitle ? (\n <Text\n testID={testID ? `${testID}-subtitle` : undefined}\n className=\"text-xs text-muted-foreground\"\n numberOfLines={1}\n >\n {subtitle}\n </Text>\n ) : null}\n </View>\n );\n\n if (onPress) {\n return (\n <Pressable\n testID={testID ?? \"nav-bar-title\"}\n accessibilityRole=\"button\"\n accessibilityLabel={subtitle ? `${title}, ${subtitle}` : title}\n onPress={onPress}\n hitSlop={8}\n >\n {inner}\n </Pressable>\n );\n }\n\n return (\n <View testID={testID ?? \"nav-bar-title\"} accessibilityRole=\"header\">\n {inner}\n </View>\n );\n}\n\n// ---------------------------------------------------------------------------\n// NavBarSearchBar\n// ---------------------------------------------------------------------------\n\nexport interface NavBarSearchBarProps {\n value: string;\n onChangeText: (next: string) => void;\n placeholder?: string;\n /** Called when the user submits the search (return key). */\n onSubmit?: () => void;\n /** Render a clear (X) button when value is non-empty. Default true. */\n clearable?: boolean;\n className?: string;\n testID?: string;\n}\n\n/**\n * Inline search input meant to occupy the title slot on a search results\n * screen. For a sticky search-below-the-header pattern, prefer the\n * standalone <NativeSearchBar> primitive.\n */\nexport function NavBarSearchBar({\n value,\n onChangeText,\n placeholder = \"Search\",\n onSubmit,\n clearable = true,\n className,\n testID,\n}: NavBarSearchBarProps) {\n return (\n <View\n testID={testID ?? \"nav-bar-search\"}\n className={cn(\n \"min-h-[36px] flex-row items-center rounded-full bg-muted px-3\",\n className\n )}\n >\n <TextInput\n testID={testID ? `${testID}-input` : undefined}\n accessibilityLabel={placeholder}\n value={value}\n onChangeText={onChangeText}\n onSubmitEditing={onSubmit}\n placeholder={placeholder}\n placeholderTextColor={nativeColors.neutral[400]}\n returnKeyType=\"search\"\n autoCorrect={false}\n autoCapitalize=\"none\"\n clearButtonMode={clearable ? \"while-editing\" : \"never\"}\n className=\"flex-1 text-base text-foreground\"\n />\n {clearable && value.length > 0 ? (\n <Pressable\n testID={testID ? `${testID}-clear` : undefined}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Clear search\"\n onPress={() => onChangeText(\"\")}\n hitSlop={8}\n className=\"ml-2 px-1\"\n >\n <Text className=\"text-base text-muted-foreground\">×</Text>\n </Pressable>\n ) : null}\n </View>\n );\n}\n","/**\n * SettingsPage — top-level settings layout.\n *\n * Composes `<ScreenContainer scroll>` underneath, renders a sectioned\n * `ListItem` list, and surfaces an optional dangerous-action footer\n * (e.g., \"Sign out\", \"Delete account\") in destructive tone.\n *\n * Why ship a layout: every consumer rebuilds this list with the same\n * three pieces (sections → rows → footer). Genesis ships the assembly so\n * consumers compose, not rebuild.\n *\n * Layer-3 customization: pass `headerTitle`, `headerLeft`, `headerRight`,\n * `large`, `scrollEdgeBehavior`, OR a direct `headerOptions={...}`\n * passthrough. The composed options are rendered via the consumer's own\n * `<Stack.Screen options={...}>` — see `getStackScreenOptions()` helper.\n *\n * Colors come from theme roles: on iOS the page is `systemGroupedBackground`\n * with inset, rounded cells on `secondarySystemGroupedBackground`, like the\n * Settings app; elsewhere, full-width cells on the Genesis tokens.\n *\n * Slots: replace or drop one part without leaving the layout. `slots`\n * swaps a part (`sectionHeader`, `row`, `footnote`, `dangerousActions`) for\n * your component, which receives exactly the props the default would;\n * `slotProps` feeds the default more props; `null` drops the part.\n *\n * Escape hatch: drop down to `<ScreenContainer>` if the layout structure\n * doesn't fit.\n *\n * @stability Beta\n */\nimport { Fragment, type ReactNode } from \"react\";\nimport { renderSlot, type SlotPropsFor, type Slots } from \"@marktiderman/genesis-core/slots\";\nimport { Platform, View } from \"react-native\";\nimport { useThemeRoles } from \"../hooks/use-theme-roles\";\nimport { NativeListItem, NativeListItemDivider } from \"../components/list-item\";\nimport { NativeSectionListHeader } from \"../components/section-list\";\nimport { NativeText } from \"../components/text\";\nimport { NativeButton } from \"../components/button\";\nimport { cn } from \"../utils\";\nimport {\n ScreenContainer,\n composeHeaderOptions,\n type ScreenHeaderProps,\n} from \"./screen-container\";\n\nexport interface SettingsPageRow {\n /** Stable id for keying. */\n id: string;\n title: string;\n subtitle?: string;\n /** Leading slot (icon, avatar, etc.). */\n leading?: ReactNode;\n /** Trailing slot (badge, switch, version string, etc.). */\n trailing?: ReactNode;\n /** When true, renders a chevron at the row end (drill-in affordance). */\n showChevron?: boolean;\n /** Press handler — required for chevron rows. */\n onPress?: () => void;\n /** Disable the row (greyed + non-pressable). */\n disabled?: boolean;\n /** testID override for the row. Falls back to `settings-row-<id>`. */\n testID?: string;\n}\n\nexport interface SettingsPageSection {\n /** Stable id for keying. */\n id: string;\n /** Optional uppercase section header. Pass `null` to skip the header for an unlabeled section. */\n title?: string;\n /** Optional caption rendered under the rows (compliance text, hint, etc.). */\n footnote?: string;\n /** Rows in render order. */\n rows: SettingsPageRow[];\n}\n\n/** A destructive-tone action in the footer, e.g. \"Sign out\". */\nexport interface SettingsPageDangerousAction {\n label: string;\n onPress: () => void;\n /** When true, renders with extra emphasis. Default `false`. */\n emphasized?: boolean;\n testID?: string;\n}\n\n/** The parts of a {@link SettingsPage} that `slots` and `slotProps` reach, with the props each receives. */\nexport type SettingsPageSlotMap = {\n sectionHeader: { title: string; testID: string };\n row: SettingsPageRow & { testID: string; isLast: boolean };\n footnote: { text: string };\n dangerousActions: { actions: SettingsPageDangerousAction[]; testID: string };\n};\n\nexport interface SettingsPageProps extends ScreenHeaderProps {\n /** Sectioned content. Order is preserved. */\n sections: SettingsPageSection[];\n /**\n * Optional dangerous-action row(s) shown after the last section in a\n * destructive-tone footer. Typical: \"Sign out\", \"Delete account\".\n */\n dangerousActions?: SettingsPageDangerousAction[];\n /** Replace (a component) or drop (`null`) one part. */\n slots?: Slots<SettingsPageSlotMap>;\n /** More props for a default part, merged over what the layout passes. */\n slotProps?: SlotPropsFor<SettingsPageSlotMap>;\n /** Override root container styling. */\n className?: string;\n /** testID on the root container. Default `\"settings-page\"`. */\n testID?: string;\n /** Pass-through children rendered ABOVE the first section (e.g., a profile card). */\n children?: ReactNode;\n}\n\n/**\n * Convenience helper for callers that want to wire `<Stack.Screen options={...}>`\n * without re-importing composeHeaderOptions. Defaults `large: true` and\n * `scrollEdgeBehavior: \"match\"` to match the Apple HIG large-title settings\n * pattern out of the box.\n */\nexport function getSettingsPageStackOptions(\n props: ScreenHeaderProps & { headerTitle?: string },\n): Record<string, unknown> {\n return composeHeaderOptions({\n headerTitle: props.headerTitle ?? \"Settings\",\n large: props.large ?? true,\n scrollEdgeBehavior: props.scrollEdgeBehavior ?? \"match\",\n headerLeft: props.headerLeft,\n headerRight: props.headerRight,\n headerOptions: props.headerOptions,\n });\n}\n\nexport function SettingsPage({\n sections,\n dangerousActions,\n className,\n testID = \"settings-page\",\n children,\n slots = {},\n slotProps = {},\n}: SettingsPageProps) {\n // Note: header props (headerTitle, headerLeft, headerRight, etc.) are\n // accepted on the type for API ergonomics but consumed by\n // getSettingsPageStackOptions() at the consumer's <Stack.Screen> level.\n const colors = useThemeRoles();\n const inset = Platform.OS === \"ios\";\n\n return (\n <ScreenContainer\n scroll\n safeAreaEdges={[\"left\", \"right\", \"bottom\"]}\n testID={testID}\n contentClassName=\"pb-8\"\n className={className}\n style={{ backgroundColor: colors.groupedBackground }}\n >\n {children ? <View className=\"px-4 pt-2\">{children}</View> : null}\n\n {sections.map((section) => (\n <View\n key={section.id}\n testID={`${testID}-section-${section.id}`}\n className=\"mt-6\"\n >\n {section.title\n ? renderSlot(\n DefaultSectionHeader,\n slots.sectionHeader,\n { title: section.title, testID: `${testID}-section-${section.id}-header` },\n slotProps.sectionHeader,\n )\n : null}\n <View\n className={inset ? \"mx-4 overflow-hidden rounded-xl\" : \"border-y\"}\n style={{ backgroundColor: colors.surface, borderColor: colors.separator }}\n >\n {section.rows.map((row, rowIndex) => (\n <Fragment key={row.id}>\n {renderSlot(\n DefaultRow,\n slots.row,\n { ...row, testID: row.testID ?? `${testID}-row-${row.id}`, isLast: rowIndex === section.rows.length - 1 },\n slotProps.row,\n )}\n </Fragment>\n ))}\n </View>\n {section.footnote\n ? renderSlot(DefaultFootnote, slots.footnote, { text: section.footnote }, slotProps.footnote)\n : null}\n </View>\n ))}\n\n {dangerousActions && dangerousActions.length > 0\n ? renderSlot(\n DefaultDangerousActions,\n slots.dangerousActions,\n {\n actions: dangerousActions.map((action) => ({ ...action, testID: action.testID ?? `${testID}-danger-${slug(action.label)}` })),\n testID: `${testID}-dangerous-actions`,\n },\n slotProps.dangerousActions,\n )\n : null}\n </ScreenContainer>\n );\n}\n\nfunction DefaultSectionHeader({ title, testID }: SettingsPageSlotMap[\"sectionHeader\"]) {\n return <NativeSectionListHeader title={title} testID={testID} />;\n}\n\nfunction DefaultRow({ isLast, id: _id, ...row }: SettingsPageSlotMap[\"row\"]) {\n return (\n <>\n <NativeListItem\n testID={row.testID}\n // The cell wrapper carries the surface color from theme roles.\n className=\"bg-transparent\"\n title={row.title}\n subtitle={row.subtitle}\n leading={row.leading}\n trailing={row.trailing}\n showChevron={row.showChevron}\n onPress={row.onPress}\n disabled={row.disabled}\n />\n {isLast ? null : <NativeListItemDivider className=\"ml-4\" />}\n </>\n );\n}\n\nfunction DefaultFootnote({ text }: SettingsPageSlotMap[\"footnote\"]) {\n return (\n <NativeText preset=\"body-sm\" className=\"px-4 pt-2 text-muted-foreground\">\n {text}\n </NativeText>\n );\n}\n\nfunction DefaultDangerousActions({ actions, testID }: SettingsPageSlotMap[\"dangerousActions\"]) {\n return (\n <View testID={testID} className={cn(\"mt-8 gap-2 px-4\")}>\n {actions.map((action) => (\n <NativeButton\n key={action.label}\n testID={action.testID}\n variant={action.emphasized ? \"destructive\" : \"outline\"}\n onPress={action.onPress}\n >\n {action.label}\n </NativeButton>\n ))}\n </View>\n );\n}\n\nfunction slug(s: string): string {\n return s\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, \"-\")\n .replace(/^-|-$/g, \"\");\n}\n","/**\n * Keyboard-aware scrolling for form screens. Expo recommends\n * react-native-keyboard-controller's `KeyboardAwareScrollView` over\n * `KeyboardAvoidingView` for real apps; it is an optional peer here, so an app\n * that has it passes it once:\n *\n * import { KeyboardAwareScrollView } from \"react-native-keyboard-controller\";\n * <KeyboardScrollProvider component={KeyboardAwareScrollView}>…</KeyboardScrollProvider>\n *\n * (The native app shell does this for you.) Without it, form screens fall back\n * to `KeyboardAvoidingView`.\n *\n * @stability Beta\n */\nimport { createContext, createElement, useContext, type ComponentType, type ReactNode } from \"react\";\nimport type { ViewStyle } from \"react-native\";\n\n/** The props Genesis passes to a keyboard-aware scroll view. */\nexport interface KeyboardScrollProps {\n children?: ReactNode;\n testID?: string;\n keyboardShouldPersistTaps?: \"always\" | \"never\" | \"handled\";\n contentContainerStyle?: ViewStyle;\n /** iOS: inset content under a translucent or large-title header, as `ScreenContainer` does. */\n contentInsetAdjustmentBehavior?: \"automatic\" | \"scrollableAxes\" | \"never\" | \"always\";\n /** Extra space between the focused input and the keyboard. */\n bottomOffset?: number;\n}\n\nconst KeyboardScrollContext = createContext<ComponentType<KeyboardScrollProps> | null>(null);\n\nexport function KeyboardScrollProvider({ component, children }: { component: ComponentType<KeyboardScrollProps>; children: ReactNode }) {\n return createElement(KeyboardScrollContext.Provider, { value: component }, children);\n}\n\n/** The app's keyboard-aware scroll view, or null when none was provided. */\nexport function useKeyboardScroll(): ComponentType<KeyboardScrollProps> | null {\n return useContext(KeyboardScrollContext);\n}\n","/**\n * SettingsSubPage — drill-in detail layout.\n *\n * Composes a KeyboardAvoidingView + scroll + dirty-form leave warning +\n * optimistic-save pattern. The save action is surfaced in the nav bar via\n * a `<NavBarSaveButton>` rendered through `headerRight`.\n *\n * Why ship: the recurring shape is \"form fields + nav-bar Save + leave\n * guard\"; consumers re-implement this every time. Genesis ships the\n * shape so consumers focus on the form fields themselves.\n *\n * Layer-3 customization: pass `headerTitle`, `headerLeft`, OR a direct\n * `headerOptions={...}`. Use `getSettingsSubPageStackOptions()` to get a\n * `<Stack.Screen options={...}>` object (with the save button wired via\n * `headerRight`).\n *\n * @stability Beta\n */\nimport { useCallback, type ReactNode } from \"react\";\nimport { Alert, KeyboardAvoidingView, Platform, View } from \"react-native\";\nimport { cn } from \"../utils\";\nimport { useKeyboardScroll } from \"./keyboard\";\nimport {\n ScreenContainer,\n composeHeaderOptions,\n type ScreenHeaderProps,\n} from \"./screen-container\";\nimport { NavBarSaveButton } from \"./nav-bar\";\n\nexport interface SettingsSubPageProps extends ScreenHeaderProps {\n /** Form / detail body content. Pass any node tree. */\n children: ReactNode;\n /**\n * When true, the Save button is enabled and the back-confirm guard\n * fires when the user tries to leave. Mark `true` whenever the form\n * has unsaved changes.\n */\n dirty?: boolean;\n /** When true, the Save button shows a busy indicator and is non-pressable. */\n saving?: boolean;\n /** Save handler. Required to render a Save button in the nav bar. */\n onSave?: () => void | Promise<void>;\n /**\n * Confirm-leave hook. Implementations should integrate with the\n * navigator's `beforeRemove` listener (React Navigation) — Genesis\n * provides a default `Alert` confirm helper via `confirmDiscardChanges()`.\n * Pass null to opt OUT of the leave guard.\n */\n onConfirmLeave?: ((proceed: () => void) => void) | null;\n /** Save button label. Default `\"Save\"`. */\n saveLabel?: string;\n /** Override root container styling. */\n className?: string;\n /** testID on the root container. Default `\"settings-sub-page\"`. */\n testID?: string;\n}\n\n/**\n * Default leave-guard helper. Pops a native Alert with Discard / Keep\n * Editing buttons; calls `proceed()` only if the user opts to discard.\n *\n * <SettingsSubPage onConfirmLeave={confirmDiscardChanges} ... />\n */\nexport function confirmDiscardChanges(proceed: () => void): void {\n Alert.alert(\n \"Discard changes?\",\n \"You have unsaved changes. Leave this screen and lose them?\",\n [\n { text: \"Keep editing\", style: \"cancel\" },\n {\n text: \"Discard\",\n style: \"destructive\",\n onPress: () => proceed(),\n },\n ],\n );\n}\n\n/**\n * Compose `<Stack.Screen options={...}>` for a SettingsSubPage. Wires\n * the nav-bar Save button via `headerRight` automatically when `onSave`\n * is passed.\n */\nexport function getSettingsSubPageStackOptions(props: {\n headerTitle?: string;\n dirty?: boolean;\n saving?: boolean;\n onSave?: () => void | Promise<void>;\n saveLabel?: string;\n large?: boolean;\n scrollEdgeBehavior?: ScreenHeaderProps[\"scrollEdgeBehavior\"];\n headerLeft?: ScreenHeaderProps[\"headerLeft\"];\n headerRight?: ScreenHeaderProps[\"headerRight\"];\n headerOptions?: ScreenHeaderProps[\"headerOptions\"];\n}): Record<string, unknown> {\n const {\n headerTitle,\n dirty,\n saving,\n onSave,\n saveLabel = \"Save\",\n large = false,\n scrollEdgeBehavior,\n headerLeft,\n headerRight,\n headerOptions,\n } = props;\n\n // Auto-wire headerRight with save button if not overridden.\n const resolvedHeaderRight =\n headerRight ??\n (onSave\n ? () => (\n <NavBarSaveButton\n label={saveLabel}\n onPress={() => {\n void onSave();\n }}\n disabled={!dirty}\n loading={saving}\n />\n )\n : undefined);\n\n return composeHeaderOptions({\n headerTitle,\n headerLeft,\n headerRight: resolvedHeaderRight,\n large,\n scrollEdgeBehavior,\n headerOptions,\n });\n}\n\nexport function SettingsSubPage({\n children,\n onConfirmLeave,\n className,\n testID = \"settings-sub-page\",\n}: SettingsSubPageProps) {\n // Note: dirty / saving / onSave / saveLabel / screen header props are\n // consumed by getSettingsSubPageStackOptions() at the consumer level —\n // SettingsSubPage itself is intentionally minimal so the same component\n // works for both pure form pages AND screens with Stack.Screen options\n // wired separately. We only render the body chrome here.\n //\n // The actual `beforeRemove` wire-up lives at the consumer's navigator\n // level — they call `useNavigation().addListener('beforeRemove', ...)`\n // and inside the callback they invoke `props.onConfirmLeave(proceed)`.\n // We expose `confirmDiscardChanges()` as the canonical helper so\n // consumers get the leave-guard semantics for free.\n const _onConfirmLeave = useCallback(\n (proceed: () => void) => {\n if (onConfirmLeave === null) {\n proceed();\n return;\n }\n const fn = onConfirmLeave ?? confirmDiscardChanges;\n fn(proceed);\n },\n [onConfirmLeave],\n );\n void _onConfirmLeave;\n\n const KeyboardScroll = useKeyboardScroll();\n if (KeyboardScroll) {\n return (\n <ScreenContainer safeAreaEdges={[\"left\", \"right\", \"bottom\"]} testID={testID}>\n <KeyboardScroll\n testID={`${testID}-keyboard`}\n keyboardShouldPersistTaps=\"handled\"\n contentInsetAdjustmentBehavior=\"automatic\"\n bottomOffset={24}\n >\n {/* Same padding and className as the fallback path, so `className` overrides it the same way. */}\n <View className={cn(\"p-4\", className)}>\n <View testID={`${testID}-form`} className=\"gap-4\">\n {children}\n </View>\n </View>\n </KeyboardScroll>\n </ScreenContainer>\n );\n }\n return (\n <KeyboardAvoidingView\n testID={`${testID}-kav`}\n style={{ flex: 1 }}\n behavior={Platform.OS === \"ios\" ? \"padding\" : undefined}\n >\n <ScreenContainer\n scroll\n safeAreaEdges={[\"left\", \"right\", \"bottom\"]}\n testID={testID}\n contentClassName={cn(\"p-4\", className)}\n keyboardShouldPersistTaps=\"handled\"\n >\n <View testID={`${testID}-form`} className=\"gap-4\">\n {children}\n </View>\n </ScreenContainer>\n </KeyboardAvoidingView>\n );\n}\n","/**\n * NotificationsPage — feed-style notifications list.\n *\n * Composes:\n * - SectionList grouped by relative date (Today / Yesterday / Earlier)\n * - Pull-to-refresh\n * - Empty state slot (auto-rendered when `items` is empty)\n * - Mark-all-read action surfaced via `headerRight` helper\n * - Per-row \"mark read\" action exposed via the consumer's row press\n * (swipe-to-mark-read is documented as Maestro / E2E only because it\n * requires gesture-handler — consumers wire it via their own row\n * wrapper; this layout exposes the unread state via row props).\n *\n * Slots: replace or drop (`null`) `sectionHeader`, `row` or `empty`\n * through `slots`; feed a default part through `slotProps`.\n *\n * Header customization: `headerTitle`, `headerLeft`, `headerRight`,\n * `headerOptions`. Use `getNotificationsPageStackOptions()` to wire a\n * \"Mark all read\" action via `headerRight` automatically.\n *\n * @stability Beta\n */\nimport { useMemo, type ReactNode } from \"react\";\nimport { renderSlot, type SlotPropsFor, type Slots } from \"@marktiderman/genesis-core/slots\";\nimport {\n Pressable,\n RefreshControl,\n SectionList,\n Text,\n View,\n} from \"react-native\";\nimport { SafeAreaView } from \"react-native-safe-area-context\";\nimport { NativeSectionListHeader } from \"../components/section-list\";\nimport { NativeListItem } from \"../components/list-item\";\nimport { NativeEmptyState } from \"../components/empty-state\";\nimport { cn } from \"../utils\";\nimport {\n composeHeaderOptions,\n type ScreenHeaderProps,\n} from \"./screen-container\";\n\nexport interface NotificationItem {\n /** Stable id. */\n id: string;\n /** Headline text. */\n title: string;\n /** Optional secondary line. */\n body?: string;\n /** ISO date string OR Date instance. Used for grouping. */\n timestamp: string | Date;\n /** Read flag. Unread rows render with emphasis (a leading dot). */\n unread?: boolean;\n /** Optional press handler — typically opens the related screen. */\n onPress?: () => void;\n /** Optional leading slot (avatar / icon). */\n leading?: ReactNode;\n /** testID override. Falls back to `notifications-row-<id>`. */\n testID?: string;\n}\n\n/** The parts of a {@link NotificationsPage} that `slots` and `slotProps` reach. */\nexport type NotificationsPageSlotMap = {\n sectionHeader: { title: string };\n row: NotificationItem & { testID: string };\n empty: { title: string; body: string; testID: string };\n};\n\nexport interface NotificationsPageProps extends ScreenHeaderProps {\n /** Notification items. Empty array → empty state. */\n items: NotificationItem[];\n /** When true, the SectionList shows the refresh spinner. */\n refreshing?: boolean;\n /** Pull-to-refresh handler. */\n onRefresh?: () => void | Promise<void>;\n /** Mark-all-read handler. When provided, exposes a header action. */\n onMarkAllRead?: () => void;\n /** Override the auto-rendered empty state. Prefer `slots.empty`. */\n emptyState?: ReactNode;\n /** Replace (a component) or drop (`null`) one part. */\n slots?: Slots<NotificationsPageSlotMap>;\n /** More props for a default part, merged over what the layout passes. */\n slotProps?: SlotPropsFor<NotificationsPageSlotMap>;\n /** Optional override of the empty-state title. */\n emptyTitle?: string;\n /** Optional override of the empty-state body copy. */\n emptyBody?: string;\n /** Override root container styling. */\n className?: string;\n /** testID on the root container. Default `\"notifications-page\"`. */\n testID?: string;\n}\n\n/**\n * Compose `<Stack.Screen options={...}>` for a NotificationsPage. Wires\n * a \"Mark all read\" action via `headerRight` when `onMarkAllRead` is\n * passed.\n */\nexport function getNotificationsPageStackOptions(props: {\n headerTitle?: string;\n onMarkAllRead?: () => void;\n large?: boolean;\n scrollEdgeBehavior?: ScreenHeaderProps[\"scrollEdgeBehavior\"];\n headerLeft?: ScreenHeaderProps[\"headerLeft\"];\n headerRight?: ScreenHeaderProps[\"headerRight\"];\n headerOptions?: ScreenHeaderProps[\"headerOptions\"];\n}): Record<string, unknown> {\n const {\n headerTitle,\n onMarkAllRead,\n large,\n scrollEdgeBehavior,\n headerLeft,\n headerRight,\n headerOptions,\n } = props;\n\n const resolvedHeaderRight =\n headerRight ??\n (onMarkAllRead\n ? () => (\n <Pressable\n testID=\"notifications-mark-all-read\"\n accessibilityRole=\"button\"\n accessibilityLabel=\"Mark all read\"\n onPress={onMarkAllRead}\n hitSlop={8}\n className=\"min-h-[44px] justify-center px-3\"\n >\n <Text className=\"text-base text-primary\">Mark all read</Text>\n </Pressable>\n )\n : undefined);\n\n return composeHeaderOptions({\n headerTitle: headerTitle ?? \"Notifications\",\n headerLeft,\n headerRight: resolvedHeaderRight,\n large: large ?? true,\n scrollEdgeBehavior: scrollEdgeBehavior ?? \"match\",\n headerOptions,\n });\n}\n\n// Returns a stable section title for a timestamp. Computes against the\n// caller's local clock for consistency with the rest of the app.\nfunction bucketFor(ts: string | Date, now = new Date()): string {\n const d = typeof ts === \"string\" ? new Date(ts) : ts;\n const startOfDay = (date: Date) => {\n const x = new Date(date);\n x.setHours(0, 0, 0, 0);\n return x.getTime();\n };\n const today = startOfDay(now);\n const yesterday = today - 24 * 60 * 60 * 1000;\n const day = startOfDay(d);\n if (day === today) return \"Today\";\n if (day === yesterday) return \"Yesterday\";\n return \"Earlier\";\n}\n\ninterface Section {\n title: string;\n data: NotificationItem[];\n}\n\nfunction groupByDate(items: NotificationItem[], now = new Date()): Section[] {\n const map = new Map<string, NotificationItem[]>();\n // Iterate in input order so stable sort within bucket.\n for (const item of items) {\n const bucket = bucketFor(item.timestamp, now);\n const arr = map.get(bucket) ?? [];\n arr.push(item);\n map.set(bucket, arr);\n }\n // Stable section order: Today / Yesterday / Earlier.\n const order = [\"Today\", \"Yesterday\", \"Earlier\"];\n return order\n .filter((title) => map.has(title))\n .map((title) => ({\n title,\n data: map.get(title) ?? [],\n }));\n}\n\n// Expose internal helpers for unit tests via a side-channel export.\nexport const __test = { bucketFor, groupByDate };\n\nexport function NotificationsPage({\n items,\n refreshing,\n onRefresh,\n emptyState,\n emptyTitle,\n emptyBody,\n className,\n testID = \"notifications-page\",\n slots = {},\n slotProps = {},\n}: NotificationsPageProps) {\n // Note: header props (headerTitle, headerLeft, headerRight, large,\n // scrollEdgeBehavior, headerOptions) are accepted on the type for API\n // ergonomics but consumed by getNotificationsPageStackOptions() at the\n // consumer's <Stack.Screen> level — not by this component.\n\n const sections = useMemo(() => groupByDate(items), [items]);\n\n if (items.length === 0) {\n return (\n <SafeAreaView\n testID={testID}\n edges={[\"left\", \"right\", \"bottom\"]}\n className={cn(\"flex-1 bg-background\", className)}\n >\n {emptyState ??\n renderSlot(\n DefaultEmpty,\n slots.empty,\n {\n title: emptyTitle ?? \"No notifications\",\n body: emptyBody ?? \"When you get a notification, it'll show up here.\",\n testID: `${testID}-empty`,\n },\n slotProps.empty,\n )}\n </SafeAreaView>\n );\n }\n\n return (\n <SafeAreaView\n testID={testID}\n edges={[\"left\", \"right\", \"bottom\"]}\n className={cn(\"flex-1 bg-background\", className)}\n >\n <SectionList<NotificationItem, Section>\n testID={`${testID}-list`}\n sections={sections}\n keyExtractor={(item) => item.id}\n renderSectionHeader={({ section }) =>\n renderSlot(DefaultSectionHeader, slots.sectionHeader, { title: section.title }, slotProps.sectionHeader)\n }\n renderItem={({ item }) =>\n renderSlot(DefaultRow, slots.row, { ...item, testID: item.testID ?? `${testID}-row-${item.id}` }, slotProps.row)\n }\n ItemSeparatorComponent={RowSeparator}\n refreshControl={\n onRefresh ? (\n <RefreshControl\n testID={`${testID}-refresh`}\n refreshing={!!refreshing}\n onRefresh={onRefresh}\n />\n ) : undefined\n }\n contentContainerClassName=\"pb-8\"\n />\n </SafeAreaView>\n );\n}\n\nfunction RowSeparator() {\n return <View className=\"h-px bg-border ml-4\" />;\n}\n\nfunction DefaultSectionHeader({ title }: NotificationsPageSlotMap[\"sectionHeader\"]) {\n return <NativeSectionListHeader title={title} />;\n}\n\nfunction DefaultRow(item: NotificationsPageSlotMap[\"row\"]) {\n return (\n <NativeListItem\n testID={item.testID}\n title={item.title}\n subtitle={item.body}\n leading={item.leading ?? <UnreadDot unread={!!item.unread} testID={`${item.testID}-unread`} />}\n onPress={item.onPress}\n />\n );\n}\n\nfunction DefaultEmpty({ title, body, testID }: NotificationsPageSlotMap[\"empty\"]) {\n return <NativeEmptyState variant=\"first-run\" title={title} body={body} testID={testID} />;\n}\n\nfunction UnreadDot({\n unread,\n testID,\n}: {\n unread: boolean;\n testID?: string;\n}) {\n if (!unread) {\n return <View className=\"h-2 w-2\" testID={testID} />;\n }\n return (\n <View\n testID={testID}\n accessibilityLabel=\"Unread\"\n className=\"h-2 w-2 rounded-full bg-primary\"\n />\n );\n}\n","/**\n * Auth primitive group (PRD-07 simplification #3).\n *\n * Auth flows are the most consumer-divergent screen in any app. Instead\n * of shipping a god-component with a sea of variants, Genesis ships\n * three small primitives that consumers compose on a regular `<View>`:\n *\n * - <AuthBranding> — slot for branded logo + headline + subhead\n * - <SocialAuthRow> — provider buttons (Apple / Google / GitHub / …)\n * - <AuthForm> — email + password (or magic link) + submit\n *\n * Composition lives in `apps/<consumer>/...` — see\n * `standards/usage-doctrine.md` § Auth composition for worked examples.\n *\n * @stability Beta\n */\nimport { useCallback, useRef, useState, type ReactNode } from \"react\";\nimport { Pressable, Text, View } from \"react-native\";\nimport { NativeButton } from \"../components/button\";\nimport { NativeInput } from \"../components/input\";\nimport { NativeText } from \"../components/text\";\nimport { cn } from \"../utils\";\n\n// ---------------------------------------------------------------------------\n// AuthBranding — branding slot above the form\n// ---------------------------------------------------------------------------\n\nexport interface AuthBrandingProps {\n /** Brand mark (logo node). */\n logo?: ReactNode;\n /** Headline text. Renders as h1. */\n headline?: string;\n /** Subhead under the headline. Renders as muted body. */\n subhead?: string;\n /** Override the root container styling. */\n className?: string;\n testID?: string;\n}\n\nexport function AuthBranding({\n logo,\n headline,\n subhead,\n className,\n testID = \"auth-branding\",\n}: AuthBrandingProps) {\n return (\n <View\n testID={testID}\n accessibilityRole=\"header\"\n className={cn(\"items-center gap-3 pb-8\", className)}\n >\n {logo ? (\n <View testID={`${testID}-logo`} className=\"mb-2\">\n {logo}\n </View>\n ) : null}\n {headline ? (\n <NativeText\n preset=\"h1\"\n testID={`${testID}-headline`}\n className=\"text-center\"\n >\n {headline}\n </NativeText>\n ) : null}\n {subhead ? (\n <NativeText\n preset=\"body\"\n testID={`${testID}-subhead`}\n className=\"text-center text-muted-foreground\"\n >\n {subhead}\n </NativeText>\n ) : null}\n </View>\n );\n}\n\n// ---------------------------------------------------------------------------\n// SocialAuthRow — provider buttons\n// ---------------------------------------------------------------------------\n\nexport type SocialAuthProvider = {\n /** Stable id used as React key + testID suffix. */\n id: string;\n /** Visible label, e.g., \"Continue with Apple\". */\n label: string;\n /** Optional leading icon node. */\n icon?: ReactNode;\n /** Press handler. */\n onPress: () => void | Promise<void>;\n /** When true, the button is disabled (e.g., loading). */\n disabled?: boolean;\n};\n\nexport interface SocialAuthRowProps {\n providers: SocialAuthProvider[];\n /**\n * Optional separator label rendered between social row and the form\n * below (e.g., \"or\"). Pass `null` to suppress. Default `\"or\"`.\n */\n separator?: string | null;\n /** Override root container styling. */\n className?: string;\n testID?: string;\n}\n\nexport function SocialAuthRow({\n providers,\n separator = \"or\",\n className,\n testID = \"social-auth-row\",\n}: SocialAuthRowProps) {\n if (providers.length === 0) return null;\n return (\n <View testID={testID} className={cn(\"gap-3\", className)}>\n <View className=\"gap-2\">\n {providers.map((p) => (\n <NativeButton\n key={p.id}\n testID={`${testID}-${p.id}`}\n variant=\"outline\"\n disabled={p.disabled}\n onPress={() => {\n void p.onPress();\n }}\n >\n <View className=\"flex-row items-center gap-2\">\n {p.icon}\n <Text className=\"text-sm font-medium text-foreground\">\n {p.label}\n </Text>\n </View>\n </NativeButton>\n ))}\n </View>\n {separator !== null && separator !== undefined ? (\n <View\n testID={`${testID}-separator`}\n className=\"my-2 flex-row items-center gap-3\"\n accessibilityElementsHidden\n >\n <View className=\"h-px flex-1 bg-border\" />\n <Text className=\"text-xs uppercase tracking-wider text-muted-foreground\">\n {separator}\n </Text>\n <View className=\"h-px flex-1 bg-border\" />\n </View>\n ) : null}\n </View>\n );\n}\n\n// ---------------------------------------------------------------------------\n// AuthForm — email + password (or magic link) + submit\n// ---------------------------------------------------------------------------\n\nexport interface AuthFormValues {\n email: string;\n /** Empty string when `mode === \"magic-link\"`. */\n password: string;\n}\n\nexport interface AuthFormProps {\n /**\n * `\"password\"` (default) renders email + password.\n * `\"magic-link\"` renders email only and the submit button label\n * defaults to \"Send magic link\".\n */\n mode?: \"password\" | \"magic-link\";\n /** Submit handler. Receives the current form values. */\n onSubmit: (values: AuthFormValues) => void | Promise<void>;\n /**\n * Optional validation slot — return `null` to allow submission, or a\n * string error message to block. Called on every submit.\n */\n validate?: (values: AuthFormValues) => string | null;\n /** Override the submit button label. */\n submitLabel?: string;\n /** When true, submit button is disabled and shows a busy indicator. */\n loading?: boolean;\n /**\n * Top-level error (set by the consumer after a server-side rejection,\n * e.g., \"Invalid credentials\"). Shown above the submit button.\n */\n errorMessage?: string;\n /** Initial email. Useful for \"log in as <user>\" deep links. */\n initialEmail?: string;\n /** Slot rendered AFTER the inputs but BEFORE the submit (e.g., \"Forgot password\" link). */\n belowFields?: ReactNode;\n /** Override root container styling. */\n className?: string;\n testID?: string;\n}\n\nexport function AuthForm({\n mode = \"password\",\n onSubmit,\n validate,\n submitLabel,\n loading,\n errorMessage,\n initialEmail = \"\",\n belowFields,\n className,\n testID = \"auth-form\",\n}: AuthFormProps) {\n const [email, setEmail] = useState(initialEmail);\n const [password, setPassword] = useState(\"\");\n const [localError, setLocalError] = useState<string | null>(null);\n const [submitting, setSubmitting] = useState(false);\n const passwordRef = useRef<{ focus(): void } | null>(null);\n\n const isMagic = mode === \"magic-link\";\n const resolvedSubmitLabel =\n submitLabel ?? (isMagic ? \"Send magic link\" : \"Sign in\");\n\n const handleSubmit = useCallback(async () => {\n // Guard against double-tap and stacked submits — the user's onSubmit\n // is async, so we own a local `submitting` flag in addition to the\n // parent-controlled `loading` prop.\n if (submitting || loading) return;\n\n setLocalError(null);\n const values: AuthFormValues = {\n email: email.trim(),\n password: isMagic ? \"\" : password,\n };\n if (validate) {\n const err = validate(values);\n if (err) {\n setLocalError(err);\n return;\n }\n }\n if (!values.email) {\n setLocalError(\"Email is required\");\n return;\n }\n if (!isMagic && !values.password) {\n setLocalError(\"Password is required\");\n return;\n }\n\n // Await the consumer's onSubmit so we surface unhandled rejections\n // as a local error string instead of dropping them on the floor.\n setSubmitting(true);\n try {\n await onSubmit(values);\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err);\n setLocalError(message);\n } finally {\n setSubmitting(false);\n }\n }, [email, password, isMagic, validate, onSubmit, submitting, loading]);\n\n const visibleError = errorMessage ?? localError ?? null;\n\n return (\n <View testID={testID} className={cn(\"gap-3\", className)}>\n <View className=\"gap-1\">\n <Text className=\"text-sm font-medium text-foreground\">Email</Text>\n <NativeInput\n testID={`${testID}-email`}\n accessibilityLabel=\"Email\"\n value={email}\n onChangeText={setEmail}\n placeholder=\"you@example.com\"\n autoCapitalize=\"none\"\n autoCorrect={false}\n keyboardType=\"email-address\"\n textContentType=\"emailAddress\"\n autoComplete=\"email\"\n returnKeyType={isMagic ? \"send\" : \"next\"}\n editable={!loading && !submitting}\n // Magic-link mode: the email field is the last input, so return\n // submits. Password mode: React Native doesn't move focus by\n // itself, so return focuses the password field and keeps the\n // keyboard open.\n submitBehavior={isMagic ? \"blurAndSubmit\" : \"submit\"}\n onSubmitEditing={isMagic ? handleSubmit : () => passwordRef.current?.focus()}\n />\n </View>\n\n {isMagic ? null : (\n <View className=\"gap-1\">\n <Text className=\"text-sm font-medium text-foreground\">Password</Text>\n <NativeInput\n ref={passwordRef}\n testID={`${testID}-password`}\n accessibilityLabel=\"Password\"\n value={password}\n onChangeText={setPassword}\n placeholder=\"••••••••\"\n secureTextEntry\n textContentType=\"password\"\n autoComplete=\"current-password\"\n autoCapitalize=\"none\"\n autoCorrect={false}\n returnKeyType=\"send\"\n editable={!loading && !submitting}\n onSubmitEditing={handleSubmit}\n />\n </View>\n )}\n\n {belowFields}\n\n {visibleError ? (\n <Text\n testID={`${testID}-error`}\n accessibilityRole=\"alert\"\n className=\"text-sm text-destructive\"\n >\n {visibleError}\n </Text>\n ) : null}\n\n <NativeButton\n testID={`${testID}-submit`}\n onPress={() => {\n void handleSubmit();\n }}\n loading={loading || submitting}\n disabled={loading || submitting}\n >\n {resolvedSubmitLabel}\n </NativeButton>\n </View>\n );\n}\n\n// Convenience: a \"Forgot password?\" link consumers can drop into the\n// `belowFields` slot. Kept as a simple Pressable so it inherits brand\n// tokens via the consumer's tailwind config.\nexport function ForgotPasswordLink({\n onPress,\n label = \"Forgot password?\",\n testID = \"auth-forgot-password\",\n}: {\n onPress: () => void;\n label?: string;\n testID?: string;\n}) {\n return (\n <Pressable\n testID={testID}\n accessibilityRole=\"link\"\n accessibilityLabel={label}\n onPress={onPress}\n hitSlop={8}\n className=\"self-end\"\n >\n <Text className=\"text-sm font-medium text-primary\">{label}</Text>\n </Pressable>\n );\n}\n","/**\n * AuthScreen — a whole sign-in screen: branding, social providers, the\n * email form with a \"Forgot password?\" link, and a footer (terms, a\n * sign-up link). It assembles the auth primitives (`AuthBranding`,\n * `SocialAuthRow`, `AuthForm`, `ForgotPasswordLink`) so an app passes\n * props instead of composing them.\n *\n * The form stays above the keyboard on small phones: with the app's\n * `KeyboardScrollProvider` (react-native-keyboard-controller), else with\n * `KeyboardAvoidingView`. In development, on\n * iOS, it warns when a third-party provider is offered without Sign in with\n * Apple (App Store Review Guideline 4.8 rejects that).\n *\n * Slots: replace or drop (`null`) `branding`, `social`, `form` or `footer`;\n * `slotProps` feeds a default part. Composing the primitives yourself is\n * still the escape hatch.\n *\n * @stability Beta\n */\nimport type { ReactNode } from \"react\";\nimport { KeyboardAvoidingView, Platform, View } from \"react-native\";\nimport { renderSlot, type SlotPropsFor, type Slots } from \"@marktiderman/genesis-core/slots\";\nimport {\n AuthBranding,\n AuthForm,\n ForgotPasswordLink,\n SocialAuthRow,\n type AuthBrandingProps,\n type AuthFormProps,\n type SocialAuthProvider,\n} from \"./auth\";\nimport { ScreenContainer } from \"./screen-container\";\nimport { useKeyboardScroll } from \"./keyboard\";\n\n/** The parts of an {@link AuthScreen} that `slots` and `slotProps` reach. */\nexport type AuthScreenSlotMap = {\n branding: AuthBrandingProps;\n social: { providers: SocialAuthProvider[]; testID: string };\n form: AuthFormProps;\n footer: { children: ReactNode; testID: string };\n};\n\nexport interface AuthScreenProps {\n /** Logo, headline and subhead above everything else. */\n branding?: AuthBrandingProps;\n /** Sign-in providers (Apple, Google…). None: no social row. */\n providers?: SocialAuthProvider[];\n /** The email form. */\n form: AuthFormProps;\n /** Adds a \"Forgot password?\" link below the fields (password mode only). */\n onForgotPassword?: () => void;\n /** Below the form: terms, a sign-up link. */\n footer?: ReactNode;\n /** Replace (a component) or drop (`null`) one part. */\n slots?: Slots<AuthScreenSlotMap>;\n /** More props for a default part, merged over what the screen passes. */\n slotProps?: SlotPropsFor<AuthScreenSlotMap>;\n /** testID on the root container. Default `\"auth-screen\"`. */\n testID?: string;\n}\n\nexport function AuthScreen({\n branding,\n providers,\n form,\n onForgotPassword,\n footer,\n slots = {},\n slotProps = {},\n testID = \"auth-screen\",\n}: AuthScreenProps) {\n warnIfNoAppleSignIn(providers);\n const forgot =\n onForgotPassword && (form.mode ?? \"password\") === \"password\" ? <ForgotPasswordLink onPress={onForgotPassword} /> : null;\n const formProps: AuthFormProps = { ...form, belowFields: form.belowFields ?? forgot, testID: form.testID ?? `${testID}-form` };\n const KeyboardScroll = useKeyboardScroll();\n const content = (\n <>\n {branding ? renderSlot(AuthBranding, slots.branding, { ...branding, testID: branding.testID ?? `${testID}-branding` }, slotProps.branding) : null}\n {providers?.length\n ? renderSlot(DefaultSocial, slots.social, { providers, testID: `${testID}-social` }, slotProps.social)\n : null}\n {renderSlot(AuthForm, slots.form, formProps, slotProps.form)}\n {footer ? renderSlot(DefaultFooter, slots.footer, { children: footer, testID: `${testID}-footer` }, slotProps.footer) : null}\n </>\n );\n if (KeyboardScroll) {\n return (\n <ScreenContainer testID={testID}>\n <KeyboardScroll\n testID={`${testID}-keyboard`}\n keyboardShouldPersistTaps=\"handled\"\n contentInsetAdjustmentBehavior=\"automatic\"\n bottomOffset={24}\n contentContainerStyle={{ flexGrow: 1, justifyContent: \"center\", gap: 24, paddingHorizontal: 24, paddingVertical: 32 }}\n >\n {content}\n </KeyboardScroll>\n </ScreenContainer>\n );\n }\n return (\n <KeyboardAvoidingView testID={`${testID}-kav`} style={{ flex: 1 }} behavior={Platform.OS === \"ios\" ? \"padding\" : undefined}>\n <ScreenContainer scroll keyboardShouldPersistTaps=\"handled\" testID={testID} contentClassName=\"flex-grow justify-center gap-6 px-6 py-8\">\n {content}\n </ScreenContainer>\n </KeyboardAvoidingView>\n );\n}\n\ndeclare const __DEV__: boolean | undefined;\ndeclare const process: { env: Record<string, string | undefined> } | undefined;\nconst warnedNoApple = new Set<string>();\n\n/** Development-only: App Store Review Guideline 4.8 requires Sign in with Apple alongside third-party sign-in. */\nfunction warnIfNoAppleSignIn(providers: SocialAuthProvider[] | undefined) {\n const dev = typeof __DEV__ !== \"undefined\" ? __DEV__ : typeof process !== \"undefined\" && process.env.NODE_ENV !== \"production\";\n if (!dev || Platform.OS !== \"ios\" || !providers?.length) return;\n if (providers.some((p) => p.id === \"apple\")) return;\n const ids = providers.map((p) => p.id).join(\",\");\n if (warnedNoApple.has(ids)) return;\n warnedNoApple.add(ids);\n console.warn(\n `[genesis] AuthScreen offers ${providers.map((p) => p.label).join(\", \")} on iOS without Sign in with Apple. App Store Review Guideline 4.8 requires it; add a provider with id \"apple\".`,\n );\n}\n\nfunction DefaultSocial({ providers, testID }: AuthScreenSlotMap[\"social\"]) {\n return <SocialAuthRow providers={providers} testID={testID} />;\n}\n\nfunction DefaultFooter({ children, testID }: AuthScreenSlotMap[\"footer\"]) {\n return (\n <View testID={testID} className=\"items-center\">\n {children}\n </View>\n );\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/empty-state.tsx","../src/components/list-item.tsx","../src/components/section-list.tsx"],"names":["jsxs","jsx","View","Text"],"mappings":";;;;AAwEA,IAAM,QAAA,GAA6E;AAAA,EACjF,WAAA,EAAa,EAAE,KAAA,EAAO,kBAAA,EAAoB,MAAM,uBAAA,EAAwB;AAAA,EACxE,YAAA,EAAc,EAAE,KAAA,EAAO,YAAA,EAAc,MAAM,uBAAA,EAAwB;AAAA,EACnE,KAAA,EAAO,EAAE,KAAA,EAAO,sBAAA,EAAwB,MAAM,kBAAA;AAChD,CAAA;AAEO,SAAS,gBAAA,CAAiB;AAAA,EAC/B,OAAA,GAAU,WAAA;AAAA,EACV,KAAA;AAAA,EACA,IAAA;AAAA,EACA,WAAA;AAAA,EACA,YAAA;AAAA,EACA,IAAA;AAAA,EACA,aAAA;AAAA,EACA,eAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF,CAAA,EAA0B;AACxB,EAAA,MAAM,IAAA,GAAO,SAAS,OAAO,CAAA;AAC7B,EAAA,MAAM,eAAe,IAAA,IAAQ,WAAA;AAC7B,EAAA,MAAM,kBAAkB,aAAA,IAAiB,MAAA;AAKzC,EAAA,MAAM,OAAQ,UAAA,CACX,OAAA;AACH,EAAA,MAAM,OAAA,GAAU,MAAM,GAAA,EAAK,QAAA;AAC3B,EAAA,MAAM,KAAA,GAAQ,OAAA,KAAY,aAAA,IAAiB,OAAA,KAAY,MAAA;AAEvD,EAAA,uBACE,IAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,MAAA,EAAQ,MAAA,IAAU,CAAA,YAAA,EAAe,OAAO,CAAA,CAAA;AAAA,MACxC,iBAAA,EAAkB,SAAA;AA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AAA,uBACEF,IAAAA;AAAA,IAACE,IAAAA;AAAA,IAAA;AAAA,MACC,QAAQ,MAAA,IAAU,uBAAA;AAAA,MAClB,iBAAA,EAAkB,QAAA;AAAA,MAClB,SAAA,EAAW,EAAA;AAAA,QACT,iFAAA;AAAA,QACA;AAAA,OACF;AAAA,MAEA,QAAA,EAAA;AAAA,wBAAAD,GAAAA,CAACE,IAAAA,EAAA,EAAK,SAAA,EAAU,wEACb,QAAA,EAAA,KAAA,EACH,CAAA;AAAA,QACC;AAAA;AAAA;AAAA,GACH;AAEJ","file":"chunk-ULS7I6ZS.js","sourcesContent":["/**\n * EmptyState — what to show when a list / screen has no data.\n *\n * Three semantic variants drive default messaging:\n * - \"first-run\": user has never had data here. Optimistic.\n * - \"no-results\": user filtered/searched and got nothing. Suggest reset.\n * - \"error\": fetching failed. Suggest retry.\n *\n * The variant only sets sensible defaults for `title` and tone — pass\n * your own `title`, `body`, `primaryAction`, `secondaryAction`, etc. to\n * override. Mirrors the @marktiderman/genesis-ui web `<EmptyState>` API where\n * possible (illustration vs icon slot, primary/secondary actions).\n *\n * @stability Beta\n */\nimport { Text, View } from \"react-native\";\nimport { cn } from \"../utils\";\n\nexport type NativeEmptyStateVariant = \"first-run\" | \"no-results\" | \"error\";\n\n/**\n * Action descriptor for primary/secondary CTAs. Either pass a structured\n * object (renders a Pressable button via the consumer's button slot) or\n * pass an arbitrary node via `action` for maximum flexibility.\n */\nexport interface NativeEmptyStateAction {\n label: string;\n onPress: () => void;\n testID?: string;\n}\n\nexport interface NativeEmptyStateProps {\n /** Variant drives default tone + default title. Default \"first-run\". */\n variant?: NativeEmptyStateVariant;\n /** Headline. Falls back to a variant-specific default. */\n title?: string;\n /** Body copy shown below the title. (Alias: `description`.) */\n body?: string;\n /**\n * @deprecated Prefer `body`. `description` remains for back-compat with\n * the original C3 API; both are accepted but `body` wins if both passed.\n */\n description?: string;\n /** Optional illustration (artwork node) above the title. */\n illustration?: React.ReactNode;\n /** Optional icon node above the title (use either icon or illustration). */\n icon?: React.ReactNode;\n /**\n * Primary CTA. When provided, the consumer is responsible for rendering\n * the button itself (we accept a node, not a label) so brand + token\n * styling is honored. The web API takes a `{label, onPress}` descriptor;\n * on native, prefer to pass a `<NativeButton>` directly to avoid\n * cross-package coupling.\n */\n primaryAction?: React.ReactNode;\n /** Secondary CTA, rendered below the primary. */\n secondaryAction?: React.ReactNode;\n /**\n * Free-form action slot. Equivalent to `primaryAction`; accepted for\n * back-compat with the C3 API. If both `action` and `primaryAction` are\n * passed, `primaryAction` wins.\n */\n action?: React.ReactNode;\n /**\n * Developer-facing error details. Only rendered when __DEV__ is true at\n * runtime (we infer by reading `process.env.NODE_ENV !== \"production\"`).\n */\n details?: string;\n className?: string;\n testID?: string;\n}\n\nconst defaults: Record<NativeEmptyStateVariant, { title: string; tone: string }> = {\n \"first-run\": { title: \"Nothing here yet\", tone: \"text-muted-foreground\" },\n \"no-results\": { title: \"No results\", tone: \"text-muted-foreground\" },\n error: { title: \"Something went wrong\", tone: \"text-destructive\" },\n};\n\nexport function NativeEmptyState({\n variant = \"first-run\",\n title,\n body,\n description,\n illustration,\n icon,\n primaryAction,\n secondaryAction,\n action,\n details,\n className,\n testID,\n}: NativeEmptyStateProps) {\n const meta = defaults[variant];\n const resolvedBody = body ?? description;\n const resolvedPrimary = primaryAction ?? action;\n // Read NODE_ENV defensively — some bundlers don't define `process` at\n // runtime (e.g., RN classic), so we guard via globalThis. The `details`\n // slot is dev-only; we explicitly enumerate non-production values so an\n // undefined NODE_ENV doesn't accidentally leak diagnostic strings.\n const proc = (globalThis as { process?: { env?: { NODE_ENV?: string } } })\n .process;\n const nodeEnv = proc?.env?.NODE_ENV;\n const isDev = nodeEnv === \"development\" || nodeEnv === \"test\";\n\n return (\n <View\n testID={testID ?? `empty-state-${variant}`}\n accessibilityRole=\"summary\"\n className={cn(\n \"items-center justify-center gap-3 px-8 py-12\",\n className\n )}\n >\n {illustration ? <View accessibilityElementsHidden>{illustration}</View> : null}\n {icon && !illustration ? (\n <View accessibilityElementsHidden>{icon}</View>\n ) : null}\n <Text\n testID={testID ? `${testID}-title` : undefined}\n className={cn(\n \"text-center text-lg font-semibold\",\n variant === \"error\" ? \"text-destructive\" : \"text-foreground\"\n )}\n >\n {title ?? meta.title}\n </Text>\n {resolvedBody ? (\n <Text\n testID={testID ? `${testID}-body` : undefined}\n className={cn(\"max-w-sm text-center text-sm\", meta.tone)}\n >\n {resolvedBody}\n </Text>\n ) : null}\n {resolvedPrimary ? (\n <View\n testID={testID ? `${testID}-primary-action` : undefined}\n className=\"mt-2\"\n >\n {resolvedPrimary}\n </View>\n ) : null}\n {secondaryAction ? (\n <View\n testID={testID ? `${testID}-secondary-action` : undefined}\n className=\"mt-1\"\n >\n {secondaryAction}\n </View>\n ) : null}\n {details && isDev ? (\n <Text\n testID={testID ? `${testID}-details` : undefined}\n className=\"mt-2 max-w-sm text-center text-xs text-muted-foreground\"\n >\n {details}\n </Text>\n ) : null}\n </View>\n );\n}\n","/**\n * ListItem — recurring row in a list (settings, contacts, results).\n *\n * Slots: leading (avatar / icon), title, subtitle, trailing\n * (chevron / accessory / action). Supports pressable variants with\n * automatic divider rendering between adjacent items via a wrapper\n * pattern (see <NativeListItemDivider>).\n *\n * For platform-default chevrons, pass `showChevron`; the chevron uses\n * the muted-foreground token.\n *\n * @stability Beta\n */\nimport { Pressable, Text, View } from \"react-native\";\nimport { cn } from \"../utils\";\n\nexport interface NativeListItemProps {\n title: string;\n subtitle?: string;\n /** Slot rendered to the left of the title (avatar / icon). */\n leading?: React.ReactNode;\n /** Slot rendered to the right of the title (badge / accessory). */\n trailing?: React.ReactNode;\n /** When true, renders a chevron-right at the end. */\n showChevron?: boolean;\n /** When provided, the row becomes pressable. */\n onPress?: () => void;\n disabled?: boolean;\n className?: string;\n testID?: string;\n}\n\nexport function NativeListItem({\n title,\n subtitle,\n leading,\n trailing,\n showChevron,\n onPress,\n disabled,\n className,\n testID,\n}: NativeListItemProps) {\n const inner = (\n <>\n {leading ? <View className=\"mr-3\">{leading}</View> : null}\n <View className=\"flex-1\">\n <Text className=\"text-base text-foreground\" numberOfLines={1}>\n {title}\n </Text>\n {subtitle ? (\n <Text\n className=\"mt-0.5 text-xs text-muted-foreground\"\n numberOfLines={2}\n >\n {subtitle}\n </Text>\n ) : null}\n </View>\n {trailing ? <View className=\"ml-3\">{trailing}</View> : null}\n {showChevron ? (\n <Text\n accessibilityElementsHidden\n className=\"ml-2 text-base text-muted-foreground\"\n >\n ›\n </Text>\n ) : null}\n </>\n );\n\n if (onPress) {\n return (\n <Pressable\n testID={testID ?? \"native-list-item\"}\n accessibilityRole=\"button\"\n accessibilityLabel={subtitle ? `${title}, ${subtitle}` : title}\n accessibilityState={{ disabled }}\n disabled={disabled}\n onPress={onPress}\n className={cn(\n \"min-h-[44px] flex-row items-center bg-background px-4 py-3\",\n disabled && \"opacity-50\",\n className\n )}\n >\n {inner}\n </Pressable>\n );\n }\n\n return (\n <View\n testID={testID ?? \"native-list-item\"}\n accessibilityLabel={subtitle ? `${title}, ${subtitle}` : title}\n className={cn(\n \"min-h-[44px] flex-row items-center bg-background px-4 py-3\",\n className\n )}\n >\n {inner}\n </View>\n );\n}\n\nexport function NativeListItemDivider({ className }: { className?: string }) {\n return <View className={cn(\"h-px bg-border\", className)} />;\n}\n","/**\n * SectionList header pattern — opinionated header style for\n * react-native SectionList rows.\n *\n * The full SectionList API stays with React Native; Genesis ships the\n * header component so consumers can pass it as `renderSectionHeader`\n * and get a consistent visual: muted background, uppercase tracking,\n * sticky-friendly padding.\n *\n * Pattern:\n *\n * <SectionList\n * sections={...}\n * renderItem={({ item }) => <NativeListItem title={item.label} />}\n * renderSectionHeader={({ section }) => (\n * <NativeSectionListHeader title={section.title} />\n * )}\n * />\n *\n * @stability Beta\n */\nimport { Text, View } from \"react-native\";\nimport { cn } from \"../utils\";\n\nexport interface NativeSectionListHeaderProps {\n title: string;\n /** Optional trailing content (e.g., a count badge). */\n trailing?: React.ReactNode;\n className?: string;\n testID?: string;\n}\n\nexport function NativeSectionListHeader({\n title,\n trailing,\n className,\n testID,\n}: NativeSectionListHeaderProps) {\n return (\n <View\n testID={testID ?? \"native-section-header\"}\n accessibilityRole=\"header\"\n className={cn(\n \"flex-row items-center justify-between border-b border-border bg-muted px-4 py-2\",\n className\n )}\n >\n <Text className=\"text-xs font-semibold uppercase tracking-wider text-muted-foreground\">\n {title}\n </Text>\n {trailing}\n </View>\n );\n}\n"]}
|