@marktiderman/genesis-ui-native 2.0.0 → 2.0.2

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.
@@ -1,5 +1,4 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as React from 'react';
1
+ import * as react from 'react';
3
2
  import { ReactNode } from 'react';
4
3
  import { ResourceFormFieldDef, BaseRecord } from '@marktiderman/genesis-core';
5
4
  import { Control, UseFormReturn } from 'react-hook-form';
@@ -7,11 +6,11 @@ import { UseResourceOptions } from '@marktiderman/genesis-core/hooks';
7
6
 
8
7
  interface NativeEmptyStateProps {
9
8
  message?: string;
10
- action?: React.ReactNode;
9
+ action?: react.ReactNode;
11
10
  hasFilters?: boolean;
12
11
  onClearFilters?: () => void;
13
12
  }
14
- declare function NativeEmptyState({ message, action, hasFilters, onClearFilters, }: NativeEmptyStateProps): react_jsx_runtime.JSX.Element;
13
+ declare function NativeEmptyState({ message, action, hasFilters, onClearFilters, }: NativeEmptyStateProps): react.JSX.Element;
15
14
 
16
15
  interface NativeDataFiltersProps {
17
16
  search: string;
@@ -31,7 +30,7 @@ interface NativeDataFiltersProps {
31
30
  onChange: (sort: string) => void;
32
31
  };
33
32
  }
34
- declare function NativeDataFilters({ search, onSearchChange, searchPlaceholder, statusChips, sort, }: NativeDataFiltersProps): react_jsx_runtime.JSX.Element;
33
+ declare function NativeDataFilters({ search, onSearchChange, searchPlaceholder, statusChips, sort, }: NativeDataFiltersProps): react.JSX.Element;
35
34
 
