@webority-technologies/mobile 0.0.22 → 0.0.24

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 (249) hide show
  1. package/lib/commonjs/components/Accordion/Accordion.js +9 -7
  2. package/lib/commonjs/components/AnimatePresence/AnimatePresence.js +69 -0
  3. package/lib/commonjs/components/AnimatePresence/index.js +13 -0
  4. package/lib/commonjs/components/AppBar/AppBar.js +9 -6
  5. package/lib/commonjs/components/Avatar/Avatar.js +4 -2
  6. package/lib/commonjs/components/Badge/Badge.js +5 -5
  7. package/lib/commonjs/components/Banner/Banner.js +20 -6
  8. package/lib/commonjs/components/BottomNavigation/BottomNavigation.js +6 -4
  9. package/lib/commonjs/components/BottomSheet/BottomSheet.js +8 -9
  10. package/lib/commonjs/components/Box/Box.js +162 -0
  11. package/lib/commonjs/components/Box/index.js +37 -0
  12. package/lib/commonjs/components/Button/Button.js +7 -7
  13. package/lib/commonjs/components/Card/Card.js +3 -3
  14. package/lib/commonjs/components/Carousel/Carousel.js +4 -2
  15. package/lib/commonjs/components/Checkbox/Checkbox.js +17 -7
  16. package/lib/commonjs/components/Chip/Chip.js +4 -2
  17. package/lib/commonjs/components/DatePicker/DatePicker.js +31 -24
  18. package/lib/commonjs/components/DateRangePicker/DateRangePicker.js +16 -11
  19. package/lib/commonjs/components/Dialog/Dialog.js +6 -4
  20. package/lib/commonjs/components/Drawer/Drawer.js +4 -2
  21. package/lib/commonjs/components/FieldBase/FieldBase.js +8 -4
  22. package/lib/commonjs/components/FloatingActionButton/FloatingActionButton.js +23 -13
  23. package/lib/commonjs/components/FormField/FormField.js +61 -25
  24. package/lib/commonjs/components/ImageGallery/ImageGallery.js +17 -15
  25. package/lib/commonjs/components/Input/Input.js +41 -29
  26. package/lib/commonjs/components/KeyboardAwareScrollView/KeyboardAwareScrollView.js +102 -0
  27. package/lib/commonjs/components/KeyboardAwareScrollView/index.js +13 -0
  28. package/lib/commonjs/components/KeyboardToolbar/KeyboardToolbar.js +130 -0
  29. package/lib/commonjs/components/KeyboardToolbar/index.js +13 -0
  30. package/lib/commonjs/components/ListItem/ListItem.js +4 -3
  31. package/lib/commonjs/components/Modal/Modal.js +21 -9
  32. package/lib/commonjs/components/NumberInput/NumberInput.js +38 -29
  33. package/lib/commonjs/components/OTPInput/OTPInput.js +37 -22
  34. package/lib/commonjs/components/Radio/Radio.js +9 -8
  35. package/lib/commonjs/components/Radio/RadioGroup.js +10 -3
  36. package/lib/commonjs/components/Rating/Rating.js +4 -3
  37. package/lib/commonjs/components/SearchBar/SearchBar.js +11 -6
  38. package/lib/commonjs/components/SegmentedControl/SegmentedControl.js +23 -12
  39. package/lib/commonjs/components/Select/Select.js +40 -36
  40. package/lib/commonjs/components/Skeleton/SkeletonContent.js +5 -2
  41. package/lib/commonjs/components/Slider/Slider.js +241 -225
  42. package/lib/commonjs/components/Spinner/Spinner.js +5 -5
  43. package/lib/commonjs/components/Stepper/Stepper.js +6 -5
  44. package/lib/commonjs/components/Swipeable/Swipeable.js +8 -9
  45. package/lib/commonjs/components/Switch/Switch.js +29 -16
  46. package/lib/commonjs/components/Tabs/Tabs.js +8 -5
  47. package/lib/commonjs/components/Text/Text.js +142 -0
  48. package/lib/commonjs/components/Text/index.js +13 -0
  49. package/lib/commonjs/components/TimePicker/TimePicker.js +23 -15
  50. package/lib/commonjs/components/Toast/Toast.js +22 -10
  51. package/lib/commonjs/components/Tooltip/Tooltip.js +6 -2
  52. package/lib/commonjs/components/index.js +156 -103
  53. package/lib/commonjs/form/FormContext.js +40 -0
  54. package/lib/commonjs/form/index.js +68 -0
  55. package/lib/commonjs/form/path.js +79 -0
  56. package/lib/commonjs/form/rules.js +67 -0
  57. package/lib/commonjs/form/types.js +2 -0
  58. package/lib/commonjs/form/useField.js +54 -0
  59. package/lib/commonjs/form/useForm.js +316 -0
  60. package/lib/commonjs/hooks/index.js +14 -0
  61. package/lib/commonjs/hooks/useControllableState.js +30 -0
  62. package/lib/commonjs/hooks/useReducedMotion.js +31 -0
  63. package/lib/commonjs/index.js +96 -11
  64. package/lib/commonjs/theme/ThemeContext.js +30 -2
  65. package/lib/commonjs/theme/tokens.js +12 -0
  66. package/lib/commonjs/utils/hapticUtils.js +11 -1
  67. package/lib/commonjs/utils/index.js +6 -0
  68. package/lib/module/components/Accordion/Accordion.js +10 -8
  69. package/lib/module/components/AnimatePresence/AnimatePresence.js +63 -0
  70. package/lib/module/components/AnimatePresence/index.js +4 -0
  71. package/lib/module/components/AppBar/AppBar.js +10 -7
  72. package/lib/module/components/Avatar/Avatar.js +4 -2
  73. package/lib/module/components/Badge/Badge.js +5 -5
  74. package/lib/module/components/Banner/Banner.js +20 -6
  75. package/lib/module/components/BottomNavigation/BottomNavigation.js +6 -4
  76. package/lib/module/components/BottomSheet/BottomSheet.js +8 -9
  77. package/lib/module/components/Box/Box.js +156 -0
  78. package/lib/module/components/Box/index.js +4 -0
  79. package/lib/module/components/Button/Button.js +7 -7
  80. package/lib/module/components/Card/Card.js +4 -4
  81. package/lib/module/components/Carousel/Carousel.js +4 -2
  82. package/lib/module/components/Checkbox/Checkbox.js +18 -8
  83. package/lib/module/components/Chip/Chip.js +5 -3
  84. package/lib/module/components/DatePicker/DatePicker.js +32 -25
  85. package/lib/module/components/DateRangePicker/DateRangePicker.js +17 -12
  86. package/lib/module/components/Dialog/Dialog.js +7 -5
  87. package/lib/module/components/Drawer/Drawer.js +5 -3
  88. package/lib/module/components/FieldBase/FieldBase.js +8 -4
  89. package/lib/module/components/FloatingActionButton/FloatingActionButton.js +24 -14
  90. package/lib/module/components/FormField/FormField.js +62 -26
  91. package/lib/module/components/ImageGallery/ImageGallery.js +18 -16
  92. package/lib/module/components/Input/Input.js +41 -29
  93. package/lib/module/components/KeyboardAwareScrollView/KeyboardAwareScrollView.js +98 -0
  94. package/lib/module/components/KeyboardAwareScrollView/index.js +4 -0
  95. package/lib/module/components/KeyboardToolbar/KeyboardToolbar.js +125 -0
  96. package/lib/module/components/KeyboardToolbar/index.js +4 -0
  97. package/lib/module/components/ListItem/ListItem.js +5 -4
  98. package/lib/module/components/Modal/Modal.js +22 -10
  99. package/lib/module/components/NumberInput/NumberInput.js +36 -27
  100. package/lib/module/components/OTPInput/OTPInput.js +37 -22
  101. package/lib/module/components/Radio/Radio.js +10 -9
  102. package/lib/module/components/Radio/RadioGroup.js +10 -3
  103. package/lib/module/components/Rating/Rating.js +5 -4
  104. package/lib/module/components/SearchBar/SearchBar.js +12 -7
  105. package/lib/module/components/SegmentedControl/SegmentedControl.js +24 -13
  106. package/lib/module/components/Select/Select.js +41 -37
  107. package/lib/module/components/Skeleton/SkeletonContent.js +5 -2
  108. package/lib/module/components/Slider/Slider.js +244 -228
  109. package/lib/module/components/Spinner/Spinner.js +5 -5
  110. package/lib/module/components/Stepper/Stepper.js +7 -6
  111. package/lib/module/components/Swipeable/Swipeable.js +9 -10
  112. package/lib/module/components/Switch/Switch.js +29 -16
  113. package/lib/module/components/Tabs/Tabs.js +9 -6
  114. package/lib/module/components/Text/Text.js +138 -0
  115. package/lib/module/components/Text/index.js +4 -0
  116. package/lib/module/components/TimePicker/TimePicker.js +24 -16
  117. package/lib/module/components/Toast/Toast.js +22 -10
  118. package/lib/module/components/Tooltip/Tooltip.js +6 -2
  119. package/lib/module/components/index.js +5 -0
  120. package/lib/module/form/FormContext.js +32 -0
  121. package/lib/module/form/index.js +12 -0
  122. package/lib/module/form/path.js +72 -0
  123. package/lib/module/form/rules.js +52 -0
  124. package/lib/module/form/types.js +2 -0
  125. package/lib/module/form/useField.js +49 -0
  126. package/lib/module/form/useForm.js +312 -0
  127. package/lib/module/hooks/index.js +2 -0
  128. package/lib/module/hooks/useControllableState.js +26 -0
  129. package/lib/module/hooks/useReducedMotion.js +27 -0
  130. package/lib/module/index.js +3 -1
  131. package/lib/module/theme/ThemeContext.js +30 -2
  132. package/lib/module/theme/tokens.js +12 -0
  133. package/lib/module/utils/hapticUtils.js +9 -0
  134. package/lib/module/utils/index.js +1 -1
  135. package/lib/typescript/commonjs/components/Accordion/Accordion.d.ts +3 -0
  136. package/lib/typescript/commonjs/components/AnimatePresence/AnimatePresence.d.ts +30 -0
  137. package/lib/typescript/commonjs/components/AnimatePresence/index.d.ts +3 -0
  138. package/lib/typescript/commonjs/components/AppBar/AppBar.d.ts +6 -0
  139. package/lib/typescript/commonjs/components/Banner/Banner.d.ts +3 -0
  140. package/lib/typescript/commonjs/components/BottomNavigation/BottomNavigation.d.ts +1 -1
  141. package/lib/typescript/commonjs/components/Box/Box.d.ts +60 -0
  142. package/lib/typescript/commonjs/components/Box/index.d.ts +3 -0
  143. package/lib/typescript/commonjs/components/Button/Button.d.ts +1 -1
  144. package/lib/typescript/commonjs/components/Card/Card.d.ts +3 -0
  145. package/lib/typescript/commonjs/components/Checkbox/Checkbox.d.ts +4 -2
  146. package/lib/typescript/commonjs/components/Chip/Chip.d.ts +3 -0
  147. package/lib/typescript/commonjs/components/DatePicker/DatePicker.d.ts +6 -3
  148. package/lib/typescript/commonjs/components/DateRangePicker/DateRangePicker.d.ts +6 -0
  149. package/lib/typescript/commonjs/components/Dialog/Dialog.d.ts +5 -2
  150. package/lib/typescript/commonjs/components/Drawer/Drawer.d.ts +3 -0
  151. package/lib/typescript/commonjs/components/FloatingActionButton/FloatingActionButton.d.ts +5 -0
  152. package/lib/typescript/commonjs/components/FormField/FormField.d.ts +13 -2
  153. package/lib/typescript/commonjs/components/ImageGallery/ImageGallery.d.ts +6 -0
  154. package/lib/typescript/commonjs/components/KeyboardAwareScrollView/KeyboardAwareScrollView.d.ts +20 -0
  155. package/lib/typescript/commonjs/components/KeyboardAwareScrollView/index.d.ts +3 -0
  156. package/lib/typescript/commonjs/components/KeyboardToolbar/KeyboardToolbar.d.ts +29 -0
  157. package/lib/typescript/commonjs/components/KeyboardToolbar/index.d.ts +3 -0
  158. package/lib/typescript/commonjs/components/ListItem/ListItem.d.ts +3 -0
  159. package/lib/typescript/commonjs/components/Modal/Modal.d.ts +6 -0
  160. package/lib/typescript/commonjs/components/NumberInput/NumberInput.d.ts +6 -2
  161. package/lib/typescript/commonjs/components/OTPInput/OTPInput.d.ts +9 -2
  162. package/lib/typescript/commonjs/components/Radio/Radio.d.ts +2 -2
  163. package/lib/typescript/commonjs/components/Radio/RadioGroup.d.ts +3 -2
  164. package/lib/typescript/commonjs/components/Rating/Rating.d.ts +6 -0
  165. package/lib/typescript/commonjs/components/SearchBar/SearchBar.d.ts +3 -0
  166. package/lib/typescript/commonjs/components/SegmentedControl/SegmentedControl.d.ts +6 -2
  167. package/lib/typescript/commonjs/components/Select/Select.d.ts +6 -0
  168. package/lib/typescript/commonjs/components/Slider/Slider.d.ts +9 -4
  169. package/lib/typescript/commonjs/components/Spinner/Spinner.d.ts +1 -1
  170. package/lib/typescript/commonjs/components/Stepper/Stepper.d.ts +6 -0
  171. package/lib/typescript/commonjs/components/Swipeable/Swipeable.d.ts +3 -0
  172. package/lib/typescript/commonjs/components/Switch/Switch.d.ts +3 -2
  173. package/lib/typescript/commonjs/components/Tabs/Tabs.d.ts +3 -0
  174. package/lib/typescript/commonjs/components/Text/Text.d.ts +25 -0
  175. package/lib/typescript/commonjs/components/Text/index.d.ts +3 -0
  176. package/lib/typescript/commonjs/components/TimePicker/TimePicker.d.ts +6 -3
  177. package/lib/typescript/commonjs/components/index.d.ts +10 -0
  178. package/lib/typescript/commonjs/form/FormContext.d.ts +17 -0
  179. package/lib/typescript/commonjs/form/index.d.ts +9 -0
  180. package/lib/typescript/commonjs/form/path.d.ts +10 -0
  181. package/lib/typescript/commonjs/form/rules.d.ts +31 -0
  182. package/lib/typescript/commonjs/form/types.d.ts +94 -0
  183. package/lib/typescript/commonjs/form/useField.d.ts +27 -0
  184. package/lib/typescript/commonjs/form/useForm.d.ts +10 -0
  185. package/lib/typescript/commonjs/hooks/index.d.ts +3 -0
  186. package/lib/typescript/commonjs/hooks/useControllableState.d.ts +17 -0
  187. package/lib/typescript/commonjs/hooks/useReducedMotion.d.ts +8 -0
  188. package/lib/typescript/commonjs/index.d.ts +4 -2
  189. package/lib/typescript/commonjs/theme/types.d.ts +17 -67
  190. package/lib/typescript/commonjs/utils/hapticUtils.d.ts +8 -0
  191. package/lib/typescript/commonjs/utils/index.d.ts +1 -1
  192. package/lib/typescript/module/components/Accordion/Accordion.d.ts +3 -0
  193. package/lib/typescript/module/components/AnimatePresence/AnimatePresence.d.ts +30 -0
  194. package/lib/typescript/module/components/AnimatePresence/index.d.ts +3 -0
  195. package/lib/typescript/module/components/AppBar/AppBar.d.ts +6 -0
  196. package/lib/typescript/module/components/Banner/Banner.d.ts +3 -0
  197. package/lib/typescript/module/components/BottomNavigation/BottomNavigation.d.ts +1 -1
  198. package/lib/typescript/module/components/Box/Box.d.ts +60 -0
  199. package/lib/typescript/module/components/Box/index.d.ts +3 -0
  200. package/lib/typescript/module/components/Button/Button.d.ts +1 -1
  201. package/lib/typescript/module/components/Card/Card.d.ts +3 -0
  202. package/lib/typescript/module/components/Checkbox/Checkbox.d.ts +4 -2
  203. package/lib/typescript/module/components/Chip/Chip.d.ts +3 -0
  204. package/lib/typescript/module/components/DatePicker/DatePicker.d.ts +6 -3
  205. package/lib/typescript/module/components/DateRangePicker/DateRangePicker.d.ts +6 -0
  206. package/lib/typescript/module/components/Dialog/Dialog.d.ts +5 -2
  207. package/lib/typescript/module/components/Drawer/Drawer.d.ts +3 -0
  208. package/lib/typescript/module/components/FloatingActionButton/FloatingActionButton.d.ts +5 -0
  209. package/lib/typescript/module/components/FormField/FormField.d.ts +13 -2
  210. package/lib/typescript/module/components/ImageGallery/ImageGallery.d.ts +6 -0
  211. package/lib/typescript/module/components/KeyboardAwareScrollView/KeyboardAwareScrollView.d.ts +20 -0
  212. package/lib/typescript/module/components/KeyboardAwareScrollView/index.d.ts +3 -0
  213. package/lib/typescript/module/components/KeyboardToolbar/KeyboardToolbar.d.ts +29 -0
  214. package/lib/typescript/module/components/KeyboardToolbar/index.d.ts +3 -0
  215. package/lib/typescript/module/components/ListItem/ListItem.d.ts +3 -0
  216. package/lib/typescript/module/components/Modal/Modal.d.ts +6 -0
  217. package/lib/typescript/module/components/NumberInput/NumberInput.d.ts +6 -2
  218. package/lib/typescript/module/components/OTPInput/OTPInput.d.ts +9 -2
  219. package/lib/typescript/module/components/Radio/Radio.d.ts +2 -2
  220. package/lib/typescript/module/components/Radio/RadioGroup.d.ts +3 -2
  221. package/lib/typescript/module/components/Rating/Rating.d.ts +6 -0
  222. package/lib/typescript/module/components/SearchBar/SearchBar.d.ts +3 -0
  223. package/lib/typescript/module/components/SegmentedControl/SegmentedControl.d.ts +6 -2
  224. package/lib/typescript/module/components/Select/Select.d.ts +6 -0
  225. package/lib/typescript/module/components/Slider/Slider.d.ts +9 -4
  226. package/lib/typescript/module/components/Spinner/Spinner.d.ts +1 -1
  227. package/lib/typescript/module/components/Stepper/Stepper.d.ts +6 -0
  228. package/lib/typescript/module/components/Swipeable/Swipeable.d.ts +3 -0
  229. package/lib/typescript/module/components/Switch/Switch.d.ts +3 -2
  230. package/lib/typescript/module/components/Tabs/Tabs.d.ts +3 -0
  231. package/lib/typescript/module/components/Text/Text.d.ts +25 -0
  232. package/lib/typescript/module/components/Text/index.d.ts +3 -0
  233. package/lib/typescript/module/components/TimePicker/TimePicker.d.ts +6 -3
  234. package/lib/typescript/module/components/index.d.ts +10 -0
  235. package/lib/typescript/module/form/FormContext.d.ts +17 -0
  236. package/lib/typescript/module/form/index.d.ts +9 -0
  237. package/lib/typescript/module/form/path.d.ts +10 -0
  238. package/lib/typescript/module/form/rules.d.ts +31 -0
  239. package/lib/typescript/module/form/types.d.ts +94 -0
  240. package/lib/typescript/module/form/useField.d.ts +27 -0
  241. package/lib/typescript/module/form/useForm.d.ts +10 -0
  242. package/lib/typescript/module/hooks/index.d.ts +3 -0
  243. package/lib/typescript/module/hooks/useControllableState.d.ts +17 -0
  244. package/lib/typescript/module/hooks/useReducedMotion.d.ts +8 -0
  245. package/lib/typescript/module/index.d.ts +4 -2
  246. package/lib/typescript/module/theme/types.d.ts +17 -67
  247. package/lib/typescript/module/utils/hapticUtils.d.ts +8 -0
  248. package/lib/typescript/module/utils/index.d.ts +1 -1
  249. package/package.json +1 -1
