@terreno/ui 0.11.4-beta.4 → 0.11.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,24 +1,18 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { TabRouter } from "@react-navigation/native";
3
3
  import { Navigator, Slot } from "expo-router";
4
- // Screen is not exported from expo-router's public API (exports.d.ts only exposes ScreenProps).
5
- // Stack.Screen and Tabs.Screen use this same internal path. If expo-router upgrades break this,
6
- // update the import path here — this is the only place in the codebase that references it.
7
- // eslint-disable-next-line import/no-internal-modules
8
- import { Screen } from "expo-router/build/views/Screen";
9
- import { useCallback, useEffect, useMemo, useRef, useState } from "react";
10
- import { Animated, Dimensions, PanResponder, Pressable, View, } from "react-native";
11
- import { useSafeAreaInsets } from "react-native-safe-area-context";
4
+ import { useCallback, useEffect, useRef, useState } from "react";
5
+ import { Animated, Dimensions, Pressable, View } from "react-native";
12
6
  import { Badge } from "./Badge";
13
7
  import { SIDEBAR_BADGE_STATUS_MAP } from "./Common";
14
8
  import { Icon } from "./Icon";
15
9
  import { Text } from "./Text";
16
10
  import { useTheme } from "./Theme";
17
- const ITEM_HEIGHT = 44;
11
+ const DRAWER_WIDTH = 280;
12
+ const ITEM_HEIGHT = 48;
18
13
  const ICON_SIZE = 20;
19
14
  const BACKDROP_OPACITY = 0.5;
20
- const ANIMATION_DURATION = 300;
21
- const DISMISS_THRESHOLD = 0.3;
15
+ const ANIMATION_DURATION = 250;
22
16
  const SidebarItem = ({ item, isActive, onPress, itemStyle }) => {
23
17
  var _a;
24
18
  const { theme } = useTheme();
@@ -28,192 +22,136 @@ const SidebarItem = ({ item, isActive, onPress, itemStyle }) => {
28
22
  return (_jsxs(Pressable, { accessibilityLabel: item.label, accessibilityRole: "button", onPress: handlePress, style: [
29
23
  {
30
24
  alignItems: "center",
31
- backgroundColor: isActive ? theme.surface.neutralLight : "transparent",
25
+ backgroundColor: isActive ? theme.surface.secondaryLight : "transparent",
32
26
  borderRadius: theme.radius.default,
33
27
  flexDirection: "row",
34
- gap: 12,
28
+ gap: 14,
35
29
  height: ITEM_HEIGHT,
36
- marginHorizontal: 8,
37
- paddingHorizontal: 12,
30
+ marginHorizontal: 12,
31
+ paddingHorizontal: 14,
38
32
  },
39
33
  itemStyle,
40
- ], children: [_jsxs(View, { style: { alignItems: "center", justifyContent: "center", width: ICON_SIZE }, children: [_jsx(Icon, { color: isActive ? "primary" : "secondaryLight", iconName: item.iconName, size: "lg" }), Boolean(item.badge) && (_jsx(View, { style: {
34
+ ], children: [_jsxs(View, { style: { alignItems: "center", justifyContent: "center", width: ICON_SIZE }, children: [_jsx(Icon, { color: isActive ? "primary" : "secondaryDark", iconName: item.iconName, size: "md" }), Boolean(item.badge) && (_jsx(View, { style: {
41
35
  bottom: item.badge === true ? -4 : undefined,
42
36
  position: "absolute",
43
37
  right: -6,
44
38
  top: item.badge === true ? undefined : -4,
45
- }, children: _jsx(Badge, { maxValue: 99, status: SIDEBAR_BADGE_STATUS_MAP[(_a = item.badgeStatus) !== null && _a !== void 0 ? _a : "error"], value: item.badge === true ? undefined : String(item.badge), variant: item.badge === true ? "iconOnly" : "numberOnly" }) }))] }), _jsx(Text, { bold: isActive, color: isActive ? "primary" : "secondaryLight", size: "md", children: item.label })] }));
39
+ }, children: _jsx(Badge, { maxValue: 99, status: SIDEBAR_BADGE_STATUS_MAP[(_a = item.badgeStatus) !== null && _a !== void 0 ? _a : "error"], value: item.badge === true ? undefined : String(item.badge), variant: item.badge === true ? "iconOnly" : "numberOnly" }) }))] }), _jsx(Text, { bold: isActive, color: isActive ? "primary" : "secondaryDark", size: "md", children: item.label })] }));
46
40
  };
