@nexub/react-native 0.0.0-stage → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/README.md +111 -2
  2. package/lib/module/components/actions.js +222 -0
  3. package/lib/module/components/actions.js.map +1 -0
  4. package/lib/module/components/containers.js +292 -0
  5. package/lib/module/components/containers.js.map +1 -0
  6. package/lib/module/components/display.js +266 -0
  7. package/lib/module/components/display.js.map +1 -0
  8. package/lib/module/components/feedback.js +464 -0
  9. package/lib/module/components/feedback.js.map +1 -0
  10. package/lib/module/components/inputs.js +746 -0
  11. package/lib/module/components/inputs.js.map +1 -0
  12. package/lib/module/components/mobile.js +811 -0
  13. package/lib/module/components/mobile.js.map +1 -0
  14. package/lib/module/components/overlays.js +418 -0
  15. package/lib/module/components/overlays.js.map +1 -0
  16. package/lib/module/components/shared.js +57 -0
  17. package/lib/module/components/shared.js.map +1 -0
  18. package/lib/module/hooks/useControllableState.js +23 -0
  19. package/lib/module/hooks/useControllableState.js.map +1 -0
  20. package/lib/module/index.js +30 -0
  21. package/lib/module/index.js.map +1 -0
  22. package/lib/module/package.json +1 -0
  23. package/lib/module/patterns/app.js +709 -0
  24. package/lib/module/patterns/app.js.map +1 -0
  25. package/lib/module/patterns/auth.js +224 -0
  26. package/lib/module/patterns/auth.js.map +1 -0
  27. package/lib/module/patterns/index.js +7 -0
  28. package/lib/module/patterns/index.js.map +1 -0
  29. package/lib/module/patterns/money.js +419 -0
  30. package/lib/module/patterns/money.js.map +1 -0
  31. package/lib/module/primitives/Icon.js +17 -0
  32. package/lib/module/primitives/Icon.js.map +1 -0
  33. package/lib/module/primitives/Layout.js +79 -0
  34. package/lib/module/primitives/Layout.js.map +1 -0
  35. package/lib/module/primitives/Pressable.js +77 -0
  36. package/lib/module/primitives/Pressable.js.map +1 -0
  37. package/lib/module/primitives/ScreenContainer.js +58 -0
  38. package/lib/module/primitives/ScreenContainer.js.map +1 -0
  39. package/lib/module/primitives/Surface.js +57 -0
  40. package/lib/module/primitives/Surface.js.map +1 -0
  41. package/lib/module/primitives/Text.js +70 -0
  42. package/lib/module/primitives/Text.js.map +1 -0
  43. package/lib/module/theme/ThemeProvider.js +127 -0
  44. package/lib/module/theme/ThemeProvider.js.map +1 -0
  45. package/lib/module/theme/fonts.js +56 -0
  46. package/lib/module/theme/fonts.js.map +1 -0
  47. package/lib/module/theme/haptics.js +56 -0
  48. package/lib/module/theme/haptics.js.map +1 -0
  49. package/lib/module/theme/navigation.js +99 -0
  50. package/lib/module/theme/navigation.js.map +1 -0
  51. package/lib/typescript/components/actions.d.ts +53 -0
  52. package/lib/typescript/components/actions.d.ts.map +1 -0
  53. package/lib/typescript/components/containers.d.ts +59 -0
  54. package/lib/typescript/components/containers.d.ts.map +1 -0
  55. package/lib/typescript/components/display.d.ts +62 -0
  56. package/lib/typescript/components/display.d.ts.map +1 -0
  57. package/lib/typescript/components/feedback.d.ts +93 -0
  58. package/lib/typescript/components/feedback.d.ts.map +1 -0
  59. package/lib/typescript/components/inputs.d.ts +141 -0
  60. package/lib/typescript/components/inputs.d.ts.map +1 -0
  61. package/lib/typescript/components/mobile.d.ts +173 -0
  62. package/lib/typescript/components/mobile.d.ts.map +1 -0
  63. package/lib/typescript/components/overlays.d.ts +74 -0
  64. package/lib/typescript/components/overlays.d.ts.map +1 -0
  65. package/lib/typescript/components/shared.d.ts +20 -0
  66. package/lib/typescript/components/shared.d.ts.map +1 -0
  67. package/lib/typescript/hooks/useControllableState.d.ts +6 -0
  68. package/lib/typescript/hooks/useControllableState.d.ts.map +1 -0
  69. package/lib/typescript/index.d.ts +37 -0
  70. package/lib/typescript/index.d.ts.map +1 -0
  71. package/lib/typescript/package.json +1 -0
  72. package/lib/typescript/patterns/app.d.ts +139 -0
  73. package/lib/typescript/patterns/app.d.ts.map +1 -0
  74. package/lib/typescript/patterns/auth.d.ts +54 -0
  75. package/lib/typescript/patterns/auth.d.ts.map +1 -0
  76. package/lib/typescript/patterns/index.d.ts +7 -0
  77. package/lib/typescript/patterns/index.d.ts.map +1 -0
  78. package/lib/typescript/patterns/money.d.ts +106 -0
  79. package/lib/typescript/patterns/money.d.ts.map +1 -0
  80. package/lib/typescript/primitives/Icon.d.ts +12 -0
  81. package/lib/typescript/primitives/Icon.d.ts.map +1 -0
  82. package/lib/typescript/primitives/Layout.d.ts +26 -0
  83. package/lib/typescript/primitives/Layout.d.ts.map +1 -0
  84. package/lib/typescript/primitives/Pressable.d.ts +21 -0
  85. package/lib/typescript/primitives/Pressable.d.ts.map +1 -0
  86. package/lib/typescript/primitives/ScreenContainer.d.ts +25 -0
  87. package/lib/typescript/primitives/ScreenContainer.d.ts.map +1 -0
  88. package/lib/typescript/primitives/Surface.d.ts +23 -0
  89. package/lib/typescript/primitives/Surface.d.ts.map +1 -0
  90. package/lib/typescript/primitives/Text.d.ts +21 -0
  91. package/lib/typescript/primitives/Text.d.ts.map +1 -0
  92. package/lib/typescript/theme/ThemeProvider.d.ts +69 -0
  93. package/lib/typescript/theme/ThemeProvider.d.ts.map +1 -0
  94. package/lib/typescript/theme/fonts.d.ts +25 -0
  95. package/lib/typescript/theme/fonts.d.ts.map +1 -0
  96. package/lib/typescript/theme/haptics.d.ts +3 -0
  97. package/lib/typescript/theme/haptics.d.ts.map +1 -0
  98. package/lib/typescript/theme/navigation.d.ts +158 -0
  99. package/lib/typescript/theme/navigation.d.ts.map +1 -0
  100. package/package.json +138 -3
  101. package/src/components/actions.tsx +259 -0
  102. package/src/components/containers.tsx +341 -0
  103. package/src/components/display.tsx +314 -0
  104. package/src/components/feedback.tsx +522 -0
  105. package/src/components/inputs.tsx +851 -0
  106. package/src/components/mobile.tsx +879 -0
  107. package/src/components/overlays.tsx +485 -0
  108. package/src/components/shared.ts +54 -0
  109. package/src/hooks/useControllableState.ts +27 -0
  110. package/src/index.ts +175 -0
  111. package/src/patterns/app.tsx +715 -0
  112. package/src/patterns/auth.tsx +266 -0
  113. package/src/patterns/index.ts +57 -0
  114. package/src/patterns/money.tsx +458 -0
  115. package/src/primitives/Icon.tsx +15 -0
  116. package/src/primitives/Layout.tsx +71 -0
  117. package/src/primitives/Pressable.tsx +94 -0
  118. package/src/primitives/ScreenContainer.tsx +65 -0
  119. package/src/primitives/Surface.tsx +75 -0
  120. package/src/primitives/Text.tsx +79 -0
  121. package/src/theme/ThemeProvider.tsx +210 -0
  122. package/src/theme/fonts.ts +52 -0
  123. package/src/theme/haptics.ts +57 -0
  124. package/src/theme/navigation.ts +68 -0