36
35
  interface NativeDataPageShellProps {
37
36
  title: string;
@@ -46,7 +45,7 @@ interface NativeDataPageShellProps {
46
45
  emptyState?: ReactNode;
47
46
  children: ReactNode;
48
47
  }
49
- declare function NativeDataPageShell({ title, subtitle, headerRight, isLoading, isEmpty, hasError, errorMessage, onRetry, emptyMessage, emptyState, children, }: NativeDataPageShellProps): react_jsx_runtime.JSX.Element;
48
+ declare function NativeDataPageShell({ title, subtitle, headerRight, isLoading, isEmpty, hasError, errorMessage, onRetry, emptyMessage, emptyState, children, }: NativeDataPageShellProps): react.JSX.Element;
50
49
 
51
50
  interface NativeDetailField<T = Record<string, unknown>> {
52
51
  key: Extract<keyof T, string>;
@@ -61,7 +60,7 @@ interface NativeDetailPanelProps<T = Record<string, unknown>> {
61
60
  onDelete?: (item: T) => void;
62
61
  children?: ReactNode;
63
62
  }
64
- declare function NativeDetailPanel<T extends Record<string, unknown>>({ item, titleField, fields, onEdit, onDelete, children, }: NativeDetailPanelProps<T>): react_jsx_runtime.JSX.Element;
63
+ declare function NativeDetailPanel<T extends Record<string, unknown>>({ item, titleField, fields, onEdit, onDelete, children, }: NativeDetailPanelProps<T>): react.JSX.Element;
65
64
 
66
65
  interface NativeResourceFormFieldRendererProps {
67
66
  field: ResourceFormFieldDef;
@@ -70,7 +69,7 @@ interface NativeResourceFormFieldRendererProps {
70
69
  autoFocus?: boolean;
71
70
  watchedValues?: Record<string, unknown>;
72
71
  }
73
- declare function NativeResourceFormFieldRenderer({ field, control, action, autoFocus, watchedValues, }: NativeResourceFormFieldRendererProps): react_jsx_runtime.JSX.Element | null;
72
+ declare function NativeResourceFormFieldRenderer({ field, control, action, autoFocus, watchedValues, }: NativeResourceFormFieldRendererProps): react.JSX.Element | null;
74
73
 
75
74
  interface NativeResourceFormProps {
76
75
  resource: string;
@@ -84,7 +83,7 @@ interface NativeResourceFormProps {
84
83
  onError?: (error: Error) => void;
85
84
  renderForm?: (form: UseFormReturn<Record<string, unknown>>, fields: ResourceFormFieldDef[]) => ReactNode;
86
85
  }
87
- declare function NativeResourceForm({ resource, action, fields, item, listData, title, layout, onSuccess, onError, renderForm, }: NativeResourceFormProps): react_jsx_runtime.JSX.Element;
86
+ declare function NativeResourceForm({ resource, action, fields, item, listData, title, layout, onSuccess, onError, renderForm, }: NativeResourceFormProps): react.JSX.Element;
88
87
 
89
88
  interface NativeCardFieldDef<T> {
90
89
  key: Extract<keyof T, string>;
@@ -112,6 +111,6 @@ interface NativeResourcePageProps<T extends BaseRecord = BaseRecord> {
112
111
  headerRight?: ReactNode;
113
112
  emptyState?: ReactNode;
114
113
  }
115
- declare function NativeResourcePage<T extends BaseRecord = BaseRecord>({ resource, resourceOptions, title, subtitle, cardFields, renderItem, searchFields, searchPlaceholder, statusFilter, onItemPress, titleField, onCreatePress, createLabel, headerRight, emptyState, }: NativeResourcePageProps<T>): react_jsx_runtime.JSX.Element;
114
+ declare function NativeResourcePage<T extends BaseRecord = BaseRecord>({ resource, resourceOptions, title, subtitle, cardFields, renderItem, searchFields, searchPlaceholder, statusFilter, onItemPress, titleField, onCreatePress, createLabel, headerRight, emptyState, }: NativeResourcePageProps<T>): react.JSX.Element;
116
115
 
117
116
  export { type NativeCardFieldDef, NativeDataFilters, type NativeDataFiltersProps, NativeDataPageShell, type NativeDataPageShellProps, type NativeDetailField, NativeDetailPanel, type NativeDetailPanelProps, NativeEmptyState, type NativeEmptyStateProps, NativeResourceForm, NativeResourceFormFieldRenderer, type NativeResourceFormFieldRendererProps, type NativeResourceFormProps, NativeResourcePage, type NativeResourcePageProps };
@@ -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-ZVF6PONU.js';
2
- import { NativeText, NativeButton, NativeInput } from '../chunk-PTJ2KCLM.js';
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';
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
3
  import { BrandExtensions } from '@marktiderman/genesis-design-system';
4
4
 
@@ -20,7 +20,7 @@ interface BrandExtensionsProviderProps {
20
20
  value?: BrandExtensionsValue;
21
21
  children: ReactNode;
22
22
  }
23
- declare function BrandExtensionsProvider({ value, children, }: BrandExtensionsProviderProps): React.FunctionComponentElement<React.ProviderProps<Partial<BrandExtensions> | undefined>>;
23
+ declare function BrandExtensionsProvider({ value, children, }: BrandExtensionsProviderProps): react.FunctionComponentElement<react.ProviderProps<Partial<BrandExtensions> | undefined>>;
24
24
  /**
25
25
  * Read an extension scale by key. Returns `undefined` when the provider
26
26
  * isn't mounted OR when the key isn't declared on the brand. The return
package/dist/index.d.ts CHANGED
@@ -2,10 +2,9 @@ export { Box, BoxBackground, BoxProps, FlexAlign, FlexJustify, Grid, GridProps,
2
2
  export { BrandExtensionsProvider, BrandExtensionsProviderProps, BrandExtensionsValue, ThemeMode, useGenesisExtension, useReducedMotion, useThemeMode } from './hooks/index.js';
3
3
  export { AuthBranding, AuthBrandingProps, AuthForm, AuthFormProps, AuthFormValues, ForgotPasswordLink, NavBarSaveButton, NavBarSaveButtonProps, NavBarSearchBar, NavBarSearchBarProps, NavBarTitle, NavBarTitleProps, NotificationItem, NotificationsPage, NotificationsPageProps, SafeAreaEdge, ScreenContainer, ScreenContainerProps, ScreenHeaderProps, ScrollEdgeBehavior, SettingsPage, SettingsPageProps, SettingsPageRow, SettingsPageSection, SettingsSubPage, SettingsSubPageProps, SocialAuthProvider, SocialAuthRow, SocialAuthRowProps, composeHeaderOptions, confirmDiscardChanges, getNotificationsPageStackOptions, getSettingsPageStackOptions, getSettingsSubPageStackOptions } from './layouts/index.js';
4
4
  export { cn } from './utils.js';
5
- import 'react/jsx-runtime';
5
+ import 'react';
6
6
  import 'class-variance-authority/types';
7
7
  import 'class-variance-authority';
8
8
  import 'react-native';
9
- import 'react';
10
9
  import '@marktiderman/genesis-design-system';
11
10
  import 'clsx';
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-ZVF6PONU.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-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-BAU4YQZV.js';
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-PTJ2KCLM.js';
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';
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
1
+ import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
3
 
4
4
  type SafeAreaEdge = "top" | "bottom" | "left" | "right";
@@ -69,7 +69,7 @@ interface ScreenHeaderProps {
69
69
  * return <><Stack.Screen options={opts} /><ScreenContainer>...</ScreenContainer></>;
70
70
  */
71
71
  declare function composeHeaderOptions(props: ScreenHeaderProps): Record<string, unknown>;
72
- declare function ScreenContainer({ children, scroll, safeAreaEdges, statusBar, themeMode, className, contentClassName, keyboardShouldPersistTaps, testID, }: ScreenContainerProps): react_jsx_runtime.JSX.Element;
72
+ declare function ScreenContainer({ children, scroll, safeAreaEdges, statusBar, themeMode, className, contentClassName, keyboardShouldPersistTaps, testID, }: ScreenContainerProps): react.JSX.Element;
73
73
 
74
74
  interface NavBarSaveButtonProps {
75
75
  /** Press handler. Disabled when not provided OR when `disabled`/`loading`. */
@@ -85,7 +85,7 @@ interface NavBarSaveButtonProps {
85
85
  className?: string;
86
86
  testID?: string;
87
87
  }
88
- declare function NavBarSaveButton({ onPress, label, disabled, loading, destructive, className, testID, }: NavBarSaveButtonProps): react_jsx_runtime.JSX.Element;
88
+ declare function NavBarSaveButton({ onPress, label, disabled, loading, destructive, className, testID, }: NavBarSaveButtonProps): react.JSX.Element;
89
89
  interface NavBarTitleProps {
90
90
  /** Title text. */
91
91
  title: string;
@@ -96,7 +96,7 @@ interface NavBarTitleProps {
96
96
  className?: string;
97
97
  testID?: string;
98
98
  }
99
- declare function NavBarTitle({ title, subtitle, onPress, className, testID, }: NavBarTitleProps): react_jsx_runtime.JSX.Element;
99
+ declare function NavBarTitle({ title, subtitle, onPress, className, testID, }: NavBarTitleProps): react.JSX.Element;
100
100
  interface NavBarSearchBarProps {
101
101
  value: string;
102
102
  onChangeText: (next: string) => void;
@@ -113,7 +113,7 @@ interface NavBarSearchBarProps {
113
113
  * screen. For a sticky search-below-the-header pattern, prefer the
114
114
  * standalone <NativeSearchBar> primitive.
115
115
  */
116
- declare function NavBarSearchBar({ value, onChangeText, placeholder, onSubmit, clearable, className, testID, }: NavBarSearchBarProps): react_jsx_runtime.JSX.Element;
116
+ declare function NavBarSearchBar({ value, onChangeText, placeholder, onSubmit, clearable, className, testID, }: NavBarSearchBarProps): react.JSX.Element;
117
117
 
118
118
  interface SettingsPageRow {
119
119
  /** Stable id for keying. */
@@ -173,7 +173,7 @@ interface SettingsPageProps extends ScreenHeaderProps {
173
173
  declare function getSettingsPageStackOptions(props: ScreenHeaderProps & {
174
174
  headerTitle?: string;
175
175
  }): Record<string, unknown>;
176
- declare function SettingsPage({ sections, dangerousActions, className, testID, children, }: SettingsPageProps): react_jsx_runtime.JSX.Element;
176
+ declare function SettingsPage({ sections, dangerousActions, className, testID, children, }: SettingsPageProps): react.JSX.Element;
177
177
 
178
178
  interface SettingsSubPageProps extends ScreenHeaderProps {
179
179
  /** Form / detail body content. Pass any node tree. */
@@ -226,7 +226,7 @@ declare function getSettingsSubPageStackOptions(props: {
226
226
  headerRight?: ScreenHeaderProps["headerRight"];
227
227
  headerOptions?: ScreenHeaderProps["headerOptions"];
228
228
  }): Record<string, unknown>;
229
- declare function SettingsSubPage({ children, onConfirmLeave, className, testID, }: SettingsSubPageProps): react_jsx_runtime.JSX.Element;
229
+ declare function SettingsSubPage({ children, onConfirmLeave, className, testID, }: SettingsSubPageProps): react.JSX.Element;
230
230
 
231
231
  interface NotificationItem {
232
232
  /** Stable id. */
@@ -280,7 +280,7 @@ declare function getNotificationsPageStackOptions(props: {
280
280
  headerRight?: ScreenHeaderProps["headerRight"];
281
281
  headerOptions?: ScreenHeaderProps["headerOptions"];
282
282
  }): Record<string, unknown>;
283
- declare function NotificationsPage({ items, refreshing, onRefresh, emptyState, emptyTitle, emptyBody, className, testID, }: NotificationsPageProps): react_jsx_runtime.JSX.Element;
283
+ declare function NotificationsPage({ items, refreshing, onRefresh, emptyState, emptyTitle, emptyBody, className, testID, }: NotificationsPageProps): react.JSX.Element;
284
284
 
285
285
  interface AuthBrandingProps {
286
286
  /** Brand mark (logo node). */
@@ -293,7 +293,7 @@ interface AuthBrandingProps {
293
293
  className?: string;
294
294
  testID?: string;
295
295
  }
296
- declare function AuthBranding({ logo, headline, subhead, className, testID, }: AuthBrandingProps): react_jsx_runtime.JSX.Element;
296
+ declare function AuthBranding({ logo, headline, subhead, className, testID, }: AuthBrandingProps): react.JSX.Element;
297
297
  type SocialAuthProvider = {
298
298
  /** Stable id used as React key + testID suffix. */
299
299
  id: string;
@@ -317,7 +317,7 @@ interface SocialAuthRowProps {
317
317
  className?: string;
318
318
  testID?: string;
319
319
  }
320
- declare function SocialAuthRow({ providers, separator, className, testID, }: SocialAuthRowProps): react_jsx_runtime.JSX.Element | null;
320
+ declare function SocialAuthRow({ providers, separator, className, testID, }: SocialAuthRowProps): react.JSX.Element | null;
321
321
  interface AuthFormValues {
322
322
  email: string;
323
323
  /** Empty string when `mode === "magic-link"`. */
@@ -354,11 +354,11 @@ interface AuthFormProps {
354
354
  className?: string;
355
355
  testID?: string;
356
356
  }
357
- declare function AuthForm({ mode, onSubmit, validate, submitLabel, loading, errorMessage, initialEmail, belowFields, className, testID, }: AuthFormProps): react_jsx_runtime.JSX.Element;
357
+ declare function AuthForm({ mode, onSubmit, validate, submitLabel, loading, errorMessage, initialEmail, belowFields, className, testID, }: AuthFormProps): react.JSX.Element;
358
358
  declare function ForgotPasswordLink({ onPress, label, testID, }: {
359
359
  onPress: () => void;
360
360
  label?: string;
361
361
  testID?: string;
362
- }): react_jsx_runtime.JSX.Element;
362
+ }): react.JSX.Element;
363
363
 
364
364
  export { AuthBranding, type AuthBrandingProps, AuthForm, type AuthFormProps, type AuthFormValues, ForgotPasswordLink, NavBarSaveButton, type NavBarSaveButtonProps, NavBarSearchBar, type NavBarSearchBarProps, NavBarTitle, type NavBarTitleProps, type NotificationItem, NotificationsPage, type NotificationsPageProps, type SafeAreaEdge, ScreenContainer, type ScreenContainerProps, type ScreenHeaderProps, type ScrollEdgeBehavior, SettingsPage, type SettingsPageProps, type SettingsPageRow, type SettingsPageSection, SettingsSubPage, type SettingsSubPageProps, type SocialAuthProvider, SocialAuthRow, type SocialAuthRowProps, composeHeaderOptions, confirmDiscardChanges, getNotificationsPageStackOptions, getSettingsPageStackOptions, getSettingsSubPageStackOptions };
@@ -1,6 +1,6 @@
1
- export { AuthBranding, AuthForm, ForgotPasswordLink, NavBarSaveButton, NavBarSearchBar, NavBarTitle, NotificationsPage, ScreenContainer, SettingsPage, SettingsSubPage, SocialAuthRow, composeHeaderOptions, confirmDiscardChanges, getNotificationsPageStackOptions, getSettingsPageStackOptions, getSettingsSubPageStackOptions } from '../chunk-BAU4YQZV.js';
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-PTJ2KCLM.js';
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.0",
3
+ "version": "2.0.2",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -10,7 +10,7 @@
10
10
  "url": "git+https://github.com/marktiderman/genesis.git",
11
11
  "directory": "packages/ui-native"
12
12
  },
13
- "license": "UNLICENSED",
13
+ "license": "MIT",
14
14
  "publishConfig": {
15
15
  "access": "public",
16
16
  "provenance": false
@@ -25,6 +25,13 @@
25
25
  "src",
26
26
  "README.md"
27
27
  ],
28
+ "scripts": {
29
+ "build": "tsup",
30
+ "dev": "tsup --watch",
31
+ "clean": "rm -rf dist",
32
+ "typecheck": "tsc --noEmit",
33
+ "test": "vitest run"
34
+ },
28
35
  "exports": {
29
36
  ".": {
30
37
  "types": "./dist/index.d.ts",
@@ -63,6 +70,8 @@
63
70
  "@gorhom/bottom-sheet": ">=5.0.0",
64
71
  "@hookform/resolvers": "^3.0.0 || ^4.0.0 || ^5.0.0",
65
72
  "@react-native-community/datetimepicker": ">=8.0.0",
73
+ "@marktiderman/genesis-core": "workspace:^",
74
+ "@marktiderman/genesis-design-system": "workspace:^",
66
75
  "@tanstack/react-query": "^5.0.0",
67
76
  "clsx": "^2.0.0",
68
77
  "expo-haptics": ">=14.0.0",
@@ -76,9 +85,7 @@
76
85
  "react-native-reanimated": ">=3.0.0",
77
86
  "react-native-safe-area-context": ">=4.0.0",
78
87
  "tailwind-merge": "^3.0.0",
79
- "zod": "^3.0.0 || ^4.0.0",
80
- "@marktiderman/genesis-core": "^1.0.0",
81
- "@marktiderman/genesis-design-system": "^1.0.0"
88
+ "zod": "^3.0.0 || ^4.0.0"
82
89
  },
83
90
  "peerDependenciesMeta": {
84
91
  "react-native": {
@@ -116,12 +123,5 @@
116
123
  "tsup": "^8.3.0",
117
124
  "typescript": "^5.9.3",
118
125
  "vitest": "^2.1.0"
119
- },
120
- "scripts": {
121
- "build": "tsup",
122
- "dev": "tsup --watch",
123
- "clean": "rm -rf dist",
124
- "typecheck": "tsc --noEmit",
125
- "test": "vitest run"
126
126
  }
127
- }
127
+ }
@@ -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 Sanctiv incubator, PRD-46 WC-A4).
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
@@ -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
- success: "text-success",
39
- warning: "text-warning",
40
- info: "text-info",
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
  },
@@ -243,7 +243,7 @@ export type {
243
243
  NativeTooltipContentProps,
244
244
  } from "./tooltip";
245
245
 
246
- // --- Layout primitives (promoted from Sanctiv incubator, PRD-46 WC-A4) ---
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 {
@@ -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 ?? "#A1A1AA"}
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 Sanctiv incubator, PRD-46 WC-A4).
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
@@ -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 ?? "#A1A1AA"}
43
+ placeholderTextColor={placeholderTextColor ?? nativeColors.neutral[400]}
43
44
  {...props}
44
45
  />
45
46
  {error ? (
@@ -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="#9ca3af"
180
+ placeholderTextColor={nativeColors.neutral[400]}
180
181
  returnKeyType="search"
181
182
  autoCorrect={false}
182
183
  autoCapitalize="none"