@gaozh1024/rn-kit 0.2.0 → 0.3.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.
package/dist/index.js CHANGED
@@ -55,6 +55,7 @@ __export(index_exports, {
55
55
  ErrorCode: () => ErrorCode,
56
56
  FileIcons: () => FileIcons,
57
57
  FormItem: () => FormItem,
58
+ GradientView: () => GradientView,
58
59
  Icon: () => Icon,
59
60
  Loading: () => Loading,
60
61
  MemoryStorage: () => MemoryStorage,
@@ -63,6 +64,7 @@ __export(index_exports, {
63
64
  NavigationProvider: () => NavigationProvider,
64
65
  OverlayProvider: () => OverlayProvider,
65
66
  Page: () => Page,
67
+ PageDrawer: () => PageDrawer,
66
68
  Progress: () => Progress,
67
69
  Radio: () => Radio,
68
70
  RadioGroup: () => RadioGroup,
@@ -128,6 +130,7 @@ __export(index_exports, {
128
130
  useNavigation: () => useNavigation,
129
131
  useNavigationState: () => useNavigationState,
130
132
  useOrientation: () => useOrientation,
133
+ usePageDrawer: () => usePageDrawer,
131
134
  usePagination: () => usePagination,
132
135
  usePrevious: () => usePrevious,
133
136
  useQuery: () => import_react_query.useQuery,
@@ -1111,6 +1114,29 @@ function resolveTextTone(tone, theme, isDark) {
1111
1114
  return void 0;
1112
1115
  }
1113
1116
  }
1117
+ var textUtilityTokens = /* @__PURE__ */ new Set([
1118
+ "text-left",
1119
+ "text-center",
1120
+ "text-right",
1121
+ "text-justify",
1122
+ "text-auto",
1123
+ "text-wrap",
1124
+ "text-nowrap",
1125
+ "text-balance",
1126
+ "text-pretty",
1127
+ "text-ellipsis",
1128
+ "text-clip"
1129
+ ]);
1130
+ var textSizePattern = /^text-(xs|sm|base|lg|xl|[2-9]xl)$/;
1131
+ function hasExplicitTextColorClass(className) {
1132
+ if (!className) return false;
1133
+ return className.split(/\s+/).some((token) => {
1134
+ if (!token.startsWith("text-")) return false;
1135
+ if (textUtilityTokens.has(token)) return false;
1136
+ if (textSizePattern.test(token)) return false;
1137
+ return true;
1138
+ });
1139
+ }
1114
1140
 
1115
1141
  // src/ui/primitives/AppView.tsx
1116
1142
  var import_jsx_runtime2 = require("nativewind/jsx-runtime");
@@ -1216,6 +1242,9 @@ function AppText({
1216
1242
  ...props
1217
1243
  }) {
1218
1244
  const { theme, isDark } = useOptionalTheme();
1245
+ const flattenedStyle = import_react_native3.StyleSheet.flatten(style);
1246
+ const hasExplicitStyleColor = flattenedStyle?.color !== void 0;
1247
+ const hasExplicitClassColor = hasExplicitTextColorClass(className);
1219
1248
  const sizeMap3 = {
1220
1249
  xs: "text-xs",
1221
1250
  sm: "text-sm",
@@ -1231,12 +1260,18 @@ function AppText({
1231
1260
  semibold: "font-semibold",
1232
1261
  bold: "font-bold"
1233
1262
  };
1234
- const resolvedColor = resolveTextTone(tone, theme, isDark) ?? resolveNamedColor(color, theme, isDark);
1263
+ const fallbackTone = tone ?? (color || hasExplicitStyleColor || hasExplicitClassColor ? void 0 : "default");
1264
+ const resolvedColor = resolveTextTone(fallbackTone, theme, isDark) ?? resolveNamedColor(color, theme, isDark);
1235
1265
  const shouldUseClassColor = !!color && !resolvedColor;
1236
1266
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1237
1267
  import_react_native3.Text,
1238
1268
  {
1239
- className: cn(sizeMap3[size], weightMap[weight], shouldUseClassColor && `text-${color}`, className),
1269
+ className: cn(
1270
+ sizeMap3[size],
1271
+ weightMap[weight],
1272
+ shouldUseClassColor && `text-${color}`,
1273
+ className
1274
+ ),
1240
1275
  style: [resolvedColor ? { color: resolvedColor } : void 0, style],
1241
1276
  ...props,
1242
1277
  children
@@ -1601,13 +1636,7 @@ var styles2 = import_react_native7.StyleSheet.create({
1601
1636
  // src/ui/feedback/Loading.tsx
1602
1637
  var import_react_native8 = require("react-native");
1603
1638
  var import_jsx_runtime13 = require("nativewind/jsx-runtime");
1604
- function Loading({
1605
- text,
1606
- color,
1607
- overlay = false,
1608
- visible = true,
1609
- testID
1610
- }) {
1639
+ function Loading({ text, color, overlay = false, visible = true, testID }) {
1611
1640
  if (!visible) return null;
1612
1641
  const content = /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(AppView, { center: true, gap: 3, testID, children: [
1613
1642
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native8.ActivityIndicator, { size: "large", color }),
@@ -2122,30 +2151,200 @@ var styles3 = import_react_native11.StyleSheet.create({
2122
2151
  }
2123
2152
  });
2124
2153
 
2125
- // src/ui/form/AppInput.tsx
2126
- var import_react16 = require("react");
2154
+ // src/ui/display/PageDrawer.tsx
2155
+ var import_react16 = __toESM(require("react"));
2127
2156
  var import_react_native12 = require("react-native");
2128
2157
  var import_jsx_runtime19 = require("nativewind/jsx-runtime");
2129
- var AppInput = (0, import_react16.forwardRef)(
2158
+ function PageDrawer({
2159
+ visible,
2160
+ onClose,
2161
+ title,
2162
+ header,
2163
+ footer,
2164
+ placement = "right",
2165
+ width = 320,
2166
+ swipeEnabled = true,
2167
+ swipeThreshold = 80,
2168
+ closeOnBackdropPress = true,
2169
+ showCloseButton = true,
2170
+ children,
2171
+ testID,
2172
+ contentTestID = "page-drawer-content",
2173
+ backdropTestID = "page-drawer-backdrop"
2174
+ }) {
2175
+ const colors = useThemeColors();
2176
+ const [translateX, setTranslateX] = import_react16.default.useState(0);
2177
+ if (!visible) return null;
2178
+ const handleClose = import_react16.default.useCallback(() => {
2179
+ setTranslateX(0);
2180
+ onClose?.();
2181
+ }, [onClose]);
2182
+ import_react16.default.useEffect(() => {
2183
+ if (!visible) return;
2184
+ const subscription = import_react_native12.BackHandler.addEventListener("hardwareBackPress", () => {
2185
+ handleClose();
2186
+ return true;
2187
+ });
2188
+ return () => subscription.remove();
2189
+ }, [handleClose, visible]);
2190
+ const panResponder = import_react16.default.useMemo(
2191
+ () => import_react_native12.PanResponder.create({
2192
+ onMoveShouldSetPanResponder: (_event, gestureState) => {
2193
+ if (!swipeEnabled) return false;
2194
+ const isHorizontal = Math.abs(gestureState.dx) > Math.abs(gestureState.dy);
2195
+ const reachesThreshold = Math.abs(gestureState.dx) > 8;
2196
+ return isHorizontal && reachesThreshold;
2197
+ },
2198
+ onPanResponderMove: (_event, gestureState) => {
2199
+ if (!swipeEnabled) return;
2200
+ const nextTranslateX = placement === "right" ? Math.min(0, Math.max(-width, gestureState.dx)) : Math.max(0, Math.min(width, gestureState.dx));
2201
+ setTranslateX(nextTranslateX);
2202
+ },
2203
+ onPanResponderRelease: (_event, gestureState) => {
2204
+ if (!swipeEnabled) {
2205
+ setTranslateX(0);
2206
+ return;
2207
+ }
2208
+ const reachedCloseThreshold = placement === "right" ? gestureState.dx <= -swipeThreshold : gestureState.dx >= swipeThreshold;
2209
+ if (reachedCloseThreshold) {
2210
+ handleClose();
2211
+ return;
2212
+ }
2213
+ setTranslateX(0);
2214
+ },
2215
+ onPanResponderTerminate: () => {
2216
+ setTranslateX(0);
2217
+ }
2218
+ }),
2219
+ [handleClose, placement, swipeEnabled, swipeThreshold, width]
2220
+ );
2221
+ const drawerContent = /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
2222
+ AppView,
2223
+ {
2224
+ testID: contentTestID,
2225
+ className: "h-full",
2226
+ ...panResponder.panHandlers,
2227
+ style: [
2228
+ styles4.drawer,
2229
+ {
2230
+ width,
2231
+ backgroundColor: colors.card,
2232
+ borderLeftWidth: placement === "right" ? 0.5 : 0,
2233
+ borderRightWidth: placement === "left" ? 0.5 : 0,
2234
+ borderLeftColor: colors.border,
2235
+ borderRightColor: colors.border,
2236
+ transform: [{ translateX }]
2237
+ }
2238
+ ],
2239
+ children: [
2240
+ (header || title || showCloseButton) && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
2241
+ AppView,
2242
+ {
2243
+ row: true,
2244
+ items: "center",
2245
+ between: true,
2246
+ className: "px-4 py-4",
2247
+ style: [styles4.header, { borderBottomColor: colors.divider }],
2248
+ children: [
2249
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(AppView, { flex: true, children: header || (title ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(AppText, { size: "lg", weight: "semibold", children: title }) : null) }),
2250
+ showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2251
+ AppPressable,
2252
+ {
2253
+ testID: "page-drawer-close",
2254
+ className: "p-1",
2255
+ pressedClassName: "opacity-70",
2256
+ onPress: handleClose,
2257
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icon, { name: "close", size: "md", color: colors.textSecondary })
2258
+ }
2259
+ )
2260
+ ]
2261
+ }
2262
+ ),
2263
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(AppScrollView, { flex: true, className: "px-4 py-4", children }),
2264
+ footer && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2265
+ AppView,
2266
+ {
2267
+ className: "px-4 py-4",
2268
+ style: [styles4.footer, { borderTopColor: colors.divider }],
2269
+ children: footer
2270
+ }
2271
+ )
2272
+ ]
2273
+ }
2274
+ );
2275
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native12.Modal, { visible: true, transparent: true, animationType: "fade", onRequestClose: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
2276
+ AppView,
2277
+ {
2278
+ testID,
2279
+ flex: true,
2280
+ row: true,
2281
+ style: { backgroundColor: "rgba(0,0,0,0.5)" },
2282
+ justify: placement === "right" ? "end" : "start",
2283
+ children: [
2284
+ placement === "left" && drawerContent,
2285
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2286
+ AppPressable,
2287
+ {
2288
+ testID: backdropTestID,
2289
+ className: "flex-1",
2290
+ onPress: closeOnBackdropPress ? handleClose : void 0
2291
+ }
2292
+ ),
2293
+ placement === "right" && drawerContent
2294
+ ]
2295
+ }
2296
+ ) });
2297
+ }
2298
+ var styles4 = import_react_native12.StyleSheet.create({
2299
+ drawer: {
2300
+ height: "100%"
2301
+ },
2302
+ header: {
2303
+ borderBottomWidth: 0.5
2304
+ },
2305
+ footer: {
2306
+ borderTopWidth: 0.5
2307
+ }
2308
+ });
2309
+
2310
+ // src/ui/display/GradientView.tsx
2311
+ var import_expo_linear_gradient = require("expo-linear-gradient");
2312
+ var import_jsx_runtime20 = require("nativewind/jsx-runtime");
2313
+ function GradientView({
2314
+ colors,
2315
+ start = { x: 0, y: 0 },
2316
+ end = { x: 1, y: 1 },
2317
+ children,
2318
+ style,
2319
+ ...props
2320
+ }) {
2321
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_expo_linear_gradient.LinearGradient, { colors: [...colors], start, end, style, ...props, children });
2322
+ }
2323
+
2324
+ // src/ui/form/AppInput.tsx
2325
+ var import_react17 = require("react");
2326
+ var import_react_native13 = require("react-native");
2327
+ var import_jsx_runtime21 = require("nativewind/jsx-runtime");
2328
+ var AppInput = (0, import_react17.forwardRef)(
2130
2329
  ({ label, error, disabled = false, leftIcon, rightIcon, className, style, ...props }, ref) => {
2131
2330
  const colors = useThemeColors();
2132
- const [isFocused, setIsFocused] = (0, import_react16.useState)(false);
2331
+ const [isFocused, setIsFocused] = (0, import_react17.useState)(false);
2133
2332
  const errorColor = "#ef4444";
2134
2333
  const getBorderColor = () => {
2135
2334
  if (error) return errorColor;
2136
2335
  if (isFocused) return colors.primary;
2137
2336
  return colors.border;
2138
2337
  };
2139
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(AppView, { className: cn("flex-col gap-1", className), children: [
2140
- label && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(AppText, { size: "sm", weight: "medium", style: { color: colors.textSecondary }, children: label }),
2141
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
2338
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(AppView, { className: cn("flex-col gap-1", className), children: [
2339
+ label && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(AppText, { size: "sm", weight: "medium", style: { color: colors.textSecondary }, children: label }),
2340
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2142
2341
  AppView,
2143
2342
  {
2144
2343
  row: true,
2145
2344
  items: "center",
2146
2345
  className: "rounded-lg px-3",
2147
2346
  style: [
2148
- styles4.inputContainer,
2347
+ styles5.inputContainer,
2149
2348
  {
2150
2349
  backgroundColor: colors.card,
2151
2350
  borderColor: getBorderColor(),
@@ -2153,13 +2352,13 @@ var AppInput = (0, import_react16.forwardRef)(
2153
2352
  }
2154
2353
  ],
2155
2354
  children: [
2156
- leftIcon && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native12.View, { style: styles4.icon, children: leftIcon }),
2157
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2158
- import_react_native12.TextInput,
2355
+ leftIcon && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native13.View, { style: styles5.icon, children: leftIcon }),
2356
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2357
+ import_react_native13.TextInput,
2159
2358
  {
2160
2359
  ref,
2161
2360
  className: "flex-1 py-3 text-base",
2162
- style: [styles4.input, { color: colors.text }, style],
2361
+ style: [styles5.input, { color: colors.text }, style],
2163
2362
  placeholderTextColor: colors.textMuted,
2164
2363
  editable: !disabled,
2165
2364
  onFocus: (e) => {
@@ -2173,16 +2372,16 @@ var AppInput = (0, import_react16.forwardRef)(
2173
2372
  ...props
2174
2373
  }
2175
2374
  ),
2176
- rightIcon && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native12.View, { style: styles4.icon, children: rightIcon })
2375
+ rightIcon && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native13.View, { style: styles5.icon, children: rightIcon })
2177
2376
  ]
2178
2377
  }
2179
2378
  ),
2180
- error && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(AppText, { size: "xs", style: { color: errorColor }, children: error })
2379
+ error && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(AppText, { size: "xs", style: { color: errorColor }, children: error })
2181
2380
  ] });
2182
2381
  }
2183
2382
  );
2184
2383
  AppInput.displayName = "AppInput";
2185
- var styles4 = import_react_native12.StyleSheet.create({
2384
+ var styles5 = import_react_native13.StyleSheet.create({
2186
2385
  inputContainer: {
2187
2386
  borderWidth: 0.5,
2188
2387
  minHeight: 48
@@ -2197,9 +2396,9 @@ var styles4 = import_react_native12.StyleSheet.create({
2197
2396
  });
2198
2397
 
2199
2398
  // src/ui/form/Checkbox.tsx
2200
- var import_react17 = require("react");
2201
- var import_react_native13 = require("react-native");
2202
- var import_jsx_runtime20 = require("nativewind/jsx-runtime");
2399
+ var import_react18 = require("react");
2400
+ var import_react_native14 = require("react-native");
2401
+ var import_jsx_runtime22 = require("nativewind/jsx-runtime");
2203
2402
  function Checkbox({
2204
2403
  checked,
2205
2404
  defaultChecked,
@@ -2210,7 +2409,7 @@ function Checkbox({
2210
2409
  testID
2211
2410
  }) {
2212
2411
  const colors = useThemeColors();
2213
- const [internalChecked, setInternalChecked] = (0, import_react17.useState)(defaultChecked || false);
2412
+ const [internalChecked, setInternalChecked] = (0, import_react18.useState)(defaultChecked || false);
2214
2413
  const isChecked = checked !== void 0 ? checked : internalChecked;
2215
2414
  const toggle = () => {
2216
2415
  if (disabled) return;
@@ -2221,8 +2420,8 @@ function Checkbox({
2221
2420
  onChange?.(newChecked);
2222
2421
  };
2223
2422
  const disabledOpacity = 0.4;
2224
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
2225
- import_react_native13.TouchableOpacity,
2423
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2424
+ import_react_native14.TouchableOpacity,
2226
2425
  {
2227
2426
  onPress: toggle,
2228
2427
  disabled,
@@ -2231,7 +2430,7 @@ function Checkbox({
2231
2430
  testID,
2232
2431
  activeOpacity: 0.7,
2233
2432
  children: [
2234
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2433
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2235
2434
  AppView,
2236
2435
  {
2237
2436
  className: cn(
@@ -2239,21 +2438,21 @@ function Checkbox({
2239
2438
  isChecked ? "bg-primary-500" : "bg-white border"
2240
2439
  ),
2241
2440
  style: [
2242
- styles5.checkbox,
2441
+ styles6.checkbox,
2243
2442
  {
2244
2443
  backgroundColor: isChecked ? colors.primary : colors.cardElevated,
2245
2444
  borderColor: isChecked ? colors.primary : colors.border
2246
2445
  }
2247
2446
  ],
2248
- children: isChecked && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(AppView, { testID: `${testID}-icon`, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon, { name: "check", size: "sm", color: "white" }) })
2447
+ children: isChecked && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(AppView, { testID: `${testID}-icon`, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon, { name: "check", size: "sm", color: "white" }) })
2249
2448
  }
2250
2449
  ),
2251
- children && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(AppText, { size: "sm", style: { color: colors.text }, children })
2450
+ children && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(AppText, { size: "sm", style: { color: colors.text }, children })
2252
2451
  ]
2253
2452
  }
2254
2453
  );
2255
2454
  }
2256
- var styles5 = import_react_native13.StyleSheet.create({
2455
+ var styles6 = import_react_native14.StyleSheet.create({
2257
2456
  checkbox: {
2258
2457
  borderWidth: 0.5
2259
2458
  }
@@ -2271,7 +2470,7 @@ var isGroupOptionDisabled = (groupDisabled, optionDisabled) => {
2271
2470
  };
2272
2471
 
2273
2472
  // src/ui/form/CheckboxGroup.tsx
2274
- var import_jsx_runtime21 = require("nativewind/jsx-runtime");
2473
+ var import_jsx_runtime23 = require("nativewind/jsx-runtime");
2275
2474
  function CheckboxGroup({
2276
2475
  value = [],
2277
2476
  onChange,
@@ -2284,7 +2483,7 @@ function CheckboxGroup({
2284
2483
  onChange(toggleGroupValue(value, optionValue, checked));
2285
2484
  };
2286
2485
  const isRow = direction === "row";
2287
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(AppView, { row: isRow, flex: isRow, gap: 4, children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2486
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(AppView, { row: isRow, flex: isRow, gap: 4, children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2288
2487
  Checkbox,
2289
2488
  {
2290
2489
  checked: value.includes(option.value),
@@ -2297,9 +2496,9 @@ function CheckboxGroup({
2297
2496
  }
2298
2497
 
2299
2498
  // src/ui/form/Radio.tsx
2300
- var import_react18 = require("react");
2301
- var import_react_native14 = require("react-native");
2302
- var import_jsx_runtime22 = require("nativewind/jsx-runtime");
2499
+ var import_react19 = require("react");
2500
+ var import_react_native15 = require("react-native");
2501
+ var import_jsx_runtime24 = require("nativewind/jsx-runtime");
2303
2502
  function Radio({
2304
2503
  checked,
2305
2504
  defaultChecked,
@@ -2310,7 +2509,7 @@ function Radio({
2310
2509
  testID
2311
2510
  }) {
2312
2511
  const colors = useThemeColors();
2313
- const [internalChecked, setInternalChecked] = (0, import_react18.useState)(defaultChecked || false);
2512
+ const [internalChecked, setInternalChecked] = (0, import_react19.useState)(defaultChecked || false);
2314
2513
  const isChecked = checked !== void 0 ? checked : internalChecked;
2315
2514
  const toggle = () => {
2316
2515
  if (disabled) return;
@@ -2321,8 +2520,8 @@ function Radio({
2321
2520
  onChange?.(newChecked);
2322
2521
  };
2323
2522
  const disabledOpacity = 0.4;
2324
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2325
- import_react_native14.TouchableOpacity,
2523
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
2524
+ import_react_native15.TouchableOpacity,
2326
2525
  {
2327
2526
  onPress: toggle,
2328
2527
  disabled,
@@ -2331,33 +2530,33 @@ function Radio({
2331
2530
  testID,
2332
2531
  activeOpacity: 0.7,
2333
2532
  children: [
2334
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2533
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2335
2534
  AppView,
2336
2535
  {
2337
2536
  className: cn("w-5 h-5 rounded-full items-center justify-center", isChecked && "border-2"),
2338
2537
  style: [
2339
- styles6.radio,
2538
+ styles7.radio,
2340
2539
  {
2341
2540
  backgroundColor: colors.card,
2342
2541
  borderColor: isChecked ? colors.primary : colors.border,
2343
2542
  borderWidth: isChecked ? 0.5 : 0.5
2344
2543
  }
2345
2544
  ],
2346
- children: isChecked && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2545
+ children: isChecked && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2347
2546
  AppView,
2348
2547
  {
2349
2548
  className: "rounded-full",
2350
- style: [styles6.inner, { backgroundColor: colors.primary }]
2549
+ style: [styles7.inner, { backgroundColor: colors.primary }]
2351
2550
  }
2352
2551
  )
2353
2552
  }
2354
2553
  ),
2355
- children && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(AppText, { size: "sm", style: { color: colors.text }, children })
2554
+ children && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(AppText, { size: "sm", style: { color: colors.text }, children })
2356
2555
  ]
2357
2556
  }
2358
2557
  );
2359
2558
  }
2360
- var styles6 = import_react_native14.StyleSheet.create({
2559
+ var styles7 = import_react_native15.StyleSheet.create({
2361
2560
  radio: {
2362
2561
  borderWidth: 0.5
2363
2562
  },
@@ -2368,7 +2567,7 @@ var styles6 = import_react_native14.StyleSheet.create({
2368
2567
  });
2369
2568
 
2370
2569
  // src/ui/form/RadioGroup.tsx
2371
- var import_jsx_runtime23 = require("nativewind/jsx-runtime");
2570
+ var import_jsx_runtime25 = require("nativewind/jsx-runtime");
2372
2571
  function RadioGroup({
2373
2572
  value,
2374
2573
  onChange,
@@ -2377,7 +2576,7 @@ function RadioGroup({
2377
2576
  disabled = false
2378
2577
  }) {
2379
2578
  const isRow = direction === "row";
2380
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(AppView, { row: isRow, flex: isRow, gap: 4, children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2579
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(AppView, { row: isRow, flex: isRow, gap: 4, children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2381
2580
  Radio,
2382
2581
  {
2383
2582
  checked: value === option.value,
@@ -2390,9 +2589,9 @@ function RadioGroup({
2390
2589
  }
2391
2590
 
2392
2591
  // src/ui/form/Switch.tsx
2393
- var import_react19 = require("react");
2394
- var import_react_native15 = require("react-native");
2395
- var import_jsx_runtime24 = require("nativewind/jsx-runtime");
2592
+ var import_react20 = require("react");
2593
+ var import_react_native16 = require("react-native");
2594
+ var import_jsx_runtime26 = require("nativewind/jsx-runtime");
2396
2595
  function Switch({
2397
2596
  checked,
2398
2597
  defaultChecked,
@@ -2404,7 +2603,7 @@ function Switch({
2404
2603
  style
2405
2604
  }) {
2406
2605
  const colors = useThemeColors();
2407
- const [internalChecked, setInternalChecked] = (0, import_react19.useState)(defaultChecked || false);
2606
+ const [internalChecked, setInternalChecked] = (0, import_react20.useState)(defaultChecked || false);
2408
2607
  const isChecked = checked !== void 0 ? checked : internalChecked;
2409
2608
  const toggle = () => {
2410
2609
  if (disabled) return;
@@ -2424,20 +2623,20 @@ function Switch({
2424
2623
  };
2425
2624
  const config = sizes[size];
2426
2625
  const thumbPosition = isChecked ? config.width - config.thumb - config.padding : config.padding;
2427
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2428
- import_react_native15.TouchableOpacity,
2626
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2627
+ import_react_native16.TouchableOpacity,
2429
2628
  {
2430
2629
  onPress: toggle,
2431
2630
  disabled,
2432
2631
  className: cn(className),
2433
2632
  testID,
2434
2633
  activeOpacity: disabled ? 1 : 0.8,
2435
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2634
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2436
2635
  AppView,
2437
2636
  {
2438
2637
  className: "rounded-full",
2439
2638
  style: [
2440
- styles7.track,
2639
+ styles8.track,
2441
2640
  {
2442
2641
  width: config.width,
2443
2642
  height: config.height,
@@ -2446,12 +2645,12 @@ function Switch({
2446
2645
  },
2447
2646
  style
2448
2647
  ],
2449
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2648
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2450
2649
  AppView,
2451
2650
  {
2452
2651
  className: "rounded-full",
2453
2652
  style: [
2454
- styles7.thumb,
2653
+ styles8.thumb,
2455
2654
  {
2456
2655
  width: config.thumb,
2457
2656
  height: config.thumb,
@@ -2470,7 +2669,7 @@ function Switch({
2470
2669
  }
2471
2670
  );
2472
2671
  }
2473
- var styles7 = import_react_native15.StyleSheet.create({
2672
+ var styles8 = import_react_native16.StyleSheet.create({
2474
2673
  track: {
2475
2674
  justifyContent: "center",
2476
2675
  padding: 2
@@ -2485,15 +2684,15 @@ var styles7 = import_react_native15.StyleSheet.create({
2485
2684
  });
2486
2685
 
2487
2686
  // src/ui/form/Slider.tsx
2488
- var import_react21 = require("react");
2489
- var import_react_native16 = require("react-native");
2687
+ var import_react22 = require("react");
2688
+ var import_react_native17 = require("react-native");
2490
2689
 
2491
2690
  // src/ui/form/useFormTheme.ts
2492
- var import_react20 = require("react");
2691
+ var import_react21 = require("react");
2493
2692
  function useFormThemeColors() {
2494
2693
  const { isDark } = useOptionalTheme();
2495
2694
  const colors = useThemeColors();
2496
- return (0, import_react20.useMemo)(
2695
+ return (0, import_react21.useMemo)(
2497
2696
  () => ({
2498
2697
  primary: colors.primary,
2499
2698
  primarySurface: colors.primarySurface,
@@ -2514,7 +2713,7 @@ function useFormThemeColors() {
2514
2713
  }
2515
2714
 
2516
2715
  // src/ui/form/Slider.tsx
2517
- var import_jsx_runtime25 = require("nativewind/jsx-runtime");
2716
+ var import_jsx_runtime27 = require("nativewind/jsx-runtime");
2518
2717
  function Slider({
2519
2718
  value,
2520
2719
  defaultValue = 0,
@@ -2528,13 +2727,13 @@ function Slider({
2528
2727
  className
2529
2728
  }) {
2530
2729
  const colors = useFormThemeColors();
2531
- const [internalValue, setInternalValue] = (0, import_react21.useState)(defaultValue);
2532
- const [trackWidth, setTrackWidth] = (0, import_react21.useState)(0);
2533
- const [isDragging, setIsDragging] = (0, import_react21.useState)(false);
2730
+ const [internalValue, setInternalValue] = (0, import_react22.useState)(defaultValue);
2731
+ const [trackWidth, setTrackWidth] = (0, import_react22.useState)(0);
2732
+ const [isDragging, setIsDragging] = (0, import_react22.useState)(false);
2534
2733
  const currentValue = value !== void 0 ? value : internalValue;
2535
2734
  const disabledOpacity = 0.4;
2536
2735
  const progress = (currentValue - min) / (max - min) * 100;
2537
- const getValueFromPosition = (0, import_react21.useCallback)(
2736
+ const getValueFromPosition = (0, import_react22.useCallback)(
2538
2737
  (position) => {
2539
2738
  const percentage = Math.max(0, Math.min(1, position / trackWidth));
2540
2739
  const rawValue = min + percentage * (max - min);
@@ -2543,7 +2742,7 @@ function Slider({
2543
2742
  },
2544
2743
  [trackWidth, min, max, step]
2545
2744
  );
2546
- const setValue = (0, import_react21.useCallback)(
2745
+ const setValue = (0, import_react22.useCallback)(
2547
2746
  (newValue) => {
2548
2747
  const clampedValue = Math.min(max, Math.max(min, newValue));
2549
2748
  if (value === void 0) {
@@ -2553,8 +2752,8 @@ function Slider({
2553
2752
  },
2554
2753
  [value, min, max, onChange]
2555
2754
  );
2556
- const panResponder = (0, import_react21.useRef)(
2557
- import_react_native16.PanResponder.create({
2755
+ const panResponder = (0, import_react22.useRef)(
2756
+ import_react_native17.PanResponder.create({
2558
2757
  onStartShouldSetPanResponder: () => !disabled,
2559
2758
  onMoveShouldSetPanResponder: () => !disabled,
2560
2759
  onPanResponderGrant: () => {
@@ -2574,7 +2773,7 @@ function Slider({
2574
2773
  }
2575
2774
  })
2576
2775
  ).current;
2577
- const handleTrackPress = (0, import_react21.useCallback)(
2776
+ const handleTrackPress = (0, import_react22.useCallback)(
2578
2777
  (event) => {
2579
2778
  if (disabled) return;
2580
2779
  const { locationX } = event.nativeEvent;
@@ -2584,16 +2783,16 @@ function Slider({
2584
2783
  },
2585
2784
  [disabled, getValueFromPosition, setValue, onChangeEnd]
2586
2785
  );
2587
- const onLayout = (0, import_react21.useCallback)((event) => {
2786
+ const onLayout = (0, import_react22.useCallback)((event) => {
2588
2787
  setTrackWidth(event.nativeEvent.layout.width);
2589
2788
  }, []);
2590
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(AppView, { className: cn("py-2", className), children: [
2591
- showTooltip && isDragging && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
2789
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(AppView, { className: cn("py-2", className), children: [
2790
+ showTooltip && isDragging && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
2592
2791
  AppView,
2593
2792
  {
2594
2793
  className: "absolute rounded px-2 py-1 -top-8",
2595
2794
  style: [
2596
- styles8.tooltip,
2795
+ styles9.tooltip,
2597
2796
  {
2598
2797
  backgroundColor: colors.surfaceMuted,
2599
2798
  left: `${progress}%`,
@@ -2601,12 +2800,12 @@ function Slider({
2601
2800
  }
2602
2801
  ],
2603
2802
  children: [
2604
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(AppText, { size: "xs", style: { color: colors.text }, children: Math.round(currentValue) }),
2605
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2803
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(AppText, { size: "xs", style: { color: colors.text }, children: Math.round(currentValue) }),
2804
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2606
2805
  AppView,
2607
2806
  {
2608
2807
  style: [
2609
- styles8.tooltipArrow,
2808
+ styles9.tooltipArrow,
2610
2809
  {
2611
2810
  borderTopColor: colors.surfaceMuted
2612
2811
  }
@@ -2616,23 +2815,23 @@ function Slider({
2616
2815
  ]
2617
2816
  }
2618
2817
  ),
2619
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
2620
- import_react_native16.View,
2818
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
2819
+ import_react_native17.View,
2621
2820
  {
2622
2821
  onLayout,
2623
2822
  className: "rounded-full",
2624
2823
  style: [
2625
- styles8.track,
2824
+ styles9.track,
2626
2825
  { backgroundColor: colors.divider, opacity: disabled ? disabledOpacity : 1 }
2627
2826
  ],
2628
2827
  onTouchEnd: handleTrackPress,
2629
2828
  children: [
2630
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2829
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2631
2830
  AppView,
2632
2831
  {
2633
2832
  className: "rounded-full",
2634
2833
  style: [
2635
- styles8.filledTrack,
2834
+ styles9.filledTrack,
2636
2835
  {
2637
2836
  backgroundColor: colors.primary,
2638
2837
  width: `${progress}%`
@@ -2640,12 +2839,12 @@ function Slider({
2640
2839
  ]
2641
2840
  }
2642
2841
  ),
2643
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2842
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2644
2843
  AppView,
2645
2844
  {
2646
2845
  className: "absolute rounded-full items-center justify-center",
2647
2846
  style: [
2648
- styles8.thumb,
2847
+ styles9.thumb,
2649
2848
  {
2650
2849
  backgroundColor: colors.textInverse,
2651
2850
  left: `${progress}%`,
@@ -2657,12 +2856,12 @@ function Slider({
2657
2856
  }
2658
2857
  ],
2659
2858
  ...panResponder.panHandlers,
2660
- children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2859
+ children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2661
2860
  AppView,
2662
2861
  {
2663
2862
  className: "rounded-full",
2664
2863
  style: [
2665
- styles8.thumbDot,
2864
+ styles9.thumbDot,
2666
2865
  {
2667
2866
  backgroundColor: colors.primary
2668
2867
  }
@@ -2676,7 +2875,7 @@ function Slider({
2676
2875
  )
2677
2876
  ] });
2678
2877
  }
2679
- var styles8 = import_react_native16.StyleSheet.create({
2878
+ var styles9 = import_react_native17.StyleSheet.create({
2680
2879
  track: {
2681
2880
  height: 6,
2682
2881
  width: "100%"
@@ -2717,9 +2916,9 @@ var styles8 = import_react_native16.StyleSheet.create({
2717
2916
  });
2718
2917
 
2719
2918
  // src/ui/form/Select.tsx
2720
- var import_react22 = require("react");
2721
- var import_react_native17 = require("react-native");
2722
- var import_jsx_runtime26 = require("nativewind/jsx-runtime");
2919
+ var import_react23 = require("react");
2920
+ var import_react_native18 = require("react-native");
2921
+ var import_jsx_runtime28 = require("nativewind/jsx-runtime");
2723
2922
  function Select({
2724
2923
  value,
2725
2924
  onChange,
@@ -2733,24 +2932,24 @@ function Select({
2733
2932
  className
2734
2933
  }) {
2735
2934
  const colors = useFormThemeColors();
2736
- const [visible, setVisible] = (0, import_react22.useState)(false);
2737
- const [searchKeyword, setSearchKeyword] = (0, import_react22.useState)("");
2738
- const selectedValues = (0, import_react22.useMemo)(() => {
2935
+ const [visible, setVisible] = (0, import_react23.useState)(false);
2936
+ const [searchKeyword, setSearchKeyword] = (0, import_react23.useState)("");
2937
+ const selectedValues = (0, import_react23.useMemo)(() => {
2739
2938
  if (multiple) {
2740
2939
  return Array.isArray(value) ? value : [];
2741
2940
  }
2742
2941
  return value ? [value] : [];
2743
2942
  }, [value, multiple]);
2744
- const displayText = (0, import_react22.useMemo)(() => {
2943
+ const displayText = (0, import_react23.useMemo)(() => {
2745
2944
  if (selectedValues.length === 0) return placeholder;
2746
2945
  const selectedLabels = options.filter((opt) => selectedValues.includes(opt.value)).map((opt) => opt.label);
2747
2946
  return selectedLabels.join(", ") || placeholder;
2748
2947
  }, [selectedValues, options, placeholder]);
2749
- const filteredOptions = (0, import_react22.useMemo)(() => {
2948
+ const filteredOptions = (0, import_react23.useMemo)(() => {
2750
2949
  if (!searchable || !searchKeyword) return options;
2751
2950
  return options.filter((opt) => opt.label.toLowerCase().includes(searchKeyword.toLowerCase()));
2752
2951
  }, [options, searchable, searchKeyword]);
2753
- const handleSelect = (0, import_react22.useCallback)(
2952
+ const handleSelect = (0, import_react23.useCallback)(
2754
2953
  (optionValue) => {
2755
2954
  if (multiple) {
2756
2955
  const currentValues = Array.isArray(value) ? value : [];
@@ -2763,24 +2962,24 @@ function Select({
2763
2962
  },
2764
2963
  [multiple, value, onChange]
2765
2964
  );
2766
- const handleClear = (0, import_react22.useCallback)(
2965
+ const handleClear = (0, import_react23.useCallback)(
2767
2966
  (e) => {
2768
2967
  e.stopPropagation();
2769
2968
  onChange?.(multiple ? [] : "");
2770
2969
  },
2771
2970
  [multiple, onChange]
2772
2971
  );
2773
- const handleSearch = (0, import_react22.useCallback)(
2972
+ const handleSearch = (0, import_react23.useCallback)(
2774
2973
  (text) => {
2775
2974
  setSearchKeyword(text);
2776
2975
  onSearch?.(text);
2777
2976
  },
2778
2977
  [onSearch]
2779
2978
  );
2780
- const renderOption = (0, import_react22.useCallback)(
2979
+ const renderOption = (0, import_react23.useCallback)(
2781
2980
  ({ item }) => {
2782
2981
  const isSelected = selectedValues.includes(item.value);
2783
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
2982
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
2784
2983
  AppPressable,
2785
2984
  {
2786
2985
  className: cn(
@@ -2788,22 +2987,22 @@ function Select({
2788
2987
  isSelected && "bg-primary-50"
2789
2988
  ),
2790
2989
  style: [
2791
- styles9.optionItem,
2990
+ styles10.optionItem,
2792
2991
  { borderBottomColor: colors.divider },
2793
2992
  isSelected && { backgroundColor: colors.primarySurface }
2794
2993
  ],
2795
2994
  onPress: () => handleSelect(item.value),
2796
2995
  children: [
2797
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(AppText, { style: { color: isSelected ? colors.primary : colors.text }, children: item.label }),
2798
- isSelected && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: "check", size: "sm", color: "primary-500" })
2996
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(AppText, { style: { color: isSelected ? colors.primary : colors.text }, children: item.label }),
2997
+ isSelected && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon, { name: "check", size: "sm", color: "primary-500" })
2799
2998
  ]
2800
2999
  }
2801
3000
  );
2802
3001
  },
2803
3002
  [selectedValues, handleSelect, colors]
2804
3003
  );
2805
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
2806
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
3004
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
3005
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
2807
3006
  AppPressable,
2808
3007
  {
2809
3008
  className: cn(
@@ -2811,11 +3010,11 @@ function Select({
2811
3010
  disabled ? "opacity-60" : "",
2812
3011
  className
2813
3012
  ),
2814
- style: [styles9.trigger, { backgroundColor: colors.surface, borderColor: colors.border }],
3013
+ style: [styles10.trigger, { backgroundColor: colors.surface, borderColor: colors.border }],
2815
3014
  disabled,
2816
3015
  onPress: () => setVisible(true),
2817
3016
  children: [
2818
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3017
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2819
3018
  AppText,
2820
3019
  {
2821
3020
  className: "flex-1",
@@ -2824,46 +3023,46 @@ function Select({
2824
3023
  children: displayText
2825
3024
  }
2826
3025
  ),
2827
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react_native17.View, { className: "flex-row items-center", children: [
2828
- clearable && selectedValues.length > 0 && !disabled && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_native17.TouchableOpacity, { onPress: handleClear, className: "mr-2 p-1", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: "close", size: "sm", color: colors.icon }) }),
2829
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: "keyboard-arrow-down", size: "md", color: colors.icon })
3026
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_react_native18.View, { className: "flex-row items-center", children: [
3027
+ clearable && selectedValues.length > 0 && !disabled && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_native18.TouchableOpacity, { onPress: handleClear, className: "mr-2 p-1", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon, { name: "close", size: "sm", color: colors.icon }) }),
3028
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon, { name: "keyboard-arrow-down", size: "md", color: colors.icon })
2830
3029
  ] })
2831
3030
  ]
2832
3031
  }
2833
3032
  ),
2834
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2835
- import_react_native17.Modal,
3033
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3034
+ import_react_native18.Modal,
2836
3035
  {
2837
3036
  visible,
2838
3037
  transparent: true,
2839
3038
  animationType: "slide",
2840
3039
  onRequestClose: () => setVisible(false),
2841
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(AppView, { className: "flex-1", style: { backgroundColor: colors.overlay }, justify: "end", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
3040
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(AppView, { className: "flex-1", style: { backgroundColor: colors.overlay }, justify: "end", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
2842
3041
  AppView,
2843
3042
  {
2844
3043
  className: "rounded-t-2xl max-h-[70%]",
2845
3044
  style: { backgroundColor: colors.surface },
2846
3045
  children: [
2847
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
3046
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
2848
3047
  AppView,
2849
3048
  {
2850
3049
  row: true,
2851
3050
  between: true,
2852
3051
  items: "center",
2853
3052
  className: "px-4 py-3",
2854
- style: [styles9.header, { borderBottomColor: colors.divider }],
3053
+ style: [styles10.header, { borderBottomColor: colors.divider }],
2855
3054
  children: [
2856
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(AppText, { className: "text-lg font-semibold", style: { color: colors.text }, children: multiple ? "\u9009\u62E9\u9009\u9879" : "\u8BF7\u9009\u62E9" }),
2857
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_native17.TouchableOpacity, { onPress: () => setVisible(false), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: "close", size: "md", color: colors.icon }) })
3055
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(AppText, { className: "text-lg font-semibold", style: { color: colors.text }, children: multiple ? "\u9009\u62E9\u9009\u9879" : "\u8BF7\u9009\u62E9" }),
3056
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_native18.TouchableOpacity, { onPress: () => setVisible(false), children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon, { name: "close", size: "md", color: colors.icon }) })
2858
3057
  ]
2859
3058
  }
2860
3059
  ),
2861
- searchable && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3060
+ searchable && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2862
3061
  AppView,
2863
3062
  {
2864
3063
  className: "px-4 py-3",
2865
- style: [styles9.searchBox, { borderBottomColor: colors.divider }],
2866
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
3064
+ style: [styles10.searchBox, { borderBottomColor: colors.divider }],
3065
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
2867
3066
  AppView,
2868
3067
  {
2869
3068
  row: true,
@@ -2871,9 +3070,9 @@ function Select({
2871
3070
  className: "px-3 py-2 rounded-lg",
2872
3071
  style: { backgroundColor: colors.surfaceMuted },
2873
3072
  children: [
2874
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_native17.View, { style: { marginRight: 8 }, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: "search", size: "sm", color: colors.icon }) }),
2875
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2876
- import_react_native17.TextInput,
3073
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_native18.View, { style: { marginRight: 8 }, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon, { name: "search", size: "sm", color: colors.icon }) }),
3074
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3075
+ import_react_native18.TextInput,
2877
3076
  {
2878
3077
  className: "flex-1 text-base",
2879
3078
  style: { color: colors.text },
@@ -2884,42 +3083,42 @@ function Select({
2884
3083
  autoFocus: true
2885
3084
  }
2886
3085
  ),
2887
- searchKeyword.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_native17.TouchableOpacity, { onPress: () => setSearchKeyword(""), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: "close", size: "sm", color: colors.icon }) })
3086
+ searchKeyword.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_native18.TouchableOpacity, { onPress: () => setSearchKeyword(""), children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon, { name: "close", size: "sm", color: colors.icon }) })
2888
3087
  ]
2889
3088
  }
2890
3089
  )
2891
3090
  }
2892
3091
  ),
2893
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2894
- import_react_native17.FlatList,
3092
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3093
+ import_react_native18.FlatList,
2895
3094
  {
2896
3095
  data: filteredOptions,
2897
3096
  keyExtractor: (item) => item.value,
2898
3097
  renderItem: renderOption,
2899
- ListEmptyComponent: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(AppView, { center: true, className: "py-8", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(AppText, { style: { color: colors.textMuted }, children: "\u6682\u65E0\u9009\u9879" }) })
3098
+ ListEmptyComponent: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(AppView, { center: true, className: "py-8", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(AppText, { style: { color: colors.textMuted }, children: "\u6682\u65E0\u9009\u9879" }) })
2900
3099
  }
2901
3100
  ),
2902
- multiple && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
3101
+ multiple && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
2903
3102
  AppView,
2904
3103
  {
2905
3104
  row: true,
2906
3105
  between: true,
2907
3106
  items: "center",
2908
3107
  className: "px-4 py-3",
2909
- style: [styles9.footer, { borderTopColor: colors.divider }],
3108
+ style: [styles10.footer, { borderTopColor: colors.divider }],
2910
3109
  children: [
2911
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(AppText, { style: { color: colors.textMuted }, children: [
3110
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(AppText, { style: { color: colors.textMuted }, children: [
2912
3111
  "\u5DF2\u9009\u62E9 ",
2913
3112
  selectedValues.length,
2914
3113
  " \u9879"
2915
3114
  ] }),
2916
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2917
- import_react_native17.TouchableOpacity,
3115
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3116
+ import_react_native18.TouchableOpacity,
2918
3117
  {
2919
3118
  className: "px-4 py-2 rounded-lg",
2920
3119
  style: { backgroundColor: colors.primary },
2921
3120
  onPress: () => setVisible(false),
2922
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(AppText, { className: "font-medium", style: { color: colors.textInverse }, children: "\u786E\u5B9A" })
3121
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(AppText, { className: "font-medium", style: { color: colors.textInverse }, children: "\u786E\u5B9A" })
2923
3122
  }
2924
3123
  )
2925
3124
  ]
@@ -2932,7 +3131,7 @@ function Select({
2932
3131
  )
2933
3132
  ] });
2934
3133
  }
2935
- var styles9 = import_react_native17.StyleSheet.create({
3134
+ var styles10 = import_react_native18.StyleSheet.create({
2936
3135
  trigger: {
2937
3136
  borderWidth: 0.5
2938
3137
  },
@@ -2951,9 +3150,9 @@ var styles9 = import_react_native17.StyleSheet.create({
2951
3150
  });
2952
3151
 
2953
3152
  // src/ui/form/DatePicker.tsx
2954
- var import_react23 = require("react");
2955
- var import_react_native18 = require("react-native");
2956
- var import_jsx_runtime27 = require("nativewind/jsx-runtime");
3153
+ var import_react24 = require("react");
3154
+ var import_react_native19 = require("react-native");
3155
+ var import_jsx_runtime29 = require("nativewind/jsx-runtime");
2957
3156
  function PickerColumn({
2958
3157
  title,
2959
3158
  values,
@@ -2964,27 +3163,27 @@ function PickerColumn({
2964
3163
  showDivider = false,
2965
3164
  colors
2966
3165
  }) {
2967
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
3166
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
2968
3167
  AppView,
2969
3168
  {
2970
3169
  flex: true,
2971
3170
  style: [
2972
- showDivider && styles10.column,
3171
+ showDivider && styles11.column,
2973
3172
  showDivider ? { borderRightColor: colors.divider } : void 0
2974
3173
  ],
2975
3174
  children: [
2976
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(AppView, { center: true, className: "py-2", style: { backgroundColor: colors.headerSurface }, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(AppText, { className: "text-sm font-medium", style: { color: colors.textMuted }, children: title }) }),
2977
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(AppView, { className: "flex-1", children: values.map((value) => {
3175
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(AppView, { center: true, className: "py-2", style: { backgroundColor: colors.headerSurface }, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(AppText, { className: "text-sm font-medium", style: { color: colors.textMuted }, children: title }) }),
3176
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(AppView, { className: "flex-1", children: values.map((value) => {
2978
3177
  const selected = selectedValue === value;
2979
3178
  const disabled = isDisabled(value);
2980
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2981
- import_react_native18.TouchableOpacity,
3179
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3180
+ import_react_native19.TouchableOpacity,
2982
3181
  {
2983
3182
  className: cn("py-2 items-center", selected && "bg-primary-50"),
2984
3183
  style: selected ? { backgroundColor: colors.primarySurface } : void 0,
2985
3184
  disabled,
2986
3185
  onPress: () => onSelect(value),
2987
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3186
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2988
3187
  AppText,
2989
3188
  {
2990
3189
  className: cn(selected ? "font-semibold" : void 0, disabled && "opacity-30"),
@@ -3013,16 +3212,16 @@ function DatePicker({
3013
3212
  className
3014
3213
  }) {
3015
3214
  const colors = useFormThemeColors();
3016
- const [visible, setVisible] = (0, import_react23.useState)(false);
3017
- const [tempDate, setTempDate] = (0, import_react23.useState)(value || /* @__PURE__ */ new Date());
3018
- const displayText = (0, import_react23.useMemo)(() => {
3215
+ const [visible, setVisible] = (0, import_react24.useState)(false);
3216
+ const [tempDate, setTempDate] = (0, import_react24.useState)(value || /* @__PURE__ */ new Date());
3217
+ const displayText = (0, import_react24.useMemo)(() => {
3019
3218
  return value ? formatDate(value, format) : placeholder;
3020
3219
  }, [value, format, placeholder]);
3021
- const handleConfirm = (0, import_react23.useCallback)(() => {
3220
+ const handleConfirm = (0, import_react24.useCallback)(() => {
3022
3221
  onChange?.(tempDate);
3023
3222
  setVisible(false);
3024
3223
  }, [tempDate, onChange]);
3025
- const years = (0, import_react23.useMemo)(() => {
3224
+ const years = (0, import_react24.useMemo)(() => {
3026
3225
  const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
3027
3226
  const arr = [];
3028
3227
  for (let i = currentYear - 50; i <= currentYear + 50; i++) {
@@ -3030,16 +3229,16 @@ function DatePicker({
3030
3229
  }
3031
3230
  return arr;
3032
3231
  }, []);
3033
- const months = (0, import_react23.useMemo)(() => {
3232
+ const months = (0, import_react24.useMemo)(() => {
3034
3233
  return Array.from({ length: 12 }, (_, i) => i + 1);
3035
3234
  }, []);
3036
- const days = (0, import_react23.useMemo)(() => {
3235
+ const days = (0, import_react24.useMemo)(() => {
3037
3236
  const year = tempDate.getFullYear();
3038
3237
  const month = tempDate.getMonth();
3039
3238
  const daysInMonth = new Date(year, month + 1, 0).getDate();
3040
3239
  return Array.from({ length: daysInMonth }, (_, i) => i + 1);
3041
3240
  }, [tempDate]);
3042
- const isDateDisabled = (0, import_react23.useCallback)(
3241
+ const isDateDisabled = (0, import_react24.useCallback)(
3043
3242
  (year, month, day) => {
3044
3243
  const date = new Date(year, month - 1, day);
3045
3244
  if (minDate && date < minDate) return true;
@@ -3048,7 +3247,7 @@ function DatePicker({
3048
3247
  },
3049
3248
  [minDate, maxDate]
3050
3249
  );
3051
- const updateTempDate = (0, import_react23.useCallback)(
3250
+ const updateTempDate = (0, import_react24.useCallback)(
3052
3251
  (year, month, day) => {
3053
3252
  const newDate = new Date(tempDate);
3054
3253
  if (year !== void 0) newDate.setFullYear(year);
@@ -3058,8 +3257,8 @@ function DatePicker({
3058
3257
  },
3059
3258
  [tempDate]
3060
3259
  );
3061
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
3062
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
3260
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
3261
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
3063
3262
  AppPressable,
3064
3263
  {
3065
3264
  className: cn(
@@ -3067,14 +3266,14 @@ function DatePicker({
3067
3266
  disabled ? "opacity-60" : "",
3068
3267
  className
3069
3268
  ),
3070
- style: [styles10.trigger, { backgroundColor: colors.surface, borderColor: colors.border }],
3269
+ style: [styles11.trigger, { backgroundColor: colors.surface, borderColor: colors.border }],
3071
3270
  disabled,
3072
3271
  onPress: () => {
3073
3272
  setTempDate(value || /* @__PURE__ */ new Date());
3074
3273
  setVisible(true);
3075
3274
  },
3076
3275
  children: [
3077
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3276
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3078
3277
  AppText,
3079
3278
  {
3080
3279
  className: "flex-1",
@@ -3083,36 +3282,36 @@ function DatePicker({
3083
3282
  children: displayText
3084
3283
  }
3085
3284
  ),
3086
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Icon, { name: "calendar-today", size: "md", color: colors.icon })
3285
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { name: "calendar-today", size: "md", color: colors.icon })
3087
3286
  ]
3088
3287
  }
3089
3288
  ),
3090
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3091
- import_react_native18.Modal,
3289
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3290
+ import_react_native19.Modal,
3092
3291
  {
3093
3292
  visible,
3094
3293
  transparent: true,
3095
3294
  animationType: "slide",
3096
3295
  onRequestClose: () => setVisible(false),
3097
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(AppView, { className: "flex-1", style: { backgroundColor: colors.overlay }, justify: "end", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(AppView, { className: "rounded-t-2xl", style: { backgroundColor: colors.surface }, children: [
3098
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
3296
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(AppView, { className: "flex-1", style: { backgroundColor: colors.overlay }, justify: "end", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(AppView, { className: "rounded-t-2xl", style: { backgroundColor: colors.surface }, children: [
3297
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
3099
3298
  AppView,
3100
3299
  {
3101
3300
  row: true,
3102
3301
  between: true,
3103
3302
  items: "center",
3104
3303
  className: "px-4 py-3",
3105
- style: [styles10.header, { borderBottomColor: colors.divider }],
3304
+ style: [styles11.header, { borderBottomColor: colors.divider }],
3106
3305
  children: [
3107
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_native18.TouchableOpacity, { onPress: () => setVisible(false), children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(AppText, { style: { color: colors.textMuted }, children: "\u53D6\u6D88" }) }),
3108
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(AppText, { className: "text-lg font-semibold", style: { color: colors.text }, children: "\u9009\u62E9\u65E5\u671F" }),
3109
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_native18.TouchableOpacity, { onPress: handleConfirm, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(AppText, { style: { color: colors.primary }, className: "font-medium", children: "\u786E\u5B9A" }) })
3306
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native19.TouchableOpacity, { onPress: () => setVisible(false), children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(AppText, { style: { color: colors.textMuted }, children: "\u53D6\u6D88" }) }),
3307
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(AppText, { className: "text-lg font-semibold", style: { color: colors.text }, children: "\u9009\u62E9\u65E5\u671F" }),
3308
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native19.TouchableOpacity, { onPress: handleConfirm, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(AppText, { style: { color: colors.primary }, className: "font-medium", children: "\u786E\u5B9A" }) })
3110
3309
  ]
3111
3310
  }
3112
3311
  ),
3113
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(AppView, { center: true, className: "py-4", style: { backgroundColor: colors.headerSurface }, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(AppText, { className: "text-2xl font-semibold", style: { color: colors.text }, children: formatDate(tempDate, "yyyy\u5E74MM\u6708dd\u65E5") }) }),
3114
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(AppView, { row: true, className: "h-48", children: [
3115
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3312
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(AppView, { center: true, className: "py-4", style: { backgroundColor: colors.headerSurface }, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(AppText, { className: "text-2xl font-semibold", style: { color: colors.text }, children: formatDate(tempDate, "yyyy\u5E74MM\u6708dd\u65E5") }) }),
3313
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(AppView, { row: true, className: "h-48", children: [
3314
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3116
3315
  PickerColumn,
3117
3316
  {
3118
3317
  title: "\u5E74",
@@ -3124,7 +3323,7 @@ function DatePicker({
3124
3323
  showDivider: true
3125
3324
  }
3126
3325
  ),
3127
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3326
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3128
3327
  PickerColumn,
3129
3328
  {
3130
3329
  title: "\u6708",
@@ -3137,7 +3336,7 @@ function DatePicker({
3137
3336
  showDivider: true
3138
3337
  }
3139
3338
  ),
3140
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3339
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3141
3340
  PickerColumn,
3142
3341
  {
3143
3342
  title: "\u65E5",
@@ -3149,38 +3348,38 @@ function DatePicker({
3149
3348
  }
3150
3349
  )
3151
3350
  ] }),
3152
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
3351
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
3153
3352
  AppView,
3154
3353
  {
3155
3354
  row: true,
3156
3355
  className: "px-4 py-3 gap-2",
3157
- style: [styles10.footer, { borderTopColor: colors.divider }],
3356
+ style: [styles11.footer, { borderTopColor: colors.divider }],
3158
3357
  children: [
3159
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3160
- import_react_native18.TouchableOpacity,
3358
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3359
+ import_react_native19.TouchableOpacity,
3161
3360
  {
3162
3361
  className: "flex-1 py-2 items-center rounded-lg",
3163
3362
  style: { backgroundColor: colors.surfaceMuted },
3164
3363
  onPress: () => setTempDate(/* @__PURE__ */ new Date()),
3165
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(AppText, { style: { color: colors.text }, children: "\u4ECA\u5929" })
3364
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(AppText, { style: { color: colors.text }, children: "\u4ECA\u5929" })
3166
3365
  }
3167
3366
  ),
3168
- minDate && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3169
- import_react_native18.TouchableOpacity,
3367
+ minDate && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3368
+ import_react_native19.TouchableOpacity,
3170
3369
  {
3171
3370
  className: "flex-1 py-2 items-center rounded-lg",
3172
3371
  style: { backgroundColor: colors.surfaceMuted },
3173
3372
  onPress: () => setTempDate(minDate),
3174
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(AppText, { style: { color: colors.text }, children: "\u6700\u65E9" })
3373
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(AppText, { style: { color: colors.text }, children: "\u6700\u65E9" })
3175
3374
  }
3176
3375
  ),
3177
- maxDate && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3178
- import_react_native18.TouchableOpacity,
3376
+ maxDate && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3377
+ import_react_native19.TouchableOpacity,
3179
3378
  {
3180
3379
  className: "flex-1 py-2 items-center rounded-lg",
3181
3380
  style: { backgroundColor: colors.surfaceMuted },
3182
3381
  onPress: () => setTempDate(maxDate),
3183
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(AppText, { style: { color: colors.text }, children: "\u6700\u665A" })
3382
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(AppText, { style: { color: colors.text }, children: "\u6700\u665A" })
3184
3383
  }
3185
3384
  )
3186
3385
  ]
@@ -3191,7 +3390,7 @@ function DatePicker({
3191
3390
  )
3192
3391
  ] });
3193
3392
  }
3194
- var styles10 = import_react_native18.StyleSheet.create({
3393
+ var styles11 = import_react_native19.StyleSheet.create({
3195
3394
  trigger: {
3196
3395
  borderWidth: 0.5
3197
3396
  },
@@ -3207,7 +3406,7 @@ var styles10 = import_react_native18.StyleSheet.create({
3207
3406
  });
3208
3407
 
3209
3408
  // src/ui/form/FormItem.tsx
3210
- var import_jsx_runtime28 = require("nativewind/jsx-runtime");
3409
+ var import_jsx_runtime30 = require("nativewind/jsx-runtime");
3211
3410
  function FormItem({
3212
3411
  name: _name,
3213
3412
  label,
@@ -3219,19 +3418,19 @@ function FormItem({
3219
3418
  labelClassName
3220
3419
  }) {
3221
3420
  const colors = useThemeColors();
3222
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(AppView, { className: cn("mb-4", className), children: [
3223
- label && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(AppView, { row: true, items: "center", gap: 1, className: cn("mb-2", labelClassName), children: [
3224
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(AppText, { size: "sm", weight: "medium", style: { color: colors.textSecondary }, children: label }),
3225
- required && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(AppText, { color: "error-500", children: "*" })
3421
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(AppView, { className: cn("mb-4", className), children: [
3422
+ label && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(AppView, { row: true, items: "center", gap: 1, className: cn("mb-2", labelClassName), children: [
3423
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(AppText, { size: "sm", weight: "medium", style: { color: colors.textSecondary }, children: label }),
3424
+ required && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(AppText, { color: "error-500", children: "*" })
3226
3425
  ] }),
3227
3426
  children,
3228
- error && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(AppText, { size: "sm", color: "error-500", className: "mt-1", children: error }),
3229
- help && !error && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(AppText, { size: "sm", className: "mt-1", style: { color: colors.textMuted }, children: help })
3427
+ error && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(AppText, { size: "sm", color: "error-500", className: "mt-1", children: error }),
3428
+ help && !error && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(AppText, { size: "sm", className: "mt-1", style: { color: colors.textMuted }, children: help })
3230
3429
  ] });
3231
3430
  }
3232
3431
 
3233
3432
  // src/ui/form/useForm.ts
3234
- var import_react24 = require("react");
3433
+ var import_react25 = require("react");
3235
3434
  var getIssuePath = (issue) => issue.path.map(String).join(".");
3236
3435
  var getFieldError = (issues, name) => {
3237
3436
  const exactIssue = issues.find((issue) => getIssuePath(issue) === name);
@@ -3247,16 +3446,16 @@ var buildFormErrors = (issues) => {
3247
3446
  }, {});
3248
3447
  };
3249
3448
  function useForm({ schema, defaultValues }) {
3250
- const [values, setValues] = (0, import_react24.useState)(defaultValues);
3251
- const [errors, setErrors] = (0, import_react24.useState)({});
3252
- const [isSubmitting, setIsSubmitting] = (0, import_react24.useState)(false);
3253
- const isDirty = (0, import_react24.useMemo)(() => {
3449
+ const [values, setValues] = (0, import_react25.useState)(defaultValues);
3450
+ const [errors, setErrors] = (0, import_react25.useState)({});
3451
+ const [isSubmitting, setIsSubmitting] = (0, import_react25.useState)(false);
3452
+ const isDirty = (0, import_react25.useMemo)(() => {
3254
3453
  return JSON.stringify(values) !== JSON.stringify(defaultValues);
3255
3454
  }, [values, defaultValues]);
3256
- const isValid = (0, import_react24.useMemo)(() => {
3455
+ const isValid = (0, import_react25.useMemo)(() => {
3257
3456
  return Object.keys(errors).length === 0;
3258
3457
  }, [errors]);
3259
- const clearFieldError = (0, import_react24.useCallback)((name) => {
3458
+ const clearFieldError = (0, import_react25.useCallback)((name) => {
3260
3459
  setErrors((prev) => {
3261
3460
  if (!(name in prev)) return prev;
3262
3461
  const next = { ...prev };
@@ -3264,20 +3463,20 @@ function useForm({ schema, defaultValues }) {
3264
3463
  return next;
3265
3464
  });
3266
3465
  }, []);
3267
- const setValue = (0, import_react24.useCallback)(
3466
+ const setValue = (0, import_react25.useCallback)(
3268
3467
  (name, value) => {
3269
3468
  setValues((prev) => ({ ...prev, [name]: value }));
3270
3469
  clearFieldError(name);
3271
3470
  },
3272
3471
  [clearFieldError]
3273
3472
  );
3274
- const getValue = (0, import_react24.useCallback)(
3473
+ const getValue = (0, import_react25.useCallback)(
3275
3474
  (name) => {
3276
3475
  return values[name];
3277
3476
  },
3278
3477
  [values]
3279
3478
  );
3280
- const validateField = (0, import_react24.useCallback)(
3479
+ const validateField = (0, import_react25.useCallback)(
3281
3480
  async (name) => {
3282
3481
  const fieldName = name;
3283
3482
  const result = await schema.safeParseAsync(values);
@@ -3298,7 +3497,7 @@ function useForm({ schema, defaultValues }) {
3298
3497
  },
3299
3498
  [schema, values, clearFieldError]
3300
3499
  );
3301
- const validate = (0, import_react24.useCallback)(async () => {
3500
+ const validate = (0, import_react25.useCallback)(async () => {
3302
3501
  const result = await schema.safeParseAsync(values);
3303
3502
  if (result.success) {
3304
3503
  setErrors({});
@@ -3307,12 +3506,12 @@ function useForm({ schema, defaultValues }) {
3307
3506
  setErrors(buildFormErrors(result.error.issues));
3308
3507
  return false;
3309
3508
  }, [schema, values]);
3310
- const reset = (0, import_react24.useCallback)(() => {
3509
+ const reset = (0, import_react25.useCallback)(() => {
3311
3510
  setValues(defaultValues);
3312
3511
  setErrors({});
3313
3512
  setIsSubmitting(false);
3314
3513
  }, [defaultValues]);
3315
- const handleSubmit = (0, import_react24.useCallback)(
3514
+ const handleSubmit = (0, import_react25.useCallback)(
3316
3515
  async (onSubmit) => {
3317
3516
  const valid = await validate();
3318
3517
  if (!valid) return;
@@ -3341,29 +3540,54 @@ function useForm({ schema, defaultValues }) {
3341
3540
  }
3342
3541
 
3343
3542
  // src/ui/hooks/useToggle.ts
3344
- var import_react25 = require("react");
3543
+ var import_react26 = require("react");
3345
3544
  function useToggle(defaultValue = false) {
3346
- const [value, setValue] = (0, import_react25.useState)(defaultValue);
3347
- const toggle = (0, import_react25.useCallback)(() => {
3545
+ const [value, setValue] = (0, import_react26.useState)(defaultValue);
3546
+ const toggle = (0, import_react26.useCallback)(() => {
3348
3547
  setValue((v) => !v);
3349
3548
  }, []);
3350
- const set = (0, import_react25.useCallback)((newValue) => {
3549
+ const set = (0, import_react26.useCallback)((newValue) => {
3351
3550
  setValue(newValue);
3352
3551
  }, []);
3353
- const setTrue = (0, import_react25.useCallback)(() => {
3552
+ const setTrue = (0, import_react26.useCallback)(() => {
3354
3553
  setValue(true);
3355
3554
  }, []);
3356
- const setFalse = (0, import_react25.useCallback)(() => {
3555
+ const setFalse = (0, import_react26.useCallback)(() => {
3357
3556
  setValue(false);
3358
3557
  }, []);
3359
3558
  return [value, { toggle, set, setTrue, setFalse }];
3360
3559
  }
3361
3560
 
3561
+ // src/ui/hooks/usePageDrawer.ts
3562
+ var import_react27 = require("react");
3563
+ function usePageDrawer(defaultVisible = false) {
3564
+ const [visible, setVisibleState] = (0, import_react27.useState)(defaultVisible);
3565
+ const open = (0, import_react27.useCallback)(() => {
3566
+ setVisibleState(true);
3567
+ }, []);
3568
+ const close = (0, import_react27.useCallback)(() => {
3569
+ setVisibleState(false);
3570
+ }, []);
3571
+ const toggle = (0, import_react27.useCallback)(() => {
3572
+ setVisibleState((current) => !current);
3573
+ }, []);
3574
+ const setVisible = (0, import_react27.useCallback)((nextVisible) => {
3575
+ setVisibleState(nextVisible);
3576
+ }, []);
3577
+ return {
3578
+ visible,
3579
+ open,
3580
+ close,
3581
+ toggle,
3582
+ setVisible
3583
+ };
3584
+ }
3585
+
3362
3586
  // src/ui/hooks/useDebounce.ts
3363
- var import_react26 = require("react");
3587
+ var import_react28 = require("react");
3364
3588
  function useDebounce(value, delay = 500) {
3365
- const [debouncedValue, setDebouncedValue] = (0, import_react26.useState)(value);
3366
- (0, import_react26.useEffect)(() => {
3589
+ const [debouncedValue, setDebouncedValue] = (0, import_react28.useState)(value);
3590
+ (0, import_react28.useEffect)(() => {
3367
3591
  const timer = setTimeout(() => {
3368
3592
  setDebouncedValue(value);
3369
3593
  }, delay);
@@ -3375,11 +3599,11 @@ function useDebounce(value, delay = 500) {
3375
3599
  }
3376
3600
 
3377
3601
  // src/ui/hooks/useThrottle.ts
3378
- var import_react27 = require("react");
3602
+ var import_react29 = require("react");
3379
3603
  function useThrottle(value, delay = 200) {
3380
- const [throttledValue, setThrottledValue] = (0, import_react27.useState)(value);
3381
- const lastUpdatedRef = (0, import_react27.useRef)(Date.now());
3382
- (0, import_react27.useEffect)(() => {
3604
+ const [throttledValue, setThrottledValue] = (0, import_react29.useState)(value);
3605
+ const lastUpdatedRef = (0, import_react29.useRef)(Date.now());
3606
+ (0, import_react29.useEffect)(() => {
3383
3607
  const now = Date.now();
3384
3608
  const timeElapsed = now - lastUpdatedRef.current;
3385
3609
  if (timeElapsed >= delay) {
@@ -3400,12 +3624,12 @@ function useThrottle(value, delay = 200) {
3400
3624
  }
3401
3625
 
3402
3626
  // src/ui/hooks/useKeyboard.ts
3403
- var import_react28 = require("react");
3404
- var import_react_native19 = require("react-native");
3627
+ var import_react30 = require("react");
3628
+ var import_react_native20 = require("react-native");
3405
3629
  function useKeyboard() {
3406
- const [visible, setVisible] = (0, import_react28.useState)(false);
3407
- const [height, setHeight] = (0, import_react28.useState)(0);
3408
- (0, import_react28.useEffect)(() => {
3630
+ const [visible, setVisible] = (0, import_react30.useState)(false);
3631
+ const [height, setHeight] = (0, import_react30.useState)(0);
3632
+ (0, import_react30.useEffect)(() => {
3409
3633
  const handleKeyboardWillShow = (event) => {
3410
3634
  setVisible(true);
3411
3635
  setHeight(event.endCoordinates.height);
@@ -3422,31 +3646,31 @@ function useKeyboard() {
3422
3646
  setVisible(false);
3423
3647
  setHeight(0);
3424
3648
  };
3425
- const willShowSub = import_react_native19.Keyboard.addListener(
3426
- import_react_native19.Platform.OS === "ios" ? "keyboardWillShow" : "keyboardDidShow",
3427
- import_react_native19.Platform.OS === "ios" ? handleKeyboardWillShow : handleKeyboardDidShow
3649
+ const willShowSub = import_react_native20.Keyboard.addListener(
3650
+ import_react_native20.Platform.OS === "ios" ? "keyboardWillShow" : "keyboardDidShow",
3651
+ import_react_native20.Platform.OS === "ios" ? handleKeyboardWillShow : handleKeyboardDidShow
3428
3652
  );
3429
- const willHideSub = import_react_native19.Keyboard.addListener(
3430
- import_react_native19.Platform.OS === "ios" ? "keyboardWillHide" : "keyboardDidHide",
3431
- import_react_native19.Platform.OS === "ios" ? handleKeyboardWillHide : handleKeyboardDidHide
3653
+ const willHideSub = import_react_native20.Keyboard.addListener(
3654
+ import_react_native20.Platform.OS === "ios" ? "keyboardWillHide" : "keyboardDidHide",
3655
+ import_react_native20.Platform.OS === "ios" ? handleKeyboardWillHide : handleKeyboardDidHide
3432
3656
  );
3433
3657
  return () => {
3434
3658
  willShowSub.remove();
3435
3659
  willHideSub.remove();
3436
3660
  };
3437
3661
  }, []);
3438
- const dismiss = (0, import_react28.useCallback)(() => {
3439
- import_react_native19.Keyboard.dismiss();
3662
+ const dismiss = (0, import_react30.useCallback)(() => {
3663
+ import_react_native20.Keyboard.dismiss();
3440
3664
  }, []);
3441
3665
  return { visible, height, dismiss };
3442
3666
  }
3443
3667
 
3444
3668
  // src/ui/hooks/useDimensions.ts
3445
- var import_react29 = require("react");
3446
- var import_react_native20 = require("react-native");
3669
+ var import_react31 = require("react");
3670
+ var import_react_native21 = require("react-native");
3447
3671
  function useDimensions() {
3448
- const [dimensions, setDimensions] = (0, import_react29.useState)(() => {
3449
- const window = import_react_native20.Dimensions.get("window");
3672
+ const [dimensions, setDimensions] = (0, import_react31.useState)(() => {
3673
+ const window = import_react_native21.Dimensions.get("window");
3450
3674
  return {
3451
3675
  width: window.width,
3452
3676
  height: window.height,
@@ -3454,7 +3678,7 @@ function useDimensions() {
3454
3678
  fontScale: window.fontScale
3455
3679
  };
3456
3680
  });
3457
- (0, import_react29.useEffect)(() => {
3681
+ (0, import_react31.useEffect)(() => {
3458
3682
  const handleChange = ({ window }) => {
3459
3683
  setDimensions({
3460
3684
  width: window.width,
@@ -3463,7 +3687,7 @@ function useDimensions() {
3463
3687
  fontScale: window.fontScale
3464
3688
  });
3465
3689
  };
3466
- const subscription = import_react_native20.Dimensions.addEventListener("change", handleChange);
3690
+ const subscription = import_react_native21.Dimensions.addEventListener("change", handleChange);
3467
3691
  return () => {
3468
3692
  subscription.remove();
3469
3693
  };
@@ -3472,20 +3696,20 @@ function useDimensions() {
3472
3696
  }
3473
3697
 
3474
3698
  // src/ui/hooks/useOrientation.ts
3475
- var import_react30 = require("react");
3476
- var import_react_native21 = require("react-native");
3699
+ var import_react32 = require("react");
3700
+ var import_react_native22 = require("react-native");
3477
3701
  function useOrientation() {
3478
3702
  const getOrientation = () => {
3479
- const { width, height } = import_react_native21.Dimensions.get("window");
3703
+ const { width, height } = import_react_native22.Dimensions.get("window");
3480
3704
  return width > height ? "landscape" : "portrait";
3481
3705
  };
3482
- const [orientation, setOrientation] = (0, import_react30.useState)(getOrientation);
3483
- (0, import_react30.useEffect)(() => {
3706
+ const [orientation, setOrientation] = (0, import_react32.useState)(getOrientation);
3707
+ (0, import_react32.useEffect)(() => {
3484
3708
  const handleChange = ({ window }) => {
3485
3709
  const newOrientation = window.width > window.height ? "landscape" : "portrait";
3486
3710
  setOrientation(newOrientation);
3487
3711
  };
3488
- const subscription = import_react_native21.Dimensions.addEventListener("change", handleChange);
3712
+ const subscription = import_react_native22.Dimensions.addEventListener("change", handleChange);
3489
3713
  return () => {
3490
3714
  subscription.remove();
3491
3715
  };
@@ -3498,7 +3722,7 @@ function useOrientation() {
3498
3722
  }
3499
3723
 
3500
3724
  // src/navigation/provider.tsx
3501
- var import_react31 = __toESM(require("react"));
3725
+ var import_react33 = __toESM(require("react"));
3502
3726
  var import_native = require("@react-navigation/native");
3503
3727
 
3504
3728
  // src/navigation/utils/navigation-theme.ts
@@ -3524,7 +3748,7 @@ function createNavigationTheme(pantherTheme, isDark) {
3524
3748
  }
3525
3749
 
3526
3750
  // src/navigation/provider.tsx
3527
- var import_jsx_runtime29 = require("nativewind/jsx-runtime");
3751
+ var import_jsx_runtime31 = require("nativewind/jsx-runtime");
3528
3752
  function NavigationProvider({
3529
3753
  children,
3530
3754
  linking,
@@ -3535,11 +3759,11 @@ function NavigationProvider({
3535
3759
  theme: customTheme
3536
3760
  }) {
3537
3761
  const { theme, isDark } = useTheme();
3538
- const navigationTheme = import_react31.default.useMemo(
3762
+ const navigationTheme = import_react33.default.useMemo(
3539
3763
  () => customTheme || createNavigationTheme(theme, isDark),
3540
3764
  [customTheme, theme, isDark]
3541
3765
  );
3542
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3766
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3543
3767
  import_native.NavigationContainer,
3544
3768
  {
3545
3769
  theme: navigationTheme,
@@ -3557,14 +3781,14 @@ function NavigationProvider({
3557
3781
  var import_stack = require("@react-navigation/stack");
3558
3782
 
3559
3783
  // src/navigation/navigators/StackNavigator.tsx
3560
- var import_jsx_runtime30 = require("nativewind/jsx-runtime");
3784
+ var import_jsx_runtime32 = require("nativewind/jsx-runtime");
3561
3785
  var NativeStack = (0, import_stack.createStackNavigator)();
3562
3786
  var defaultScreenOptions = {
3563
3787
  headerShown: false,
3564
3788
  ...import_stack.TransitionPresets.SlideFromRightIOS
3565
3789
  };
3566
3790
  function StackNavigator({ initialRouteName, screenOptions, children }) {
3567
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3791
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3568
3792
  NativeStack.Navigator,
3569
3793
  {
3570
3794
  initialRouteName,
@@ -3576,7 +3800,7 @@ function StackNavigator({ initialRouteName, screenOptions, children }) {
3576
3800
  StackNavigator.Screen = NativeStack.Screen;
3577
3801
  StackNavigator.Group = NativeStack.Group;
3578
3802
  function createStackScreens(routes) {
3579
- return routes.map((route) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3803
+ return routes.map((route) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3580
3804
  StackNavigator.Screen,
3581
3805
  {
3582
3806
  name: route.name,
@@ -3589,13 +3813,13 @@ function createStackScreens(routes) {
3589
3813
  }
3590
3814
 
3591
3815
  // src/navigation/navigators/TabNavigator.tsx
3592
- var import_react32 = __toESM(require("react"));
3816
+ var import_react34 = __toESM(require("react"));
3593
3817
  var import_bottom_tabs = require("@react-navigation/bottom-tabs");
3594
3818
 
3595
3819
  // src/navigation/components/BottomTabBar.tsx
3596
- var import_react_native22 = require("react-native");
3820
+ var import_react_native23 = require("react-native");
3597
3821
  var import_react_native_safe_area_context2 = require("react-native-safe-area-context");
3598
- var import_jsx_runtime31 = require("nativewind/jsx-runtime");
3822
+ var import_jsx_runtime33 = require("nativewind/jsx-runtime");
3599
3823
  var DEFAULT_TAB_BAR_HEIGHT = 65;
3600
3824
  function BottomTabBar({
3601
3825
  state,
@@ -3617,11 +3841,11 @@ function BottomTabBar({
3617
3841
  const inactiveColor = inactiveTintColor || colors.textMuted;
3618
3842
  const backgroundColor = style?.backgroundColor || colors.card;
3619
3843
  const borderTopColor = colors.divider;
3620
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3621
- import_react_native22.View,
3844
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
3845
+ import_react_native23.View,
3622
3846
  {
3623
3847
  style: [
3624
- styles11.container,
3848
+ styles12.container,
3625
3849
  { borderTopColor },
3626
3850
  { backgroundColor, height: height + insets.bottom, paddingBottom: insets.bottom },
3627
3851
  style
@@ -3652,8 +3876,8 @@ function BottomTabBar({
3652
3876
  size: 24
3653
3877
  }) : null;
3654
3878
  const badge = options.tabBarBadge;
3655
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
3656
- import_react_native22.TouchableOpacity,
3879
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
3880
+ import_react_native23.TouchableOpacity,
3657
3881
  {
3658
3882
  accessibilityRole: "button",
3659
3883
  accessibilityState: isFocused ? { selected: true } : {},
@@ -3662,21 +3886,21 @@ function BottomTabBar({
3662
3886
  onPress,
3663
3887
  onLongPress,
3664
3888
  style: [
3665
- styles11.tab,
3889
+ styles12.tab,
3666
3890
  {
3667
3891
  backgroundColor: isFocused ? activeBackgroundColor : inactiveBackgroundColor
3668
3892
  }
3669
3893
  ],
3670
3894
  children: [
3671
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react_native22.View, { style: [styles11.iconContainer, iconStyle], children: [
3895
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_react_native23.View, { style: [styles12.iconContainer, iconStyle], children: [
3672
3896
  iconName,
3673
- badge != null && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_native22.View, { style: [styles11.badge, { backgroundColor: activeColor }], children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(AppText, { style: styles11.badgeText, children: typeof badge === "number" && badge > 99 ? "99+" : badge }) })
3897
+ badge != null && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_native23.View, { style: [styles12.badge, { backgroundColor: activeColor }], children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(AppText, { style: styles12.badgeText, children: typeof badge === "number" && badge > 99 ? "99+" : badge }) })
3674
3898
  ] }),
3675
- showLabel && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3899
+ showLabel && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
3676
3900
  AppText,
3677
3901
  {
3678
3902
  style: [
3679
- styles11.label,
3903
+ styles12.label,
3680
3904
  { color: isFocused ? activeColor : inactiveColor },
3681
3905
  labelStyle
3682
3906
  ],
@@ -3692,7 +3916,7 @@ function BottomTabBar({
3692
3916
  }
3693
3917
  );
3694
3918
  }
3695
- var styles11 = import_react_native22.StyleSheet.create({
3919
+ var styles12 = import_react_native23.StyleSheet.create({
3696
3920
  container: {
3697
3921
  flexDirection: "row",
3698
3922
  borderTopWidth: 0.5,
@@ -3735,7 +3959,7 @@ var styles11 = import_react_native22.StyleSheet.create({
3735
3959
  });
3736
3960
 
3737
3961
  // src/navigation/navigators/TabNavigator.tsx
3738
- var import_jsx_runtime32 = require("nativewind/jsx-runtime");
3962
+ var import_jsx_runtime34 = require("nativewind/jsx-runtime");
3739
3963
  var NativeTab = (0, import_bottom_tabs.createBottomTabNavigator)();
3740
3964
  var defaultScreenOptions2 = {
3741
3965
  headerShown: false,
@@ -3748,7 +3972,7 @@ function TabNavigator({
3748
3972
  screenOptions,
3749
3973
  children
3750
3974
  }) {
3751
- const mergedScreenOptions = import_react32.default.useMemo(() => {
3975
+ const mergedScreenOptions = import_react34.default.useMemo(() => {
3752
3976
  const options = { ...defaultScreenOptions2, ...screenOptions };
3753
3977
  if (tabBarOptions) {
3754
3978
  if (tabBarOptions.showLabel !== void 0) {
@@ -3781,9 +4005,9 @@ function TabNavigator({
3781
4005
  }
3782
4006
  return options;
3783
4007
  }, [tabBarOptions, screenOptions]);
3784
- const resolvedTabBar = import_react32.default.useMemo(() => {
4008
+ const resolvedTabBar = import_react34.default.useMemo(() => {
3785
4009
  if (tabBar) return tabBar;
3786
- return (props) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4010
+ return (props) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
3787
4011
  BottomTabBar,
3788
4012
  {
3789
4013
  ...props,
@@ -3810,7 +4034,7 @@ function TabNavigator({
3810
4034
  tabBarOptions?.style,
3811
4035
  tabBarOptions?.height
3812
4036
  ]);
3813
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4037
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
3814
4038
  NativeTab.Navigator,
3815
4039
  {
3816
4040
  initialRouteName,
@@ -3822,7 +4046,7 @@ function TabNavigator({
3822
4046
  }
3823
4047
  TabNavigator.Screen = NativeTab.Screen;
3824
4048
  function createTabScreens(routes) {
3825
- return routes.map((route) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4049
+ return routes.map((route) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
3826
4050
  TabNavigator.Screen,
3827
4051
  {
3828
4052
  name: route.name,
@@ -3835,9 +4059,9 @@ function createTabScreens(routes) {
3835
4059
  }
3836
4060
 
3837
4061
  // src/navigation/navigators/DrawerNavigator.tsx
3838
- var import_react33 = __toESM(require("react"));
4062
+ var import_react35 = __toESM(require("react"));
3839
4063
  var import_drawer = require("@react-navigation/drawer");
3840
- var import_jsx_runtime33 = require("nativewind/jsx-runtime");
4064
+ var import_jsx_runtime35 = require("nativewind/jsx-runtime");
3841
4065
  var NativeDrawer = (0, import_drawer.createDrawerNavigator)();
3842
4066
  function DrawerNavigator({
3843
4067
  initialRouteName,
@@ -3848,7 +4072,7 @@ function DrawerNavigator({
3848
4072
  }) {
3849
4073
  const { theme, isDark } = useTheme();
3850
4074
  const navigationTheme = createNavigationTheme(theme, isDark);
3851
- const mergedScreenOptions = import_react33.default.useMemo(() => {
4075
+ const mergedScreenOptions = import_react35.default.useMemo(() => {
3852
4076
  return {
3853
4077
  headerShown: false,
3854
4078
  drawerStyle: {
@@ -3867,7 +4091,7 @@ function DrawerNavigator({
3867
4091
  ...screenOptions
3868
4092
  };
3869
4093
  }, [screenOptions, drawerOptions, navigationTheme, theme]);
3870
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4094
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3871
4095
  NativeDrawer.Navigator,
3872
4096
  {
3873
4097
  initialRouteName,
@@ -3879,7 +4103,7 @@ function DrawerNavigator({
3879
4103
  }
3880
4104
  DrawerNavigator.Screen = NativeDrawer.Screen;
3881
4105
  function createDrawerScreens(routes) {
3882
- return routes.map((route) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4106
+ return routes.map((route) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3883
4107
  DrawerNavigator.Screen,
3884
4108
  {
3885
4109
  name: route.name,
@@ -3892,9 +4116,9 @@ function createDrawerScreens(routes) {
3892
4116
  }
3893
4117
 
3894
4118
  // src/navigation/components/AppHeader.tsx
3895
- var import_react_native23 = require("react-native");
4119
+ var import_react_native24 = require("react-native");
3896
4120
  var import_react_native_safe_area_context3 = require("react-native-safe-area-context");
3897
- var import_jsx_runtime34 = require("nativewind/jsx-runtime");
4121
+ var import_jsx_runtime36 = require("nativewind/jsx-runtime");
3898
4122
  function AppHeader({
3899
4123
  title,
3900
4124
  subtitle,
@@ -3908,7 +4132,7 @@ function AppHeader({
3908
4132
  const colors = useThemeColors();
3909
4133
  const insets = (0, import_react_native_safe_area_context3.useSafeAreaInsets)();
3910
4134
  const backgroundColor = transparent ? "transparent" : colors.card;
3911
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4135
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3912
4136
  AppView,
3913
4137
  {
3914
4138
  style: [
@@ -3918,38 +4142,38 @@ function AppHeader({
3918
4142
  },
3919
4143
  style
3920
4144
  ],
3921
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(AppView, { row: true, items: "center", px: 4, style: styles12.container, children: [
3922
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(AppView, { style: [styles12.sideContainer, styles12.leftContainer], children: leftIcon && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(AppPressable, { onPress: onLeftPress, style: styles12.iconButton, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon, { name: leftIcon, size: 24, color: colors.text }) }) }),
3923
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(AppView, { style: styles12.centerContainer, children: [
3924
- title && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4145
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(AppView, { row: true, items: "center", px: 4, style: styles13.container, children: [
4146
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(AppView, { style: [styles13.sideContainer, styles13.leftContainer], children: leftIcon && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(AppPressable, { onPress: onLeftPress, style: styles13.iconButton, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Icon, { name: leftIcon, size: 24, color: colors.text }) }) }),
4147
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(AppView, { style: styles13.centerContainer, children: [
4148
+ title && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3925
4149
  AppText,
3926
4150
  {
3927
4151
  size: "lg",
3928
4152
  weight: "semibold",
3929
- style: [styles12.title, { color: colors.text }],
4153
+ style: [styles13.title, { color: colors.text }],
3930
4154
  numberOfLines: 1,
3931
4155
  children: title
3932
4156
  }
3933
4157
  ),
3934
- subtitle && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4158
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3935
4159
  AppText,
3936
4160
  {
3937
4161
  size: "xs",
3938
- style: [styles12.subtitle, { color: colors.textMuted }],
4162
+ style: [styles13.subtitle, { color: colors.textMuted }],
3939
4163
  numberOfLines: 1,
3940
4164
  children: subtitle
3941
4165
  }
3942
4166
  )
3943
4167
  ] }),
3944
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(AppView, { row: true, items: "center", style: [styles12.sideContainer, styles12.rightContainer], children: rightIcons.map((icon, index) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(AppPressable, { onPress: icon.onPress, style: styles12.iconButton, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(AppView, { children: [
3945
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon, { name: icon.icon, size: 24, color: colors.text }),
3946
- icon.badge ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(AppView, { style: styles12.badge, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(AppText, { size: "xs", color: "white", style: styles12.badgeText, children: icon.badge > 99 ? "99+" : icon.badge }) }) : null
4168
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(AppView, { row: true, items: "center", style: [styles13.sideContainer, styles13.rightContainer], children: rightIcons.map((icon, index) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(AppPressable, { onPress: icon.onPress, style: styles13.iconButton, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(AppView, { children: [
4169
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Icon, { name: icon.icon, size: 24, color: colors.text }),
4170
+ icon.badge ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(AppView, { style: styles13.badge, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(AppText, { size: "xs", color: "white", style: styles13.badgeText, children: icon.badge > 99 ? "99+" : icon.badge }) }) : null
3947
4171
  ] }) }, index)) })
3948
4172
  ] })
3949
4173
  }
3950
4174
  );
3951
4175
  }
3952
- var styles12 = import_react_native23.StyleSheet.create({
4176
+ var styles13 = import_react_native24.StyleSheet.create({
3953
4177
  container: {
3954
4178
  height: 44
3955
4179
  // iOS 标准导航栏高度
@@ -4000,9 +4224,9 @@ var styles12 = import_react_native23.StyleSheet.create({
4000
4224
  });
4001
4225
 
4002
4226
  // src/navigation/components/DrawerContent.tsx
4003
- var import_react_native24 = require("react-native");
4227
+ var import_react_native25 = require("react-native");
4004
4228
  var import_drawer2 = require("@react-navigation/drawer");
4005
- var import_jsx_runtime35 = require("nativewind/jsx-runtime");
4229
+ var import_jsx_runtime37 = require("nativewind/jsx-runtime");
4006
4230
  function DrawerContent({
4007
4231
  state,
4008
4232
  descriptors,
@@ -4031,20 +4255,20 @@ function DrawerContent({
4031
4255
  badge: options.tabBarBadge
4032
4256
  };
4033
4257
  });
4034
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_drawer2.DrawerContentScrollView, { style: [styles13.container, { backgroundColor }], children: [
4035
- header && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native24.View, { style: [styles13.header, { borderBottomColor: dividerColor }], children: header }),
4036
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(AppView, { className: "py-2", children: drawerItems.map((item) => {
4258
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_drawer2.DrawerContentScrollView, { style: [styles14.container, { backgroundColor }], children: [
4259
+ header && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_native25.View, { style: [styles14.header, { borderBottomColor: dividerColor }], children: header }),
4260
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(AppView, { className: "py-2", children: drawerItems.map((item) => {
4037
4261
  const isFocused = state.routes[state.index].name === item.name;
4038
4262
  const onPress = () => {
4039
4263
  navigation.navigate(item.name);
4040
4264
  };
4041
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
4042
- import_react_native24.TouchableOpacity,
4265
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
4266
+ import_react_native25.TouchableOpacity,
4043
4267
  {
4044
4268
  onPress,
4045
- style: [styles13.item, isFocused && { backgroundColor: activeBgColor }],
4269
+ style: [styles14.item, isFocused && { backgroundColor: activeBgColor }],
4046
4270
  children: [
4047
- item.icon && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native24.View, { style: styles13.iconContainer, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4271
+ item.icon && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_native25.View, { style: styles14.iconContainer, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
4048
4272
  Icon,
4049
4273
  {
4050
4274
  name: item.icon,
@@ -4052,28 +4276,28 @@ function DrawerContent({
4052
4276
  color: isFocused ? activeColor : inactiveColor
4053
4277
  }
4054
4278
  ) }),
4055
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4279
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
4056
4280
  AppText,
4057
4281
  {
4058
4282
  style: [
4059
- styles13.label,
4283
+ styles14.label,
4060
4284
  { color: isFocused ? activeColor : inactiveColor },
4061
- isFocused && styles13.activeLabel
4285
+ isFocused && styles14.activeLabel
4062
4286
  ],
4063
4287
  numberOfLines: 1,
4064
4288
  children: item.label
4065
4289
  }
4066
4290
  ),
4067
- item.badge != null && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native24.View, { style: [styles13.badge, { backgroundColor: activeColor }], children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(AppText, { style: styles13.badgeText, children: typeof item.badge === "number" && item.badge > 99 ? "99+" : item.badge }) })
4291
+ item.badge != null && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_native25.View, { style: [styles14.badge, { backgroundColor: activeColor }], children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(AppText, { style: styles14.badgeText, children: typeof item.badge === "number" && item.badge > 99 ? "99+" : item.badge }) })
4068
4292
  ]
4069
4293
  },
4070
4294
  item.name
4071
4295
  );
4072
4296
  }) }),
4073
- footer && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native24.View, { style: [styles13.footer, { borderTopColor: dividerColor }], children: footer })
4297
+ footer && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_native25.View, { style: [styles14.footer, { borderTopColor: dividerColor }], children: footer })
4074
4298
  ] });
4075
4299
  }
4076
- var styles13 = import_react_native24.StyleSheet.create({
4300
+ var styles14 = import_react_native25.StyleSheet.create({
4077
4301
  container: {
4078
4302
  flex: 1
4079
4303
  },
@@ -4123,7 +4347,7 @@ var styles13 = import_react_native24.StyleSheet.create({
4123
4347
  });
4124
4348
 
4125
4349
  // src/navigation/hooks/useNavigation.ts
4126
- var import_react34 = require("react");
4350
+ var import_react36 = require("react");
4127
4351
  var import_native2 = require("@react-navigation/native");
4128
4352
  function useNavigation() {
4129
4353
  return (0, import_native2.useNavigation)();
@@ -4139,7 +4363,7 @@ function useDrawerNavigation() {
4139
4363
  }
4140
4364
  function useBackHandler(handler) {
4141
4365
  const navigation = (0, import_native2.useNavigation)();
4142
- (0, import_react34.useEffect)(() => {
4366
+ (0, import_react36.useEffect)(() => {
4143
4367
  const unsubscribe = navigation.addListener("beforeRemove", (e) => {
4144
4368
  if (!handler()) {
4145
4369
  e.preventDefault();
@@ -4168,8 +4392,8 @@ var import_native5 = require("@react-navigation/native");
4168
4392
  var import_react_native_safe_area_context4 = require("react-native-safe-area-context");
4169
4393
 
4170
4394
  // src/overlay/AppStatusBar.tsx
4171
- var import_react_native25 = require("react-native");
4172
- var import_jsx_runtime36 = require("nativewind/jsx-runtime");
4395
+ var import_react_native26 = require("react-native");
4396
+ var import_jsx_runtime38 = require("nativewind/jsx-runtime");
4173
4397
  function AppStatusBar({
4174
4398
  barStyle = "auto",
4175
4399
  backgroundColor,
@@ -4179,8 +4403,8 @@ function AppStatusBar({
4179
4403
  const { theme, isDark } = useTheme();
4180
4404
  const resolvedBarStyle = barStyle === "auto" ? isDark ? "light-content" : "dark-content" : barStyle;
4181
4405
  const resolvedBackgroundColor = backgroundColor ?? (translucent ? "transparent" : theme.colors.background?.[500] || "#ffffff");
4182
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
4183
- import_react_native25.StatusBar,
4406
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
4407
+ import_react_native26.StatusBar,
4184
4408
  {
4185
4409
  barStyle: resolvedBarStyle,
4186
4410
  backgroundColor: resolvedBackgroundColor,
@@ -4191,27 +4415,27 @@ function AppStatusBar({
4191
4415
  }
4192
4416
 
4193
4417
  // src/overlay/loading/provider.tsx
4194
- var import_react36 = require("react");
4418
+ var import_react38 = require("react");
4195
4419
 
4196
4420
  // src/overlay/loading/context.ts
4197
- var import_react35 = require("react");
4198
- var LoadingContext = (0, import_react35.createContext)(null);
4421
+ var import_react37 = require("react");
4422
+ var LoadingContext = (0, import_react37.createContext)(null);
4199
4423
  function useLoadingContext() {
4200
- const ctx = (0, import_react35.useContext)(LoadingContext);
4424
+ const ctx = (0, import_react37.useContext)(LoadingContext);
4201
4425
  if (!ctx) throw new Error("useLoading must be used within OverlayProvider");
4202
4426
  return ctx;
4203
4427
  }
4204
4428
 
4205
4429
  // src/overlay/loading/component.tsx
4206
- var import_react_native26 = require("react-native");
4207
- var import_jsx_runtime37 = require("nativewind/jsx-runtime");
4430
+ var import_react_native27 = require("react-native");
4431
+ var import_jsx_runtime39 = require("nativewind/jsx-runtime");
4208
4432
  function LoadingModal({ visible, text }) {
4209
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_native26.Modal, { transparent: true, visible, animationType: "fade", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_native26.View, { style: styles14.overlay, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_react_native26.View, { style: [styles14.loadingBox, { backgroundColor: "rgba(0,0,0,0.8)" }], children: [
4210
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_native26.ActivityIndicator, { size: "large", color: "#fff" }),
4211
- text && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(AppText, { className: "text-white mt-3 text-sm", children: text })
4433
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native27.Modal, { transparent: true, visible, animationType: "fade", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native27.View, { style: styles15.overlay, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react_native27.View, { style: [styles15.loadingBox, { backgroundColor: "rgba(0,0,0,0.8)" }], children: [
4434
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native27.ActivityIndicator, { size: "large", color: "#fff" }),
4435
+ text && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(AppText, { className: "text-white mt-3 text-sm", children: text })
4212
4436
  ] }) }) });
4213
4437
  }
4214
- var styles14 = import_react_native26.StyleSheet.create({
4438
+ var styles15 = import_react_native27.StyleSheet.create({
4215
4439
  overlay: {
4216
4440
  flex: 1,
4217
4441
  backgroundColor: "rgba(0,0,0,0.5)",
@@ -4227,45 +4451,45 @@ var styles14 = import_react_native26.StyleSheet.create({
4227
4451
  });
4228
4452
 
4229
4453
  // src/overlay/loading/provider.tsx
4230
- var import_jsx_runtime38 = require("nativewind/jsx-runtime");
4454
+ var import_jsx_runtime40 = require("nativewind/jsx-runtime");
4231
4455
  function LoadingProvider({ children }) {
4232
- const [state, setState] = (0, import_react36.useState)({ visible: false });
4233
- const show = (0, import_react36.useCallback)((text) => {
4456
+ const [state, setState] = (0, import_react38.useState)({ visible: false });
4457
+ const show = (0, import_react38.useCallback)((text) => {
4234
4458
  setState({ visible: true, text });
4235
4459
  }, []);
4236
- const hide = (0, import_react36.useCallback)(() => {
4460
+ const hide = (0, import_react38.useCallback)(() => {
4237
4461
  setState({ visible: false });
4238
4462
  }, []);
4239
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(LoadingContext.Provider, { value: { show, hide }, children: [
4463
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(LoadingContext.Provider, { value: { show, hide }, children: [
4240
4464
  children,
4241
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(LoadingModal, { ...state })
4465
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(LoadingModal, { ...state })
4242
4466
  ] });
4243
4467
  }
4244
4468
 
4245
4469
  // src/overlay/toast/provider.tsx
4246
- var import_react39 = require("react");
4247
- var import_react_native28 = require("react-native");
4470
+ var import_react41 = require("react");
4471
+ var import_react_native29 = require("react-native");
4248
4472
 
4249
4473
  // src/overlay/toast/context.ts
4250
- var import_react37 = require("react");
4251
- var ToastContext = (0, import_react37.createContext)(null);
4474
+ var import_react39 = require("react");
4475
+ var ToastContext = (0, import_react39.createContext)(null);
4252
4476
  function useToastContext() {
4253
- const ctx = (0, import_react37.useContext)(ToastContext);
4477
+ const ctx = (0, import_react39.useContext)(ToastContext);
4254
4478
  if (!ctx) throw new Error("useToast must be used within OverlayProvider");
4255
4479
  return ctx;
4256
4480
  }
4257
4481
 
4258
4482
  // src/overlay/toast/component.tsx
4259
- var import_react38 = require("react");
4260
- var import_react_native27 = require("react-native");
4261
- var import_jsx_runtime39 = require("nativewind/jsx-runtime");
4483
+ var import_react40 = require("react");
4484
+ var import_react_native28 = require("react-native");
4485
+ var import_jsx_runtime41 = require("nativewind/jsx-runtime");
4262
4486
  function ToastItemView({ message, type, onHide }) {
4263
- const fadeAnim = (0, import_react38.useRef)(new import_react_native27.Animated.Value(0)).current;
4264
- (0, import_react38.useEffect)(() => {
4265
- import_react_native27.Animated.sequence([
4266
- import_react_native27.Animated.timing(fadeAnim, { toValue: 1, duration: 200, useNativeDriver: true }),
4267
- import_react_native27.Animated.delay(2500),
4268
- import_react_native27.Animated.timing(fadeAnim, { toValue: 0, duration: 200, useNativeDriver: true })
4487
+ const fadeAnim = (0, import_react40.useRef)(new import_react_native28.Animated.Value(0)).current;
4488
+ (0, import_react40.useEffect)(() => {
4489
+ import_react_native28.Animated.sequence([
4490
+ import_react_native28.Animated.timing(fadeAnim, { toValue: 1, duration: 200, useNativeDriver: true }),
4491
+ import_react_native28.Animated.delay(2500),
4492
+ import_react_native28.Animated.timing(fadeAnim, { toValue: 0, duration: 200, useNativeDriver: true })
4269
4493
  ]).start(onHide);
4270
4494
  }, []);
4271
4495
  const bgColors = {
@@ -4274,8 +4498,8 @@ function ToastItemView({ message, type, onHide }) {
4274
4498
  warning: "bg-warning-500",
4275
4499
  info: "bg-primary-500"
4276
4500
  };
4277
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4278
- import_react_native27.Animated.View,
4501
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4502
+ import_react_native28.Animated.View,
4279
4503
  {
4280
4504
  style: {
4281
4505
  opacity: fadeAnim,
@@ -4288,17 +4512,17 @@ function ToastItemView({ message, type, onHide }) {
4288
4512
  }
4289
4513
  ]
4290
4514
  },
4291
- children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(AppView, { className: `${bgColors[type]} px-4 py-3 rounded-lg mb-2 mx-4 shadow-lg`, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(AppText, { className: "text-white text-center", children: message }) })
4515
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(AppView, { className: `${bgColors[type]} px-4 py-3 rounded-lg mb-2 mx-4 shadow-lg`, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(AppText, { className: "text-white text-center", children: message }) })
4292
4516
  }
4293
4517
  );
4294
4518
  }
4295
4519
 
4296
4520
  // src/overlay/toast/provider.tsx
4297
- var import_jsx_runtime40 = require("nativewind/jsx-runtime");
4521
+ var import_jsx_runtime42 = require("nativewind/jsx-runtime");
4298
4522
  function ToastProvider({ children }) {
4299
- const [toasts, setToasts] = (0, import_react39.useState)([]);
4300
- const timersRef = (0, import_react39.useRef)(/* @__PURE__ */ new Map());
4301
- const remove = (0, import_react39.useCallback)((id) => {
4523
+ const [toasts, setToasts] = (0, import_react41.useState)([]);
4524
+ const timersRef = (0, import_react41.useRef)(/* @__PURE__ */ new Map());
4525
+ const remove = (0, import_react41.useCallback)((id) => {
4302
4526
  setToasts((prev) => prev.filter((t) => t.id !== id));
4303
4527
  const timer = timersRef.current.get(id);
4304
4528
  if (timer) {
@@ -4306,7 +4530,7 @@ function ToastProvider({ children }) {
4306
4530
  timersRef.current.delete(id);
4307
4531
  }
4308
4532
  }, []);
4309
- const show = (0, import_react39.useCallback)(
4533
+ const show = (0, import_react41.useCallback)(
4310
4534
  (message, type = "info", duration = 3e3) => {
4311
4535
  const id = Math.random().toString(36).substring(7);
4312
4536
  const toast = { id, message, type, duration };
@@ -4316,28 +4540,28 @@ function ToastProvider({ children }) {
4316
4540
  },
4317
4541
  [remove]
4318
4542
  );
4319
- const success = (0, import_react39.useCallback)(
4543
+ const success = (0, import_react41.useCallback)(
4320
4544
  (message, duration) => show(message, "success", duration),
4321
4545
  [show]
4322
4546
  );
4323
- const error = (0, import_react39.useCallback)(
4547
+ const error = (0, import_react41.useCallback)(
4324
4548
  (message, duration) => show(message, "error", duration),
4325
4549
  [show]
4326
4550
  );
4327
- const info = (0, import_react39.useCallback)(
4551
+ const info = (0, import_react41.useCallback)(
4328
4552
  (message, duration) => show(message, "info", duration),
4329
4553
  [show]
4330
4554
  );
4331
- const warning = (0, import_react39.useCallback)(
4555
+ const warning = (0, import_react41.useCallback)(
4332
4556
  (message, duration) => show(message, "warning", duration),
4333
4557
  [show]
4334
4558
  );
4335
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(ToastContext.Provider, { value: { show, success, error, info, warning }, children: [
4559
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(ToastContext.Provider, { value: { show, success, error, info, warning }, children: [
4336
4560
  children,
4337
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_native28.View, { style: styles15.toastContainer, pointerEvents: "none", children: toasts.map((toast) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ToastItemView, { ...toast, onHide: () => remove(toast.id) }, toast.id)) })
4561
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native29.View, { style: styles16.toastContainer, pointerEvents: "none", children: toasts.map((toast) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ToastItemView, { ...toast, onHide: () => remove(toast.id) }, toast.id)) })
4338
4562
  ] });
4339
4563
  }
4340
- var styles15 = import_react_native28.StyleSheet.create({
4564
+ var styles16 = import_react_native29.StyleSheet.create({
4341
4565
  toastContainer: {
4342
4566
  position: "absolute",
4343
4567
  top: 60,
@@ -4348,20 +4572,20 @@ var styles15 = import_react_native28.StyleSheet.create({
4348
4572
  });
4349
4573
 
4350
4574
  // src/overlay/alert/provider.tsx
4351
- var import_react41 = require("react");
4575
+ var import_react43 = require("react");
4352
4576
 
4353
4577
  // src/overlay/alert/context.ts
4354
- var import_react40 = require("react");
4355
- var AlertContext = (0, import_react40.createContext)(null);
4578
+ var import_react42 = require("react");
4579
+ var AlertContext = (0, import_react42.createContext)(null);
4356
4580
  function useAlertContext() {
4357
- const ctx = (0, import_react40.useContext)(AlertContext);
4581
+ const ctx = (0, import_react42.useContext)(AlertContext);
4358
4582
  if (!ctx) throw new Error("useAlert must be used within OverlayProvider");
4359
4583
  return ctx;
4360
4584
  }
4361
4585
 
4362
4586
  // src/overlay/alert/component.tsx
4363
- var import_react_native29 = require("react-native");
4364
- var import_jsx_runtime41 = require("nativewind/jsx-runtime");
4587
+ var import_react_native30 = require("react-native");
4588
+ var import_jsx_runtime43 = require("nativewind/jsx-runtime");
4365
4589
  function AlertModal({
4366
4590
  visible,
4367
4591
  title,
@@ -4373,16 +4597,16 @@ function AlertModal({
4373
4597
  onCancel
4374
4598
  }) {
4375
4599
  if (!visible) return null;
4376
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_native29.Modal, { transparent: true, visible: true, animationType: "fade", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_native29.View, { style: styles16.overlay, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_react_native29.View, { style: styles16.alertBox, children: [
4377
- title && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(AppText, { className: "text-lg font-semibold text-center mb-2", children: title }),
4378
- message && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(AppText, { className: "text-gray-600 text-center mb-4", children: message }),
4379
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(AppView, { row: true, gap: 3, className: "mt-2", children: [
4380
- showCancel && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(AppPressable, { onPress: onCancel, className: "flex-1 py-3 bg-gray-100 rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(AppText, { className: "text-center text-gray-700", children: cancelText || "\u53D6\u6D88" }) }),
4381
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(AppPressable, { onPress: onConfirm, className: "flex-1 py-3 bg-primary-500 rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(AppText, { className: "text-center text-white", children: confirmText || "\u786E\u5B9A" }) })
4600
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native30.Modal, { transparent: true, visible: true, animationType: "fade", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native30.View, { style: styles17.overlay, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_react_native30.View, { style: styles17.alertBox, children: [
4601
+ title && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(AppText, { className: "text-lg font-semibold text-center mb-2", children: title }),
4602
+ message && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(AppText, { className: "text-gray-600 text-center mb-4", children: message }),
4603
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(AppView, { row: true, gap: 3, className: "mt-2", children: [
4604
+ showCancel && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(AppPressable, { onPress: onCancel, className: "flex-1 py-3 bg-gray-100 rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(AppText, { className: "text-center text-gray-700", children: cancelText || "\u53D6\u6D88" }) }),
4605
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(AppPressable, { onPress: onConfirm, className: "flex-1 py-3 bg-primary-500 rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(AppText, { className: "text-center text-white", children: confirmText || "\u786E\u5B9A" }) })
4382
4606
  ] })
4383
4607
  ] }) }) });
4384
4608
  }
4385
- var styles16 = import_react_native29.StyleSheet.create({
4609
+ var styles17 = import_react_native30.StyleSheet.create({
4386
4610
  overlay: {
4387
4611
  flex: 1,
4388
4612
  backgroundColor: "rgba(0,0,0,0.5)",
@@ -4404,32 +4628,32 @@ var styles16 = import_react_native29.StyleSheet.create({
4404
4628
  });
4405
4629
 
4406
4630
  // src/overlay/alert/provider.tsx
4407
- var import_jsx_runtime42 = require("nativewind/jsx-runtime");
4631
+ var import_jsx_runtime44 = require("nativewind/jsx-runtime");
4408
4632
  function AlertProvider({ children }) {
4409
- const [alert, setAlert] = (0, import_react41.useState)(null);
4410
- const showAlert = (0, import_react41.useCallback)((options) => {
4633
+ const [alert, setAlert] = (0, import_react43.useState)(null);
4634
+ const showAlert = (0, import_react43.useCallback)((options) => {
4411
4635
  setAlert({ ...options, visible: true });
4412
4636
  }, []);
4413
- const confirm = (0, import_react41.useCallback)(
4637
+ const confirm = (0, import_react43.useCallback)(
4414
4638
  (options) => {
4415
4639
  showAlert({ ...options, showCancel: true });
4416
4640
  },
4417
4641
  [showAlert]
4418
4642
  );
4419
- const hide = (0, import_react41.useCallback)(() => {
4643
+ const hide = (0, import_react43.useCallback)(() => {
4420
4644
  setAlert(null);
4421
4645
  }, []);
4422
- const handleConfirm = (0, import_react41.useCallback)(() => {
4646
+ const handleConfirm = (0, import_react43.useCallback)(() => {
4423
4647
  alert?.onConfirm?.();
4424
4648
  hide();
4425
4649
  }, [alert, hide]);
4426
- const handleCancel = (0, import_react41.useCallback)(() => {
4650
+ const handleCancel = (0, import_react43.useCallback)(() => {
4427
4651
  alert?.onCancel?.();
4428
4652
  hide();
4429
4653
  }, [alert, hide]);
4430
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(AlertContext.Provider, { value: { alert: showAlert, confirm }, children: [
4654
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(AlertContext.Provider, { value: { alert: showAlert, confirm }, children: [
4431
4655
  children,
4432
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
4656
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
4433
4657
  AlertModal,
4434
4658
  {
4435
4659
  visible: alert?.visible ?? false,
@@ -4446,13 +4670,13 @@ function AlertProvider({ children }) {
4446
4670
  }
4447
4671
 
4448
4672
  // src/overlay/provider.tsx
4449
- var import_jsx_runtime43 = require("nativewind/jsx-runtime");
4673
+ var import_jsx_runtime45 = require("nativewind/jsx-runtime");
4450
4674
  function OverlayProvider({ children }) {
4451
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(LoadingProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ToastProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(AlertProvider, { children }) }) });
4675
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(LoadingProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ToastProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(AlertProvider, { children }) }) });
4452
4676
  }
4453
4677
 
4454
4678
  // src/overlay/AppProvider.tsx
4455
- var import_jsx_runtime44 = require("nativewind/jsx-runtime");
4679
+ var import_jsx_runtime46 = require("nativewind/jsx-runtime");
4456
4680
  var defaultLightTheme = {
4457
4681
  colors: {
4458
4682
  primary: "#f38b32",
@@ -4489,21 +4713,21 @@ function AppProvider({
4489
4713
  }) {
4490
4714
  let content = children;
4491
4715
  if (enableOverlay) {
4492
- content = /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(OverlayProvider, { children: content });
4716
+ content = /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(OverlayProvider, { children: content });
4493
4717
  }
4494
4718
  if (enableNavigation) {
4495
- content = /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(NavigationProvider, { ...navigationProps, children: content });
4719
+ content = /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(NavigationProvider, { ...navigationProps, children: content });
4496
4720
  }
4497
4721
  if (enableTheme) {
4498
- content = /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ThemeProvider, { light: lightTheme, dark: darkTheme, defaultDark, isDark, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
4499
- enableStatusBar && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(AppStatusBar, { testID: "status-bar", ...statusBarProps }),
4722
+ content = /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ThemeProvider, { light: lightTheme, dark: darkTheme, defaultDark, isDark, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
4723
+ enableStatusBar && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(AppStatusBar, { testID: "status-bar", ...statusBarProps }),
4500
4724
  content
4501
4725
  ] }) });
4502
4726
  }
4503
4727
  if (enableSafeArea) {
4504
- content = /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native_safe_area_context4.SafeAreaProvider, { children: content });
4728
+ content = /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native_safe_area_context4.SafeAreaProvider, { children: content });
4505
4729
  }
4506
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_jsx_runtime44.Fragment, { children: content });
4730
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_jsx_runtime46.Fragment, { children: content });
4507
4731
  }
4508
4732
 
4509
4733
  // src/overlay/loading/hooks.ts
@@ -4550,6 +4774,7 @@ var import_react_native_safe_area_context5 = require("react-native-safe-area-con
4550
4774
  ErrorCode,
4551
4775
  FileIcons,
4552
4776
  FormItem,
4777
+ GradientView,
4553
4778
  Icon,
4554
4779
  Loading,
4555
4780
  MemoryStorage,
@@ -4558,6 +4783,7 @@ var import_react_native_safe_area_context5 = require("react-native-safe-area-con
4558
4783
  NavigationProvider,
4559
4784
  OverlayProvider,
4560
4785
  Page,
4786
+ PageDrawer,
4561
4787
  Progress,
4562
4788
  Radio,
4563
4789
  RadioGroup,
@@ -4623,6 +4849,7 @@ var import_react_native_safe_area_context5 = require("react-native-safe-area-con
4623
4849
  useNavigation,
4624
4850
  useNavigationState,
4625
4851
  useOrientation,
4852
+ usePageDrawer,
4626
4853
  usePagination,
4627
4854
  usePrevious,
4628
4855
  useQuery,