@gaozh1024/rn-kit 0.3.1 → 0.3.3
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/README.md +23 -7
- package/dist/index.d.mts +43 -7
- package/dist/index.d.ts +43 -7
- package/dist/index.js +79 -37
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +77 -36
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -171,6 +171,25 @@ import {
|
|
|
171
171
|
} from '@gaozh1024/rn-kit';
|
|
172
172
|
```
|
|
173
173
|
|
|
174
|
+
#### 可本地化文案参数(i18n 推荐)
|
|
175
|
+
|
|
176
|
+
- `AppList`
|
|
177
|
+
- `errorTitle`:错误标题(默认 `加载失败`)
|
|
178
|
+
- `errorDescription`:错误描述兜底(默认 `请检查网络后重试`)
|
|
179
|
+
- `retryText`:重试按钮文案(默认 `重新加载`)
|
|
180
|
+
- `Select`
|
|
181
|
+
- `singleSelectTitle` / `multipleSelectTitle`:弹窗标题
|
|
182
|
+
- `searchPlaceholder`:搜索占位文案
|
|
183
|
+
- `emptyText`:空状态文案
|
|
184
|
+
- `selectedCountText`:多选计数模板,支持 `{{count}}`
|
|
185
|
+
- `confirmText`:多选确认按钮文案
|
|
186
|
+
- `DatePicker`
|
|
187
|
+
- `cancelText` / `confirmText`:弹窗操作按钮文案
|
|
188
|
+
- `pickerTitle`:弹窗标题文案
|
|
189
|
+
- `pickerDateFormat`:弹窗顶部日期格式
|
|
190
|
+
- `yearLabel` / `monthLabel` / `dayLabel`:列标题文案
|
|
191
|
+
- `todayText` / `minDateText` / `maxDateText`:快捷按钮文案
|
|
192
|
+
|
|
174
193
|
### 🪝 Hooks
|
|
175
194
|
|
|
176
195
|
```tsx
|
|
@@ -291,10 +310,7 @@ function FilterPanel() {
|
|
|
291
310
|
```tsx
|
|
292
311
|
import { GradientView, AppText } from '@gaozh1024/rn-kit';
|
|
293
312
|
|
|
294
|
-
<GradientView
|
|
295
|
-
colors={['#f38b32', '#fb923c']}
|
|
296
|
-
style={{ padding: 24, borderRadius: 16 }}
|
|
297
|
-
>
|
|
313
|
+
<GradientView colors={['#f38b32', '#fb923c']} style={{ padding: 24, borderRadius: 16 }}>
|
|
298
314
|
<AppText color="white" weight="bold">
|
|
299
315
|
渐变卡片
|
|
300
316
|
</AppText>
|
|
@@ -452,19 +468,19 @@ export function HeroScreen() {
|
|
|
452
468
|
|
|
453
469
|
1. 当前页面没有单独覆盖 `AppStatusBar`
|
|
454
470
|
2. 页面容器本身是白底
|
|
455
|
-
3. 使用了 `
|
|
471
|
+
3. 使用了 `AppScreen` / `SafeScreen`,但没有设置 `bg`
|
|
456
472
|
4. 顶部安全区没有和页面背景统一
|
|
457
473
|
|
|
458
474
|
如果你用的是:
|
|
459
475
|
|
|
460
476
|
```tsx
|
|
461
|
-
<
|
|
477
|
+
<AppScreen>
|
|
462
478
|
```
|
|
463
479
|
|
|
464
480
|
那它默认不适合登录页这类全屏品牌色场景。请改成:
|
|
465
481
|
|
|
466
482
|
```tsx
|
|
467
|
-
<
|
|
483
|
+
<AppScreen bg="primary-500">
|
|
468
484
|
```
|
|
469
485
|
|
|
470
486
|
或者直接用:
|
package/dist/index.d.mts
CHANGED
|
@@ -1436,15 +1436,15 @@ declare function SafeScreen({ top, bottom, left, right, bg, flex, className, chi
|
|
|
1436
1436
|
*
|
|
1437
1437
|
* @example
|
|
1438
1438
|
* ```tsx
|
|
1439
|
-
* <
|
|
1439
|
+
* <AppScreen>
|
|
1440
1440
|
* <AppHeader title="首页" />
|
|
1441
1441
|
* <AppView flex p={4}>
|
|
1442
1442
|
* <AppText>页面内容</AppText>
|
|
1443
1443
|
* </AppView>
|
|
1444
|
-
* </
|
|
1444
|
+
* </AppScreen>
|
|
1445
1445
|
* ```
|
|
1446
1446
|
*/
|
|
1447
|
-
declare function
|
|
1447
|
+
declare function AppScreen({ children, className, ...props }: Omit<SafeScreenProps, 'top' | 'bottom' | 'left' | 'right'>): react_jsx_runtime.JSX.Element;
|
|
1448
1448
|
/**
|
|
1449
1449
|
* 底部安全区域组件 - 只在底部添加安全距离
|
|
1450
1450
|
* 注意:此组件不会铺满全屏,只占据内容高度
|
|
@@ -1914,6 +1914,9 @@ interface AppListProps<T = any> {
|
|
|
1914
1914
|
onEndReachedThreshold?: number;
|
|
1915
1915
|
error?: Error | null;
|
|
1916
1916
|
onRetry?: () => void;
|
|
1917
|
+
errorTitle?: string;
|
|
1918
|
+
errorDescription?: string;
|
|
1919
|
+
retryText?: string;
|
|
1917
1920
|
emptyTitle?: string;
|
|
1918
1921
|
emptyDescription?: string;
|
|
1919
1922
|
emptyIcon?: string;
|
|
@@ -1932,7 +1935,7 @@ interface AppListProps<T = any> {
|
|
|
1932
1935
|
showsVerticalScrollIndicator?: boolean;
|
|
1933
1936
|
showsHorizontalScrollIndicator?: boolean;
|
|
1934
1937
|
}
|
|
1935
|
-
declare function AppList<T = any>({ data, renderItem, keyExtractor, loading, refreshing, onRefresh, hasMore, onEndReached, onEndReachedThreshold, error, onRetry, emptyTitle, emptyDescription, emptyIcon, EmptyComponent, divider, dividerStyle, skeletonCount, skeletonRender, ListHeaderComponent, ListFooterComponent, contentContainerStyle, style, numColumns, columnWrapperStyle, horizontal, showsVerticalScrollIndicator, showsHorizontalScrollIndicator, }: AppListProps<T>): react_jsx_runtime.JSX.Element;
|
|
1938
|
+
declare function AppList<T = any>({ data, renderItem, keyExtractor, loading, refreshing, onRefresh, hasMore, onEndReached, onEndReachedThreshold, error, onRetry, errorTitle, errorDescription, retryText, emptyTitle, emptyDescription, emptyIcon, EmptyComponent, divider, dividerStyle, skeletonCount, skeletonRender, ListHeaderComponent, ListFooterComponent, contentContainerStyle, style, numColumns, columnWrapperStyle, horizontal, showsVerticalScrollIndicator, showsHorizontalScrollIndicator, }: AppListProps<T>): react_jsx_runtime.JSX.Element;
|
|
1936
1939
|
|
|
1937
1940
|
interface PageDrawerProps {
|
|
1938
1941
|
/** 是否显示 */
|
|
@@ -2134,13 +2137,25 @@ interface SelectProps {
|
|
|
2134
2137
|
disabled?: boolean;
|
|
2135
2138
|
/** 是否可清空 */
|
|
2136
2139
|
clearable?: boolean;
|
|
2140
|
+
/** 单选弹窗标题 */
|
|
2141
|
+
singleSelectTitle?: string;
|
|
2142
|
+
/** 多选弹窗标题 */
|
|
2143
|
+
multipleSelectTitle?: string;
|
|
2144
|
+
/** 搜索占位文字 */
|
|
2145
|
+
searchPlaceholder?: string;
|
|
2146
|
+
/** 空状态文案 */
|
|
2147
|
+
emptyText?: string;
|
|
2148
|
+
/** 多选已选数量文案模板,使用 {{count}} 作为占位符 */
|
|
2149
|
+
selectedCountText?: string;
|
|
2150
|
+
/** 多选确认按钮文案 */
|
|
2151
|
+
confirmText?: string;
|
|
2137
2152
|
/** 自定义样式 */
|
|
2138
2153
|
className?: string;
|
|
2139
2154
|
}
|
|
2140
2155
|
/**
|
|
2141
2156
|
* 底部弹出选择器组件,支持浅色/深色主题
|
|
2142
2157
|
*/
|
|
2143
|
-
declare function Select({ value, onChange, options, placeholder, multiple, searchable, onSearch, disabled, clearable, className, }: SelectProps): react_jsx_runtime.JSX.Element;
|
|
2158
|
+
declare function Select({ value, onChange, options, placeholder, multiple, searchable, onSearch, disabled, clearable, singleSelectTitle, multipleSelectTitle, searchPlaceholder, emptyText, selectedCountText, confirmText, className, }: SelectProps): react_jsx_runtime.JSX.Element;
|
|
2144
2159
|
|
|
2145
2160
|
/**
|
|
2146
2161
|
* DatePicker 组件属性接口
|
|
@@ -2162,11 +2177,31 @@ interface DatePickerProps {
|
|
|
2162
2177
|
maxDate?: Date;
|
|
2163
2178
|
/** 自定义样式 */
|
|
2164
2179
|
className?: string;
|
|
2180
|
+
/** 弹窗取消按钮文案 */
|
|
2181
|
+
cancelText?: string;
|
|
2182
|
+
/** 弹窗确认按钮文案 */
|
|
2183
|
+
confirmText?: string;
|
|
2184
|
+
/** 弹窗标题文案 */
|
|
2185
|
+
pickerTitle?: string;
|
|
2186
|
+
/** 弹窗日期展示格式 */
|
|
2187
|
+
pickerDateFormat?: string;
|
|
2188
|
+
/** 年列标题 */
|
|
2189
|
+
yearLabel?: string;
|
|
2190
|
+
/** 月列标题 */
|
|
2191
|
+
monthLabel?: string;
|
|
2192
|
+
/** 日列标题 */
|
|
2193
|
+
dayLabel?: string;
|
|
2194
|
+
/** 快捷按钮“今天”文案 */
|
|
2195
|
+
todayText?: string;
|
|
2196
|
+
/** 快捷按钮“最早”文案 */
|
|
2197
|
+
minDateText?: string;
|
|
2198
|
+
/** 快捷按钮“最晚”文案 */
|
|
2199
|
+
maxDateText?: string;
|
|
2165
2200
|
}
|
|
2166
2201
|
/**
|
|
2167
2202
|
* DatePicker - 日期选择器组件,支持浅色/深色主题
|
|
2168
2203
|
*/
|
|
2169
|
-
declare function DatePicker({ value, onChange, placeholder, disabled, format, minDate, maxDate, className, }: DatePickerProps): react_jsx_runtime.JSX.Element;
|
|
2204
|
+
declare function DatePicker({ value, onChange, placeholder, disabled, format, minDate, maxDate, className, cancelText, confirmText, pickerTitle, pickerDateFormat, yearLabel, monthLabel, dayLabel, todayText, minDateText, maxDateText, }: DatePickerProps): react_jsx_runtime.JSX.Element;
|
|
2170
2205
|
|
|
2171
2206
|
interface FormItemProps {
|
|
2172
2207
|
name: string;
|
|
@@ -3236,6 +3271,7 @@ interface AppStatusBarProps extends Omit<StatusBarProps, 'barStyle' | 'backgroun
|
|
|
3236
3271
|
* - 页面可通过手动渲染该组件进行局部覆盖
|
|
3237
3272
|
*/
|
|
3238
3273
|
declare function AppStatusBar({ barStyle, backgroundColor, translucent, ...props }: AppStatusBarProps): react_jsx_runtime.JSX.Element;
|
|
3274
|
+
declare function AppFocusedStatusBar(props: AppStatusBarProps): react_jsx_runtime.JSX.Element | null;
|
|
3239
3275
|
|
|
3240
3276
|
/**
|
|
3241
3277
|
* AppProvider Props
|
|
@@ -3548,4 +3584,4 @@ interface AlertContextType {
|
|
|
3548
3584
|
*/
|
|
3549
3585
|
declare function useAlert(): AlertContextType;
|
|
3550
3586
|
|
|
3551
|
-
export { ActionIcons, Alert, type AlertContextType, type AlertOptions, type AlertProps, type ApiBusinessErrorParser, type ApiConfig, type ApiEndpointConfig, type ApiErrorContext, type ApiErrorHandler, type ApiMethod, AppButton, type AppButtonProps, type AppError, AppHeader, type AppHeaderProps, AppImage, type AppImageProps, AppInput, type AppInputProps, AppList, type AppListProps, type AppNavigation, AppPressable, type AppPressableProps, AppProvider, type AppProviderProps, AppScrollView, type AppScrollViewProps, AppStatusBar, type AppStatusBarProps, AppText, type AppTextProps, AppView, type AppViewProps, BottomTabBar, Card, type CardProps, Center, type CenterProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, Col, type ColProps, type ColorPalette$1 as ColorPalette, type ColorToken, type CustomBottomTabBarProps, DatePicker, type DatePickerProps, DrawerContent, type DrawerContentProps, type DrawerItem, type DrawerNavigation, DrawerNavigator, type DrawerNavigatorProps, type DrawerOptions, type DrawerParamList, type DrawerRouteConfig, type DrawerScreenOptions, type DrawerScreenProps, ErrorCode, FileIcons, type FormErrors, type FormGroupOption, FormItem, type FormItemProps, GradientView, type GradientViewProps, Icon, type IconProps, type IconSize, type InfiniteFetchParams, type InfiniteFetchResult, type LinkingConfig, Loading, type LoadingContextType, type LoadingProps, type LoadingState, MemoryStorage, NavigationIcons, NavigationProvider, type NavigationProviderProps, type Orientation, OverlayProvider, type OverlayProviderProps,
|
|
3587
|
+
export { ActionIcons, Alert, type AlertContextType, type AlertOptions, type AlertProps, type ApiBusinessErrorParser, type ApiConfig, type ApiEndpointConfig, type ApiErrorContext, type ApiErrorHandler, type ApiMethod, AppButton, type AppButtonProps, type AppError, AppFocusedStatusBar, AppHeader, type AppHeaderProps, AppImage, type AppImageProps, AppInput, type AppInputProps, AppList, type AppListProps, type AppNavigation, AppPressable, type AppPressableProps, AppProvider, type AppProviderProps, AppScreen, AppScrollView, type AppScrollViewProps, AppStatusBar, type AppStatusBarProps, AppText, type AppTextProps, AppView, type AppViewProps, BottomTabBar, Card, type CardProps, Center, type CenterProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, Col, type ColProps, type ColorPalette$1 as ColorPalette, type ColorToken, type CustomBottomTabBarProps, DatePicker, type DatePickerProps, DrawerContent, type DrawerContentProps, type DrawerItem, type DrawerNavigation, DrawerNavigator, type DrawerNavigatorProps, type DrawerOptions, type DrawerParamList, type DrawerRouteConfig, type DrawerScreenOptions, type DrawerScreenProps, ErrorCode, FileIcons, type FormErrors, type FormGroupOption, FormItem, type FormItemProps, GradientView, type GradientViewProps, Icon, type IconProps, type IconSize, type InfiniteFetchParams, type InfiniteFetchResult, type LinkingConfig, Loading, type LoadingContextType, type LoadingProps, type LoadingState, MemoryStorage, NavigationIcons, NavigationProvider, type NavigationProviderProps, type Orientation, OverlayProvider, type OverlayProviderProps, PageDrawer, type PageDrawerProps, type PaginationParams, type PaginationResult, type ParamListBase, type PathConfig, Progress, type ProgressProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, type RgbObject, type RouteConfig, Row, type RowProps, SafeBottom, SafeScreen, type SafeScreenProps, Select, type SelectOption, type SelectProps, Slider, type SliderProps, type StackNavigation, StackNavigator, type StackNavigatorProps, type StackParamList, type StackRouteConfig, type StackScreenOptions, type StackScreenProps, StatusIcons, Switch, type SwitchProps, type TabBarOptions, type TabNavigation, TabNavigator, type TabNavigatorProps, type TabParamList, type TabRouteConfig, type TabScreenOptions, type TabScreenProps, type Theme, type ColorPalette as ThemeColorPalette, type ThemeConfig, ThemeProvider, Toast, type ToastContextType, type ToastItem, type ToastProps, type ToastType, type UseAsyncState, type UseDimensionsReturn, type UseFormOptions, type UseInfiniteOptions, type UseInfiniteReturn, type UseKeyboardReturn, type UseOrientationReturn, type UsePageDrawerReturn, type UsePaginationOptions, type UsePaginationReturn, type UseRefreshReturn, type UseToggleActions, adjustBrightness, capitalize, clamp, cn, createAPI, createDrawerScreens, createNavigationTheme, createStackScreens, createTabScreens, createTheme, deepMerge, enhanceError, formatCurrency, formatDate, formatNumber, formatPercent, formatRelativeTime, generateColorPalette, getThemeColors, getValidationErrors, hexToRgb, isDevelopment, isValidEmail, isValidPhone, mapHttpStatus, omit, pick, rgbToHex, slugify, storage, truncate, useAlert, useAsyncState, useBackHandler, useDebounce, useDimensions, useDrawerNavigation, useForm, useInfinite, useKeyboard, useLoading, useMemoizedFn, useNavigation, useNavigationState, useOrientation, usePageDrawer, usePagination, usePrevious, useRefresh, useRequest, useRoute, useSetState, useStackNavigation, useStorage, useTabNavigation, useTheme, useThemeColors, useThrottle, useToast, useToggle, useUpdateEffect };
|
package/dist/index.d.ts
CHANGED
|
@@ -1436,15 +1436,15 @@ declare function SafeScreen({ top, bottom, left, right, bg, flex, className, chi
|
|
|
1436
1436
|
*
|
|
1437
1437
|
* @example
|
|
1438
1438
|
* ```tsx
|
|
1439
|
-
* <
|
|
1439
|
+
* <AppScreen>
|
|
1440
1440
|
* <AppHeader title="首页" />
|
|
1441
1441
|
* <AppView flex p={4}>
|
|
1442
1442
|
* <AppText>页面内容</AppText>
|
|
1443
1443
|
* </AppView>
|
|
1444
|
-
* </
|
|
1444
|
+
* </AppScreen>
|
|
1445
1445
|
* ```
|
|
1446
1446
|
*/
|
|
1447
|
-
declare function
|
|
1447
|
+
declare function AppScreen({ children, className, ...props }: Omit<SafeScreenProps, 'top' | 'bottom' | 'left' | 'right'>): react_jsx_runtime.JSX.Element;
|
|
1448
1448
|
/**
|
|
1449
1449
|
* 底部安全区域组件 - 只在底部添加安全距离
|
|
1450
1450
|
* 注意:此组件不会铺满全屏,只占据内容高度
|
|
@@ -1914,6 +1914,9 @@ interface AppListProps<T = any> {
|
|
|
1914
1914
|
onEndReachedThreshold?: number;
|
|
1915
1915
|
error?: Error | null;
|
|
1916
1916
|
onRetry?: () => void;
|
|
1917
|
+
errorTitle?: string;
|
|
1918
|
+
errorDescription?: string;
|
|
1919
|
+
retryText?: string;
|
|
1917
1920
|
emptyTitle?: string;
|
|
1918
1921
|
emptyDescription?: string;
|
|
1919
1922
|
emptyIcon?: string;
|
|
@@ -1932,7 +1935,7 @@ interface AppListProps<T = any> {
|
|
|
1932
1935
|
showsVerticalScrollIndicator?: boolean;
|
|
1933
1936
|
showsHorizontalScrollIndicator?: boolean;
|
|
1934
1937
|
}
|
|
1935
|
-
declare function AppList<T = any>({ data, renderItem, keyExtractor, loading, refreshing, onRefresh, hasMore, onEndReached, onEndReachedThreshold, error, onRetry, emptyTitle, emptyDescription, emptyIcon, EmptyComponent, divider, dividerStyle, skeletonCount, skeletonRender, ListHeaderComponent, ListFooterComponent, contentContainerStyle, style, numColumns, columnWrapperStyle, horizontal, showsVerticalScrollIndicator, showsHorizontalScrollIndicator, }: AppListProps<T>): react_jsx_runtime.JSX.Element;
|
|
1938
|
+
declare function AppList<T = any>({ data, renderItem, keyExtractor, loading, refreshing, onRefresh, hasMore, onEndReached, onEndReachedThreshold, error, onRetry, errorTitle, errorDescription, retryText, emptyTitle, emptyDescription, emptyIcon, EmptyComponent, divider, dividerStyle, skeletonCount, skeletonRender, ListHeaderComponent, ListFooterComponent, contentContainerStyle, style, numColumns, columnWrapperStyle, horizontal, showsVerticalScrollIndicator, showsHorizontalScrollIndicator, }: AppListProps<T>): react_jsx_runtime.JSX.Element;
|
|
1936
1939
|
|
|
1937
1940
|
interface PageDrawerProps {
|
|
1938
1941
|
/** 是否显示 */
|
|
@@ -2134,13 +2137,25 @@ interface SelectProps {
|
|
|
2134
2137
|
disabled?: boolean;
|
|
2135
2138
|
/** 是否可清空 */
|
|
2136
2139
|
clearable?: boolean;
|
|
2140
|
+
/** 单选弹窗标题 */
|
|
2141
|
+
singleSelectTitle?: string;
|
|
2142
|
+
/** 多选弹窗标题 */
|
|
2143
|
+
multipleSelectTitle?: string;
|
|
2144
|
+
/** 搜索占位文字 */
|
|
2145
|
+
searchPlaceholder?: string;
|
|
2146
|
+
/** 空状态文案 */
|
|
2147
|
+
emptyText?: string;
|
|
2148
|
+
/** 多选已选数量文案模板,使用 {{count}} 作为占位符 */
|
|
2149
|
+
selectedCountText?: string;
|
|
2150
|
+
/** 多选确认按钮文案 */
|
|
2151
|
+
confirmText?: string;
|
|
2137
2152
|
/** 自定义样式 */
|
|
2138
2153
|
className?: string;
|
|
2139
2154
|
}
|
|
2140
2155
|
/**
|
|
2141
2156
|
* 底部弹出选择器组件,支持浅色/深色主题
|
|
2142
2157
|
*/
|
|
2143
|
-
declare function Select({ value, onChange, options, placeholder, multiple, searchable, onSearch, disabled, clearable, className, }: SelectProps): react_jsx_runtime.JSX.Element;
|
|
2158
|
+
declare function Select({ value, onChange, options, placeholder, multiple, searchable, onSearch, disabled, clearable, singleSelectTitle, multipleSelectTitle, searchPlaceholder, emptyText, selectedCountText, confirmText, className, }: SelectProps): react_jsx_runtime.JSX.Element;
|
|
2144
2159
|
|
|
2145
2160
|
/**
|
|
2146
2161
|
* DatePicker 组件属性接口
|
|
@@ -2162,11 +2177,31 @@ interface DatePickerProps {
|
|
|
2162
2177
|
maxDate?: Date;
|
|
2163
2178
|
/** 自定义样式 */
|
|
2164
2179
|
className?: string;
|
|
2180
|
+
/** 弹窗取消按钮文案 */
|
|
2181
|
+
cancelText?: string;
|
|
2182
|
+
/** 弹窗确认按钮文案 */
|
|
2183
|
+
confirmText?: string;
|
|
2184
|
+
/** 弹窗标题文案 */
|
|
2185
|
+
pickerTitle?: string;
|
|
2186
|
+
/** 弹窗日期展示格式 */
|
|
2187
|
+
pickerDateFormat?: string;
|
|
2188
|
+
/** 年列标题 */
|
|
2189
|
+
yearLabel?: string;
|
|
2190
|
+
/** 月列标题 */
|
|
2191
|
+
monthLabel?: string;
|
|
2192
|
+
/** 日列标题 */
|
|
2193
|
+
dayLabel?: string;
|
|
2194
|
+
/** 快捷按钮“今天”文案 */
|
|
2195
|
+
todayText?: string;
|
|
2196
|
+
/** 快捷按钮“最早”文案 */
|
|
2197
|
+
minDateText?: string;
|
|
2198
|
+
/** 快捷按钮“最晚”文案 */
|
|
2199
|
+
maxDateText?: string;
|
|
2165
2200
|
}
|
|
2166
2201
|
/**
|
|
2167
2202
|
* DatePicker - 日期选择器组件,支持浅色/深色主题
|
|
2168
2203
|
*/
|
|
2169
|
-
declare function DatePicker({ value, onChange, placeholder, disabled, format, minDate, maxDate, className, }: DatePickerProps): react_jsx_runtime.JSX.Element;
|
|
2204
|
+
declare function DatePicker({ value, onChange, placeholder, disabled, format, minDate, maxDate, className, cancelText, confirmText, pickerTitle, pickerDateFormat, yearLabel, monthLabel, dayLabel, todayText, minDateText, maxDateText, }: DatePickerProps): react_jsx_runtime.JSX.Element;
|
|
2170
2205
|
|
|
2171
2206
|
interface FormItemProps {
|
|
2172
2207
|
name: string;
|
|
@@ -3236,6 +3271,7 @@ interface AppStatusBarProps extends Omit<StatusBarProps, 'barStyle' | 'backgroun
|
|
|
3236
3271
|
* - 页面可通过手动渲染该组件进行局部覆盖
|
|
3237
3272
|
*/
|
|
3238
3273
|
declare function AppStatusBar({ barStyle, backgroundColor, translucent, ...props }: AppStatusBarProps): react_jsx_runtime.JSX.Element;
|
|
3274
|
+
declare function AppFocusedStatusBar(props: AppStatusBarProps): react_jsx_runtime.JSX.Element | null;
|
|
3239
3275
|
|
|
3240
3276
|
/**
|
|
3241
3277
|
* AppProvider Props
|
|
@@ -3548,4 +3584,4 @@ interface AlertContextType {
|
|
|
3548
3584
|
*/
|
|
3549
3585
|
declare function useAlert(): AlertContextType;
|
|
3550
3586
|
|
|
3551
|
-
export { ActionIcons, Alert, type AlertContextType, type AlertOptions, type AlertProps, type ApiBusinessErrorParser, type ApiConfig, type ApiEndpointConfig, type ApiErrorContext, type ApiErrorHandler, type ApiMethod, AppButton, type AppButtonProps, type AppError, AppHeader, type AppHeaderProps, AppImage, type AppImageProps, AppInput, type AppInputProps, AppList, type AppListProps, type AppNavigation, AppPressable, type AppPressableProps, AppProvider, type AppProviderProps, AppScrollView, type AppScrollViewProps, AppStatusBar, type AppStatusBarProps, AppText, type AppTextProps, AppView, type AppViewProps, BottomTabBar, Card, type CardProps, Center, type CenterProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, Col, type ColProps, type ColorPalette$1 as ColorPalette, type ColorToken, type CustomBottomTabBarProps, DatePicker, type DatePickerProps, DrawerContent, type DrawerContentProps, type DrawerItem, type DrawerNavigation, DrawerNavigator, type DrawerNavigatorProps, type DrawerOptions, type DrawerParamList, type DrawerRouteConfig, type DrawerScreenOptions, type DrawerScreenProps, ErrorCode, FileIcons, type FormErrors, type FormGroupOption, FormItem, type FormItemProps, GradientView, type GradientViewProps, Icon, type IconProps, type IconSize, type InfiniteFetchParams, type InfiniteFetchResult, type LinkingConfig, Loading, type LoadingContextType, type LoadingProps, type LoadingState, MemoryStorage, NavigationIcons, NavigationProvider, type NavigationProviderProps, type Orientation, OverlayProvider, type OverlayProviderProps,
|
|
3587
|
+
export { ActionIcons, Alert, type AlertContextType, type AlertOptions, type AlertProps, type ApiBusinessErrorParser, type ApiConfig, type ApiEndpointConfig, type ApiErrorContext, type ApiErrorHandler, type ApiMethod, AppButton, type AppButtonProps, type AppError, AppFocusedStatusBar, AppHeader, type AppHeaderProps, AppImage, type AppImageProps, AppInput, type AppInputProps, AppList, type AppListProps, type AppNavigation, AppPressable, type AppPressableProps, AppProvider, type AppProviderProps, AppScreen, AppScrollView, type AppScrollViewProps, AppStatusBar, type AppStatusBarProps, AppText, type AppTextProps, AppView, type AppViewProps, BottomTabBar, Card, type CardProps, Center, type CenterProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, Col, type ColProps, type ColorPalette$1 as ColorPalette, type ColorToken, type CustomBottomTabBarProps, DatePicker, type DatePickerProps, DrawerContent, type DrawerContentProps, type DrawerItem, type DrawerNavigation, DrawerNavigator, type DrawerNavigatorProps, type DrawerOptions, type DrawerParamList, type DrawerRouteConfig, type DrawerScreenOptions, type DrawerScreenProps, ErrorCode, FileIcons, type FormErrors, type FormGroupOption, FormItem, type FormItemProps, GradientView, type GradientViewProps, Icon, type IconProps, type IconSize, type InfiniteFetchParams, type InfiniteFetchResult, type LinkingConfig, Loading, type LoadingContextType, type LoadingProps, type LoadingState, MemoryStorage, NavigationIcons, NavigationProvider, type NavigationProviderProps, type Orientation, OverlayProvider, type OverlayProviderProps, PageDrawer, type PageDrawerProps, type PaginationParams, type PaginationResult, type ParamListBase, type PathConfig, Progress, type ProgressProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, type RgbObject, type RouteConfig, Row, type RowProps, SafeBottom, SafeScreen, type SafeScreenProps, Select, type SelectOption, type SelectProps, Slider, type SliderProps, type StackNavigation, StackNavigator, type StackNavigatorProps, type StackParamList, type StackRouteConfig, type StackScreenOptions, type StackScreenProps, StatusIcons, Switch, type SwitchProps, type TabBarOptions, type TabNavigation, TabNavigator, type TabNavigatorProps, type TabParamList, type TabRouteConfig, type TabScreenOptions, type TabScreenProps, type Theme, type ColorPalette as ThemeColorPalette, type ThemeConfig, ThemeProvider, Toast, type ToastContextType, type ToastItem, type ToastProps, type ToastType, type UseAsyncState, type UseDimensionsReturn, type UseFormOptions, type UseInfiniteOptions, type UseInfiniteReturn, type UseKeyboardReturn, type UseOrientationReturn, type UsePageDrawerReturn, type UsePaginationOptions, type UsePaginationReturn, type UseRefreshReturn, type UseToggleActions, adjustBrightness, capitalize, clamp, cn, createAPI, createDrawerScreens, createNavigationTheme, createStackScreens, createTabScreens, createTheme, deepMerge, enhanceError, formatCurrency, formatDate, formatNumber, formatPercent, formatRelativeTime, generateColorPalette, getThemeColors, getValidationErrors, hexToRgb, isDevelopment, isValidEmail, isValidPhone, mapHttpStatus, omit, pick, rgbToHex, slugify, storage, truncate, useAlert, useAsyncState, useBackHandler, useDebounce, useDimensions, useDrawerNavigation, useForm, useInfinite, useKeyboard, useLoading, useMemoizedFn, useNavigation, useNavigationState, useOrientation, usePageDrawer, usePagination, usePrevious, useRefresh, useRequest, useRoute, useSetState, useStackNavigation, useStorage, useTabNavigation, useTheme, useThemeColors, useThrottle, useToast, useToggle, useUpdateEffect };
|
package/dist/index.js
CHANGED
|
@@ -33,12 +33,14 @@ __export(index_exports, {
|
|
|
33
33
|
ActionIcons: () => ActionIcons,
|
|
34
34
|
Alert: () => Alert,
|
|
35
35
|
AppButton: () => AppButton,
|
|
36
|
+
AppFocusedStatusBar: () => AppFocusedStatusBar,
|
|
36
37
|
AppHeader: () => AppHeader,
|
|
37
38
|
AppImage: () => AppImage,
|
|
38
39
|
AppInput: () => AppInput,
|
|
39
40
|
AppList: () => AppList,
|
|
40
41
|
AppPressable: () => AppPressable,
|
|
41
42
|
AppProvider: () => AppProvider,
|
|
43
|
+
AppScreen: () => AppScreen,
|
|
42
44
|
AppScrollView: () => AppScrollView,
|
|
43
45
|
AppStatusBar: () => AppStatusBar,
|
|
44
46
|
AppText: () => AppText,
|
|
@@ -63,7 +65,6 @@ __export(index_exports, {
|
|
|
63
65
|
NavigationIcons: () => NavigationIcons,
|
|
64
66
|
NavigationProvider: () => NavigationProvider,
|
|
65
67
|
OverlayProvider: () => OverlayProvider,
|
|
66
|
-
Page: () => Page,
|
|
67
68
|
PageDrawer: () => PageDrawer,
|
|
68
69
|
Progress: () => Progress,
|
|
69
70
|
Radio: () => Radio,
|
|
@@ -1397,7 +1398,7 @@ var styles = import_react_native5.StyleSheet.create({
|
|
|
1397
1398
|
flex: 1
|
|
1398
1399
|
}
|
|
1399
1400
|
});
|
|
1400
|
-
function
|
|
1401
|
+
function AppScreen({
|
|
1401
1402
|
children,
|
|
1402
1403
|
className,
|
|
1403
1404
|
...props
|
|
@@ -1766,7 +1767,15 @@ function Icon({ name, size = "md", color = "gray-600", style, onPress, testID })
|
|
|
1766
1767
|
return onPress ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(AppPressable, { onPress, children: fallback }) : fallback;
|
|
1767
1768
|
}
|
|
1768
1769
|
if (onPress) {
|
|
1769
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(AppPressable, { onPress, testID, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1770
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(AppPressable, { onPress, testID, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1771
|
+
MaterialIconComponent,
|
|
1772
|
+
{
|
|
1773
|
+
name,
|
|
1774
|
+
size: resolvedSize,
|
|
1775
|
+
color: resolvedColor,
|
|
1776
|
+
style
|
|
1777
|
+
}
|
|
1778
|
+
) });
|
|
1770
1779
|
}
|
|
1771
1780
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1772
1781
|
MaterialIconComponent,
|
|
@@ -2010,12 +2019,18 @@ function EmptyState({
|
|
|
2010
2019
|
description && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AppText, { size: "sm", className: "mt-2", style: { color: colors.textMuted }, children: description })
|
|
2011
2020
|
] });
|
|
2012
2021
|
}
|
|
2013
|
-
function ErrorState({
|
|
2022
|
+
function ErrorState({
|
|
2023
|
+
error,
|
|
2024
|
+
onRetry,
|
|
2025
|
+
errorTitle,
|
|
2026
|
+
errorDescription,
|
|
2027
|
+
retryText
|
|
2028
|
+
}) {
|
|
2014
2029
|
const colors = useThemeColors();
|
|
2015
2030
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Center, { py: 20, children: [
|
|
2016
2031
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, { name: "error-outline", size: 64, color: "error-300" }),
|
|
2017
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AppText, { size: "lg", weight: "medium", color: "error-500", className: "mt-4", children: "\u52A0\u8F7D\u5931\u8D25" }),
|
|
2018
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AppText, { size: "sm", style: { color: colors.textMuted }, className: "mt-2 text-center px-8", children: error.message || "\u8BF7\u68C0\u67E5\u7F51\u7EDC\u540E\u91CD\u8BD5" }),
|
|
2032
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AppText, { size: "lg", weight: "medium", color: "error-500", className: "mt-4", children: errorTitle || "\u52A0\u8F7D\u5931\u8D25" }),
|
|
2033
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AppText, { size: "sm", style: { color: colors.textMuted }, className: "mt-2 text-center px-8", children: error.message || errorDescription || "\u8BF7\u68C0\u67E5\u7F51\u7EDC\u540E\u91CD\u8BD5" }),
|
|
2019
2034
|
onRetry && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2020
2035
|
AppPressable,
|
|
2021
2036
|
{
|
|
@@ -2025,7 +2040,7 @@ function ErrorState({ error, onRetry }) {
|
|
|
2025
2040
|
styles3.retryButton,
|
|
2026
2041
|
{ backgroundColor: colors.cardElevated, borderColor: colors.border }
|
|
2027
2042
|
],
|
|
2028
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AppText, { style: { color: colors.textSecondary }, className: "text-center", children: "\u91CD\u65B0\u52A0\u8F7D" })
|
|
2043
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AppText, { style: { color: colors.textSecondary }, className: "text-center", children: retryText || "\u91CD\u65B0\u52A0\u8F7D" })
|
|
2029
2044
|
}
|
|
2030
2045
|
)
|
|
2031
2046
|
] });
|
|
@@ -2056,6 +2071,9 @@ function AppList({
|
|
|
2056
2071
|
onEndReachedThreshold = 0.5,
|
|
2057
2072
|
error,
|
|
2058
2073
|
onRetry,
|
|
2074
|
+
errorTitle,
|
|
2075
|
+
errorDescription,
|
|
2076
|
+
retryText,
|
|
2059
2077
|
emptyTitle,
|
|
2060
2078
|
emptyDescription,
|
|
2061
2079
|
emptyIcon,
|
|
@@ -2124,7 +2142,16 @@ function AppList({
|
|
|
2124
2142
|
);
|
|
2125
2143
|
}
|
|
2126
2144
|
if (error && data.length === 0) {
|
|
2127
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Center, { style, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2145
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Center, { style, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2146
|
+
ErrorState,
|
|
2147
|
+
{
|
|
2148
|
+
error,
|
|
2149
|
+
onRetry,
|
|
2150
|
+
errorTitle,
|
|
2151
|
+
errorDescription,
|
|
2152
|
+
retryText
|
|
2153
|
+
}
|
|
2154
|
+
) });
|
|
2128
2155
|
}
|
|
2129
2156
|
const ListEmptyComponent = (0, import_react15.useMemo)(() => {
|
|
2130
2157
|
if (EmptyComponent) return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(EmptyComponent, {});
|
|
@@ -2286,14 +2313,7 @@ function PageDrawer({
|
|
|
2286
2313
|
}
|
|
2287
2314
|
),
|
|
2288
2315
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(AppScrollView, { flex: true, className: "px-4 py-4", children }),
|
|
2289
|
-
footer && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2290
|
-
AppView,
|
|
2291
|
-
{
|
|
2292
|
-
className: "px-4 py-4",
|
|
2293
|
-
style: [styles4.footer, { borderTopColor: colors.divider }],
|
|
2294
|
-
children: footer
|
|
2295
|
-
}
|
|
2296
|
-
)
|
|
2316
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(AppView, { className: "px-4 py-4", style: [styles4.footer, { borderTopColor: colors.divider }], children: footer })
|
|
2297
2317
|
]
|
|
2298
2318
|
}
|
|
2299
2319
|
);
|
|
@@ -2944,6 +2964,9 @@ var styles9 = import_react_native18.StyleSheet.create({
|
|
|
2944
2964
|
var import_react23 = require("react");
|
|
2945
2965
|
var import_react_native19 = require("react-native");
|
|
2946
2966
|
var import_jsx_runtime28 = require("nativewind/jsx-runtime");
|
|
2967
|
+
function formatSelectedCountText(template, count) {
|
|
2968
|
+
return template.replace("{{count}}", String(count));
|
|
2969
|
+
}
|
|
2947
2970
|
function Select({
|
|
2948
2971
|
value,
|
|
2949
2972
|
onChange,
|
|
@@ -2954,6 +2977,12 @@ function Select({
|
|
|
2954
2977
|
onSearch,
|
|
2955
2978
|
disabled = false,
|
|
2956
2979
|
clearable = true,
|
|
2980
|
+
singleSelectTitle = "\u8BF7\u9009\u62E9",
|
|
2981
|
+
multipleSelectTitle = "\u9009\u62E9\u9009\u9879",
|
|
2982
|
+
searchPlaceholder = "\u641C\u7D22...",
|
|
2983
|
+
emptyText = "\u6682\u65E0\u9009\u9879",
|
|
2984
|
+
selectedCountText = "\u5DF2\u9009\u62E9 {{count}} \u9879",
|
|
2985
|
+
confirmText = "\u786E\u5B9A",
|
|
2957
2986
|
className
|
|
2958
2987
|
}) {
|
|
2959
2988
|
const colors = useFormThemeColors();
|
|
@@ -3077,7 +3106,7 @@ function Select({
|
|
|
3077
3106
|
className: "px-4 py-3",
|
|
3078
3107
|
style: [styles10.header, { borderBottomColor: colors.divider }],
|
|
3079
3108
|
children: [
|
|
3080
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(AppText, { className: "text-lg font-semibold", style: { color: colors.text }, children: multiple ?
|
|
3109
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(AppText, { className: "text-lg font-semibold", style: { color: colors.text }, children: multiple ? multipleSelectTitle : singleSelectTitle }),
|
|
3081
3110
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_native19.TouchableOpacity, { onPress: () => setVisible(false), children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon, { name: "close", size: "md", color: colors.icon }) })
|
|
3082
3111
|
]
|
|
3083
3112
|
}
|
|
@@ -3101,7 +3130,7 @@ function Select({
|
|
|
3101
3130
|
{
|
|
3102
3131
|
className: "flex-1 text-base",
|
|
3103
3132
|
style: { color: colors.text },
|
|
3104
|
-
placeholder:
|
|
3133
|
+
placeholder: searchPlaceholder,
|
|
3105
3134
|
placeholderTextColor: colors.textMuted,
|
|
3106
3135
|
value: searchKeyword,
|
|
3107
3136
|
onChangeText: handleSearch,
|
|
@@ -3120,7 +3149,7 @@ function Select({
|
|
|
3120
3149
|
data: filteredOptions,
|
|
3121
3150
|
keyExtractor: (item) => item.value,
|
|
3122
3151
|
renderItem: renderOption,
|
|
3123
|
-
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:
|
|
3152
|
+
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: emptyText }) })
|
|
3124
3153
|
}
|
|
3125
3154
|
),
|
|
3126
3155
|
multiple && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
@@ -3132,18 +3161,14 @@ function Select({
|
|
|
3132
3161
|
className: "px-4 py-3",
|
|
3133
3162
|
style: [styles10.footer, { borderTopColor: colors.divider }],
|
|
3134
3163
|
children: [
|
|
3135
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.
|
|
3136
|
-
"\u5DF2\u9009\u62E9 ",
|
|
3137
|
-
selectedValues.length,
|
|
3138
|
-
" \u9879"
|
|
3139
|
-
] }),
|
|
3164
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(AppText, { style: { color: colors.textMuted }, children: formatSelectedCountText(selectedCountText, selectedValues.length) }),
|
|
3140
3165
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3141
3166
|
import_react_native19.TouchableOpacity,
|
|
3142
3167
|
{
|
|
3143
3168
|
className: "px-4 py-2 rounded-lg",
|
|
3144
3169
|
style: { backgroundColor: colors.primary },
|
|
3145
3170
|
onPress: () => setVisible(false),
|
|
3146
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(AppText, { className: "font-medium", style: { color: colors.textInverse }, children:
|
|
3171
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(AppText, { className: "font-medium", style: { color: colors.textInverse }, children: confirmText })
|
|
3147
3172
|
}
|
|
3148
3173
|
)
|
|
3149
3174
|
]
|
|
@@ -3234,7 +3259,17 @@ function DatePicker({
|
|
|
3234
3259
|
format = "yyyy-MM-dd",
|
|
3235
3260
|
minDate,
|
|
3236
3261
|
maxDate,
|
|
3237
|
-
className
|
|
3262
|
+
className,
|
|
3263
|
+
cancelText = "\u53D6\u6D88",
|
|
3264
|
+
confirmText = "\u786E\u5B9A",
|
|
3265
|
+
pickerTitle = "\u9009\u62E9\u65E5\u671F",
|
|
3266
|
+
pickerDateFormat = "yyyy\u5E74MM\u6708dd\u65E5",
|
|
3267
|
+
yearLabel = "\u5E74",
|
|
3268
|
+
monthLabel = "\u6708",
|
|
3269
|
+
dayLabel = "\u65E5",
|
|
3270
|
+
todayText = "\u4ECA\u5929",
|
|
3271
|
+
minDateText = "\u6700\u65E9",
|
|
3272
|
+
maxDateText = "\u6700\u665A"
|
|
3238
3273
|
}) {
|
|
3239
3274
|
const colors = useFormThemeColors();
|
|
3240
3275
|
const [visible, setVisible] = (0, import_react24.useState)(false);
|
|
@@ -3328,18 +3363,18 @@ function DatePicker({
|
|
|
3328
3363
|
className: "px-4 py-3",
|
|
3329
3364
|
style: [styles11.header, { borderBottomColor: colors.divider }],
|
|
3330
3365
|
children: [
|
|
3331
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native20.TouchableOpacity, { onPress: () => setVisible(false), children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(AppText, { style: { color: colors.textMuted }, children:
|
|
3332
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(AppText, { className: "text-lg font-semibold", style: { color: colors.text }, children:
|
|
3333
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native20.TouchableOpacity, { onPress: handleConfirm, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(AppText, { style: { color: colors.primary }, className: "font-medium", children:
|
|
3366
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native20.TouchableOpacity, { onPress: () => setVisible(false), children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(AppText, { style: { color: colors.textMuted }, children: cancelText }) }),
|
|
3367
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(AppText, { className: "text-lg font-semibold", style: { color: colors.text }, children: pickerTitle }),
|
|
3368
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native20.TouchableOpacity, { onPress: handleConfirm, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(AppText, { style: { color: colors.primary }, className: "font-medium", children: confirmText }) })
|
|
3334
3369
|
]
|
|
3335
3370
|
}
|
|
3336
3371
|
),
|
|
3337
|
-
/* @__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,
|
|
3372
|
+
/* @__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, pickerDateFormat) }) }),
|
|
3338
3373
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(AppView, { row: true, className: "h-48", children: [
|
|
3339
3374
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3340
3375
|
PickerColumn,
|
|
3341
3376
|
{
|
|
3342
|
-
title:
|
|
3377
|
+
title: yearLabel,
|
|
3343
3378
|
values: years,
|
|
3344
3379
|
selectedValue: tempDate.getFullYear(),
|
|
3345
3380
|
onSelect: (year) => updateTempDate(year),
|
|
@@ -3351,7 +3386,7 @@ function DatePicker({
|
|
|
3351
3386
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3352
3387
|
PickerColumn,
|
|
3353
3388
|
{
|
|
3354
|
-
title:
|
|
3389
|
+
title: monthLabel,
|
|
3355
3390
|
values: months,
|
|
3356
3391
|
selectedValue: tempDate.getMonth() + 1,
|
|
3357
3392
|
onSelect: (month) => updateTempDate(void 0, month),
|
|
@@ -3364,7 +3399,7 @@ function DatePicker({
|
|
|
3364
3399
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3365
3400
|
PickerColumn,
|
|
3366
3401
|
{
|
|
3367
|
-
title:
|
|
3402
|
+
title: dayLabel,
|
|
3368
3403
|
values: days,
|
|
3369
3404
|
selectedValue: tempDate.getDate(),
|
|
3370
3405
|
onSelect: (day) => updateTempDate(void 0, void 0, day),
|
|
@@ -3386,7 +3421,7 @@ function DatePicker({
|
|
|
3386
3421
|
className: "flex-1 py-2 items-center rounded-lg",
|
|
3387
3422
|
style: { backgroundColor: colors.surfaceMuted },
|
|
3388
3423
|
onPress: () => setTempDate(/* @__PURE__ */ new Date()),
|
|
3389
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(AppText, { style: { color: colors.text }, children:
|
|
3424
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(AppText, { style: { color: colors.text }, children: todayText })
|
|
3390
3425
|
}
|
|
3391
3426
|
),
|
|
3392
3427
|
minDate && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
@@ -3395,7 +3430,7 @@ function DatePicker({
|
|
|
3395
3430
|
className: "flex-1 py-2 items-center rounded-lg",
|
|
3396
3431
|
style: { backgroundColor: colors.surfaceMuted },
|
|
3397
3432
|
onPress: () => setTempDate(minDate),
|
|
3398
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(AppText, { style: { color: colors.text }, children:
|
|
3433
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(AppText, { style: { color: colors.text }, children: minDateText })
|
|
3399
3434
|
}
|
|
3400
3435
|
),
|
|
3401
3436
|
maxDate && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
@@ -3404,7 +3439,7 @@ function DatePicker({
|
|
|
3404
3439
|
className: "flex-1 py-2 items-center rounded-lg",
|
|
3405
3440
|
style: { backgroundColor: colors.surfaceMuted },
|
|
3406
3441
|
onPress: () => setTempDate(maxDate),
|
|
3407
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(AppText, { style: { color: colors.text }, children:
|
|
3442
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(AppText, { style: { color: colors.text }, children: maxDateText })
|
|
3408
3443
|
}
|
|
3409
3444
|
)
|
|
3410
3445
|
]
|
|
@@ -4418,6 +4453,7 @@ var import_react_native_safe_area_context4 = require("react-native-safe-area-con
|
|
|
4418
4453
|
|
|
4419
4454
|
// src/overlay/AppStatusBar.tsx
|
|
4420
4455
|
var import_react_native27 = require("react-native");
|
|
4456
|
+
var import_native6 = require("@react-navigation/native");
|
|
4421
4457
|
var import_jsx_runtime38 = require("nativewind/jsx-runtime");
|
|
4422
4458
|
function AppStatusBar({
|
|
4423
4459
|
barStyle = "auto",
|
|
@@ -4438,6 +4474,11 @@ function AppStatusBar({
|
|
|
4438
4474
|
}
|
|
4439
4475
|
);
|
|
4440
4476
|
}
|
|
4477
|
+
function AppFocusedStatusBar(props) {
|
|
4478
|
+
const isFocused = (0, import_native6.useIsFocused)();
|
|
4479
|
+
if (!isFocused) return null;
|
|
4480
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(AppStatusBar, { ...props });
|
|
4481
|
+
}
|
|
4441
4482
|
|
|
4442
4483
|
// src/overlay/loading/provider.tsx
|
|
4443
4484
|
var import_react38 = require("react");
|
|
@@ -4777,12 +4818,14 @@ var import_react_native_safe_area_context5 = require("react-native-safe-area-con
|
|
|
4777
4818
|
ActionIcons,
|
|
4778
4819
|
Alert,
|
|
4779
4820
|
AppButton,
|
|
4821
|
+
AppFocusedStatusBar,
|
|
4780
4822
|
AppHeader,
|
|
4781
4823
|
AppImage,
|
|
4782
4824
|
AppInput,
|
|
4783
4825
|
AppList,
|
|
4784
4826
|
AppPressable,
|
|
4785
4827
|
AppProvider,
|
|
4828
|
+
AppScreen,
|
|
4786
4829
|
AppScrollView,
|
|
4787
4830
|
AppStatusBar,
|
|
4788
4831
|
AppText,
|
|
@@ -4807,7 +4850,6 @@ var import_react_native_safe_area_context5 = require("react-native-safe-area-con
|
|
|
4807
4850
|
NavigationIcons,
|
|
4808
4851
|
NavigationProvider,
|
|
4809
4852
|
OverlayProvider,
|
|
4810
|
-
Page,
|
|
4811
4853
|
PageDrawer,
|
|
4812
4854
|
Progress,
|
|
4813
4855
|
Radio,
|