@@ -18,6 +18,7 @@
18
18
  */
19
19
  import React from 'react';
20
20
  import type { ImageSourcePropType, StyleProp, ViewStyle } from 'react-native';
21
+ import type { HapticType } from '../../utils';
21
22
  export interface GalleryImage {
22
23
  source: ImageSourcePropType;
23
24
  caption?: string;
@@ -31,6 +32,11 @@ export interface ImageGalleryProps {
31
32
  enableLightbox?: boolean;
32
33
  enablePinchZoom?: boolean;
33
34
  onIndexChange?: (idx: number) => void;
35
+ /**
36
+ * Haptic feedback for interactions. Pass false to disable; pass a HapticType
37
+ * to override the default.
38
+ */
39
+ haptic?: HapticType | false;
34
40
  /**
35
41
  * When true, renders the component as its authored skeleton placeholder shape.
36
42
  * The placeholder mirrors the real layout's footprint so the UI doesn't reflow
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { ScrollView } from 'react-native';
3
+ import type { ScrollViewProps } from 'react-native';
4
+ export interface KeyboardAwareScrollViewProps extends ScrollViewProps {
5
+ /** Gap kept between the focused field and the top of the keyboard. Default 24. */
6
+ extraScrollHeight?: number;
7
+ /** Disable the keyboard-following behaviour (still a normal ScrollView). Default false. */
8
+ disabled?: boolean;
9
+ }
10
+ /**
11
+ * A ScrollView that keeps the focused input visible above the keyboard — no
12
+ * native dependency. On keyboard show it pads the content by the keyboard
13
+ * height and scrolls the focused TextInput so its bottom sits `extraScrollHeight`
14
+ * above the keyboard, but only when it would otherwise be covered (so already-
15
+ * visible fields don't jump). The classic measure-and-scroll approach, in pure RN.
16
+ */
17
+ declare const KeyboardAwareScrollView: React.ForwardRefExoticComponent<KeyboardAwareScrollViewProps & React.RefAttributes<ScrollView>>;
18
+ export { KeyboardAwareScrollView };
19
+ export default KeyboardAwareScrollView;
20
+ //# sourceMappingURL=KeyboardAwareScrollView.d.ts.map
@@ -0,0 +1,3 @@
1
+ export { KeyboardAwareScrollView } from './KeyboardAwareScrollView';
2
+ export type { KeyboardAwareScrollViewProps } from './KeyboardAwareScrollView';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,29 @@
1
+ import React from 'react';
2
+ import type { StyleProp, ViewStyle } from 'react-native';
3
+ export interface KeyboardToolbarProps {
4
+ /** Label for the dismiss button. Default 'Done'. */
5
+ doneLabel?: string;
6
+ /** Show the prev/next chevrons. Default: true when prev/next handlers resolve. */
7
+ showNavigation?: boolean;
8
+ /** Override the dismiss action. Default: `Keyboard.dismiss()`. */
9
+ onDone?: () => void;
10
+ /** Override "next field". Default: the surrounding `<Form>`'s `focusNext`. */
11
+ onNext?: () => void;
12
+ /** Override "previous field". Default: the surrounding `<Form>`'s `focusPrev`. */
13
+ onPrev?: () => void;
14
+ /** Custom content rendered between the nav chevrons and the Done button. */
15
+ leading?: React.ReactNode;
16
+ style?: StyleProp<ViewStyle>;
17
+ testID?: string;
18
+ }
19
+ /**
20
+ * An accessory bar pinned just above the keyboard — pure RN, no native
21
+ * dependency. Shows a Done (dismiss) button and optional prev/next chevrons
22
+ * that, inside a `<Form>`, walk the registered field order. Render it at the
23
+ * screen root (a `flex: 1` ancestor) so its `bottom: keyboardHeight` offset
24
+ * lands it on top of the keyboard. Renders nothing while the keyboard is hidden.
25
+ */
26
+ declare const KeyboardToolbar: React.FC<KeyboardToolbarProps>;
27
+ export { KeyboardToolbar };
28
+ export default KeyboardToolbar;
29
+ //# sourceMappingURL=KeyboardToolbar.d.ts.map
@@ -0,0 +1,3 @@
1
+ export { KeyboardToolbar } from './KeyboardToolbar';
2
+ export type { KeyboardToolbarProps } from './KeyboardToolbar';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { GestureResponderEvent, StyleProp, TextStyle, View as RNView, ViewStyle } from 'react-native';
3
+ import type { HapticType } from '../../utils/hapticUtils';
3
4
  import type { SwipeableAction } from '../Swipeable';
4
5
  export type ListItemSize = 'sm' | 'md' | 'lg';
5
6
  export interface ListItemProps {
@@ -15,6 +16,8 @@ export interface ListItemProps {
15
16
  left?: React.ReactNode;
16
17
  right?: React.ReactNode;
17
18
  onPress?: (event: GestureResponderEvent) => void;
19
+ /** Haptic feedback for interactions. Pass false to disable; pass a HapticType to override the default. */
20
+ haptic?: HapticType | false;
18
21
  selected?: boolean;
19
22
  disabled?: boolean;
20
23
  size?: ListItemSize;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { View } from 'react-native';
3
3
  import type { StyleProp, View as RNView, ViewStyle } from 'react-native';
4
+ import type { HapticType } from '../../utils/hapticUtils';
4
5
  export type ModalPresentation = 'centered' | 'bottom' | 'fullScreen';
5
6
  export interface ModalProps {
6
7
  visible: boolean;
@@ -21,6 +22,11 @@ export interface ModalProps {
21
22
  * Opt-in: when undefined, focus behaviour is unchanged.
22
23
  */
23
24
  restoreFocusRef?: React.RefObject<RNView | null>;
25
+ /**
26
+ * Haptic feedback for interactions. Pass false to disable; pass a HapticType
27
+ * to override the default.
28
+ */
29
+ haptic?: HapticType | false;
24
30
  testID?: string;
25
31
  }
26
32
  declare const Modal: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<View>>;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { StyleProp, TextInputProps, TextStyle, ViewStyle } from 'react-native';
3
+ import type { HapticType } from '../../utils';
3
4
  export type NumberInputSize = 'sm' | 'md' | 'lg';
4
5
  export type NumberInputVariant = 'inline' | 'horizontal' | 'stacked';
5
6
  export interface NumberInputRef {
@@ -8,8 +9,9 @@ export interface NumberInputRef {
8
9
  clear: () => void;
9
10
  }
10
11
  export interface NumberInputProps {
11
- value: number;
12
- onChange: (value: number) => void;
12
+ value?: number;
13
+ defaultValue?: number;
14
+ onChange?: (value: number) => void;
13
15
  min?: number;
14
16
  max?: number;
15
17
  step?: number;
@@ -22,6 +24,8 @@ export interface NumberInputProps {
22
24
  size?: NumberInputSize;
23
25
  variant?: NumberInputVariant;
24
26
  unit?: string;
27
+ /** Haptic feedback for interactions. Pass false to disable; pass a HapticType to override the default. */
28
+ haptic?: HapticType | false;
25
29
  accessibilityLabel?: string;
26
30
  style?: StyleProp<ViewStyle>;
27
31
  containerStyle?: StyleProp<ViewStyle>;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { StyleProp, TextStyle, ViewStyle } from 'react-native';
3
+ import type { HapticType } from '../../utils';
3
4
  export type OTPInputSize = 'sm' | 'md' | 'lg';
4
5
  export interface OTPInputRef {
5
6
  focus: () => void;
@@ -7,8 +8,9 @@ export interface OTPInputRef {
7
8
  clear: () => void;
8
9
  }
9
10
  export interface OTPInputProps {
10
- value: string;
11
- onChange: (value: string) => void;
11
+ value?: string;
12
+ defaultValue?: string;
13
+ onChange?: (value: string) => void;
12
14
  onComplete?: (value: string) => void;
13
15
  length?: number;
14
16
  keyboardType?: 'number-pad' | 'default';
@@ -17,6 +19,11 @@ export interface OTPInputProps {
17
19
  error?: boolean | string;
18
20
  size?: OTPInputSize;
19
21
  secure?: boolean;
22
+ /**
23
+ * Haptic feedback for interactions. Pass false to disable; pass a HapticType
24
+ * to override the default.
25
+ */
26
+ haptic?: HapticType | false;
20
27
  accessibilityLabel?: string;
21
28
  style?: StyleProp<ViewStyle>;
22
29
  cellStyle?: StyleProp<ViewStyle>;
@@ -7,7 +7,7 @@ export type RadioTone = 'primary' | 'success' | 'warning' | 'error';
7
7
  export type RadioValue = string | number;
8
8
  export interface RadioGroupContextValue {
9
9
  selectedValue: RadioValue | undefined;
10
- onSelect: (value: RadioValue) => void;
10
+ onChange: (value: RadioValue) => void;
11
11
  disabled: boolean;
12
12
  }
13
13
  export declare const RadioGroupContext: React.Context<RadioGroupContextValue | null>;
@@ -15,7 +15,7 @@ export declare const useRadioGroup: () => RadioGroupContextValue | null;
15
15
  export interface RadioProps extends Omit<PressableProps, 'style' | 'children' | 'onPress'> {
16
16
  value: RadioValue;
17
17
  selected?: boolean;
18
- onSelect?: (value: RadioValue) => void;
18
+ onChange?: (value: RadioValue) => void;
19
19
  disabled?: boolean;
20
20
  label?: string;
21
21
  size?: RadioSize;
@@ -2,8 +2,9 @@ import React from 'react';
2
2
  import type { StyleProp, ViewStyle } from 'react-native';
3
3
  import type { RadioValue } from './Radio';
4
4
  export interface RadioGroupProps {
5
- value: RadioValue;
6
- onChange: (value: RadioValue) => void;
5
+ value?: RadioValue;
6
+ defaultValue?: RadioValue;
7
+ onChange?: (value: RadioValue) => void;
7
8
  children: React.ReactNode;
8
9
  disabled?: boolean;
9
10
  accessibilityLabel?: string;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { StyleProp, View as RNView, ViewStyle } from 'react-native';
3
+ import type { HapticType } from '../../utils/hapticUtils';
3
4
  export type RatingTone = 'primary' | 'warning';
4
5
  export type RatingSize = 'sm' | 'md' | 'lg' | number;
5
6
  export interface RatingProps {
@@ -17,6 +18,11 @@ export interface RatingProps {
17
18
  * when data arrives. Use this while the data driving the component is being fetched.
18
19
  */
19
20
  loading?: boolean;
21
+ /**
22
+ * Haptic feedback for interactions. Pass false to disable; pass a HapticType
23
+ * to override the default.
24
+ */
25
+ haptic?: HapticType | false;
20
26
  accessibilityLabel?: string;
21
27
  style?: StyleProp<ViewStyle>;
22
28
  containerStyle?: StyleProp<ViewStyle>;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { TextInput } from 'react-native';
3
3
  import type { StyleProp, TextInputProps, ViewStyle } from 'react-native';
4
+ import type { HapticType } from '../../utils/hapticUtils';
4
5
  export type SearchBarSize = 'sm' | 'md' | 'lg';
5
6
  export type SearchBarVariant = 'filled' | 'outlined';
6
7
  export interface SearchBarProps extends Omit<TextInputProps, 'style' | 'value' | 'onChangeText'> {
@@ -19,6 +20,8 @@ export interface SearchBarProps extends Omit<TextInputProps, 'style' | 'value' |
19
20
  size?: SearchBarSize;
20
21
  variant?: SearchBarVariant;
21
22
  cancelLabel?: string;
23
+ /** Haptic feedback for interactions. Pass false to disable; pass a HapticType to override the default. */
24
+ haptic?: HapticType | false;
22
25
  style?: StyleProp<ViewStyle>;
23
26
  accessibilityLabel?: string;
24
27
  testID?: string;
@@ -8,6 +8,7 @@
8
8
  import React from 'react';
9
9
  import { View } from 'react-native';
10
10
  import type { StyleProp, TextStyle, ViewStyle } from 'react-native';
11
+ import type { HapticType } from '../../utils';
11
12
  export type SegmentedControlSize = 'sm' | 'md';
12
13
  export type SegmentedControlTone = 'primary' | 'neutral';
13
14
  export type SegmentValue = string | number;
@@ -18,12 +19,15 @@ export interface SegmentItem {
18
19
  }
19
20
  export interface SegmentedControlProps {
20
21
  segments: SegmentItem[];
21
- value: SegmentValue;
22
- onChange: (value: SegmentValue) => void;
22
+ value?: SegmentValue;
23
+ defaultValue?: SegmentValue;
24
+ onChange?: (value: SegmentValue) => void;
23
25
  size?: SegmentedControlSize;
24
26
  fullWidth?: boolean;
25
27
  disabled?: boolean;
26
28
  tone?: SegmentedControlTone;
29
+ /** Haptic feedback for interactions. Pass false to disable; pass a HapticType to override the default. */
30
+ haptic?: HapticType | false;
27
31
  accessibilityLabel?: string;
28
32
  style?: StyleProp<ViewStyle>;
29
33
  containerStyle?: StyleProp<ViewStyle>;
@@ -8,6 +8,7 @@
8
8
  import React from 'react';
9
9
  import { View } from 'react-native';
10
10
  import type { StyleProp, TextStyle, ViewStyle } from 'react-native';
11
+ import type { HapticType } from '../../utils';
11
12
  export type SelectSize = 'sm' | 'md' | 'lg';
12
13
  export type SelectValue = string | number;
13
14
  export interface SelectOption {
@@ -38,6 +39,11 @@ interface BaseSelectProps<T = SelectOption> {
38
39
  getOptionIcon?: (option: T) => React.ReactNode;
39
40
  placeholder?: string;
40
41
  searchable?: boolean;
42
+ /**
43
+ * Haptic feedback for interactions. Pass false to disable; pass a HapticType
44
+ * to override the default.
45
+ */
46
+ haptic?: HapticType | false;
41
47
  label?: string;
42
48
  error?: string;
43
49
  disabled?: boolean;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { View } from 'react-native';
3
3
  import type { StyleProp, TextStyle, ViewStyle } from 'react-native';
4
+ import type { HapticType } from '../../utils';
4
5
  export type SliderTone = 'primary' | 'success' | 'warning' | 'error';
5
6
  export type SliderSize = 'sm' | 'md' | 'lg';
6
7
  interface SliderCommonProps {
@@ -13,6 +14,8 @@ interface SliderCommonProps {
13
14
  showLabel?: boolean;
14
15
  formatLabel?: (value: number) => string;
15
16
  accessibilityLabel?: string;
17
+ /** Haptic feedback for drag/step/tap. Pass false to disable; pass a HapticType to override. */
18
+ haptic?: HapticType | false;
16
19
  style?: StyleProp<ViewStyle>;
17
20
  containerStyle?: StyleProp<ViewStyle>;
18
21
  trackStyle?: StyleProp<ViewStyle>;
@@ -29,13 +32,15 @@ interface SliderCommonProps {
29
32
  }
30
33
  interface SliderSingleProps extends SliderCommonProps {
31
34
  range?: false;
32
- value: number;
33
- onChange: (value: number) => void;
35
+ value?: number;
36
+ defaultValue?: number;
37
+ onChange?: (value: number) => void;
34
38
  }
35
39
  interface SliderRangeProps extends SliderCommonProps {
36
40
  range: true;
37
- value: [number, number];
38
- onChange: (value: [number, number]) => void;
41
+ value?: [number, number];
42
+ defaultValue?: [number, number];
43
+ onChange?: (value: [number, number]) => void;
39
44
  }
40
45
  export type SliderProps = SliderSingleProps | SliderRangeProps;
41
46
  declare const Slider: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<View>>;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { View } from 'react-native';
3
3
  import type { StyleProp, ViewStyle } from 'react-native';
4
- export type SpinnerSize = 'small' | 'medium' | 'large';
4
+ export type SpinnerSize = 'sm' | 'md' | 'lg';
5
5
  export type SpinnerVariant = 'circular' | 'dots';
6
6
  export interface SpinnerProps {
7
7
  size?: SpinnerSize;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { StyleProp, TextStyle, View as RNView, ViewStyle } from 'react-native';
3
+ import type { HapticType } from '../../utils/hapticUtils';
3
4
  export type StepperVariant = 'horizontal' | 'vertical';
4
5
  export type StepperTone = 'primary' | 'success';
5
6
  export interface StepperStep {
@@ -33,6 +34,11 @@ export interface StepperProps {
33
34
  circleStyle?: StyleProp<ViewStyle>;
34
35
  labelStyle?: StyleProp<TextStyle>;
35
36
  connectorStyle?: StyleProp<ViewStyle>;
37
+ /**
38
+ * Haptic feedback for interactions. Pass false to disable; pass a HapticType
39
+ * to override the default.
40
+ */
41
+ haptic?: HapticType | false;
36
42
  testID?: string;
37
43
  }
38
44
  declare const Stepper: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<RNView>> & {
@@ -16,6 +16,7 @@
16
16
  */
17
17
  import React from 'react';
18
18
  import type { StyleProp, ViewStyle } from 'react-native';
19
+ import type { HapticType } from '../../utils';
19
20
  export type SwipeableTone = 'primary' | 'success' | 'warning' | 'error' | 'neutral';
20
21
  export interface SwipeableAction {
21
22
  key: string;
@@ -35,6 +36,8 @@ export interface SwipeableProps {
35
36
  onSwipeOpen?: (side: 'left' | 'right') => void;
36
37
  onSwipeClose?: () => void;
37
38
  disabled?: boolean;
39
+ /** Haptic feedback for interactions. Pass false to disable; pass a HapticType to override the default. */
40
+ haptic?: HapticType | false;
38
41
  containerStyle?: StyleProp<ViewStyle>;
39
42
  contentStyle?: StyleProp<ViewStyle>;
40
43
  actionStyle?: StyleProp<ViewStyle>;
@@ -5,8 +5,9 @@ import type { HapticType } from '../../utils/hapticUtils';
5
5
  export type SwitchSize = 'sm' | 'md' | 'lg';
6
6
  export type SwitchTone = 'primary' | 'success' | 'warning' | 'error';
7
7
  export interface SwitchProps extends Omit<PressableProps, 'style' | 'children' | 'onPress'> {
8
- value: boolean;
9
- onValueChange: (value: boolean) => void;
8
+ value?: boolean;
9
+ defaultValue?: boolean;
10
+ onChange?: (value: boolean) => void;
10
11
  disabled?: boolean;
11
12
  size?: SwitchSize;
12
13
  tone?: SwitchTone;
@@ -11,6 +11,7 @@
11
11
  import React from 'react';
12
12
  import { Animated, View } from 'react-native';
13
13
  import type { StyleProp, TextStyle, ViewStyle } from 'react-native';
14
+ import type { HapticType } from '../../utils';
14
15
  export type TabsVariant = 'underline' | 'pills';
15
16
  export type TabsAlign = 'left' | 'center';
16
17
  export interface TabItem {
@@ -52,6 +53,8 @@ export interface TabsProps {
52
53
  * progress value catches up.
53
54
  */
54
55
  progress?: Animated.AnimatedInterpolation<number> | Animated.Value;
56
+ /** Haptic feedback for interactions. Pass false to disable; pass a HapticType to override the default. */
57
+ haptic?: HapticType | false;
55
58
  accessibilityLabel?: string;
56
59
  testID?: string;
57
60
  }
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import { Text as RNText } from 'react-native';
3
+ import type { StyleProp, TextProps as RNTextProps, TextStyle } from 'react-native';
4
+ import type { FontWeightKey } from '../../theme';
5
+ import type { TypographyScale } from '../../theme/types';
6
+ export type TextVariant = 'display' | 'h1' | 'h2' | 'h3' | 'title' | 'body' | 'bodySmall' | 'caption' | 'label' | 'overline';
7
+ export type TextColor = 'primary' | 'secondary' | 'tertiary' | 'inverse' | 'disabled' | 'link' | 'success' | 'warning' | 'error' | 'info';
8
+ export interface TextProps extends Omit<RNTextProps, 'style'> {
9
+ variant?: TextVariant;
10
+ /** Text role token, semantic tone, or a raw colour string. Defaults per variant. */
11
+ color?: TextColor | (string & {});
12
+ /** Override the variant's weight. */
13
+ weight?: FontWeightKey;
14
+ /** Override the variant's size — a typography token or a pixel number. */
15
+ size?: keyof TypographyScale['fontSize'] | number;
16
+ align?: TextStyle['textAlign'];
17
+ italic?: boolean;
18
+ underline?: boolean;
19
+ children?: React.ReactNode;
20
+ style?: StyleProp<TextStyle>;
21
+ }
22
+ declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<RNText>>;
23
+ export { Text };
24
+ export default Text;
25
+ //# sourceMappingURL=Text.d.ts.map
@@ -0,0 +1,3 @@
1
+ export { Text } from './Text';
2
+ export type { TextProps, TextVariant, TextColor } from './Text';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { StyleProp, ViewStyle } from 'react-native';
3
+ import type { HapticType } from '../../utils/hapticUtils';
3
4
  import type { FieldBaseSize, FieldBaseVariant } from '../FieldBase';
4
5
  export type TimeFormat = '12h' | '24h';
5
6
  export type Period = 'AM' | 'PM';
@@ -11,19 +12,19 @@ export interface TimeValue {
11
12
  /**
12
13
  * TimePicker supports two modes:
13
14
  *
14
- * 1. Controlled-modal mode — pass `visible`, `onSelect`, `onClose`. The
15
+ * 1. Controlled-modal mode — pass `visible`, `onChange`, `onClose`. The
15
16
  * component renders only the modal sheet and the caller owns open/close
16
17
  * state plus its own trigger UI.
17
18
  * 2. Trigger mode — omit `visible`. The component renders a PickerTrigger
18
19
  * field (label / value / placeholder / chevron / clear / helper / error)
19
- * and manages its own modal open state. `onSelect` is still called on
20
+ * and manages its own modal open state. `onChange` is still called on
20
21
  * confirm.
21
22
  */
22
23
  export interface TimePickerProps {
23
24
  /** Controlled-modal visibility. When omitted, the component enters trigger mode. */
24
25
  visible?: boolean;
25
26
  value?: TimeValue | null;
26
- onSelect?: (time: TimeValue) => void;
27
+ onChange?: (time: TimeValue) => void;
27
28
  onClose?: () => void;
28
29
  format?: TimeFormat;
29
30
  minuteStep?: MinuteStep;
@@ -52,6 +53,8 @@ export interface TimePickerProps {
52
53
  formatValue?: (time: TimeValue) => string;
53
54
  /** Style passed through to the PickerTrigger field row. */
54
55
  triggerStyle?: StyleProp<ViewStyle>;
56
+ /** Haptic feedback for interactions. Pass false to disable; pass a HapticType to override the default. */
57
+ haptic?: HapticType | false;
55
58
  }
56
59
  declare const TimePicker: React.FC<TimePickerProps>;
57
60
  export { TimePicker };
@@ -1,5 +1,7 @@
1
1
  export { Accordion, AccordionGroup } from './Accordion';
2
2
  export type { AccordionProps, AccordionGroupProps, AccordionVariant } from './Accordion';
3
+ export { AnimatePresence } from './AnimatePresence';
4
+ export type { AnimatePresenceProps, PresencePreset } from './AnimatePresence';
3
5
  export { Avatar, AvatarGroup } from './Avatar';
4
6
  export type { AvatarProps, AvatarShape, AvatarSize, AvatarStatus, AvatarGroupProps, AvatarGroupSpacing, AvatarGroupOverflowVariant } from './Avatar';
5
7
  export { Badge } from './Badge';
@@ -12,6 +14,14 @@ export { BottomSheet, useBottomSheet } from './BottomSheet';
12
14
  export type { BottomSheetContextValue, BottomSheetProps, BottomSheetRef } from './BottomSheet';
13
15
  export { Button } from './Button';
14
16
  export type { ButtonProps, ButtonVariant, ButtonTone, ButtonSize } from './Button';
17
+ export { Box, Stack, Row, Spacer } from './Box';
18
+ export type { BoxProps, StackProps, RowProps, SpacerProps } from './Box';
19
+ export { Text } from './Text';
20
+ export type { TextProps, TextVariant, TextColor } from './Text';
21
+ export { KeyboardAwareScrollView } from './KeyboardAwareScrollView';
22
+ export type { KeyboardAwareScrollViewProps } from './KeyboardAwareScrollView';
23
+ export { KeyboardToolbar } from './KeyboardToolbar';
24
+ export type { KeyboardToolbarProps } from './KeyboardToolbar';
15
25
  export { Card } from './Card';
16
26
  export type { CardProps, CardVariant, CardElevation, CardPadding, CardRadius } from './Card';
17
27
  export { Carousel } from './Carousel';
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import type { FormApi, FormValues } from './types';
3
+ export interface FormProps {
4
+ /** The object returned by {@link useForm}. */
5
+ form: FormApi<FormValues>;
6
+ children: React.ReactNode;
7
+ }
8
+ /**
9
+ * Provides a {@link useForm} instance to descendants so `<FormField name>`,
10
+ * {@link useField} and {@link useFieldArray} can bind by name.
11
+ */
12
+ export declare const Form: React.FC<FormProps>;
13
+ /** Read the surrounding form. Throws if there is no `<Form>` ancestor. */
14
+ export declare function useFormContext<Values extends FormValues = FormValues>(): FormApi<Values>;
15
+ /** Read the surrounding form, or null when there is no `<Form>` ancestor. */
16
+ export declare function useOptionalFormContext(): FormApi<FormValues> | null;
17
+ //# sourceMappingURL=FormContext.d.ts.map
@@ -0,0 +1,9 @@
1
+ export { useForm } from './useForm';
2
+ export { useField, useFieldArray } from './useField';
3
+ export type { FieldArrayApi } from './useField';
4
+ export { Form, useFormContext, useOptionalFormContext } from './FormContext';
5
+ export type { FormProps } from './FormContext';
6
+ export { getPath, setPath, deletePath } from './path';
7
+ export * as rules from './rules';
8
+ export type { FormApi, FormConfig, FormValues, FormErrors, FormTouched, FieldState, FieldInputProps, FocusableNode, ValidationRule, ValidationResult, FieldRules, ValidationSchema, FormValidateFn, ValidateOn, SubmitHelpers } from './types';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Immutable get/set/delete for dot- and bracket-notation field paths
3
+ * ("address.city", "phones[0]", "items[2].qty"). Lets a single flat `name`
4
+ * string address nested values and array items, so the form engine can treat
5
+ * every field uniformly regardless of how deep it lives in the value tree.
6
+ */
7
+ export declare const getPath: (obj: unknown, path: string) => unknown;
8
+ export declare const setPath: <T>(obj: T, path: string, value: unknown) => T;
9
+ export declare const deletePath: <T>(obj: T, path: string) => T;
10
+ //# sourceMappingURL=path.d.ts.map
@@ -0,0 +1,31 @@
1
+ import type { PasswordRules } from '../validators';
2
+ import type { FormValues, ValidationRule } from './types';
3
+ export declare const required: (message?: string) => ValidationRule;
4
+ export declare const email: (message?: string) => ValidationRule;
5
+ export declare const mobile: (message?: string) => ValidationRule;
6
+ export declare const phone: (message?: string) => ValidationRule;
7
+ export declare const url: (message?: string) => ValidationRule;
8
+ export declare const numeric: (message?: string) => ValidationRule;
9
+ export declare const integer: (message?: string) => ValidationRule;
10
+ export declare const alphanumeric: (message?: string) => ValidationRule;
11
+ export declare const pincode: (message?: string) => ValidationRule;
12
+ export declare const pan: (message?: string) => ValidationRule;
13
+ export declare const gstin: (message?: string) => ValidationRule;
14
+ export declare const aadhaar: (message?: string) => ValidationRule;
15
+ export declare const ifsc: (message?: string) => ValidationRule;
16
+ export declare const minLength: (length: number, message?: string) => ValidationRule;
17
+ export declare const maxLength: (length: number, message?: string) => ValidationRule;
18
+ export declare const min: (n: number, message?: string) => ValidationRule;
19
+ export declare const max: (n: number, message?: string) => ValidationRule;
20
+ export declare const pattern: (regex: RegExp, message?: string) => ValidationRule;
21
+ export declare const oneOf: (allowed: readonly unknown[], message?: string) => ValidationRule;
22
+ /** Cross-field equality (e.g. confirm-password). `otherField` is a field path. */
23
+ export declare const matches: (otherField: string, message?: string) => ValidationRule<unknown, FormValues>;
24
+ export declare const strongPassword: (rules?: PasswordRules, message?: string) => ValidationRule;
25
+ /**
26
+ * Wrap any custom check. Return `true` (valid), `false` (invalid → default
27
+ * message), or a string (invalid → that message). Async is supported — return
28
+ * a Promise of the same.
29
+ */
30
+ export declare const custom: (fn: (value: any, allValues: FormValues) => boolean | string | Promise<boolean | string>, message?: string) => ValidationRule;
31
+ //# sourceMappingURL=rules.d.ts.map