@elvora/react-native 1.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +40 -0
  3. package/dist/index.cjs +5785 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.d.cts +1253 -0
  6. package/dist/index.d.ts +1253 -0
  7. package/dist/index.js +5683 -0
  8. package/dist/index.js.map +1 -0
  9. package/package.json +88 -0
  10. package/src/Accordion.tsx +11 -0
  11. package/src/Affix.tsx +20 -0
  12. package/src/Alert.tsx +102 -0
  13. package/src/Anchor.tsx +58 -0
  14. package/src/AutoComplete.tsx +122 -0
  15. package/src/Avatar.tsx +58 -0
  16. package/src/BackTop.tsx +71 -0
  17. package/src/Backdrop.tsx +32 -0
  18. package/src/Badge.tsx +87 -0
  19. package/src/Box.tsx +67 -0
  20. package/src/Breadcrumb.tsx +46 -0
  21. package/src/Button.test.tsx +39 -0
  22. package/src/Button.tsx +127 -0
  23. package/src/ButtonGroup.tsx +74 -0
  24. package/src/Calendar.tsx +165 -0
  25. package/src/Card.tsx +69 -0
  26. package/src/Carousel.tsx +99 -0
  27. package/src/Cascader.tsx +160 -0
  28. package/src/Checkbox.tsx +85 -0
  29. package/src/ChipInput.tsx +130 -0
  30. package/src/Collapse.tsx +120 -0
  31. package/src/ColorPicker.tsx +114 -0
  32. package/src/Container.tsx +22 -0
  33. package/src/DataGrid.tsx +170 -0
  34. package/src/DatePicker.tsx +195 -0
  35. package/src/DateRangePicker.tsx +249 -0
  36. package/src/Descriptions.tsx +98 -0
  37. package/src/Divider.tsx +32 -0
  38. package/src/Drawer.tsx +103 -0
  39. package/src/Dropdown.tsx +15 -0
  40. package/src/ElvoraProvider.tsx +31 -0
  41. package/src/Empty.tsx +34 -0
  42. package/src/FloatButton.tsx +78 -0
  43. package/src/Form.tsx +119 -0
  44. package/src/Grid.tsx +68 -0
  45. package/src/Icon.tsx +49 -0
  46. package/src/IconButton.tsx +28 -0
  47. package/src/Image.tsx +68 -0
  48. package/src/ImageList.tsx +58 -0
  49. package/src/Input.tsx +87 -0
  50. package/src/Label.tsx +46 -0
  51. package/src/List.tsx +82 -0
  52. package/src/Mentions.tsx +148 -0
  53. package/src/Menu.tsx +77 -0
  54. package/src/Modal.tsx +114 -0
  55. package/src/NumberInput.tsx +156 -0
  56. package/src/Pagination.tsx +148 -0
  57. package/src/PaginationVariants.tsx +64 -0
  58. package/src/Popover.tsx +74 -0
  59. package/src/ProForm.tsx +219 -0
  60. package/src/ProLayout.tsx +151 -0
  61. package/src/ProTable.tsx +91 -0
  62. package/src/Progress.tsx +92 -0
  63. package/src/QRCode.tsx +65 -0
  64. package/src/Radio.tsx +98 -0
  65. package/src/Rate.tsx +66 -0
  66. package/src/Result.tsx +64 -0
  67. package/src/Segmented.tsx +75 -0
  68. package/src/Select.tsx +146 -0
  69. package/src/Skeleton.tsx +49 -0
  70. package/src/Slider.tsx +122 -0
  71. package/src/SpeedDial.tsx +87 -0
  72. package/src/Spinner.tsx +29 -0
  73. package/src/Splitter.tsx +91 -0
  74. package/src/Stack.tsx +38 -0
  75. package/src/Statistic.tsx +60 -0
  76. package/src/Stepper.tsx +113 -0
  77. package/src/Steps.tsx +146 -0
  78. package/src/Switch.tsx +52 -0
  79. package/src/Table.tsx +178 -0
  80. package/src/Tabs.tsx +122 -0
  81. package/src/Tag.tsx +83 -0
  82. package/src/Textarea.tsx +22 -0
  83. package/src/TimePicker.tsx +187 -0
  84. package/src/Timeline.tsx +92 -0
  85. package/src/Toast.tsx +140 -0
  86. package/src/ToggleButton.tsx +66 -0
  87. package/src/Tooltip.tsx +56 -0
  88. package/src/Tour.tsx +118 -0
  89. package/src/Transfer.tsx +219 -0
  90. package/src/Tree.tsx +144 -0
  91. package/src/TreeSelect.tsx +221 -0
  92. package/src/Upload.tsx +109 -0
  93. package/src/Watermark.tsx +76 -0
  94. package/src/index.ts +221 -0
  95. package/src/smoke.test.tsx +113 -0
  96. package/src/test/react-native-stub.tsx +413 -0
  97. package/src/test/react-native-svg-stub.tsx +33 -0
  98. package/src/test/setup.ts +7 -0