47
- const SidebarHamburger = ({ onOpen }) => (_jsx(Pressable, { accessibilityLabel: "Open navigation menu", accessibilityRole: "button", onPress: onOpen, style: { alignItems: "center", height: 40, justifyContent: "center", width: 40 }, children: _jsx(Icon, { color: "primary", iconName: "bars", size: "md" }) }));
48
41
  /**
49
- * Renders the bottom sheet overlay and children. Works without expo-router Navigator context.
50
- *
51
- * Supports two modes:
52
- * - Uncontrolled (default): manages open state internally and shows a floating hamburger button.
53
- * - Controlled: caller provides isOpen + onOpenChange and owns the trigger (e.g. a header button).
42
+ * Renders the hamburger button, drawer overlay, and children. Works without expo-router Navigator context.
54
43
  */
55
- export const SidebarNavigationPanel = ({ topItems, bottomItems, activeRoute, onNavigate, children, panelStyle, itemStyle, isOpen: isOpenProp, onOpenChange, }) => {
44
+ export const SidebarNavigationPanel = ({ topItems, bottomItems, activeRoute, onNavigate, children, panelStyle, itemStyle, }) => {
56
45
  const { theme } = useTheme();
57
- const insets = useSafeAreaInsets();
58
- const isControlled = isOpenProp !== undefined;
59
- const [isOpenInternal, setIsOpenInternal] = useState(false);
60
- const isOpen = isControlled ? isOpenProp : isOpenInternal;
61
- const sheetHeight = useMemo(() => Dimensions.get("window").height * 0.65, []);
62
- const slideAnim = useRef(new Animated.Value(sheetHeight)).current;
46
+ const [isOpen, setIsOpen] = useState(false);
47
+ const slideAnim = useRef(new Animated.Value(-DRAWER_WIDTH)).current;
63
48
  const backdropAnim = useRef(new Animated.Value(0)).current;
64
- const capturedSlideValue = useRef(0);
65
- // Play open animation whenever isOpen becomes true
49
+ // Animate drawer open/close
66
50
  useEffect(() => {
67
- if (!isOpen) {
68
- return;
69
- }
70
- slideAnim.setValue(sheetHeight);
71
- backdropAnim.setValue(0);
72
- Animated.parallel([
73
- Animated.timing(slideAnim, {
74
- duration: ANIMATION_DURATION,
75
- toValue: 0,
76
- useNativeDriver: true,
77
- }),
78
- Animated.timing(backdropAnim, {
79
- duration: ANIMATION_DURATION,
80
- toValue: BACKDROP_OPACITY,
81
- useNativeDriver: true,
82
- }),
83
- ]).start();
84
- }, [isOpen, slideAnim, backdropAnim, sheetHeight]);
85
- // Play close animation then update state
86
- const handleClose = useCallback(() => {
87
- Animated.parallel([
88
- Animated.timing(slideAnim, {
89
- duration: ANIMATION_DURATION,
90
- toValue: sheetHeight,
91
- useNativeDriver: true,
92
- }),
93
- Animated.timing(backdropAnim, {
94
- duration: ANIMATION_DURATION,
95
- toValue: 0,
96
- useNativeDriver: true,
97
- }),
98
- ]).start(() => {
99
- if (isControlled) {
100
- onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(false);
101
- }
102
- else {
103
- setIsOpenInternal(false);
104
- }
105
- });
106
- }, [isControlled, onOpenChange, slideAnim, backdropAnim, sheetHeight]);
107
- const handleOpen = useCallback(() => {
108
- if (isControlled) {
109
- onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(true);
51
+ if (isOpen) {
52
+ Animated.parallel([
53
+ Animated.timing(slideAnim, {
54
+ duration: ANIMATION_DURATION,
55
+ toValue: 0,
56
+ useNativeDriver: true,
57
+ }),
58
+ Animated.timing(backdropAnim, {
59
+ duration: ANIMATION_DURATION,
60
+ toValue: BACKDROP_OPACITY,
61
+ useNativeDriver: true,
62
+ }),
63
+ ]).start();
110
64
  }
111
65
  else {
112
- setIsOpenInternal(true);
66
+ Animated.parallel([
67
+ Animated.timing(slideAnim, {
68
+ duration: ANIMATION_DURATION,
69
+ toValue: -DRAWER_WIDTH,
70
+ useNativeDriver: true,
71
+ }),
72
+ Animated.timing(backdropAnim, {
73
+ duration: ANIMATION_DURATION,
74
+ toValue: 0,
75
+ useNativeDriver: true,
76
+ }),
77
+ ]).start();
113
78
  }
114
- }, [isControlled, onOpenChange]);
79
+ }, [isOpen, slideAnim, backdropAnim]);
80
+ const handleOpen = useCallback(() => setIsOpen(true), []);
81
+ const handleClose = useCallback(() => setIsOpen(false), []);
115
82
  const handleNavigate = useCallback((route) => {
116
- handleClose();
83
+ setIsOpen(false);
117
84
  onNavigate(route);
118
- }, [handleClose, onNavigate]);
119
- const panResponder = useMemo(() => PanResponder.create({
120
- onMoveShouldSetPanResponder: (_, { dx, dy }) => Math.abs(dy) > Math.abs(dx) && dy > 4,
121
- onPanResponderGrant: () => {
122
- slideAnim.stopAnimation((value) => {
123
- capturedSlideValue.current = value;
124
- });
125
- backdropAnim.stopAnimation();
126
- },
127
- onPanResponderMove: (_, { dy }) => {
128
- const next = capturedSlideValue.current + dy;
129
- if (next < 0) {
130
- return;
131
- }
132
- slideAnim.setValue(next);
133
- backdropAnim.setValue(BACKDROP_OPACITY * Math.max(0, 1 - next / sheetHeight));
134
- },
135
- onPanResponderRelease: (_, { dy, vy }) => {
136
- if (dy > sheetHeight * DISMISS_THRESHOLD || vy > 0.5) {
137
- handleClose();
138
- }
139
- else {
140
- Animated.parallel([
141
- Animated.timing(slideAnim, {
142
- duration: 200,
143
- toValue: 0,
144
- useNativeDriver: true,
145
- }),
146
- Animated.timing(backdropAnim, {
147
- duration: 200,
148
- toValue: BACKDROP_OPACITY,
149
- useNativeDriver: true,
150
- }),
151
- ]).start();
152
- }
153
- },
154
- }), [slideAnim, backdropAnim, sheetHeight, handleClose]);
155
- return (_jsxs(View, { style: { flex: 1 }, children: [children, !isControlled && (_jsx(Pressable, { accessibilityLabel: "Open navigation menu", accessibilityRole: "button", onPress: handleOpen, style: {
85
+ }, [onNavigate]);
86
+ const screenHeight = Dimensions.get("window").height;
87
+ return (_jsxs(View, { style: { flex: 1 }, children: [children, _jsx(Pressable, { accessibilityLabel: "Open navigation menu", accessibilityRole: "button", onPress: handleOpen, style: {
156
88
  alignItems: "center",
89
+ backgroundColor: theme.surface.primary,
90
+ borderRadius: theme.radius.full,
91
+ elevation: 4,
157
92
  height: 44,
158
93
  justifyContent: "center",
159
94
  left: 16,
160
95
  position: "absolute",
161
- top: insets.top + 16,
96
+ shadowColor: "#000",
97
+ shadowOffset: { height: 2, width: 0 },
98
+ shadowOpacity: 0.25,
99
+ shadowRadius: 4,
100
+ top: 16,
162
101
  width: 44,
163
102
  zIndex: 10,
164
- }, children: _jsx(Icon, { color: "primary", iconName: "bars", size: "md" }) })), isOpen && (_jsxs(_Fragment, { children: [_jsx(Pressable, { accessibilityElementsHidden: true, onPress: handleClose, style: { bottom: 0, left: 0, position: "absolute", right: 0, top: 0, zIndex: 100 }, children: _jsx(Animated.View, { style: { backgroundColor: "#000", flex: 1, opacity: backdropAnim } }) }), _jsxs(Animated.View, { style: [
165
- {
166
- backgroundColor: theme.surface.base,
167
- borderTopLeftRadius: 16,
168
- borderTopRightRadius: 16,
169
- bottom: 0,
170
- height: sheetHeight,
171
- left: 0,
172
- position: "absolute",
173
- right: 0,
174
- transform: [{ translateY: slideAnim }],
175
- zIndex: 200,
176
- },
177
- panelStyle,
178
- ], children: [_jsx(View, Object.assign({}, panResponder.panHandlers, { accessibilityHint: "Drag down to close", accessibilityLabel: "Navigation menu drag handle", accessibilityRole: "adjustable", style: { alignItems: "center", paddingBottom: 8, paddingTop: 12 }, children: _jsx(View, { style: {
179
- backgroundColor: theme.border.default,
180
- borderRadius: 2,
181
- height: 4,
182
- width: 36,
183
- } }) })), _jsx(View, { style: { gap: 4, paddingBottom: insets.bottom + 8 }, children: [...topItems, ...bottomItems].map((item) => (_jsx(SidebarItem, { isActive: activeRoute === item.route, item: item, itemStyle: itemStyle, onPress: handleNavigate }, item.route))) })] })] }))] }));
184
- };
185
- const SidebarHeader = ({ onOpen }) => {
186
- var _a, _b;
187
- const { theme } = useTheme();
188
- const insets = useSafeAreaInsets();
189
- const { state, descriptors } = Navigator.useContext();
190
- const activeRoute = state.routes[state.index];
191
- const { headerLeft, headerRight, title } = ((_b = (_a = descriptors[activeRoute === null || activeRoute === void 0 ? void 0 : activeRoute.key]) === null || _a === void 0 ? void 0 : _a.options) !== null && _b !== void 0 ? _b : {});
192
- return (_jsx(View, { style: {
193
- backgroundColor: theme.surface.base,
194
- borderBottomColor: theme.border.default,
195
- borderBottomWidth: 1,
196
- paddingTop: insets.top,
197
- }, children: _jsxs(View, { style: {
198
- alignItems: "center",
199
- flexDirection: "row",
200
- height: 44,
201
- justifyContent: "space-between",
202
- paddingHorizontal: 16,
203
- }, children: [_jsxs(View, { style: { alignItems: "center", flexDirection: "row", gap: 12 }, children: [_jsx(SidebarHamburger, { onOpen: onOpen }), headerLeft === null || headerLeft === void 0 ? void 0 : headerLeft({}), Boolean(title) && (_jsx(Text, { bold: true, size: "lg", children: title }))] }), Boolean(headerRight) && _jsx(View, { style: { alignItems: "flex-end" }, children: headerRight === null || headerRight === void 0 ? void 0 : headerRight({}) })] }) }));
103
+ }, children: _jsx(Icon, { color: "inverted", iconName: "bars", size: "md" }) }), isOpen && (_jsx(Pressable, { onPress: handleClose, style: {
104
+ bottom: 0,
105
+ left: 0,
106
+ position: "absolute",
107
+ right: 0,
108
+ top: 0,
109
+ zIndex: 100,
110
+ }, children: _jsx(Animated.View, { style: {
111
+ backgroundColor: "#000",
112
+ flex: 1,
113
+ opacity: backdropAnim,
114
+ } }) })), _jsxs(Animated.View, { style: [
115
+ {
116
+ backgroundColor: theme.surface.base,
117
+ borderColor: theme.border.default,
118
+ borderRightWidth: 1,
119
+ height: screenHeight,
120
+ justifyContent: "space-between",
121
+ left: 0,
122
+ paddingBottom: 32,
123
+ paddingTop: 20,
124
+ position: "absolute",
125
+ top: 0,
126
+ transform: [{ translateX: slideAnim }],
127
+ width: DRAWER_WIDTH,
128
+ zIndex: 200,
129
+ },
130
+ panelStyle,
131
+ ], children: [_jsxs(View, { children: [_jsx(Pressable, { accessibilityLabel: "Close navigation menu", accessibilityRole: "button", onPress: handleClose, style: {
132
+ alignItems: "center",
133
+ alignSelf: "flex-end",
134
+ height: 40,
135
+ justifyContent: "center",
136
+ marginRight: 12,
137
+ width: 40,
138
+ }, children: _jsx(Icon, { color: "secondaryDark", iconName: "xmark", size: "md" }) }), _jsx(View, { style: { gap: 4, marginTop: 8 }, children: topItems.map((item) => (_jsx(SidebarItem, { isActive: activeRoute === item.route, item: item, itemStyle: itemStyle, onPress: handleNavigate }, item.route))) })] }), _jsx(View, { style: { gap: 4 }, children: bottomItems.map((item) => (_jsx(SidebarItem, { isActive: activeRoute === item.route, item: item, onPress: handleNavigate }, item.route))) })] })] }));
204
139
  };
