@mrmeg/expo-ui 0.7.2 → 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 (59) 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 +96 -20
  7. package/dist/components/BottomSheet.js +203 -444
  8. package/dist/components/Button.d.ts +3 -3
  9. package/dist/components/Button.js +17 -1
  10. package/dist/components/Card.d.ts +6 -6
  11. package/dist/components/Checkbox.d.ts +2 -1
  12. package/dist/components/Collapsible.d.ts +4 -3
  13. package/dist/components/Dialog.d.ts +10 -10
  14. package/dist/components/Dialog.js +16 -8
  15. package/dist/components/DismissKeyboard.d.ts +1 -1
  16. package/dist/components/Drawer.d.ts +7 -7
  17. package/dist/components/DropdownMenu.d.ts +10 -10
  18. package/dist/components/EmptyState.d.ts +1 -1
  19. package/dist/components/ErrorBoundary.d.ts +1 -1
  20. package/dist/components/Icon.d.ts +1 -1
  21. package/dist/components/InputOTP.d.ts +2 -1
  22. package/dist/components/Label.d.ts +1 -1
  23. package/dist/components/MaxWidthContainer.d.ts +1 -1
  24. package/dist/components/Notification.d.ts +4 -10
  25. package/dist/components/Notification.js +12 -13
  26. package/dist/components/Popover.d.ts +4 -4
  27. package/dist/components/Progress.d.ts +2 -1
  28. package/dist/components/RadioGroup.d.ts +3 -2
  29. package/dist/components/SegmentedControl.d.ts +53 -0
  30. package/dist/components/SegmentedControl.js +25 -0
  31. package/dist/components/Select.d.ts +7 -7
  32. package/dist/components/Separator.d.ts +2 -1
  33. package/dist/components/Skeleton.d.ts +5 -4
  34. package/dist/components/Slider.d.ts +24 -3
  35. package/dist/components/Slider.js +26 -147
  36. package/dist/components/StatusBar.d.ts +1 -1
  37. package/dist/components/StyledText.d.ts +12 -12
  38. package/dist/components/Switch.d.ts +2 -1
  39. package/dist/components/Tabs.d.ts +5 -5
  40. package/dist/components/Tabs.js +10 -2
  41. package/dist/components/TextInput.d.ts +1 -1
  42. package/dist/components/TextInput.js +129 -2
  43. package/dist/components/Toggle.d.ts +3 -2
  44. package/dist/components/ToggleGroup.d.ts +4 -3
  45. package/dist/components/Tooltip.d.ts +3 -3
  46. package/dist/components/UIProvider.d.ts +1 -1
  47. package/dist/components/index.d.ts +1 -0
  48. package/dist/components/index.js +1 -0
  49. package/dist/state/globalUIStore.d.ts +9 -1
  50. package/dist/state/globalUIStore.js +9 -1
  51. package/dist/state/index.d.ts +1 -0
  52. package/dist/state/index.js +1 -0
  53. package/dist/state/notify.d.ts +50 -0
  54. package/dist/state/notify.js +31 -0
  55. package/dist/state/themeColorScope.d.ts +1 -1
  56. package/llms-full.md +34 -3
  57. package/package.json +3 -2
  58. package/dist/components/BottomSheetKeyboard.d.ts +0 -7
  59. package/dist/components/BottomSheetKeyboard.js +0 -39