@@ -0,0 +1,1253 @@
1
+ import * as react from 'react';
2
+ import { ReactNode, ReactElement, RefObject } from 'react';
3
+ import { ElvoraTheme, Direction, ButtonOwnProps, InputOwnProps, Orientation, ElvoraSize, ElvoraStatus, ElvoraTone, Placement, ErrorCorrection } from '@elvora/core';
4
+ export { Direction, ElvoraSize, ElvoraStatus, ElvoraTheme, ElvoraTone, ElvoraVariant, IntentScale, Orientation, Placement, ThemeColors } from '@elvora/core';
5
+ import { PressableProps, GestureResponderEvent, StyleProp, ViewStyle, TextStyle, View, TextInputProps, TextInput, ImageSourcePropType, ViewProps, FlexAlignType, ScrollView, ImageProps as ImageProps$1, ImageStyle } from 'react-native';
6
+ import { IconName } from '@elvora/icons';
7
+
8
+ interface ElvoraContextValue {
9
+ theme: ElvoraTheme;
10
+ direction: Direction;
11
+ }
12
+ interface ElvoraProviderProps {
13
+ theme?: ElvoraTheme;
14
+ direction?: Direction;
15
+ children: ReactNode;
16
+ }
17
+ declare function ElvoraProvider({ theme, direction, children }: ElvoraProviderProps): react.JSX.Element;
18
+ declare function useElvoraContext(): ElvoraContextValue;
19
+ declare function useTheme(): ElvoraTheme;
20
+
21
+ interface ButtonProps extends ButtonOwnProps, Omit<PressableProps, 'children' | 'disabled' | 'style'> {
22
+ children?: ReactNode;
23
+ leftIcon?: ReactNode;
24
+ rightIcon?: ReactNode;
25
+ onPress?: (event: GestureResponderEvent) => void;
26
+ style?: StyleProp<ViewStyle>;
27
+ textStyle?: StyleProp<TextStyle>;
28
+ }
29
+ /**
30
+ * React Native Button. Same headless contract as the web Button, rendered
31
+ * with `Pressable`. Identical variants/sizes/states.
32
+ */
33
+ declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<View>>;
34
+
35
+ interface IconButtonProps extends Omit<ButtonProps, 'children' | 'leftIcon' | 'rightIcon'> {
36
+ icon: ReactNode;
37
+ /** Required: announce icon-only button to screen readers. */
38
+ accessibilityLabel: string;
39
+ }
40
+ declare const IconButton: react.ForwardRefExoticComponent<IconButtonProps & react.RefAttributes<View>>;
41
+
42
+ interface InputProps extends InputOwnProps, Omit<TextInputProps, 'editable' | 'style'> {
43
+ style?: StyleProp<ViewStyle>;
44
+ }
45
+ /** React Native text input with Elvora styling. */
46
+ declare const Input: react.ForwardRefExoticComponent<InputProps & react.RefAttributes<TextInput>>;
47
+
48
+ interface TextareaProps extends InputProps {
49
+ rows?: number;
50
+ }
51
+ /** Multi-line input. Sets `multiline` and numberOfLines on the RN TextInput. */
52
+ declare const Textarea: react.ForwardRefExoticComponent<TextareaProps & react.RefAttributes<TextInput>>;
53
+
54
+ interface CheckboxProps extends Omit<PressableProps, 'onPress' | 'children'> {
55
+ size?: 'sm' | 'md' | 'lg';
56
+ isDisabled?: boolean;
57
+ isInvalid?: boolean;
58
+ isChecked?: boolean;
59
+ defaultChecked?: boolean;
60
+ isIndeterminate?: boolean;
61
+ onChange?: (checked: boolean) => void;
62
+ children?: ReactNode;
63
+ style?: StyleProp<ViewStyle>;
64
+ }
65
+ declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.RefAttributes<View>>;
66
+
67
+ interface RadioGroupProps {
68
+ name: string;
69
+ value?: string;
70
+ defaultValue?: string;
71
+ onChange?: (value: string) => void;
72
+ isDisabled?: boolean;
73
+ size?: 'sm' | 'md' | 'lg';
74
+ label?: string;
75
+ children?: ReactNode;
76
+ style?: StyleProp<ViewStyle>;
77
+ }
78
+ declare function RadioGroup(props: RadioGroupProps): react.JSX.Element;
79
+ interface RadioProps extends Omit<PressableProps, 'onPress' | 'children'> {
80
+ value: string;
81
+ isDisabled?: boolean;
82
+ children?: ReactNode;
83
+ style?: StyleProp<ViewStyle>;
84
+ }
85
+ declare const Radio: react.ForwardRefExoticComponent<RadioProps & react.RefAttributes<View>>;
86
+
87
+ interface SwitchProps extends Omit<PressableProps, 'onPress' | 'children'> {
88
+ isDisabled?: boolean;
89
+ isChecked?: boolean;
90
+ defaultChecked?: boolean;
91
+ onChange?: (checked: boolean) => void;
92
+ children?: ReactNode;
93
+ style?: StyleProp<ViewStyle>;
94
+ }
95
+ declare const Switch: react.ForwardRefExoticComponent<SwitchProps & react.RefAttributes<View>>;
96
+
97
+ interface SelectOption {
98
+ label: string;
99
+ value: string;
100
+ disabled?: boolean;
101
+ }
102
+ interface SelectProps extends InputOwnProps {
103
+ options: SelectOption[];
104
+ value?: string;
105
+ defaultValue?: string;
106
+ onChange?: (value: string) => void;
107
+ placeholder?: string;
108
+ style?: StyleProp<ViewStyle>;
109
+ }
110
+ /**
111
+ * React Native Select. Opens a modal sheet with the option list — the most
112
+ * platform-appropriate variant for cross-platform consistency.
113
+ */
114
+ declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<View>>;
115
+
116
+ interface LabelProps {
117
+ isRequired?: boolean;
118
+ size?: 'xs' | 'sm' | 'md' | 'lg';
119
+ children?: ReactNode;
120
+ style?: StyleProp<ViewStyle>;
121
+ textStyle?: StyleProp<TextStyle>;
122
+ }
123
+ /** Form label for React Native. */
124
+ declare const Label: react.ForwardRefExoticComponent<LabelProps & react.RefAttributes<View>>;
125
+
126
+ interface IconProps {
127
+ /** Icon name from `@elvora/icons`. */
128
+ name: IconName;
129
+ /** Pixel size for both width/height. Defaults to 16. */
130
+ size?: number;
131
+ /** Stroke or fill color. Defaults to `currentColor`-equivalent (black). */
132
+ color?: string;
133
+ /** Accessible label. When omitted, the icon is treated as decorative. */
134
+ label?: string;
135
+ }
136
+ /**
137
+ * Renders an icon from the Elvora icon set using `react-native-svg`. Install
138
+ * `react-native-svg` in your app for this to work.
139
+ */
140
+ declare const Icon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<unknown>>;
141
+
142
+ interface DividerProps {
143
+ orientation?: Orientation;
144
+ thickness?: number;
145
+ children?: ReactNode;
146
+ style?: StyleProp<ViewStyle>;
147
+ }
148
+ /** Visual separator for React Native. */
149
+ declare const Divider: react.ForwardRefExoticComponent<DividerProps & react.RefAttributes<View>>;
150
+
151
+ interface AvatarProps {
152
+ src?: string | ImageSourcePropType;
153
+ alt?: string;
154
+ name?: string;
155
+ size?: ElvoraSize;
156
+ shape?: 'circle' | 'square';
157
+ fallback?: ReactNode;
158
+ style?: StyleProp<ViewStyle>;
159
+ }
160
+ declare const Avatar: react.ForwardRefExoticComponent<AvatarProps & react.RefAttributes<View>>;
161
+
162
+ interface BadgeProps {
163
+ status?: ElvoraStatus;
164
+ size?: Exclude<ElvoraSize, 'xl'>;
165
+ tone?: ElvoraTone;
166
+ isDot?: boolean;
167
+ children?: ReactNode;
168
+ style?: StyleProp<ViewStyle>;
169
+ }
170
+ declare const Badge: react.ForwardRefExoticComponent<BadgeProps & react.RefAttributes<View>>;
171
+
172
+ interface TagProps {
173
+ status?: ElvoraStatus;
174
+ size?: Exclude<ElvoraSize, 'xl'>;
175
+ tone?: ElvoraTone;
176
+ onClose?: () => void;
177
+ closeLabel?: string;
178
+ children?: ReactNode;
179
+ style?: StyleProp<ViewStyle>;
180
+ }
181
+ declare const Tag: react.ForwardRefExoticComponent<TagProps & react.RefAttributes<View>>;
182
+
183
+ interface SpinnerProps {
184
+ size?: ElvoraSize | number;
185
+ color?: string;
186
+ /** Accessible label. */
187
+ label?: string;
188
+ style?: StyleProp<ViewStyle>;
189
+ }
190
+ declare const Spinner: react.ForwardRefExoticComponent<SpinnerProps & react.RefAttributes<View>>;
191
+
192
+ interface ProgressProps {
193
+ value?: number;
194
+ max?: number;
195
+ min?: number;
196
+ size?: Exclude<ElvoraSize, 'xl'>;
197
+ status?: ElvoraStatus;
198
+ label?: string;
199
+ style?: StyleProp<ViewStyle>;
200
+ }
201
+ declare const Progress: react.ForwardRefExoticComponent<ProgressProps & react.RefAttributes<View>>;
202
+
203
+ interface TooltipProps {
204
+ label: ReactNode;
205
+ placement?: Placement;
206
+ /** Single child element. On long-press, the tooltip opens; tap dismisses. */
207
+ children: ReactElement;
208
+ style?: StyleProp<ViewStyle>;
209
+ }
210
+ /**
211
+ * React Native Tooltip — opens on long-press with a centered overlay (most
212
+ * accessible cross-platform pattern; mobile has no hover state). For
213
+ * positioning relative to the trigger, use a dedicated popover library.
214
+ */
215
+ declare function Tooltip({ label, children, style }: TooltipProps): react.JSX.Element;
216
+
217
+ interface BoxProps extends ViewProps {
218
+ p?: number;
219
+ px?: number;
220
+ py?: number;
221
+ pt?: number;
222
+ pr?: number;
223
+ pb?: number;
224
+ pl?: number;
225
+ m?: number;
226
+ mx?: number;
227
+ my?: number;
228
+ mt?: number;
229
+ mr?: number;
230
+ mb?: number;
231
+ ml?: number;
232
+ w?: number | string;
233
+ h?: number | string;
234
+ bg?: string;
235
+ rounded?: number;
236
+ shadow?: ViewStyle;
237
+ }
238
+ /** Box — universal layout primitive for RN. Accepts shorthand style props. */
239
+ declare const Box: react.ForwardRefExoticComponent<BoxProps & react.RefAttributes<View>>;
240
+
241
+ interface StackProps extends ViewProps {
242
+ direction?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
243
+ gap?: number;
244
+ align?: FlexAlignType;
245
+ justify?: ViewStyle['justifyContent'];
246
+ wrap?: boolean;
247
+ }
248
+ /** Stack — flex container for RN. */
249
+ declare const Stack: react.ForwardRefExoticComponent<StackProps & react.RefAttributes<View>>;
250
+ declare const HStack: react.ForwardRefExoticComponent<Omit<StackProps, "direction"> & react.RefAttributes<View>>;
251
+ declare const VStack: react.ForwardRefExoticComponent<Omit<StackProps, "direction"> & react.RefAttributes<View>>;
252
+
253
+ interface GridProps extends ViewProps {
254
+ /** Number of columns. */
255
+ columns?: number;
256
+ /** Gap between cells. */
257
+ gap?: number;
258
+ children?: ReactNode;
259
+ }
260
+ interface GridItemProps extends ViewProps {
261
+ /** Number of columns this item spans. */
262
+ colSpan?: number;
263
+ children?: ReactNode;
264
+ }
265
+ /**
266
+ * Grid — simulates CSS Grid by laying out children in equal-width columns via
267
+ * flexbox rows. Pure React Native (no native grid module needed).
268
+ */
269
+ declare const Grid: react.ForwardRefExoticComponent<GridProps & react.RefAttributes<View>>;
270
+ /** GridItem — the colSpan is read by the parent Grid. */
271
+ declare const GridItem: react.ForwardRefExoticComponent<GridItemProps & react.RefAttributes<View>>;
272
+
273
+ interface ContainerProps extends ViewProps {
274
+ maxWidth?: number;
275
+ padding?: number;
276
+ children?: ReactNode;
277
+ }
278
+ /** Container — centered, max-width container for RN. */
279
+ declare const Container: react.ForwardRefExoticComponent<ContainerProps & react.RefAttributes<View>>;
280
+
281
+ interface CardProps extends ViewProps {
282
+ variant?: 'outline' | 'elevated' | 'filled';
283
+ padding?: number;
284
+ children?: ReactNode;
285
+ }
286
+ /** Card — content container for RN. */
287
+ declare const Card: react.ForwardRefExoticComponent<CardProps & react.RefAttributes<View>>;
288
+ declare const CardHeader: react.ForwardRefExoticComponent<ViewProps & react.RefAttributes<View>>;
289
+ declare const CardBody: react.ForwardRefExoticComponent<ViewProps & react.RefAttributes<View>>;
290
+ declare const CardFooter: react.ForwardRefExoticComponent<ViewProps & react.RefAttributes<View>>;
291
+
292
+ interface AlertProps extends ViewProps {
293
+ status?: ElvoraStatus;
294
+ tone?: ElvoraTone;
295
+ title?: ReactNode;
296
+ description?: ReactNode;
297
+ icon?: ReactNode;
298
+ onClose?: () => void;
299
+ closeLabel?: string;
300
+ }
301
+ /** Alert — banner-style feedback for RN. */
302
+ declare const Alert: react.ForwardRefExoticComponent<AlertProps & react.RefAttributes<View>>;
303
+
304
+ interface SkeletonProps extends ViewProps {
305
+ width?: number | string;
306
+ height?: number | string;
307
+ rounded?: number;
308
+ /** Animate a pulse effect. Default true. */
309
+ animated?: boolean;
310
+ }
311
+ /** Skeleton — placeholder loading block for RN. */
312
+ declare const Skeleton: react.ForwardRefExoticComponent<SkeletonProps & react.RefAttributes<View>>;
313
+
314
+ interface EmptyProps extends ViewProps {
315
+ title?: ReactNode;
316
+ description?: ReactNode;
317
+ icon?: ReactNode;
318
+ action?: ReactNode;
319
+ }
320
+ /** Empty — placeholder for empty/no-data states. */
321
+ declare const Empty: react.ForwardRefExoticComponent<EmptyProps & react.RefAttributes<View>>;
322
+
323
+ type ResultStatus = ElvoraStatus | '404' | '500' | '403';
324
+ interface ResultProps extends ViewProps {
325
+ status?: ResultStatus;
326
+ title?: ReactNode;
327
+ subtitle?: ReactNode;
328
+ icon?: ReactNode;
329
+ extra?: ReactNode;
330
+ children?: ReactNode;
331
+ }
332
+ /** Result — page-level status component for RN. */
333
+ declare const Result: react.ForwardRefExoticComponent<ResultProps & react.RefAttributes<View>>;
334
+
335
+ interface ModalProps extends Omit<ViewProps, 'children'> {
336
+ isOpen: boolean;
337
+ onClose: () => void;
338
+ title?: ReactNode;
339
+ children?: ReactNode;
340
+ footer?: ReactNode;
341
+ showCloseButton?: boolean;
342
+ closeOnOverlayPress?: boolean;
343
+ closeLabel?: string;
344
+ }
345
+ /** Modal — centered overlay dialog for RN (uses native Modal). */
346
+ declare const Modal: react.ForwardRefExoticComponent<ModalProps & react.RefAttributes<View>>;
347
+
348
+ interface DrawerProps extends Omit<ViewProps, 'children'> {
349
+ isOpen: boolean;
350
+ onClose: () => void;
351
+ placement?: 'left' | 'right' | 'top' | 'bottom';
352
+ size?: number | string;
353
+ title?: ReactNode;
354
+ children?: ReactNode;
355
+ footer?: ReactNode;
356
+ showCloseButton?: boolean;
357
+ closeOnOverlayPress?: boolean;
358
+ closeLabel?: string;
359
+ }
360
+ /** Drawer — edge-anchored overlay panel for RN. */
361
+ declare const Drawer: react.ForwardRefExoticComponent<DrawerProps & react.RefAttributes<View>>;
362
+
363
+ interface PopoverProps extends Omit<ViewProps, 'children'> {
364
+ /** The trigger element. */
365
+ trigger: ReactNode;
366
+ /** Popover content. */
367
+ children: ReactNode;
368
+ /** Controlled open. */
369
+ isOpen?: boolean;
370
+ /** Controlled change handler. */
371
+ onOpenChange?: (open: boolean) => void;
372
+ /** Where the popover anchors relative to the screen. */
373
+ placement?: 'top' | 'bottom' | 'left' | 'right' | 'center';
374
+ }
375
+ /**
376
+ * Popover — content overlay anchored to a trigger. RN doesn't expose a
377
+ * positioning API, so we use a centered modal-like sheet by default.
378
+ */
379
+ declare const Popover: react.ForwardRefExoticComponent<PopoverProps & react.RefAttributes<View>>;
380
+
381
+ interface ToastOptions {
382
+ id?: string;
383
+ status?: ElvoraStatus;
384
+ title?: ReactNode;
385
+ description?: ReactNode;
386
+ /** Duration in ms. `null` for sticky. */
387
+ duration?: number | null;
388
+ action?: ReactNode;
389
+ }
390
+ interface ToastApi {
391
+ show: (opts: ToastOptions) => string;
392
+ dismiss: (id: string) => void;
393
+ dismissAll: () => void;
394
+ }
395
+ interface ToastProviderProps {
396
+ children: ReactNode;
397
+ defaultDuration?: number;
398
+ placement?: 'top' | 'bottom';
399
+ }
400
+ /** ToastProvider — mount once at the root of the RN app. */
401
+ declare function ToastProvider({ children, defaultDuration, placement }: ToastProviderProps): react.JSX.Element;
402
+ /** useToast — must be inside ToastProvider. */
403
+ declare function useToast(): ToastApi;
404
+
405
+ interface TabsTab {
406
+ value: string;
407
+ label: ReactNode;
408
+ isDisabled?: boolean;
409
+ }
410
+ interface TabsProps extends ViewProps {
411
+ tabs: TabsTab[];
412
+ value?: string;
413
+ defaultValue?: string;
414
+ onChange?: (value: string) => void;
415
+ variant?: 'underline' | 'pill' | 'solid';
416
+ orientation?: Orientation;
417
+ /** Render function for each tab's panel content. */
418
+ renderPanel: (value: string) => ReactNode;
419
+ }
420
+ /**
421
+ * Tabs — RN-friendly tab strip + panel renderer. Doesn't need WAI-ARIA roles,
422
+ * uses native accessibility roles. Composition is data-driven rather than
423
+ * via slot components.
424
+ */
425
+ declare function Tabs(props: TabsProps): react.JSX.Element;
426
+
427
+ interface MenuItem {
428
+ value: string;
429
+ label: string;
430
+ isDisabled?: boolean;
431
+ hasSeparatorBefore?: boolean;
432
+ }
433
+ interface MenuProps {
434
+ trigger: ReactNode;
435
+ items: MenuItem[];
436
+ onSelect?: (value: string) => void;
437
+ }
438
+ /**
439
+ * Menu — opens a modal sheet from the trigger. Suitable for RN because there
440
+ * is no anchored-popover API; sheet-style menus are idiomatic.
441
+ */
442
+ declare function Menu(props: MenuProps): react.JSX.Element;
443
+
444
+ interface DropdownItem extends MenuItem {
445
+ }
446
+ interface DropdownProps {
447
+ trigger: ReactNode;
448
+ items: DropdownItem[];
449
+ onSelect?: (value: string) => void;
450
+ }
451
+ /** Dropdown — alias for Menu on RN where both use a modal sheet. */
452
+ declare function Dropdown(props: DropdownProps): react.JSX.Element;
453
+
454
+ interface BreadcrumbItem {
455
+ label: string;
456
+ onPress?: () => void;
457
+ isCurrent?: boolean;
458
+ }
459
+ interface BreadcrumbProps extends ViewProps {
460
+ items: BreadcrumbItem[];
461
+ separator?: ReactNode;
462
+ }
463
+ /** Breadcrumb — navigation trail for RN. */
464
+ declare function Breadcrumb(props: BreadcrumbProps): react.JSX.Element;
465
+
466
+ interface PaginationProps extends ViewProps {
467
+ total: number;
468
+ pageSize?: number;
469
+ current?: number;
470
+ defaultCurrent?: number;
471
+ onChange?: (page: number) => void;
472
+ siblingCount?: number;
473
+ showFirstLast?: boolean;
474
+ hideOnSinglePage?: boolean;
475
+ }
476
+ /** Pagination — RN paginator. */
477
+ declare function Pagination(props: PaginationProps): react.JSX.Element | null;
478
+
479
+ interface Step {
480
+ title: ReactNode;
481
+ description?: ReactNode;
482
+ status?: 'wait' | 'process' | 'finish' | 'error';
483
+ }
484
+ interface StepsProps extends Omit<ViewProps, 'onChange'> {
485
+ steps: Step[];
486
+ current?: number;
487
+ orientation?: 'horizontal' | 'vertical';
488
+ onChange?: (index: number) => void;
489
+ }
490
+ /** Steps — multi-step progress indicator for RN. */
491
+ declare function Steps(props: StepsProps): react.JSX.Element;
492
+
493
+ interface AnchorLink {
494
+ /** Vertical scroll offset (px) for this section. */
495
+ offset: number;
496
+ label: ReactNode;
497
+ }
498
+ interface AnchorProps extends ViewProps {
499
+ links: AnchorLink[];
500
+ /** Ref to the parent ScrollView used to scroll to each section. */
501
+ scrollRef: RefObject<ScrollView>;
502
+ activeIndex?: number;
503
+ smooth?: boolean;
504
+ }
505
+ /**
506
+ * Anchor — section jumper for RN. Caller passes a ref to their parent
507
+ * `<ScrollView>` and pre-computed offsets for each section. Active highlighting
508
+ * is opt-in via `activeIndex`.
509
+ */
510
+ declare function Anchor(props: AnchorProps): react.JSX.Element;
511
+
512
+ interface BackTopProps {
513
+ /** Ref to the ScrollView this button scrolls to top. */
514
+ scrollRef: RefObject<ScrollView>;
515
+ /** Current Y offset of the parent ScrollView (caller wires up `onScroll`). */
516
+ scrollY: number;
517
+ /** Show after the user has scrolled past this offset (default 400). */
518
+ visibilityHeight?: number;
519
+ bottom?: number;
520
+ right?: number;
521
+ label?: string;
522
+ }
523
+ /**
524
+ * BackTop — floating "scroll to top" button for RN. Caller passes a ref to the
525
+ * parent ScrollView plus the current scroll offset (e.g. from `onScroll` event).
526
+ */
527
+ declare function BackTop(props: BackTopProps): react.JSX.Element | null;
528
+
529
+ interface FormProps extends ViewProps {
530
+ layout?: 'vertical' | 'horizontal';
531
+ labelWidth?: number;
532
+ children?: ReactNode;
533
+ }
534
+ /** Form — RN container that owns shared layout + per-field error state. */
535
+ declare function Form(props: FormProps): react.JSX.Element;
536
+ interface FormFieldProps extends ViewProps {
537
+ name: string;
538
+ label?: ReactNode;
539
+ hint?: ReactNode;
540
+ error?: string;
541
+ isRequired?: boolean;
542
+ children?: ReactNode;
543
+ }
544
+ declare function FormField(props: FormFieldProps): react.JSX.Element;
545
+ declare function useFormField(name: string): {
546
+ error: string | undefined;
547
+ setError: (e: string | undefined) => void;
548
+ };
549
+
550
+ interface NumberInputProps extends Omit<ViewProps, 'children'> {
551
+ value?: number | null;
552
+ defaultValue?: number | null;
553
+ onChangeValue?: (value: number | null) => void;
554
+ min?: number;
555
+ max?: number;
556
+ step?: number;
557
+ precision?: number;
558
+ isDisabled?: boolean;
559
+ isReadOnly?: boolean;
560
+ isInvalid?: boolean;
561
+ placeholder?: string;
562
+ }
563
+ declare const NumberInput: react.ForwardRefExoticComponent<NumberInputProps & react.RefAttributes<View>>;
564
+
565
+ interface SegmentedOption<V extends string = string> {
566
+ value: V;
567
+ label: ReactNode;
568
+ isDisabled?: boolean;
569
+ }
570
+ interface SegmentedProps<V extends string = string> extends ViewProps {
571
+ options: SegmentedOption<V>[];
572
+ value?: V;
573
+ defaultValue?: V;
574
+ onChange?: (value: V) => void;
575
+ size?: 'sm' | 'md' | 'lg';
576
+ isDisabled?: boolean;
577
+ }
578
+ declare function Segmented<V extends string = string>(props: SegmentedProps<V>): react.JSX.Element;
579
+
580
+ interface SliderProps extends Omit<ViewProps, 'onChange'> {
581
+ value?: number;
582
+ defaultValue?: number;
583
+ onChange?: (value: number) => void;
584
+ onChangeEnd?: (value: number) => void;
585
+ min?: number;
586
+ max?: number;
587
+ step?: number;
588
+ isDisabled?: boolean;
589
+ }
590
+ declare function Slider(props: SliderProps): react.JSX.Element;
591
+
592
+ interface RateProps extends Omit<ViewProps, 'onChange'> {
593
+ value?: number;
594
+ defaultValue?: number;
595
+ onChange?: (value: number) => void;
596
+ count?: number;
597
+ allowHalf?: boolean;
598
+ isDisabled?: boolean;
599
+ /** Custom character (string emoji or React node). Defaults to ★ */
600
+ character?: ReactNode;
601
+ size?: number;
602
+ }
603
+ declare function Rate(props: RateProps): react.JSX.Element;
604
+
605
+ interface UploadFile {
606
+ id: string;
607
+ name: string;
608
+ size?: number;
609
+ uri?: string;
610
+ status?: 'pending' | 'uploading' | 'done' | 'error';
611
+ error?: string;
612
+ }
613
+ interface UploadProps extends ViewProps {
614
+ files?: UploadFile[];
615
+ defaultFiles?: UploadFile[];
616
+ onChange?: (files: UploadFile[]) => void;
617
+ /**
618
+ * Called when the user taps the picker area. Host app is expected to launch
619
+ * the platform file picker (e.g., expo-document-picker) and add the resulting
620
+ * files via `onChange`.
621
+ */
622
+ onPick?: () => void;
623
+ description?: ReactNode;
624
+ isDisabled?: boolean;
625
+ }
626
+ declare function Upload(props: UploadProps): react.JSX.Element;
627
+ declare function makeUploadFile(name: string, opts?: Partial<UploadFile>): UploadFile;
628
+
629
+ interface AutoCompleteOption {
630
+ value: string;
631
+ label?: string;
632
+ }
633
+ interface AutoCompleteProps extends Omit<ViewProps, 'children'> {
634
+ value?: string;
635
+ defaultValue?: string;
636
+ onChangeValue?: (value: string) => void;
637
+ options?: AutoCompleteOption[];
638
+ loadOptions?: (query: string) => Promise<AutoCompleteOption[]>;
639
+ onSelectOption?: (opt: AutoCompleteOption) => void;
640
+ placeholder?: string;
641
+ isDisabled?: boolean;
642
+ }
643
+ declare function AutoComplete(props: AutoCompleteProps): react.JSX.Element;
644
+
645
+ interface ColorPickerProps extends Omit<ViewProps, 'onChange'> {
646
+ value?: string;
647
+ defaultValue?: string;
648
+ onChange?: (hex: string) => void;
649
+ presets?: string[];
650
+ isDisabled?: boolean;
651
+ /** Custom trigger node (otherwise a swatch button is rendered). */
652
+ trigger?: ReactNode;
653
+ }
654
+ declare function ColorPicker(props: ColorPickerProps): react.JSX.Element;
655
+
656
+ type DateValue = Date | null;
657
+ interface DatePickerProps extends Omit<ViewProps, 'onChange'> {
658
+ value?: DateValue;
659
+ defaultValue?: DateValue;
660
+ onChange?: (value: DateValue) => void;
661
+ min?: Date;
662
+ max?: Date;
663
+ placeholder?: string;
664
+ isDisabled?: boolean;
665
+ weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
666
+ format?: (d: Date) => string;
667
+ }
668
+ declare function DatePicker(props: DatePickerProps): react.JSX.Element;
669
+
670
+ interface TimeValue {
671
+ hours: number;
672
+ minutes: number;
673
+ seconds?: number;
674
+ }
675
+ interface TimePickerProps extends Omit<ViewProps, 'onChange'> {
676
+ value?: TimeValue | null;
677
+ defaultValue?: TimeValue | null;
678
+ onChange?: (value: TimeValue | null) => void;
679
+ showSeconds?: boolean;
680
+ use12Hours?: boolean;
681
+ minuteStep?: number;
682
+ placeholder?: string;
683
+ isDisabled?: boolean;
684
+ }
685
+ declare function TimePicker(props: TimePickerProps): react.JSX.Element;
686
+
687
+ interface DateRange {
688
+ start: Date | null;
689
+ end: Date | null;
690
+ }
691
+ interface DateRangePickerProps extends Omit<ViewProps, 'onChange'> {
692
+ value?: DateRange;
693
+ defaultValue?: DateRange;
694
+ onChange?: (value: DateRange) => void;
695
+ min?: Date;
696
+ max?: Date;
697
+ isDisabled?: boolean;
698
+ format?: (d: Date) => string;
699
+ weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
700
+ placeholder?: {
701
+ start?: string;
702
+ end?: string;
703
+ };
704
+ }
705
+ declare function DateRangePicker(props: DateRangePickerProps): react.JSX.Element;
706
+
707
+ interface CascaderOption {
708
+ value: string;
709
+ label: ReactNode;
710
+ children?: CascaderOption[];
711
+ isDisabled?: boolean;
712
+ }
713
+ interface CascaderProps extends Omit<ViewProps, 'onChange'> {
714
+ options: CascaderOption[];
715
+ value?: string[];
716
+ defaultValue?: string[];
717
+ onChange?: (value: string[], path: CascaderOption[]) => void;
718
+ placeholder?: string;
719
+ displaySeparator?: string;
720
+ isDisabled?: boolean;
721
+ }
722
+ declare function Cascader(props: CascaderProps): react.JSX.Element;
723
+
724
+ interface TreeNode$1 {
725
+ value: string;
726
+ label: ReactNode;
727
+ children?: TreeNode$1[];
728
+ isDisabled?: boolean;
729
+ }
730
+ interface TreeSelectProps extends Omit<ViewProps, 'onChange'> {
731
+ options: TreeNode$1[];
732
+ value?: string | string[];
733
+ defaultValue?: string | string[];
734
+ onChange?: (value: string | string[]) => void;
735
+ multiple?: boolean;
736
+ placeholder?: string;
737
+ defaultExpanded?: string[];
738
+ isDisabled?: boolean;
739
+ }
740
+ declare function TreeSelect(props: TreeSelectProps): react.JSX.Element;
741
+
742
+ interface MentionItem {
743
+ value: string;
744
+ label?: string;
745
+ }
746
+ interface MentionsProps extends Omit<ViewProps, 'children'> {
747
+ value?: string;
748
+ defaultValue?: string;
749
+ onChangeText?: (v: string) => void;
750
+ options?: MentionItem[];
751
+ loadOptions?: (query: string) => Promise<MentionItem[]>;
752
+ trigger?: string;
753
+ isDisabled?: boolean;
754
+ textInputProps?: Omit<TextInputProps, 'value' | 'onChangeText'>;
755
+ }
756
+ declare function Mentions(props: MentionsProps): react.JSX.Element;
757
+
758
+ interface TransferItem {
759
+ key: string;
760
+ label: ReactNode;
761
+ isDisabled?: boolean;
762
+ }
763
+ interface TransferProps extends Omit<ViewProps, 'onChange'> {
764
+ dataSource: TransferItem[];
765
+ value?: string[];
766
+ defaultValue?: string[];
767
+ onChange?: (targetKeys: string[]) => void;
768
+ titles?: [ReactNode, ReactNode];
769
+ showSearch?: boolean;
770
+ isDisabled?: boolean;
771
+ }
772
+ declare function Transfer(props: TransferProps): react.JSX.Element;
773
+
774
+ type SortOrder = 'asc' | 'desc' | null;
775
+ interface TableColumn<Row = Record<string, unknown>> {
776
+ key: string;
777
+ title: ReactNode;
778
+ dataIndex?: keyof Row | string;
779
+ render?: (value: unknown, row: Row, index: number) => ReactNode;
780
+ sortable?: boolean;
781
+ sorter?: (a: Row, b: Row) => number;
782
+ width?: number;
783
+ align?: 'left' | 'center' | 'right';
784
+ }
785
+ interface TableProps<Row = Record<string, unknown>> extends Omit<ViewProps, 'children'> {
786
+ columns: TableColumn<Row>[];
787
+ dataSource: Row[];
788
+ rowKey?: keyof Row | ((row: Row, index: number) => string | number);
789
+ size?: 'sm' | 'md' | 'lg';
790
+ bordered?: boolean;
791
+ striped?: boolean;
792
+ emptyState?: ReactNode;
793
+ onRowPress?: (row: Row, index: number) => void;
794
+ }
795
+ declare function Table<Row extends Record<string, unknown>>(props: TableProps<Row>): react.JSX.Element;
796
+
797
+ interface TreeNode {
798
+ key: string;
799
+ label: ReactNode;
800
+ children?: TreeNode[];
801
+ isDisabled?: boolean;
802
+ }
803
+ interface TreeProps extends Omit<ViewProps, 'onSelect'> {
804
+ treeData: TreeNode[];
805
+ expandedKeys?: string[];
806
+ defaultExpandedKeys?: string[];
807
+ onExpand?: (keys: string[]) => void;
808
+ selectedKeys?: string[];
809
+ defaultSelectedKeys?: string[];
810
+ onSelect?: (keys: string[], info: {
811
+ node: TreeNode;
812
+ }) => void;
813
+ multiple?: boolean;
814
+ }
815
+ declare function Tree(props: TreeProps): react.JSX.Element;
816
+
817
+ interface ListProps<Item = unknown> extends Omit<ViewProps, 'children'> {
818
+ dataSource: Item[];
819
+ renderItem: (item: Item, index: number) => ReactNode;
820
+ itemKey?: keyof Item | ((item: Item, index: number) => string | number);
821
+ header?: ReactNode;
822
+ footer?: ReactNode;
823
+ bordered?: boolean;
824
+ size?: 'sm' | 'md' | 'lg';
825
+ divided?: boolean;
826
+ emptyState?: ReactNode;
827
+ }
828
+ declare function List<Item>(props: ListProps<Item>): react.JSX.Element;
829
+
830
+ interface DescriptionItem {
831
+ key: string;
832
+ label: ReactNode;
833
+ children: ReactNode;
834
+ span?: number;
835
+ }
836
+ interface DescriptionsProps extends Omit<ViewProps, 'children'> {
837
+ items: DescriptionItem[];
838
+ title?: ReactNode;
839
+ layout?: 'horizontal' | 'vertical';
840
+ bordered?: boolean;
841
+ size?: 'sm' | 'md' | 'lg';
842
+ }
843
+ declare function Descriptions(props: DescriptionsProps): react.JSX.Element;
844
+
845
+ interface CalendarProps extends Omit<ViewProps, 'children'> {
846
+ value?: Date;
847
+ defaultValue?: Date;
848
+ onChange?: (date: Date) => void;
849
+ viewMonth?: Date;
850
+ onViewMonthChange?: (date: Date) => void;
851
+ dateCellRender?: (date: Date) => ReactNode;
852
+ isDateDisabled?: (date: Date) => boolean;
853
+ weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
854
+ locale?: string;
855
+ }
856
+ declare function Calendar(props: CalendarProps): react.JSX.Element;
857
+
858
+ interface StatisticProps extends ViewProps {
859
+ title?: ReactNode;
860
+ value: number | string;
861
+ precision?: number;
862
+ prefix?: ReactNode;
863
+ suffix?: ReactNode;
864
+ groupSeparator?: boolean;
865
+ tone?: 'default' | 'success' | 'danger' | 'warning' | 'primary';
866
+ }
867
+ declare function Statistic(props: StatisticProps): react.JSX.Element;
868
+
869
+ interface CarouselProps extends Omit<ViewProps, 'onChange'> {
870
+ items: ReactNode[];
871
+ current?: number;
872
+ defaultCurrent?: number;
873
+ onChange?: (index: number) => void;
874
+ autoplay?: number;
875
+ dots?: boolean;
876
+ loop?: boolean;
877
+ height?: number;
878
+ width?: number;
879
+ }
880
+ declare function Carousel(props: CarouselProps): react.JSX.Element;
881
+
882
+ interface ImageProps extends Omit<ImageProps$1, 'source' | 'style'> {
883
+ src: string;
884
+ fallback?: string;
885
+ placeholder?: ReactNode;
886
+ /** Enable tap-to-preview overlay. */
887
+ preview?: boolean;
888
+ width?: number;
889
+ height?: number;
890
+ fit?: 'cover' | 'contain' | 'stretch' | 'center';
891
+ rounded?: boolean;
892
+ style?: ImageStyle;
893
+ }
894
+ declare function Image(props: ImageProps): react.JSX.Element;
895
+
896
+ type TimelineItemStatus = 'default' | 'success' | 'danger' | 'warning' | 'info' | 'primary';
897
+ interface TimelineItem {
898
+ key: string;
899
+ children: ReactNode;
900
+ label?: ReactNode;
901
+ status?: TimelineItemStatus;
902
+ dot?: ReactNode;
903
+ }
904
+ interface TimelineProps extends Omit<ViewProps, 'children'> {
905
+ items: TimelineItem[];
906
+ pending?: ReactNode;
907
+ reverse?: boolean;
908
+ }
909
+ declare function Timeline(props: TimelineProps): react.JSX.Element;
910
+
911
+ interface CollapseItem {
912
+ key: string;
913
+ header: ReactNode;
914
+ children: ReactNode;
915
+ extra?: ReactNode;
916
+ isDisabled?: boolean;
917
+ }
918
+ interface CollapseProps extends Omit<ViewProps, 'children' | 'onChange'> {
919
+ items: CollapseItem[];
920
+ activeKeys?: string[];
921
+ defaultActiveKeys?: string[];
922
+ onChange?: (keys: string[]) => void;
923
+ accordion?: boolean;
924
+ bordered?: boolean;
925
+ size?: 'sm' | 'md' | 'lg';
926
+ }
927
+ declare function Collapse(props: CollapseProps): react.JSX.Element;
928
+
929
+ interface AccordionItem extends CollapseItem {
930
+ }
931
+ interface AccordionProps extends Omit<CollapseProps, 'accordion' | 'items'> {
932
+ items: AccordionItem[];
933
+ }
934
+ declare function Accordion(props: AccordionProps): react.JSX.Element;
935
+
936
+ interface TourStep {
937
+ title: ReactNode;
938
+ description?: ReactNode;
939
+ nextLabel?: ReactNode;
940
+ prevLabel?: ReactNode;
941
+ }
942
+ interface TourProps {
943
+ open?: boolean;
944
+ defaultOpen?: boolean;
945
+ steps: TourStep[];
946
+ current?: number;
947
+ defaultCurrent?: number;
948
+ onChange?: (index: number) => void;
949
+ onClose?: () => void;
950
+ finishLabel?: ReactNode;
951
+ }
952
+ /**
953
+ * Tour (native) — full-screen modal walkthrough. The web variant supports a
954
+ * spotlight on a DOM element; on native we render each step in a centered
955
+ * card since there is no DOM to highlight by selector.
956
+ */
957
+ declare function Tour(props: TourProps): react.JSX.Element | null;
958
+
959
+ interface FloatButtonProps {
960
+ icon?: ReactNode;
961
+ label?: string;
962
+ size?: number;
963
+ right?: number;
964
+ bottom?: number;
965
+ tone?: 'primary' | 'neutral' | 'danger' | 'success';
966
+ extended?: boolean;
967
+ onPress?: () => void;
968
+ isDisabled?: boolean;
969
+ accessibilityLabel?: string;
970
+ style?: ViewStyle;
971
+ }
972
+ declare function FloatButton(props: FloatButtonProps): react.JSX.Element;
973
+
974
+ interface WatermarkProps extends ViewProps {
975
+ content: string;
976
+ color?: string;
977
+ rotate?: number;
978
+ gapX?: number;
979
+ gapY?: number;
980
+ fontSize?: number;
981
+ children?: ReactNode;
982
+ }
983
+ /**
984
+ * Watermark — repeats text diagonally across the children. Implemented with a
985
+ * grid of `<Text>` nodes since RN doesn't expose CSS background patterns.
986
+ */
987
+ declare function Watermark(props: WatermarkProps): react.JSX.Element;
988
+
989
+ interface QRCodeProps {
990
+ value: string;
991
+ size?: number;
992
+ level?: ErrorCorrection;
993
+ foreground?: string;
994
+ background?: string;
995
+ /** Optional centered node (e.g. logo). Should be roughly 18% of `size`. */
996
+ icon?: ReactNode;
997
+ style?: ViewStyle;
998
+ }
999
+ /**
1000
+ * QRCode — renders a QR code as a stacked grid of `View` cells. Pure RN, no
1001
+ * native deps. For very large codes consider rendering on the JS side and
1002
+ * passing through `react-native-svg` for sharper printing.
1003
+ */
1004
+ declare function QRCode(props: QRCodeProps): react.JSX.Element;
1005
+
1006
+ interface SplitterProps {
1007
+ first: ReactNode;
1008
+ second: ReactNode;
1009
+ direction?: 'horizontal' | 'vertical';
1010
+ /** Controlled split (0..1). */
1011
+ split?: number;
1012
+ defaultSplit?: number;
1013
+ onChange?: (split: number) => void;
1014
+ minRatio?: number;
1015
+ maxRatio?: number;
1016
+ handleSize?: number;
1017
+ style?: ViewStyle;
1018
+ }
1019
+ /**
1020
+ * Splitter — drag-to-resize layout for two panes. Horizontal direction stacks
1021
+ * left/right; vertical stacks top/bottom.
1022
+ */
1023
+ declare function Splitter(props: SplitterProps): react.JSX.Element;
1024
+
1025
+ interface AffixProps extends ViewProps {
1026
+ /** No-op on RN — use sticky list headers instead. Pass-through wrapper. */
1027
+ offsetTop?: number;
1028
+ offsetBottom?: number;
1029
+ onChange?: (affixed: boolean) => void;
1030
+ children?: ReactNode;
1031
+ }
1032
+ /**
1033
+ * Affix — on React Native there is no global scroll viewport so this is a
1034
+ * pass-through wrapper. For sticky list headers use `FlatList`'s
1035
+ * `stickyHeaderIndices` or `ScrollView`'s `stickyHeaderIndices` directly.
1036
+ */
1037
+ declare function Affix(props: AffixProps): react.JSX.Element;
1038
+
1039
+ interface SpeedDialAction {
1040
+ key: string;
1041
+ icon: ReactNode;
1042
+ label: string;
1043
+ onPress?: () => void;
1044
+ isDisabled?: boolean;
1045
+ }
1046
+ interface SpeedDialProps {
1047
+ icon: ReactNode;
1048
+ actions: SpeedDialAction[];
1049
+ right?: number;
1050
+ bottom?: number;
1051
+ open?: boolean;
1052
+ defaultOpen?: boolean;
1053
+ onOpenChange?: (open: boolean) => void;
1054
+ accessibilityLabel?: string;
1055
+ }
1056
+ declare function SpeedDial(props: SpeedDialProps): react.JSX.Element;
1057
+
1058
+ interface BackdropProps {
1059
+ open: boolean;
1060
+ onClose?: () => void;
1061
+ tint?: string;
1062
+ invisible?: boolean;
1063
+ children?: ReactNode;
1064
+ }
1065
+ declare function Backdrop(props: BackdropProps): react.JSX.Element | null;
1066
+
1067
+ interface ImageListItem {
1068
+ key: string;
1069
+ src?: string;
1070
+ alt?: string;
1071
+ node?: ReactNode;
1072
+ caption?: ReactNode;
1073
+ }
1074
+ interface ImageListProps {
1075
+ items: ImageListItem[];
1076
+ cols?: number;
1077
+ gap?: number;
1078
+ rowHeight?: number;
1079
+ style?: ViewStyle;
1080
+ }
1081
+ declare function ImageList(props: ImageListProps): react.JSX.Element;
1082
+
1083
+ interface SimplePaginationProps extends ViewProps {
1084
+ total: number;
1085
+ pageSize?: number;
1086
+ current?: number;
1087
+ defaultCurrent?: number;
1088
+ onChange?: (page: number) => void;
1089
+ }
1090
+ declare function SimplePagination(props: SimplePaginationProps): react.JSX.Element;
1091
+ interface MiniPaginationProps extends SimplePaginationProps {
1092
+ }
1093
+ declare function MiniPagination(props: MiniPaginationProps): react.JSX.Element;
1094
+
1095
+ interface StepperStep {
1096
+ key: string;
1097
+ label: ReactNode;
1098
+ description?: ReactNode;
1099
+ content?: ReactNode;
1100
+ optional?: boolean;
1101
+ }
1102
+ interface StepperProps extends Omit<ViewProps, 'children'> {
1103
+ steps: StepperStep[];
1104
+ active?: number;
1105
+ defaultActive?: number;
1106
+ onChange?: (index: number) => void;
1107
+ orientation?: 'horizontal' | 'vertical';
1108
+ showNavigation?: boolean;
1109
+ nextLabel?: string;
1110
+ prevLabel?: string;
1111
+ finishLabel?: string;
1112
+ onFinish?: () => void;
1113
+ }
1114
+ declare function Stepper(props: StepperProps): react.JSX.Element;
1115
+
1116
+ interface ToggleButtonProps {
1117
+ selected?: boolean;
1118
+ defaultSelected?: boolean;
1119
+ onChange?: (selected: boolean) => void;
1120
+ isDisabled?: boolean;
1121
+ size?: ElvoraSize;
1122
+ value?: string;
1123
+ children?: ReactNode;
1124
+ style?: ViewStyle;
1125
+ }
1126
+ declare function ToggleButton(props: ToggleButtonProps): react.JSX.Element;
1127
+
1128
+ type ButtonGroupOrientation = 'horizontal' | 'vertical';
1129
+ type ButtonGroupSelectionMode = 'none' | 'single' | 'multiple';
1130
+ interface ButtonGroupProps {
1131
+ orientation?: ButtonGroupOrientation;
1132
+ mode?: ButtonGroupSelectionMode;
1133
+ value?: string | string[] | null;
1134
+ defaultValue?: string | string[] | null;
1135
+ onChange?: (value: string | string[] | null) => void;
1136
+ allowDeselect?: boolean;
1137
+ style?: ViewStyle;
1138
+ children?: ReactNode;
1139
+ }
1140
+ declare function ButtonGroup(props: ButtonGroupProps): react.JSX.Element;
1141
+
1142
+ interface ChipInputProps {
1143
+ value?: string[];
1144
+ defaultValue?: string[];
1145
+ onChange?: (chips: string[]) => void;
1146
+ placeholder?: string;
1147
+ validate?: (value: string) => boolean;
1148
+ unique?: boolean;
1149
+ isDisabled?: boolean;
1150
+ maxChips?: number;
1151
+ style?: ViewStyle;
1152
+ accessibilityLabel?: string;
1153
+ }
1154
+ declare function ChipInput(props: ChipInputProps): react.JSX.Element;
1155
+
1156
+ interface ProTableToolbar {
1157
+ title?: ReactNode;
1158
+ actions?: ReactNode;
1159
+ }
1160
+ interface ProTableColumn<Row = Record<string, unknown>> extends TableColumn<Row> {
1161
+ searchable?: boolean;
1162
+ }
1163
+ interface ProTableProps<Row = Record<string, unknown>> extends Omit<ViewProps, 'children'> {
1164
+ columns: ProTableColumn<Row>[];
1165
+ dataSource: Row[];
1166
+ rowKey?: keyof Row | ((row: Row, index: number) => string | number);
1167
+ toolbar?: ProTableToolbar;
1168
+ search?: boolean;
1169
+ searchPlaceholder?: string;
1170
+ empty?: ReactNode;
1171
+ onRowPress?: (row: Row, index: number) => void;
1172
+ }
1173
+ declare function ProTable<Row extends Record<string, unknown>>(props: ProTableProps<Row>): react.JSX.Element;
1174
+
1175
+ type ProFormFieldType = 'text' | 'password' | 'email' | 'number' | 'textarea' | 'switch' | 'checkbox' | 'select' | 'custom';
1176
+ interface ProFormSelectOption {
1177
+ value: string;
1178
+ label: string;
1179
+ }
1180
+ interface ProFormField {
1181
+ name: string;
1182
+ label?: ReactNode;
1183
+ type: ProFormFieldType;
1184
+ placeholder?: string;
1185
+ hint?: ReactNode;
1186
+ required?: boolean;
1187
+ disabled?: boolean;
1188
+ defaultValue?: unknown;
1189
+ options?: ProFormSelectOption[];
1190
+ validate?: (value: unknown, values: Record<string, unknown>) => string | undefined;
1191
+ render?: (ctx: {
1192
+ value: unknown;
1193
+ onChange: (v: unknown) => void;
1194
+ error: string | undefined;
1195
+ name: string;
1196
+ }) => ReactNode;
1197
+ }
1198
+ interface ProFormProps extends Omit<ViewProps, 'children'> {
1199
+ fields: ProFormField[];
1200
+ initialValues?: Record<string, unknown>;
1201
+ onSubmit?: (values: Record<string, unknown>) => void | Promise<void>;
1202
+ submitLabel?: ReactNode;
1203
+ resetLabel?: ReactNode;
1204
+ isSubmitting?: boolean;
1205
+ }
1206
+ declare function ProForm(props: ProFormProps): react.JSX.Element;
1207
+
1208
+ interface ProLayoutMenuItem {
1209
+ key: string;
1210
+ label: ReactNode;
1211
+ icon?: IconName;
1212
+ children?: ProLayoutMenuItem[];
1213
+ }
1214
+ interface ProLayoutUser {
1215
+ name: string;
1216
+ avatar?: string;
1217
+ caption?: ReactNode;
1218
+ }
1219
+ interface ProLayoutProps extends Omit<ViewProps, 'children'> {
1220
+ brand?: ReactNode;
1221
+ menu?: ProLayoutMenuItem[];
1222
+ selectedKey?: string;
1223
+ onSelect?: (key: string) => void;
1224
+ user?: ProLayoutUser;
1225
+ header?: ReactNode;
1226
+ footer?: ReactNode;
1227
+ children?: ReactNode;
1228
+ }
1229
+ declare function ProLayout(props: ProLayoutProps): react.JSX.Element;
1230
+
1231
+ type DataGridSortOrder = 'asc' | 'desc' | null;
1232
+ interface DataGridColumn<Row = Record<string, unknown>> {
1233
+ key: string;
1234
+ title: ReactNode;
1235
+ dataIndex?: keyof Row | string;
1236
+ width?: number;
1237
+ render?: (value: unknown, row: Row, index: number) => ReactNode;
1238
+ sortable?: boolean;
1239
+ sorter?: (a: Row, b: Row) => number;
1240
+ align?: 'left' | 'center' | 'right';
1241
+ }
1242
+ interface DataGridProps<Row = Record<string, unknown>> extends Omit<ViewProps, 'children'> {
1243
+ columns: DataGridColumn<Row>[];
1244
+ dataSource: Row[];
1245
+ rowKey?: keyof Row | ((row: Row, index: number) => string | number);
1246
+ rowHeight?: number;
1247
+ height?: number;
1248
+ empty?: ReactNode;
1249
+ onRowPress?: (row: Row, index: number) => void;
1250
+ }
1251
+ declare function DataGrid<Row extends Record<string, unknown>>(props: DataGridProps<Row>): react.JSX.Element;
1252
+
1253
+ export { Accordion, type AccordionItem, type AccordionProps, Affix, type AffixProps, Alert, type AlertProps, Anchor, type AnchorLink, type AnchorProps, AutoComplete, type AutoCompleteOption, type AutoCompleteProps, Avatar, type AvatarProps, BackTop, type BackTopProps, Backdrop, type BackdropProps, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, ButtonGroup, type ButtonGroupOrientation, type ButtonGroupProps, type ButtonGroupSelectionMode, type ButtonProps, Calendar, type CalendarProps, Card, CardBody, CardFooter, CardHeader, type CardProps, Carousel, type CarouselProps, Cascader, type CascaderOption, type CascaderProps, Checkbox, type CheckboxProps, ChipInput, type ChipInputProps, Collapse, type CollapseItem, type CollapseProps, ColorPicker, type ColorPickerProps, Container, type ContainerProps, DataGrid, type DataGridColumn, type DataGridProps, type DataGridSortOrder, DatePicker, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, type DateValue, type DescriptionItem, Descriptions, type DescriptionsProps, Divider, type DividerProps, Drawer, type DrawerProps, Dropdown, type DropdownItem, type DropdownProps, ElvoraProvider, type ElvoraProviderProps, Empty, type EmptyProps, FloatButton, type FloatButtonProps, Form, FormField, type FormFieldProps, type FormProps, Grid, GridItem, type GridItemProps, type GridProps, HStack, Icon, IconButton, type IconButtonProps, type IconProps, Image, ImageList, type ImageListItem, type ImageListProps, type ImageProps, Input, type InputProps, Label, type LabelProps, List, type ListProps, type MentionItem, Mentions, type MentionsProps, Menu, type MenuItem, type MenuProps, MiniPagination, type MiniPaginationProps, Modal, type ModalProps, NumberInput, type NumberInputProps, Pagination, type PaginationProps, Popover, type PopoverProps, ProForm, type ProFormField, type ProFormFieldType, type ProFormProps, type ProFormSelectOption, ProLayout, type ProLayoutMenuItem, type ProLayoutProps, type ProLayoutUser, ProTable, type ProTableColumn, type ProTableProps, type ProTableToolbar, Progress, type ProgressProps, QRCode, type QRCodeProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rate, type RateProps, Result, type ResultProps, type ResultStatus, Segmented, type SegmentedOption, type SegmentedProps, Select, type SelectOption, type SelectProps, SimplePagination, type SimplePaginationProps, Skeleton, type SkeletonProps, Slider, type SliderProps, type SortOrder, SpeedDial, type SpeedDialAction, type SpeedDialProps, Spinner, type SpinnerProps, Splitter, type SplitterProps, Stack, type StackProps, Statistic, type StatisticProps, type Step, Stepper, type StepperProps, type StepperStep, Steps, type StepsProps, Switch, type SwitchProps, Table, type TableColumn, type TableProps, Tabs, type TabsProps, type TabsTab, Tag, type TagProps, Textarea, type TextareaProps, TimePicker, type TimePickerProps, type TimeValue, Timeline, type TimelineItem, type TimelineItemStatus, type TimelineProps, type ToastApi, type ToastOptions, ToastProvider, type ToastProviderProps, ToggleButton, type ToggleButtonProps, Tooltip, type TooltipProps, Tour, type TourProps, type TourStep, Transfer, type TransferItem, type TransferProps, Tree, type TreeNode as TreeDataNode, type TreeNode$1 as TreeNode, type TreeProps, TreeSelect, type TreeSelectProps, Upload, type UploadFile, type UploadProps, VStack, Watermark, type WatermarkProps, makeUploadFile, useElvoraContext, useFormField, useTheme, useToast };