@webority/mobile-ui 0.15.0 → 0.16.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 (161) hide show
  1. package/lib/commonjs/components/Accordion/Accordion.js +1 -1
  2. package/lib/commonjs/components/AmountSlider/AmountSlider.js +1 -1
  3. package/lib/commonjs/components/AnimatePresence/AnimatePresence.js +1 -1
  4. package/lib/commonjs/components/AppBar/AppBar.js +1 -1
  5. package/lib/commonjs/components/AsyncBlock/AsyncBlock.js +1 -1
  6. package/lib/commonjs/components/Banner/Banner.js +1 -1
  7. package/lib/commonjs/components/BottomSheet/BottomSheet.js +1 -1
  8. package/lib/commonjs/components/Button/Button.js +1 -1
  9. package/lib/commonjs/components/Calendar/Calendar.js +1 -1
  10. package/lib/commonjs/components/Card/Card.js +1 -1
  11. package/lib/commonjs/components/Carousel/Carousel.js +1 -1
  12. package/lib/commonjs/components/Chip/Chip.js +1 -1
  13. package/lib/commonjs/components/DatePicker/DatePicker.js +1 -1
  14. package/lib/commonjs/components/DateRangePicker/DateRangePicker.js +1 -1
  15. package/lib/commonjs/components/Drawer/Drawer.js +1 -1
  16. package/lib/commonjs/components/EmptyState/EmptyState.js +1 -1
  17. package/lib/commonjs/components/FloatingActionButton/FloatingActionButton.js +1 -1
  18. package/lib/commonjs/components/IconButton/IconButton.js +1 -1
  19. package/lib/commonjs/components/ListItem/ListItem.js +1 -1
  20. package/lib/commonjs/components/LoaderOverlay/LoaderOverlay.js +1 -1
  21. package/lib/commonjs/components/Menu/MenuSurface.js +1 -1
  22. package/lib/commonjs/components/MessageBubble/MessageBubble.js +1 -1
  23. package/lib/commonjs/components/Modal/Modal.js +1 -1
  24. package/lib/commonjs/components/OTPInput/OTPInput.js +1 -1
  25. package/lib/commonjs/components/OnboardingPager/OnboardingPager.js +1 -1
  26. package/lib/commonjs/components/OptionSheet/OptionSheet.js +1 -1
  27. package/lib/commonjs/components/ProgressBar/ProgressBar.js +1 -1
  28. package/lib/commonjs/components/Screen/Screen.js +1 -0
  29. package/lib/commonjs/components/Screen/index.js +1 -0
  30. package/lib/commonjs/components/SignaturePad/SignaturePad.js +1 -1
  31. package/lib/commonjs/components/Skeleton/Skeleton.js +1 -1
  32. package/lib/commonjs/components/Skeleton/SkeletonContent.js +1 -1
  33. package/lib/commonjs/components/Skeleton/SkeletonProvider.js +1 -1
  34. package/lib/commonjs/components/Skeleton/index.js +1 -1
  35. package/lib/commonjs/components/Spinner/Spinner.js +1 -1
  36. package/lib/commonjs/components/TagInput/TagInput.js +1 -1
  37. package/lib/commonjs/components/Text/Text.js +1 -1
  38. package/lib/commonjs/components/TimePicker/TimePicker.js +1 -1
  39. package/lib/commonjs/components/Toast/Toast.js +1 -1
  40. package/lib/commonjs/components/Tooltip/Tooltip.js +1 -1
  41. package/lib/commonjs/components/Tour/Tour.js +1 -1
  42. package/lib/commonjs/components/WheelPicker/Wheel.js +1 -1
  43. package/lib/commonjs/components/WheelPicker/WheelPicker.js +1 -1
  44. package/lib/commonjs/components/index.js +1 -1
  45. package/lib/commonjs/hooks/index.js +1 -1
  46. package/lib/commonjs/hooks/useDragToDismiss.js +1 -1
  47. package/lib/commonjs/hooks/useFieldChain.js +1 -0
  48. package/lib/commonjs/hooks/usePresenceMotion.js +1 -0
  49. package/lib/commonjs/hooks/usePressAnimation.js +1 -1
  50. package/lib/commonjs/hooks/useReducedMotion.js +1 -1
  51. package/lib/commonjs/index.js +1 -1
  52. package/lib/commonjs/network/NetworkStatusBanner.js +1 -1
  53. package/lib/commonjs/theme/tokens.js +1 -1
  54. package/lib/commonjs/utils/hapticUtils.js +1 -1
  55. package/lib/module/components/Accordion/Accordion.js +1 -1
  56. package/lib/module/components/AmountSlider/AmountSlider.js +1 -1
  57. package/lib/module/components/AnimatePresence/AnimatePresence.js +1 -1
  58. package/lib/module/components/AppBar/AppBar.js +1 -1
  59. package/lib/module/components/AsyncBlock/AsyncBlock.js +1 -1
  60. package/lib/module/components/Banner/Banner.js +1 -1
  61. package/lib/module/components/BottomSheet/BottomSheet.js +1 -1
  62. package/lib/module/components/Button/Button.js +1 -1
  63. package/lib/module/components/Calendar/Calendar.js +1 -1
  64. package/lib/module/components/Card/Card.js +1 -1
  65. package/lib/module/components/Carousel/Carousel.js +1 -1
  66. package/lib/module/components/Chip/Chip.js +1 -1
  67. package/lib/module/components/DatePicker/DatePicker.js +1 -1
  68. package/lib/module/components/DateRangePicker/DateRangePicker.js +1 -1
  69. package/lib/module/components/Drawer/Drawer.js +1 -1
  70. package/lib/module/components/EmptyState/EmptyState.js +1 -1
  71. package/lib/module/components/FloatingActionButton/FloatingActionButton.js +1 -1
  72. package/lib/module/components/IconButton/IconButton.js +1 -1
  73. package/lib/module/components/ListItem/ListItem.js +1 -1
  74. package/lib/module/components/LoaderOverlay/LoaderOverlay.js +1 -1
  75. package/lib/module/components/Menu/MenuSurface.js +1 -1
  76. package/lib/module/components/MessageBubble/MessageBubble.js +1 -1
  77. package/lib/module/components/Modal/Modal.js +1 -1
  78. package/lib/module/components/OTPInput/OTPInput.js +1 -1
  79. package/lib/module/components/OnboardingPager/OnboardingPager.js +1 -1
  80. package/lib/module/components/OptionSheet/OptionSheet.js +1 -1
  81. package/lib/module/components/ProgressBar/ProgressBar.js +1 -1
  82. package/lib/module/components/Screen/Screen.js +1 -0
  83. package/lib/module/components/Screen/index.js +1 -0
  84. package/lib/module/components/SignaturePad/SignaturePad.js +1 -1
  85. package/lib/module/components/Skeleton/Skeleton.js +1 -1
  86. package/lib/module/components/Skeleton/SkeletonContent.js +1 -1
  87. package/lib/module/components/Skeleton/SkeletonProvider.js +1 -1
  88. package/lib/module/components/Skeleton/index.js +1 -1
  89. package/lib/module/components/Spinner/Spinner.js +1 -1
  90. package/lib/module/components/TagInput/TagInput.js +1 -1
  91. package/lib/module/components/Text/Text.js +1 -1
  92. package/lib/module/components/TimePicker/TimePicker.js +1 -1
  93. package/lib/module/components/Toast/Toast.js +1 -1
  94. package/lib/module/components/Tooltip/Tooltip.js +1 -1
  95. package/lib/module/components/Tour/Tour.js +1 -1
  96. package/lib/module/components/WheelPicker/Wheel.js +1 -1
  97. package/lib/module/components/WheelPicker/WheelPicker.js +1 -1
  98. package/lib/module/components/index.js +1 -1
  99. package/lib/module/hooks/index.js +1 -1
  100. package/lib/module/hooks/useDragToDismiss.js +1 -1
  101. package/lib/module/hooks/useFieldChain.js +1 -0
  102. package/lib/module/hooks/usePresenceMotion.js +1 -0
  103. package/lib/module/hooks/usePressAnimation.js +1 -1
  104. package/lib/module/hooks/useReducedMotion.js +1 -1
  105. package/lib/module/index.js +1 -1
  106. package/lib/module/network/NetworkStatusBanner.js +1 -1
  107. package/lib/module/theme/tokens.js +1 -1
  108. package/lib/module/utils/hapticUtils.js +1 -1
  109. package/lib/typescript/commonjs/components/AnimatePresence/AnimatePresence.d.ts +5 -5
  110. package/lib/typescript/commonjs/components/AsyncBlock/AsyncBlock.d.ts +11 -6
  111. package/lib/typescript/commonjs/components/BottomSheet/BottomSheet.d.ts +8 -2
  112. package/lib/typescript/commonjs/components/Button/Button.d.ts +6 -3
  113. package/lib/typescript/commonjs/components/Card/Card.d.ts +1 -1
  114. package/lib/typescript/commonjs/components/Carousel/Carousel.d.ts +2 -0
  115. package/lib/typescript/commonjs/components/ListItem/ListItem.d.ts +1 -1
  116. package/lib/typescript/commonjs/components/MessageBubble/MessageBubble.d.ts +6 -3
  117. package/lib/typescript/commonjs/components/OTPInput/OTPInput.d.ts +1 -2
  118. package/lib/typescript/commonjs/components/Screen/Screen.d.ts +39 -0
  119. package/lib/typescript/commonjs/components/Screen/index.d.ts +3 -0
  120. package/lib/typescript/commonjs/components/SignaturePad/SignaturePad.d.ts +6 -0
  121. package/lib/typescript/commonjs/components/Skeleton/Skeleton.d.ts +2 -2
  122. package/lib/typescript/commonjs/components/Skeleton/SkeletonProvider.d.ts +3 -11
  123. package/lib/typescript/commonjs/components/Skeleton/index.d.ts +1 -1
  124. package/lib/typescript/commonjs/components/WheelPicker/Wheel.d.ts +2 -0
  125. package/lib/typescript/commonjs/components/WheelPicker/WheelPicker.d.ts +5 -0
  126. package/lib/typescript/commonjs/components/index.d.ts +3 -1
  127. package/lib/typescript/commonjs/hooks/index.d.ts +4 -0
  128. package/lib/typescript/commonjs/hooks/useDragToDismiss.d.ts +10 -2
  129. package/lib/typescript/commonjs/hooks/useFieldChain.d.ts +10 -0
  130. package/lib/typescript/commonjs/hooks/usePresenceMotion.d.ts +14 -0
  131. package/lib/typescript/commonjs/hooks/usePressAnimation.d.ts +2 -2
  132. package/lib/typescript/commonjs/hooks/useReducedMotion.d.ts +0 -6
  133. package/lib/typescript/commonjs/index.d.ts +2 -2
  134. package/lib/typescript/commonjs/theme/types.d.ts +4 -0
  135. package/lib/typescript/module/components/AnimatePresence/AnimatePresence.d.ts +5 -5
  136. package/lib/typescript/module/components/AsyncBlock/AsyncBlock.d.ts +11 -6
  137. package/lib/typescript/module/components/BottomSheet/BottomSheet.d.ts +8 -2
  138. package/lib/typescript/module/components/Button/Button.d.ts +6 -3
  139. package/lib/typescript/module/components/Card/Card.d.ts +1 -1
  140. package/lib/typescript/module/components/Carousel/Carousel.d.ts +2 -0
  141. package/lib/typescript/module/components/ListItem/ListItem.d.ts +1 -1
  142. package/lib/typescript/module/components/MessageBubble/MessageBubble.d.ts +6 -3
  143. package/lib/typescript/module/components/OTPInput/OTPInput.d.ts +1 -2
  144. package/lib/typescript/module/components/Screen/Screen.d.ts +39 -0
  145. package/lib/typescript/module/components/Screen/index.d.ts +3 -0
  146. package/lib/typescript/module/components/SignaturePad/SignaturePad.d.ts +6 -0
  147. package/lib/typescript/module/components/Skeleton/Skeleton.d.ts +2 -2
  148. package/lib/typescript/module/components/Skeleton/SkeletonProvider.d.ts +3 -11
  149. package/lib/typescript/module/components/Skeleton/index.d.ts +1 -1
  150. package/lib/typescript/module/components/WheelPicker/Wheel.d.ts +2 -0
  151. package/lib/typescript/module/components/WheelPicker/WheelPicker.d.ts +5 -0
  152. package/lib/typescript/module/components/index.d.ts +3 -1
  153. package/lib/typescript/module/hooks/index.d.ts +4 -0
  154. package/lib/typescript/module/hooks/useDragToDismiss.d.ts +10 -2
  155. package/lib/typescript/module/hooks/useFieldChain.d.ts +10 -0
  156. package/lib/typescript/module/hooks/usePresenceMotion.d.ts +14 -0
  157. package/lib/typescript/module/hooks/usePressAnimation.d.ts +2 -2
  158. package/lib/typescript/module/hooks/useReducedMotion.d.ts +0 -6
  159. package/lib/typescript/module/index.d.ts +2 -2
  160. package/lib/typescript/module/theme/types.d.ts +4 -0
  161. package/package.json +3 -3