205
- /** Renders the content panel and bottom sheet for the active screen. */
206
- const SidebarNavigatorContent = ({ topItems, bottomItems, isOpen, onOpenChange, onNavigate, panelStyle, itemStyle }) => {
140
+ /**
141
+ * Reads active route from Navigator context and renders the drawer + Slot.
142
+ */
143
+ const SidebarNavigatorContent = ({ topItems, bottomItems, onNavigate, panelStyle, itemStyle }) => {
144
+ var _a;
207
145
  const { state, navigation } = Navigator.useContext();
208
- const activeRoute = state.routes[state.index];
146
+ const activeRoute = (_a = state.routes[state.index]) === null || _a === void 0 ? void 0 : _a.name;
209
147
  const handleNavigate = useCallback((route) => {
210
148
  navigation.navigate(route);
211
149
  onNavigate === null || onNavigate === void 0 ? void 0 : onNavigate(route);
212
150
  }, [navigation, onNavigate]);
213
- return (_jsx(SidebarNavigationPanel, { activeRoute: activeRoute === null || activeRoute === void 0 ? void 0 : activeRoute.name, bottomItems: bottomItems, isOpen: isOpen, itemStyle: itemStyle, onNavigate: handleNavigate, onOpenChange: onOpenChange, panelStyle: panelStyle, topItems: topItems, children: _jsx(Slot, {}) }));
151
+ return (_jsx(SidebarNavigationPanel, { activeRoute: activeRoute, bottomItems: bottomItems, itemStyle: itemStyle, onNavigate: handleNavigate, panelStyle: panelStyle, topItems: topItems, children: _jsx(Slot, {}) }));
214
152
  };
215
153
  /**
216
- * Custom expo-router navigator with a header bar and hamburger-triggered bottom sheet.
154
+ * Custom expo-router navigator with a hamburger-triggered slide-in drawer.
217
155
  * Use in _layout.tsx files:
218
156
  *
219
157
  * ```tsx
@@ -227,9 +165,7 @@ const SidebarNavigatorContent = ({ topItems, bottomItems, isOpen, onOpenChange,
227
165
  * }
228
166
  * ```
229
167
  */
230
- const SidebarNavigationBase = ({ topItems, bottomItems, onNavigate, initialRouteName, screenOptions, panelStyle, itemStyle, children, }) => {
231
- const [isSheetOpen, setIsSheetOpen] = useState(false);
232
- return (_jsxs(Navigator, { initialRouteName: initialRouteName, router: TabRouter, screenOptions: screenOptions, children: [_jsxs(View, { style: { flex: 1 }, children: [_jsx(SidebarHeader, { onOpen: () => setIsSheetOpen(true) }), _jsx(SidebarNavigatorContent, { bottomItems: bottomItems, isOpen: isSheetOpen, itemStyle: itemStyle, onNavigate: onNavigate, onOpenChange: setIsSheetOpen, panelStyle: panelStyle, topItems: topItems })] }), children] }));
168
+ export const SidebarNavigation = ({ topItems, bottomItems, onNavigate, initialRouteName, screenOptions, panelStyle, itemStyle, }) => {
169
+ return (_jsx(Navigator, { initialRouteName: initialRouteName, router: TabRouter, screenOptions: screenOptions, children: _jsx(SidebarNavigatorContent, { bottomItems: bottomItems, itemStyle: itemStyle, onNavigate: onNavigate, panelStyle: panelStyle, topItems: topItems }) }));
233
170
  };
234
- export const SidebarNavigation = Object.assign(SidebarNavigationBase, { Screen });
235
171
  //# sourceMappingURL=SidebarNavigation.native.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarNavigation.native.js","sourceRoot":"","sources":["../src/SidebarNavigation.native.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAC,SAAS,EAAE,IAAI,EAAC,MAAM,aAAa,CAAC;AAC5C,gGAAgG;AAChG,gGAAgG;AAChG,2FAA2F;AAC3F,sDAAsD;AACtD,OAAO,EAAC,MAAM,EAAC,MAAM,gCAAgC,CAAC;AACtD,OAAO,EAAU,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACjF,OAAO,EACL,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,SAAS,EAET,IAAI,GAEL,MAAM,cAAc,CAAC;AACtB,OAAO,EAAC,iBAAiB,EAAC,MAAM,gCAAgC,CAAC;AAEjE,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAM9B,OAAO,EAAC,wBAAwB,EAAC,MAAM,UAAU,CAAC;AAClD,OAAO,E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} from "../Common";
2
- export declare const MobileIcon: ({ doNotDisturb, ...props }: CustomSvgProps) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const MobileIcon: ({ doNotDisturb, ...props }: CustomSvgProps) => React.ReactElement;
@@ -1 +1 @@
1
- {"version":3,"file":"MobileIcon.js","sourceRoot":"","sources":["../../src/icons/MobileIcon.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,GAAG,EAAE,EAAC,IAAI,EAAC,MAAM,kBAAkB,CAAC;AAI3C,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EAAwC,EAAE,EAAE;QAA5C,EAAC,YAAY,OAA2B,EAAtB,KAAK,cAAvB,gBAAwB,CAAD;IAChD,OAAO,CACL,MAAC,GAAG,kBAAC,IAAI,EAAC,MAAM,EAAC,MAAM,EAAE,EAAE,EAAE,OAAO,EAAC,WAAW,EAAC,KAAK,EAAE,EAAE,IAAM,KAAK,eACnE,KAAC,IAAI,IAAC,CAAC,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,GAAG,EACtC,KAAC,IAAI,IACH,CAAC,EAAC,iMAAiM,EACnM,IAAI,EAAC,SAAS,EACd,MAAM,EAAC,MAAM,EACb,WAAW,EAAE,CAAC,GACd,EACF,KAAC,IAAI,IACH,CAAC,EAAC,0HAA0H,EAC5H,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,MAAM,GACb,EACD,YAAY,IAAI,CACf,8BACE,KAAC,IAAI,IACH,CAAC,EAAC,oBAAoB,EACtB,MAAM,EAAC,MAAM,EACb,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,WAAW,EAAE,CAAC,GACd,EACF,KAAC,IAAI,IACH,CAAC,EAAC,oBAAoB,EACtB,MAAM,EAAC,SAAS,EAChB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,WAAW,EAAE,CAAC,GACd,IACD,CACJ,KACG,CACP,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"MobileIcon.js","sourceRoot":"","sources":["../../src/icons/MobileIcon.tsx"],"names":[],"mappings":";;;;;;;;;;;;AACA,OAAO,GAAG,EAAE,EAAC,IAAI,EAAC,MAAM,kBAAkB,CAAC;AAI3C,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EAAwC,EAAsB,EAAE;QAAhE,EAAC,YAAY,OAA2B,EAAtB,KAAK,cAAvB,gBAAwB,CAAD;IAChD,OAAO,CACL,MAAC,GAAG,kBAAC,IAAI,EAAC,MAAM,EAAC,MAAM,EAAE,EAAE,EAAE,OAAO,EAAC,WAAW,EAAC,KAAK,EAAE,EAAE,IAAM,KAAK,eACnE,KAAC,IAAI,IAAC,CAAC,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,GAAG,EACtC,KAAC,IAAI,IACH,CAAC,EAAC,iMAAiM,EACnM,IAAI,EAAC,SAAS,EACd,MAAM,EAAC,MAAM,EACb,WAAW,EAAE,CAAC,GACd,EACF,KAAC,IAAI,IACH,CAAC,EAAC,0HAA0H,EAC5H,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,MAAM,GACb,EACD,YAAY,IAAI,CACf,8BACE,KAAC,IAAI,IACH,CAAC,EAAC,oBAAoB,EACtB,MAAM,EAAC,MAAM,EACb,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,WAAW,EAAE,CAAC,GACd,EACF,KAAC,IAAI,IACH,CAAC,EAAC,oBAAoB,EACtB,MAAM,EAAC,SAAS,EAChB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,WAAW,EAAE,CAAC,GACd,IACD,CACJ,KACG,CACP,CAAC;AACJ,CAAC,CAAC"}
package/package.json CHANGED
@@ -137,5 +137,5 @@
137
137
  "test:coverage": "TZ=America/New_York bun run ../scripts/check-coverage.ts",
138
138
  "types": "bun typedoc"
139
139
  },
140
- "version": "0.11.4-beta.4"
140
+ "version": "0.11.5"
141
141
  }
package/src/Common.ts CHANGED
@@ -3044,17 +3044,4 @@ export interface SidebarNavigationPanelProps {
3044
3044
  * Additional styles applied to each navigation item.
3045
3045
  */
3046
3046
  itemStyle?: StyleProp<ViewStyle>;
3047
- /**
3048
- * Controlled open state. When provided, the panel hides its internal hamburger
3049
- * button and defers open/close to the caller.
3050
- *
3051
- * @platform mobile — the web sidebar is always visible; this prop is ignored on web.
3052
- */
3053
- isOpen?: boolean;
3054
- /**
3055
- * Called when the panel requests an open or close (controlled mode only).
3056
- *
3057
- * @platform mobile — the web sidebar is always visible; this prop is ignored on web.
3058
- */
3059
- onOpenChange?: (isOpen: boolean) => void;
3060
3047
  }
@@ -1,4 +1,5 @@
1
- import {describe, expect, it} from "bun:test";
1
+ import {describe, expect, it, mock} from "bun:test";
2
+ import {act, fireEvent} from "@testing-library/react-native";
2
3
 
3
4
  import {CustomSelectField} from "./CustomSelectField";
4
5
  import {renderWithTheme} from "./test-utils";
@@ -82,4 +83,55 @@ describe("CustomSelectField", () => {
82
83
  );
83
84
  expect(toJSON()).toMatchSnapshot();
84
85
  });
86
+
87
+ it("shows custom input when 'custom' is selected from dropdown", async () => {
88
+ const onChange = mock(() => {});
89
+ const {getByTestId, queryByPlaceholderText} = renderWithTheme(
90
+ <CustomSelectField onChange={onChange} options={defaultOptions} value="a" />
91
+ );
92
+
93
+ const picker = getByTestId("ios_picker");
94
+ await act(async () => {
95
+ fireEvent(picker, "onValueChange", "custom", 4);
96
+ });
97
+
98
+ // onChange should be called with empty string when custom is selected
99
+ expect(onChange).toHaveBeenCalledWith("");
100
+
101
+ // The custom input field should now be visible
102
+ expect(queryByPlaceholderText("None selected")).toBeTruthy();
103
+ });
104
+
105
+ it("hides custom input and updates value when a non-custom option is selected after custom", async () => {
106
+ const onChange = mock(() => {});
107
+ // Start with a custom value so custom input is already shown
108
+ const {getByTestId, queryByPlaceholderText} = renderWithTheme(
109
+ <CustomSelectField onChange={onChange} options={defaultOptions} value="my-custom-value" />
110
+ );
111
+
112
+ // Custom input should be visible because value is not in options
113
+ expect(queryByPlaceholderText("None selected")).toBeTruthy();
114
+
115
+ const picker = getByTestId("ios_picker");
116
+ await act(async () => {
117
+ fireEvent(picker, "onValueChange", "a", 1);
118
+ });
119
+
120
+ // onChange should be called with the option value
121
+ expect(onChange).toHaveBeenCalledWith("a");
122
+ });
123
+
124
+ it("calls onChange with selected value for a regular option", async () => {
125
+ const onChange = mock(() => {});
126
+ const {getByTestId} = renderWithTheme(
127
+ <CustomSelectField onChange={onChange} options={defaultOptions} value="" />
128
+ );
129
+
130
+ const picker = getByTestId("ios_picker");
131
+ await act(async () => {
132
+ fireEvent(picker, "onValueChange", "b", 2);
133
+ });
134
+
135
+ expect(onChange).toHaveBeenCalledWith("b");
136
+ });
85
137
  });