@@ -141,7 +141,7 @@ export interface ButtonProps extends PressableProps {
141
141
  * </Button>
142
142
  * ```
143
143
  */
144
- declare function ButtonRoot(props: ButtonProps): import("react/jsx-runtime").JSX.Element;
144
+ declare function ButtonRoot(props: ButtonProps): React.JSX.Element;
145
145
  /**
146
146
  * Button.Text
147
147
  * Text content for a Button. Inherits the button's control typography, color,
@@ -154,7 +154,7 @@ declare function ButtonRoot(props: ButtonProps): import("react/jsx-runtime").JSX
154
154
  * </Button>
155
155
  * ```
156
156
  */
157
- declare function ButtonText(props: TextProps): import("react/jsx-runtime").JSX.Element;
157
+ declare function ButtonText(props: TextProps): React.JSX.Element;
158
158
  /**
159
159
  * Button.Icon
160
160
  * Icon content for a Button. Defaults its color to the button's text color
@@ -167,7 +167,7 @@ declare function ButtonText(props: TextProps): import("react/jsx-runtime").JSX.E
167
167
  * </Button>
168
168
  * ```
169
169
  */
170
- declare function ButtonIcon(props: IconProps): import("react/jsx-runtime").JSX.Element;
170
+ declare function ButtonIcon(props: IconProps): React.JSX.Element;
171
171
  /**
172
172
  * Button with explicit subcomponents.
173
173
  * - `Button.Text` for label text (inherits control typography)
@@ -121,7 +121,23 @@ function ButtonRoot(props) {
121
121
  scaleTo: preset === "link" ? 1 : 0.97,
122
122
  });
123
123
  const showFocusRing = (event) => {
124
- setFocused(true);
124
+ // On web, pointer taps focus the element too, which left the ring visible
125
+ // after every click. :focus-visible is only true for keyboard-driven
126
+ // focus, so gate the ring on it; fall back to showing the ring when the
127
+ // target can't be queried (non-DOM targets, older engines).
128
+ let ringVisible = true;
129
+ if (Platform.OS === "web") {
130
+ const target = event?.nativeEvent?.target;
131
+ if (target && typeof target.matches === "function") {
132
+ try {
133
+ ringVisible = target.matches(":focus-visible");
134
+ }
135
+ catch {
136
+ ringVisible = true;
137
+ }
138
+ }
139
+ }
140
+ setFocused(ringVisible);
125
141
  onFocus?.(event);
126
142
  };
127
143
  const hideFocusRing = (event) => {
@@ -13,30 +13,30 @@ export interface CardProps {
13
13
  /** Whether the card is disabled (only relevant when onPress is set) */
14
14
  disabled?: boolean;
15
15
  }
16
- declare function Card({ children, style: styleOverride, variant, onPress, disabled }: CardProps): import("react/jsx-runtime").JSX.Element;
16
+ declare function Card({ children, style: styleOverride, variant, onPress, disabled }: CardProps): React.JSX.Element;
17
17
  export interface CardHeaderProps {
18
18
  children?: React.ReactNode;
19
19
  style?: StyleProp<ViewStyle>;
20
20
  }
21
- declare function CardHeader({ children, style: styleOverride }: CardHeaderProps): import("react/jsx-runtime").JSX.Element;
21
+ declare function CardHeader({ children, style: styleOverride }: CardHeaderProps): React.JSX.Element;
22
22
  export interface CardContentProps {
23
23
  children?: React.ReactNode;
24
24
  style?: StyleProp<ViewStyle>;
25
25
  }
26
- declare function CardContent({ children, style: styleOverride }: CardContentProps): import("react/jsx-runtime").JSX.Element;
26
+ declare function CardContent({ children, style: styleOverride }: CardContentProps): React.JSX.Element;
27
27
  export interface CardFooterProps {
28
28
  children?: React.ReactNode;
29
29
  style?: StyleProp<ViewStyle>;
30
30
  }
31
- declare function CardFooter({ children, style: styleOverride }: CardFooterProps): import("react/jsx-runtime").JSX.Element;
31
+ declare function CardFooter({ children, style: styleOverride }: CardFooterProps): React.JSX.Element;
32
32
  export interface CardTitleProps extends Omit<TextProps, "style"> {
33
33
  children?: React.ReactNode;
34
34
  style?: StyleProp<TextStyle>;
35
35
  }
36
- declare function CardTitle({ children, style: styleOverride, ...props }: CardTitleProps): import("react/jsx-runtime").JSX.Element;
36
+ declare function CardTitle({ children, style: styleOverride, ...props }: CardTitleProps): React.JSX.Element;
37
37
  export interface CardDescriptionProps extends Omit<TextProps, "style"> {
38
38
  children?: React.ReactNode;
39
39
  style?: StyleProp<TextStyle>;
40
40
  }
41
- declare function CardDescription({ children, style: styleOverride, ...props }: CardDescriptionProps): import("react/jsx-runtime").JSX.Element;
41
+ declare function CardDescription({ children, style: styleOverride, ...props }: CardDescriptionProps): React.JSX.Element;
42
42
  export { Card, CardHeader, CardContent, CardFooter, CardTitle, CardDescription };
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import { StyleProp, ViewStyle } from "react-native";
2
3
  import * as CheckboxPrimitive from "@rn-primitives/checkbox";
3
4
  /**
@@ -35,5 +36,5 @@ export interface CheckboxProps extends Omit<CheckboxPrimitive.RootProps, "style"
35
36
  */
36
37
  required?: boolean;
37
38
  }
