@marktiderman/genesis-ui-native 2.0.2 → 2.1.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/dist/{chunk-HNIEFTEL.js → chunk-F2TGDKOO.js} +2 -2
- package/dist/{chunk-HNIEFTEL.js.map → chunk-F2TGDKOO.js.map} +1 -1
- package/dist/{chunk-OMTXD7ND.js → chunk-U2SPACTV.js} +191 -76
- package/dist/chunk-U2SPACTV.js.map +1 -0
- package/dist/chunk-Z3AQYVUA.js +36 -0
- package/dist/chunk-Z3AQYVUA.js.map +1 -0
- package/dist/hooks/index.d.ts +12 -2
- package/dist/hooks/index.js +2 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -3
- package/dist/layouts/index.d.ts +110 -13
- package/dist/layouts/index.js +2 -2
- package/package.json +14 -14
- package/src/components/__tests__/badge.test.tsx +1 -0
- package/src/hooks/__tests__/use-theme-roles.test.tsx +30 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use-theme-roles.ts +45 -0
- package/src/layouts/__tests__/auth-screen.test.tsx +72 -0
- package/src/layouts/__tests__/auth.test.tsx +1 -0
- package/src/layouts/__tests__/keyboard-scroll.test.tsx +34 -0
- package/src/layouts/__tests__/nav-bar.test.tsx +1 -0
- package/src/layouts/__tests__/notifications-page-slots.test.tsx +23 -0
- package/src/layouts/__tests__/notifications-page.test.tsx +1 -0
- package/src/layouts/__tests__/screen-container.test.tsx +1 -0
- package/src/layouts/__tests__/settings-page-slots.test.tsx +41 -0
- package/src/layouts/__tests__/settings-page.test.tsx +1 -0
- package/src/layouts/__tests__/settings-sub-page.test.tsx +1 -0
- package/src/layouts/auth-screen.tsx +138 -0
- package/src/layouts/auth.tsx +13 -6
- package/src/layouts/index.ts +7 -1
- package/src/layouts/keyboard.tsx +39 -0
- package/src/layouts/notifications-page.tsx +63 -35
- package/src/layouts/screen-container.tsx +5 -1
- package/src/layouts/settings-page.tsx +122 -55
- package/src/layouts/settings-sub-page.tsx +21 -0
- package/dist/chunk-N4WHTQIO.js +0 -20
- package/dist/chunk-N4WHTQIO.js.map +0 -1
- package/dist/chunk-OMTXD7ND.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
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,IAA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AE,IAAA,CAAK,GAAG,CAAA;AAC/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"]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { useState, useEffect, useMemo } from 'react';
|
|
2
|
+
import { Appearance, Platform, PlatformColor } from 'react-native';
|
|
3
|
+
import { resolveThemeRoles } from '@marktiderman/genesis-design-system';
|
|
4
|
+
|
|
5
|
+
// src/hooks/use-theme-mode.ts
|
|
6
|
+
function useThemeMode() {
|
|
7
|
+
const [scheme, setScheme] = useState(
|
|
8
|
+
Appearance.getColorScheme()
|
|
9
|
+
);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
const sub = Appearance.addChangeListener(({ colorScheme }) => {
|
|
12
|
+
setScheme(colorScheme);
|
|
13
|
+
});
|
|
14
|
+
return () => sub.remove();
|
|
15
|
+
}, []);
|
|
16
|
+
return scheme === "dark" ? "dark" : "light";
|
|
17
|
+
}
|
|
18
|
+
function useThemeRoles(options = {}) {
|
|
19
|
+
const scheme = useThemeMode();
|
|
20
|
+
const { tint, materialYou = false } = options;
|
|
21
|
+
const androidDynamic = materialYou && Platform.OS === "android" && Number(Platform.Version) >= 31;
|
|
22
|
+
return useMemo(
|
|
23
|
+
() => resolveThemeRoles({
|
|
24
|
+
target: Platform.OS === "ios" ? "ios" : "android",
|
|
25
|
+
scheme,
|
|
26
|
+
platformColor: (name) => PlatformColor(name),
|
|
27
|
+
tint,
|
|
28
|
+
androidDynamic
|
|
29
|
+
}),
|
|
30
|
+
[scheme, tint, androidDynamic]
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { useThemeMode, useThemeRoles };
|
|
35
|
+
//# sourceMappingURL=chunk-Z3AQYVUA.js.map
|
|
36
|
+
//# sourceMappingURL=chunk-Z3AQYVUA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/hooks/use-theme-mode.ts","../src/hooks/use-theme-roles.ts"],"names":[],"mappings":";;;;;AAiBO,SAAS,YAAA,GAA0B;AACxC,EAAA,MAAM,CAAC,MAAA,EAAQ,SAAS,CAAA,GAAI,QAAA;AAAA,IAC1B,WAAW,cAAA;AAAe,GAC5B;AAEA,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,MAAM,MAAM,UAAA,CAAW,iBAAA,CAAkB,CAAC,EAAE,aAAY,KAAM;AAC5D,MAAA,SAAA,CAAU,WAAW,CAAA;AAAA,IACvB,CAAC,CAAA;AACD,IAAA,OAAO,MAAM,IAAI,MAAA,EAAO;AAAA,EAC1B,CAAA,EAAG,EAAE,CAAA;AAEL,EAAA,OAAO,MAAA,KAAW,SAAS,MAAA,GAAS,OAAA;AACtC;ACDO,SAAS,aAAA,CAAc,OAAA,GAAgC,EAAC,EAAoB;AACjF,EAAA,MAAM,SAAS,YAAA,EAAa;AAC5B,EAAA,MAAM,EAAE,IAAA,EAAM,WAAA,GAAc,KAAA,EAAM,GAAI,OAAA;AACtC,EAAA,MAAM,cAAA,GAAiB,eAAe,QAAA,CAAS,EAAA,KAAO,aAAa,MAAA,CAAO,QAAA,CAAS,OAAO,CAAA,IAAK,EAAA;AAC/F,EAAA,OAAO,OAAA;AAAA,IACL,MACE,iBAAA,CAA8B;AAAA,MAC5B,MAAA,EAAQ,QAAA,CAAS,EAAA,KAAO,KAAA,GAAQ,KAAA,GAAQ,SAAA;AAAA,MACxC,MAAA;AAAA,MACA,aAAA,EAAe,CAAC,IAAA,KAAS,aAAA,CAAc,IAAI,CAAA;AAAA,MAC3C,IAAA;AAAA,MACA;AAAA,KACD,CAAA;AAAA,IACH,CAAC,MAAA,EAAQ,IAAA,EAAM,cAAc;AAAA,GAC/B;AACF","file":"chunk-Z3AQYVUA.js","sourcesContent":["/**\n * useThemeMode — read the active color scheme (light / dark / unset).\n *\n * Wraps RN's `Appearance.getColorScheme()` + `Appearance.addChangeListener`\n * with a stable React hook so consumers don't have to wire it themselves.\n *\n * Use this in tokens-aware components when you need to choose between\n * light/dark variants OUTSIDE of Tailwind's `dark:` modifier (e.g., to pick\n * an asset, run an extra-color computation, or set StatusBar style).\n *\n * @stability Beta\n */\nimport { useEffect, useState } from \"react\";\nimport { Appearance, type ColorSchemeName } from \"react-native\";\n\nexport type ThemeMode = \"light\" | \"dark\";\n\nexport function useThemeMode(): ThemeMode {\n const [scheme, setScheme] = useState<ColorSchemeName>(\n Appearance.getColorScheme(),\n );\n\n useEffect(() => {\n const sub = Appearance.addChangeListener(({ colorScheme }) => {\n setScheme(colorScheme);\n });\n return () => sub.remove();\n }, []);\n\n return scheme === \"dark\" ? \"dark\" : \"light\";\n}\n","/**\n * useThemeRoles — the theme roles (background, label, separator, tint…) as\n * colors for this platform and color scheme.\n *\n * On iOS every neutral role is a system color through `PlatformColor`, so a\n * screen follows light and dark mode, increased contrast and accessibility\n * settings like the system apps. On Android the roles are the Genesis tokens\n * for the current scheme, or Material You colors on Android 12+ with\n * `materialYou`. A brand sets `tint`.\n *\n * Use it for `style` props and anything Tailwind classes don't reach, such as\n * navigation header and tab bar options.\n *\n * @stability Beta\n */\nimport { useMemo } from \"react\";\nimport { Platform, PlatformColor, type ColorValue } from \"react-native\";\nimport { resolveThemeRoles, type ThemeRole } from \"@marktiderman/genesis-design-system\";\nimport { useThemeMode } from \"./use-theme-mode\";\n\nexport type ThemeRoleColors = Record<ThemeRole, ColorValue>;\n\nexport interface UseThemeRolesOptions {\n /** The brand's primary color. */\n tint?: string;\n /** On Android 12+, use Material You dynamic colors for the neutral roles (and the tint, unless `tint` is set). Ignored elsewhere. */\n materialYou?: boolean;\n}\n\nexport function useThemeRoles(options: UseThemeRolesOptions = {}): ThemeRoleColors {\n const scheme = useThemeMode();\n const { tint, materialYou = false } = options;\n const androidDynamic = materialYou && Platform.OS === \"android\" && Number(Platform.Version) >= 31;\n return useMemo(\n () =>\n resolveThemeRoles<ColorValue>({\n target: Platform.OS === \"ios\" ? \"ios\" : \"android\",\n scheme,\n platformColor: (name) => PlatformColor(name),\n tint,\n androidDynamic,\n }),\n [scheme, tint, androidDynamic],\n );\n}\n"]}
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
|
+
import { ColorValue } from 'react-native';
|
|
2
|
+
import { ThemeRole, BrandExtensions } from '@marktiderman/genesis-design-system';
|
|
1
3
|
import * as react from 'react';
|
|
2
4
|
import { ReactNode } from 'react';
|
|
3
|
-
import { BrandExtensions } from '@marktiderman/genesis-design-system';
|
|
4
5
|
|
|
5
6
|
declare function useReducedMotion(): boolean;
|
|
6
7
|
|
|
7
8
|
type ThemeMode = "light" | "dark";
|
|
8
9
|
declare function useThemeMode(): ThemeMode;
|
|
9
10
|
|
|
11
|
+
type ThemeRoleColors = Record<ThemeRole, ColorValue>;
|
|
12
|
+
interface UseThemeRolesOptions {
|
|
13
|
+
/** The brand's primary color. */
|
|
14
|
+
tint?: string;
|
|
15
|
+
/** On Android 12+, use Material You dynamic colors for the neutral roles (and the tint, unless `tint` is set). Ignored elsewhere. */
|
|
16
|
+
materialYou?: boolean;
|
|
17
|
+
}
|
|
18
|
+
declare function useThemeRoles(options?: UseThemeRolesOptions): ThemeRoleColors;
|
|
19
|
+
|
|
10
20
|
/**
|
|
11
21
|
* Runtime shape passed to `<BrandExtensionsProvider>`. Consumers augment
|
|
12
22
|
* the canonical `BrandExtensions` interface (in design-system) via TS
|
|
@@ -28,4 +38,4 @@ declare function BrandExtensionsProvider({ value, children, }: BrandExtensionsPr
|
|
|
28
38
|
*/
|
|
29
39
|
declare function useGenesisExtension<K extends keyof BrandExtensions>(key: K): BrandExtensions[K] | undefined;
|
|
30
40
|
|
|
31
|
-
export { BrandExtensionsProvider, type BrandExtensionsProviderProps, type BrandExtensionsValue, type ThemeMode, useGenesisExtension, useReducedMotion, useThemeMode };
|
|
41
|
+
export { BrandExtensionsProvider, type BrandExtensionsProviderProps, type BrandExtensionsValue, type ThemeMode, type ThemeRoleColors, type UseThemeRolesOptions, useGenesisExtension, useReducedMotion, useThemeMode, useThemeRoles };
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { BrandExtensionsProvider, useGenesisExtension, useReducedMotion } from '../chunk-
|
|
2
|
-
export { useThemeMode } from '../chunk-
|
|
1
|
+
export { BrandExtensionsProvider, useGenesisExtension, useReducedMotion } from '../chunk-F2TGDKOO.js';
|
|
2
|
+
export { useThemeMode, useThemeRoles } from '../chunk-Z3AQYVUA.js';
|
|
3
3
|
import '../chunk-DGUM43GV.js';
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export { Box, BoxBackground, BoxProps, FlexAlign, FlexJustify, Grid, GridProps, Inline, InlineProps, NativeAccordion, NativeAccordionContent, NativeAccordionContentProps, NativeAccordionItem, NativeAccordionItemProps, NativeAccordionProps, NativeAccordionTrigger, NativeAccordionTriggerProps, NativeAccordionType, NativeAlert, NativeAlertDescription, NativeAlertDescriptionProps, NativeAlertProps, NativeAlertTitle, NativeAlertTitleProps, NativeAvatar, NativeAvatarProps, NativeBadge, NativeBadgeProps, NativeBanner, NativeBannerProps, NativeButton, NativeButtonProps, NativeCard, NativeCardContent, NativeCardDescription, NativeCardFooter, NativeCardHeader, NativeCardProps, NativeCardTitle, NativeCardTitleProps, NativeCheckbox, NativeCheckboxProps, NativeChip, NativeChipGroup, NativeChipGroupMode, NativeChipGroupProps, NativeChipProps, NativeCombobox, NativeComboboxOption, NativeComboboxProps, NativeDatePicker, NativeDatePickerProps, NativeDialog, NativeDialogContent, NativeDialogContentProps, NativeDialogDescription, NativeDialogDescriptionProps, NativeDialogFooter, NativeDialogFooterProps, NativeDialogHeader, NativeDialogHeaderProps, NativeDialogProps, NativeDialogTitle, NativeDialogTitleProps, NativeDrawer, NativeDrawerProps, NativeDropdownMenu, NativeDropdownMenuContent, NativeDropdownMenuContentProps, NativeDropdownMenuItem, NativeDropdownMenuItemProps, NativeDropdownMenuProps, NativeDropdownMenuTrigger, NativeDropdownMenuTriggerProps, NativeEmptyState, NativeEmptyStateProps, NativeEmptyStateVariant, NativeHeaderCard, NativeHeaderCardProps, NativeInlineAlert, NativeInlineAlertProps, NativeInlineAlertVariant, NativeInput, NativeInputProps, NativeLabel, NativeLabelProps, NativeListItem, NativeListItemDivider, NativeListItemProps, NativeNumberInput, NativeNumberInputProps, NativePagination, NativePaginationProps, NativePopover, NativePopoverContent, NativePopoverContentProps, NativePopoverProps, NativePopoverTrigger, NativePopoverTriggerProps, NativeProgress, NativeProgressProps, NativeRadioGroup, NativeRadioGroupItem, NativeRadioGroupItemProps, NativeRadioGroupProps, NativeRangeSlider, NativeRangeSliderProps, NativeRefreshControl, NativeRefreshControlProps, NativeSearchBar, NativeSearchBarProps, NativeSectionListHeader, NativeSectionListHeaderProps, NativeSegmentedControl, NativeSegmentedControlOption, NativeSegmentedControlProps, NativeSelect, NativeSelectContent, NativeSelectContentProps, NativeSelectItem, NativeSelectItemProps, NativeSelectProps, NativeSelectTrigger, NativeSelectTriggerProps, NativeSeparator, NativeSeparatorProps, NativeSheet, NativeSheetProps, NativeSkeleton, NativeSkeletonProps, NativeSlider, NativeSliderProps, NativeStepper, NativeStepperProps, NativeStepperStep, NativeSwitch, NativeSwitchProps, NativeTabs, NativeTabsContent, NativeTabsContentProps, NativeTabsList, NativeTabsListProps, NativeTabsProps, NativeTabsTrigger, NativeTabsTriggerProps, NativeText, NativeTextProps, NativeTextarea, NativeTextareaProps, NativeTimePicker, NativeTimePickerProps, NativeToastOptions, NativeToastProvider, NativeToastProviderProps, NativeToastVariant, NativeToggle, NativeToggleProps, NativeTooltip, NativeTooltipContent, NativeTooltipContentProps, NativeTooltipProps, NativeTooltipTrigger, NativeTooltipTriggerProps, SpaceToken, SpacingPrefix, Stack, StackProps, TextPreset, alertVariants, badgeTextVariants, badgeVariants, buttonTextVariants, buttonVariants, spaceScale, spacingClass, textVariants, toggleVariants, useToast } from './components/index.js';
|
|
2
|
-
export { BrandExtensionsProvider, BrandExtensionsProviderProps, BrandExtensionsValue, ThemeMode, useGenesisExtension, useReducedMotion, useThemeMode } from './hooks/index.js';
|
|
3
|
-
export { AuthBranding, AuthBrandingProps, AuthForm, AuthFormProps, AuthFormValues, ForgotPasswordLink, NavBarSaveButton, NavBarSaveButtonProps, NavBarSearchBar, NavBarSearchBarProps, NavBarTitle, NavBarTitleProps, NotificationItem, NotificationsPage, NotificationsPageProps, SafeAreaEdge, ScreenContainer, ScreenContainerProps, ScreenHeaderProps, ScrollEdgeBehavior, SettingsPage, SettingsPageProps, SettingsPageRow, SettingsPageSection, SettingsSubPage, SettingsSubPageProps, SocialAuthProvider, SocialAuthRow, SocialAuthRowProps, composeHeaderOptions, confirmDiscardChanges, getNotificationsPageStackOptions, getSettingsPageStackOptions, getSettingsSubPageStackOptions } from './layouts/index.js';
|
|
2
|
+
export { BrandExtensionsProvider, BrandExtensionsProviderProps, BrandExtensionsValue, ThemeMode, ThemeRoleColors, UseThemeRolesOptions, useGenesisExtension, useReducedMotion, useThemeMode, useThemeRoles } from './hooks/index.js';
|
|
3
|
+
export { AuthBranding, AuthBrandingProps, AuthForm, AuthFormProps, AuthFormValues, AuthScreen, AuthScreenProps, AuthScreenSlotMap, ForgotPasswordLink, KeyboardScrollProps, KeyboardScrollProvider, NavBarSaveButton, NavBarSaveButtonProps, NavBarSearchBar, NavBarSearchBarProps, NavBarTitle, NavBarTitleProps, NotificationItem, NotificationsPage, NotificationsPageProps, NotificationsPageSlotMap, SafeAreaEdge, ScreenContainer, ScreenContainerProps, ScreenHeaderProps, ScrollEdgeBehavior, SettingsPage, SettingsPageDangerousAction, SettingsPageProps, SettingsPageRow, SettingsPageSection, SettingsPageSlotMap, SettingsSubPage, SettingsSubPageProps, SocialAuthProvider, SocialAuthRow, SocialAuthRowProps, composeHeaderOptions, confirmDiscardChanges, getNotificationsPageStackOptions, getSettingsPageStackOptions, getSettingsSubPageStackOptions, useKeyboardScroll } from './layouts/index.js';
|
|
4
4
|
export { cn } from './utils.js';
|
|
5
5
|
import 'react';
|
|
6
6
|
import 'class-variance-authority/types';
|
|
7
7
|
import 'class-variance-authority';
|
|
8
8
|
import 'react-native';
|
|
9
9
|
import '@marktiderman/genesis-design-system';
|
|
10
|
+
import '@marktiderman/genesis-core/slots';
|
|
10
11
|
import 'clsx';
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export { Box, Grid, Inline, NativeAccordion, NativeAccordionContent, NativeAccordionItem, NativeAccordionTrigger, NativeAvatar, NativeBanner, NativeChip, NativeChipGroup, NativeCombobox, NativeDatePicker, NativeDialog, NativeDialogContent, NativeDialogDescription, NativeDialogFooter, NativeDialogHeader, NativeDialogTitle, NativeDrawer, NativeDropdownMenu, NativeDropdownMenuContent, NativeDropdownMenuItem, NativeDropdownMenuTrigger, NativeHeaderCard, NativeInlineAlert, NativeNumberInput, NativePagination, NativePopover, NativePopoverContent, NativePopoverTrigger, NativeProgress, NativeRadioGroup, NativeRadioGroupItem, NativeRangeSlider, NativeRefreshControl, NativeSearchBar, NativeSegmentedControl, NativeSheet, NativeSlider, NativeStepper, NativeTabs, NativeTabsContent, NativeTabsList, NativeTabsTrigger, NativeTimePicker, NativeToastProvider, NativeToggle, NativeTooltip, NativeTooltipContent, NativeTooltipTrigger, Stack, spaceScale, spacingClass, toggleVariants, useToast } from './chunk-TXJT55JC.js';
|
|
2
2
|
export { NativeAlert, NativeAlertDescription, NativeAlertTitle, NativeBadge, NativeCard, NativeCardContent, NativeCardDescription, NativeCardFooter, NativeCardHeader, NativeCardTitle, NativeCheckbox, NativeLabel, NativeSelect, NativeSelectContent, NativeSelectItem, NativeSelectTrigger, NativeSeparator, NativeSkeleton, NativeSwitch, NativeTextarea, alertVariants, badgeTextVariants, badgeVariants } from './chunk-3LK5ZJ4M.js';
|
|
3
|
-
export { BrandExtensionsProvider, useGenesisExtension, useReducedMotion } from './chunk-
|
|
4
|
-
export { AuthBranding, AuthForm, ForgotPasswordLink, NavBarSaveButton, NavBarSearchBar, NavBarTitle, NotificationsPage, ScreenContainer, SettingsPage, SettingsSubPage, SocialAuthRow, composeHeaderOptions, confirmDiscardChanges, getNotificationsPageStackOptions, getSettingsPageStackOptions, getSettingsSubPageStackOptions } from './chunk-
|
|
3
|
+
export { BrandExtensionsProvider, useGenesisExtension, useReducedMotion } from './chunk-F2TGDKOO.js';
|
|
4
|
+
export { AuthBranding, AuthForm, AuthScreen, ForgotPasswordLink, KeyboardScrollProvider, NavBarSaveButton, NavBarSearchBar, NavBarTitle, NotificationsPage, ScreenContainer, SettingsPage, SettingsSubPage, SocialAuthRow, composeHeaderOptions, confirmDiscardChanges, getNotificationsPageStackOptions, getSettingsPageStackOptions, getSettingsSubPageStackOptions, useKeyboardScroll } from './chunk-U2SPACTV.js';
|
|
5
5
|
export { NativeEmptyState, NativeListItem, NativeListItemDivider, NativeSectionListHeader } from './chunk-ULS7I6ZS.js';
|
|
6
6
|
export { NativeButton, NativeInput, NativeText, buttonTextVariants, buttonVariants, textVariants } from './chunk-5HRGIA6F.js';
|
|
7
|
-
export { useThemeMode } from './chunk-
|
|
7
|
+
export { useThemeMode, useThemeRoles } from './chunk-Z3AQYVUA.js';
|
|
8
8
|
export { cn } from './chunk-OHZD7KRO.js';
|
|
9
9
|
import './chunk-DGUM43GV.js';
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
package/dist/layouts/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
2
|
+
import { ReactNode, ComponentType } from 'react';
|
|
3
|
+
import { ViewStyle } from 'react-native';
|
|
4
|
+
import { Slots, SlotPropsFor } from '@marktiderman/genesis-core/slots';
|
|
3
5
|
|
|
4
6
|
type SafeAreaEdge = "top" | "bottom" | "left" | "right";
|
|
5
7
|
type ScrollEdgeBehavior = "match" | "transparent" | "opaque";
|
|
@@ -31,6 +33,8 @@ interface ScreenContainerProps {
|
|
|
31
33
|
* Only used when `scroll` is true.
|
|
32
34
|
*/
|
|
33
35
|
keyboardShouldPersistTaps?: "always" | "never" | "handled";
|
|
36
|
+
/** Style on the root, e.g. a theme-role background color. */
|
|
37
|
+
style?: ViewStyle;
|
|
34
38
|
/** testID on the root container. */
|
|
35
39
|
testID?: string;
|
|
36
40
|
}
|
|
@@ -69,7 +73,7 @@ interface ScreenHeaderProps {
|
|
|
69
73
|
* return <><Stack.Screen options={opts} /><ScreenContainer>...</ScreenContainer></>;
|
|
70
74
|
*/
|
|
71
75
|
declare function composeHeaderOptions(props: ScreenHeaderProps): Record<string, unknown>;
|
|
72
|
-
declare function ScreenContainer({ children, scroll, safeAreaEdges, statusBar, themeMode, className, contentClassName, keyboardShouldPersistTaps, testID, }: ScreenContainerProps): react.JSX.Element;
|
|
76
|
+
declare function ScreenContainer({ children, scroll, safeAreaEdges, statusBar, themeMode, className, contentClassName, keyboardShouldPersistTaps, style, testID, }: ScreenContainerProps): react.JSX.Element;
|
|
73
77
|
|
|
74
78
|
interface NavBarSaveButtonProps {
|
|
75
79
|
/** Press handler. Disabled when not provided OR when `disabled`/`loading`. */
|
|
@@ -143,6 +147,32 @@ interface SettingsPageSection {
|
|
|
143
147
|
/** Rows in render order. */
|
|
144
148
|
rows: SettingsPageRow[];
|
|
145
149
|
}
|
|
150
|
+
/** A destructive-tone action in the footer, e.g. "Sign out". */
|
|
151
|
+
interface SettingsPageDangerousAction {
|
|
152
|
+
label: string;
|
|
153
|
+
onPress: () => void;
|
|
154
|
+
/** When true, renders with extra emphasis. Default `false`. */
|
|
155
|
+
emphasized?: boolean;
|
|
156
|
+
testID?: string;
|
|
157
|
+
}
|
|
158
|
+
/** The parts of a {@link SettingsPage} that `slots` and `slotProps` reach, with the props each receives. */
|
|
159
|
+
type SettingsPageSlotMap = {
|
|
160
|
+
sectionHeader: {
|
|
161
|
+
title: string;
|
|
162
|
+
testID: string;
|
|
163
|
+
};
|
|
164
|
+
row: SettingsPageRow & {
|
|
165
|
+
testID: string;
|
|
166
|
+
isLast: boolean;
|
|
167
|
+
};
|
|
168
|
+
footnote: {
|
|
169
|
+
text: string;
|
|
170
|
+
};
|
|
171
|
+
dangerousActions: {
|
|
172
|
+
actions: SettingsPageDangerousAction[];
|
|
173
|
+
testID: string;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
146
176
|
interface SettingsPageProps extends ScreenHeaderProps {
|
|
147
177
|
/** Sectioned content. Order is preserved. */
|
|
148
178
|
sections: SettingsPageSection[];
|
|
@@ -150,13 +180,11 @@ interface SettingsPageProps extends ScreenHeaderProps {
|
|
|
150
180
|
* Optional dangerous-action row(s) shown after the last section in a
|
|
151
181
|
* destructive-tone footer. Typical: "Sign out", "Delete account".
|
|
152
182
|
*/
|
|
153
|
-
dangerousActions?:
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
testID?: string;
|
|
159
|
-
}[];
|
|
183
|
+
dangerousActions?: SettingsPageDangerousAction[];
|
|
184
|
+
/** Replace (a component) or drop (`null`) one part. */
|
|
185
|
+
slots?: Slots<SettingsPageSlotMap>;
|
|
186
|
+
/** More props for a default part, merged over what the layout passes. */
|
|
187
|
+
slotProps?: SlotPropsFor<SettingsPageSlotMap>;
|
|
160
188
|
/** Override root container styling. */
|
|
161
189
|
className?: string;
|
|
162
190
|
/** testID on the root container. Default `"settings-page"`. */
|
|
@@ -173,7 +201,7 @@ interface SettingsPageProps extends ScreenHeaderProps {
|
|
|
173
201
|
declare function getSettingsPageStackOptions(props: ScreenHeaderProps & {
|
|
174
202
|
headerTitle?: string;
|
|
175
203
|
}): Record<string, unknown>;
|
|
176
|
-
declare function SettingsPage({ sections, dangerousActions, className, testID, children, }: SettingsPageProps): react.JSX.Element;
|
|
204
|
+
declare function SettingsPage({ sections, dangerousActions, className, testID, children, slots, slotProps, }: SettingsPageProps): react.JSX.Element;
|
|
177
205
|
|
|
178
206
|
interface SettingsSubPageProps extends ScreenHeaderProps {
|
|
179
207
|
/** Form / detail body content. Pass any node tree. */
|
|
@@ -246,6 +274,20 @@ interface NotificationItem {
|
|
|
246
274
|
/** testID override. Falls back to `notifications-row-<id>`. */
|
|
247
275
|
testID?: string;
|
|
248
276
|
}
|
|
277
|
+
/** The parts of a {@link NotificationsPage} that `slots` and `slotProps` reach. */
|
|
278
|
+
type NotificationsPageSlotMap = {
|
|
279
|
+
sectionHeader: {
|
|
280
|
+
title: string;
|
|
281
|
+
};
|
|
282
|
+
row: NotificationItem & {
|
|
283
|
+
testID: string;
|
|
284
|
+
};
|
|
285
|
+
empty: {
|
|
286
|
+
title: string;
|
|
287
|
+
body: string;
|
|
288
|
+
testID: string;
|
|
289
|
+
};
|
|
290
|
+
};
|
|
249
291
|
interface NotificationsPageProps extends ScreenHeaderProps {
|
|
250
292
|
/** Notification items. Empty array → empty state. */
|
|
251
293
|
items: NotificationItem[];
|
|
@@ -255,8 +297,12 @@ interface NotificationsPageProps extends ScreenHeaderProps {
|
|
|
255
297
|
onRefresh?: () => void | Promise<void>;
|
|
256
298
|
/** Mark-all-read handler. When provided, exposes a header action. */
|
|
257
299
|
onMarkAllRead?: () => void;
|
|
258
|
-
/** Override the auto-rendered empty state. */
|
|
300
|
+
/** Override the auto-rendered empty state. Prefer `slots.empty`. */
|
|
259
301
|
emptyState?: ReactNode;
|
|
302
|
+
/** Replace (a component) or drop (`null`) one part. */
|
|
303
|
+
slots?: Slots<NotificationsPageSlotMap>;
|
|
304
|
+
/** More props for a default part, merged over what the layout passes. */
|
|
305
|
+
slotProps?: SlotPropsFor<NotificationsPageSlotMap>;
|
|
260
306
|
/** Optional override of the empty-state title. */
|
|
261
307
|
emptyTitle?: string;
|
|
262
308
|
/** Optional override of the empty-state body copy. */
|
|
@@ -280,7 +326,7 @@ declare function getNotificationsPageStackOptions(props: {
|
|
|
280
326
|
headerRight?: ScreenHeaderProps["headerRight"];
|
|
281
327
|
headerOptions?: ScreenHeaderProps["headerOptions"];
|
|
282
328
|
}): Record<string, unknown>;
|
|
283
|
-
declare function NotificationsPage({ items, refreshing, onRefresh, emptyState, emptyTitle, emptyBody, className, testID, }: NotificationsPageProps): react.JSX.Element;
|
|
329
|
+
declare function NotificationsPage({ items, refreshing, onRefresh, emptyState, emptyTitle, emptyBody, className, testID, slots, slotProps, }: NotificationsPageProps): react.JSX.Element;
|
|
284
330
|
|
|
285
331
|
interface AuthBrandingProps {
|
|
286
332
|
/** Brand mark (logo node). */
|
|
@@ -361,4 +407,55 @@ declare function ForgotPasswordLink({ onPress, label, testID, }: {
|
|
|
361
407
|
testID?: string;
|
|
362
408
|
}): react.JSX.Element;
|
|
363
409
|
|
|
364
|
-
|
|
410
|
+
/** The parts of an {@link AuthScreen} that `slots` and `slotProps` reach. */
|
|
411
|
+
type AuthScreenSlotMap = {
|
|
412
|
+
branding: AuthBrandingProps;
|
|
413
|
+
social: {
|
|
414
|
+
providers: SocialAuthProvider[];
|
|
415
|
+
testID: string;
|
|
416
|
+
};
|
|
417
|
+
form: AuthFormProps;
|
|
418
|
+
footer: {
|
|
419
|
+
children: ReactNode;
|
|
420
|
+
testID: string;
|
|
421
|
+
};
|
|
422
|
+
};
|
|
423
|
+
interface AuthScreenProps {
|
|
424
|
+
/** Logo, headline and subhead above everything else. */
|
|
425
|
+
branding?: AuthBrandingProps;
|
|
426
|
+
/** Sign-in providers (Apple, Google…). None: no social row. */
|
|
427
|
+
providers?: SocialAuthProvider[];
|
|
428
|
+
/** The email form. */
|
|
429
|
+
form: AuthFormProps;
|
|
430
|
+
/** Adds a "Forgot password?" link below the fields (password mode only). */
|
|
431
|
+
onForgotPassword?: () => void;
|
|
432
|
+
/** Below the form: terms, a sign-up link. */
|
|
433
|
+
footer?: ReactNode;
|
|
434
|
+
/** Replace (a component) or drop (`null`) one part. */
|
|
435
|
+
slots?: Slots<AuthScreenSlotMap>;
|
|
436
|
+
/** More props for a default part, merged over what the screen passes. */
|
|
437
|
+
slotProps?: SlotPropsFor<AuthScreenSlotMap>;
|
|
438
|
+
/** testID on the root container. Default `"auth-screen"`. */
|
|
439
|
+
testID?: string;
|
|
440
|
+
}
|
|
441
|
+
declare function AuthScreen({ branding, providers, form, onForgotPassword, footer, slots, slotProps, testID, }: AuthScreenProps): react.JSX.Element;
|
|
442
|
+
|
|
443
|
+
/** The props Genesis passes to a keyboard-aware scroll view. */
|
|
444
|
+
interface KeyboardScrollProps {
|
|
445
|
+
children?: ReactNode;
|
|
446
|
+
testID?: string;
|
|
447
|
+
keyboardShouldPersistTaps?: "always" | "never" | "handled";
|
|
448
|
+
contentContainerStyle?: ViewStyle;
|
|
449
|
+
/** iOS: inset content under a translucent or large-title header, as `ScreenContainer` does. */
|
|
450
|
+
contentInsetAdjustmentBehavior?: "automatic" | "scrollableAxes" | "never" | "always";
|
|
451
|
+
/** Extra space between the focused input and the keyboard. */
|
|
452
|
+
bottomOffset?: number;
|
|
453
|
+
}
|
|
454
|
+
declare function KeyboardScrollProvider({ component, children }: {
|
|
455
|
+
component: ComponentType<KeyboardScrollProps>;
|
|
456
|
+
children: ReactNode;
|
|
457
|
+
}): react.FunctionComponentElement<react.ProviderProps<ComponentType<KeyboardScrollProps> | null>>;
|
|
458
|
+
/** The app's keyboard-aware scroll view, or null when none was provided. */
|
|
459
|
+
declare function useKeyboardScroll(): ComponentType<KeyboardScrollProps> | null;
|
|
460
|
+
|
|
461
|
+
export { AuthBranding, type AuthBrandingProps, AuthForm, type AuthFormProps, type AuthFormValues, AuthScreen, type AuthScreenProps, type AuthScreenSlotMap, ForgotPasswordLink, type KeyboardScrollProps, KeyboardScrollProvider, NavBarSaveButton, type NavBarSaveButtonProps, NavBarSearchBar, type NavBarSearchBarProps, NavBarTitle, type NavBarTitleProps, type NotificationItem, NotificationsPage, type NotificationsPageProps, type NotificationsPageSlotMap, type SafeAreaEdge, ScreenContainer, type ScreenContainerProps, type ScreenHeaderProps, type ScrollEdgeBehavior, SettingsPage, type SettingsPageDangerousAction, type SettingsPageProps, type SettingsPageRow, type SettingsPageSection, type SettingsPageSlotMap, SettingsSubPage, type SettingsSubPageProps, type SocialAuthProvider, SocialAuthRow, type SocialAuthRowProps, composeHeaderOptions, confirmDiscardChanges, getNotificationsPageStackOptions, getSettingsPageStackOptions, getSettingsSubPageStackOptions, useKeyboardScroll };
|
package/dist/layouts/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { AuthBranding, AuthForm, ForgotPasswordLink, NavBarSaveButton, NavBarSearchBar, NavBarTitle, NotificationsPage, ScreenContainer, SettingsPage, SettingsSubPage, SocialAuthRow, composeHeaderOptions, confirmDiscardChanges, getNotificationsPageStackOptions, getSettingsPageStackOptions, getSettingsSubPageStackOptions } from '../chunk-
|
|
1
|
+
export { AuthBranding, AuthForm, AuthScreen, ForgotPasswordLink, KeyboardScrollProvider, NavBarSaveButton, NavBarSearchBar, NavBarTitle, NotificationsPage, ScreenContainer, SettingsPage, SettingsSubPage, SocialAuthRow, composeHeaderOptions, confirmDiscardChanges, getNotificationsPageStackOptions, getSettingsPageStackOptions, getSettingsSubPageStackOptions, useKeyboardScroll } from '../chunk-U2SPACTV.js';
|
|
2
2
|
import '../chunk-ULS7I6ZS.js';
|
|
3
3
|
import '../chunk-5HRGIA6F.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-Z3AQYVUA.js';
|
|
5
5
|
import '../chunk-OHZD7KRO.js';
|
|
6
6
|
import '../chunk-DGUM43GV.js';
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marktiderman/genesis-ui-native",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -25,13 +25,6 @@
|
|
|
25
25
|
"src",
|
|
26
26
|
"README.md"
|
|
27
27
|
],
|
|
28
|
-
"scripts": {
|
|
29
|
-
"build": "tsup",
|
|
30
|
-
"dev": "tsup --watch",
|
|
31
|
-
"clean": "rm -rf dist",
|
|
32
|
-
"typecheck": "tsc --noEmit",
|
|
33
|
-
"test": "vitest run"
|
|
34
|
-
},
|
|
35
28
|
"exports": {
|
|
36
29
|
".": {
|
|
37
30
|
"types": "./dist/index.d.ts",
|
|
@@ -70,8 +63,8 @@
|
|
|
70
63
|
"@gorhom/bottom-sheet": ">=5.0.0",
|
|
71
64
|
"@hookform/resolvers": "^3.0.0 || ^4.0.0 || ^5.0.0",
|
|
72
65
|
"@react-native-community/datetimepicker": ">=8.0.0",
|
|
73
|
-
"@marktiderman/genesis-core": "
|
|
74
|
-
"@marktiderman/genesis-design-system": "
|
|
66
|
+
"@marktiderman/genesis-core": "^1.7.0",
|
|
67
|
+
"@marktiderman/genesis-design-system": "^1.4.0",
|
|
75
68
|
"@tanstack/react-query": "^5.0.0",
|
|
76
69
|
"clsx": "^2.0.0",
|
|
77
70
|
"expo-haptics": ">=14.0.0",
|
|
@@ -81,7 +74,7 @@
|
|
|
81
74
|
"react-hook-form": "^7.0.0",
|
|
82
75
|
"react-native": ">=0.76.0",
|
|
83
76
|
"react-native-gesture-handler": ">=2.0.0",
|
|
84
|
-
"react-native-keyboard-controller": ">=1.
|
|
77
|
+
"react-native-keyboard-controller": ">=1.11.0",
|
|
85
78
|
"react-native-reanimated": ">=3.0.0",
|
|
86
79
|
"react-native-safe-area-context": ">=4.0.0",
|
|
87
80
|
"tailwind-merge": "^3.0.0",
|
|
@@ -116,12 +109,19 @@
|
|
|
116
109
|
"devDependencies": {
|
|
117
110
|
"@testing-library/react": "^16.3.2",
|
|
118
111
|
"@types/react": "^19.2.14",
|
|
119
|
-
"@vitest/coverage-v8": "^
|
|
112
|
+
"@vitest/coverage-v8": "^4.1.12",
|
|
120
113
|
"happy-dom": "^20.9.0",
|
|
121
114
|
"react": "^19.2.5",
|
|
122
115
|
"react-dom": "^19.2.5",
|
|
123
116
|
"tsup": "^8.3.0",
|
|
124
117
|
"typescript": "^5.9.3",
|
|
125
|
-
"vitest": "^
|
|
118
|
+
"vitest": "^4.1.12"
|
|
119
|
+
},
|
|
120
|
+
"scripts": {
|
|
121
|
+
"build": "tsup",
|
|
122
|
+
"dev": "tsup --watch",
|
|
123
|
+
"clean": "rm -rf dist",
|
|
124
|
+
"typecheck": "tsc --noEmit",
|
|
125
|
+
"test": "vitest run"
|
|
126
126
|
}
|
|
127
|
-
}
|
|
127
|
+
}
|