@mrmeg/expo-ui 0.7.3 → 0.8.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 (50) hide show
  1. package/LLM_USAGE.md +21 -11
  2. package/README.md +8 -10
  3. package/dist/components/Accordion.d.ts +4 -4
  4. package/dist/components/AnimatedView.d.ts +1 -1
  5. package/dist/components/Badge.d.ts +1 -1
  6. package/dist/components/BottomSheet.d.ts +7 -7
  7. package/dist/components/Button.d.ts +3 -3
  8. package/dist/components/Button.js +17 -1
  9. package/dist/components/Card.d.ts +6 -6
  10. package/dist/components/Checkbox.d.ts +2 -1
  11. package/dist/components/Collapsible.d.ts +4 -3
  12. package/dist/components/Dialog.d.ts +10 -10
  13. package/dist/components/DismissKeyboard.d.ts +1 -1
  14. package/dist/components/Drawer.d.ts +7 -7
  15. package/dist/components/DropdownMenu.d.ts +10 -10
  16. package/dist/components/EmptyState.d.ts +1 -1
  17. package/dist/components/ErrorBoundary.d.ts +1 -1
  18. package/dist/components/Icon.d.ts +1 -1
  19. package/dist/components/InputOTP.d.ts +2 -1
  20. package/dist/components/Label.d.ts +1 -1
  21. package/dist/components/MaxWidthContainer.d.ts +1 -1
  22. package/dist/components/Notification.d.ts +4 -10
  23. package/dist/components/Notification.js +12 -13
  24. package/dist/components/Popover.d.ts +4 -4
  25. package/dist/components/Progress.d.ts +2 -1
  26. package/dist/components/RadioGroup.d.ts +3 -2
  27. package/dist/components/SegmentedControl.d.ts +2 -1
  28. package/dist/components/Select.d.ts +7 -7
  29. package/dist/components/Separator.d.ts +2 -1
  30. package/dist/components/Skeleton.d.ts +5 -4
  31. package/dist/components/Slider.d.ts +2 -1
  32. package/dist/components/StatusBar.d.ts +1 -1
  33. package/dist/components/StyledText.d.ts +12 -12
  34. package/dist/components/Switch.d.ts +2 -1
  35. package/dist/components/Tabs.d.ts +5 -5
  36. package/dist/components/TextInput.d.ts +1 -1
  37. package/dist/components/TextInput.js +9 -1
  38. package/dist/components/Toggle.d.ts +3 -2
  39. package/dist/components/ToggleGroup.d.ts +4 -3
  40. package/dist/components/Tooltip.d.ts +3 -3
  41. package/dist/components/UIProvider.d.ts +1 -1
  42. package/dist/state/globalUIStore.d.ts +9 -1
  43. package/dist/state/globalUIStore.js +9 -1
  44. package/dist/state/index.d.ts +1 -0
  45. package/dist/state/index.js +1 -0
  46. package/dist/state/notify.d.ts +50 -0
  47. package/dist/state/notify.js +31 -0
  48. package/dist/state/themeColorScope.d.ts +1 -1
  49. package/llms-full.md +34 -3
  50. package/package.json +2 -2
@@ -8,6 +8,7 @@ import { useTheme } from "../hooks/useTheme.js";
8
8
  import { useReducedMotion } from "../hooks/useReduceMotion.js";
9
9
  import { spacing } from "../constants/spacing.js";
10
10
  import { StyledText } from "./StyledText.js";
11
+ import { palette } from "../constants/colors.js";
11
12
  import { translateText } from "../lib/i18n.js";
12
13
  import { globalUIStore } from "../state/globalUIStore.js";
13
14
  const timingIn = { duration: 150, easing: Easing.out(Easing.quad), useNativeDriver: true };
