@marktiderman/genesis-ui-native 2.0.0 → 2.0.1
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-ZVF6PONU.js → chunk-3LK5ZJ4M.js} +17 -6
- package/dist/chunk-3LK5ZJ4M.js.map +1 -0
- package/dist/{chunk-PTJ2KCLM.js → chunk-5HRGIA6F.js} +4 -3
- package/dist/chunk-5HRGIA6F.js.map +1 -0
- package/dist/{chunk-BAU4YQZV.js → chunk-OMTXD7ND.js} +5 -4
- package/dist/chunk-OMTXD7ND.js.map +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +2 -2
- package/dist/data/index.js +2 -2
- package/dist/index.js +3 -3
- package/dist/layouts/index.js +2 -2
- package/package.json +2 -2
- package/src/components/__tests__/badge.test.tsx +60 -0
- package/src/components/__tests__/layout.test.tsx +1 -1
- package/src/components/badge.tsx +13 -3
- package/src/components/index.ts +1 -1
- package/src/components/input.tsx +2 -1
- package/src/components/layout/index.ts +1 -1
- package/src/components/text.tsx +7 -0
- package/src/components/textarea.tsx +2 -1
- package/src/layouts/nav-bar.tsx +2 -1
- package/dist/chunk-BAU4YQZV.js.map +0 -1
- package/dist/chunk-PTJ2KCLM.js.map +0 -1
- package/dist/chunk-ZVF6PONU.js.map +0 -1
|
@@ -3,6 +3,7 @@ import { View, Text, Animated, AccessibilityInfo, Easing, Pressable, Modal, Swit
|
|
|
3
3
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
5
|
import { createContext, useRef, useState, useEffect, useContext } from 'react';
|
|
6
|
+
import { nativeColors } from '@marktiderman/genesis-design-system/tokens/native';
|
|
6
7
|
|
|
7
8
|
function NativeCard({ className, children, ...props }) {
|
|
8
9
|
return /* @__PURE__ */ jsx(
|
|
@@ -103,9 +104,19 @@ var badgeTextVariants = cva("text-xs font-medium", {
|
|
|
103
104
|
secondary: "text-secondary-foreground",
|
|
104
105
|
destructive: "text-destructive-foreground",
|
|
105
106
|
outline: "text-foreground",
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
// AA-safe status text on the /15 tint. The bare status token
|
|
108
|
+
// (text-success ~2.2:1) fails WCAG AA. The `-dark` stop is optional in
|
|
109
|
+
// the brand schema (only `status.*.DEFAULT` is required) AND regresses
|
|
110
|
+
// dark mode — a dark shade on the dark-surface tint drops to ~1.7–2.6:1.
|
|
111
|
+
// Instead use the semantic Tailwind ramp (always present, brand-
|
|
112
|
+
// independent, same hues as the Genesis status tokens) with a `dark:`
|
|
113
|
+
// stop. Measured: light /15 tint emerald-700 4.76 / amber-800 6.32 /
|
|
114
|
+
// blue-700 5.64; dark-surface tint emerald-300 ≥8.2 / amber-200 ≥10.8 /
|
|
115
|
+
// blue-300 ≥8.2 — AA in both modes across the static preset and the
|
|
116
|
+
// themeFromBrand() runtime dark map.
|
|
117
|
+
success: "text-emerald-700 dark:text-emerald-300",
|
|
118
|
+
warning: "text-amber-800 dark:text-amber-200",
|
|
119
|
+
info: "text-blue-700 dark:text-blue-300",
|
|
109
120
|
muted: "text-muted-foreground"
|
|
110
121
|
}
|
|
111
122
|
},
|
|
@@ -509,7 +520,7 @@ function NativeTextarea({
|
|
|
509
520
|
multiline: true,
|
|
510
521
|
numberOfLines: rows,
|
|
511
522
|
editable,
|
|
512
|
-
placeholderTextColor: placeholderTextColor ??
|
|
523
|
+
placeholderTextColor: placeholderTextColor ?? nativeColors.neutral[400],
|
|
513
524
|
...props
|
|
514
525
|
}
|
|
515
526
|
),
|
|
@@ -518,5 +529,5 @@ function NativeTextarea({
|
|
|
518
529
|
}
|
|
519
530
|
|
|
520
531
|
export { NativeAlert, NativeAlertDescription, NativeAlertTitle, NativeBadge, NativeCard, NativeCardContent, NativeCardDescription, NativeCardFooter, NativeCardHeader, NativeCardTitle, NativeCheckbox, NativeLabel, NativeSelect, NativeSelectContent, NativeSelectItem, NativeSelectTrigger, NativeSeparator, NativeSkeleton, NativeSwitch, NativeTextarea, alertVariants, badgeTextVariants, badgeVariants };
|
|
521
|
-
//# sourceMappingURL=chunk-
|
|
522
|
-
//# sourceMappingURL=chunk-
|
|
532
|
+
//# sourceMappingURL=chunk-3LK5ZJ4M.js.map
|
|
533
|
+
//# sourceMappingURL=chunk-3LK5ZJ4M.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/card.tsx","../src/components/badge.tsx","../src/components/separator.tsx","../src/components/skeleton.tsx","../src/components/alert.tsx","../src/components/checkbox.tsx","../src/components/label.tsx","../src/components/select.tsx","../src/components/switch.tsx","../src/components/textarea.tsx"],"names":["jsx","View","Text","cva","useState","Pressable","jsxs"],"mappings":";;;;;;;AAcA,SAAS,WAAW,EAAE,SAAA,EAAW,QAAA,EAAU,GAAG,OAAM,EAAoB;AACtE,EAAA,uBACE,GAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA;AAAA,QACT,uDAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG,KAAA;AAAA,MAEH;AAAA;AAAA,GACH;AAEJ;AAEA,SAAS,gBAAA,CAAiB;AAAA,EACxB,SAAA;AAAA,EACA,QAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAoB;AAClB,EAAA,uBACE,GAAA,CAAC,QAAK,SAAA,EAAW,EAAA,CAAG,wBAAwB,SAAS,CAAA,EAAI,GAAG,KAAA,EACzD,QAAA,EACH,CAAA;AAEJ;AAQA,SAAS,eAAA,CAAgB;AAAA,EACvB,SAAA;AAAA,EACA,QAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAyB;AACvB,EAAA,uBACE,GAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA;AAAA,QACT,yEAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG,KAAA;AAAA,MAEH;AAAA;AAAA,GACH;AAEJ;AAQA,SAAS,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AA,QACrE,GAAG;AAAA;AAAA,KACN;AAAA,IACC,KAAA,mBACCA,GAAAA,CAACE,IAAAA,EAAA,EAAK,SAAA,EAAU,0BAAA,EAA4B,iBAAM,CAAA,GAChD;AAAA,GAAA,EACN,CAAA;AAEJ","file":"chunk-3LK5ZJ4M.js","sourcesContent":["/**\n * Card — flat container surface. The 90% case is `<Card>{children}</Card>`. See HeaderCard for structured layouts.\n *\n * @stability Stable\n */\nimport { Text, View } from \"react-native\";\nimport { cn } from \"../utils\";\n\nexport interface NativeCardProps {\n className?: string;\n children?: React.ReactNode;\n testID?: string;\n}\n\nfunction NativeCard({ className, children, ...props }: NativeCardProps) {\n return (\n <View\n className={cn(\n \"rounded-xl border border-border bg-card p-0 shadow-sm\",\n className\n )}\n {...props}\n >\n {children}\n </View>\n );\n}\n\nfunction NativeCardHeader({\n className,\n children,\n ...props\n}: NativeCardProps) {\n return (\n <View className={cn(\"flex-col gap-1.5 p-6\", className)} {...props}>\n {children}\n </View>\n );\n}\n\nexport interface NativeCardTitleProps {\n className?: string;\n children?: React.ReactNode;\n testID?: string;\n}\n\nfunction NativeCardTitle({\n className,\n children,\n ...props\n}: NativeCardTitleProps) {\n return (\n <Text\n className={cn(\n \"text-2xl font-semibold leading-none tracking-tight text-card-foreground\",\n className\n )}\n {...props}\n >\n {children}\n </Text>\n );\n}\n\nexport interface NativeCardDescriptionProps {\n className?: string;\n children?: React.ReactNode;\n testID?: string;\n}\n\nfunction NativeCardDescription({\n className,\n children,\n ...props\n}: NativeCardDescriptionProps) {\n return (\n <Text\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n >\n {children}\n </Text>\n );\n}\n\nfunction NativeCardContent({\n className,\n children,\n ...props\n}: NativeCardProps) {\n return (\n <View className={cn(\"p-6 pt-0\", className)} {...props}>\n {children}\n </View>\n );\n}\n\nfunction NativeCardFooter({\n className,\n children,\n ...props\n}: NativeCardProps) {\n return (\n <View\n className={cn(\"flex-row items-center p-6 pt-0\", className)}\n {...props}\n >\n {children}\n </View>\n );\n}\n\nexport {\n NativeCard,\n NativeCardHeader,\n NativeCardTitle,\n NativeCardDescription,\n NativeCardContent,\n NativeCardFooter,\n};\n","/**\n * Badge — compact status / count / category tag.\n *\n * @stability Stable\n */\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport { Text, View } from \"react-native\";\nimport { cn } from \"../utils\";\n\nconst badgeVariants = cva(\n \"flex-row items-center self-start rounded-full border px-2.5 py-0.5\",\n {\n variants: {\n variant: {\n default: \"border-transparent bg-primary\",\n secondary: \"border-transparent bg-secondary\",\n destructive: \"border-transparent bg-destructive\",\n outline: \"border-border bg-transparent\",\n success: \"border-transparent bg-success/15\",\n warning: \"border-transparent bg-warning/15\",\n info: \"border-transparent bg-info/15\",\n muted: \"border-transparent bg-muted\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n);\n\nconst badgeTextVariants = cva(\"text-xs font-medium\", {\n variants: {\n variant: {\n default: \"text-primary-foreground\",\n secondary: \"text-secondary-foreground\",\n destructive: \"text-destructive-foreground\",\n outline: \"text-foreground\",\n // AA-safe status text on the /15 tint. The bare status token\n // (text-success ~2.2:1) fails WCAG AA. The `-dark` stop is optional in\n // the brand schema (only `status.*.DEFAULT` is required) AND regresses\n // dark mode — a dark shade on the dark-surface tint drops to ~1.7–2.6:1.\n // Instead use the semantic Tailwind ramp (always present, brand-\n // independent, same hues as the Genesis status tokens) with a `dark:`\n // stop. Measured: light /15 tint emerald-700 4.76 / amber-800 6.32 /\n // blue-700 5.64; dark-surface tint emerald-300 ≥8.2 / amber-200 ≥10.8 /\n // blue-300 ≥8.2 — AA in both modes across the static preset and the\n // themeFromBrand() runtime dark map.\n success: \"text-emerald-700 dark:text-emerald-300\",\n warning: \"text-amber-800 dark:text-amber-200\",\n info: \"text-blue-700 dark:text-blue-300\",\n muted: \"text-muted-foreground\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n});\n\nexport interface NativeBadgeProps\n extends VariantProps<typeof badgeVariants> {\n className?: string;\n textClassName?: string;\n children: React.ReactNode;\n accessibilityLabel?: string;\n testID?: string;\n}\n\nfunction NativeBadge({\n className,\n textClassName,\n variant,\n children,\n ...props\n}: NativeBadgeProps) {\n return (\n <View className={cn(badgeVariants({ variant }), className)} accessibilityRole=\"text\" {...props}>\n {typeof children === \"string\" ? (\n <Text\n className={cn(badgeTextVariants({ variant }), textClassName)}\n >\n {children}\n </Text>\n ) : (\n children\n )}\n </View>\n );\n}\n\nexport { NativeBadge, badgeVariants, badgeTextVariants };\n","/**\n * Separator — visual divider line (horizontal or vertical).\n *\n * @stability Stable\n */\nimport { View, type ViewProps } from \"react-native\";\nimport { cn } from \"../utils\";\n\nexport interface NativeSeparatorProps extends ViewProps {\n orientation?: \"horizontal\" | \"vertical\";\n}\n\nfunction NativeSeparator({\n className,\n orientation = \"horizontal\",\n ...props\n}: NativeSeparatorProps) {\n return (\n <View\n className={cn(\n \"bg-border\",\n orientation === \"horizontal\" ? \"h-px w-full\" : \"h-full w-px\",\n className\n )}\n accessibilityRole=\"none\"\n {...props}\n />\n );\n}\n\nexport { NativeSeparator };\n","/**\n * Skeleton — loading placeholder block.\n *\n * @stability Stable\n */\nimport { useEffect, useRef, useState } from \"react\";\nimport { AccessibilityInfo, Animated, Easing } from \"react-native\";\nimport { cn } from \"../utils\";\n\nexport interface NativeSkeletonProps {\n className?: string;\n /**\n * Width of the skeleton. Use className for NativeWind sizing instead\n * when possible (e.g. className=\"w-24 h-4\").\n */\n width?: number;\n height?: number;\n /** Shorthand that sets both width and height (useful for circle skeletons). */\n size?: number;\n circle?: boolean;\n testID?: string;\n}\n\nfunction NativeSkeleton({\n className,\n width,\n height,\n size,\n circle,\n ...props\n}: NativeSkeletonProps) {\n const opacity = useRef(new Animated.Value(0.3)).current;\n const [reduceMotion, setReduceMotion] = useState(false);\n\n useEffect(() => {\n let cancelled = false;\n AccessibilityInfo.isReduceMotionEnabled()\n .then((enabled) => {\n if (!cancelled) setReduceMotion(enabled);\n })\n .catch(() => {\n // Defensive: some RN runtimes (web, older Android) reject when\n // the AccessibilityManager isn't wired up. Fall back to \"no\n // reduce-motion\" so the skeleton still animates rather than\n // crashing the host screen with an unhandled rejection.\n if (!cancelled) setReduceMotion(false);\n });\n const sub = AccessibilityInfo.addEventListener(\n \"reduceMotionChanged\",\n (enabled) => setReduceMotion(enabled),\n );\n return () => {\n cancelled = true;\n sub.remove();\n };\n }, []);\n\n useEffect(() => {\n if (reduceMotion) {\n // Hold the skeleton at a static, legible opacity instead of\n // pulsing — required by visual-regression flow `screenshot-\n // reduced-motion.yaml` and by users with vestibular-motion\n // sensitivity (Apple HIG / WCAG 2.3.3).\n opacity.setValue(0.6);\n return;\n }\n const animation = Animated.loop(\n Animated.sequence([\n Animated.timing(opacity, {\n toValue: 1,\n duration: 1000,\n easing: Easing.inOut(Easing.ease),\n useNativeDriver: true,\n }),\n Animated.timing(opacity, {\n toValue: 0.3,\n duration: 1000,\n easing: Easing.inOut(Easing.ease),\n useNativeDriver: true,\n }),\n ])\n );\n animation.start();\n return () => animation.stop();\n }, [opacity, reduceMotion]);\n\n return (\n <Animated.View\n className={cn(\n \"rounded-md bg-muted\",\n circle && \"rounded-full\",\n className\n )}\n style={[\n { opacity },\n (width ?? size) !== undefined ? { width: width ?? size } : undefined,\n (height ?? size) !== undefined ? { height: height ?? size } : undefined,\n ].filter(Boolean) as any[]}\n {...props}\n />\n );\n}\n\nexport { NativeSkeleton };\n","/**\n * Alert — inline status message (info / success / warning / destructive).\n *\n * @stability Stable\n */\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport { Text, View } from \"react-native\";\nimport { cn } from \"../utils\";\n\nconst alertVariants = cva(\n \"rounded-lg border p-4\",\n {\n variants: {\n variant: {\n default: \"border-border bg-background\",\n destructive: \"border-destructive/50 bg-destructive/10\",\n success: \"border-success/50 bg-success/10\",\n warning: \"border-warning/50 bg-warning/10\",\n info: \"border-info/50 bg-info/10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n);\n\nconst alertTitleTextVariants = cva(\"text-base font-semibold leading-6\", {\n variants: {\n variant: {\n default: \"text-foreground\",\n destructive: \"text-destructive\",\n success: \"text-success\",\n warning: \"text-warning\",\n info: \"text-info\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n});\n\nconst alertDescriptionTextVariants = cva(\"text-sm leading-5\", {\n variants: {\n variant: {\n default: \"text-muted-foreground\",\n destructive: \"text-destructive\",\n success: \"text-success\",\n warning: \"text-warning\",\n info: \"text-info\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n});\n\nexport interface NativeAlertProps\n extends VariantProps<typeof alertVariants> {\n className?: string;\n children?: React.ReactNode;\n testID?: string;\n}\n\nfunction NativeAlert({\n className,\n variant,\n children,\n ...props\n}: NativeAlertProps) {\n return (\n <View\n className={cn(alertVariants({ variant }), className)}\n accessibilityRole=\"alert\"\n {...props}\n >\n {children}\n </View>\n );\n}\n\nexport interface NativeAlertTitleProps {\n className?: string;\n children?: React.ReactNode;\n variant?: VariantProps<typeof alertTitleTextVariants>[\"variant\"];\n}\n\nfunction NativeAlertTitle({\n className,\n variant,\n children,\n}: NativeAlertTitleProps) {\n return (\n <Text\n className={cn(alertTitleTextVariants({ variant }), className)}\n >\n {children}\n </Text>\n );\n}\n\nexport interface NativeAlertDescriptionProps {\n className?: string;\n children?: React.ReactNode;\n variant?: VariantProps<typeof alertDescriptionTextVariants>[\"variant\"];\n}\n\nfunction NativeAlertDescription({\n className,\n variant,\n children,\n}: NativeAlertDescriptionProps) {\n return (\n <Text\n className={cn(\n alertDescriptionTextVariants({ variant }),\n \"mt-1\",\n className\n )}\n >\n {children}\n </Text>\n );\n}\n\nexport {\n NativeAlert,\n NativeAlertTitle,\n NativeAlertDescription,\n alertVariants,\n};\n","/**\n * Checkbox — binary on/off control with optional label.\n *\n * @stability Stable\n */\nimport { useState } from \"react\";\nimport { Pressable, View } from \"react-native\";\nimport { cn } from \"../utils\";\n\nexport interface NativeCheckboxProps {\n className?: string;\n checked?: boolean;\n defaultChecked?: boolean;\n onCheckedChange?: (checked: boolean) => void;\n disabled?: boolean;\n testID?: string;\n}\n\nfunction NativeCheckbox({\n className,\n checked: controlledChecked,\n defaultChecked = false,\n onCheckedChange,\n disabled,\n ...props\n}: NativeCheckboxProps) {\n const [uncontrolledChecked, setUncontrolledChecked] =\n useState(defaultChecked);\n const isChecked = controlledChecked ?? uncontrolledChecked;\n\n function handlePress() {\n const next = !isChecked;\n if (controlledChecked === undefined) {\n setUncontrolledChecked(next);\n }\n onCheckedChange?.(next);\n }\n\n return (\n <Pressable\n className={cn(\n \"h-5 w-5 items-center justify-center rounded border border-border\",\n isChecked && \"border-primary bg-primary\",\n disabled && \"opacity-50\",\n className\n )}\n onPress={handlePress}\n disabled={disabled}\n accessibilityRole=\"checkbox\"\n accessibilityState={{ checked: isChecked }}\n {...props}\n >\n {isChecked ? (\n <View className=\"h-2.5 w-2.5 rounded-sm bg-primary-foreground\" />\n ) : null}\n </Pressable>\n );\n}\n\nexport { NativeCheckbox };\n","/**\n * Label — form-control label, paired via htmlFor / nativeID.\n *\n * @stability Stable\n */\nimport { Text, type TextProps } from \"react-native\";\nimport { cn } from \"../utils\";\n\nexport interface NativeLabelProps extends TextProps {\n children: React.ReactNode;\n disabled?: boolean;\n}\n\nfunction NativeLabel({\n className,\n children,\n disabled,\n ...props\n}: NativeLabelProps) {\n return (\n <Text\n className={cn(\n \"text-sm font-medium text-foreground\",\n disabled && \"opacity-70\",\n className\n )}\n accessibilityState={disabled ? { disabled } : undefined}\n {...props}\n >\n {children}\n </Text>\n );\n}\n\nexport { NativeLabel };\n","/**\n * Select — single-selection dropdown trigger + content.\n *\n * @stability Stable\n */\nimport { createContext, useContext, useState } from \"react\";\nimport { Modal, Pressable, Text, View } from \"react-native\";\nimport { cn } from \"../utils\";\n\ninterface SelectContextValue {\n value: string;\n onValueChange: (value: string) => void;\n open: boolean;\n setOpen: (open: boolean) => void;\n}\n\nconst SelectContext = createContext<SelectContextValue | null>(null);\n\nfunction useSelect() {\n const context = useContext(SelectContext);\n if (!context)\n throw new Error(\"Select components must be used within <NativeSelect>\");\n return context;\n}\n\nexport interface NativeSelectProps {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n children: React.ReactNode;\n}\n\nfunction NativeSelect({\n value: controlledValue,\n defaultValue = \"\",\n onValueChange: controlledOnValueChange,\n children,\n}: NativeSelectProps) {\n const [uncontrolledValue, setUncontrolledValue] = useState(defaultValue);\n const [open, setOpen] = useState(false);\n const value = controlledValue ?? uncontrolledValue;\n const onValueChange = controlledOnValueChange ?? setUncontrolledValue;\n\n return (\n <SelectContext.Provider value={{ value, onValueChange, open, setOpen }}>\n {children}\n </SelectContext.Provider>\n );\n}\n\nexport interface NativeSelectTriggerProps {\n className?: string;\n children?: React.ReactNode;\n placeholder?: string;\n disabled?: boolean;\n testID?: string;\n}\n\nfunction NativeSelectTrigger({\n className,\n children,\n placeholder,\n disabled,\n ...props\n}: NativeSelectTriggerProps) {\n const { value, open, setOpen } = useSelect();\n\n return (\n <Pressable\n className={cn(\n \"h-10 flex-row items-center justify-between rounded-md border border-input bg-background px-3\",\n disabled && \"opacity-50\",\n className\n )}\n onPress={() => setOpen(true)}\n disabled={disabled}\n accessibilityRole=\"button\"\n accessibilityState={{ expanded: open, disabled }}\n {...props}\n >\n {children ?? (\n <Text\n className={cn(\n \"text-sm\",\n value ? \"text-foreground\" : \"text-muted-foreground\"\n )}\n >\n {value || placeholder || \"Select...\"}\n </Text>\n )}\n <Text className=\"text-sm text-muted-foreground\">{\"\\u25BE\"}</Text>\n </Pressable>\n );\n}\n\nexport interface NativeSelectContentProps {\n className?: string;\n children: React.ReactNode;\n}\n\nfunction NativeSelectContent({\n className,\n children,\n}: NativeSelectContentProps) {\n const { open, setOpen } = useSelect();\n\n if (!open) return null;\n\n return (\n <Modal transparent animationType=\"fade\" onRequestClose={() => setOpen(false)}>\n <Pressable className=\"flex-1 items-center justify-center bg-black/50\" onPress={() => setOpen(false)}>\n {/* Intentional no-op: prevents overlay press from closing the modal when touching content area */}\n <Pressable onPress={() => {}}>\n <View\n className={cn(\n \"min-w-[10rem] rounded-md border border-border bg-popover p-1 shadow-md\",\n className\n )}\n >\n {children}\n </View>\n </Pressable>\n </Pressable>\n </Modal>\n );\n}\n\nexport interface NativeSelectItemProps {\n className?: string;\n value: string;\n children: React.ReactNode;\n testID?: string;\n}\n\nfunction NativeSelectItem({\n className,\n value,\n children,\n ...props\n}: NativeSelectItemProps) {\n const { value: selectedValue, onValueChange, setOpen } = useSelect();\n const isSelected = selectedValue === value;\n\n return (\n <Pressable\n className={cn(\n \"flex-row items-center rounded-sm px-2 py-1.5\",\n isSelected && \"bg-accent\",\n className\n )}\n onPress={() => {\n onValueChange(value);\n setOpen(false);\n }}\n {...props}\n >\n {typeof children === \"string\" ? (\n <Text\n className={cn(\n \"text-sm\",\n isSelected ? \"text-accent-foreground\" : \"text-popover-foreground\"\n )}\n >\n {children}\n </Text>\n ) : (\n children\n )}\n </Pressable>\n );\n}\n\nexport {\n NativeSelect,\n NativeSelectTrigger,\n NativeSelectContent,\n NativeSelectItem,\n};\n","/**\n * Switch — boolean toggle (iOS-style).\n *\n * @stability Stable\n */\nimport { Switch, type SwitchProps, View } from \"react-native\";\nimport { cn } from \"../utils\";\n\nexport interface NativeSwitchProps extends SwitchProps {\n className?: string;\n checked?: boolean;\n onCheckedChange?: (checked: boolean) => void;\n}\n\nfunction NativeSwitch({\n className,\n checked,\n onCheckedChange,\n disabled,\n ...props\n}: NativeSwitchProps) {\n return (\n <View className={cn(disabled && \"opacity-50\", className)}>\n <Switch\n value={checked}\n onValueChange={onCheckedChange}\n disabled={disabled}\n accessibilityState={{ checked: checked, disabled }}\n {...props}\n />\n </View>\n );\n}\n\nexport { NativeSwitch };\n","/**\n * Textarea — multi-line text field.\n *\n * @stability Stable\n */\nimport { Text, TextInput, type TextInputProps, View } from \"react-native\";\nimport { nativeColors } from \"@marktiderman/genesis-design-system/tokens/native\";\nimport { cn } from \"../utils\";\n\nexport interface NativeTextareaProps extends TextInputProps {\n className?: string;\n inputClassName?: string;\n label?: string;\n error?: string;\n rows?: number;\n}\n\nfunction NativeTextarea({\n className,\n inputClassName,\n label,\n error,\n editable = true,\n rows = 4,\n placeholderTextColor,\n ...props\n}: NativeTextareaProps) {\n return (\n <View className={cn(\"gap-1.5\", className)}>\n {label ? (\n <Text className=\"text-sm font-medium text-foreground\">{label}</Text>\n ) : null}\n <TextInput\n className={cn(\n \"rounded-md border border-input bg-background px-3 py-2 text-base text-foreground\",\n !editable && \"opacity-50\",\n error && \"border-destructive\",\n inputClassName\n )}\n multiline\n numberOfLines={rows}\n editable={editable}\n placeholderTextColor={placeholderTextColor ?? nativeColors.neutral[400]}\n {...props}\n />\n {error ? (\n <Text className=\"text-sm text-destructive\">{error}</Text>\n ) : null}\n </View>\n );\n}\n\nexport { NativeTextarea };\n"]}
|
|
@@ -2,6 +2,7 @@ import { cn } from './chunk-OHZD7KRO.js';
|
|
|
2
2
|
import { cva } from 'class-variance-authority';
|
|
3
3
|
import { Text, Pressable, ActivityIndicator, View, TextInput } from 'react-native';
|
|
4
4
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
5
|
+
import { nativeColors } from '@marktiderman/genesis-design-system/tokens/native';
|
|
5
6
|
|
|
6
7
|
var textVariants = cva("text-foreground", {
|
|
7
8
|
variants: {
|
|
@@ -146,7 +147,7 @@ function NativeInput({
|
|
|
146
147
|
inputClassName
|
|
147
148
|
),
|
|
148
149
|
editable,
|
|
149
|
-
placeholderTextColor: placeholderTextColor ??
|
|
150
|
+
placeholderTextColor: placeholderTextColor ?? nativeColors.neutral[400],
|
|
150
151
|
accessibilityLabel: label,
|
|
151
152
|
...props
|
|
152
153
|
}
|
|
@@ -156,5 +157,5 @@ function NativeInput({
|
|
|
156
157
|
}
|
|
157
158
|
|
|
158
159
|
export { NativeButton, NativeInput, NativeText, buttonTextVariants, buttonVariants, textVariants };
|
|
159
|
-
//# sourceMappingURL=chunk-
|
|
160
|
-
//# sourceMappingURL=chunk-
|
|
160
|
+
//# sourceMappingURL=chunk-5HRGIA6F.js.map
|
|
161
|
+
//# sourceMappingURL=chunk-5HRGIA6F.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/text.tsx","../src/components/button.tsx","../src/components/input.tsx"],"names":["RNText","cva","jsx","jsxs","Text"],"mappings":";;;;;;AASA,IAAM,YAAA,GAAe,IAAI,iBAAA,EAAmB;AAAA,EAC1C,QAAA,EAAU;AAAA,IACR,MAAA,EAAQ;AAAA,MACN,EAAA,EAAI,8BAAA;AAAA,MACJ,EAAA,EAAI,8BAAA;AAAA,MACJ,EAAA,EAAI,iCAAA;AAAA,MACJ,EAAA,EAAI,iCAAA;AAAA,MACJ,IAAA,EAAM,iCAAA;AAAA,MACN,SAAA,EAAW,+BAAA;AAAA,MACX,OAAA,EAAS,+BAAA;AAAA,MACT,KAAA,EAAO;AAAA;AACT,GACF;AAAA,EACA,eAAA,EAAiB;AAAA,IACf,MAAA,EAAQ;AAAA;AAEZ,CAAC;AA2BD,SAAS,UAAA,CAAW;AAAA,EAClB,SAAA;AAAA,EACA,MAAA;AAAA,EACA,QAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAoB;AAClB,EAAA,uBACE,GAAA;AAAA,IAACA,IAAA;AAAA,IAAA;AAAA,MACC,WAAW,EAAA,CAAG,YAAA,CAAa,EAAE,MAAA,EAAQ,GAAG,SAAS,CAAA;AAAA,MAChD,GAAG,KAAA;AAAA,MAEH;AAAA;AAAA,GACH;AAEJ;ACzDA,IAAM,cAAA,GAAiBC,GAAAA;AAAA,EACrB,iDAAA;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA,QACP,OAAA,EAAS,YAAA;AAAA,QACT,SAAA,EAAW,cAAA;AAAA,QACX,OAAA,EAAS,oCAAA;AAAA,QACT,KAAA,EAAO,gBAAA;AAAA,QACP,W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AAAA,QACtE,kBAAA,EAAoB,KAAA;AAAA,QACnB,GAAG;AAAA;AAAA,KACN;AAAA,IACC,KAAA,mBACCA,GAAAA,CAACE,IAAAA,EAAA,EAAK,SAAA,EAAU,0BAAA,EAA4B,iBAAM,CAAA,GAChD;AAAA,GAAA,EACN,CAAA;AAEJ","file":"chunk-5HRGIA6F.js","sourcesContent":["/**\n * Text — typography primitive with semantic presets (h1, h2, body, caption, etc.).\n *\n * @stability Stable\n */\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport { Text as RNText, type TextProps } from \"react-native\";\nimport { cn } from \"../utils\";\n\nconst textVariants = cva(\"text-foreground\", {\n variants: {\n preset: {\n h1: \"text-3xl font-bold leading-9\",\n h2: \"text-2xl font-bold leading-8\",\n h3: \"text-xl font-semibold leading-7\",\n h4: \"text-lg font-semibold leading-7\",\n body: \"text-base font-normal leading-6\",\n \"body-sm\": \"text-sm font-normal leading-5\",\n caption: \"text-xs font-normal leading-4\",\n label: \"text-sm font-medium leading-5\",\n },\n },\n defaultVariants: {\n preset: \"body\",\n },\n});\n\n// `className` is declared explicitly here — not inherited from react-native's\n// `TextProps` via NativeWind's global augmentation, which does not resolve across\n// the RN / nativewind / react-native-css-interop version matrix. Mirrors every\n// other ui-native primitive (Button, Tooltip, ChipGroup, …); the implementation\n// already consumes `className` below.\nexport interface NativeTextProps\n extends TextProps,\n VariantProps<typeof textVariants> {\n /** NativeWind utility class string applied to the underlying Text. */\n className?: string;\n}\n\n/**\n * Allowed `preset` values on {@link NativeText}. Re-exported as a named type\n * so consumer brand packages can build preset-driven typography APIs without\n * having to reach into `NativeTextProps['preset']` themselves.\n *\n * Example (consumer):\n * ```ts\n * import type { TextPreset } from \"@marktiderman/genesis-ui-native\";\n * function Heading({ as }: { as: TextPreset }) { ... }\n * ```\n */\nexport type TextPreset = NonNullable<NativeTextProps[\"preset\"]>;\n\nfunction NativeText({\n className,\n preset,\n children,\n ...props\n}: NativeTextProps) {\n return (\n <RNText\n className={cn(textVariants({ preset }), className)}\n {...props}\n >\n {children}\n </RNText>\n );\n}\n\nexport { NativeText, textVariants };\n","/**\n * Button — primary touch target. Variants: default, secondary, outline, ghost, destructive.\n *\n * @stability Stable\n */\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport { ActivityIndicator, Pressable, Text } from \"react-native\";\nimport { cn } from \"../utils\";\n\nconst buttonVariants = cva(\n \"flex-row items-center justify-center rounded-md\",\n {\n variants: {\n variant: {\n default: \"bg-primary\",\n secondary: \"bg-secondary\",\n outline: \"border border-input bg-transparent\",\n ghost: \"bg-transparent\",\n destructive: \"bg-destructive\",\n },\n size: {\n sm: \"h-9 px-3 gap-1.5\",\n md: \"h-10 px-4 gap-2\",\n lg: \"h-11 px-8 gap-2\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"md\",\n },\n }\n);\n\nconst buttonTextVariants = cva(\"font-medium text-center\", {\n variants: {\n variant: {\n default: \"text-primary-foreground\",\n secondary: \"text-secondary-foreground\",\n outline: \"text-foreground\",\n ghost: \"text-foreground\",\n destructive: \"text-destructive-foreground\",\n },\n size: {\n sm: \"text-sm\",\n md: \"text-sm\",\n lg: \"text-base\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"md\",\n },\n});\n\nexport interface NativeButtonProps\n extends VariantProps<typeof buttonVariants> {\n className?: string;\n textClassName?: string;\n children: React.ReactNode;\n onPress?: () => void;\n disabled?: boolean;\n loading?: boolean;\n testID?: string;\n}\n\nfunction NativeButton({\n className,\n textClassName,\n variant,\n size,\n children,\n onPress,\n disabled,\n loading,\n ...props\n}: NativeButtonProps) {\n const isDisabled = disabled || loading;\n\n return (\n <Pressable\n className={cn(\n buttonVariants({ variant, size }),\n isDisabled && \"opacity-50\",\n className\n )}\n onPress={onPress}\n disabled={isDisabled}\n accessibilityRole=\"button\"\n accessibilityState={{ disabled: isDisabled, busy: loading }}\n {...props}\n >\n {loading ? (\n <ActivityIndicator\n size=\"small\"\n color={\n variant === \"outline\" || variant === \"ghost\"\n ? undefined\n : \"white\"\n }\n />\n ) : null}\n {typeof children === \"string\" ? (\n <Text\n className={cn(\n buttonTextVariants({ variant, size }),\n textClassName\n )}\n >\n {children}\n </Text>\n ) : (\n children\n )}\n </Pressable>\n );\n}\n\nexport { NativeButton, buttonVariants, buttonTextVariants };\n","/**\n * Input — single-line text field.\n *\n * @stability Stable\n */\nimport { Text, TextInput, type TextInputProps, View } from \"react-native\";\nimport { nativeColors } from \"@marktiderman/genesis-design-system/tokens/native\";\nimport { cn } from \"../utils\";\n\nexport interface NativeInputProps extends TextInputProps {\n className?: string;\n inputClassName?: string;\n label?: string;\n error?: string;\n}\n\nfunction NativeInput({\n className,\n inputClassName,\n label,\n error,\n editable = true,\n placeholderTextColor,\n ...props\n}: NativeInputProps) {\n return (\n <View className={cn(\"gap-1.5\", className)}>\n {label ? (\n <Text className=\"text-sm font-medium text-foreground\">\n {label}\n </Text>\n ) : null}\n <TextInput\n className={cn(\n \"h-10 rounded-md border border-input bg-background px-3 text-base text-foreground\",\n !editable && \"opacity-50\",\n error && \"border-destructive\",\n inputClassName\n )}\n editable={editable}\n placeholderTextColor={placeholderTextColor ?? nativeColors.neutral[400]}\n accessibilityLabel={label}\n {...props}\n />\n {error ? (\n <Text className=\"text-sm text-destructive\">{error}</Text>\n ) : null}\n </View>\n );\n}\n\nexport { NativeInput };\n"]}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { NativeSectionListHeader, NativeListItem, NativeListItemDivider, NativeEmptyState } from './chunk-ULS7I6ZS.js';
|
|
2
|
-
import { NativeText, NativeButton, NativeInput } from './chunk-
|
|
2
|
+
import { NativeText, NativeButton, NativeInput } from './chunk-5HRGIA6F.js';
|
|
3
3
|
import { useThemeMode } from './chunk-N4WHTQIO.js';
|
|
4
4
|
import { cn } from './chunk-OHZD7KRO.js';
|
|
5
5
|
import { ScrollView, View, StatusBar, Pressable, Text, TextInput, Alert, KeyboardAvoidingView, Platform, SectionList, RefreshControl } from 'react-native';
|
|
6
6
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
7
7
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
|
+
import { nativeColors } from '@marktiderman/genesis-design-system/tokens/native';
|
|
8
9
|
import { Fragment, useCallback, useState } from 'react';
|
|
9
10
|
|
|
10
11
|
function composeHeaderOptions(props) {
|
|
@@ -197,7 +198,7 @@ function NavBarSearchBar({
|
|
|
197
198
|
onChangeText,
|
|
198
199
|
onSubmitEditing: onSubmit,
|
|
199
200
|
placeholder,
|
|
200
|
-
placeholderTextColor:
|
|
201
|
+
placeholderTextColor: nativeColors.neutral[400],
|
|
201
202
|
returnKeyType: "search",
|
|
202
203
|
autoCorrect: false,
|
|
203
204
|
autoCapitalize: "none",
|
|
@@ -756,5 +757,5 @@ function ForgotPasswordLink({
|
|
|
756
757
|
}
|
|
757
758
|
|
|
758
759
|
export { AuthBranding, AuthForm, ForgotPasswordLink, NavBarSaveButton, NavBarSearchBar, NavBarTitle, NotificationsPage, ScreenContainer, SettingsPage, SettingsSubPage, SocialAuthRow, composeHeaderOptions, confirmDiscardChanges, getNotificationsPageStackOptions, getSettingsPageStackOptions, getSettingsSubPageStackOptions };
|
|
759
|
-
//# sourceMappingURL=chunk-
|
|
760
|
-
//# sourceMappingURL=chunk-
|
|
760
|
+
//# sourceMappingURL=chunk-OMTXD7ND.js.map
|
|
761
|
+
//# sourceMappingURL=chunk-OMTXD7ND.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/layouts/screen-container.tsx","../src/layouts/nav-bar.tsx","../src/layouts/settings-page.tsx","../src/layouts/settings-sub-page.tsx","../src/layouts/notifications-page.tsx","../src/layouts/auth.tsx"],"names":["jsx","jsxs","View","Pressable","Text","SafeAreaView","useCallback"],"mappings":";;;;;;;;;;AAyGO,SAAS,qBACd,KAAA,EACyB;AACzB,EAAA,MAAM;AAAA,IACJ,WAAA;AAAA,IACA,UAAA;AAAA,IACA,WAAA;AAAA,IAC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AAAA,MAAA;AAAA,QACC,MAAA,EAAQ,GAAG,MAAM,CAAA,OAAA,CAAA;AAAA,QACjB,SAAS,MAAM;AACb,UAAA,KAAK,YAAA,EAAa;AAAA,QACpB,CAAA;AAAA,QACA,SAAS,OAAA,IAAW,UAAA;AAAA,QACpB,UAAU,OAAA,IAAW,UAAA;AAAA,QAEpB,QAAA,EAAA;AAAA;AAAA;AACH,GAAA,EACF,CAAA;AAEJ;AAKO,SAAS,kBAAA,CAAmB;AAAA,EACjC,OAAA;AAAA,EACA,KAAA,GAAQ,kBAAA;AAAA,EACR,MAAA,GAAS;AACX,CAAA,EAIG;AACD,EAAA,uBACEA,GAAAA;AAAA,IAACG,SAAAA;AAAA,IAAA;AAAA,MACC,MAAA;AAAA,MACA,iBAAA,EAAkB,MAAA;AAAA,MAClB,kBAAA,EAAoB,KAAA;AAAA,MACpB,OAAA;AAAA,MACA,OAAA,EAAS,CAAA;AAAA,MACT,SAAA,EAAU,UAAA;AAAA,MAEV,0BAAAH,GAAAA,CAACI,IAAAA,EAAA,EAAK,SAAA,EAAU,oCAAoC,QAAA,EAAA,KAAA,EAAM;AAAA;AAAA,GAC5D;AAEJ","file":"chunk-OMTXD7ND.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 } 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 /** 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 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 >\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 * Layer-2 escape hatch: drop down to `<ScreenContainer>` if the layout\n * structure doesn't fit (see standards/usage-doctrine.md).\n *\n * @stability Beta\n */\nimport { Fragment, type ReactNode } from \"react\";\nimport { View } from \"react-native\";\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\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?: {\n label: string;\n onPress: () => void;\n /** When true, renders with extra emphasis. Default `false`. */\n emphasized?: boolean;\n testID?: string;\n }[];\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}: 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\n return (\n <ScreenContainer\n scroll\n safeAreaEdges={[\"left\", \"right\", \"bottom\"]}\n testID={testID}\n contentClassName=\"pb-8\"\n className={className}\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 <NativeSectionListHeader\n title={section.title}\n testID={`${testID}-section-${section.id}-header`}\n />\n ) : null}\n <View className=\"border-y border-border bg-background\">\n {section.rows.map((row, rowIndex) => (\n <Fragment key={row.id}>\n <NativeListItem\n testID={row.testID ?? `${testID}-row-${row.id}`}\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 {rowIndex < section.rows.length - 1 ? (\n <NativeListItemDivider className=\"ml-4\" />\n ) : null}\n </Fragment>\n ))}\n </View>\n {section.footnote ? (\n <NativeText\n preset=\"body-sm\"\n className=\"px-4 pt-2 text-muted-foreground\"\n >\n {section.footnote}\n </NativeText>\n ) : null}\n </View>\n ))}\n\n {dangerousActions && dangerousActions.length > 0 ? (\n <View\n testID={`${testID}-dangerous-actions`}\n className={cn(\"mt-8 gap-2 px-4\")}\n >\n {dangerousActions.map((action) => (\n <NativeButton\n key={action.label}\n testID={action.testID ?? `${testID}-danger-${slug(action.label)}`}\n variant={action.emphasized ? \"destructive\" : \"outline\"}\n onPress={action.onPress}\n >\n {action.label}\n </NativeButton>\n ))}\n </View>\n ) : null}\n </ScreenContainer>\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 * 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 {\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 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 * Layer-3 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 { type ReactNode } from \"react\";\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\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. */\n emptyState?: ReactNode;\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}: 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 = groupByDate(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 <NativeEmptyState\n variant=\"first-run\"\n title={emptyTitle ?? \"No notifications\"}\n body={\n emptyBody ??\n \"When you get a notification, it'll show up here.\"\n }\n testID={`${testID}-empty`}\n />\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 <NativeSectionListHeader title={section.title} />\n )}\n renderItem={({ item }) => (\n <NativeListItem\n testID={item.testID ?? `${testID}-row-${item.id}`}\n title={item.title}\n subtitle={item.body}\n leading={\n item.leading ?? (\n <UnreadDot\n unread={!!item.unread}\n testID={`${testID}-row-${item.id}-unread`}\n />\n )\n }\n onPress={item.onPress}\n />\n )}\n ItemSeparatorComponent={() => <View className=\"h-px bg-border ml-4\" />}\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 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, 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\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 returnKeyType={isMagic ? \"send\" : \"next\"}\n editable={!loading && !submitting}\n // In magic-link mode the email field is the last input, so the\n // return key dispatches submit. In password mode the next return\n // moves focus to password (default RN behavior); the password\n // field's onSubmitEditing handles the actual send.\n onSubmitEditing={isMagic ? handleSubmit : undefined}\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 testID={`${testID}-password`}\n accessibilityLabel=\"Password\"\n value={password}\n onChangeText={setPassword}\n placeholder=\"••••••••\"\n secureTextEntry\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"]}
|
|
@@ -8,6 +8,8 @@ declare const textVariants: (props?: ({
|
|
|
8
8
|
preset?: "h1" | "h2" | "h3" | "h4" | "body" | "body-sm" | "caption" | "label" | null | undefined;
|
|
9
9
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
10
|
interface NativeTextProps extends TextProps, VariantProps<typeof textVariants> {
|
|
11
|
+
/** NativeWind utility class string applied to the underlying Text. */
|
|
12
|
+
className?: string;
|
|
11
13
|
}
|
|
12
14
|
/**
|
|
13
15
|
* Allowed `preset` values on {@link NativeText}. Re-exported as a named type
|
package/dist/components/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
|
-
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-
|
|
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
3
|
export { NativeEmptyState, NativeListItem, NativeListItemDivider, NativeSectionListHeader } from '../chunk-ULS7I6ZS.js';
|
|
4
|
-
export { NativeButton, NativeInput, NativeText, buttonTextVariants, buttonVariants, textVariants } from '../chunk-
|
|
4
|
+
export { NativeButton, NativeInput, NativeText, buttonTextVariants, buttonVariants, textVariants } from '../chunk-5HRGIA6F.js';
|
|
5
5
|
import '../chunk-OHZD7KRO.js';
|
|
6
6
|
import '../chunk-DGUM43GV.js';
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
package/dist/data/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NativeBadge, NativeCard, NativeCardContent, NativeSeparator, NativeLabel, NativeSwitch, NativeCheckbox, NativeSelect, NativeSelectTrigger, NativeSelectContent, NativeSelectItem, NativeTextarea, NativeAlert, NativeAlertTitle, NativeAlertDescription, NativeSkeleton, NativeCardHeader, NativeCardTitle } from '../chunk-
|
|
2
|
-
import { NativeText, NativeButton, NativeInput } from '../chunk-
|
|
1
|
+
import { NativeBadge, NativeCard, NativeCardContent, NativeSeparator, NativeLabel, NativeSwitch, NativeCheckbox, NativeSelect, NativeSelectTrigger, NativeSelectContent, NativeSelectItem, NativeTextarea, NativeAlert, NativeAlertTitle, NativeAlertDescription, NativeSkeleton, NativeCardHeader, NativeCardTitle } from '../chunk-3LK5ZJ4M.js';
|
|
2
|
+
import { NativeText, NativeButton, NativeInput } from '../chunk-5HRGIA6F.js';
|
|
3
3
|
import '../chunk-OHZD7KRO.js';
|
|
4
4
|
import '../chunk-DGUM43GV.js';
|
|
5
5
|
import { View, ScrollView, Pressable, FlatList } from 'react-native';
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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
|
-
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-
|
|
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
3
|
export { BrandExtensionsProvider, useGenesisExtension, useReducedMotion } from './chunk-HNIEFTEL.js';
|
|
4
|
-
export { AuthBranding, AuthForm, ForgotPasswordLink, NavBarSaveButton, NavBarSearchBar, NavBarTitle, NotificationsPage, ScreenContainer, SettingsPage, SettingsSubPage, SocialAuthRow, composeHeaderOptions, confirmDiscardChanges, getNotificationsPageStackOptions, getSettingsPageStackOptions, getSettingsSubPageStackOptions } from './chunk-
|
|
4
|
+
export { AuthBranding, AuthForm, ForgotPasswordLink, NavBarSaveButton, NavBarSearchBar, NavBarTitle, NotificationsPage, ScreenContainer, SettingsPage, SettingsSubPage, SocialAuthRow, composeHeaderOptions, confirmDiscardChanges, getNotificationsPageStackOptions, getSettingsPageStackOptions, getSettingsSubPageStackOptions } from './chunk-OMTXD7ND.js';
|
|
5
5
|
export { NativeEmptyState, NativeListItem, NativeListItemDivider, NativeSectionListHeader } from './chunk-ULS7I6ZS.js';
|
|
6
|
-
export { NativeButton, NativeInput, NativeText, buttonTextVariants, buttonVariants, textVariants } from './chunk-
|
|
6
|
+
export { NativeButton, NativeInput, NativeText, buttonTextVariants, buttonVariants, textVariants } from './chunk-5HRGIA6F.js';
|
|
7
7
|
export { useThemeMode } from './chunk-N4WHTQIO.js';
|
|
8
8
|
export { cn } from './chunk-OHZD7KRO.js';
|
|
9
9
|
import './chunk-DGUM43GV.js';
|
package/dist/layouts/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { AuthBranding, AuthForm, ForgotPasswordLink, NavBarSaveButton, NavBarSearchBar, NavBarTitle, NotificationsPage, ScreenContainer, SettingsPage, SettingsSubPage, SocialAuthRow, composeHeaderOptions, confirmDiscardChanges, getNotificationsPageStackOptions, getSettingsPageStackOptions, getSettingsSubPageStackOptions } from '../chunk-
|
|
1
|
+
export { AuthBranding, AuthForm, ForgotPasswordLink, NavBarSaveButton, NavBarSearchBar, NavBarTitle, NotificationsPage, ScreenContainer, SettingsPage, SettingsSubPage, SocialAuthRow, composeHeaderOptions, confirmDiscardChanges, getNotificationsPageStackOptions, getSettingsPageStackOptions, getSettingsSubPageStackOptions } from '../chunk-OMTXD7ND.js';
|
|
2
2
|
import '../chunk-ULS7I6ZS.js';
|
|
3
|
-
import '../chunk-
|
|
3
|
+
import '../chunk-5HRGIA6F.js';
|
|
4
4
|
import '../chunk-N4WHTQIO.js';
|
|
5
5
|
import '../chunk-OHZD7KRO.js';
|
|
6
6
|
import '../chunk-DGUM43GV.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marktiderman/genesis-ui-native",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"tailwind-merge": "^3.0.0",
|
|
79
79
|
"zod": "^3.0.0 || ^4.0.0",
|
|
80
80
|
"@marktiderman/genesis-core": "^1.0.0",
|
|
81
|
-
"@marktiderman/genesis-design-system": "^1.
|
|
81
|
+
"@marktiderman/genesis-design-system": "^1.1.0"
|
|
82
82
|
},
|
|
83
83
|
"peerDependenciesMeta": {
|
|
84
84
|
"react-native": {
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NativeBadge status-contrast guard (WS-G / C18).
|
|
3
|
+
*
|
|
4
|
+
* The success/warning/info variants previously rendered same-hue text on a
|
|
5
|
+
* tinted chip (`text-success` on `bg-success/15`), which measures ~1.9–3.1:1 —
|
|
6
|
+
* below the WCAG AA 4.5:1 floor.
|
|
7
|
+
*
|
|
8
|
+
* An interim fix used the `-dark` status stop (`text-success-dark`). That
|
|
9
|
+
* regressed twice: (1) `dark`/`light` stops are OPTIONAL in the brand schema
|
|
10
|
+
* (only `status.*.DEFAULT` is required), so minimal brands render no color;
|
|
11
|
+
* and (2) a dark shade over the dark-surface tint drops to ~1.7–2.6:1, so
|
|
12
|
+
* dark-mode badges failed AA.
|
|
13
|
+
*
|
|
14
|
+
* The shipped fix uses the semantic Tailwind ramp (always present, brand-
|
|
15
|
+
* independent, same hues as the Genesis status tokens) with an explicit
|
|
16
|
+
* `dark:` stop. Measured contrast on the tint:
|
|
17
|
+
* - light /15 tint: emerald-700 4.76:1, amber-800 6.32:1, blue-700 5.64:1
|
|
18
|
+
* - dark-surface tint: emerald-300 ≥8.2:1, amber-200 ≥10.8:1, blue-300 ≥8.2:1
|
|
19
|
+
* (AA in both modes, across the static preset AND the themeFromBrand()
|
|
20
|
+
* runtime dark map). This test asserts against the exported cva directly (no
|
|
21
|
+
* render-env dependency), so a regression fails loudly.
|
|
22
|
+
*/
|
|
23
|
+
import { describe, expect, it } from "vitest";
|
|
24
|
+
import { badgeTextVariants } from "../badge";
|
|
25
|
+
|
|
26
|
+
describe("NativeBadge status contrast (WCAG AA)", () => {
|
|
27
|
+
it.each([
|
|
28
|
+
["success", "text-emerald-700", "dark:text-emerald-300"],
|
|
29
|
+
["warning", "text-amber-800", "dark:text-amber-200"],
|
|
30
|
+
["info", "text-blue-700", "dark:text-blue-300"],
|
|
31
|
+
] as const)(
|
|
32
|
+
"%s status text pins an AA-safe light stop and a dark-mode stop",
|
|
33
|
+
(variant, lightClass, darkClass) => {
|
|
34
|
+
const classes = badgeTextVariants({ variant });
|
|
35
|
+
expect(classes).toContain(lightClass);
|
|
36
|
+
expect(classes).toContain(darkClass);
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
it("does not regress to the AA-failing same-hue status tokens", () => {
|
|
41
|
+
for (const variant of ["success", "warning", "info"] as const) {
|
|
42
|
+
const classes = badgeTextVariants({ variant }).split(/\s+/);
|
|
43
|
+
// The bare `text-success`/`text-warning`/`text-info` tokens are the
|
|
44
|
+
// ~2:1 failures.
|
|
45
|
+
expect(classes).not.toContain(`text-${variant}`);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it("does not depend on the OPTIONAL `-dark`/`-light` status stops", () => {
|
|
50
|
+
// `status.*.dark` and `status.*.light` are optional in the brand schema
|
|
51
|
+
// (only `status.*.DEFAULT` is required); a badge that referenced them
|
|
52
|
+
// would render no color for a minimal brand. Guard against reintroducing
|
|
53
|
+
// that dependency.
|
|
54
|
+
for (const variant of ["success", "warning", "info"] as const) {
|
|
55
|
+
const classes = badgeTextVariants({ variant }).split(/\s+/);
|
|
56
|
+
expect(classes).not.toContain(`text-${variant}-dark`);
|
|
57
|
+
expect(classes).not.toContain(`text-${variant}-light`);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Layout primitives WIN test (promoted from
|
|
2
|
+
* Layout primitives WIN test (promoted from Acme incubator, PRD-46 WC-A4).
|
|
3
3
|
*
|
|
4
4
|
* Proves the keystone: Stack / Inline / Box / Grid compose a spaced layout
|
|
5
5
|
* and pull every gap/padding from the `spaceScale` DESIGN TOKEN — never a
|
package/src/components/badge.tsx
CHANGED
|
@@ -35,9 +35,19 @@ const badgeTextVariants = cva("text-xs font-medium", {
|
|
|
35
35
|
secondary: "text-secondary-foreground",
|
|
36
36
|
destructive: "text-destructive-foreground",
|
|
37
37
|
outline: "text-foreground",
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
// AA-safe status text on the /15 tint. The bare status token
|
|
39
|
+
// (text-success ~2.2:1) fails WCAG AA. The `-dark` stop is optional in
|
|
40
|
+
// the brand schema (only `status.*.DEFAULT` is required) AND regresses
|
|
41
|
+
// dark mode — a dark shade on the dark-surface tint drops to ~1.7–2.6:1.
|
|
42
|
+
// Instead use the semantic Tailwind ramp (always present, brand-
|
|
43
|
+
// independent, same hues as the Genesis status tokens) with a `dark:`
|
|
44
|
+
// stop. Measured: light /15 tint emerald-700 4.76 / amber-800 6.32 /
|
|
45
|
+
// blue-700 5.64; dark-surface tint emerald-300 ≥8.2 / amber-200 ≥10.8 /
|
|
46
|
+
// blue-300 ≥8.2 — AA in both modes across the static preset and the
|
|
47
|
+
// themeFromBrand() runtime dark map.
|
|
48
|
+
success: "text-emerald-700 dark:text-emerald-300",
|
|
49
|
+
warning: "text-amber-800 dark:text-amber-200",
|
|
50
|
+
info: "text-blue-700 dark:text-blue-300",
|
|
41
51
|
muted: "text-muted-foreground",
|
|
42
52
|
},
|
|
43
53
|
},
|
package/src/components/index.ts
CHANGED
|
@@ -243,7 +243,7 @@ export type {
|
|
|
243
243
|
NativeTooltipContentProps,
|
|
244
244
|
} from "./tooltip";
|
|
245
245
|
|
|
246
|
-
// --- Layout primitives (promoted from
|
|
246
|
+
// --- Layout primitives (promoted from Acme incubator, PRD-46 WC-A4) ---
|
|
247
247
|
|
|
248
248
|
export { Stack, Inline, Box, Grid, spaceScale, spacingClass } from "./layout";
|
|
249
249
|
export type {
|
package/src/components/input.tsx
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @stability Stable
|
|
5
5
|
*/
|
|
6
6
|
import { Text, TextInput, type TextInputProps, View } from "react-native";
|
|
7
|
+
import { nativeColors } from "@marktiderman/genesis-design-system/tokens/native";
|
|
7
8
|
import { cn } from "../utils";
|
|
8
9
|
|
|
9
10
|
export interface NativeInputProps extends TextInputProps {
|
|
@@ -37,7 +38,7 @@ function NativeInput({
|
|
|
37
38
|
inputClassName
|
|
38
39
|
)}
|
|
39
40
|
editable={editable}
|
|
40
|
-
placeholderTextColor={placeholderTextColor ??
|
|
41
|
+
placeholderTextColor={placeholderTextColor ?? nativeColors.neutral[400]}
|
|
41
42
|
accessibilityLabel={label}
|
|
42
43
|
{...props}
|
|
43
44
|
/>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Genesis layout primitives (promoted from the
|
|
2
|
+
* Genesis layout primitives (promoted from the Acme incubator, PRD-46 WC-A4).
|
|
3
3
|
* The keystone the design-system research flags: "layout primitives own all
|
|
4
4
|
* spacing" (Braid rule). Stack / Inline / Box / Grid take all gap/padding/margin
|
|
5
5
|
* from the `spaceScale` design token via `spacingClass()` — composition stays
|
package/src/components/text.tsx
CHANGED
|
@@ -25,9 +25,16 @@ const textVariants = cva("text-foreground", {
|
|
|
25
25
|
},
|
|
26
26
|
});
|
|
27
27
|
|
|
28
|
+
// `className` is declared explicitly here — not inherited from react-native's
|
|
29
|
+
// `TextProps` via NativeWind's global augmentation, which does not resolve across
|
|
30
|
+
// the RN / nativewind / react-native-css-interop version matrix. Mirrors every
|
|
31
|
+
// other ui-native primitive (Button, Tooltip, ChipGroup, …); the implementation
|
|
32
|
+
// already consumes `className` below.
|
|
28
33
|
export interface NativeTextProps
|
|
29
34
|
extends TextProps,
|
|
30
35
|
VariantProps<typeof textVariants> {
|
|
36
|
+
/** NativeWind utility class string applied to the underlying Text. */
|
|
37
|
+
className?: string;
|
|
31
38
|
}
|
|
32
39
|
|
|
33
40
|
/**
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @stability Stable
|
|
5
5
|
*/
|
|
6
6
|
import { Text, TextInput, type TextInputProps, View } from "react-native";
|
|
7
|
+
import { nativeColors } from "@marktiderman/genesis-design-system/tokens/native";
|
|
7
8
|
import { cn } from "../utils";
|
|
8
9
|
|
|
9
10
|
export interface NativeTextareaProps extends TextInputProps {
|
|
@@ -39,7 +40,7 @@ function NativeTextarea({
|
|
|
39
40
|
multiline
|
|
40
41
|
numberOfLines={rows}
|
|
41
42
|
editable={editable}
|
|
42
|
-
placeholderTextColor={placeholderTextColor ??
|
|
43
|
+
placeholderTextColor={placeholderTextColor ?? nativeColors.neutral[400]}
|
|
43
44
|
{...props}
|
|
44
45
|
/>
|
|
45
46
|
{error ? (
|
package/src/layouts/nav-bar.tsx
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* @stability Beta
|
|
13
13
|
*/
|
|
14
14
|
import { Pressable, Text, TextInput, View } from "react-native";
|
|
15
|
+
import { nativeColors } from "@marktiderman/genesis-design-system/tokens/native";
|
|
15
16
|
import { cn } from "../utils";
|
|
16
17
|
|
|
17
18
|
// ---------------------------------------------------------------------------
|
|
@@ -176,7 +177,7 @@ export function NavBarSearchBar({
|
|
|
176
177
|
onChangeText={onChangeText}
|
|
177
178
|
onSubmitEditing={onSubmit}
|
|
178
179
|
placeholder={placeholder}
|
|
179
|
-
placeholderTextColor=
|
|
180
|
+
placeholderTextColor={nativeColors.neutral[400]}
|
|
180
181
|
returnKeyType="search"
|
|
181
182
|
autoCorrect={false}
|
|
182
183
|
autoCapitalize="none"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/layouts/screen-container.tsx","../src/layouts/nav-bar.tsx","../src/layouts/settings-page.tsx","../src/layouts/settings-sub-page.tsx","../src/layouts/notifications-page.tsx","../src/layouts/auth.tsx"],"names":["jsx","jsxs","View","Pressable","Text","SafeAreaView","useCallback"],"mappings":";;;;;;;;;AAyGO,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,EAAQ,OAAO,CAAA;AAOtD,SAAS,eAAA,CACP,WACA,YAAA,EAC8C;AAC9C,EAAA,IAAI,cAAc,MAAA,EAAQ;AACxB,IAAA,OAAO,YAAA,KAAiB,SAAS,eAAA,GAAkB,cAAA;AAAA,EACrD;AACA,EAAA,IAAI,SA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AACnB,KAAA,EACF,CAAA;AAAA,IAGD,WAAA;AAAA,IAEA,+BACCA,GAAAA;AAAA,MAACI,IAAAA;AAAA,MAAA;AAAA,QACC,MAAA,EAAQ,GAAG,MAAM,CAAA,MAAA,CAAA;AAAA,QACjB,iBAAA,EAAkB,OAAA;AAAA,QAClB,SAAA,EAAU,0BAAA;AAAA,QAET,QAAA,EAAA;AAAA;AAAA,KACH,GACE,IAAA;AAAA,oBAEJJ,GAAAA;AAAA,MAAC,YAAA;AAAA,MAAA;AAAA,QACC,MAAA,EAAQ,GAAG,MAAM,CAAA,OAAA,CAAA;AAAA,QACjB,SAAS,MAAM;AACb,UAAA,KAAK,YAAA,EAAa;AAAA,QACpB,CAAA;AAAA,QACA,SAAS,OAAA,IAAW,UAAA;AAAA,QACpB,UAAU,OAAA,IAAW,UAAA;AAAA,QAEpB,QAAA,EAAA;AAAA;AAAA;AACH,GAAA,EACF,CAAA;AAEJ;AAKO,SAAS,kBAAA,CAAmB;AAAA,EACjC,OAAA;AAAA,EACA,KAAA,GAAQ,kBAAA;AAAA,EACR,MAAA,GAAS;AACX,CAAA,EAIG;AACD,EAAA,uBACEA,GAAAA;AAAA,IAACG,SAAAA;AAAA,IAAA;AAAA,MACC,MAAA;AAAA,MACA,iBAAA,EAAkB,MAAA;AAAA,MAClB,kBAAA,EAAoB,KAAA;AAAA,MACpB,OAAA;AAAA,MACA,OAAA,EAAS,CAAA;AAAA,MACT,SAAA,EAAU,UAAA;AAAA,MAEV,0BAAAH,GAAAA,CAACI,IAAAA,EAAA,EAAK,SAAA,EAAU,oCAAoC,QAAA,EAAA,KAAA,EAAM;AAAA;AAAA,GAC5D;AAEJ","file":"chunk-BAU4YQZV.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 } 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 /** 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 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 >\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 { 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=\"#9ca3af\"\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 * Layer-2 escape hatch: drop down to `<ScreenContainer>` if the layout\n * structure doesn't fit (see standards/usage-doctrine.md).\n *\n * @stability Beta\n */\nimport { Fragment, type ReactNode } from \"react\";\nimport { View } from \"react-native\";\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\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?: {\n label: string;\n onPress: () => void;\n /** When true, renders with extra emphasis. Default `false`. */\n emphasized?: boolean;\n testID?: string;\n }[];\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}: 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\n return (\n <ScreenContainer\n scroll\n safeAreaEdges={[\"left\", \"right\", \"bottom\"]}\n testID={testID}\n contentClassName=\"pb-8\"\n className={className}\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 <NativeSectionListHeader\n title={section.title}\n testID={`${testID}-section-${section.id}-header`}\n />\n ) : null}\n <View className=\"border-y border-border bg-background\">\n {section.rows.map((row, rowIndex) => (\n <Fragment key={row.id}>\n <NativeListItem\n testID={row.testID ?? `${testID}-row-${row.id}`}\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 {rowIndex < section.rows.length - 1 ? (\n <NativeListItemDivider className=\"ml-4\" />\n ) : null}\n </Fragment>\n ))}\n </View>\n {section.footnote ? (\n <NativeText\n preset=\"body-sm\"\n className=\"px-4 pt-2 text-muted-foreground\"\n >\n {section.footnote}\n </NativeText>\n ) : null}\n </View>\n ))}\n\n {dangerousActions && dangerousActions.length > 0 ? (\n <View\n testID={`${testID}-dangerous-actions`}\n className={cn(\"mt-8 gap-2 px-4\")}\n >\n {dangerousActions.map((action) => (\n <NativeButton\n key={action.label}\n testID={action.testID ?? `${testID}-danger-${slug(action.label)}`}\n variant={action.emphasized ? \"destructive\" : \"outline\"}\n onPress={action.onPress}\n >\n {action.label}\n </NativeButton>\n ))}\n </View>\n ) : null}\n </ScreenContainer>\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 * 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 {\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 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 * Layer-3 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 { type ReactNode } from \"react\";\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\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. */\n emptyState?: ReactNode;\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}: 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 = groupByDate(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 <NativeEmptyState\n variant=\"first-run\"\n title={emptyTitle ?? \"No notifications\"}\n body={\n emptyBody ??\n \"When you get a notification, it'll show up here.\"\n }\n testID={`${testID}-empty`}\n />\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 <NativeSectionListHeader title={section.title} />\n )}\n renderItem={({ item }) => (\n <NativeListItem\n testID={item.testID ?? `${testID}-row-${item.id}`}\n title={item.title}\n subtitle={item.body}\n leading={\n item.leading ?? (\n <UnreadDot\n unread={!!item.unread}\n testID={`${testID}-row-${item.id}-unread`}\n />\n )\n }\n onPress={item.onPress}\n />\n )}\n ItemSeparatorComponent={() => <View className=\"h-px bg-border ml-4\" />}\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 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, 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\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 returnKeyType={isMagic ? \"send\" : \"next\"}\n editable={!loading && !submitting}\n // In magic-link mode the email field is the last input, so the\n // return key dispatches submit. In password mode the next return\n // moves focus to password (default RN behavior); the password\n // field's onSubmitEditing handles the actual send.\n onSubmitEditing={isMagic ? handleSubmit : undefined}\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 testID={`${testID}-password`}\n accessibilityLabel=\"Password\"\n value={password}\n onChangeText={setPassword}\n placeholder=\"••••••••\"\n secureTextEntry\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"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/text.tsx","../src/components/button.tsx","../src/components/input.tsx"],"names":["RNText","cva","jsx","jsxs","Text"],"mappings":";;;;;AASA,IAAM,YAAA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,GACE,IAAA;AAAA,QACH,OAAO,QAAA,KAAa,QAAA,mBACnBA,GAAAA;AAAA,UAAC,IAAA;AAAA,UAAA;AAAA,YACC,SAAA,EAAW,EAAA;AAAA,cACT,kBAAA,CAAmB,EAAE,OAAA,EAAS,IAAA,EAAM,CAAA;AAAA,cACpC;AAAA,aACF;AAAA,YAEC;AAAA;AAAA,SACH,GAEA;AAAA;AAAA;AAAA,GAEJ;AAEJ;ACpGA,SAAS,WAAA,CAAY;AAAA,EACnB,SAAA;AAAA,EACA,cAAA;AAAA,EACA,KAAA;AAAA,EACA,KAAA;AAAA,EACA,QAAA,GAAW,IAAA;AAAA,EACX,oBAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAqB;AACnB,EAAA,uBACEC,IAAAA,CAAC,IAAA,EAAA,EAAK,WAAW,EAAA,CAAG,SAAA,EAAW,SAAS,CAAA,EACrC,QAAA,EAAA;AAAA,IAAA,KAAA,mBACCD,GAAAA,CAACE,IAAAA,EAAA,EAAK,SAAA,EAAU,qCAAA,EACb,iBACH,CAAA,GACE,IAAA;AAAA,oBACJF,GAAAA;AAAA,MAAC,SAAA;AAAA,MAAA;AAAA,QACC,SAAA,EAAW,EAAA;AAAA,UACT,kFAAA;AAAA,UACA,CAAC,QAAA,IAAY,YAAA;AAAA,UACb,KAAA,IAAS,oBAAA;AAAA,UACT;AAAA,SACF;AAAA,QACA,QAAA;AAAA,QACA,sBAAsB,oBAAA,IAAwB,SAAA;AAAA,QAC9C,kBAAA,EAAoB,KAAA;AAAA,QACnB,GAAG;AAAA;AAAA,KACN;AAAA,IACC,KAAA,mBACCA,GAAAA,CAACE,IAAAA,EAAA,EAAK,SAAA,EAAU,0BAAA,EAA4B,iBAAM,CAAA,GAChD;AAAA,GAAA,EACN,CAAA;AAEJ","file":"chunk-PTJ2KCLM.js","sourcesContent":["/**\n * Text — typography primitive with semantic presets (h1, h2, body, caption, etc.).\n *\n * @stability Stable\n */\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport { Text as RNText, type TextProps } from \"react-native\";\nimport { cn } from \"../utils\";\n\nconst textVariants = cva(\"text-foreground\", {\n variants: {\n preset: {\n h1: \"text-3xl font-bold leading-9\",\n h2: \"text-2xl font-bold leading-8\",\n h3: \"text-xl font-semibold leading-7\",\n h4: \"text-lg font-semibold leading-7\",\n body: \"text-base font-normal leading-6\",\n \"body-sm\": \"text-sm font-normal leading-5\",\n caption: \"text-xs font-normal leading-4\",\n label: \"text-sm font-medium leading-5\",\n },\n },\n defaultVariants: {\n preset: \"body\",\n },\n});\n\nexport interface NativeTextProps\n extends TextProps,\n VariantProps<typeof textVariants> {\n}\n\n/**\n * Allowed `preset` values on {@link NativeText}. Re-exported as a named type\n * so consumer brand packages can build preset-driven typography APIs without\n * having to reach into `NativeTextProps['preset']` themselves.\n *\n * Example (consumer):\n * ```ts\n * import type { TextPreset } from \"@marktiderman/genesis-ui-native\";\n * function Heading({ as }: { as: TextPreset }) { ... }\n * ```\n */\nexport type TextPreset = NonNullable<NativeTextProps[\"preset\"]>;\n\nfunction NativeText({\n className,\n preset,\n children,\n ...props\n}: NativeTextProps) {\n return (\n <RNText\n className={cn(textVariants({ preset }), className)}\n {...props}\n >\n {children}\n </RNText>\n );\n}\n\nexport { NativeText, textVariants };\n","/**\n * Button — primary touch target. Variants: default, secondary, outline, ghost, destructive.\n *\n * @stability Stable\n */\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport { ActivityIndicator, Pressable, Text } from \"react-native\";\nimport { cn } from \"../utils\";\n\nconst buttonVariants = cva(\n \"flex-row items-center justify-center rounded-md\",\n {\n variants: {\n variant: {\n default: \"bg-primary\",\n secondary: \"bg-secondary\",\n outline: \"border border-input bg-transparent\",\n ghost: \"bg-transparent\",\n destructive: \"bg-destructive\",\n },\n size: {\n sm: \"h-9 px-3 gap-1.5\",\n md: \"h-10 px-4 gap-2\",\n lg: \"h-11 px-8 gap-2\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"md\",\n },\n }\n);\n\nconst buttonTextVariants = cva(\"font-medium text-center\", {\n variants: {\n variant: {\n default: \"text-primary-foreground\",\n secondary: \"text-secondary-foreground\",\n outline: \"text-foreground\",\n ghost: \"text-foreground\",\n destructive: \"text-destructive-foreground\",\n },\n size: {\n sm: \"text-sm\",\n md: \"text-sm\",\n lg: \"text-base\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"md\",\n },\n});\n\nexport interface NativeButtonProps\n extends VariantProps<typeof buttonVariants> {\n className?: string;\n textClassName?: string;\n children: React.ReactNode;\n onPress?: () => void;\n disabled?: boolean;\n loading?: boolean;\n testID?: string;\n}\n\nfunction NativeButton({\n className,\n textClassName,\n variant,\n size,\n children,\n onPress,\n disabled,\n loading,\n ...props\n}: NativeButtonProps) {\n const isDisabled = disabled || loading;\n\n return (\n <Pressable\n className={cn(\n buttonVariants({ variant, size }),\n isDisabled && \"opacity-50\",\n className\n )}\n onPress={onPress}\n disabled={isDisabled}\n accessibilityRole=\"button\"\n accessibilityState={{ disabled: isDisabled, busy: loading }}\n {...props}\n >\n {loading ? (\n <ActivityIndicator\n size=\"small\"\n color={\n variant === \"outline\" || variant === \"ghost\"\n ? undefined\n : \"white\"\n }\n />\n ) : null}\n {typeof children === \"string\" ? (\n <Text\n className={cn(\n buttonTextVariants({ variant, size }),\n textClassName\n )}\n >\n {children}\n </Text>\n ) : (\n children\n )}\n </Pressable>\n );\n}\n\nexport { NativeButton, buttonVariants, buttonTextVariants };\n","/**\n * Input — single-line text field.\n *\n * @stability Stable\n */\nimport { Text, TextInput, type TextInputProps, View } from \"react-native\";\nimport { cn } from \"../utils\";\n\nexport interface NativeInputProps extends TextInputProps {\n className?: string;\n inputClassName?: string;\n label?: string;\n error?: string;\n}\n\nfunction NativeInput({\n className,\n inputClassName,\n label,\n error,\n editable = true,\n placeholderTextColor,\n ...props\n}: NativeInputProps) {\n return (\n <View className={cn(\"gap-1.5\", className)}>\n {label ? (\n <Text className=\"text-sm font-medium text-foreground\">\n {label}\n </Text>\n ) : null}\n <TextInput\n className={cn(\n \"h-10 rounded-md border border-input bg-background px-3 text-base text-foreground\",\n !editable && \"opacity-50\",\n error && \"border-destructive\",\n inputClassName\n )}\n editable={editable}\n placeholderTextColor={placeholderTextColor ?? \"#A1A1AA\"}\n accessibilityLabel={label}\n {...props}\n />\n {error ? (\n <Text className=\"text-sm text-destructive\">{error}</Text>\n ) : null}\n </View>\n );\n}\n\nexport { NativeInput };\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/card.tsx","../src/components/badge.tsx","../src/components/separator.tsx","../src/components/skeleton.tsx","../src/components/alert.tsx","../src/components/checkbox.tsx","../src/components/label.tsx","../src/components/select.tsx","../src/components/switch.tsx","../src/components/textarea.tsx"],"names":["jsx","View","Text","cva","useState","Pressable","jsxs"],"mappings":";;;;;;AAcA,SAAS,WAAW,EAAE,SAAA,EAAW,QAAA,EAAU,GAAG,OAAM,EAAoB;AACtE,EAAA,uBACE,GAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA;AAAA,QACT,uDAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG,KAAA;AAAA,MAEH;AAAA;AAAA,GACH;AAEJ;AAEA,SAAS,gBAAA,CAAiB;AAAA,EACxB,SAAA;AAAA,EACA,QAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAoB;AAClB,EAAA,uBACE,GAAA,CAAC,QAAK,SAAA,EAAW,EAAA,CAAG,wBAAwB,SAAS,CAAA,EAAI,GAAG,KAAA,EACzD,QAAA,EACH,CAAA;AAEJ;AAQA,SAAS,eAAA,CAAgB;AAAA,EACvB,SAAA;AAAA,EACA,QAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAyB;AACvB,EAAA,uBACE,GAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA;AAAA,QACT,yEAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,G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,KAAA,mBACCA,GAAAA,CAACE,IAAAA,EAAA,EAAK,SAAA,EAAU,0BAAA,EAA4B,iBAAM,CAAA,GAChD;AAAA,GAAA,EACN,CAAA;AAEJ","file":"chunk-ZVF6PONU.js","sourcesContent":["/**\n * Card — flat container surface. The 90% case is `<Card>{children}</Card>`. See HeaderCard for structured layouts.\n *\n * @stability Stable\n */\nimport { Text, View } from \"react-native\";\nimport { cn } from \"../utils\";\n\nexport interface NativeCardProps {\n className?: string;\n children?: React.ReactNode;\n testID?: string;\n}\n\nfunction NativeCard({ className, children, ...props }: NativeCardProps) {\n return (\n <View\n className={cn(\n \"rounded-xl border border-border bg-card p-0 shadow-sm\",\n className\n )}\n {...props}\n >\n {children}\n </View>\n );\n}\n\nfunction NativeCardHeader({\n className,\n children,\n ...props\n}: NativeCardProps) {\n return (\n <View className={cn(\"flex-col gap-1.5 p-6\", className)} {...props}>\n {children}\n </View>\n );\n}\n\nexport interface NativeCardTitleProps {\n className?: string;\n children?: React.ReactNode;\n testID?: string;\n}\n\nfunction NativeCardTitle({\n className,\n children,\n ...props\n}: NativeCardTitleProps) {\n return (\n <Text\n className={cn(\n \"text-2xl font-semibold leading-none tracking-tight text-card-foreground\",\n className\n )}\n {...props}\n >\n {children}\n </Text>\n );\n}\n\nexport interface NativeCardDescriptionProps {\n className?: string;\n children?: React.ReactNode;\n testID?: string;\n}\n\nfunction NativeCardDescription({\n className,\n children,\n ...props\n}: NativeCardDescriptionProps) {\n return (\n <Text\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n >\n {children}\n </Text>\n );\n}\n\nfunction NativeCardContent({\n className,\n children,\n ...props\n}: NativeCardProps) {\n return (\n <View className={cn(\"p-6 pt-0\", className)} {...props}>\n {children}\n </View>\n );\n}\n\nfunction NativeCardFooter({\n className,\n children,\n ...props\n}: NativeCardProps) {\n return (\n <View\n className={cn(\"flex-row items-center p-6 pt-0\", className)}\n {...props}\n >\n {children}\n </View>\n );\n}\n\nexport {\n NativeCard,\n NativeCardHeader,\n NativeCardTitle,\n NativeCardDescription,\n NativeCardContent,\n NativeCardFooter,\n};\n","/**\n * Badge — compact status / count / category tag.\n *\n * @stability Stable\n */\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport { Text, View } from \"react-native\";\nimport { cn } from \"../utils\";\n\nconst badgeVariants = cva(\n \"flex-row items-center self-start rounded-full border px-2.5 py-0.5\",\n {\n variants: {\n variant: {\n default: \"border-transparent bg-primary\",\n secondary: \"border-transparent bg-secondary\",\n destructive: \"border-transparent bg-destructive\",\n outline: \"border-border bg-transparent\",\n success: \"border-transparent bg-success/15\",\n warning: \"border-transparent bg-warning/15\",\n info: \"border-transparent bg-info/15\",\n muted: \"border-transparent bg-muted\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n);\n\nconst badgeTextVariants = cva(\"text-xs font-medium\", {\n variants: {\n variant: {\n default: \"text-primary-foreground\",\n secondary: \"text-secondary-foreground\",\n destructive: \"text-destructive-foreground\",\n outline: \"text-foreground\",\n success: \"text-success\",\n warning: \"text-warning\",\n info: \"text-info\",\n muted: \"text-muted-foreground\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n});\n\nexport interface NativeBadgeProps\n extends VariantProps<typeof badgeVariants> {\n className?: string;\n textClassName?: string;\n children: React.ReactNode;\n accessibilityLabel?: string;\n testID?: string;\n}\n\nfunction NativeBadge({\n className,\n textClassName,\n variant,\n children,\n ...props\n}: NativeBadgeProps) {\n return (\n <View className={cn(badgeVariants({ variant }), className)} accessibilityRole=\"text\" {...props}>\n {typeof children === \"string\" ? (\n <Text\n className={cn(badgeTextVariants({ variant }), textClassName)}\n >\n {children}\n </Text>\n ) : (\n children\n )}\n </View>\n );\n}\n\nexport { NativeBadge, badgeVariants, badgeTextVariants };\n","/**\n * Separator — visual divider line (horizontal or vertical).\n *\n * @stability Stable\n */\nimport { View, type ViewProps } from \"react-native\";\nimport { cn } from \"../utils\";\n\nexport interface NativeSeparatorProps extends ViewProps {\n orientation?: \"horizontal\" | \"vertical\";\n}\n\nfunction NativeSeparator({\n className,\n orientation = \"horizontal\",\n ...props\n}: NativeSeparatorProps) {\n return (\n <View\n className={cn(\n \"bg-border\",\n orientation === \"horizontal\" ? \"h-px w-full\" : \"h-full w-px\",\n className\n )}\n accessibilityRole=\"none\"\n {...props}\n />\n );\n}\n\nexport { NativeSeparator };\n","/**\n * Skeleton — loading placeholder block.\n *\n * @stability Stable\n */\nimport { useEffect, useRef, useState } from \"react\";\nimport { AccessibilityInfo, Animated, Easing } from \"react-native\";\nimport { cn } from \"../utils\";\n\nexport interface NativeSkeletonProps {\n className?: string;\n /**\n * Width of the skeleton. Use className for NativeWind sizing instead\n * when possible (e.g. className=\"w-24 h-4\").\n */\n width?: number;\n height?: number;\n /** Shorthand that sets both width and height (useful for circle skeletons). */\n size?: number;\n circle?: boolean;\n testID?: string;\n}\n\nfunction NativeSkeleton({\n className,\n width,\n height,\n size,\n circle,\n ...props\n}: NativeSkeletonProps) {\n const opacity = useRef(new Animated.Value(0.3)).current;\n const [reduceMotion, setReduceMotion] = useState(false);\n\n useEffect(() => {\n let cancelled = false;\n AccessibilityInfo.isReduceMotionEnabled()\n .then((enabled) => {\n if (!cancelled) setReduceMotion(enabled);\n })\n .catch(() => {\n // Defensive: some RN runtimes (web, older Android) reject when\n // the AccessibilityManager isn't wired up. Fall back to \"no\n // reduce-motion\" so the skeleton still animates rather than\n // crashing the host screen with an unhandled rejection.\n if (!cancelled) setReduceMotion(false);\n });\n const sub = AccessibilityInfo.addEventListener(\n \"reduceMotionChanged\",\n (enabled) => setReduceMotion(enabled),\n );\n return () => {\n cancelled = true;\n sub.remove();\n };\n }, []);\n\n useEffect(() => {\n if (reduceMotion) {\n // Hold the skeleton at a static, legible opacity instead of\n // pulsing — required by visual-regression flow `screenshot-\n // reduced-motion.yaml` and by users with vestibular-motion\n // sensitivity (Apple HIG / WCAG 2.3.3).\n opacity.setValue(0.6);\n return;\n }\n const animation = Animated.loop(\n Animated.sequence([\n Animated.timing(opacity, {\n toValue: 1,\n duration: 1000,\n easing: Easing.inOut(Easing.ease),\n useNativeDriver: true,\n }),\n Animated.timing(opacity, {\n toValue: 0.3,\n duration: 1000,\n easing: Easing.inOut(Easing.ease),\n useNativeDriver: true,\n }),\n ])\n );\n animation.start();\n return () => animation.stop();\n }, [opacity, reduceMotion]);\n\n return (\n <Animated.View\n className={cn(\n \"rounded-md bg-muted\",\n circle && \"rounded-full\",\n className\n )}\n style={[\n { opacity },\n (width ?? size) !== undefined ? { width: width ?? size } : undefined,\n (height ?? size) !== undefined ? { height: height ?? size } : undefined,\n ].filter(Boolean) as any[]}\n {...props}\n />\n );\n}\n\nexport { NativeSkeleton };\n","/**\n * Alert — inline status message (info / success / warning / destructive).\n *\n * @stability Stable\n */\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport { Text, View } from \"react-native\";\nimport { cn } from \"../utils\";\n\nconst alertVariants = cva(\n \"rounded-lg border p-4\",\n {\n variants: {\n variant: {\n default: \"border-border bg-background\",\n destructive: \"border-destructive/50 bg-destructive/10\",\n success: \"border-success/50 bg-success/10\",\n warning: \"border-warning/50 bg-warning/10\",\n info: \"border-info/50 bg-info/10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n);\n\nconst alertTitleTextVariants = cva(\"text-base font-semibold leading-6\", {\n variants: {\n variant: {\n default: \"text-foreground\",\n destructive: \"text-destructive\",\n success: \"text-success\",\n warning: \"text-warning\",\n info: \"text-info\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n});\n\nconst alertDescriptionTextVariants = cva(\"text-sm leading-5\", {\n variants: {\n variant: {\n default: \"text-muted-foreground\",\n destructive: \"text-destructive\",\n success: \"text-success\",\n warning: \"text-warning\",\n info: \"text-info\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n});\n\nexport interface NativeAlertProps\n extends VariantProps<typeof alertVariants> {\n className?: string;\n children?: React.ReactNode;\n testID?: string;\n}\n\nfunction NativeAlert({\n className,\n variant,\n children,\n ...props\n}: NativeAlertProps) {\n return (\n <View\n className={cn(alertVariants({ variant }), className)}\n accessibilityRole=\"alert\"\n {...props}\n >\n {children}\n </View>\n );\n}\n\nexport interface NativeAlertTitleProps {\n className?: string;\n children?: React.ReactNode;\n variant?: VariantProps<typeof alertTitleTextVariants>[\"variant\"];\n}\n\nfunction NativeAlertTitle({\n className,\n variant,\n children,\n}: NativeAlertTitleProps) {\n return (\n <Text\n className={cn(alertTitleTextVariants({ variant }), className)}\n >\n {children}\n </Text>\n );\n}\n\nexport interface NativeAlertDescriptionProps {\n className?: string;\n children?: React.ReactNode;\n variant?: VariantProps<typeof alertDescriptionTextVariants>[\"variant\"];\n}\n\nfunction NativeAlertDescription({\n className,\n variant,\n children,\n}: NativeAlertDescriptionProps) {\n return (\n <Text\n className={cn(\n alertDescriptionTextVariants({ variant }),\n \"mt-1\",\n className\n )}\n >\n {children}\n </Text>\n );\n}\n\nexport {\n NativeAlert,\n NativeAlertTitle,\n NativeAlertDescription,\n alertVariants,\n};\n","/**\n * Checkbox — binary on/off control with optional label.\n *\n * @stability Stable\n */\nimport { useState } from \"react\";\nimport { Pressable, View } from \"react-native\";\nimport { cn } from \"../utils\";\n\nexport interface NativeCheckboxProps {\n className?: string;\n checked?: boolean;\n defaultChecked?: boolean;\n onCheckedChange?: (checked: boolean) => void;\n disabled?: boolean;\n testID?: string;\n}\n\nfunction NativeCheckbox({\n className,\n checked: controlledChecked,\n defaultChecked = false,\n onCheckedChange,\n disabled,\n ...props\n}: NativeCheckboxProps) {\n const [uncontrolledChecked, setUncontrolledChecked] =\n useState(defaultChecked);\n const isChecked = controlledChecked ?? uncontrolledChecked;\n\n function handlePress() {\n const next = !isChecked;\n if (controlledChecked === undefined) {\n setUncontrolledChecked(next);\n }\n onCheckedChange?.(next);\n }\n\n return (\n <Pressable\n className={cn(\n \"h-5 w-5 items-center justify-center rounded border border-border\",\n isChecked && \"border-primary bg-primary\",\n disabled && \"opacity-50\",\n className\n )}\n onPress={handlePress}\n disabled={disabled}\n accessibilityRole=\"checkbox\"\n accessibilityState={{ checked: isChecked }}\n {...props}\n >\n {isChecked ? (\n <View className=\"h-2.5 w-2.5 rounded-sm bg-primary-foreground\" />\n ) : null}\n </Pressable>\n );\n}\n\nexport { NativeCheckbox };\n","/**\n * Label — form-control label, paired via htmlFor / nativeID.\n *\n * @stability Stable\n */\nimport { Text, type TextProps } from \"react-native\";\nimport { cn } from \"../utils\";\n\nexport interface NativeLabelProps extends TextProps {\n children: React.ReactNode;\n disabled?: boolean;\n}\n\nfunction NativeLabel({\n className,\n children,\n disabled,\n ...props\n}: NativeLabelProps) {\n return (\n <Text\n className={cn(\n \"text-sm font-medium text-foreground\",\n disabled && \"opacity-70\",\n className\n )}\n accessibilityState={disabled ? { disabled } : undefined}\n {...props}\n >\n {children}\n </Text>\n );\n}\n\nexport { NativeLabel };\n","/**\n * Select — single-selection dropdown trigger + content.\n *\n * @stability Stable\n */\nimport { createContext, useContext, useState } from \"react\";\nimport { Modal, Pressable, Text, View } from \"react-native\";\nimport { cn } from \"../utils\";\n\ninterface SelectContextValue {\n value: string;\n onValueChange: (value: string) => void;\n open: boolean;\n setOpen: (open: boolean) => void;\n}\n\nconst SelectContext = createContext<SelectContextValue | null>(null);\n\nfunction useSelect() {\n const context = useContext(SelectContext);\n if (!context)\n throw new Error(\"Select components must be used within <NativeSelect>\");\n return context;\n}\n\nexport interface NativeSelectProps {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n children: React.ReactNode;\n}\n\nfunction NativeSelect({\n value: controlledValue,\n defaultValue = \"\",\n onValueChange: controlledOnValueChange,\n children,\n}: NativeSelectProps) {\n const [uncontrolledValue, setUncontrolledValue] = useState(defaultValue);\n const [open, setOpen] = useState(false);\n const value = controlledValue ?? uncontrolledValue;\n const onValueChange = controlledOnValueChange ?? setUncontrolledValue;\n\n return (\n <SelectContext.Provider value={{ value, onValueChange, open, setOpen }}>\n {children}\n </SelectContext.Provider>\n );\n}\n\nexport interface NativeSelectTriggerProps {\n className?: string;\n children?: React.ReactNode;\n placeholder?: string;\n disabled?: boolean;\n testID?: string;\n}\n\nfunction NativeSelectTrigger({\n className,\n children,\n placeholder,\n disabled,\n ...props\n}: NativeSelectTriggerProps) {\n const { value, open, setOpen } = useSelect();\n\n return (\n <Pressable\n className={cn(\n \"h-10 flex-row items-center justify-between rounded-md border border-input bg-background px-3\",\n disabled && \"opacity-50\",\n className\n )}\n onPress={() => setOpen(true)}\n disabled={disabled}\n accessibilityRole=\"button\"\n accessibilityState={{ expanded: open, disabled }}\n {...props}\n >\n {children ?? (\n <Text\n className={cn(\n \"text-sm\",\n value ? \"text-foreground\" : \"text-muted-foreground\"\n )}\n >\n {value || placeholder || \"Select...\"}\n </Text>\n )}\n <Text className=\"text-sm text-muted-foreground\">{\"\\u25BE\"}</Text>\n </Pressable>\n );\n}\n\nexport interface NativeSelectContentProps {\n className?: string;\n children: React.ReactNode;\n}\n\nfunction NativeSelectContent({\n className,\n children,\n}: NativeSelectContentProps) {\n const { open, setOpen } = useSelect();\n\n if (!open) return null;\n\n return (\n <Modal transparent animationType=\"fade\" onRequestClose={() => setOpen(false)}>\n <Pressable className=\"flex-1 items-center justify-center bg-black/50\" onPress={() => setOpen(false)}>\n {/* Intentional no-op: prevents overlay press from closing the modal when touching content area */}\n <Pressable onPress={() => {}}>\n <View\n className={cn(\n \"min-w-[10rem] rounded-md border border-border bg-popover p-1 shadow-md\",\n className\n )}\n >\n {children}\n </View>\n </Pressable>\n </Pressable>\n </Modal>\n );\n}\n\nexport interface NativeSelectItemProps {\n className?: string;\n value: string;\n children: React.ReactNode;\n testID?: string;\n}\n\nfunction NativeSelectItem({\n className,\n value,\n children,\n ...props\n}: NativeSelectItemProps) {\n const { value: selectedValue, onValueChange, setOpen } = useSelect();\n const isSelected = selectedValue === value;\n\n return (\n <Pressable\n className={cn(\n \"flex-row items-center rounded-sm px-2 py-1.5\",\n isSelected && \"bg-accent\",\n className\n )}\n onPress={() => {\n onValueChange(value);\n setOpen(false);\n }}\n {...props}\n >\n {typeof children === \"string\" ? (\n <Text\n className={cn(\n \"text-sm\",\n isSelected ? \"text-accent-foreground\" : \"text-popover-foreground\"\n )}\n >\n {children}\n </Text>\n ) : (\n children\n )}\n </Pressable>\n );\n}\n\nexport {\n NativeSelect,\n NativeSelectTrigger,\n NativeSelectContent,\n NativeSelectItem,\n};\n","/**\n * Switch — boolean toggle (iOS-style).\n *\n * @stability Stable\n */\nimport { Switch, type SwitchProps, View } from \"react-native\";\nimport { cn } from \"../utils\";\n\nexport interface NativeSwitchProps extends SwitchProps {\n className?: string;\n checked?: boolean;\n onCheckedChange?: (checked: boolean) => void;\n}\n\nfunction NativeSwitch({\n className,\n checked,\n onCheckedChange,\n disabled,\n ...props\n}: NativeSwitchProps) {\n return (\n <View className={cn(disabled && \"opacity-50\", className)}>\n <Switch\n value={checked}\n onValueChange={onCheckedChange}\n disabled={disabled}\n accessibilityState={{ checked: checked, disabled }}\n {...props}\n />\n </View>\n );\n}\n\nexport { NativeSwitch };\n","/**\n * Textarea — multi-line text field.\n *\n * @stability Stable\n */\nimport { Text, TextInput, type TextInputProps, View } from \"react-native\";\nimport { cn } from \"../utils\";\n\nexport interface NativeTextareaProps extends TextInputProps {\n className?: string;\n inputClassName?: string;\n label?: string;\n error?: string;\n rows?: number;\n}\n\nfunction NativeTextarea({\n className,\n inputClassName,\n label,\n error,\n editable = true,\n rows = 4,\n placeholderTextColor,\n ...props\n}: NativeTextareaProps) {\n return (\n <View className={cn(\"gap-1.5\", className)}>\n {label ? (\n <Text className=\"text-sm font-medium text-foreground\">{label}</Text>\n ) : null}\n <TextInput\n className={cn(\n \"rounded-md border border-input bg-background px-3 py-2 text-base text-foreground\",\n !editable && \"opacity-50\",\n error && \"border-destructive\",\n inputClassName\n )}\n multiline\n numberOfLines={rows}\n editable={editable}\n placeholderTextColor={placeholderTextColor ?? \"#A1A1AA\"}\n {...props}\n />\n {error ? (\n <Text className=\"text-sm text-destructive\">{error}</Text>\n ) : null}\n </View>\n );\n}\n\nexport { NativeTextarea };\n"]}
|