@@ -109,7 +109,7 @@ export const CustomSelectField: FC<CustomSelectFieldProps> = ({
109
109
  />
110
110
  </View>
111
111
  )}
112
- {helperText && <FieldHelperText text={helperText} />}
112
+ {Boolean(helperText) && <FieldHelperText text={helperText!} />}
113
113
  </View>
114
114
  );
115
115
  };
package/src/DataTable.tsx CHANGED
@@ -263,37 +263,41 @@ const DataTableHeaderCell: FC<DataTableHeaderCellProps> = ({
263
263
  }),
264
264
  }}
265
265
  >
266
- {Boolean(column.title) && <TableTitle align="left" title={column.title!} />}
267
- <View style={{alignItems: "center", flexDirection: "row"}}>
268
- {column.infoModalText && (
269
- <InfoModalIcon infoModalChildren={<Markdown>{column.infoModalText}</Markdown>} />
270
- )}
271
- {column.sortable && (
272
- <Pressable hitSlop={16} onPress={() => onSort(index)}>
273
- <View
274
- style={{
275
- alignItems: "center",
276
- backgroundColor: sort ? theme.surface.primary : theme.surface.neutralLight,
277
- borderRadius: theme.radius.rounded,
278
- height: 16,
279
- justifyContent: "center",
280
- marginLeft: 8,
281
- width: 16,
282
- }}
283
- >
284
- <FontAwesome6
285
- color={theme.text.inverted}
286
- name={
287
- sort === "asc" ? "arrow-down" : sort === "desc" ? "arrow-up" : "arrows-up-down"
288
- }
289
- selectable={undefined}
290
- size={10}
291
- solid
292
- />
293
- </View>
294
- </Pressable>
295
- )}
296
- </View>
266
+ {[
267
+ Boolean(column.title) ? (
268
+ <TableTitle align="left" key="data-table-header-title" title={column.title!} />
269
+ ) : null,
270
+ <View key="data-table-header-tools" style={{alignItems: "center", flexDirection: "row"}}>
271
+ {column.infoModalText && (
272
+ <InfoModalIcon infoModalChildren={<Markdown>{column.infoModalText}</Markdown>} />
273
+ )}
274
+ {column.sortable && (
275
+ <Pressable hitSlop={16} onPress={() => onSort(index)}>
276
+ <View
277
+ style={{
278
+ alignItems: "center",
279
+ backgroundColor: sort ? theme.surface.primary : theme.surface.neutralLight,
280
+ borderRadius: theme.radius.rounded,
281
+ height: 16,
282
+ justifyContent: "center",
283
+ marginLeft: 8,
284
+ width: 16,
285
+ }}
286
+ >
287
+ <FontAwesome6
288
+ color={theme.text.inverted}
289
+ name={
290
+ sort === "asc" ? "arrow-down" : sort === "desc" ? "arrow-up" : "arrows-up-down"
291
+ }
292
+ selectable={undefined}
293
+ size={10}
294
+ solid
295
+ />
296
+ </View>
297
+ </Pressable>
298
+ )}
299
+ </View>,
300
+ ]}
297
301
  </View>