@@ -21,20 +22,13 @@ const timingOut = { duration: 100, easing: Easing.in(Easing.quad), useNativeDriv
21
22
  * Usage:
22
23
  * ```ts
23
24
  * // Top notification (default)
24
- * globalUIStore.getState().show({
25
- * type: "success",
26
- * title: "Saved",
25
+ * notify.success("Saved", {
27
26
  * messages: ["Your changes have been saved."],
28
27
  * duration: 3000,
29
28
  * });
30
29
  *
31
30
  * // Bottom toast
32
- * globalUIStore.getState().show({
33
- * type: "info",
34
- * title: "Copied to clipboard",
35
- * duration: 2000,
36
- * position: "bottom",
37
- * });
31
+ * notify.info("Copied to clipboard", { duration: 2000, position: "bottom" });
38
32
  * ```
39
33
  */
40
34
  export const Notification = () => {
@@ -135,7 +129,10 @@ export const Notification = () => {
135
129
  }
136
130
  }
137
131
  wasVisibleRef.current = isNowVisible;
138
- if (isNowVisible && !wasVisible && alert?.duration) {
132
+ // Schedule on every alert change, not just hidden→visible: a notification
133
+ // that replaces a visible one (e.g. loading → success) still needs its
134
+ // auto-dismiss timer. The cleanup below clears the previous alert's timer.
135
+ if (isNowVisible && alert?.duration) {
139
136
  timerRef.current = setTimeout(() => {
140
137
  onAutoDismiss();
141
138
  }, alert.duration);
@@ -221,7 +218,7 @@ export const Notification = () => {
221
218
  ], children: _jsxs(View, { style: [
222
219
  styles.alert,
223
220
  isBottom && styles.alertBottom,
224
- getShadowStyle("base"),
221
+ getShadowStyle("elevated"),
225
222
  ], children: [_jsx(View, { style: [styles.iconBadge, { backgroundColor: iconBgColor }], children: alert?.loading ? (_jsx(ActivityIndicator, { size: "small", color: iconColor })) : (_jsx(Icon, { name: icon, size: 18, color: iconColor })) }), _jsxs(View, { style: styles.alertContent, children: [!!title && (_jsx(StyledText, { selectable: false, style: [styles.alertTitle, { color: theme.colors.foreground }], numberOfLines: 1, children: title })), hasMessage && (_jsx(StyledText, { selectable: false, style: [styles.alertDescription, { color: theme.colors.mutedForeground }], numberOfLines: 2, children: message }))] }), action && (_jsx(Pressable, { style: ({ pressed }) => [
226
223
  styles.actionButton,
227
224
  {
@@ -249,8 +246,10 @@ const createStyles = (theme) => StyleSheet.create({
249
246
  paddingRight: spacing.xl + spacing.sm,
250
247
  borderRadius: spacing.radiusLg,
251
248
  borderWidth: 1,
252
- borderColor: theme.colors.border,
253
- backgroundColor: theme.colors.card,
249
+ // Shadows barely read on dark backgrounds, so dark mode separates the
250
+ // toast from the page by lifting the surface a step above `card` instead.
251
+ borderColor: theme.dark ? palette.dark600 : theme.colors.border,
252
+ backgroundColor: theme.dark ? palette.dark700 : theme.colors.card,
254
253
  flexDirection: "row",
255
254
  alignItems: "center",
256
255
  gap: spacing.md,
@@ -25,7 +25,7 @@ interface PopoverContentProps extends PopoverPrimitive.ContentProps {
25
25
  * The content that appears in the popover overlay
26
26
  * Supports smart positioning, animations, and theme integration
27
27
  */
28
- declare function PopoverContent({ side, align, sideOffset, portalHost, ...props }: PopoverContentProps): import("react/jsx-runtime").JSX.Element;
28
+ declare function PopoverContent({ side, align, sideOffset, portalHost, ...props }: PopoverContentProps): React.JSX.Element;
29
29
  /**
30
30
  * Popover Header Component
31
31
  * Optional header section for the popover content
@@ -33,7 +33,7 @@ declare function PopoverContent({ side, align, sideOffset, portalHost, ...props
33
33
  interface PopoverHeaderProps extends ViewProps {
34
34
  children: React.ReactNode;
35
35
  }
36
- declare function PopoverHeader({ children, style, ...props }: PopoverHeaderProps): import("react/jsx-runtime").JSX.Element;
36
+ declare function PopoverHeader({ children, style, ...props }: PopoverHeaderProps): React.JSX.Element;
37
37
  /**
38
38
  * Popover Body Component
39
39
  * Main content area of the popover
@@ -41,7 +41,7 @@ declare function PopoverHeader({ children, style, ...props }: PopoverHeaderProps
41
41
  interface PopoverBodyProps extends ViewProps {
42
42
  children: React.ReactNode;
43
43
  }
44
- declare function PopoverBody({ children, style, ...props }: PopoverBodyProps): import("react/jsx-runtime").JSX.Element;
44
+ declare function PopoverBody({ children, style, ...props }: PopoverBodyProps): React.JSX.Element;
45
45
  /**
46
46
  * Popover Footer Component
47
47
  * Optional footer section for the popover content
@@ -49,7 +49,7 @@ declare function PopoverBody({ children, style, ...props }: PopoverBodyProps): i
49
49
  interface PopoverFooterProps extends ViewProps {
50
50
  children: React.ReactNode;
51
51
  }
52
- declare function PopoverFooter({ children, style, ...props }: PopoverFooterProps): import("react/jsx-runtime").JSX.Element;
52
+ declare function PopoverFooter({ children, style, ...props }: PopoverFooterProps): React.JSX.Element;
53
53
  /**
54
54
  * Popover Component with Sub-components
55
55
  * Properly typed interface for dot notation access (e.g., Popover.Trigger)
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import { StyleProp, ViewStyle } from "react-native";
2
3
  export type ProgressVariant = "default" | "accent" | "destructive";
3
4
  export type ProgressSize = "sm" | "md" | "lg";
@@ -25,4 +26,4 @@ export interface ProgressProps {
25
26
  * <Progress /> // indeterminate
26
27
  * ```
27
28
  */
28
- export declare function Progress({ value, variant, size, style, }: ProgressProps): import("react/jsx-runtime").JSX.Element;
29
+ export declare function Progress({ value, variant, size, style, }: ProgressProps): React.JSX.Element;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import { StyleProp, ViewStyle } from "react-native";
2
3
  import * as RadioGroupPrimitive from "@rn-primitives/radio-group";
3
4
  /**
@@ -34,7 +35,7 @@ export interface RadioGroupProps extends Omit<RadioGroupPrimitive.RootProps, "st
34
35
  * </RadioGroup>
35
36
  * ```
36
37
  */
37
- declare function RadioGroupRoot({ size, error, value, onValueChange, style: styleOverride, children, ...props }: RadioGroupProps): import("react/jsx-runtime").JSX.Element;
38
+ declare function RadioGroupRoot({ size, error, value, onValueChange, style: styleOverride, children, ...props }: RadioGroupProps): React.JSX.Element;
38
39
  export interface RadioGroupItemProps extends Omit<RadioGroupPrimitive.ItemProps, "style"> {
39
40
  /**
40
41
  * Optional label text displayed next to the radio button
@@ -58,7 +59,7 @@ export interface RadioGroupItemProps extends Omit<RadioGroupPrimitive.ItemProps,
58
59
  * Individual radio button with optional label.
59
60
  * Must be rendered inside a RadioGroup.
60
61
  */
61
- declare function RadioGroupItem({ label, required, style: styleOverride, labelStyle, value: itemValue, disabled, ...props }: RadioGroupItemProps): import("react/jsx-runtime").JSX.Element;
62
+ declare function RadioGroupItem({ label, required, style: styleOverride, labelStyle, value: itemValue, disabled, ...props }: RadioGroupItemProps): React.JSX.Element;
62
63
  declare const RadioGroupComponent: typeof RadioGroupRoot & {
63
64
  Item: typeof RadioGroupItem;
64
65
  };
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import { type StyleProp, type ViewStyle } from "react-native";
2
3
  /**
3
4
  * SegmentedControl — a horizontal single-select control backed by the
@@ -48,5 +49,5 @@ export interface SegmentedControlProps {
48
49
  /** Style override for the control. */
49
50
  style?: StyleProp<ViewStyle>;
50
51
  }
51
- declare function SegmentedControl({ values, value: controlledValue, defaultValue, onValueChange, disabled, tintColor, appearance, style, }: SegmentedControlProps): import("react/jsx-runtime").JSX.Element;
52
+ declare function SegmentedControl({ values, value: controlledValue, defaultValue, onValueChange, disabled, tintColor, appearance, style, }: SegmentedControlProps): React.JSX.Element;
52
53
  export { SegmentedControl };
@@ -14,7 +14,7 @@ type SelectTriggerProps = SelectPrimitive.TriggerProps & {
14
14
  size?: SelectSize;
15
15
  error?: boolean;
16
16
  };
17
- declare function SelectTrigger({ size, error, children, style: styleOverride, disabled, ...props }: SelectTriggerProps): import("react/jsx-runtime").JSX.Element;
17
+ declare function SelectTrigger({ size, error, children, style: styleOverride, disabled, ...props }: SelectTriggerProps): React.JSX.Element;
18
18
  /**
19
19
  * SelectValue Component
20
20
  * Displays the selected value text or placeholder
@@ -22,7 +22,7 @@ declare function SelectTrigger({ size, error, children, style: styleOverride, di
22
22
  type SelectValueProps = SelectPrimitive.ValueProps & {
23
23
  size?: SelectSize;
24
24
  };
25
- declare function SelectValue({ size, placeholder, style: styleOverride, ...props }: SelectValueProps): import("react/jsx-runtime").JSX.Element;
25
+ declare function SelectValue({ size, placeholder, style: styleOverride, ...props }: SelectValueProps): React.JSX.Element;
26
26
  /**
27
27
  * SelectContent Component
28
28
  * Dropdown overlay following the DropdownMenu.Content pattern
@@ -31,32 +31,32 @@ declare function SelectValue({ size, placeholder, style: styleOverride, ...props
31
31
  type SelectContentProps = SelectPrimitive.ContentProps & {
32
32
  portalHost?: string;
33
33
  };
34
- declare function SelectContent({ side, align, sideOffset, portalHost, style: styleOverride, ...props }: SelectContentProps): import("react/jsx-runtime").JSX.Element;
34
+ declare function SelectContent({ side, align, sideOffset, portalHost, style: styleOverride, ...props }: SelectContentProps): React.JSX.Element;
35
35
  /**
36
36
  * SelectItem Component
37
37
  * Individual option in the select dropdown
38
38
  * Shows a check icon on the left when selected
39
39
  */
40
40
  type SelectItemProps = SelectPrimitive.ItemProps;
41
- declare function SelectItem({ children, style: styleOverride, ...props }: SelectItemProps): import("react/jsx-runtime").JSX.Element;
41
+ declare function SelectItem({ children, style: styleOverride, ...props }: SelectItemProps): React.JSX.Element;
42
42
  /**
43
43
  * SelectGroup Component
44
44
  * Groups related select items together
45
45
  */
46
46
  type SelectGroupProps = SelectPrimitive.GroupProps;
47
- declare function SelectGroup({ style: styleOverride, ...props }: SelectGroupProps): import("react/jsx-runtime").JSX.Element;
47
+ declare function SelectGroup({ style: styleOverride, ...props }: SelectGroupProps): React.JSX.Element;
48
48
  /**
49
49
  * SelectLabel Component
50
50
  * Label for a group of select items
51
51
  */
52
52
  type SelectLabelProps = SelectPrimitive.LabelProps;
53
- declare function SelectLabel({ style: styleOverride, ...props }: SelectLabelProps): import("react/jsx-runtime").JSX.Element;
53
+ declare function SelectLabel({ style: styleOverride, ...props }: SelectLabelProps): React.JSX.Element;
54
54
  /**
55
55
  * SelectSeparator Component
56
56
  * Visual divider between select item groups
57
57
  */
58
58
  type SelectSeparatorProps = SelectPrimitive.SeparatorProps;
59
- declare function SelectSeparator({ style: styleOverride, ...props }: SelectSeparatorProps): import("react/jsx-runtime").JSX.Element;
59
+ declare function SelectSeparator({ style: styleOverride, ...props }: SelectSeparatorProps): React.JSX.Element;
60
60
  /**
61
61
  * Select Component with Sub-components
62
62
  * Properly typed interface for dot notation access (e.g., Select.Trigger)
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import { StyleProp, ViewStyle } from "react-native";
2
3
  import * as SeparatorPrimitive from "@rn-primitives/separator";
3
4
  /**
@@ -79,5 +80,5 @@ export interface SeparatorProps extends Omit<SeparatorPrimitive.RootProps, "styl
79
80
  * <Separator style={{ opacity: 0.5 }} />
80
81
  * ```
81
82
  */
82
- declare function Separator({ orientation, decorative, size, variant, style: styleOverride, margin, ...props }: SeparatorProps): import("react/jsx-runtime").JSX.Element;
83
+ declare function Separator({ orientation, decorative, size, variant, style: styleOverride, margin, ...props }: SeparatorProps): React.JSX.Element;
83
84
  export { Separator };
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import { StyleProp, ViewStyle } from "react-native";
2
3
  export interface SkeletonProps {
3
4
  /** Width of the skeleton element */
@@ -23,7 +24,7 @@ export interface SkeletonProps {
23
24
  * <Skeleton width={40} height={40} circle />
24
25
  * ```
25
26
  */
26
- export declare function Skeleton({ width, height, borderRadius, circle, style, }: SkeletonProps): import("react/jsx-runtime").JSX.Element;
27
+ export declare function Skeleton({ width, height, borderRadius, circle, style, }: SkeletonProps): React.JSX.Element;
27
28
  export interface SkeletonTextProps {
28
29
  /** Number of text lines to render */
29
30
  lines?: number;
@@ -38,7 +39,7 @@ export interface SkeletonTextProps {
38
39
  * SkeletonText renders N horizontal bars simulating text.
39
40
  * The last line is rendered at 60% width for a natural look.
40
41
  */
41
- export declare function SkeletonText({ lines, lineHeight, gap, style, }: SkeletonTextProps): import("react/jsx-runtime").JSX.Element;
42
+ export declare function SkeletonText({ lines, lineHeight, gap, style, }: SkeletonTextProps): React.JSX.Element;
42
43
  export interface SkeletonAvatarProps {
43
44
  /** Diameter of the circular avatar placeholder */
44
45
  size?: number;
@@ -48,7 +49,7 @@ export interface SkeletonAvatarProps {
48
49
  /**
49
50
  * SkeletonAvatar is a circular skeleton shorthand.
50
51
  */
51
- export declare function SkeletonAvatar({ size, style }: SkeletonAvatarProps): import("react/jsx-runtime").JSX.Element;
52
+ export declare function SkeletonAvatar({ size, style }: SkeletonAvatarProps): React.JSX.Element;
52
53
  export interface SkeletonCardProps {
53
54
  /** Whether to show an image placeholder area */
54
55
  showImage?: boolean;
@@ -65,4 +66,4 @@ export interface SkeletonCardProps {
65
66
  * SkeletonCard composes an image placeholder, optional avatar row,
66
67
  * and text lines in a Card-styled wrapper.
67
68
  */
68
- export declare function SkeletonCard({ showImage, imageHeight, showAvatar, textLines, style, }: SkeletonCardProps): import("react/jsx-runtime").JSX.Element;
69
+ export declare function SkeletonCard({ showImage, imageHeight, showAvatar, textLines, style, }: SkeletonCardProps): React.JSX.Element;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import { StyleProp, ViewStyle } from "react-native";
2
3
  /**
3
4
  * Slider — a themed range input backed by the platform's native slider via
@@ -40,5 +41,5 @@ export interface SliderProps {
40
41
  /** Style override for outer container */
41
42
  style?: StyleProp<ViewStyle>;
42
43
  }
43
- declare function Slider({ value, onValueChange, min, max, step, size: _size, disabled, showValue, style: styleOverride, }: SliderProps): import("react/jsx-runtime").JSX.Element;
44
+ declare function Slider({ value, onValueChange, min, max, step, size: _size, disabled, showValue, style: styleOverride, }: SliderProps): React.JSX.Element;
44
45
  export { Slider };
@@ -1 +1 @@
1
- export declare const StatusBar: () => import("react/jsx-runtime").JSX.Element;
1
+ export declare const StatusBar: () => import("react").JSX.Element;
@@ -69,53 +69,53 @@ export type TextProps = RNTextProps & {
69
69
  * chrome such as button labels, tabs, badges, and field labels
70
70
  * - numberOfLines and ellipsizeMode support from RN TextProps
71
71
  */
72
- export declare function StyledText(props: TextProps): import("react/jsx-runtime").JSX.Element;
72
+ export declare function StyledText(props: TextProps): import("react").JSX.Element;
73
73
  /**
74
74
  * Serif Text Component
75
75
  * Uses serif font family (DM Serif Display)
76
76
  */
77
- export declare function SerifText(props: TextProps): import("react/jsx-runtime").JSX.Element;
77
+ export declare function SerifText(props: TextProps): import("react").JSX.Element;
78
78
  /**
79
79
  * Sans-Serif Text Component
80
80
  * Uses sans-serif font family (DM Sans)
81
81
  */
82
- export declare function SansSerifText(props: TextProps): import("react/jsx-runtime").JSX.Element;
82
+ export declare function SansSerifText(props: TextProps): import("react").JSX.Element;
83
83
  /**
84
84
  * Serif Bold Text Component
85
85
  * Uses serif font family — DM Serif Display only has regular weight
86
86
  */
87
- export declare function SerifBoldText(props: TextProps): import("react/jsx-runtime").JSX.Element;
87
+ export declare function SerifBoldText(props: TextProps): import("react").JSX.Element;
88
88
  /**
89
89
  * Sans-Serif Bold Text Component
90
90
  * Uses sans-serif font family with semibold weight (DM Sans 600)
91
91
  */
92
- export declare function SansSerifBoldText(props: TextProps): import("react/jsx-runtime").JSX.Element;
92
+ export declare function SansSerifBoldText(props: TextProps): import("react").JSX.Element;
93
93
  /**
94
94
  * Display Text Component
95
95
  * Uses DM Serif Display at display size — for hero text and splash screens
96
96
  */
97
- export declare function DisplayText(props: TextProps): import("react/jsx-runtime").JSX.Element;
97
+ export declare function DisplayText(props: TextProps): import("react").JSX.Element;
98
98
  /**
99
99
  * Title Text - Large semibold text for page titles
100
100
  */
101
- export declare function TitleText(props: TextProps): import("react/jsx-runtime").JSX.Element;
101
+ export declare function TitleText(props: TextProps): import("react").JSX.Element;
102
102
  /**
103
103
  * Heading Text - Section heading text
104
104
  */
105
- export declare function HeadingText(props: TextProps): import("react/jsx-runtime").JSX.Element;
105
+ export declare function HeadingText(props: TextProps): import("react").JSX.Element;
106
106
  /**
107
107
  * Subheading Text - Subsection heading text
108
108
  */
109
- export declare function SubheadingText(props: TextProps): import("react/jsx-runtime").JSX.Element;
109
+ export declare function SubheadingText(props: TextProps): import("react").JSX.Element;
110
110
  /**
111
111
  * Body Text - Default text for paragraphs and content
112
112
  */
113
- export declare function BodyText(props: TextProps): import("react/jsx-runtime").JSX.Element;
113
+ export declare function BodyText(props: TextProps): import("react").JSX.Element;
114
114
  /**
115
115
  * Caption Text - Small text for captions and secondary content
116
116
  */
117
- export declare function CaptionText(props: TextProps): import("react/jsx-runtime").JSX.Element;
117
+ export declare function CaptionText(props: TextProps): import("react").JSX.Element;
118
118
  /**
119
119
  * Label Text - Medium weight text for form labels
120
120
  */
121
- export declare function LabelText(props: TextProps): import("react/jsx-runtime").JSX.Element;
121
+ export declare function LabelText(props: TextProps): import("react").JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import * as SwitchPrimitives from "@rn-primitives/switch";
2
+ import React from "react";
2
3
  import { StyleProp, ViewStyle } from "react-native";
3
4
  /**
4
5
  * Switch variant styles
@@ -40,5 +41,5 @@ interface SwitchProps extends Omit<SwitchPrimitives.RootProps, "style"> {
40
41
  */
41
42
  style?: StyleProp<ViewStyle>;
42
43
  }
43
- declare function Switch({ variant, labelOn, labelOff, size, thumbSize, loading, style: styleOverride, ...props }: SwitchProps): import("react/jsx-runtime").JSX.Element;
44
+ declare function Switch({ variant, labelOn, labelOff, size, thumbSize, loading, style: styleOverride, ...props }: SwitchProps): React.JSX.Element;
44
45
  export { Switch };
@@ -9,16 +9,16 @@ export interface TabsProps extends TabsPrimitive.RootProps {
9
9
  variant?: TabsVariant;
10
10
  size?: TabsSize;
11
11
  }
12
- declare function TabsRoot({ variant, size, children, ...props }: TabsProps): import("react/jsx-runtime").JSX.Element;
12
+ declare function TabsRoot({ variant, size, children, ...props }: TabsProps): React.JSX.Element;
13
13
  export interface TabsListProps extends TabsPrimitive.ListProps {
14
14
  style?: StyleProp<ViewStyle>;
15
15
  }
16
- declare function TabsList({ style, children, ...props }: TabsListProps): import("react/jsx-runtime").JSX.Element;
16
+ declare function TabsList({ style, children, ...props }: TabsListProps): React.JSX.Element;
17
17
  export interface TabsTriggerProps extends TabsPrimitive.TriggerProps {
18
18
  icon?: IconName;
19
19
  style?: StyleProp<ViewStyle>;
20
20
  }
21
- declare function TabsTriggerInner({ icon, style, children, value, ...props }: TabsTriggerProps): import("react/jsx-runtime").JSX.Element;
21
+ declare function TabsTriggerInner({ icon, style, children, value, ...props }: TabsTriggerProps): React.JSX.Element;
22
22
  /**
23
23
  * TabsTrigger.Text
24
24
  * Label text for a TabsTrigger. Reads the tab size from context and applies the
@@ -32,11 +32,11 @@ declare function TabsTriggerInner({ icon, style, children, value, ...props }: Ta
32
32
  * </Tabs.Trigger>
33
33
  * ```
34
34
  */
35
- declare function TabsTriggerText({ style, numberOfLines, ...props }: React.ComponentProps<typeof StyledText>): import("react/jsx-runtime").JSX.Element;
35
+ declare function TabsTriggerText({ style, numberOfLines, ...props }: React.ComponentProps<typeof StyledText>): React.JSX.Element;
36
36
  export interface TabsContentProps extends TabsPrimitive.ContentProps {
37
37
  style?: StyleProp<ViewStyle>;
38
38
  }
39
- declare function TabsContent({ style, children, ...props }: TabsContentProps): import("react/jsx-runtime").JSX.Element;
39
+ declare function TabsContent({ style, children, ...props }: TabsContentProps): React.JSX.Element;
40
40
  declare const TabsTriggerCompound: typeof TabsTriggerInner & {
41
41
  Text: typeof TabsTriggerText;
42
42
  };
@@ -120,5 +120,5 @@ interface TextInputCustomProps extends TextInputProps {
120
120
  * />
121
121
  * ```
122
122
  */
123
- export declare function TextInput(props: TextInputCustomProps): import("react/jsx-runtime").JSX.Element;
123
+ export declare function TextInput(props: TextInputCustomProps): import("react").JSX.Element;
124
124
  export {};
@@ -255,10 +255,18 @@ leftElement, rightElement, clearable, focusedStyle, style, ...rest }) {
255
255
  opacity: editable === false ? 0.6 : 1,
256
256
  ...(multiline ? null : { height: sizeConfig.height }),
257
257
  };
258
+ // "System" is an RN-only sentinel (RCTFont resolves it to the system font).
259
+ // @expo/ui passes the family verbatim to SwiftUI's Font.custom / Compose,
260
+ // where no such font exists — the fallback ignores fontSize and renders at
261
+ // the 17pt default, blowing up text and secure-entry dots. Omit the family
262
+ // so the native side uses the system font at our requested size.
263
+ const nativeFontFamily = fontFamilies.sansSerif.regular === "System"
264
+ ? undefined
265
+ : fontFamilies.sansSerif.regular;
258
266
  const textStyle = {
259
267
  color: textColor,
260
268
  fontSize: sizeConfig.fontSize,
261
- fontFamily: fontFamilies.sansSerif.regular,
269
+ ...(nativeFontFamily ? { fontFamily: nativeFontFamily } : null),
262
270
  };
263
271
  return (_jsxs(View, { style: wrapperStyle, children: [!!label && (_jsx(View, { style: styles.labelContainer, children: _jsxs(StyledText, { selectable: false, style: styles.label, children: [label, required && _jsx(StyledText, { selectable: false, style: styles.required, children: " *" })] }) })), _jsxs(View, { style: hasSecureToggle ? styles.nativeRow : undefined, children: [_jsx(Host, { matchContents: { vertical: true }, style: hasSecureToggle ? styles.nativeHostFlex : styles.nativeHost, children: _jsx(ExpoTextInput, { ...rest, ref: innerRef, value: state, defaultValue: defaultValue, onChangeText: onChangeText, editable: editable, multiline: multiline, rows: rows, inputMode: inputMode, secureTextEntry: effectiveSecureTextEntry, placeholderTextColor: theme.colors.textDim, style: boxStyle, textStyle: textStyle }) }), hasSecureToggle && (_jsx(Pressable, { style: styles.nativePasswordToggle, onPress: () => setPasswordVisible((v) => !v), accessibilityLabel: passwordVisible ? "Hide password" : "Show password", accessibilityRole: "button", children: _jsx(Icon, { name: passwordVisible ? "eye-off" : "eye", size: spacing.iconSm + 4, color: "textDim" }) }))] }), !!(helperText || errorText) && (_jsx(StyledText, { selectable: false, style: [styles.helperText, hasError && styles.errorText], children: errorText || helperText }))] }));
264
272
  }
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import * as TogglePrimitive from "@rn-primitives/toggle";
2
3
  import { ViewStyle, StyleProp } from "react-native";
3
4
  import type { IconName } from "./Icon";
@@ -83,7 +84,7 @@ interface ToggleProps extends Omit<TogglePrimitive.RootProps, "style"> {
83
84
  * </Toggle>
84
85
  * ```
85
86
  */
86
- declare function Toggle({ variant, size, shape, loading, iconOnly, style: styleOverride, ...props }: ToggleProps): import("react/jsx-runtime").JSX.Element;
87
+ declare function Toggle({ variant, size, shape, loading, iconOnly, style: styleOverride, ...props }: ToggleProps): React.JSX.Element;
87
88
  /**
88
89
  * ToggleIcon Component
89
90
  * Icon wrapper for use inside Toggle buttons
@@ -101,6 +102,6 @@ interface ToggleIconProps {
101
102
  size?: number;
102
103
  color?: string;
103
104
  }
104
- declare function ToggleIcon({ name, size, color }: ToggleIconProps): import("react/jsx-runtime").JSX.Element;
105
+ declare function ToggleIcon({ name, size, color }: ToggleIconProps): React.JSX.Element;
105
106
  export { Toggle, ToggleIcon };
106
107
  export type { ToggleProps };
@@ -1,5 +1,6 @@
1
1
  import type { IconName } from "./Icon";
2
2
  import * as ToggleGroupPrimitive from "@rn-primitives/toggle-group";
3
+ import * as React from "react";
3
4
  type ToggleGroupVariant = "default" | "outline";
4
5
  type ToggleGroupSize = "sm" | "default" | "lg";
5
6
  type ToggleGroupProps = ToggleGroupPrimitive.RootProps & {
@@ -41,7 +42,7 @@ type ToggleGroupProps = ToggleGroupPrimitive.RootProps & {
41
42
  * </ToggleGroup>
42
43
  * ```
43
44
  */
44
- declare function ToggleGroup({ variant, size, children, ...props }: ToggleGroupProps): import("react/jsx-runtime").JSX.Element;
45
+ declare function ToggleGroup({ variant, size, children, ...props }: ToggleGroupProps): React.JSX.Element;
45
46
  type ToggleGroupItemProps = ToggleGroupPrimitive.ItemProps & {
46
47
  /**
47
48
  * Automatically set by ToggleGroup parent - don't set manually
@@ -57,7 +58,7 @@ type ToggleGroupItemProps = ToggleGroupPrimitive.ItemProps & {
57
58
  * Individual toggle button within a ToggleGroup
58
59
  * Position (first/last) is automatically detected for rounded corners
59
60
  */
60
- declare function ToggleGroupItem({ isFirst, isLast, children, ...props }: ToggleGroupItemProps): import("react/jsx-runtime").JSX.Element;
61
+ declare function ToggleGroupItem({ isFirst, isLast, children, ...props }: ToggleGroupItemProps): React.JSX.Element;
61
62
  /**
62
63
  * ToggleGroupIcon Component
63
64
  * Icon wrapper for use inside ToggleGroup items
@@ -75,6 +76,6 @@ interface ToggleGroupIconProps {
75
76
  size?: number;
76
77
  color?: string;
77
78
  }
78
- declare function ToggleGroupIcon({ name, size, color }: ToggleGroupIconProps): import("react/jsx-runtime").JSX.Element;
79
+ declare function ToggleGroupIcon({ name, size, color }: ToggleGroupIconProps): React.JSX.Element;
79
80
  export { ToggleGroup, ToggleGroupIcon, ToggleGroupItem };
80
81
  export type { ToggleGroupProps, ToggleGroupSize, ToggleGroupVariant };
@@ -41,7 +41,7 @@ interface TooltipContentProps extends TooltipPrimitive.ContentProps {
41
41
  * - Smooth animations
42
42
  * - Portal-based rendering for proper z-index
43
43
  */
44
- declare function TooltipContent({ side, align, sideOffset, portalHost, variant, ...props }: TooltipContentProps): import("react/jsx-runtime").JSX.Element;
44
+ declare function TooltipContent({ side, align, sideOffset, portalHost, variant, ...props }: TooltipContentProps): React.JSX.Element;
45
45
  /**
46
46
  * Tooltip Body Component
47
47
  * Simple wrapper for tooltip content with padding
@@ -49,7 +49,7 @@ declare function TooltipContent({ side, align, sideOffset, portalHost, variant,
49
49
  interface TooltipBodyProps extends ViewProps {
50
50
  children: React.ReactNode;
51
51
  }
52
- declare function TooltipBody({ children, style, ...props }: TooltipBodyProps): import("react/jsx-runtime").JSX.Element;
52
+ declare function TooltipBody({ children, style, ...props }: TooltipBodyProps): React.JSX.Element;
53
53
  interface TooltipProps extends TooltipPrimitive.RootProps {
54
54
  /**
55
55
  * Time to wait before showing tooltip (web only)
@@ -99,7 +99,7 @@ interface TooltipProps extends TooltipPrimitive.RootProps {
99
99
  * </Tooltip>
100
100
  * ```
101
101
  */
102
- declare function Tooltip({ delayDuration, skipDelayDuration, ...props }: TooltipProps): import("react/jsx-runtime").JSX.Element;
102
+ declare function Tooltip({ delayDuration, skipDelayDuration, ...props }: TooltipProps): React.JSX.Element;
103
103
  /**
104
104
  * Tooltip Component with Sub-components
105
105
  * Properly typed interface for dot notation access (e.g., Tooltip.Trigger)
@@ -20,4 +20,4 @@ export interface UIProviderProps {
20
20
  */
21
21
  statusBar?: boolean;
22
22
  }
23
- export declare function UIProvider({ children, notification, portalHost, statusBar, }: UIProviderProps): import("react/jsx-runtime").JSX.Element;
23
+ export declare function UIProvider({ children, notification, portalHost, statusBar, }: UIProviderProps): React.JSX.Element;
@@ -8,9 +8,16 @@
8
8
  * - show({ type, title, messages, duration, loading, action }): displays a notification
9
9
  * - hide(): hides the current notification
10
10
  *
11
- * Recommended: wrap in hooks or utility functions for cleaner usage across components.
11
+ * Notifications auto-dismiss after `DEFAULT_NOTIFICATION_DURATION` unless a
12
+ * `duration` is given. Pass `duration: 0` to keep one up until dismissed;
13
+ * loading notifications never auto-dismiss.
14
+ *
15
+ * Prefer the `notify` helpers (see ./notify) for triggering notifications from
16
+ * app code; use this store directly for reactive subscription (selectors) and tests.
12
17
  */
13
18
  export type GlobalNotificationType = "error" | "success" | "info" | "warning";
19
+ /** Auto-dismiss delay applied when `show()` is called without a `duration`. */
20
+ export declare const DEFAULT_NOTIFICATION_DURATION = 4000;
14
21
  export type GlobalNotificationPosition = "top" | "bottom";
15
22
  export type GlobalNotificationAction = {
16
23
  label: string;
@@ -21,6 +28,7 @@ export type GlobalNotificationAlert = {
21
28
  type: GlobalNotificationType;
22
29
  title?: string;
23
30
  messages?: string[];
31
+ /** Auto-dismiss delay in ms. Defaults to `DEFAULT_NOTIFICATION_DURATION`; 0 = stays until dismissed. */
24
32
  duration?: number;
25
33
  loading?: boolean;
26
34
  /** Where to display the notification */
@@ -1,8 +1,16 @@
1
1
  import { create } from "zustand";
2
+ /** Auto-dismiss delay applied when `show()` is called without a `duration`. */
3
+ export const DEFAULT_NOTIFICATION_DURATION = 4000;
2
4
  export const globalUIStore = create((set) => ({
3
5
  alert: null,
4
6
  show: (alert) => set({
5
- alert: { ...alert, show: true }
7
+ alert: {
8
+ ...alert,
9
+ // Loading notifications stay up until replaced or hidden (e.g. by
10
+ // notify.promise); everything else falls back to the default timeout.
11
+ duration: alert.duration ?? (alert.loading ? undefined : DEFAULT_NOTIFICATION_DURATION),
12
+ show: true,
13
+ },
6
14
  }),
7
15
  hide: () => set({ alert: null }),
8
16
  }));
@@ -1,4 +1,5 @@
1
1
  export * from "./globalUIStore";
2
+ export * from "./notify";
2
3
  export * from "./themeStore";
3
4
  export * from "./themeColorScope";
4
5
  export * from "./SsrViewportContext";
@@ -1,4 +1,5 @@
1
1
  export * from "./globalUIStore.js";
2
+ export * from "./notify.js";
2
3
  export * from "./themeStore.js";
3
4
  export * from "./themeColorScope.js";
4
5
  export * from "./SsrViewportContext.js";
@@ -0,0 +1,50 @@
1
+ import type { GlobalNotificationAlert } from "./globalUIStore";
2
+ /**
3
+ * notify
4
+ *
5
+ * Imperative notification API backed by `globalUIStore`. This is the
6
+ * recommended way to trigger the `Notification` component from app code.
7
+ *
8
+ * Notifications auto-dismiss after `DEFAULT_NOTIFICATION_DURATION` (4s) by
9
+ * default. Pass `duration: 0` to keep one up until dismissed; `notify.loading`
10
+ * is always persistent.
11
+ *
12
+ * Usage:
13
+ * ```ts
14
+ * notify.success("Saved", { messages: ["Your changes have been saved."] });
15
+ * notify.error("Upload failed");
16
+ * notify.loading("Uploading…");
17
+ * notify.hide();
18
+ *
19
+ * // Full control (same payload as globalUIStore show())
20
+ * notify({ type: "info", title: "Copied", duration: 2000, position: "bottom" });
21
+ *
22
+ * // Loading → success/error around a promise
23
+ * await notify.promise(saveProfile(), {
24
+ * loading: "Saving…",
25
+ * success: "Profile saved",
26
+ * error: "Could not save profile",
27
+ * });
28
+ * ```
29
+ */
30
+ export type NotifyOptions = Omit<GlobalNotificationAlert, "show" | "type" | "title">;
31
+ export type NotifyPromiseMessages<T> = {
32
+ loading: string;
33
+ success: string | ((value: T) => string);
34
+ error: string | ((error: unknown) => string);
35
+ };
36
+ export declare const notify: ((alert: Omit<GlobalNotificationAlert, "show">) => void) & {
37
+ success: (title: string, options?: NotifyOptions) => void;
38
+ error: (title: string, options?: NotifyOptions) => void;
39
+ info: (title: string, options?: NotifyOptions) => void;
40
+ warning: (title: string, options?: NotifyOptions) => void;
41
+ /** Persistent spinner notification; stays visible until replaced or hidden. */
42
+ loading: (title: string, options?: NotifyOptions) => void;
43
+ /**
44
+ * Shows a loading notification while the promise is pending, then a
45
+ * success or error notification. Rethrows on rejection and returns the
46
+ * resolved value so it can wrap existing async flows transparently.
47
+ */
48
+ promise: <T>(promise: Promise<T>, messages: NotifyPromiseMessages<T>) => Promise<T>;
49
+ hide: () => void;
50
+ };