@webority/mobile-ui 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/BarChart/BarChart.js +1 -0
- package/lib/commonjs/components/BarChart/index.js +1 -0
- package/lib/commonjs/components/BarChart/scale.js +1 -0
- package/lib/commonjs/components/BottomNavigation/BottomNavigation.js +1 -1
- package/lib/commonjs/components/BottomNavigation/useScreenReaderEnabled.js +1 -0
- package/lib/commonjs/components/BottomSheet/BottomSheet.js +1 -1
- package/lib/commonjs/components/BottomSheet/index.js +1 -1
- package/lib/commonjs/components/BottomSheet/useSheetSwap.js +1 -0
- package/lib/commonjs/components/Card/Card.js +1 -1
- package/lib/commonjs/components/Composer/Composer.js +1 -0
- package/lib/commonjs/components/Composer/index.js +1 -0
- package/lib/commonjs/components/DateSeparator/DateSeparator.js +1 -0
- package/lib/commonjs/components/DateSeparator/index.js +1 -0
- package/lib/commonjs/components/FloatingActionButton/FloatingActionButton.js +1 -1
- package/lib/commonjs/components/Input/Input.js +1 -1
- package/lib/commonjs/components/ListItem/ListItem.js +1 -1
- package/lib/commonjs/components/Menu/Menu.js +1 -0
- package/lib/commonjs/components/Menu/MenuSurface.js +1 -0
- package/lib/commonjs/components/Menu/focusHost.js +1 -0
- package/lib/commonjs/components/Menu/index.js +1 -0
- package/lib/commonjs/components/Menu/menuModel.js +1 -0
- package/lib/commonjs/components/Menu/useContextMenu.js +1 -0
- package/lib/commonjs/components/Menu/webOnly.js +1 -0
- package/lib/commonjs/components/MessageBubble/MessageBubble.js +1 -0
- package/lib/commonjs/components/MessageBubble/index.js +1 -0
- package/lib/commonjs/components/MessageList/MessageList.js +1 -0
- package/lib/commonjs/components/MessageList/index.js +1 -0
- package/lib/commonjs/components/OnboardingPager/OnboardingPager.js +1 -0
- package/lib/commonjs/components/OnboardingPager/index.js +1 -0
- package/lib/commonjs/components/PaymentResult/PaymentResult.js +1 -0
- package/lib/commonjs/components/PaymentResult/index.js +1 -0
- package/lib/commonjs/components/ScannerOverlay/ScannerOverlay.js +1 -0
- package/lib/commonjs/components/ScannerOverlay/index.js +1 -0
- package/lib/commonjs/components/SearchBar/SearchBar.js +1 -1
- package/lib/commonjs/components/SearchBar/SearchPanel.js +1 -0
- package/lib/commonjs/components/SearchBar/highlight.js +1 -0
- package/lib/commonjs/components/SearchBar/index.js +1 -1
- package/lib/commonjs/components/SearchBar/useRecentSearches.js +1 -0
- package/lib/commonjs/components/Select/Select.js +1 -1
- package/lib/commonjs/components/SignaturePad/SignaturePad.js +1 -0
- package/lib/commonjs/components/SignaturePad/index.js +1 -0
- package/lib/commonjs/components/SignaturePad/signatureGeometry.js +1 -0
- package/lib/commonjs/components/SignaturePad/writePng.js +1 -0
- package/lib/commonjs/components/SignaturePad/writePng.web.js +1 -0
- package/lib/commonjs/components/Sparkline/Sparkline.js +1 -0
- package/lib/commonjs/components/Sparkline/geometry.js +1 -0
- package/lib/commonjs/components/Sparkline/index.js +1 -0
- package/lib/commonjs/components/Spinner/Spinner.js +1 -1
- package/lib/commonjs/components/StatTile/StatTile.js +1 -1
- package/lib/commonjs/components/TimePicker/TimePicker.js +1 -1
- package/lib/commonjs/components/Toast/Toast.js +1 -1
- package/lib/commonjs/components/Toast/ToastProvider.js +1 -1
- package/lib/commonjs/components/Tooltip/RichTooltipBody.js +1 -0
- package/lib/commonjs/components/Tooltip/Tooltip.js +1 -1
- package/lib/commonjs/components/Tooltip/tooltipPosition.js +1 -0
- package/lib/commonjs/components/TypingIndicator/TypingIndicator.js +1 -0
- package/lib/commonjs/components/TypingIndicator/index.js +1 -0
- package/lib/commonjs/components/WheelPicker/Wheel.js +1 -0
- package/lib/commonjs/components/WheelPicker/WheelPicker.js +1 -0
- package/lib/commonjs/components/WheelPicker/index.js +1 -0
- package/lib/commonjs/components/index.js +1 -1
- package/lib/commonjs/hooks/index.js +1 -1
- package/lib/commonjs/hooks/useRefreshControl.js +1 -0
- package/lib/commonjs/hooks/useScrollDirection.js +1 -0
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/utils/announce.js +1 -0
- package/lib/commonjs/utils/hapticUtils.js +1 -1
- package/lib/commonjs/utils/index.js +1 -1
- package/lib/commonjs/utils/placement.js +1 -0
- package/lib/module/components/BarChart/BarChart.js +1 -0
- package/lib/module/components/BarChart/index.js +1 -0
- package/lib/module/components/BarChart/scale.js +1 -0
- package/lib/module/components/BottomNavigation/BottomNavigation.js +1 -1
- package/lib/module/components/BottomNavigation/useScreenReaderEnabled.js +1 -0
- package/lib/module/components/BottomSheet/BottomSheet.js +1 -1
- package/lib/module/components/BottomSheet/index.js +1 -1
- package/lib/module/components/BottomSheet/useSheetSwap.js +1 -0
- package/lib/module/components/Card/Card.js +1 -1
- package/lib/module/components/Composer/Composer.js +1 -0
- package/lib/module/components/Composer/index.js +1 -0
- package/lib/module/components/DateSeparator/DateSeparator.js +1 -0
- package/lib/module/components/DateSeparator/index.js +1 -0
- package/lib/module/components/FloatingActionButton/FloatingActionButton.js +1 -1
- package/lib/module/components/Input/Input.js +1 -1
- package/lib/module/components/ListItem/ListItem.js +1 -1
- package/lib/module/components/Menu/Menu.js +1 -0
- package/lib/module/components/Menu/MenuSurface.js +1 -0
- package/lib/module/components/Menu/focusHost.js +1 -0
- package/lib/module/components/Menu/index.js +1 -0
- package/lib/module/components/Menu/menuModel.js +1 -0
- package/lib/module/components/Menu/useContextMenu.js +1 -0
- package/lib/module/components/Menu/webOnly.js +1 -0
- package/lib/module/components/MessageBubble/MessageBubble.js +1 -0
- package/lib/module/components/MessageBubble/index.js +1 -0
- package/lib/module/components/MessageList/MessageList.js +1 -0
- package/lib/module/components/MessageList/index.js +1 -0
- package/lib/module/components/OnboardingPager/OnboardingPager.js +1 -0
- package/lib/module/components/OnboardingPager/index.js +1 -0
- package/lib/module/components/PaymentResult/PaymentResult.js +1 -0
- package/lib/module/components/PaymentResult/index.js +1 -0
- package/lib/module/components/ScannerOverlay/ScannerOverlay.js +1 -0
- package/lib/module/components/ScannerOverlay/index.js +1 -0
- package/lib/module/components/SearchBar/SearchBar.js +1 -1
- package/lib/module/components/SearchBar/SearchPanel.js +1 -0
- package/lib/module/components/SearchBar/highlight.js +1 -0
- package/lib/module/components/SearchBar/index.js +1 -1
- package/lib/module/components/SearchBar/useRecentSearches.js +1 -0
- package/lib/module/components/Select/Select.js +1 -1
- package/lib/module/components/SignaturePad/SignaturePad.js +1 -0
- package/lib/module/components/SignaturePad/index.js +1 -0
- package/lib/module/components/SignaturePad/signatureGeometry.js +1 -0
- package/lib/module/components/SignaturePad/writePng.js +1 -0
- package/lib/module/components/SignaturePad/writePng.web.js +1 -0
- package/lib/module/components/Sparkline/Sparkline.js +1 -0
- package/lib/module/components/Sparkline/geometry.js +1 -0
- package/lib/module/components/Sparkline/index.js +1 -0
- package/lib/module/components/Spinner/Spinner.js +1 -1
- package/lib/module/components/StatTile/StatTile.js +1 -1
- package/lib/module/components/TimePicker/TimePicker.js +1 -1
- package/lib/module/components/Toast/Toast.js +1 -1
- package/lib/module/components/Toast/ToastProvider.js +1 -1
- package/lib/module/components/Tooltip/RichTooltipBody.js +1 -0
- package/lib/module/components/Tooltip/Tooltip.js +1 -1
- package/lib/module/components/Tooltip/tooltipPosition.js +1 -0
- package/lib/module/components/TypingIndicator/TypingIndicator.js +1 -0
- package/lib/module/components/TypingIndicator/index.js +1 -0
- package/lib/module/components/WheelPicker/Wheel.js +1 -0
- package/lib/module/components/WheelPicker/WheelPicker.js +1 -0
- package/lib/module/components/WheelPicker/index.js +1 -0
- package/lib/module/components/index.js +1 -1
- package/lib/module/hooks/index.js +1 -1
- package/lib/module/hooks/useRefreshControl.js +1 -0
- package/lib/module/hooks/useScrollDirection.js +1 -0
- package/lib/module/index.js +1 -1
- package/lib/module/utils/announce.js +1 -0
- package/lib/module/utils/hapticUtils.js +1 -1
- package/lib/module/utils/index.js +1 -1
- package/lib/module/utils/placement.js +1 -0
- package/lib/typescript/commonjs/components/BarChart/BarChart.d.ts +62 -0
- package/lib/typescript/commonjs/components/BarChart/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/BarChart/scale.d.ts +15 -0
- package/lib/typescript/commonjs/components/BottomNavigation/BottomNavigation.d.ts +32 -0
- package/lib/typescript/commonjs/components/BottomNavigation/index.d.ts +1 -1
- package/lib/typescript/commonjs/components/BottomNavigation/useScreenReaderEnabled.d.ts +8 -0
- package/lib/typescript/commonjs/components/BottomSheet/BottomSheet.d.ts +34 -3
- package/lib/typescript/commonjs/components/BottomSheet/index.d.ts +2 -0
- package/lib/typescript/commonjs/components/BottomSheet/useSheetSwap.d.ts +24 -0
- package/lib/typescript/commonjs/components/Card/Card.d.ts +9 -0
- package/lib/typescript/commonjs/components/Composer/Composer.d.ts +61 -0
- package/lib/typescript/commonjs/components/Composer/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/DateSeparator/DateSeparator.d.ts +37 -0
- package/lib/typescript/commonjs/components/DateSeparator/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/FloatingActionButton/FloatingActionButton.d.ts +3 -1
- package/lib/typescript/commonjs/components/Input/Input.d.ts +2 -2
- package/lib/typescript/commonjs/components/ListItem/ListItem.d.ts +9 -0
- package/lib/typescript/commonjs/components/Menu/Menu.d.ts +46 -0
- package/lib/typescript/commonjs/components/Menu/MenuSurface.d.ts +30 -0
- package/lib/typescript/commonjs/components/Menu/focusHost.d.ts +9 -0
- package/lib/typescript/commonjs/components/Menu/index.d.ts +5 -0
- package/lib/typescript/commonjs/components/Menu/menuModel.d.ts +68 -0
- package/lib/typescript/commonjs/components/Menu/useContextMenu.d.ts +58 -0
- package/lib/typescript/commonjs/components/Menu/webOnly.d.ts +7 -0
- package/lib/typescript/commonjs/components/MessageBubble/MessageBubble.d.ts +87 -0
- package/lib/typescript/commonjs/components/MessageBubble/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/MessageList/MessageList.d.ts +68 -0
- package/lib/typescript/commonjs/components/MessageList/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/OnboardingPager/OnboardingPager.d.ts +53 -0
- package/lib/typescript/commonjs/components/OnboardingPager/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/PaymentResult/PaymentResult.d.ts +71 -0
- package/lib/typescript/commonjs/components/PaymentResult/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/ScannerOverlay/ScannerOverlay.d.ts +74 -0
- package/lib/typescript/commonjs/components/ScannerOverlay/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/SearchBar/SearchBar.d.ts +35 -0
- package/lib/typescript/commonjs/components/SearchBar/SearchPanel.d.ts +49 -0
- package/lib/typescript/commonjs/components/SearchBar/highlight.d.ts +14 -0
- package/lib/typescript/commonjs/components/SearchBar/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/SearchBar/useRecentSearches.d.ts +24 -0
- package/lib/typescript/commonjs/components/Select/Select.d.ts +2 -1
- package/lib/typescript/commonjs/components/SignaturePad/SignaturePad.d.ts +94 -0
- package/lib/typescript/commonjs/components/SignaturePad/index.d.ts +4 -0
- package/lib/typescript/commonjs/components/SignaturePad/signatureGeometry.d.ts +36 -0
- package/lib/typescript/commonjs/components/SignaturePad/writePng.d.ts +7 -0
- package/lib/typescript/commonjs/components/SignaturePad/writePng.web.d.ts +3 -0
- package/lib/typescript/commonjs/components/Sparkline/Sparkline.d.ts +41 -0
- package/lib/typescript/commonjs/components/Sparkline/geometry.d.ts +20 -0
- package/lib/typescript/commonjs/components/Sparkline/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Spinner/Spinner.d.ts +7 -1
- package/lib/typescript/commonjs/components/StatTile/StatTile.d.ts +24 -1
- package/lib/typescript/commonjs/components/StatTile/index.d.ts +1 -1
- package/lib/typescript/commonjs/components/Toast/Toast.d.ts +21 -0
- package/lib/typescript/commonjs/components/Toast/ToastProvider.d.ts +21 -0
- package/lib/typescript/commonjs/components/Toast/index.d.ts +1 -1
- package/lib/typescript/commonjs/components/Tooltip/RichTooltipBody.d.ts +27 -0
- package/lib/typescript/commonjs/components/Tooltip/Tooltip.d.ts +24 -0
- package/lib/typescript/commonjs/components/Tooltip/index.d.ts +1 -1
- package/lib/typescript/commonjs/components/Tooltip/tooltipPosition.d.ts +35 -0
- package/lib/typescript/commonjs/components/TypingIndicator/TypingIndicator.d.ts +21 -0
- package/lib/typescript/commonjs/components/TypingIndicator/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/WheelPicker/Wheel.d.ts +34 -0
- package/lib/typescript/commonjs/components/WheelPicker/WheelPicker.d.ts +73 -0
- package/lib/typescript/commonjs/components/WheelPicker/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/index.d.ts +34 -8
- package/lib/typescript/commonjs/hooks/index.d.ts +4 -0
- package/lib/typescript/commonjs/hooks/useRefreshControl.d.ts +75 -0
- package/lib/typescript/commonjs/hooks/useScrollDirection.d.ts +21 -0
- package/lib/typescript/commonjs/index.d.ts +4 -4
- package/lib/typescript/commonjs/utils/announce.d.ts +14 -0
- package/lib/typescript/commonjs/utils/hapticUtils.d.ts +1 -1
- package/lib/typescript/commonjs/utils/index.d.ts +2 -0
- package/lib/typescript/commonjs/utils/placement.d.ts +55 -0
- package/lib/typescript/module/components/BarChart/BarChart.d.ts +62 -0
- package/lib/typescript/module/components/BarChart/index.d.ts +3 -0
- package/lib/typescript/module/components/BarChart/scale.d.ts +15 -0
- package/lib/typescript/module/components/BottomNavigation/BottomNavigation.d.ts +32 -0
- package/lib/typescript/module/components/BottomNavigation/index.d.ts +1 -1
- package/lib/typescript/module/components/BottomNavigation/useScreenReaderEnabled.d.ts +8 -0
- package/lib/typescript/module/components/BottomSheet/BottomSheet.d.ts +34 -3
- package/lib/typescript/module/components/BottomSheet/index.d.ts +2 -0
- package/lib/typescript/module/components/BottomSheet/useSheetSwap.d.ts +24 -0
- package/lib/typescript/module/components/Card/Card.d.ts +9 -0
- package/lib/typescript/module/components/Composer/Composer.d.ts +61 -0
- package/lib/typescript/module/components/Composer/index.d.ts +3 -0
- package/lib/typescript/module/components/DateSeparator/DateSeparator.d.ts +37 -0
- package/lib/typescript/module/components/DateSeparator/index.d.ts +3 -0
- package/lib/typescript/module/components/FloatingActionButton/FloatingActionButton.d.ts +3 -1
- package/lib/typescript/module/components/Input/Input.d.ts +2 -2
- package/lib/typescript/module/components/ListItem/ListItem.d.ts +9 -0
- package/lib/typescript/module/components/Menu/Menu.d.ts +46 -0
- package/lib/typescript/module/components/Menu/MenuSurface.d.ts +30 -0
- package/lib/typescript/module/components/Menu/focusHost.d.ts +9 -0
- package/lib/typescript/module/components/Menu/index.d.ts +5 -0
- package/lib/typescript/module/components/Menu/menuModel.d.ts +68 -0
- package/lib/typescript/module/components/Menu/useContextMenu.d.ts +58 -0
- package/lib/typescript/module/components/Menu/webOnly.d.ts +7 -0
- package/lib/typescript/module/components/MessageBubble/MessageBubble.d.ts +87 -0
- package/lib/typescript/module/components/MessageBubble/index.d.ts +3 -0
- package/lib/typescript/module/components/MessageList/MessageList.d.ts +68 -0
- package/lib/typescript/module/components/MessageList/index.d.ts +3 -0
- package/lib/typescript/module/components/OnboardingPager/OnboardingPager.d.ts +53 -0
- package/lib/typescript/module/components/OnboardingPager/index.d.ts +3 -0
- package/lib/typescript/module/components/PaymentResult/PaymentResult.d.ts +71 -0
- package/lib/typescript/module/components/PaymentResult/index.d.ts +3 -0
- package/lib/typescript/module/components/ScannerOverlay/ScannerOverlay.d.ts +74 -0
- package/lib/typescript/module/components/ScannerOverlay/index.d.ts +3 -0
- package/lib/typescript/module/components/SearchBar/SearchBar.d.ts +35 -0
- package/lib/typescript/module/components/SearchBar/SearchPanel.d.ts +49 -0
- package/lib/typescript/module/components/SearchBar/highlight.d.ts +14 -0
- package/lib/typescript/module/components/SearchBar/index.d.ts +3 -0
- package/lib/typescript/module/components/SearchBar/useRecentSearches.d.ts +24 -0
- package/lib/typescript/module/components/Select/Select.d.ts +2 -1
- package/lib/typescript/module/components/SignaturePad/SignaturePad.d.ts +94 -0
- package/lib/typescript/module/components/SignaturePad/index.d.ts +4 -0
- package/lib/typescript/module/components/SignaturePad/signatureGeometry.d.ts +36 -0
- package/lib/typescript/module/components/SignaturePad/writePng.d.ts +7 -0
- package/lib/typescript/module/components/SignaturePad/writePng.web.d.ts +3 -0
- package/lib/typescript/module/components/Sparkline/Sparkline.d.ts +41 -0
- package/lib/typescript/module/components/Sparkline/geometry.d.ts +20 -0
- package/lib/typescript/module/components/Sparkline/index.d.ts +3 -0
- package/lib/typescript/module/components/Spinner/Spinner.d.ts +7 -1
- package/lib/typescript/module/components/StatTile/StatTile.d.ts +24 -1
- package/lib/typescript/module/components/StatTile/index.d.ts +1 -1
- package/lib/typescript/module/components/Toast/Toast.d.ts +21 -0
- package/lib/typescript/module/components/Toast/ToastProvider.d.ts +21 -0
- package/lib/typescript/module/components/Toast/index.d.ts +1 -1
- package/lib/typescript/module/components/Tooltip/RichTooltipBody.d.ts +27 -0
- package/lib/typescript/module/components/Tooltip/Tooltip.d.ts +24 -0
- package/lib/typescript/module/components/Tooltip/index.d.ts +1 -1
- package/lib/typescript/module/components/Tooltip/tooltipPosition.d.ts +35 -0
- package/lib/typescript/module/components/TypingIndicator/TypingIndicator.d.ts +21 -0
- package/lib/typescript/module/components/TypingIndicator/index.d.ts +3 -0
- package/lib/typescript/module/components/WheelPicker/Wheel.d.ts +34 -0
- package/lib/typescript/module/components/WheelPicker/WheelPicker.d.ts +73 -0
- package/lib/typescript/module/components/WheelPicker/index.d.ts +3 -0
- package/lib/typescript/module/components/index.d.ts +34 -8
- package/lib/typescript/module/hooks/index.d.ts +4 -0
- package/lib/typescript/module/hooks/useRefreshControl.d.ts +75 -0
- package/lib/typescript/module/hooks/useScrollDirection.d.ts +21 -0
- package/lib/typescript/module/index.d.ts +4 -4
- package/lib/typescript/module/utils/announce.d.ts +14 -0
- package/lib/typescript/module/utils/hapticUtils.d.ts +1 -1
- package/lib/typescript/module/utils/index.d.ts +2 -0
- package/lib/typescript/module/utils/placement.d.ts +55 -0
- package/package.json +3 -3
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
import type { HapticType } from '../../utils/hapticUtils.js';
|
|
3
|
+
import type { SignatureStroke } from './signatureGeometry.js';
|
|
4
|
+
export type SignatureMode = 'draw' | 'type';
|
|
5
|
+
export interface SignaturePadLabels {
|
|
6
|
+
/** Screen-reader name of the pad. */
|
|
7
|
+
pad: string;
|
|
8
|
+
/** Screen-reader hint on the drawing pad. */
|
|
9
|
+
padHint: string;
|
|
10
|
+
/** Hint under the drawing pad. */
|
|
11
|
+
caption: string;
|
|
12
|
+
/** Hint under the typed-name preview. */
|
|
13
|
+
typedCaption: string;
|
|
14
|
+
undo: string;
|
|
15
|
+
clear: string;
|
|
16
|
+
typeInstead: string;
|
|
17
|
+
drawInstead: string;
|
|
18
|
+
typedLabel: string;
|
|
19
|
+
typedPlaceholder: string;
|
|
20
|
+
/** Screen-reader value while nothing is signed. */
|
|
21
|
+
empty: string;
|
|
22
|
+
/** Screen-reader value once signed. */
|
|
23
|
+
signed: string;
|
|
24
|
+
/** Spoken when the pad switches to typing, including at start under a screen reader. */
|
|
25
|
+
typingAnnouncement: string;
|
|
26
|
+
drawingAnnouncement: string;
|
|
27
|
+
clearedAnnouncement: string;
|
|
28
|
+
undoneAnnouncement: string;
|
|
29
|
+
/** Message of the error `toFile()` rejects with while nothing is signed. */
|
|
30
|
+
emptyError: string;
|
|
31
|
+
}
|
|
32
|
+
export interface SignaturePadRef {
|
|
33
|
+
/**
|
|
34
|
+
* Writes the signature as a PNG on an opaque ground and answers its uri: a file in the app's
|
|
35
|
+
* cache folder on iOS and Android, a data uri on web. Rejects while the pad is empty.
|
|
36
|
+
*/
|
|
37
|
+
toFile: () => Promise<string>;
|
|
38
|
+
/** The signature as a standalone SVG document string, in the current mode. */
|
|
39
|
+
toSvg: () => string;
|
|
40
|
+
/** Clears the strokes in drawing mode, or the name in typing mode. */
|
|
41
|
+
clear: () => void;
|
|
42
|
+
/** Removes the last stroke (drawing mode only). */
|
|
43
|
+
undo: () => void;
|
|
44
|
+
/** True while the active mode has no signature. */
|
|
45
|
+
isEmpty: () => boolean;
|
|
46
|
+
}
|
|
47
|
+
export interface SignaturePadProps {
|
|
48
|
+
/** A signature kept from before: each stroke a list of [x, y] points in the pad's own dp. Read once, at mount. */
|
|
49
|
+
initialStrokes?: ReadonlyArray<SignatureStroke>;
|
|
50
|
+
/** Answers the whole signature after each stroke, Undo and Clear, in the shape of `initialStrokes`. */
|
|
51
|
+
onChange?: (strokes: SignatureStroke[]) => void;
|
|
52
|
+
/** A typed name kept from before. Read once, at mount. */
|
|
53
|
+
initialTypedName?: string;
|
|
54
|
+
/** Answers the typed name on each edit and on Clear. */
|
|
55
|
+
onTypedNameChange?: (name: string) => void;
|
|
56
|
+
/** The mode to start in. Under a screen reader an untouched pad starts in `'type'`. Default `'draw'`. */
|
|
57
|
+
defaultMode?: SignatureMode;
|
|
58
|
+
onModeChange?: (mode: SignatureMode) => void;
|
|
59
|
+
/**
|
|
60
|
+
* Answers whether the active mode holds a signature, once at mount and on each change. Gate the
|
|
61
|
+
* submit button on this; the ref's `isEmpty()` cannot re-render a screen.
|
|
62
|
+
*/
|
|
63
|
+
onEmptyChange?: (isEmpty: boolean) => void;
|
|
64
|
+
/** Offers the type-your-name path. Turn it off only where a typed signature is not acceptable. Default `true`. */
|
|
65
|
+
allowTyped?: boolean;
|
|
66
|
+
/** The signer's name for the line under the pad ("Signed by Priya Raghavan, 11-Oct-2026, 3:42 PM"). */
|
|
67
|
+
signedBy?: string;
|
|
68
|
+
/** When it was signed, shown in IST. Defaults to the time of the last change made in this session; a kept signature shows no time. */
|
|
69
|
+
signedAt?: Date | string | number;
|
|
70
|
+
/** Pad height in dp. Default 180. */
|
|
71
|
+
height?: number;
|
|
72
|
+
/** Longest typed name. Default 100. */
|
|
73
|
+
maxNameLength?: number;
|
|
74
|
+
/** Ink of the strokes and the typed name. Defaults to the light theme's primary text, in both colour schemes. */
|
|
75
|
+
inkColor?: string;
|
|
76
|
+
/** Ground of the pad and of the PNG. Defaults to the light theme's elevated surface, in both colour schemes. */
|
|
77
|
+
paperColor?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Font family of the typed name. Default a system script face: Snell Roundhand on iOS, `cursive`
|
|
80
|
+
* on Android and web. Register a script font in the app and pass its family name to use it.
|
|
81
|
+
*/
|
|
82
|
+
scriptFontFamily?: string;
|
|
83
|
+
/** Texts, for localisation. Any key left out keeps its English default. */
|
|
84
|
+
labels?: Partial<SignaturePadLabels>;
|
|
85
|
+
/** Haptic on Undo, Clear and the mode switch; never while drawing. Pass `false` to disable. Default `'selection'`. */
|
|
86
|
+
haptic?: HapticType | false;
|
|
87
|
+
disabled?: boolean;
|
|
88
|
+
style?: StyleProp<ViewStyle>;
|
|
89
|
+
testID?: string;
|
|
90
|
+
}
|
|
91
|
+
declare const SignaturePad: import("react").ForwardRefExoticComponent<SignaturePadProps & import("react").RefAttributes<SignaturePadRef>>;
|
|
92
|
+
export { SignaturePad };
|
|
93
|
+
export default SignaturePad;
|
|
94
|
+
//# sourceMappingURL=SignaturePad.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { SignatureMode, SignaturePadLabels, SignaturePadProps, SignaturePadRef } from './SignaturePad.js';
|
|
2
|
+
export { SignaturePad } from './SignaturePad.js';
|
|
3
|
+
export type { SignaturePoint, SignatureStroke } from './signatureGeometry.js';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** One touch point in the pad's own coordinates (dp from its top-left corner), to one decimal. */
|
|
2
|
+
export type SignaturePoint = readonly [number, number];
|
|
3
|
+
/** One pen-down to pen-up line. */
|
|
4
|
+
export type SignatureStroke = ReadonlyArray<SignaturePoint>;
|
|
5
|
+
/** Width the exported SVG assumes before the pad has been laid out. */
|
|
6
|
+
export declare const FALLBACK_WIDTH = 320;
|
|
7
|
+
/** Where the typed name sits, as a fraction of the pad's height (the baseline rule sits there). */
|
|
8
|
+
export declare const BASELINE_RATIO = 0.7;
|
|
9
|
+
export declare const pointOf: (x: number, y: number) => SignaturePoint;
|
|
10
|
+
export declare const distanceBetween: (a: SignaturePoint, b: SignaturePoint) => number;
|
|
11
|
+
/**
|
|
12
|
+
* An SVG path through the points, smoothed with quadratic curves that use each
|
|
13
|
+
* point as a control point and the midpoint to the next as the end. Two points
|
|
14
|
+
* (a tap, which also draws a dot through the round line cap) stay a straight
|
|
15
|
+
* segment.
|
|
16
|
+
*/
|
|
17
|
+
export declare const strokePath: (points: SignatureStroke) => string;
|
|
18
|
+
/** Font size that keeps a typed name inside the pad: large for short names, shrinking to a floor. */
|
|
19
|
+
export declare const typedFontSize: (width: number, name: string) => number;
|
|
20
|
+
export declare const escapeXml: (value: string) => string;
|
|
21
|
+
export interface SignatureSvgInput {
|
|
22
|
+
width: number;
|
|
23
|
+
height: number;
|
|
24
|
+
/** `'draw'` writes the strokes, `'type'` writes the typed name. */
|
|
25
|
+
mode: 'draw' | 'type';
|
|
26
|
+
strokes: ReadonlyArray<SignatureStroke>;
|
|
27
|
+
typedName: string;
|
|
28
|
+
ink: string;
|
|
29
|
+
paper: string;
|
|
30
|
+
strokeWidth: number;
|
|
31
|
+
/** CSS font-family list for the typed name. */
|
|
32
|
+
fontFamily: string;
|
|
33
|
+
}
|
|
34
|
+
/** The signature as a standalone SVG document string, with the paper as an opaque ground. */
|
|
35
|
+
export declare const buildSignatureSvg: (input: SignatureSvgInput) => string;
|
|
36
|
+
//# sourceMappingURL=signatureGeometry.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Writes a base64 PNG into the app's cache folder and answers its file uri.
|
|
3
|
+
* expo-file-system is read here, on the first signature saved, so nothing that
|
|
4
|
+
* imports the pad pays for it at start (the web build uses `writePng.web.ts`).
|
|
5
|
+
*/
|
|
6
|
+
export declare const writePng: (base64: string) => string;
|
|
7
|
+
//# sourceMappingURL=writePng.d.ts.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sparkline: a small trend line with no axes, for a row or a tile.
|
|
3
|
+
*
|
|
4
|
+
* Drawn in real pixels with react-native-svg (the width is measured, or given),
|
|
5
|
+
* so the stroke and the last-point dot keep their shape. The range is the
|
|
6
|
+
* series' own: a sparkline shows the shape of the change, not its size. It
|
|
7
|
+
* reads as one image to a screen reader, with a label that states the start,
|
|
8
|
+
* end, low and high values, so nothing rests on the line's colour.
|
|
9
|
+
*/
|
|
10
|
+
import type { View as RNView, StyleProp, ViewStyle } from 'react-native';
|
|
11
|
+
export type SparklineTone = 'primary' | 'success' | 'warning' | 'error' | 'info' | 'neutral';
|
|
12
|
+
export interface SparklineProps {
|
|
13
|
+
/** The series, oldest first. Values that are not finite numbers are dropped. */
|
|
14
|
+
data: ReadonlyArray<number>;
|
|
15
|
+
/** Colour of the line. Default `'primary'`. Drawn in the tone's text ink so it holds 3:1 on the page in light and dark. */
|
|
16
|
+
tone?: SparklineTone;
|
|
17
|
+
/** Line colour override; wins over `tone`. */
|
|
18
|
+
color?: string;
|
|
19
|
+
/** Tint the area under the line. Default `false`. */
|
|
20
|
+
fill?: boolean;
|
|
21
|
+
/** Mark the last point with a dot. Default `true`. */
|
|
22
|
+
highlightLast?: boolean;
|
|
23
|
+
/** Height in points. Default `32`. */
|
|
24
|
+
height?: number;
|
|
25
|
+
/** Width in points. Default: the full width of a column parent; in a row, give a width or `flex: 1` through `style`. */
|
|
26
|
+
width?: number;
|
|
27
|
+
/** Line thickness in points. Default `2`. */
|
|
28
|
+
strokeWidth?: number;
|
|
29
|
+
/** What the series is, read first by a screen reader: "Collections, last 30 days". */
|
|
30
|
+
label?: string;
|
|
31
|
+
/** Writes a value into the default accessibility label. Default: the house number format (Indian grouping). */
|
|
32
|
+
formatLabel?: (value: number) => string;
|
|
33
|
+
/** Replaces the whole accessibility label. */
|
|
34
|
+
accessibilityLabel?: string;
|
|
35
|
+
style?: StyleProp<ViewStyle>;
|
|
36
|
+
testID?: string;
|
|
37
|
+
}
|
|
38
|
+
declare const Sparkline: import("react").ForwardRefExoticComponent<SparklineProps & import("react").RefAttributes<RNView>>;
|
|
39
|
+
export { Sparkline };
|
|
40
|
+
export default Sparkline;
|
|
41
|
+
//# sourceMappingURL=Sparkline.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface SparklineGeometry {
|
|
2
|
+
/** The line, an SVG path; empty when there is nothing to draw. */
|
|
3
|
+
line: string;
|
|
4
|
+
/** The line closed down to the bottom edge, for the area under it. */
|
|
5
|
+
area: string;
|
|
6
|
+
/** Where the last point sits. */
|
|
7
|
+
last: {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
} | null;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Lays the series out in real pixels. The range is the series' own (a
|
|
14
|
+
* dynamic range, not zero based: a sparkline shows shape, not size); a flat
|
|
15
|
+
* series draws along the middle rather than dividing by a zero range. Values
|
|
16
|
+
* that are not finite numbers are dropped.
|
|
17
|
+
*/
|
|
18
|
+
export declare const sparklineGeometry: (data: ReadonlyArray<number>, width: number, height: number, inset: number) => SparklineGeometry;
|
|
19
|
+
export declare const finiteValues: (data: ReadonlyArray<number>) => number[];
|
|
20
|
+
//# sourceMappingURL=geometry.d.ts.map
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { View as RNView, StyleProp, ViewStyle } from 'react-native';
|
|
3
3
|
export type SpinnerSize = 'sm' | 'md' | 'lg';
|
|
4
|
-
export type SpinnerVariant = 'circular' | 'dots';
|
|
4
|
+
export type SpinnerVariant = 'circular' | 'dots' | 'contained';
|
|
5
5
|
export interface SpinnerProps {
|
|
6
6
|
size?: SpinnerSize;
|
|
7
7
|
color?: string;
|
|
8
8
|
message?: string;
|
|
9
|
+
/** Ignored by `variant="contained"`, which fills its own parent instead. */
|
|
9
10
|
overlay?: boolean;
|
|
10
11
|
backdropColor?: string;
|
|
12
|
+
/**
|
|
13
|
+
* `'contained'` draws the indicator on a tinted round container and fills
|
|
14
|
+
* the card or section it sits in (no backdrop, no elevation), so one slow
|
|
15
|
+
* section can load without a full-screen spinner. Library default: `'circular'`.
|
|
16
|
+
*/
|
|
11
17
|
variant?: SpinnerVariant;
|
|
12
18
|
accessibilityLabel?: string;
|
|
13
19
|
style?: StyleProp<ViewStyle>;
|
|
@@ -3,6 +3,19 @@ import type { View as RNView, StyleProp, ViewStyle } from 'react-native';
|
|
|
3
3
|
import type { IconVariant } from '../AppIcon/AppIcon.js';
|
|
4
4
|
import type { SlotIcon } from '../AppIcon/slotIcon.js';
|
|
5
5
|
import type { IconBadgeTone } from '../IconBadge/index.js';
|
|
6
|
+
export interface StatTileTrend {
|
|
7
|
+
/**
|
|
8
|
+
* The change. A number is a percentage (12.4 for 12.4%) and is drawn without its own sign,
|
|
9
|
+
* because `direction` carries it; a string ("12 more") is drawn as given.
|
|
10
|
+
*/
|
|
11
|
+
value: number | string;
|
|
12
|
+
/** Which way the figure moved. `'flat'` draws a dash and no sign. */
|
|
13
|
+
direction: 'up' | 'down' | 'flat';
|
|
14
|
+
/** Which direction is good news. Colours the change green or red. Default `'up'`. */
|
|
15
|
+
goodWhen?: 'up' | 'down';
|
|
16
|
+
/** What the change is measured against, written in full: "vs last month". */
|
|
17
|
+
period?: string;
|
|
18
|
+
}
|
|
6
19
|
export interface StatTileProps {
|
|
7
20
|
/** What the figure measures, drawn small above it. */
|
|
8
21
|
label: string;
|
|
@@ -16,11 +29,21 @@ export interface StatTileProps {
|
|
|
16
29
|
tone?: IconBadgeTone;
|
|
17
30
|
/** A small line under the figure (a period, a delta). */
|
|
18
31
|
caption?: ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* How the figure changed. Drawn under the figure as an arrow, a sign and the change, so the
|
|
34
|
+
* direction never rests on colour alone: "+12.4% vs last month".
|
|
35
|
+
*/
|
|
36
|
+
trend?: StatTileTrend;
|
|
37
|
+
/** A small chart under the tile's text, usually a `Sparkline`. */
|
|
38
|
+
sparkline?: ReactNode;
|
|
19
39
|
/** Makes the tile pressable, with the button role. */
|
|
20
40
|
onPress?: () => void;
|
|
21
41
|
/** Draws a placeholder of the same footprint while the figure loads. */
|
|
22
42
|
loading?: boolean;
|
|
23
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* Announced instead of the label and figure. Defaults to `"label, value"` for a text figure,
|
|
45
|
+
* with the change after it ("up 12.4% vs last month") when there is a `trend`.
|
|
46
|
+
*/
|
|
24
47
|
accessibilityLabel?: string;
|
|
25
48
|
style?: StyleProp<ViewStyle>;
|
|
26
49
|
testID?: string;
|
|
@@ -29,10 +29,30 @@ export interface ToastOptions {
|
|
|
29
29
|
/** Style applied to the trailing action Pressable. */
|
|
30
30
|
actionButtonStyle?: StyleProp<ViewStyle>;
|
|
31
31
|
testID?: string;
|
|
32
|
+
/**
|
|
33
|
+
* A toast shown with the same key replaces the one on screen. A pending
|
|
34
|
+
* `toast.undo` commit of the replaced toast runs first.
|
|
35
|
+
*/
|
|
36
|
+
key?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Draws a thin bar along the bottom edge that empties over the duration. It is
|
|
39
|
+
* drawn full and still under reduced motion, and not drawn when the toast does
|
|
40
|
+
* not time out.
|
|
41
|
+
*/
|
|
42
|
+
countdown?: boolean;
|
|
32
43
|
}
|
|
33
44
|
export interface ToastItem extends ToastOptions {
|
|
34
45
|
id: string;
|
|
35
46
|
}
|
|
47
|
+
/** What the provider shares with every toast it draws. */
|
|
48
|
+
export interface ToastRuntime {
|
|
49
|
+
/** A screen reader is on (always false on web, where it cannot be detected). */
|
|
50
|
+
screenReaderOn: boolean;
|
|
51
|
+
/** The time left for a toast that was on screen before it moved to another host. */
|
|
52
|
+
readRemaining: (id: string) => number | undefined;
|
|
53
|
+
/** Stores the time left when a running toast unmounts, so its next host resumes it. */
|
|
54
|
+
writeRemaining: (id: string, remainingMs: number) => void;
|
|
55
|
+
}
|
|
36
56
|
export interface ToastProps {
|
|
37
57
|
toast: ToastItem;
|
|
38
58
|
index: number;
|
|
@@ -43,6 +63,7 @@ export interface ToastProps {
|
|
|
43
63
|
* keeps its remaining time. Defaults to the moment this component mounts.
|
|
44
64
|
*/
|
|
45
65
|
shownAt?: number;
|
|
66
|
+
runtime?: ToastRuntime;
|
|
46
67
|
}
|
|
47
68
|
declare const Toast: React.FC<ToastProps>;
|
|
48
69
|
export { Toast };
|
|
@@ -1,8 +1,28 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { HapticType } from '../../utils/hapticUtils.js';
|
|
3
3
|
import type { ToastOptions, ToastPosition, ToastVariant } from './Toast.js';
|
|
4
|
+
export interface ToastUndoOptions extends Omit<ToastOptions, 'message' | 'variant' | 'action' | 'countdown' | 'duration'> {
|
|
5
|
+
/** Runs when Undo is pressed. The toast closes and `onCommit` never runs. */
|
|
6
|
+
onUndo: () => void;
|
|
7
|
+
/**
|
|
8
|
+
* Runs once when the toast ends any other way: it times out, is swiped away,
|
|
9
|
+
* is hidden, is pushed out by newer toasts, is replaced by a toast with the
|
|
10
|
+
* same `key`, or the provider unmounts. Do the irreversible part here.
|
|
11
|
+
*/
|
|
12
|
+
onCommit?: () => void;
|
|
13
|
+
/** Label of the action button. Default `Undo`. */
|
|
14
|
+
undoLabel?: string;
|
|
15
|
+
/**
|
|
16
|
+
* How long Undo stays, in ms. Default `6000`, never shorter than `6000`; `0`
|
|
17
|
+
* keeps it until dismissed. With a screen reader on the toast waits to be
|
|
18
|
+
* dismissed whatever this is, so keep the item recoverable some other way.
|
|
19
|
+
*/
|
|
20
|
+
duration?: number;
|
|
21
|
+
}
|
|
4
22
|
export interface ToastApi {
|
|
5
23
|
show: (opts: ToastOptions) => string;
|
|
24
|
+
/** A toast with an Undo action and a countdown bar; see `ToastUndoOptions`. */
|
|
25
|
+
undo: (message: string, opts: ToastUndoOptions) => string;
|
|
6
26
|
hide: (id: string) => void;
|
|
7
27
|
hideAll: () => void;
|
|
8
28
|
}
|
|
@@ -38,6 +58,7 @@ export declare const ToastHost: React.FC;
|
|
|
38
58
|
export declare const useToast: () => ToastApi;
|
|
39
59
|
interface ToastGlobal {
|
|
40
60
|
show: (opts: ToastOptions) => string;
|
|
61
|
+
undo: (message: string, opts: ToastUndoOptions) => string;
|
|
41
62
|
success: (message: string, opts?: Omit<ToastOptions, 'message' | 'variant'>) => string;
|
|
42
63
|
error: (message: string, opts?: Omit<ToastOptions, 'message' | 'variant'>) => string;
|
|
43
64
|
warning: (message: string, opts?: Omit<ToastOptions, 'message' | 'variant'>) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type { ToastAction, ToastItem, ToastOptions, ToastPosition, ToastProps, ToastVariant } from './Toast.js';
|
|
2
2
|
export { default, Toast } from './Toast.js';
|
|
3
|
-
export type { ToastApi, ToastHaptics, ToastProviderProps } from './ToastProvider.js';
|
|
3
|
+
export type { ToastApi, ToastHaptics, ToastProviderProps, ToastUndoOptions } from './ToastProvider.js';
|
|
4
4
|
export { ToastHost, ToastProvider, toast, useToast } from './ToastProvider.js';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { Text as RNText, View as RNView, StyleProp, TextStyle } from 'react-native';
|
|
3
|
+
/** The one text button of a rich tooltip. */
|
|
4
|
+
export interface TooltipAction {
|
|
5
|
+
label: string;
|
|
6
|
+
onPress: () => void;
|
|
7
|
+
accessibilityLabel?: string;
|
|
8
|
+
}
|
|
9
|
+
interface RichTooltipBodyProps {
|
|
10
|
+
title?: string;
|
|
11
|
+
content: string | React.ReactNode;
|
|
12
|
+
action?: TooltipAction;
|
|
13
|
+
onAction: () => void;
|
|
14
|
+
/** Takes screen reader focus on open: the title, or the text when there is none. */
|
|
15
|
+
focusRef: React.Ref<RNText>;
|
|
16
|
+
/** Takes keyboard focus on open on the web. */
|
|
17
|
+
actionRef: React.Ref<RNView>;
|
|
18
|
+
messageStyle?: StyleProp<TextStyle>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The card of `variant="rich"`: a light surface with a title, the content and
|
|
22
|
+
* one action. Not a child of the close area, so every part is reachable by a
|
|
23
|
+
* screen reader on its own.
|
|
24
|
+
*/
|
|
25
|
+
export declare const RichTooltipBody: React.FC<RichTooltipBodyProps>;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=RichTooltipBody.d.ts.map
|
|
@@ -1,11 +1,33 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
3
|
+
import type { TooltipAction } from './RichTooltipBody.js';
|
|
4
|
+
export type { TooltipAction } from './RichTooltipBody.js';
|
|
3
5
|
export type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right' | 'auto';
|
|
4
6
|
export type TooltipTrigger = 'longPress' | 'press' | 'manual';
|
|
7
|
+
/**
|
|
8
|
+
* `plain` is a short dark hint. `rich` is a light card with a `title`, the
|
|
9
|
+
* `content` and one `action`, the Material rich tooltip: it opens on press by
|
|
10
|
+
* default, stays until a tap outside, Back, Escape or its action, moves
|
|
11
|
+
* screen reader focus into itself and back to the trigger on close, and sits
|
|
12
|
+
* only above or below its trigger. Anything with inputs, a list or more than
|
|
13
|
+
* one action belongs in a BottomSheet.
|
|
14
|
+
*/
|
|
15
|
+
export type TooltipVariant = 'plain' | 'rich';
|
|
5
16
|
export interface TooltipProps {
|
|
6
17
|
content: string | React.ReactNode;
|
|
7
18
|
children: React.ReactElement;
|
|
19
|
+
/** Default `'plain'`. */
|
|
20
|
+
variant?: TooltipVariant;
|
|
21
|
+
/** Rich only: one line over the content. */
|
|
22
|
+
title?: string;
|
|
23
|
+
/** Rich only: one text button. It runs after the tooltip has closed. */
|
|
24
|
+
action?: TooltipAction;
|
|
25
|
+
/** `left` and `right` read as `auto` on a rich tooltip. */
|
|
8
26
|
placement?: TooltipPlacement;
|
|
27
|
+
/**
|
|
28
|
+
* Default `'longPress'`, or `'press'` for a rich tooltip. A long press is
|
|
29
|
+
* never attached to a child with its own `contextMenu`: the menu wins.
|
|
30
|
+
*/
|
|
9
31
|
trigger?: TooltipTrigger;
|
|
10
32
|
visible?: boolean;
|
|
11
33
|
onVisibleChange?: (visible: boolean) => void;
|
|
@@ -20,6 +42,8 @@ export interface TooltipProps {
|
|
|
20
42
|
arrowStyle?: StyleProp<ViewStyle>;
|
|
21
43
|
/** Style override applied to the message Text (only when `content` is a string). */
|
|
22
44
|
messageStyle?: StyleProp<TextStyle>;
|
|
45
|
+
/** Accessible name of the tap-outside area. Default `'Close tooltip'`. */
|
|
46
|
+
closeLabel?: string;
|
|
23
47
|
testID?: string;
|
|
24
48
|
}
|
|
25
49
|
declare const Tooltip: React.FC<TooltipProps>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { TooltipPlacement, TooltipProps, TooltipTrigger } from './Tooltip.js';
|
|
1
|
+
export type { TooltipAction, TooltipPlacement, TooltipProps, TooltipTrigger, TooltipVariant } from './Tooltip.js';
|
|
2
2
|
export { default, Tooltip } from './Tooltip.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { LayoutRectangle } from 'react-native';
|
|
2
|
+
import type { PlacementViewport } from '../../utils/placement.js';
|
|
3
|
+
export type TooltipSide = 'top' | 'bottom' | 'left' | 'right';
|
|
4
|
+
export interface TooltipPosition {
|
|
5
|
+
top: number;
|
|
6
|
+
left: number;
|
|
7
|
+
placement: TooltipSide;
|
|
8
|
+
/** Distance of the arrow tip along the edge that faces the trigger. */
|
|
9
|
+
arrowOffset: number;
|
|
10
|
+
}
|
|
11
|
+
export interface TooltipLayout {
|
|
12
|
+
/** The trigger in window coordinates; null until measured. */
|
|
13
|
+
anchor: LayoutRectangle | null;
|
|
14
|
+
/** The bubble's measured size; zeros until its first layout. */
|
|
15
|
+
size: {
|
|
16
|
+
width: number;
|
|
17
|
+
height: number;
|
|
18
|
+
};
|
|
19
|
+
placement: TooltipSide | 'auto';
|
|
20
|
+
/** A rich tooltip only goes above or below its trigger. */
|
|
21
|
+
rich: boolean;
|
|
22
|
+
viewport: PlacementViewport;
|
|
23
|
+
maxWidth: number;
|
|
24
|
+
gap: number;
|
|
25
|
+
/** Least distance from each safe edge. */
|
|
26
|
+
padding: number;
|
|
27
|
+
arrowCornerPadding: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Where a tooltip bubble sits. Above and below go through the shared
|
|
31
|
+
* placement engine (the one Menu uses), so both flip and clamp alike; left
|
|
32
|
+
* and right stay a tooltip's own.
|
|
33
|
+
*/
|
|
34
|
+
export declare const resolveTooltipPosition: (layout: TooltipLayout) => TooltipPosition;
|
|
35
|
+
//# sourceMappingURL=tooltipPosition.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
export interface TypingIndicatorProps {
|
|
4
|
+
/** Shown beside the dots and read by screen readers, e.g. "Shannon is typing". */
|
|
5
|
+
label?: string;
|
|
6
|
+
/** Screen-reader name when there is no visible `label`. Default 'Typing'. */
|
|
7
|
+
accessibilityLabel?: string;
|
|
8
|
+
/** Draw the dots inside a `theirs` bubble. Default true. */
|
|
9
|
+
bubble?: boolean;
|
|
10
|
+
style?: StyleProp<ViewStyle>;
|
|
11
|
+
testID?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Three pulsing dots, with an optional line such as "Shannon is typing", for
|
|
15
|
+
* the bottom of a `MessageList` (its `typing` slot). The pulse runs on the UI
|
|
16
|
+
* thread and stops under Reduce Motion. It is not announced: a person hears
|
|
17
|
+
* the reply when it arrives.
|
|
18
|
+
*/
|
|
19
|
+
export declare const TypingIndicator: React.FC<TypingIndicatorProps>;
|
|
20
|
+
export default TypingIndicator;
|
|
21
|
+
//# sourceMappingURL=TypingIndicator.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { Theme } from '../../theme/types.js';
|
|
3
|
+
import type { HapticType } from '../../utils/hapticUtils.js';
|
|
4
|
+
export interface WheelItem {
|
|
5
|
+
value: string | number;
|
|
6
|
+
/** Text drawn in the row. */
|
|
7
|
+
label: string;
|
|
8
|
+
/** What a screen reader says for this value, such as "2 hours". Defaults to `label`. */
|
|
9
|
+
accessibilityLabel?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const WHEEL_VISIBLE_ITEMS = 5;
|
|
12
|
+
export declare const WHEEL_CENTER_OFFSET: number;
|
|
13
|
+
interface WheelProps {
|
|
14
|
+
label: string;
|
|
15
|
+
items: ReadonlyArray<WheelItem>;
|
|
16
|
+
selectedIndex: number;
|
|
17
|
+
onIndexChange: (index: number) => void;
|
|
18
|
+
itemHeight: number;
|
|
19
|
+
width?: number;
|
|
20
|
+
theme: Theme;
|
|
21
|
+
haptic?: HapticType | false;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
reducedMotion: boolean;
|
|
24
|
+
testID?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* One scrolling column. It commits `onIndexChange` once the column rests on an
|
|
28
|
+
* item (momentum end on native, a short idle on web, where the browser has no
|
|
29
|
+
* snap-to-interval or momentum events), when a screen reader adjusts it, or
|
|
30
|
+
* when a key moves it. The caller owns `selectedIndex`.
|
|
31
|
+
*/
|
|
32
|
+
export declare const Wheel: React.FC<WheelProps>;
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=Wheel.d.ts.map
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import type { HapticType } from '../../utils/hapticUtils.js';
|
|
4
|
+
import type { WheelItem } from './Wheel.js';
|
|
5
|
+
export type { WheelItem } from './Wheel.js';
|
|
6
|
+
export type WheelDurationStep = 1 | 5 | 15 | 30;
|
|
7
|
+
export interface WheelPickerColumn {
|
|
8
|
+
/** Passed back to `onChange` in columns mode. */
|
|
9
|
+
key: string;
|
|
10
|
+
/** Names the column for a screen reader, such as "Hour". */
|
|
11
|
+
label: string;
|
|
12
|
+
items: ReadonlyArray<WheelItem>;
|
|
13
|
+
/** The selected item's `value`. A value that is not in `items` shows the first item. */
|
|
14
|
+
value: string | number;
|
|
15
|
+
/** Fixed width in points. Default 64 in columns mode; the list mode column fills the row. */
|
|
16
|
+
width?: number;
|
|
17
|
+
/** Text drawn after the column, such as ":" between hours and minutes. */
|
|
18
|
+
separator?: string;
|
|
19
|
+
/** Small unit label drawn beside the selected row, such as "min". */
|
|
20
|
+
unit?: string;
|
|
21
|
+
/** Empty space after the column (and its unit or separator), in points. */
|
|
22
|
+
gapAfter?: number;
|
|
23
|
+
testID?: string;
|
|
24
|
+
}
|
|
25
|
+
interface WheelPickerBaseProps {
|
|
26
|
+
/** Tick at each detent. `false` is silent; a `HapticType` replaces the default `denseTick`. */
|
|
27
|
+
haptic?: HapticType | false;
|
|
28
|
+
/** Locks scrolling and screen reader adjustment and dims the wheels. */
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
testID?: string;
|
|
31
|
+
/** Style of the row that holds the wheels. */
|
|
32
|
+
style?: StyleProp<ViewStyle>;
|
|
33
|
+
}
|
|
34
|
+
/** Several wheels side by side, each with its own items. */
|
|
35
|
+
export interface WheelPickerColumnsProps extends WheelPickerBaseProps {
|
|
36
|
+
mode?: 'columns';
|
|
37
|
+
columns: ReadonlyArray<WheelPickerColumn>;
|
|
38
|
+
/** Fired with the column's `key` and the picked item's `value` once a wheel rests. */
|
|
39
|
+
onChange?: (key: string, value: string | number) => void;
|
|
40
|
+
}
|
|
41
|
+
/** One wheel over a short list of choices. */
|
|
42
|
+
export interface WheelPickerListProps extends WheelPickerBaseProps {
|
|
43
|
+
mode: 'list';
|
|
44
|
+
items: ReadonlyArray<WheelItem | string | number>;
|
|
45
|
+
value?: string | number | null;
|
|
46
|
+
onChange?: (value: string | number) => void;
|
|
47
|
+
/** Names the wheel for a screen reader. Default "Value". */
|
|
48
|
+
label?: string;
|
|
49
|
+
/** Fixed width in points. Default fills the row. */
|
|
50
|
+
width?: number;
|
|
51
|
+
}
|
|
52
|
+
export interface WheelPickerDurationLabels {
|
|
53
|
+
hours?: string;
|
|
54
|
+
minutes?: string;
|
|
55
|
+
hourUnit?: string;
|
|
56
|
+
minuteUnit?: string;
|
|
57
|
+
}
|
|
58
|
+
/** Hours and minutes, up to 23 h 59 min, with the value as a whole number of minutes. */
|
|
59
|
+
export interface WheelPickerDurationProps extends WheelPickerBaseProps {
|
|
60
|
+
mode: 'duration';
|
|
61
|
+
/** Duration in minutes. Clamped to `maxMinutes` and rounded to `minuteStep`. */
|
|
62
|
+
value: number;
|
|
63
|
+
onChange?: (minutes: number) => void;
|
|
64
|
+
minuteStep?: WheelDurationStep;
|
|
65
|
+
/** Upper bound in minutes. Default and ceiling 1439 (23 h 59 min). */
|
|
66
|
+
maxMinutes?: number;
|
|
67
|
+
labels?: WheelPickerDurationLabels;
|
|
68
|
+
}
|
|
69
|
+
export type WheelPickerProps = WheelPickerColumnsProps | WheelPickerListProps | WheelPickerDurationProps;
|
|
70
|
+
declare const WheelPicker: React.FC<WheelPickerProps>;
|
|
71
|
+
export { WheelPicker };
|
|
72
|
+
export default WheelPicker;
|
|
73
|
+
//# sourceMappingURL=WheelPicker.d.ts.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type { WheelDurationStep, WheelItem, WheelPickerColumn, WheelPickerColumnsProps, WheelPickerDurationLabels, WheelPickerDurationProps, WheelPickerListProps, WheelPickerProps } from './WheelPicker.js';
|
|
2
|
+
export { default, WheelPicker } from './WheelPicker.js';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|