298
302
  );
299
303
  };
@@ -8,14 +8,14 @@ interface State {
8
8
  }
9
9
 
10
10
  export class ErrorBoundary extends React.Component<ErrorBoundaryProps, State> {
11
- state = {error: undefined};
11
+ state: State = {error: undefined};
12
12
 
13
- static getDerivedStateFromError(error: Error) {
13
+ static getDerivedStateFromError(error: Error): State {
14
14
  console.warn("[ErrorBoundary] Derived error", error);
15
15
  return {error};
16
16
  }
17
17
 
18
- componentDidCatch(error: Error, info: {componentStack: string}) {
18
+ componentDidCatch(error: Error, info: {componentStack: string}): void {
19
19
  console.warn("[ErrorBoundary] Caught error", error);
20
20
 
21
21
  if (this.props.onError) {
@@ -23,11 +23,11 @@ export class ErrorBoundary extends React.Component<ErrorBoundaryProps, State> {
23
23
  }
24
24
  }
25
25
 
26
- resetError = () => {
26
+ resetError = (): void => {
27
27
  this.setState({error: undefined});
28
28
  };
29
29
 
30
- render() {
30
+ render(): React.ReactNode {
31
31
  const error = this.state.error;
32
32
  if (error) {
33
33
  return <ErrorPage error={error} resetError={this.resetError} />;
package/src/Link.tsx CHANGED
@@ -4,15 +4,24 @@ import {Linking, Pressable} from "react-native";
4
4
  import type {LinkProps} from "./Common";
5
5
  import {Text} from "./Text";
6
6
 
7
- export const Link = ({text, href, onClick}: LinkProps): React.ReactElement => {
7
+ export const Link: React.FC<LinkProps> = ({text, href, onClick}) => {
8
8
  if (!href && !onClick) {
9
9
  console.error("Link component requires either href or onClick prop");
10
+ return null;
10
11
  }
11
12
  return (
12
13
  <Pressable
13
14
  aria-role="button"
14
15
  hitSlop={20}
15
- onPress={() => (onClick ? onClick() : href && Linking.openURL(href))}
16
+ onPress={() => {
17
+ if (onClick) {
18
+ onClick();
19
+ return;
20
+ }
21
+ if (href) {
22
+ void Linking.openURL(href);
23
+ }
24
+ }}
16
25
  >
17
26
  <Text color="link" skipLinking underline>
18
27
  {text}