38
- declare function Checkbox({ size, label, indeterminate, error, style: styleOverride, labelStyle, required, checked, onCheckedChange, disabled, ...props }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
39
+ declare function Checkbox({ size, label, indeterminate, error, style: styleOverride, labelStyle, required, checked, onCheckedChange, disabled, ...props }: CheckboxProps): React.JSX.Element;
39
40
  export { Checkbox };
@@ -1,3 +1,4 @@
1
+ import * as React from "react";
1
2
  import * as CollapsiblePrimitive from "@rn-primitives/collapsible";
2
3
  /**
3
4
  * Collapsible Component (Root)
@@ -18,7 +19,7 @@ import * as CollapsiblePrimitive from "@rn-primitives/collapsible";
18
19
  * ```
19
20
  */
20
21
  type CollapsibleProps = CollapsiblePrimitive.RootProps;
21
- declare function Collapsible({ children, ...props }: CollapsibleProps): import("react/jsx-runtime").JSX.Element;
22
+ declare function Collapsible({ children, ...props }: CollapsibleProps): React.JSX.Element;
22
23
  /**
23
24
  * CollapsibleTrigger Component
24
25
  * The trigger button/element that toggles the collapsible state
@@ -40,7 +41,7 @@ declare function Collapsible({ children, ...props }: CollapsibleProps): import("
40
41
  * ```
41
42
  */
42
43
  type CollapsibleTriggerProps = CollapsiblePrimitive.TriggerProps;
43
- declare function CollapsibleTrigger({ style: styleOverride, ...props }: CollapsibleTriggerProps): import("react/jsx-runtime").JSX.Element;
44
+ declare function CollapsibleTrigger({ style: styleOverride, ...props }: CollapsibleTriggerProps): React.JSX.Element;
44
45
  /**
45
46
  * CollapsibleContent Component
46
47
  * The content that expands and collapses
@@ -62,6 +63,6 @@ type CollapsibleContentProps = CollapsiblePrimitive.ContentProps & {
62
63
  */
63
64
  forceMount?: boolean;
64
65
  };
65
- declare function CollapsibleContent({ forceMount, style: styleOverride, children, ...props }: CollapsibleContentProps): import("react/jsx-runtime").JSX.Element;
66
+ declare function CollapsibleContent({ forceMount, style: styleOverride, children, ...props }: CollapsibleContentProps): React.JSX.Element;
66
67
  export { Collapsible, CollapsibleContent, CollapsibleTrigger };
67
68
  export type { CollapsibleContentProps, CollapsibleProps, CollapsibleTriggerProps };