@@ -49,11 +49,17 @@ export interface BottomSheetProps {
49
49
  */
50
50
  onAfterClose?: () => void;
51
51
  enablePanDownToClose?: boolean;
52
+ /**
53
+ * Whether a tap on the scrim closes the sheet. Android Back and web Escape
54
+ * follow it: when off, they do nothing either, so a sheet that must be
55
+ * answered stays open.
56
+ */
52
57
  enableBackdropPress?: boolean;
53
58
  /**
54
59
  * Asked before the user dismisses the sheet: a handle drag past the close
55
- * threshold or a fast swipe down, a tap on the scrim, hardware Back (Android)
56
- * and Escape (web), and `requestClose()`. Return `true` (or resolve `true`)
60
+ * threshold or a fast swipe down, `requestClose()`, and, while
61
+ * `enableBackdropPress` is on, a tap on the scrim, hardware Back (Android)
62
+ * and Escape (web). Return `true` (or resolve `true`)
57
63
  * to let it close, `false` to keep it open. A refused drag springs back to
58
64
  * the snap point it started from, and `onChange(-1)` does not fire.
59
65
  *
@@ -31,9 +31,10 @@ export interface ButtonProps extends Omit<PressableProps, 'style' | 'children'>
31
31
  tone?: ButtonTone;
32
32
  size?: ButtonSize;
33
33
  /**
34
- * When true, the button is disabled and renders a Spinner in place of the title (icons hidden).
35
- * Use for in-flight submissions. This is **not** SkeletonContent — interactive controls signal
36
- * pending action with an inline spinner, not a placeholder shimmer.
34
+ * When true, the button is disabled and shows a Spinner in front of the title, in the leading
35
+ * icon slot, and the title stays readable. Use for in-flight submissions. This is **not**
36
+ * SkeletonContent. Interactive controls signal pending action with an inline spinner, not a
37
+ * placeholder shimmer.
37
38
  */
38
39
  loading?: boolean;
39
40
  disabled?: boolean;
@@ -69,6 +70,8 @@ export interface ButtonProps extends Omit<PressableProps, 'style' | 'children'>
69
70
  */
70
71
  gradient?: string | GradientDefinition;
71
72
  style?: StyleProp<ViewStyle>;
73
+ /** Style for the outer wrapper, outside the pressed area: margins go here so the tap target keeps its size. */
74
+ containerStyle?: StyleProp<ViewStyle>;
72
75
  textStyle?: StyleProp<TextStyle>;
73
76
  /**
74
77
  * Press feedback by name: `'scale'` (default), `'bounce'`, `'fade'`,
@@ -70,7 +70,7 @@ export interface CardProps extends Omit<PressableProps, 'style' | 'children'> {
70
70
  */
71
71
  gradient?: string | GradientDefinition;
72
72
  onPress?: (event: GestureResponderEvent) => void;
73
- /** Haptic feedback for interactions. Pass false to disable; pass a HapticType to override the default. */
73
+ /** Haptic feedback for interactions. Off unless a HapticType is passed. */
74
74
  haptic?: HapticType | false;
75
75
  /**
76
76
  * A long-press menu. Long press (right-click or Shift+F10 on the web) lifts
@@ -31,6 +31,8 @@ export interface CarouselProps<T = unknown> {
31
31
  /** Initial index for uncontrolled usage. */
32
32
  defaultIndex?: number;
33
33
  onIndexChange?: (index: number) => void;
34
+ /** Horizontal scroll offset in dp, fired on each scroll frame. Listening costs a JS call per frame, so it is attached only when set. */
35
+ onScrollOffsetChange?: (offset: number) => void;
34
36
  autoPlay?: boolean;
35
37
  /** Auto-play tick in ms. Default 4000. */
36
38
  autoPlayInterval?: number;
@@ -78,7 +78,7 @@ export interface ListItemProps {
78
78
  */
79
79
  actions?: React.ReactNode | ListItemAction[];
80
80
  onPress?: (event: GestureResponderEvent) => void;
81
- /** Haptic feedback for interactions. Pass false to disable; pass a HapticType to override the default. */
81
+ /** Haptic feedback for interactions. Off unless a HapticType is passed. */
82
82
  haptic?: HapticType | false;
83
83
  selected?: boolean;
84
84
  disabled?: boolean;
@@ -31,6 +31,7 @@ export interface MessageBubbleLabels {
31
31
  read: string;
32
32
  failed: string;
33
33
  retry: string;
34
+ copy: string;
34
35
  replyTo: (author: string | undefined) => string;
35
36
  }
36
37
  export declare const DEFAULT_MESSAGE_BUBBLE_LABELS: Readonly<MessageBubbleLabels>;
@@ -61,11 +62,13 @@ export interface MessageBubbleProps {
61
62
  /** Shows Try again under a failed message, and offers it as an accessibility action. */
62
63
  onRetry?: () => void;
63
64
  /**
64
- * Long-press actions (Copy, Reply). They are the screen reader's
65
- * accessibility actions; a long press calls `onLongPress` to show them,
66
- * typically in a menu. Without actions there is no long press.
65
+ * Long-press actions (Reply, and any the app adds). They are the items of the
66
+ * long-press menu over the bubble and the screen reader's accessibility actions.
67
67
  */
68
68
  actions?: ReadonlyArray<MessageAction>;
69
+ /** Adds Copy to the long-press menu and the accessibility actions; the app writes `text` to the clipboard. */
70
+ onCopy?: (text: string) => void;
71
+ /** Called on a long press, after the menu opens. */
69
72
  onLongPress?: () => void;
70
73
  /** Content under the bubble on the same side (action cards, a rating). */
71
74
  footer?: React.ReactNode;
@@ -30,8 +30,7 @@ export interface OTPInputProps {
30
30
  size?: OTPInputSize;
31
31
  secure?: boolean;
32
32
  /**
33
- * Haptic feedback for interactions. Pass false to disable; pass a HapticType
34
- * to override the default.
33
+ * Haptic feedback for interactions. Off unless a HapticType is passed.
35
34
  */
36
35
  haptic?: HapticType | false;
37
36
  accessibilityLabel?: string;
@@ -0,0 +1,39 @@
1
+ import type React from 'react';
2
+ import type { FlatListProps, StyleProp, ViewStyle } from 'react-native';
3
+ import type { AppBarRightAction } from '../AppBar/index.js';
4
+ import type { SafeAreaEdge } from '../KeyboardAwareScrollView/KeyboardAwareScrollView.js';
5
+ export interface ScreenProps<ItemT = unknown> {
6
+ title?: string;
7
+ subtitle?: string;
8
+ /** Large title that collapses into the bar on scroll. Default true. */
9
+ largeTitle?: boolean;
10
+ /** Shows the back chevron; runs on press and on Android Back. */
11
+ onBack?: () => void;
12
+ rightActions?: AppBarRightAction[];
13
+ leading?: React.ReactNode;
14
+ children?: React.ReactNode;
15
+ onRefresh?: () => unknown;
16
+ refreshing?: boolean;
17
+ /** Pinned under the content, above the keyboard. */
18
+ footer?: React.ReactNode;
19
+ footerStyle?: StyleProp<ViewStyle>;
20
+ /** Default true; false renders a plain View. */
21
+ scroll?: boolean;
22
+ /** Virtualised list mode; its scroll drives the title collapse. */
23
+ list?: Omit<FlatListProps<ItemT>, 'onScroll' | 'refreshControl'>;
24
+ /** Safe-area edges padded. Default top and bottom; a tab screen passes top only. */
25
+ edges?: SafeAreaEdge[];
26
+ /** Default true. */
27
+ keyboardToolbar?: boolean;
28
+ contentContainerStyle?: StyleProp<ViewStyle>;
29
+ style?: StyleProp<ViewStyle>;
30
+ testID?: string;
31
+ }
32
+ /**
33
+ * The page shell: safe area, app bar with a large title that collapses as the
34
+ * content scrolls, a keyboard-aware scroll view (or a virtualised list), pull to
35
+ * refresh, a pinned footer and the keyboard toolbar. The app keeps its own back
36
+ * guard (`usePreventRemove`) and passes `onBack`; the screen never navigates.
37
+ */
38
+ export declare function Screen<ItemT = unknown>(props: ScreenProps<ItemT>): React.ReactElement;
39
+ //# sourceMappingURL=Screen.d.ts.map
@@ -0,0 +1,3 @@
1
+ export type { ScreenProps } from './Screen.js';
2
+ export { Screen } from './Screen.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -28,6 +28,12 @@ export interface SignaturePadLabels {
28
28
  undoneAnnouncement: string;
29
29
  /** Message of the error `toFile()` rejects with while nothing is signed. */
30
30
  emptyError: string;
31
+ /** Opens the pad full screen. */
32
+ expand: string;
33
+ /** Closes the full-screen pad and keeps its strokes. */
34
+ done: string;
35
+ /** Closes the full-screen pad and discards its strokes. */
36
+ close: string;
31
37
  }
32
38
  export interface SignaturePadRef {
33
39
  /**
@@ -15,8 +15,8 @@
15
15
  * - For `animation: 'pulse'`, a full-fill Animated.View fades its opacity
16
16
  * between 0 and 0.6. Cheap and useful for tiny shapes where a sweep
17
17
  * would barely be visible.
18
- * - For `animation: 'none'` (or when the OS Reduce Motion preference is
19
- * on), just the base color renders.
18
+ * - For `animation: 'none'`, just the base color renders. Under the OS Reduce
19
+ * Motion preference an `'auto'` shimmer plays the pulse instead.
20
20
  *
21
21
  * `variant` describes the SHAPE: rect (default), rounded (theme.radius.md),
22
22
  * circle (50%), or text (small radius, slightly inset height). Set width /
@@ -8,10 +8,8 @@
8
8
  * every primitive shares a single Animated.Value — synchronized shimmer
9
9
  * across the whole subtree, one native-driver loop per provider.
10
10
  *
11
- * Also honors the OS "Reduce Motion" preference: when enabled, the clock is
12
- * paused and skeletons render as static dim blocks. The detection is live —
13
- * if the user toggles the setting while the app is open the skeletons stop
14
- * shimmering immediately.
11
+ * Under the OS "Reduce Motion" preference an `'auto'` skeleton pulses instead
12
+ * of sweeping (see Skeleton.tsx); the clock keeps running for the pulse.
15
13
  */
16
14
  import type React from 'react';
17
15
  import type { ReactNode } from 'react';
@@ -41,7 +39,7 @@ export interface SkeletonProviderDefaults {
41
39
  fadeDuration?: number;
42
40
  /**
43
41
  * Hard override for animation. `'auto'` (default) follows the OS
44
- * "Reduce Motion" preference: shimmer when off, static when on. `'always'`
42
+ * "Reduce Motion" preference: shimmer when off, pulse when on. `'always'`
45
43
  * forces shimmer regardless. `'never'` forces static — useful for tests or
46
44
  * battery-sensitive screens.
47
45
  */
@@ -57,10 +55,4 @@ export declare const SkeletonProvider: React.FC<SkeletonProviderProps>;
57
55
  * one — but without a shared clock or theme-coordinated colors.
58
56
  */
59
57
  export declare const useSkeletonDefaults: () => SkeletonProviderDefaults;
60
- /**
61
- * Subscribes to the OS "Reduce Motion" preference. Live — updates when the
62
- * user toggles the setting while the app is open. Used internally by
63
- * `SkeletonProvider`; exposed so consumer screens can branch on it too.
64
- */
65
- export declare const useReduceMotion: () => boolean;
66
58
  //# sourceMappingURL=SkeletonProvider.d.ts.map
@@ -7,7 +7,7 @@ export { SkeletonContent } from './SkeletonContent.js';
7
7
  export type { SkeletonListProps } from './SkeletonList.js';
8
8
  export { SkeletonList } from './SkeletonList.js';
9
9
  export type { SkeletonColors, SkeletonProviderDefaults, SkeletonProviderProps } from './SkeletonProvider.js';
10
- export { SkeletonProvider, useReduceMotion, useSkeletonDefaults } from './SkeletonProvider.js';
10
+ export { SkeletonProvider, useSkeletonDefaults } from './SkeletonProvider.js';
11
11
  export type { SkeletonSkipProps } from './SkeletonSkip.js';
12
12
  export { SkeletonSkip } from './SkeletonSkip.js';
13
13
  //# sourceMappingURL=index.d.ts.map
@@ -21,6 +21,8 @@ interface WheelProps {
21
21
  haptic?: HapticType | false;
22
22
  disabled?: boolean;
23
23
  reducedMotion: boolean;
24
+ /** Tapping the selected value opens an inline number field for it. */
25
+ typeable?: boolean;
24
26
  testID?: string;
25
27
  }
26
28
  /**
@@ -64,6 +64,11 @@ export interface WheelPickerDurationProps extends WheelPickerBaseProps {
64
64
  minuteStep?: WheelDurationStep;
65
65
  /** Upper bound in minutes. Default and ceiling 1439 (23 h 59 min). */
66
66
  maxMinutes?: number;
67
+ /**
68
+ * Durations in minutes, drawn as chips below the wheel; a tap sets the duration. Each must be a
69
+ * whole number of minutes from 0 to `maxMinutes` in steps of `minuteStep`, or the picker throws.
70
+ */
71
+ presets?: number[];
67
72
  labels?: WheelPickerDurationLabels;
68
73
  }
69
74
  export type WheelPickerProps = WheelPickerColumnsProps | WheelPickerListProps | WheelPickerDurationProps;
@@ -140,6 +140,8 @@ export type { BlockMarkdownAction, EditorSelection, EditorState, InlineMarkdownA
140
140
  export { applyMarkdownAction, RichTextEditor } from './RichTextEditor/index.js';
141
141
  export type { ScannerOverlayLabels, ScannerOverlayProps, ScannerOverlayState } from './ScannerOverlay/index.js';
142
142
  export { ScannerOverlay } from './ScannerOverlay/index.js';
143
+ export type { ScreenProps } from './Screen/index.js';
144
+ export { Screen } from './Screen/index.js';
143
145
  export type { SearchBarProps, SearchBarSize, SearchBarVariant, SearchScope, SearchSuggestion, UseRecentSearchesOptions, UseRecentSearchesResult } from './SearchBar/index.js';
144
146
  export { SearchBar, useRecentSearches } from './SearchBar/index.js';
145
147
  export type { SectionHeaderProps, SectionHeaderVariant } from './SectionHeader/index.js';
@@ -151,7 +153,7 @@ export { Select } from './Select/index.js';
151
153
  export type { SignatureMode, SignaturePadLabels, SignaturePadProps, SignaturePadRef, SignaturePoint, SignatureStroke } from './SignaturePad/index.js';
152
154
  export { SignaturePad } from './SignaturePad/index.js';
153
155
  export type { SkeletonCircleProps, SkeletonClockProviderProps, SkeletonClockValue, SkeletonColors, SkeletonContentProps, SkeletonListProps, SkeletonProps, SkeletonProviderDefaults, SkeletonProviderProps, SkeletonRadius, SkeletonShape, SkeletonSkipProps, SkeletonSpeed, SkeletonStaticOf, SkeletonTextProps, SkeletonVariant, SkeletonWidth } from './Skeleton/index.js';
154
- export { Skeleton, SkeletonCircle, SkeletonClockProvider, SkeletonContent, SkeletonList, SkeletonProvider, SkeletonSkip, SkeletonText, useReduceMotion, useSkeletonClock, useSkeletonDefaults } from './Skeleton/index.js';
156
+ export { Skeleton, SkeletonCircle, SkeletonClockProvider, SkeletonContent, SkeletonList, SkeletonProvider, SkeletonSkip, SkeletonText, useSkeletonClock, useSkeletonDefaults } from './Skeleton/index.js';
155
157
  export type { SliderProps, SliderSize, SliderTone, SliderVariant } from './Slider/index.js';
156
158
  export { Slider } from './Slider/index.js';
157
159
  export type { SliderFieldProps } from './SliderField/index.js';
@@ -3,7 +3,11 @@ export { useControllableState } from './useControllableState.js';
3
3
  export { useDebounce } from './useDebounce.js';
4
4
  export type { DragToDismissController, SheetNativeGesture, SheetPanGesture, UseDragToDismissOptions, UseDragToDismissResult } from './useDragToDismiss.js';
5
5
  export { createDragToDismissController, DRAG_DISMISS_DISTANCE, DRAG_DISMISS_VELOCITY, useDragToDismiss } from './useDragToDismiss.js';
6
+ export type { FieldChain, FieldChainProps } from './useFieldChain.js';
7
+ export { useFieldChain } from './useFieldChain.js';
6
8
  export { FLICK_TOLERANCE, useFlickGuard } from './useFlickGuard.js';
9
+ export type { MotionDurationKey, PresenceMotion } from './usePresenceMotion.js';
10
+ export { PRESENCE_REDUCE_MOTION, usePresenceMotion } from './usePresenceMotion.js';
7
11
  export type { PressAnimationPreset, UsePressAnimationOptions, UsePressAnimationResult } from './usePressAnimation.js';
8
12
  export { PRESS_ANIMATION_PRESETS, usePressAnimation } from './usePressAnimation.js';
9
13
  export { useReducedMotion } from './useReducedMotion.js';
@@ -16,7 +16,8 @@
16
16
  * top the same finger pulls the sheet down.
17
17
  *
18
18
  * Release past the distance or velocity threshold slides the sheet the rest
19
- * of the way and calls `onDismiss`; a short drag springs back. The sheet's
19
+ * of the way and calls `onDismiss`; a short drag springs back. Under Reduce
20
+ * Motion the close fades `opacity` out instead of sliding. The sheet's
20
21
  * translation is a plain Animated.Value on the native driver, so the finger
21
22
  * tracking stays off the JS thread once the value is set.
22
23
  *
@@ -26,6 +27,7 @@
26
27
  import { Animated } from 'react-native';
27
28
  import { Gesture } from 'react-native-gesture-handler';
28
29
  import type { Theme } from '../theme/types.js';
30
+ import { type PresenceMotion } from './usePresenceMotion.js';
29
31
  /** The gesture types as the installed gesture-handler builds them; typed off the value so a second copy of the package cannot split them. */
30
32
  export type SheetPanGesture = ReturnType<typeof Gesture.Pan>;
31
33
  export type SheetNativeGesture = ReturnType<typeof Gesture.Native>;
@@ -49,6 +51,8 @@ export interface UseDragToDismissResult {
49
51
  handleGesture: SheetPanGesture;
50
52
  /** Wrap the sheet container in a `GestureDetector` with this. */
51
53
  sheetGesture: SheetPanGesture;
54
+ /** 1 normally; fades to 0 on a Reduce Motion close. Multiply it into the dragged surface's opacity. */
55
+ opacity: Animated.Value;
52
56
  }
53
57
  /** The drag's state machine, free of gesture-handler so it can be unit-tested. */
54
58
  export interface DragToDismissController {
@@ -59,6 +63,10 @@ export interface DragToDismissController {
59
63
  /** Something else took the gesture: spring back. */
60
64
  cancel: () => void;
61
65
  }
62
- export declare const createDragToDismissController: ({ drag, travel, onDismiss }: Pick<UseDragToDismissOptions, "drag" | "travel" | "onDismiss">, motion: Theme["motion"]) => DragToDismissController;
66
+ export interface DragToDismissControllerOptions extends Pick<UseDragToDismissOptions, 'drag' | 'travel' | 'onDismiss'> {
67
+ /** Faded to 0 by the close under Reduce Motion, in place of the slide. */
68
+ opacity?: Animated.Value;
69
+ }
70
+ export declare const createDragToDismissController: ({ drag, travel, onDismiss, opacity }: DragToDismissControllerOptions, motion: Theme["motion"], presence?: PresenceMotion) => DragToDismissController;
63
71
  export declare const useDragToDismiss: (options: UseDragToDismissOptions) => UseDragToDismissResult;
64
72
  //# sourceMappingURL=useDragToDismiss.d.ts.map
@@ -0,0 +1,10 @@
1
+ import type { TextInputProps } from 'react-native';
2
+ export type FieldChainProps = Pick<TextInputProps, 'returnKeyType' | 'submitBehavior' | 'onSubmitEditing'>;
3
+ export interface FieldChain {
4
+ /** Spread on every field but the last: Next moves focus on. */
5
+ next: FieldChainProps;
6
+ /** Spread on the last field: Done runs onDone. */
7
+ last: FieldChainProps;
8
+ }
9
+ export declare const useFieldChain: (onDone?: () => void) => FieldChain;
10
+ //# sourceMappingURL=useFieldChain.d.ts.map
@@ -0,0 +1,14 @@
1
+ import { ReduceMotion } from 'react-native-reanimated';
2
+ import type { MotionScale } from '../theme/types.js';
3
+ export type MotionDurationKey = keyof MotionScale['duration'];
4
+ /** The reduceMotion flag every Reanimated fade passes, so the fade still runs under the OS setting. */
5
+ export declare const PRESENCE_REDUCE_MOTION = ReduceMotion.Never;
6
+ export interface PresenceMotion {
7
+ reduced: boolean;
8
+ /** theme.motion.duration[key] normally, theme.motion.fadeDuration under Reduce Motion. */
9
+ duration: (key: MotionDurationKey) => number;
10
+ /** [hidden, shown] normally, [shown, shown] under Reduce Motion. */
11
+ range: <T extends number | string>(hidden: T, shown: T) => [T, T];
12
+ }
13
+ export declare const usePresenceMotion: () => PresenceMotion;
14
+ //# sourceMappingURL=usePresenceMotion.d.ts.map
@@ -1,8 +1,8 @@
1
1
  import type { Animated } from 'react-native';
2
2
  /**
3
3
  * Named press feedback. Every preset drives transform or opacity only, so it
4
- * runs on the native driver, and reads its timing from `theme.motion`, so
5
- * Reduce Motion collapses it with the rest of the library.
4
+ * runs on the native driver. Under Reduce Motion every preset plays as `'fade'`
5
+ * over the fade length, so a press never moves or springs.
6
6
  *
7
7
  * - `scale`: shrinks a touch on press-in, springs back on release. The default.
8
8
  * - `bounce`: shrinks further and comes back on the bouncy spring, overshooting once.
@@ -1,8 +1,2 @@
1
- /**
2
- * Tracks the OS "Reduce Motion" accessibility setting. The library's
3
- * ThemeProvider uses this to collapse `theme.motion` (durations → 0, springs →
4
- * near-instant) so animations don't trigger vestibular discomfort; consumers
5
- * can also read it directly to swap an animated path for a static one.
6
- */
7
1
  export declare const useReducedMotion: () => boolean;
8
2
  //# sourceMappingURL=useReducedMotion.d.ts.map
@@ -3,8 +3,8 @@ export type { AppIconName, AppIconProps, AppIconSize, CuratedIconName, IconName,
3
3
  export { APP_ICON_SIZES, AppIcon, CURATED_ICON_NAMES, defaultIcons, ICON_NAMES, ICONSAX_SUFFIX, renderSlotIcon } from './components/AppIcon/index.js';
4
4
  export type { FieldArrayApi, FieldInputProps, FieldRules, FieldState, FocusableNode, FormApi, FormCompletion, FormConfig, FormErrors, FormTouched, FormValidateFn, FormValues, HookFieldProps, HookFormFieldProps, SubmitHelpers, UseFormCompletionOptions, ValidateOn, ValidationResult, ValidationRule, ValidationSchema } from './form/index.js';
5
5
  export { deletePath, Form, getPath, HookFormField, isFieldFilled, rules, setPath, useField, useFieldArray, useForm, useFormCompletion, useFormContext, useHookFormField, useOptionalFormContext } from './form/index.js';
6
- export type { PressAnimationPreset, ScrollDirection, UseControllableStateOptions, UsePressAnimationOptions, UsePressAnimationResult, UseRefreshControlLabels, UseRefreshControlOptions, UseRefreshControlResult, UseScrollDirectionOptions, UseScrollDirectionResult, UseToggleResult } from './hooks/index.js';
7
- export { FLICK_TOLERANCE, PRESS_ANIMATION_PRESETS, useControllableState, useDebounce, useFlickGuard, usePressAnimation, useReducedMotion, useRefreshControl, useScrollDirection, useToggle } from './hooks/index.js';
6
+ export type { FieldChain, FieldChainProps, MotionDurationKey, PresenceMotion, PressAnimationPreset, ScrollDirection, UseControllableStateOptions, UsePressAnimationOptions, UsePressAnimationResult, UseRefreshControlLabels, UseRefreshControlOptions, UseRefreshControlResult, UseScrollDirectionOptions, UseScrollDirectionResult, UseToggleResult } from './hooks/index.js';
7
+ export { FLICK_TOLERANCE, PRESENCE_REDUCE_MOTION, PRESS_ANIMATION_PRESETS, useControllableState, useDebounce, useFieldChain, useFlickGuard, usePresenceMotion, usePressAnimation, useReducedMotion, useRefreshControl, useScrollDirection, useToggle } from './hooks/index.js';
8
8
  export type { InitUIOptions } from './initUI.js';
9
9
  export { initUI } from './initUI.js';
10
10
  export type { NetworkStatusBannerProps } from './network/index.js';
@@ -312,6 +312,8 @@ export interface MotionScale {
312
312
  mass: number;
313
313
  };
314
314
  };
315
+ /** Length in ms of the opacity fade that replaces movement under Reduce Motion. Never collapsed. */
316
+ fadeDuration: number;
315
317
  }
316
318
  /**
317
319
  * Per-component size tokens. Each component that exposes a `size` prop
@@ -1168,6 +1170,8 @@ export interface TextVariantSpec {
1168
1170
  fontVariant?: TextStyle['fontVariant'];
1169
1171
  /** `'display'` draws the variant in `typography.fontFamily.display` when the theme sets it; otherwise the weight faces. */
1170
1172
  fontFamily?: 'display';
1173
+ /** Announce text in this variant as a heading (accessibilityRole header). */
1174
+ heading?: boolean;
1171
1175
  }
1172
1176
  export interface Theme {
1173
1177
  mode: ColorMode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/mobile-ui",
3
- "version": "0.15.0",
3
+ "version": "0.16.1",
4
4
  "description": "Beautiful, animated, accessible React Native components, theme and form engine for Webority projects.",
5
5
  "keywords": [
6
6
  "react-native",
@@ -60,7 +60,7 @@
60
60
  }
61
61
  },
62
62
  "peerDependencies": {
63
- "@webority/mobile-core": ">=0.15.0 <0.16.0",
63
+ "@webority/mobile-core": ">=0.16.0 <0.17.0",
64
64
  "expo": ">=57.0.0",
65
65
  "expo-file-system": ">=57.0.0",
66
66
  "expo-haptics": ">=57.0.0",
@@ -107,7 +107,7 @@
107
107
  ]
108
108
  },
109
109
  "devDependencies": {
110
- "@webority/mobile-core": "0.15.0"
110
+ "@webority/mobile-core": "0.16.1"
111
111
  },
112
112
  "scripts": {
113
113
  "build": "bob build && node ../../scripts/minify-lib.mjs",