@@ -0,0 +1,59 @@
1
+ import * as React from 'react';
2
+ import { type StyleProp, type ViewProps, type ViewStyle } from 'react-native';
3
+ import { type SurfaceProps } from '../primitives/Surface.js';
4
+ export interface CardProps extends SurfaceProps {
5
+ /** Makes the whole card one pressable target (navigates to detail). */
6
+ onPress?: () => void;
7
+ /** Accessible name when pressable. */
8
+ accessibilityLabel?: string;
9
+ }
10
+ /** Content container on a tonal tier. Hierarchy through tone, not shadow (elevation for floating cards only). */
11
+ export declare function Card({ onPress, accessibilityLabel, tone, radius, style, children, ...rest }: CardProps): React.JSX.Element;
12
+ export type ListItemVariant = 'static' | 'navigation' | 'switch' | 'checkbox' | 'radio' | 'button' | 'value';
13
+ export interface ListItemProps {
14
+ title: string;
15
+ subtitle?: string;
16
+ /** Icon, Avatar or flag before the text. */
17
+ leading?: React.ReactNode;
18
+ /** Trailing text (variant 'value' or 'navigation'), e.g. "English" or an amount. */
19
+ value?: string;
20
+ /** Custom trailing content (overrides the variant's). */
21
+ trailing?: React.ReactNode;
22
+ /** @default 'navigation' when onPress is set, else 'static' */
23
+ variant?: ListItemVariant;
24
+ /** For switch / checkbox / radio rows. */
25
+ checked?: boolean;
26
+ onCheckedChange?: (checked: boolean) => void;
27
+ onPress?: () => void;
28
+ /** Button rows: red, for destructive actions (Sign out, Delete). */
29
+ destructive?: boolean;
30
+ disabled?: boolean;
31
+ style?: StyleProp<ViewStyle>;
32
+ }
33
+ /**
34
+ * One row of a list (Wise "List Item" model). The whole row is a single
35
+ * target and a single screen-reader element: "Title, subtitle, value".
36
+ */
37
+ export declare function ListItem({ title, subtitle, leading, value, trailing, variant: variantProp, checked, onCheckedChange, onPress, destructive, disabled, style, }: ListItemProps): React.JSX.Element;
38
+ export interface ListSectionProps extends ViewProps {
39
+ /** Section title above the group. */
40
+ header?: string;
41
+ /** Helper text below the group. */
42
+ footer?: string;
43
+ /** Divider inset: 16 for text rows, 56 when rows have a leading icon. @default 16 */
44
+ inset?: number;
45
+ children: React.ReactNode;
46
+ }
47
+ /** Inset-grouped rows on a container tier, hairlines between rows only. */
48
+ export declare function ListSection({ header, footer, inset, children, style, ...rest }: ListSectionProps): React.JSX.Element;
49
+ export interface AccordionProps {
50
+ title: string;
51
+ expanded?: boolean;
52
+ defaultExpanded?: boolean;
53
+ onExpandedChange?: (expanded: boolean) => void;
54
+ children: React.ReactNode;
55
+ style?: StyleProp<ViewStyle>;
56
+ }
57
+ /** Disclosure: a header row that shows or hides its content. */
58
+ export declare function Accordion({ title, expanded, defaultExpanded, onExpandedChange, children, style, }: AccordionProps): React.JSX.Element;
59
+ //# sourceMappingURL=containers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"containers.d.ts","sourceRoot":"","sources":["../../../src/components/containers.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAItB,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,0BAAuB,CAAC;AAQnE,MAAM,WAAW,SAAU,SAAQ,YAAY;IAC7C,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,sCAAsC;IACtC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,iHAAiH;AACjH,wBAAgB,IAAI,CAAC,EACnB,OAAO,EACP,kBAAkB,EAClB,IAA8B,EAC9B,MAAo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Q,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,2EAA2E;AAC3E,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,MAAM,EACN,KAAU,EACV,QAAQ,EACR,KAAK,EACL,GAAG,IAAI,EACR,EAAE,gBAAgB,qBAwClB;AAID,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,gEAAgE;AAChE,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,QAAQ,EACR,eAAuB,EACvB,gBAAgB,EAChB,QAAQ,EACR,KAAK,GACN,EAAE,cAAc,qBAsChB"}
@@ -0,0 +1,62 @@
1
+ import * as React from 'react';
2
+ import { type StyleProp, type ViewProps, type ViewStyle } from 'react-native';
3
+ import { type ToneValue } from '@nexub/core';
4
+ import type { NativeIconProps } from '@nexub/icons/native';
5
+ export interface AmountProps {
6
+ value: number;
7
+ /** ISO 4217 code, e.g. 'USD', 'EUR', 'INR'. */
8
+ currency: string;
9
+ /** BCP 47 locale. @default the provider's */
10
+ locale?: string;
11
+ /** `display`: a hero figure in the brand face with a quieter symbol and minor units. @default 'md' */
12
+ size?: 'sm' | 'md' | 'lg' | 'display';
13
+ /** `auto` colours gains success and losses error (use with signDisplay). @default 'neutral' */
14
+ tone?: 'neutral' | 'auto';
15
+ /** e.g. 'exceptZero' to show "+" on gains. */
16
+ signDisplay?: Intl.NumberFormatOptions['signDisplay'];
17
+ style?: StyleProp<ViewStyle>;
18
+ }
19
+ /** Money, formatted by Intl with tabular figures. Same API as web `Amount`. */
20
+ export declare function Amount({ value, currency, locale, size, tone, signDisplay, style, }: AmountProps): React.JSX.Element;
21
+ export interface BadgeProps extends ViewProps {
22
+ children?: string | number;
23
+ /** @default 'neutral' */
24
+ tone?: ToneValue;
25
+ /** @default 'soft' */
26
+ variant?: 'solid' | 'soft' | 'outline';
27
+ /** @default 'md' */
28
+ size?: 'sm' | 'md';
29
+ /** A status dot before the label (replaces web StatusPill). */
30
+ dot?: boolean;
31
+ leadingIcon?: React.ComponentType<NativeIconProps>;
32
+ }
33
+ /** Status, count or category label. Never tappable; use `Chip` for anything a user toggles. */
34
+ export declare function Badge({ children, tone, variant, size, dot, leadingIcon: Lead, style, ...rest }: BadgeProps): React.JSX.Element;
35
+ export type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
36
+ export interface AvatarProps extends ViewProps {
37
+ /** Image URL. Falls back to initials when missing or broken. */
38
+ src?: string;
39
+ /** Person or org name: initials and the accessible name. */
40
+ name?: string;
41
+ /** @default 'md' */
42
+ size?: AvatarSize;
43
+ /** Online/status dot. */
44
+ badge?: boolean;
45
+ }
46
+ export declare function Avatar({ src, name, size, badge, style, ...rest }: AvatarProps): React.JSX.Element;
47
+ export interface AvatarGroupProps extends ViewProps {
48
+ children: React.ReactElement<AvatarProps>[];
49
+ /** Avatars shown before "+N". @default 4 */
50
+ max?: number;
51
+ size?: AvatarSize;
52
+ }
53
+ export declare function AvatarGroup({ children, max, size, style, ...rest }: AvatarGroupProps): React.JSX.Element;
54
+ export interface DividerProps extends ViewProps {
55
+ /** Indent from the start edge (aligns with list text after a leading icon). */
56
+ inset?: number;
57
+ /** @default 'horizontal' */
58
+ orientation?: 'horizontal' | 'vertical';
59
+ }
60
+ /** Hairline separator. Prefer spacing and tonal tiers first (Calm Depth: remove dividers before adding them). */
61
+ export declare function Divider({ inset, orientation, style, ...rest }: DividerProps): React.JSX.Element;
62
+ //# sourceMappingURL=display.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../../../src/components/display.t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AAE,GAAG,IAAI,EAAE,EAAE,YAAY,qBAgB9F"}
@@ -0,0 +1,93 @@
1
+ import * as React from 'react';
2
+ import { type StyleProp, type ViewProps, type ViewStyle } from 'react-native';
3
+ import type { ToneValue } from '@nexub/core';
4
+ import { type NativeIconProps } from '@nexub/icons/native';
5
+ export interface BannerProps extends ViewProps {
6
+ title?: string;
7
+ children?: React.ReactNode;
8
+ /** @default 'info' */
9
+ tone?: ToneValue;
10
+ /** One action, e.g. <Button variant="text">Review</Button>. */
11
+ action?: React.ReactNode;
12
+ onDismiss?: () => void;
13
+ }
14
+ /** Persistent in-page message (web Banner / Alert / Callout). */
15
+ export declare function Banner({ title, children, tone, action, onDismiss, style, ...rest }: BannerProps): React.JSX.Element;
16
+ export interface ToastOptions {
17
+ message: string;
18
+ /** One short action ("Undo"). */
19
+ action?: {
20
+ label: string;
21
+ onPress: () => void;
22
+ };
23
+ tone?: ToneValue;
24
+ /** 'short' 4 s, 'long' 10 s (Material snackbar timings). @default 'long' with an action (time to reach it, WCAG 2.2.1), else 'short' */
25
+ duration?: 'short' | 'long';
26
+ }
27
+ export interface ToastProviderProps {
28
+ children: React.ReactNode;
29
+ /** Extra space above the bottom inset, e.g. the tab bar height. @default 0 */
30
+ bottomOffset?: number;
31
+ }
32
+ /** Hosts one toast at a time above the bottom safe area. Put it inside NexubNativeProvider. */
33
+ export declare function ToastProvider({ children, bottomOffset }: ToastProviderProps): React.JSX.Element;
34
+ /** `const toast = useToast(); toast({ message: 'Saved' })`. Needs ToastProvider. */
35
+ export declare const useToast: () => (t: ToastOptions) => void;
36
+ export interface DialogProps {
37
+ open: boolean;
38
+ onOpenChange: (open: boolean) => void;
39
+ title: string;
40
+ description?: string;
41
+ /** Extra content between the description and the actions. */
42
+ children?: React.ReactNode;
43
+ /** 1–2 Buttons; put the confirming action last. */
44
+ actions: React.ReactNode;
45
+ /** Tapping the scrim or Android back closes it. @default true */
46
+ dismissable?: boolean;
47
+ }
48
+ /** Modal alert for decisions that block the flow. Prefer a sheet for anything longer. */
49
+ export declare function Dialog({ open, onOpenChange, title, description, children, actions, dismissable, }: DialogProps): React.JSX.Element;
50
+ export interface ProgressProps {
51
+ /** 0–1. */
52
+ value: number;
53
+ label: string;
54
+ /** @default 'linear' */
55
+ variant?: 'linear' | 'circular';
56
+ /** Circular diameter. @default 40 */
57
+ size?: number;
58
+ style?: StyleProp<ViewStyle>;
59
+ }
60
+ /** Determinate progress. For unknown waits use LoadingIndicator. */
61
+ export declare function Progress({ value, label, variant, size, style }: ProgressProps): React.JSX.Element;
62
+ /** The platform activity indicator in the primary role. */
63
+ export declare function LoadingIndicator({ size, label, }: {
64
+ size?: 'small' | 'large';
65
+ label?: string;
66
+ }): React.JSX.Element;
67
+ export interface SkeletonProps {
68
+ width?: ViewStyle['width'];
69
+ /** @default 16 */
70
+ height?: number;
71
+ /** @default 'field' */
72
+ radius?: 'field' | 'control' | 'container' | number;
73
+ style?: StyleProp<ViewStyle>;
74
+ }
75
+ /** Loading placeholder. Pulses gently; static under Reduce Motion. Hidden from screen readers. */
76
+ export declare function Skeleton({ width, height, radius, style }: SkeletonProps): React.JSX.Element;
77
+ export interface EmptyStateProps extends ViewProps {
78
+ title: string;
79
+ description?: string;
80
+ icon?: React.ComponentType<NativeIconProps>;
81
+ /** @default 'neutral' */
82
+ tone?: ToneValue;
83
+ /** Primary next step, e.g. <Button>Add money</Button>. */
84
+ action?: React.ReactNode;
85
+ }
86
+ /** Nothing here yet: say why and offer the next step. */
87
+ export declare function EmptyState({ title, description, icon: Glyph, tone, action, style, ...rest }: EmptyStateProps): React.JSX.Element;
88
+ export interface ErrorStateProps extends Omit<EmptyStateProps, 'tone' | 'action'> {
89
+ /** Shows a Retry button (messages.retry). */
90
+ onRetry?: () => void;
91
+ }
92
+ export declare function ErrorState({ onRetry, icon, ...rest }: ErrorStateProps): React.JSX.Element;
93
+ //# sourceMappingURL=feedback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feedback.d.ts","sour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kBAAkB;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uBAAuB;IACvB,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,WAAW,GAAG,MAAM,CAAC;IACpD,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,kGAAkG;AAClG,wBAAgB,QAAQ,CAAC,EAAE,KAAc,EAAE,MAAW,EAAE,MAAgB,EAAE,KAAK,EAAE,EAAE,aAAa,qBAuB/F;AAID,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;IAC5C,yBAAyB;IACzB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,0DAA0D;IAC1D,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B;AAED,yDAAyD;AACzD,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,IAAI,EAAE,KAAY,EAClB,IAAgB,EAChB,MAAM,EACN,KAAK,EACL,GAAG,IAAI,EACR,EAAE,eAAe,qBAuCjB;AAED,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC/E,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,IAAoB,EAAE,GAAG,IAAI,EAAE,EAAE,eAAe,qBAgBrF"}
@@ -0,0 +1,141 @@
1
+ import * as React from 'react';
2
+ import { TextInput, type StyleProp, type TextInputProps, type ViewStyle } from 'react-native';
3
+ import { type ControlSize } from '@nexub/core';
4
+ import { type NativeIconProps } from '@nexub/icons/native';
5
+ export interface TextFieldProps extends Omit<TextInputProps, 'style' | 'editable'> {
6
+ ref?: React.Ref<React.ComponentRef<typeof TextInput>>;
7
+ /** Visible label above the field (also its accessible name). */
8
+ label: string;
9
+ /** Hint under the field. Replaced by `error` when set. */
10
+ helperText?: string;
11
+ /** Error message: red outline, announced, replaces the helper text. */
12
+ error?: string;
13
+ disabled?: boolean;
14
+ /** @default 'lg' (48, the mobile field height) */
15
+ size?: Extract<ControlSize, 'md' | 'lg' | 'xl'>;
16
+ leading?: React.ReactNode;
17
+ trailing?: React.ReactNode;
18
+ style?: StyleProp<ViewStyle>;
19
+ }
20
+ /** Labelled text input (web Input + Label + HelperText + FormError in one). */
21
+ export declare function TextField({ ref, label, helperText, error, disabled, size, leading, trailing, style, multiline, onFocus, onBlur, ...rest }: TextFieldProps): React.JSX.Element;
22
+ export interface PasswordInputProps extends Omit<TextFieldProps, 'secureTextEntry' | 'trailing'> {
23
+ }
24
+ /** Password field with a show/hide toggle and the platform autofill hints. */
25
+ export declare function PasswordInput(props: PasswordInputProps): React.JSX.Element;
26
+ export interface SearchFieldProps extends Omit<TextInputProps, 'style'> {
27
+ /** Accessible name. @default messages.search */
28
+ label?: string;
29
+ style?: StyleProp<ViewStyle>;
30
+ }
31
+ /** Capsule search input with a clear button. */
32
+ export declare function SearchField({ label, value, defaultValue, onChangeText, style, ...rest }: SearchFieldProps): React.JSX.Element;
33
+ export interface MoneyInputProps extends Omit<TextFieldProps, 'value' | 'defaultValue' | 'onChange' | 'leading' | 'keyboardType'> {
34
+ currency: string;
35
+ value?: number | null;
36
+ defaultValue?: number | null;
37
+ /** Parsed value (rounded to the currency's minor units), or null when empty. */
38
+ onValueChange?: (value: number | null) => void;
39
+ locale?: string;
40
+ }
41
+ /** Amount entry: decimal keypad, currency symbol, locale-aware parsing (de-DE "1.234,5" → 1234.5). */
42
+ export declare function MoneyInput({ currency, value, defaultValue, onValueChange, locale, ...rest }: MoneyInputProps): React.JSX.Element;
43
+ export interface StepperProps {
44
+ /** Accessible name of the value, e.g. "Guests". */
45
+ label: string;
46
+ value?: number;
47
+ defaultValue?: number;
48
+ onValueChange?: (value: number) => void;
49
+ min?: number;
50
+ max?: number;
51
+ step?: number;
52
+ disabled?: boolean;
53
+ style?: StyleProp<ViewStyle>;
54
+ }
55
+ /** − value + for small counts. Adjustable with VoiceOver/TalkBack swipe up/down. */
56
+ export declare function Stepper({ label, value, defaultValue, onValueChange, min, max, step, disabled, style, }: StepperProps): React.JSX.Element;
57
+ export interface CheckboxProps {
58
+ label: string;
59
+ checked?: boolean;
60
+ defaultChecked?: boolean;
61
+ onCheckedChange?: (checked: boolean) => void;
62
+ description?: string;
63
+ disabled?: boolean;
64
+ style?: StyleProp<ViewStyle>;
65
+ }
66
+ /** Checkbox with its label; the whole row is the target. */
67
+ export declare function Checkbox({ label, checked, defaultChecked, onCheckedChange, description, disabled, style, }: CheckboxProps): React.JSX.Element;
68
+ export interface RadioGroupProps {
69
+ /** Accessible name of the group. */
70
+ label: string;
71
+ value?: string;
72
+ defaultValue?: string;
73
+ onValueChange?: (value: string) => void;
74
+ disabled?: boolean;
75
+ children: React.ReactNode;
76
+ style?: StyleProp<ViewStyle>;
77
+ }
78
+ export declare function RadioGroup({ label, value, defaultValue, onValueChange, disabled, children, style, }: RadioGroupProps): React.JSX.Element;
79
+ export interface RadioProps {
80
+ value: string;
81
+ label: string;
82
+ description?: string;
83
+ disabled?: boolean;
84
+ }
85
+ export declare function Radio({ value, label, description, disabled: own }: RadioProps): React.JSX.Element;
86
+ export interface SwitchProps {
87
+ /** Accessible name (visible label lives in the ListItem / row next to it). */
88
+ label: string;
89
+ checked?: boolean;
90
+ defaultChecked?: boolean;
91
+ onCheckedChange?: (checked: boolean) => void;
92
+ disabled?: boolean;
93
+ }
94
+ /** The platform switch (UISwitch / Material), coloured with Nexub roles. The OS plays its haptic. */
95
+ export declare function Switch({ label, checked, defaultChecked, onCheckedChange, disabled, }: SwitchProps): React.JSX.Element;
96
+ export interface SegmentedControlProps<T extends string> {
97
+ label: string;
98
+ options: readonly {
99
+ value: T;
100
+ label: string;
101
+ }[];
102
+ value?: T;
103
+ defaultValue?: T;
104
+ onValueChange?: (value: T) => void;
105
+ style?: StyleProp<ViewStyle>;
106
+ }
107
+ /** 2–5 mutually exclusive views of the same content. */
108
+ export declare function SegmentedControl<T extends string>({ label, options, value, defaultValue, onValueChange, style, }: SegmentedControlProps<T>): React.JSX.Element;
109
+ export interface SliderProps {
110
+ label: string;
111
+ value?: number;
112
+ defaultValue?: number;
113
+ onValueChange?: (value: number) => void;
114
+ min?: number;
115
+ max?: number;
116
+ step?: number;
117
+ disabled?: boolean;
118
+ /** Announced value text, e.g. (v) => `${v}%`. */
119
+ formatValue?: (value: number) => string;
120
+ style?: StyleProp<ViewStyle>;
121
+ }
122
+ /** Continuous value. Drag anywhere on the track; VoiceOver/TalkBack adjust by `step`. */
123
+ export declare function Slider({ label, value, defaultValue, onValueChange, min, max, step, disabled, formatValue, style, }: SliderProps): React.JSX.Element;
124
+ export interface ChipProps {
125
+ label: string;
126
+ /** Toggle state (filter chips). */
127
+ selected?: boolean;
128
+ onPress?: () => void;
129
+ /** Shows a remove button (its label is messages.remove). */
130
+ onRemove?: () => void;
131
+ leadingIcon?: React.ComponentType<NativeIconProps>;
132
+ disabled?: boolean;
133
+ style?: StyleProp<ViewStyle>;
134
+ }
135
+ /** Capsule control: a filter, a choice or an input token. */
136
+ export declare function Chip({ label, selected, onPress, onRemove, leadingIcon: Lead, disabled, style, }: ChipProps): React.JSX.Element;
137
+ /** A toggleable Chip (selected → check icon). */
138
+ export declare function FilterChip(props: ChipProps & {
139
+ selected: boolean;
140
+ }): React.JSX.Element;
141
+ //# sourceMappingURL=inputs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inputs.d.ts","sourceRoot":"","sources":["../../../src/components/inputs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,SAAS,EAET,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,cAAc,CAAC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CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,yFAAyF;AACzF,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,KAAK,EACL,YAAgB,EAChB,aAAa,EACb,GAAO,EACP,GAAS,EACT,IAAQ,EACR,QAAQ,EACR,WAAW,EACX,KAAK,GACN,EAAE,WAAW,qBAwEb;AAID,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,6DAA6D;AAC7D,wBAAgB,IAAI,CAAC,EACnB,KAAK,EACL,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,WAAW,EAAE,IAAI,EACjB,QAAQ,EACR,KAAK,GACN,EAAE,SAAS,qBA2DX;AAED,iDAAiD;AACjD,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,GAAG;IAAE,QAAQ,EAAE,OAAO,CAAA;CAAE,qBAElE"}
@@ -0,0 +1,173 @@
1
+ import * as React from 'react';
2
+ import { type ListRenderItem, type RefreshControlProps as RNRefreshControlProps, type StyleProp, type ViewStyle } from 'react-native';
3
+ import { type NativeIconProps } from '@nexub/icons/native';
4
+ import { Text } from '../primitives/Text.js';
5
+ export interface SwipeAction {
6
+ label: string;
7
+ icon?: React.ComponentType<NativeIconProps>;
8
+ onPress: () => void;
9
+ /** @default 'neutral' */
10
+ tone?: 'neutral' | 'danger' | 'primary';
11
+ }
12
+ export interface SwipeableRowProps {
13
+ /** Accessible name of the whole row, e.g. "Amazon, minus $42.50, today". */
14
+ label: string;
15
+ /** Tap / double-tap action of the row (open details). */
16
+ onPress?: () => void;
17
+ /** Revealed by swiping toward the start edge. Each one is also an accessibility action. */
18
+ actions: SwipeAction[];
19
+ children: React.ReactNode;
20
+ style?: StyleProp<ViewStyle>;
21
+ }
22
+ /**
23
+ * Swipe a row to reveal actions. Never the only way to an action: they are
24
+ * custom accessibility actions too (VoiceOver rotor / TalkBack actions).
25
+ */
26
+ export declare function SwipeableRow({ label, onPress, actions, children, style }: SwipeableRowProps): React.JSX.Element;
27
+ /** The platform pull-to-refresh in the primary role. Pass to a ScrollView/FlatList `refreshControl`. */
28
+ export declare function RefreshControl(props: RNRefreshControlProps): React.JSX.Element;
29
+ export interface PageIndicatorProps {
30
+ count: number;
31
+ index: number;
32
+ style?: StyleProp<ViewStyle>;
33
+ }
34
+ /** Dots for paged content: "Page 2 of 4" to screen readers. */
35
+ export declare function PageIndicator({ count, index, style }: PageIndicatorProps): React.JSX.Element;
36
+ export interface CarouselProps<T> {
37
+ data: readonly T[];
38
+ renderItem: ListRenderItem<T>;
39
+ /** Page width. @default the window width */
40
+ width?: number;
41
+ onIndexChange?: (index: number) => void;
42
+ style?: StyleProp<ViewStyle>;
43
+ }
44
+ /** Full-width paging (onboarding, card stacks) with a page indicator. */
45
+ export declare function Carousel<T>({ data, renderItem, width: w, onIndexChange, style, }: CarouselProps<T>): React.JSX.Element;
46
+ export interface StickyFooterProps {
47
+ /** Scrollable content above the footer. */
48
+ children: React.ReactNode;
49
+ /** The flow's primary action(s), kept above the keyboard and the home indicator. */
50
+ footer: React.ReactNode;
51
+ style?: StyleProp<ViewStyle>;
52
+ }
53
+ /** Screen body + a footer that stays above the keyboard: the primary button of every flow. */
54
+ export declare function StickyFooter({ children, footer, style }: StickyFooterProps): React.JSX.Element;
55
+ export interface OTPInputProps {
56
+ /** Accessible name, e.g. "Verification code". */
57
+ label: string;
58
+ /** @default 6 */
59
+ length?: number;
60
+ value?: string;
61
+ onValueChange?: (code: string) => void;
62
+ /** Called once all digits are entered. */
63
+ onComplete?: (code: string) => void;
64
+ /** Dots instead of digits (PIN). Turns off one-time-code autofill. */
65
+ secure?: boolean;
66
+ error?: string;
67
+ autoFocus?: boolean;
68
+ style?: StyleProp<ViewStyle>;
69
+ }
70
+ /**
71
+ * One-time code / PIN entry: one hidden field (so paste and SMS autofill work:
72
+ * iOS oneTimeCode, Android sms-otp) drawn as boxes.
73
+ */
74
+ export declare function OTPInput({ label, length, value, onValueChange, onComplete, secure, error, autoFocus, style, }: OTPInputProps): React.JSX.Element;
75
+ export interface NumericKeypadProps {
76
+ /** Called with '0'–'9', the decimal key or 'delete'. */
77
+ onKey: (key: string) => void;
78
+ /** Show the decimal key (money). @default false */
79
+ decimal?: boolean;
80
+ locale?: string;
81
+ style?: StyleProp<ViewStyle>;
82
+ }
83
+ /** On-screen digits for amounts and PINs (no system keyboard covering the screen). */
84
+ export declare function NumericKeypad({ onKey, decimal, locale, style }: NumericKeypadProps): React.JSX.Element;
85
+ export interface ExpressiveMoneyInputProps {
86
+ currency: string;
87
+ value?: number | null;
88
+ onValueChange?: (value: number | null) => void;
89
+ /** Accessible name, e.g. "Amount to send". */
90
+ label: string;
91
+ locale?: string;
92
+ /** Shown under the amount, e.g. "Balance $1,240.00" or an error. */
93
+ caption?: string;
94
+ error?: boolean;
95
+ style?: StyleProp<ViewStyle>;
96
+ }
97
+ /** Big amount in the brand face + keypad (Wise-style money entry). */
98
+ export declare function ExpressiveMoneyInput({ currency, value, onValueChange, label, locale, caption, error, style, }: ExpressiveMoneyInputProps): React.JSX.Element;
99
+ export interface SensitiveValueProps {
100
+ /** What it is, e.g. "Balance" (used for the toggle and the masked reading). */
101
+ label: string;
102
+ /** The formatted value, e.g. "$12,480.50". */
103
+ children: string;
104
+ /** @default 'title-lg' */
105
+ variant?: React.ComponentProps<typeof Text>['variant'];
106
+ revealed?: boolean;
107
+ defaultRevealed?: boolean;
108
+ onRevealedChange?: (revealed: boolean) => void;
109
+ }
110
+ /**
111
+ * A value that can be hidden (balances, card numbers). Masked text reads as
112
+ * "Balance, hidden", never as dots, and it re-masks when the app backgrounds.
113
+ */
114
+ export declare function SensitiveValue({ label, children, variant, revealed, defaultRevealed, onRevealedChange, }: SensitiveValueProps): React.JSX.Element;
115
+ export interface PrivacyShieldProps {
116
+ children: React.ReactNode;
117
+ /** Shown over the app in the app switcher (e.g. your logo). */
118
+ cover?: React.ReactNode;
119
+ /** Block screenshots and recording (Android FLAG_SECURE; iOS hides the content in captures). Needs expo-screen-capture. @default false */
120
+ preventCapture?: boolean;
121
+ }
122
+ /**
123
+ * Covers the app when it leaves the foreground, so the app-switcher snapshot
124
+ * shows no balances. Wrap screens with sensitive data (or the whole app).
125
+ */
126
+ export declare function PrivacyShield({ children, cover, preventCapture }: PrivacyShieldProps): React.JSX.Element;
127
+ /** Slim notice while the app has no connection. Pass your network state (e.g. NetInfo). */
128
+ export declare function OfflineBanner({ offline, style, }: {
129
+ offline: boolean;
130
+ style?: StyleProp<ViewStyle>;
131
+ }): React.JSX.Element | null;
132
+ export interface CoachmarkProps {
133
+ title?: string;
134
+ children: string;
135
+ /** Which side the arrow is on (towards the thing it explains). @default 'top' */
136
+ arrow?: 'top' | 'bottom';
137
+ onDismiss: () => void;
138
+ /** Dismiss label. @default messages.close */
139
+ dismissLabel?: string;
140
+ style?: StyleProp<ViewStyle>;
141
+ }
142
+ /** A one-time hint next to a new feature. Place it in your layout; it doesn't measure targets. */
143
+ export declare function Coachmark({ title, children, arrow, onDismiss, dismissLabel, style, }: CoachmarkProps): React.JSX.Element;
144
+ export interface FABProps {
145
+ icon: React.ComponentType<NativeIconProps>;
146
+ /** Accessible name; also shown when `extended`. */
147
+ label: string;
148
+ onPress: () => void;
149
+ extended?: boolean;
150
+ /** Platforms that render it (a FAB reads as Material; iOS uses a toolbar or nav-bar button). @default ['android'] */
151
+ platforms?: ('ios' | 'android')[];
152
+ /** Extra bottom offset, e.g. the tab bar. @default 0 */
153
+ bottomOffset?: number;
154
+ }
155
+ /** Floating primary action, bottom end. Android only by default (MOBILE_PLAN.md D7). */
156
+ export declare function FAB({ icon: Glyph, label, onPress, extended, platforms, bottomOffset, }: FABProps): React.JSX.Element | null;
157
+ export interface DateTimeFieldProps {
158
+ label: string;
159
+ value: Date | null;
160
+ onValueChange: (value: Date) => void;
161
+ /** @default 'date' */
162
+ mode?: 'date' | 'time';
163
+ minimumDate?: Date;
164
+ maximumDate?: Date;
165
+ placeholder?: string;
166
+ style?: StyleProp<ViewStyle>;
167
+ }
168
+ /**
169
+ * A field that opens the platform picker (Android dialog, iOS inline calendar
170
+ * in a sheet). Needs @react-native-community/datetimepicker.
171
+ */
172
+ export declare function DateTimeField({ label, value, onValueChange, mode, minimumDate, maximumDate, placeholder, style, }: DateTimeFieldProps): React.JSX.Element;
173
+ //# sourceMappingURL=mobile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mobile.d.ts","sourceRoot":"","sources":["../../../src/components/mobile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAWL,KAAK,cAAc,EACnB,KAAK,mBAAmB,IAAI,qBAAqB,EACjD,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAItB,OAAO,EAAiC,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAI1F,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAoB,CAAC;AAS1C,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;IAC5C,OAA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,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wFAAwF;AACxF,wBAAgB,GAAG,CAAC,EAClB,IAAI,EAAE,KAAK,EACX,KAAK,EACL,OAAO,EACP,QAAQ,EACR,SAAuB,EACvB,YAAgB,GACjB,EAAE,QAAQ,4BAiCV;AAYD,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,aAAa,EAAE,CAAC,KAAK,EAAE,IAAI,KAAK,IAAI,CAAC;IACrC,sBAAsB;IACtB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,KAAK,EACL,aAAa,EACb,IAAa,EACb,WAAW,EACX,WAAW,EACX,WAAW,EACX,KAAK,GACN,EAAE,kBAAkB,qBA0EpB"}
@@ -0,0 +1,74 @@
1
+ import * as React from 'react';
2
+ import { type StyleProp, type ViewStyle } from 'react-native';
3
+ export type SheetDetent = 'content' | number;
4
+ export interface BottomSheetProps {
5
+ open: boolean;
6
+ onOpenChange: (open: boolean) => void;
7
+ /** Heights the sheet rests at: 'content' (fits its content) or a 0–1 fraction of the screen. @default ['content'] */
8
+ detents?: SheetDetent[];
9
+ title?: string;
10
+ children: React.ReactNode;
11
+ /** Drag down, tap the scrim or Android back closes it. @default true */
12
+ dismissable?: boolean;
13
+ /** Let the content scroll (long lists). @default false */
14
+ scroll?: boolean;
15
+ }
16
+ /**
17
+ * A modal sheet from the bottom edge (one at a time, per Apple and Material).
18
+ * Drag the grabber to resize or dismiss; tapping it cycles the detents, which
19
+ * also works with VoiceOver/TalkBack.
20
+ */
21
+ export declare function BottomSheet({ open, onOpenChange, detents, title, children, dismissable, scroll, }: BottomSheetProps): React.JSX.Element;
22
+ export interface SheetAction {
23
+ label: string;
24
+ onPress: () => void;
25
+ destructive?: boolean;
26
+ disabled?: boolean;
27
+ }
28
+ export interface ActionSheetProps {
29
+ open: boolean;
30
+ onOpenChange: (open: boolean) => void;
31
+ title?: string;
32
+ message?: string;
33
+ actions: SheetAction[];
34
+ }
35
+ /**
36
+ * Choices about an action the user started. iOS: the system action sheet
37
+ * (destructive in red, Cancel at the bottom). Android: a bottom sheet list.
38
+ */
39
+ export declare function ActionSheet({ open, onOpenChange, title, message, actions }: ActionSheetProps): React.JSX.Element | null;
40
+ export interface ContextMenuProps {
41
+ actions: SheetAction[];
42
+ title?: string;
43
+ children: React.ReactNode;
44
+ /** Tap action of the wrapped content (long-press opens the menu). */
45
+ onPress?: () => void;
46
+ accessibilityLabel?: string;
47
+ style?: StyleProp<ViewStyle>;
48
+ }
49
+ /**
50
+ * Long-press menu. The same actions are custom accessibility actions, so
51
+ * VoiceOver/TalkBack users reach them from the actions rotor. Always keep a
52
+ * visible way to every action too (HIG).
53
+ */
54
+ export declare function ContextMenu({ actions, title, children, onPress, accessibilityLabel, style, }: ContextMenuProps): React.JSX.Element;
55
+ export interface SelectOption<T extends string> {
56
+ value: T;
57
+ label: string;
58
+ description?: string;
59
+ }
60
+ export interface SelectProps<T extends string> {
61
+ label: string;
62
+ options: readonly SelectOption<T>[];
63
+ value?: T;
64
+ defaultValue?: T;
65
+ onValueChange?: (value: T) => void;
66
+ placeholder?: string;
67
+ helperText?: string;
68
+ error?: string;
69
+ disabled?: boolean;
70
+ style?: StyleProp<ViewStyle>;
71
+ }
72
+ /** A field that opens a sheet of choices (web Select / Combobox on mobile). */
73
+ export declare function Select<T extends string>({ label, options, value, defaultValue, onValueChange, placeholder, helperText, error, disabled, style, }: SelectProps<T>): React.JSX.Element;
74
+ //# sourceMappingURL=overlays.d.ts.map