@@ -23,19 +23,19 @@ declare const DialogClose: {
23
23
  interface DialogProps extends DialogPrimitive.RootProps {
24
24
  children: React.ReactNode;
25
25
  }
26
- declare function DialogRoot({ children, ...props }: DialogProps): import("react/jsx-runtime").JSX.Element;
26
+ declare function DialogRoot({ children, ...props }: DialogProps): React.JSX.Element;
27
27
  interface DialogContentProps extends DialogPrimitive.ContentProps {
28
28
  portalHost?: string;
29
29
  }
30
- declare function DialogContent({ portalHost, style, children, ...props }: DialogContentProps): import("react/jsx-runtime").JSX.Element;
31
- declare function DialogHeader({ children, style, ...props }: ViewProps): import("react/jsx-runtime").JSX.Element;
32
- declare function DialogFooter({ children, style, ...props }: ViewProps): import("react/jsx-runtime").JSX.Element;
30
+ declare function DialogContent({ portalHost, style, children, ...props }: DialogContentProps): React.JSX.Element;
31
+ declare function DialogHeader({ children, style, ...props }: ViewProps): React.JSX.Element;
32
+ declare function DialogFooter({ children, style, ...props }: ViewProps): React.JSX.Element;
33
33
  declare function DialogTitle({ children, style, ...props }: DialogPrimitive.TitleProps & {
34
34
  children: React.ReactNode;
35
- }): import("react/jsx-runtime").JSX.Element;
35
+ }): React.JSX.Element;
36
36
  declare function DialogDescription({ children, style, ...props }: DialogPrimitive.DescriptionProps & {
37
37
  children: React.ReactNode;
38
- }): import("react/jsx-runtime").JSX.Element;
38
+ }): React.JSX.Element;
39
39
  declare const Dialog: typeof DialogRoot & {
40
40
  Trigger: {
41
41
  ({ asChild, onPress: onPressProp, disabled, ref, ...props }: Omit<import("react-native").PressableProps & React.RefAttributes<View>, "ref"> & {
@@ -91,17 +91,17 @@ declare const AlertDialogCancel: {
91
91
  interface AlertDialogProps extends AlertDialogPrimitive.RootProps {
92
92
  children: React.ReactNode;
93
93
  }
94
- declare function AlertDialogRoot({ children, ...props }: AlertDialogProps): import("react/jsx-runtime").JSX.Element;
94
+ declare function AlertDialogRoot({ children, ...props }: AlertDialogProps): React.JSX.Element;
95
95
  interface AlertDialogContentProps extends AlertDialogPrimitive.ContentProps {
96
96
  portalHost?: string;
97
97
  }
98
- declare function AlertDialogContent({ portalHost, style, children, ...props }: AlertDialogContentProps): import("react/jsx-runtime").JSX.Element;
98
+ declare function AlertDialogContent({ portalHost, style, children, ...props }: AlertDialogContentProps): React.JSX.Element;
99
99
  declare function AlertDialogTitle({ children, style, ...props }: AlertDialogPrimitive.TitleProps & {
100
100
  children: React.ReactNode;
101
- }): import("react/jsx-runtime").JSX.Element;
101
+ }): React.JSX.Element;
102
102
  declare function AlertDialogDescription({ children, style, ...props }: AlertDialogPrimitive.DescriptionProps & {
103
103
  children: React.ReactNode;
104
- }): import("react/jsx-runtime").JSX.Element;
104
+ }): React.JSX.Element;
105
105
  declare const AlertDialog: typeof AlertDialogRoot & {
106
106
  Trigger: {
107
107
  ({ asChild, onPress: onPressProp, disabled, ref, ...props }: Omit<import("react-native").PressableProps & React.RefAttributes<View>, "ref"> & {
@@ -26,16 +26,14 @@ function DialogContent({ portalHost, style, children, ...props }) {
26
26
  StyleSheet.absoluteFill,
27
27
  { backgroundColor: theme.colors.overlay },
28
28
  Platform.OS === "web" && { zIndex: 50 },
29
- ]), children: _jsx(AnimatedView, { type: "fade", enterDuration: 200, children: _jsx(View, { style: overlayStyles.centeredContainer, children: _jsx(AnimatedView, { type: "scale", enterDuration: 250, children: _jsx(TextColorContext.Provider, { value: textColor, children: _jsx(TextClassContext.Provider, { value: "", children: _jsx(DialogPrimitive.Content, { style: StyleSheet.flatten([
29
+ ]), children: _jsx(AnimatedView, { type: "fade", enterDuration: 200, style: StyleSheet.absoluteFill, children: _jsx(View, { style: overlayStyles.centeredContainer, children: _jsx(AnimatedView, { type: "scale", enterDuration: 250, style: overlayStyles.sizer, children: _jsx(TextColorContext.Provider, { value: textColor, children: _jsx(TextClassContext.Provider, { value: "", children: _jsx(DialogPrimitive.Content, { style: StyleSheet.flatten([
30
30
  {
31
31
  backgroundColor: theme.colors.popover,
32
32
  borderColor: theme.colors.border,
33
33
  borderWidth: 1,
34
34
  borderRadius: spacing.radiusLg,
35
35
  padding: spacing.lg,
36
- width: "90%",
37
- maxWidth: 450,
38
- maxHeight: "85%",
36
+ width: "100%",
39
37
  ...getShadowStyle("soft"),
40
38
  },
41
39
  style,
@@ -103,16 +101,14 @@ function AlertDialogContent({ portalHost, style, children, ...props }) {
103
101
  StyleSheet.absoluteFill,
104
102
  { backgroundColor: theme.colors.overlay },
105
103
  Platform.OS === "web" && { zIndex: 52 },
106
- ]), children: _jsx(AnimatedView, { type: "fade", enterDuration: 200, children: _jsx(View, { style: overlayStyles.centeredContainer, children: _jsx(AnimatedView, { type: "scale", enterDuration: 250, children: _jsx(TextColorContext.Provider, { value: textColor, children: _jsx(TextClassContext.Provider, { value: "", children: _jsx(AlertDialogPrimitive.Content, { style: StyleSheet.flatten([
104
+ ]), children: _jsx(AnimatedView, { type: "fade", enterDuration: 200, style: StyleSheet.absoluteFill, children: _jsx(View, { style: overlayStyles.centeredContainer, children: _jsx(AnimatedView, { type: "scale", enterDuration: 250, style: overlayStyles.sizer, children: _jsx(TextColorContext.Provider, { value: textColor, children: _jsx(TextClassContext.Provider, { value: "", children: _jsx(AlertDialogPrimitive.Content, { style: StyleSheet.flatten([
107
105
  {
108
106
  backgroundColor: theme.colors.popover,
109
107
  borderColor: theme.colors.border,
110
108
  borderWidth: 1,
111
109
  borderRadius: spacing.radiusLg,
112
110
  padding: spacing.lg,
113
- width: "90%",
114
- maxWidth: 450,
115
- maxHeight: "85%",
111
+ width: "100%",
116
112
  ...getShadowStyle("soft"),
117
113
  },
118
114
  style,
@@ -160,6 +156,18 @@ const overlayStyles = StyleSheet.create({
160
156
  justifyContent: "center",
161
157
  alignItems: "center",
162
158
  },
159
+ // Sizes the dialog relative to the full-screen centered container. Both the
160
+ // width AND maxHeight must live on this wrapper (the direct flex child of the
161
+ // full-screen container) rather than on Content: a percentage resolves
162
+ // against the parent's resolved box, and this wrapper's box is the screen.
163
+ // Putting `maxHeight: "85%"` on Content instead resolves it against this
164
+ // (content-sized) wrapper — clamping the card to 85% of its own content
165
+ // height, so the footer spills out the bottom.
166
+ sizer: {
167
+ width: "90%",
168
+ maxWidth: 450,
169
+ maxHeight: "85%",
170
+ },
163
171
  });
164
172
  // ============================================================================
165
173
  // Exports
@@ -11,5 +11,5 @@ type Props = {
11
11
  /**
12
12
  * @returns Wrapper for a view that dismisses the keyboard when tapped outside of a text input
13
13
  */
14
- export declare const DismissKeyboard: ({ children, style, avoidKeyboard, scrollable }: Props) => import("react/jsx-runtime").JSX.Element;
14
+ export declare const DismissKeyboard: ({ children, style, avoidKeyboard, scrollable }: Props) => React.JSX.Element;
15
15
  export {};
@@ -46,12 +46,12 @@ interface DrawerBodyProps extends ViewProps {
46
46
  interface DrawerFooterProps extends ViewProps {
47
47
  children: React.ReactNode;
48
48
  }
49
- declare function DrawerRoot({ open: controlledOpen, onOpenChange: controlledOnOpenChange, defaultOpen, side, width, closeOnBackdropPress, children, }: DrawerProps): import("react/jsx-runtime").JSX.Element;
50
- declare function DrawerTrigger({ asChild, children, style: styleOverride }: DrawerTriggerProps): import("react/jsx-runtime").JSX.Element;
51
- declare function DrawerContent({ swipeEnabled, swipeThreshold, velocityThreshold, style: styleOverride, children, ...props }: DrawerContentProps): import("react/jsx-runtime").JSX.Element | null;
52
- declare function DrawerHeader({ children, style, ...props }: DrawerHeaderProps): import("react/jsx-runtime").JSX.Element;
53
- declare function DrawerBody({ children, style, ...props }: DrawerBodyProps): import("react/jsx-runtime").JSX.Element;
54
- declare function DrawerFooter({ children, style, ...props }: DrawerFooterProps): import("react/jsx-runtime").JSX.Element;
49
+ declare function DrawerRoot({ open: controlledOpen, onOpenChange: controlledOnOpenChange, defaultOpen, side, width, closeOnBackdropPress, children, }: DrawerProps): React.JSX.Element;
50
+ declare function DrawerTrigger({ asChild, children, style: styleOverride }: DrawerTriggerProps): React.JSX.Element;
51
+ declare function DrawerContent({ swipeEnabled, swipeThreshold, velocityThreshold, style: styleOverride, children, ...props }: DrawerContentProps): React.JSX.Element | null;
52
+ declare function DrawerHeader({ children, style, ...props }: DrawerHeaderProps): React.JSX.Element;
53
+ declare function DrawerBody({ children, style, ...props }: DrawerBodyProps): React.JSX.Element;
54
+ declare function DrawerFooter({ children, style, ...props }: DrawerFooterProps): React.JSX.Element;
55
55
  declare function useDrawerClose(): () => void;
56
56
  interface DrawerCloseProps {
57
57
  /** Use child component as close button */
@@ -61,7 +61,7 @@ interface DrawerCloseProps {
61
61
  /** Optional style override */
62
62
  style?: StyleProp<ViewStyle>;
63
63
  }
64
- declare function DrawerClose({ asChild, children, style: styleOverride }: DrawerCloseProps): import("react/jsx-runtime").JSX.Element;
64
+ declare function DrawerClose({ asChild, children, style: styleOverride }: DrawerCloseProps): React.JSX.Element;
65
65
  declare const Drawer: typeof DrawerRoot & {
66
66
  Trigger: typeof DrawerTrigger;
67
67
  Content: typeof DrawerContent;
@@ -46,7 +46,7 @@ declare const DropdownMenuRadioGroup: {
46
46
  * props over slot props), so this only fills the gap when none is set.
47
47
  */
48
48
  type DropdownMenuTriggerProps = DropdownMenuPrimitive.TriggerProps;
49
- declare function DropdownMenuTrigger({ ...props }: DropdownMenuTriggerProps): import("react/jsx-runtime").JSX.Element;
49
+ declare function DropdownMenuTrigger({ ...props }: DropdownMenuTriggerProps): React.JSX.Element;
50
50
  /**
51
51
  * DropdownMenuSubTrigger Component
52
52
  * Trigger for sub-menus with automatic chevron icon
@@ -55,13 +55,13 @@ declare function DropdownMenuTrigger({ ...props }: DropdownMenuTriggerProps): im
55
55
  type DropdownMenuSubTriggerProps = DropdownMenuPrimitive.SubTriggerProps & {
56
56
  inset?: boolean;
57
57
  };
58
- declare function DropdownMenuSubTrigger({ inset, children, style: styleOverride, ...props }: DropdownMenuSubTriggerProps): import("react/jsx-runtime").JSX.Element;
58
+ declare function DropdownMenuSubTrigger({ inset, children, style: styleOverride, ...props }: DropdownMenuSubTriggerProps): React.JSX.Element;
59
59
  /**
60
60
  * DropdownMenuSubContent Component
61
61
  * Content container for sub-menus
62
62
  */
63
63
  type DropdownMenuSubContentProps = DropdownMenuPrimitive.SubContentProps;
64
- declare function DropdownMenuSubContent({ style: styleOverride, ...props }: DropdownMenuSubContentProps): import("react/jsx-runtime").JSX.Element;
64
+ declare function DropdownMenuSubContent({ style: styleOverride, ...props }: DropdownMenuSubContentProps): React.JSX.Element;
65
65
  /**
66
66
  * DropdownMenuContent Component
67
67
  * Main dropdown content with portal, overlay, and animation
@@ -74,7 +74,7 @@ declare function DropdownMenuSubContent({ style: styleOverride, ...props }: Drop
74
74
  type DropdownMenuContentProps = DropdownMenuPrimitive.ContentProps & {
75
75
  portalHost?: string;
76
76
  };
77
- declare function DropdownMenuContent({ side, align, sideOffset, portalHost, style: styleOverride, ...props }: DropdownMenuContentProps): import("react/jsx-runtime").JSX.Element;
77
+ declare function DropdownMenuContent({ side, align, sideOffset, portalHost, style: styleOverride, ...props }: DropdownMenuContentProps): React.JSX.Element;
78
78
  /**
79
79
  * DropdownMenuItem Component
80
80
  * Standard menu item with optional destructive variant
@@ -83,19 +83,19 @@ type DropdownMenuItemProps = DropdownMenuPrimitive.ItemProps & {
83
83
  inset?: boolean;
84
84
  variant?: "default" | "destructive";
85
85
  };
86
- declare function DropdownMenuItem({ inset, variant, style: styleOverride, ...props }: DropdownMenuItemProps): import("react/jsx-runtime").JSX.Element;
86
+ declare function DropdownMenuItem({ inset, variant, style: styleOverride, ...props }: DropdownMenuItemProps): React.JSX.Element;
87
87
  /**
88
88
  * DropdownMenuCheckboxItem Component
89
89
  * Menu item with checkbox indicator
90
90
  */
91
91
  type DropdownMenuCheckboxItemProps = DropdownMenuPrimitive.CheckboxItemProps;
92
- declare function DropdownMenuCheckboxItem({ children, style: styleOverride, ...props }: DropdownMenuCheckboxItemProps): import("react/jsx-runtime").JSX.Element;
92
+ declare function DropdownMenuCheckboxItem({ children, style: styleOverride, ...props }: DropdownMenuCheckboxItemProps): React.JSX.Element;
93
93
  /**
94
94
  * DropdownMenuRadioItem Component
95
95
  * Menu item with radio button indicator
96
96
  */
97
97
  type DropdownMenuRadioItemProps = DropdownMenuPrimitive.RadioItemProps;
98
- declare function DropdownMenuRadioItem({ children, style: styleOverride, ...props }: DropdownMenuRadioItemProps): import("react/jsx-runtime").JSX.Element;
98
+ declare function DropdownMenuRadioItem({ children, style: styleOverride, ...props }: DropdownMenuRadioItemProps): React.JSX.Element;
99
99
  /**
100
100
  * DropdownMenuLabel Component
101
101
  * Label for menu sections
@@ -103,13 +103,13 @@ declare function DropdownMenuRadioItem({ children, style: styleOverride, ...prop
103
103
  type DropdownMenuLabelProps = DropdownMenuPrimitive.LabelProps & {
104
104
  inset?: boolean;
105
105
  };
106
- declare function DropdownMenuLabel({ inset, style: styleOverride, ...props }: DropdownMenuLabelProps): import("react/jsx-runtime").JSX.Element;
106
+ declare function DropdownMenuLabel({ inset, style: styleOverride, ...props }: DropdownMenuLabelProps): React.JSX.Element;
107
107
  /**
108
108
  * DropdownMenuSeparator Component
109
109
  * Visual divider between menu sections
110
110
  */
111
111
  type DropdownMenuSeparatorProps = DropdownMenuPrimitive.SeparatorProps;
112
- declare function DropdownMenuSeparator({ style: styleOverride, ...props }: DropdownMenuSeparatorProps): import("react/jsx-runtime").JSX.Element;
112
+ declare function DropdownMenuSeparator({ style: styleOverride, ...props }: DropdownMenuSeparatorProps): React.JSX.Element;
113
113
  /**
114
114
  * DropdownMenuShortcut Component
115
115
  * Text component for displaying keyboard shortcuts
@@ -119,6 +119,6 @@ interface DropdownMenuShortcutProps {
119
119
  text?: string;
120
120
  style?: TextStyle;
121
121
  }
122
- declare function DropdownMenuShortcut({ children, text, style: styleOverride, ...props }: DropdownMenuShortcutProps): import("react/jsx-runtime").JSX.Element;
122
+ declare function DropdownMenuShortcut({ children, text, style: styleOverride, ...props }: DropdownMenuShortcutProps): React.JSX.Element;
123
123
  export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, };
124
124
  export type { DropdownMenuTriggerProps, DropdownMenuSubTriggerProps, DropdownMenuSubContentProps, DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuCheckboxItemProps, DropdownMenuRadioItemProps, DropdownMenuLabelProps, DropdownMenuSeparatorProps, DropdownMenuShortcutProps, };
@@ -39,4 +39,4 @@ export interface EmptyStateProps {
39
39
  * />
40
40
  * ```
41
41
  */
42
- export declare function EmptyState({ icon, iconSize, title, description, actionLabel, onAction, actionPreset, style, children, }: EmptyStateProps): import("react/jsx-runtime").JSX.Element;
42
+ export declare function EmptyState({ icon, iconSize, title, description, actionLabel, onAction, actionPreset, style, children, }: EmptyStateProps): React.JSX.Element;
@@ -52,6 +52,6 @@ export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBo
52
52
  resetError: () => void;
53
53
  static getDerivedStateFromError(error: Error): Partial<ErrorBoundaryState>;
54
54
  componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
55
- render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
55
+ render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
56
56
  }
57
57
  export {};
@@ -45,5 +45,5 @@ export type IconProps = FeatherIconProps | CustomIconProps;
45
45
  * <Icon name="terminal" style={{ marginRight: 8 }} />
46
46
  * ```
47
47
  */
48
- export declare function Icon(props: IconProps): import("react/jsx-runtime").JSX.Element;
48
+ export declare function Icon(props: IconProps): React.JSX.Element;
49
49
  export {};
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import { StyleProp, ViewStyle } from "react-native";
2
3
  export interface InputOTPProps {
3
4
  /**
@@ -68,5 +69,5 @@ export interface InputOTPProps {
68
69
  * />
69
70
  * ```
70
71
  */
71
- declare function InputOTP({ length, value, onChangeText, onComplete, error, errorText, disabled, autoFocus, secureTextEntry, inputMode, style: styleOverride, }: InputOTPProps): import("react/jsx-runtime").JSX.Element;
72
+ declare function InputOTP({ length, value, onChangeText, onComplete, error, errorText, disabled, autoFocus, secureTextEntry, inputMode, style: styleOverride, }: InputOTPProps): React.JSX.Element;
72
73
  export { InputOTP };
@@ -58,4 +58,4 @@ export interface LabelProps {
58
58
  * </Label>
59
59
  * ```
60
60
  */
61
- export declare function Label({ children, nativeID, required, size, error, disabled, style, onPress, }: LabelProps): import("react/jsx-runtime").JSX.Element;
61
+ export declare function Label({ children, nativeID, required, size, error, disabled, style, onPress, }: LabelProps): import("react").JSX.Element;
@@ -54,5 +54,5 @@ interface MaxWidthContainerProps {
54
54
  * </MaxWidthContainer>
55
55
  * ```
56
56
  */
57
- export declare function MaxWidthContainer({ children, maxWidth, preset, style, centered, }: MaxWidthContainerProps): import("react/jsx-runtime").JSX.Element;
57
+ export declare function MaxWidthContainer({ children, maxWidth, preset, style, centered, }: MaxWidthContainerProps): React.JSX.Element;
58
58
  export {};
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  /**
2
3
  * Notification
3
4
  *
@@ -7,20 +8,13 @@
7
8
  * Usage:
8
9
  * ```ts
9
10
  * // Top notification (default)
10
- * globalUIStore.getState().show({
11
- * type: "success",
12
- * title: "Saved",
11
+ * notify.success("Saved", {
13
12
  * messages: ["Your changes have been saved."],
14
13
  * duration: 3000,
15
14
  * });
16
15
  *
17
16
  * // Bottom toast
18
- * globalUIStore.getState().show({
19
- * type: "info",
20
- * title: "Copied to clipboard",
21
- * duration: 2000,
22
- * position: "bottom",
23
- * });
17
+ * notify.info("Copied to clipboard", { duration: 2000, position: "bottom" });
24
18
  * ```
25
19
  */
26
- export declare const Notification: () => import("react/jsx-runtime").JSX.Element | null;
20
+ export declare const Notification: () => React.JSX.Element | null;
@@ -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
  };
@@ -0,0 +1,53 @@
1
+ import React from "react";
2
+ import { type StyleProp, type ViewStyle } from "react-native";
3
+ /**
4
+ * SegmentedControl — a horizontal single-select control backed by the
5
+ * platform's native segmented control via
6
+ * `@expo/ui/community/segmented-control`:
7
+ *
8
+ * - iOS: SwiftUI segmented `Picker` (system-styled).
9
+ * - Android: a Material segmented control, accent-tinted via `tintColor`.
10
+ * - Web: the vendored `@react-native-segmented-control/segmented-control`
11
+ * JS implementation, accent-tinted via `tintColor`.
12
+ *
13
+ * The API is value-based to match the rest of the design system (RadioGroup /
14
+ * Tabs / Select): pass the segment `values` plus a controlled `value` (or
15
+ * `defaultValue` for uncontrolled), and read selections back as the chosen
16
+ * string. A light haptic fires on each change, matching Slider / Switch.
17
+ *
18
+ * Theming: the accent color tints the selected segment on Android and web. iOS
19
+ * draws the system segmented control, which ignores a custom tint — pass
20
+ * `appearance` to force light/dark there.
21
+ *
22
+ * @example
23
+ * ```tsx
24
+ * <SegmentedControl
25
+ * values={["Day", "Week", "Month"]}
26
+ * value={range}
27
+ * onValueChange={setRange}
28
+ * />
29
+ * ```
30
+ */
31
+ export interface SegmentedControlProps {
32
+ /** Segment labels, in display order. */
33
+ values: string[];
34
+ /** Controlled selected value. Omit to use uncontrolled mode with `defaultValue`. */
35
+ value?: string;
36
+ /** Initial selected value for uncontrolled mode. Defaults to the first segment. */
37
+ defaultValue?: string;
38
+ /** Called with the selected segment's value. */
39
+ onValueChange?: (value: string) => void;
40
+ /** Disable interaction. @default false */
41
+ disabled?: boolean;
42
+ /**
43
+ * Accent color for the selected segment. Defaults to the theme accent.
44
+ * Applied on Android and web; iOS uses the system style.
45
+ */
46
+ tintColor?: string;
47
+ /** Force a color scheme irrespective of the system theme. */
48
+ appearance?: "light" | "dark";
49
+ /** Style override for the control. */
50
+ style?: StyleProp<ViewStyle>;
51
+ }
52
+ declare function SegmentedControl({ values, value: controlledValue, defaultValue, onValueChange, disabled, tintColor, appearance, style, }: SegmentedControlProps): React.JSX.Element;
53
+ export { SegmentedControl };