@webority/mobile-ui 0.9.1 → 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,71 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import type { DescriptionItem } from '../Descriptions';
|
|
4
|
+
/**
|
|
5
|
+
* `pending` is its own outcome, never a kind of failure: the bank has not said
|
|
6
|
+
* yes or no, so the money may still go through. `refunded` is a payment that
|
|
7
|
+
* was taken and has been returned.
|
|
8
|
+
*/
|
|
9
|
+
export type PaymentResultStatus = 'success' | 'pending' | 'failed' | 'refunded';
|
|
10
|
+
export interface PaymentResultProps {
|
|
11
|
+
status: PaymentResultStatus;
|
|
12
|
+
/** Integer paise, as the API carries it. Shown in rupees with Indian digit grouping. */
|
|
13
|
+
amount: number;
|
|
14
|
+
/** ISO 4217 code of `amount`'s currency. Default `'INR'`. */
|
|
15
|
+
currency?: string;
|
|
16
|
+
/** Who was paid ("Capnix"). */
|
|
17
|
+
payee?: string;
|
|
18
|
+
/** The gateway or bank reference (a UPI RRN or UTR). Read digit by digit by a screen reader. */
|
|
19
|
+
reference?: string;
|
|
20
|
+
/** When the payment was made: an ISO string, a Date or epoch milliseconds. Shown in IST. */
|
|
21
|
+
paidAt?: string | number | Date;
|
|
22
|
+
/** How it was paid ("UPI, HDFC Bank ...4821"). */
|
|
23
|
+
method?: string;
|
|
24
|
+
/** Receipt rows after the built-in ones. A row with an empty value is dropped. */
|
|
25
|
+
rows?: ReadonlyArray<DescriptionItem>;
|
|
26
|
+
/**
|
|
27
|
+
* For `failed`: whether money left the account. `true` says it will come back; `false` says
|
|
28
|
+
* nothing was taken and is the only value that lets `onRetry` show. Left unset, the screen
|
|
29
|
+
* tells the person to check their statement first and offers no retry.
|
|
30
|
+
*/
|
|
31
|
+
debited?: boolean;
|
|
32
|
+
/** Working days the bank takes to return a debited amount. Default 5. */
|
|
33
|
+
refundDays?: number;
|
|
34
|
+
/** For `pending`: when it should settle, shown in IST. Without it the usual window is stated. */
|
|
35
|
+
settlesBy?: string | number | Date;
|
|
36
|
+
/** Replaces the heading ("Payment successful"). */
|
|
37
|
+
title?: string;
|
|
38
|
+
/** Replaces the line under the amount. The pending safety lines are not replaceable. */
|
|
39
|
+
message?: string;
|
|
40
|
+
/** Shows a Share receipt button. The app builds and shares the receipt itself. */
|
|
41
|
+
onShare?: () => void;
|
|
42
|
+
/** Shows a Download button. */
|
|
43
|
+
onDownload?: () => void;
|
|
44
|
+
/** Shows a Done button. */
|
|
45
|
+
onDone?: () => void;
|
|
46
|
+
/** Shows Try again. Honoured only for a `failed` payment with `debited={false}`. */
|
|
47
|
+
onRetry?: () => void;
|
|
48
|
+
/** Shows Check status while `pending`. The app polls or refetches; this component never does. */
|
|
49
|
+
onRefresh?: () => void;
|
|
50
|
+
/** Puts Check status into its busy state. */
|
|
51
|
+
refreshing?: boolean;
|
|
52
|
+
/** Burst of confetti on success. Default true. Not played under Reduce Motion. */
|
|
53
|
+
celebrate?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Haptic on the outcome: a success buzz for `success` and an error buzz for `failed`.
|
|
56
|
+
* `pending` and `refunded` never buzz. Default true.
|
|
57
|
+
*/
|
|
58
|
+
haptic?: boolean;
|
|
59
|
+
style?: StyleProp<ViewStyle>;
|
|
60
|
+
testID?: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* The end of a payment: what happened, how much, and what to do next. A UPI
|
|
64
|
+
* payment can sit between "sent" and "settled" for minutes or hours, and showing
|
|
65
|
+
* that as a failure, or offering Try again, is how people pay twice. So `pending`
|
|
66
|
+
* has its own mark, its own word and no retry, and a failed payment offers retry
|
|
67
|
+
* only when the caller says nothing was debited.
|
|
68
|
+
*/
|
|
69
|
+
export declare const PaymentResult: React.FC<PaymentResultProps>;
|
|
70
|
+
export default PaymentResult;
|
|
71
|
+
//# sourceMappingURL=PaymentResult.d.ts.map
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { View as RNView, StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import type { HapticType } from '../../utils/hapticUtils';
|
|
4
|
+
/**
|
|
5
|
+
* `scanning` waits for a code; `found` freezes the frame on success; `invalid`
|
|
6
|
+
* shows `labels.invalid` for a code the app does not accept. `noPermission` and
|
|
7
|
+
* `noCamera` replace the camera with a panel: the children are not rendered, so
|
|
8
|
+
* the app never mounts a camera it cannot use.
|
|
9
|
+
*/
|
|
10
|
+
export type ScannerOverlayState = 'scanning' | 'found' | 'invalid' | 'noPermission' | 'noCamera';
|
|
11
|
+
export interface ScannerOverlayLabels {
|
|
12
|
+
/** Default 'Code found'. Spoken and shown when `state` is `found`. */
|
|
13
|
+
found: string;
|
|
14
|
+
/** Default 'This code cannot be used. Try another.' Shown when `state` is `invalid`. */
|
|
15
|
+
invalid: string;
|
|
16
|
+
/** Default 'Turn torch on'. */
|
|
17
|
+
torchOn: string;
|
|
18
|
+
/** Default 'Turn torch off'. */
|
|
19
|
+
torchOff: string;
|
|
20
|
+
/** Default 'Enter code instead'. */
|
|
21
|
+
manualEntry: string;
|
|
22
|
+
/** Default 'Upload from gallery'. */
|
|
23
|
+
gallery: string;
|
|
24
|
+
/** Default 'Camera access is off'. */
|
|
25
|
+
noPermissionTitle: string;
|
|
26
|
+
/** Default 'Allow camera access to scan a code.' */
|
|
27
|
+
noPermissionMessage: string;
|
|
28
|
+
/** Default 'Allow camera access'. */
|
|
29
|
+
permissionAction: string;
|
|
30
|
+
/** Default 'No camera found'. */
|
|
31
|
+
noCameraTitle: string;
|
|
32
|
+
/** Default 'This device has no camera available. You can still add the code another way.' */
|
|
33
|
+
noCameraMessage: string;
|
|
34
|
+
}
|
|
35
|
+
export interface ScannerOverlayProps {
|
|
36
|
+
/**
|
|
37
|
+
* The camera view (for example expo-camera's `CameraView`). It fills the
|
|
38
|
+
* overlay, and the overlay never touches it: mapping `torch` to the
|
|
39
|
+
* camera's `enableTorch` and `state` to its scan callback is the app's job.
|
|
40
|
+
*/
|
|
41
|
+
children?: React.ReactNode;
|
|
42
|
+
/** Default `'scanning'`. */
|
|
43
|
+
state?: ScannerOverlayState;
|
|
44
|
+
/** The line under the frame while scanning. Default 'Point the camera at the code'. */
|
|
45
|
+
hint?: string;
|
|
46
|
+
/** Replaces any of the default texts. */
|
|
47
|
+
labels?: Partial<ScannerOverlayLabels>;
|
|
48
|
+
/** Whether the torch is on. Default `false`. */
|
|
49
|
+
torch?: boolean;
|
|
50
|
+
/** Shows the torch button, which calls this with the next value. Hidden when omitted. */
|
|
51
|
+
onTorchChange?: (next: boolean) => void;
|
|
52
|
+
/** Shows the 'Enter code instead' button. It stays reachable in every state, camera or not. */
|
|
53
|
+
onManualEntry?: () => void;
|
|
54
|
+
/** Shows the 'Upload from gallery' button. */
|
|
55
|
+
onGallery?: () => void;
|
|
56
|
+
/** Shows the button on the `noPermission` panel; the app asks or opens Settings. */
|
|
57
|
+
onPermissionAction?: () => void;
|
|
58
|
+
/**
|
|
59
|
+
* Side of the square cutout in points. Never below 240, so a code is large
|
|
60
|
+
* enough to frame, and never wider than the screen less its margins. Default 260.
|
|
61
|
+
*/
|
|
62
|
+
frameSize?: number;
|
|
63
|
+
/**
|
|
64
|
+
* The torch button's press haptic; default `'selection'`. `false` also
|
|
65
|
+
* turns off the success and error haptics fired when `state` changes.
|
|
66
|
+
*/
|
|
67
|
+
haptic?: HapticType | false;
|
|
68
|
+
style?: StyleProp<ViewStyle>;
|
|
69
|
+
testID?: string;
|
|
70
|
+
}
|
|
71
|
+
declare const ScannerOverlay: React.ForwardRefExoticComponent<ScannerOverlayProps & React.RefAttributes<RNView>>;
|
|
72
|
+
export { ScannerOverlay };
|
|
73
|
+
export default ScannerOverlay;
|
|
74
|
+
//# sourceMappingURL=ScannerOverlay.d.ts.map
|
|
@@ -2,6 +2,8 @@ import type { StyleProp, TextInputProps, TextStyle, ViewStyle } from 'react-nati
|
|
|
2
2
|
import { TextInput } from 'react-native';
|
|
3
3
|
import type { HapticType } from '../../utils/hapticUtils';
|
|
4
4
|
import type { SlotIcon } from '../AppIcon/slotIcon';
|
|
5
|
+
import type { SearchScope, SearchSuggestion } from './SearchPanel';
|
|
6
|
+
export type { SearchScope, SearchSuggestion };
|
|
5
7
|
export type SearchBarSize = 'sm' | 'md' | 'lg';
|
|
6
8
|
export type SearchBarVariant = 'filled' | 'outlined' | 'underline';
|
|
7
9
|
export type SearchBarLabelMode = 'top' | 'float';
|
|
@@ -33,6 +35,39 @@ export interface SearchBarProps extends Omit<TextInputProps, 'style' | 'value' |
|
|
|
33
35
|
* (the pill). Ignored on `underline`, which is always square.
|
|
34
36
|
*/
|
|
35
37
|
borderRadius?: number;
|
|
38
|
+
/**
|
|
39
|
+
* Chips under the field that narrow what is searched, for example All, People, Files.
|
|
40
|
+
* Put the broadest scope first: it is the one selected until the person picks another.
|
|
41
|
+
*/
|
|
42
|
+
scopes?: SearchScope[];
|
|
43
|
+
/** The selected scope's `value`. Pass it to control the selection; leave it out to let the bar keep it. */
|
|
44
|
+
scope?: string;
|
|
45
|
+
onScopeChange?: (value: string) => void;
|
|
46
|
+
/**
|
|
47
|
+
* Searches to offer while the field is focused and empty, newest first. The app keeps
|
|
48
|
+
* them; `useRecentSearches` does it through mobile-core storage.
|
|
49
|
+
*/
|
|
50
|
+
recents?: string[];
|
|
51
|
+
/** Heading above the recent searches. Default `'Recent searches'`. */
|
|
52
|
+
recentsTitle?: string;
|
|
53
|
+
/** Most recent searches drawn. Default 8. */
|
|
54
|
+
maxRecents?: number;
|
|
55
|
+
/** A recent search was tapped. The bar blurs the field; the app sets the text and runs the search. */
|
|
56
|
+
onSelectRecent?: (text: string) => void;
|
|
57
|
+
/** Shows a remove button on each recent search. */
|
|
58
|
+
onRemoveRecent?: (text: string) => void;
|
|
59
|
+
/** Shows a "Clear all" button above the recent searches. */
|
|
60
|
+
onClearRecents?: () => void;
|
|
61
|
+
/**
|
|
62
|
+
* Predicted searches to offer while the field is focused and has text. The app fetches
|
|
63
|
+
* them (from the debounced `onChangeText`); the part of each that matches the field is
|
|
64
|
+
* drawn emphasised. A string is shorthand for `{ text }`.
|
|
65
|
+
*/
|
|
66
|
+
suggestions?: (string | SearchSuggestion)[];
|
|
67
|
+
/** Most suggestions drawn. Default 8. */
|
|
68
|
+
maxSuggestions?: number;
|
|
69
|
+
/** A suggestion was tapped. The bar blurs the field; the app sets the text and runs the search. */
|
|
70
|
+
onSelectSuggestion?: (suggestion: SearchSuggestion) => void;
|
|
36
71
|
/** Haptic feedback for interactions. Pass false to disable; pass a HapticType to override the default. */
|
|
37
72
|
haptic?: HapticType | false;
|
|
38
73
|
style?: StyleProp<ViewStyle>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { HapticType } from '../../utils/hapticUtils';
|
|
3
|
+
import type { SlotIcon } from '../AppIcon/slotIcon';
|
|
4
|
+
/** A named filter under the field, such as All, People or Files. */
|
|
5
|
+
export interface SearchScope {
|
|
6
|
+
label: string;
|
|
7
|
+
value: string;
|
|
8
|
+
}
|
|
9
|
+
/** A row of predicted searches under the field. A plain string stands for `{ text }`. */
|
|
10
|
+
export interface SearchSuggestion {
|
|
11
|
+
/** Identifies the row when two suggestions share text. Default: the text. */
|
|
12
|
+
id?: string;
|
|
13
|
+
/** The suggested search; the part that matches the field is drawn emphasised. */
|
|
14
|
+
text: string;
|
|
15
|
+
/** A second, quieter line under the text. */
|
|
16
|
+
subtitle?: string;
|
|
17
|
+
/** Replaces the magnifier. */
|
|
18
|
+
icon?: SlotIcon;
|
|
19
|
+
}
|
|
20
|
+
export declare const normalizeSuggestion: (item: string | SearchSuggestion) => SearchSuggestion;
|
|
21
|
+
interface HoldProps {
|
|
22
|
+
/** Called on press-in, so the panel survives the field losing focus to the tap. */
|
|
23
|
+
onHold: () => void;
|
|
24
|
+
onRelease: () => void;
|
|
25
|
+
}
|
|
26
|
+
interface ScopeBarProps {
|
|
27
|
+
scopes: SearchScope[];
|
|
28
|
+
scope: string;
|
|
29
|
+
disabled: boolean;
|
|
30
|
+
haptic?: HapticType | false;
|
|
31
|
+
onChange: (value: string) => void;
|
|
32
|
+
}
|
|
33
|
+
export declare const SearchScopeBar: React.FC<ScopeBarProps>;
|
|
34
|
+
interface RecentsProps extends HoldProps {
|
|
35
|
+
recents: string[];
|
|
36
|
+
title: string;
|
|
37
|
+
onSelect: (text: string) => void;
|
|
38
|
+
onRemove?: (text: string) => void;
|
|
39
|
+
onClear?: () => void;
|
|
40
|
+
}
|
|
41
|
+
export declare const SearchRecents: React.FC<RecentsProps>;
|
|
42
|
+
interface SuggestionsProps extends HoldProps {
|
|
43
|
+
suggestions: SearchSuggestion[];
|
|
44
|
+
query: string;
|
|
45
|
+
onSelect: (item: SearchSuggestion) => void;
|
|
46
|
+
}
|
|
47
|
+
export declare const SearchSuggestions: React.FC<SuggestionsProps>;
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=SearchPanel.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface HighlightPart {
|
|
2
|
+
text: string;
|
|
3
|
+
match: boolean;
|
|
4
|
+
/** Where the run starts in the text; unique per run, so it serves as a list key. */
|
|
5
|
+
start: number;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Splits `text` into runs that match a word of `query` (case-insensitive) and
|
|
9
|
+
* runs that do not, so a suggestion row can draw the typed part differently.
|
|
10
|
+
* Every whitespace-separated word of the query is matched wherever it occurs;
|
|
11
|
+
* adjacent matches merge into one run. No query or no match gives one plain run.
|
|
12
|
+
*/
|
|
13
|
+
export declare const splitHighlight: (text: string, query: string) => HighlightPart[];
|
|
14
|
+
//# sourceMappingURL=highlight.d.ts.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
export type { SearchBarProps, SearchBarSize, SearchBarVariant } from './SearchBar';
|
|
2
2
|
export { default, SearchBar } from './SearchBar';
|
|
3
|
+
export type { SearchScope, SearchSuggestion } from './SearchPanel';
|
|
4
|
+
export type { UseRecentSearchesOptions, UseRecentSearchesResult } from './useRecentSearches';
|
|
5
|
+
export { useRecentSearches } from './useRecentSearches';
|
|
3
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface UseRecentSearchesOptions {
|
|
2
|
+
/** Most searches kept; the oldest drops first. Default 8. */
|
|
3
|
+
max?: number;
|
|
4
|
+
}
|
|
5
|
+
export interface UseRecentSearchesResult {
|
|
6
|
+
/** Newest first. Empty until the saved list has loaded. */
|
|
7
|
+
recents: string[];
|
|
8
|
+
/** Puts `text` at the front. Blank text is ignored; the same text in any case moves up instead of repeating. */
|
|
9
|
+
add: (text: string) => void;
|
|
10
|
+
remove: (text: string) => void;
|
|
11
|
+
/** Empties the list and returns what it held, so a caller can offer undo with `replace`. */
|
|
12
|
+
clear: () => string[];
|
|
13
|
+
/** Swaps the whole list, for undo. */
|
|
14
|
+
replace: (next: string[]) => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The device-kept list behind `SearchBar`'s recent searches, saved through
|
|
18
|
+
* mobile-core `Storage` under `storageKey`. Give each search screen its own
|
|
19
|
+
* key. `SearchBar` only draws what it is handed; wire this hook's `recents`,
|
|
20
|
+
* `remove` and `clear` to its `recents`, `onRemoveRecent` and `onClearRecents`,
|
|
21
|
+
* and call `add` when a search is submitted.
|
|
22
|
+
*/
|
|
23
|
+
export declare const useRecentSearches: (storageKey: string, options?: UseRecentSearchesOptions) => UseRecentSearchesResult;
|
|
24
|
+
//# sourceMappingURL=useRecentSearches.d.ts.map
|
|
@@ -76,7 +76,8 @@ interface BaseSelectProps<T = SelectOption> {
|
|
|
76
76
|
/**
|
|
77
77
|
* Fixed text drawn before the value: `'₹'`, `'+91'`. The same prop and look
|
|
78
78
|
* as Input's `prefix`, in the placeholder colour. Sits after `leftIcon`. A
|
|
79
|
-
* node (a symbol with a subscript)
|
|
79
|
+
* node (a symbol with a subscript) sits in the same Text with the same gap,
|
|
80
|
+
* so its base and subscript take that size and colour.
|
|
80
81
|
*/
|
|
81
82
|
prefix?: React.ReactNode;
|
|
82
83
|
/**
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
import type { HapticType } from '../../utils/hapticUtils';
|
|
3
|
+
import type { SignatureStroke } from './signatureGeometry';
|
|
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,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';
|
|
4
4
|
import type { SlotIcon } from '../AppIcon/slotIcon';
|
|
5
5
|
import type { IconBadgeTone } from '../IconBadge';
|
|
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 };
|