@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
|
@@ -1,8 +1,28 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { HapticType } from '../../utils/hapticUtils';
|
|
3
3
|
import type { ToastOptions, ToastPosition, ToastVariant } from './Toast';
|
|
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';
|
|
2
2
|
export { default, Toast } from './Toast';
|
|
3
|
-
export type { ToastApi, ToastHaptics, ToastProviderProps } from './ToastProvider';
|
|
3
|
+
export type { ToastApi, ToastHaptics, ToastProviderProps, ToastUndoOptions } from './ToastProvider';
|
|
4
4
|
export { ToastHost, ToastProvider, toast, useToast } from './ToastProvider';
|
|
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';
|
|
4
|
+
export type { TooltipAction } from './RichTooltipBody';
|
|
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';
|
|
1
|
+
export type { TooltipAction, TooltipPlacement, TooltipProps, TooltipTrigger, TooltipVariant } from './Tooltip';
|
|
2
2
|
export { default, Tooltip } from './Tooltip';
|
|
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';
|
|
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';
|
|
3
|
+
import type { HapticType } from '../../utils/hapticUtils';
|
|
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';
|
|
4
|
+
import type { WheelItem } from './Wheel';
|
|
5
|
+
export type { WheelItem } from './Wheel';
|
|
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';
|
|
2
|
+
export { default, WheelPicker } from './WheelPicker';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -18,10 +18,12 @@ export type { BadgeAnchor, BadgeProps, BadgeTone, BadgeVariant } from './Badge';
|
|
|
18
18
|
export { Badge } from './Badge';
|
|
19
19
|
export type { BannerAction, BannerActionSize, BannerActionTone, BannerActionVariant, BannerProps, BannerRole, BannerVariant } from './Banner';
|
|
20
20
|
export { Banner } from './Banner';
|
|
21
|
-
export type {
|
|
21
|
+
export type { BarChartDatum, BarChartProps, BarChartTone } from './BarChart';
|
|
22
|
+
export { BarChart } from './BarChart';
|
|
23
|
+
export type { BottomNavigationAccessoryState, BottomNavigationCenterAction, BottomNavigationElevation, BottomNavigationIndicatorPosition, BottomNavigationIndicatorRadius, BottomNavigationProps, BottomNavigationRadius, BottomNavigationVariant, TabBadge, TabConfig, TabIcon, TabIconProps } from './BottomNavigation';
|
|
22
24
|
export { BottomNavigation } from './BottomNavigation';
|
|
23
|
-
export type { BottomSheetContextValue, BottomSheetPresentation, BottomSheetProps, BottomSheetRef } from './BottomSheet';
|
|
24
|
-
export { BottomSheet, useBottomSheet } from './BottomSheet';
|
|
25
|
+
export type { BottomSheetContextValue, BottomSheetPresentation, BottomSheetProps, BottomSheetRef, SheetSwap, SheetSwapOptions } from './BottomSheet';
|
|
26
|
+
export { BottomSheet, useBottomSheet, useSheetSwap } from './BottomSheet';
|
|
25
27
|
export type { BoxProps, RowProps, SpacerProps, StackProps } from './Box';
|
|
26
28
|
export { Box, Row, Spacer, Stack } from './Box';
|
|
27
29
|
export type { ButtonProps, ButtonSize, ButtonTone, ButtonVariant } from './Button';
|
|
@@ -38,12 +40,16 @@ export type { ChipProps, ChipSelectionMode, ChipSize, ChipTone, ChipVariant } fr
|
|
|
38
40
|
export { Chip } from './Chip';
|
|
39
41
|
export type { ChoiceGroupDirection, ChoiceGroupIndicatorPosition, ChoiceGroupProps, ChoiceGroupSelectionMode, ChoiceGroupSize, ChoiceGroupVariant, ChoiceOption, ChoiceOptionState } from './ChoiceGroup';
|
|
40
42
|
export { ChoiceGroup } from './ChoiceGroup';
|
|
43
|
+
export type { ComposerProps } from './Composer';
|
|
44
|
+
export { Composer } from './Composer';
|
|
41
45
|
export type { ConfettiHandle, ConfettiOrigin, ConfettiPhysics, ConfettiPreset, ConfettiProps, ConfettiShape, ConfettiSpeed } from './Confetti';
|
|
42
46
|
export { Confetti } from './Confetti';
|
|
43
47
|
export type { DatePickerMode, DatePickerProps } from './DatePicker';
|
|
44
48
|
export { DatePicker } from './DatePicker';
|
|
45
49
|
export type { DateRange, DateRangePickerProps } from './DateRangePicker';
|
|
46
50
|
export { DateRangePicker } from './DateRangePicker';
|
|
51
|
+
export type { DateSeparatorLabels, DateSeparatorProps } from './DateSeparator';
|
|
52
|
+
export { DateSeparator, DEFAULT_DATE_SEPARATOR_LABELS, dayLabel } from './DateSeparator';
|
|
47
53
|
export type { DecimalInputProps, DecimalRules } from './DecimalInput';
|
|
48
54
|
export { cleanDecimalText, DecimalInput, parseDecimalText } from './DecimalInput';
|
|
49
55
|
export type { DescriptionItem, DescriptionsProps, DescriptionsSize, DescriptionsVariant } from './Descriptions';
|
|
@@ -88,16 +94,26 @@ export type { LoaderOverlayProps } from './LoaderOverlay';
|
|
|
88
94
|
export { LoaderOverlay, loader, useLoader } from './LoaderOverlay';
|
|
89
95
|
export type { MarkdownProps } from './Markdown';
|
|
90
96
|
export { Markdown } from './Markdown';
|
|
97
|
+
export type { ContextMenuConfig, MenuItem, MenuItems, MenuPresentation, MenuProps, MenuUnavailable } from './Menu';
|
|
98
|
+
export { Menu } from './Menu';
|
|
99
|
+
export type { MessageAction, MessageBubbleLabels, MessageBubbleProps, MessageGroupPosition, MessageReply, MessageSide, MessageStatus } from './MessageBubble';
|
|
100
|
+
export { DEFAULT_MESSAGE_BUBBLE_LABELS, MessageBubble } from './MessageBubble';
|
|
101
|
+
export type { MessageListLabels, MessageListProps, MessageRenderInfo } from './MessageList';
|
|
102
|
+
export { DEFAULT_MESSAGE_LIST_LABELS, MessageList } from './MessageList';
|
|
91
103
|
export type { ModalPresentation, ModalProps } from './Modal';
|
|
92
104
|
export { MODAL_DISMISS_GRACE_MS, Modal } from './Modal';
|
|
93
105
|
export type { NotationProps, NotationRun, NotationTextRun } from './Notation';
|
|
94
106
|
export { Notation, parseNotation, sym } from './Notation';
|
|
95
107
|
export type { NumberInputProps, NumberInputRef, NumberInputSize, NumberInputVariant } from './NumberInput';
|
|
96
108
|
export { NumberInput } from './NumberInput';
|
|
109
|
+
export type { OnboardingPage, OnboardingPagerLabels, OnboardingPagerProps } from './OnboardingPager';
|
|
110
|
+
export { OnboardingPager } from './OnboardingPager';
|
|
97
111
|
export type { OptionSheetProps, OptionSheetRowState, OptionSheetSection } from './OptionSheet';
|
|
98
112
|
export { OptionSheet } from './OptionSheet';
|
|
99
113
|
export type { OTPInputProps, OTPInputRef, OTPInputSize } from './OTPInput';
|
|
100
114
|
export { OTPInput } from './OTPInput';
|
|
115
|
+
export type { PaymentResultProps, PaymentResultStatus } from './PaymentResult';
|
|
116
|
+
export { PaymentResult } from './PaymentResult';
|
|
101
117
|
export type { CallingCode, PhoneNumberInfo, PhoneNumberInputLabelMode, PhoneNumberInputProps, PhoneNumberInputRef, PhoneNumberValidation, PhoneNumberValue } from './PhoneNumberInput';
|
|
102
118
|
export { ALL_CALLING_CODES, DEFAULT_CALLING_CODES, formatE164, PhoneNumberInput, parseE164 } from './PhoneNumberInput';
|
|
103
119
|
export type { PickerTriggerProps, PickerTriggerSize, PickerTriggerVariant } from './PickerTrigger';
|
|
@@ -118,14 +134,18 @@ export type { RepeaterProps, RepeaterRenderArgs } from './Repeater';
|
|
|
118
134
|
export { Repeater } from './Repeater';
|
|
119
135
|
export type { BlockMarkdownAction, EditorSelection, EditorState, InlineMarkdownAction, MarkdownAction, RichTextEditorProps } from './RichTextEditor';
|
|
120
136
|
export { applyMarkdownAction, RichTextEditor } from './RichTextEditor';
|
|
121
|
-
export type {
|
|
122
|
-
export {
|
|
137
|
+
export type { ScannerOverlayLabels, ScannerOverlayProps, ScannerOverlayState } from './ScannerOverlay';
|
|
138
|
+
export { ScannerOverlay } from './ScannerOverlay';
|
|
139
|
+
export type { SearchBarProps, SearchBarSize, SearchBarVariant, SearchScope, SearchSuggestion, UseRecentSearchesOptions, UseRecentSearchesResult } from './SearchBar';
|
|
140
|
+
export { SearchBar, useRecentSearches } from './SearchBar';
|
|
123
141
|
export type { SectionHeaderProps, SectionHeaderVariant } from './SectionHeader';
|
|
124
142
|
export { SectionHeader } from './SectionHeader';
|
|
125
143
|
export type { SegmentedControlProps, SegmentedControlRadius, SegmentedControlSize, SegmentedControlTone, SegmentedControlVariant, SegmentIcon, SegmentIconState, SegmentItem, SegmentValue } from './SegmentedControl';
|
|
126
144
|
export { SegmentedControl } from './SegmentedControl';
|
|
127
145
|
export type { SelectOption, SelectProps, SelectSize, SelectValue } from './Select';
|
|
128
146
|
export { Select } from './Select';
|
|
147
|
+
export type { SignatureMode, SignaturePadLabels, SignaturePadProps, SignaturePadRef, SignaturePoint, SignatureStroke } from './SignaturePad';
|
|
148
|
+
export { SignaturePad } from './SignaturePad';
|
|
129
149
|
export type { SkeletonCircleProps, SkeletonClockProviderProps, SkeletonClockValue, SkeletonColors, SkeletonContentProps, SkeletonListProps, SkeletonProps, SkeletonProviderDefaults, SkeletonProviderProps, SkeletonRadius, SkeletonShape, SkeletonSkipProps, SkeletonSpeed, SkeletonStaticOf, SkeletonTextProps, SkeletonVariant, SkeletonWidth } from './Skeleton';
|
|
130
150
|
export { Skeleton, SkeletonCircle, SkeletonClockProvider, SkeletonContent, SkeletonList, SkeletonProvider, SkeletonSkip, SkeletonText, useReduceMotion, useSkeletonClock, useSkeletonDefaults } from './Skeleton';
|
|
131
151
|
export type { SliderProps, SliderSize, SliderTone, SliderVariant } from './Slider';
|
|
@@ -134,9 +154,11 @@ export type { SliderFieldProps } from './SliderField';
|
|
|
134
154
|
export { SliderField } from './SliderField';
|
|
135
155
|
export type { SlideToConfirmProps, SlideToConfirmSize, SlideToConfirmTone } from './SlideToConfirm';
|
|
136
156
|
export { SlideToConfirm } from './SlideToConfirm';
|
|
157
|
+
export type { SparklineProps, SparklineTone } from './Sparkline';
|
|
158
|
+
export { Sparkline } from './Sparkline';
|
|
137
159
|
export type { SpinnerProps, SpinnerSize, SpinnerVariant } from './Spinner';
|
|
138
160
|
export { Spinner } from './Spinner';
|
|
139
|
-
export type { StatTileProps } from './StatTile';
|
|
161
|
+
export type { StatTileProps, StatTileTrend } from './StatTile';
|
|
140
162
|
export { StatTile } from './StatTile';
|
|
141
163
|
export type { StatusBadgeProps, StatusBadgeSize, StatusBadgeTone, StatusBadgeVariant } from './StatusBadge';
|
|
142
164
|
export { StatusBadge } from './StatusBadge';
|
|
@@ -156,12 +178,16 @@ export type { TimelineItem, TimelineOrientation, TimelineProps, TimelineStatus,
|
|
|
156
178
|
export { Timeline } from './Timeline';
|
|
157
179
|
export type { MinuteStep, Period, TimeFormat, TimePickerProps, TimeValue } from './TimePicker';
|
|
158
180
|
export { TimePicker } from './TimePicker';
|
|
159
|
-
export type { ToastApi, ToastHaptics, ToastOptions, ToastPosition, ToastProps, ToastProviderProps, ToastVariant } from './Toast';
|
|
181
|
+
export type { ToastApi, ToastHaptics, ToastOptions, ToastPosition, ToastProps, ToastProviderProps, ToastUndoOptions, ToastVariant } from './Toast';
|
|
160
182
|
export { Toast, ToastHost, ToastProvider, toast, useToast } from './Toast';
|
|
161
|
-
export type { TooltipPlacement, TooltipProps, TooltipTrigger } from './Tooltip';
|
|
183
|
+
export type { TooltipAction, TooltipPlacement, TooltipProps, TooltipTrigger, TooltipVariant } from './Tooltip';
|
|
162
184
|
export { Tooltip } from './Tooltip';
|
|
163
185
|
export type { TourCloseReason, TourLabels, TourProps, TourSeenStore, TourStep } from './Tour';
|
|
164
186
|
export { Tour } from './Tour';
|
|
187
|
+
export type { TypingIndicatorProps } from './TypingIndicator';
|
|
188
|
+
export { TypingIndicator } from './TypingIndicator';
|
|
189
|
+
export type { WheelDurationStep, WheelItem, WheelPickerColumn, WheelPickerColumnsProps, WheelPickerDurationLabels, WheelPickerDurationProps, WheelPickerListProps, WheelPickerProps } from './WheelPicker';
|
|
190
|
+
export { WheelPicker } from './WheelPicker';
|
|
165
191
|
export type { ZoomableImageProps } from './ZoomableImage';
|
|
166
192
|
export { ZoomableImage } from './ZoomableImage';
|
|
167
193
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -7,6 +7,10 @@ export { FLICK_TOLERANCE, useFlickGuard } from './useFlickGuard';
|
|
|
7
7
|
export type { PressAnimationPreset, UsePressAnimationOptions, UsePressAnimationResult } from './usePressAnimation';
|
|
8
8
|
export { PRESS_ANIMATION_PRESETS, usePressAnimation } from './usePressAnimation';
|
|
9
9
|
export { useReducedMotion } from './useReducedMotion';
|
|
10
|
+
export type { UseRefreshControlLabels, UseRefreshControlOptions, UseRefreshControlResult } from './useRefreshControl';
|
|
11
|
+
export { useRefreshControl } from './useRefreshControl';
|
|
12
|
+
export type { ScrollDirection, UseScrollDirectionOptions, UseScrollDirectionResult } from './useScrollDirection';
|
|
13
|
+
export { useScrollDirection } from './useScrollDirection';
|
|
10
14
|
export type { UseToggleResult } from './useToggle';
|
|
11
15
|
export { useToggle } from './useToggle';
|
|
12
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { AccessibilityActionEvent, RefreshControlProps } from 'react-native';
|
|
3
|
+
import type { HapticType } from '../utils/hapticUtils';
|
|
4
|
+
export type UseRefreshControlLabels = {
|
|
5
|
+
/** Name of the refresh accessibility action. Default `'Refresh'`. */
|
|
6
|
+
refresh?: string;
|
|
7
|
+
/** Spoken when a button or accessibility-action refresh starts. Default `'Refreshing'`. */
|
|
8
|
+
refreshing?: string;
|
|
9
|
+
/** Spoken when that refresh ends. Default `'Updated'`. */
|
|
10
|
+
refreshed?: string;
|
|
11
|
+
};
|
|
12
|
+
export type UseRefreshControlOptions = {
|
|
13
|
+
/**
|
|
14
|
+
* Reloads the data. Return the promise (an RTK Query `refetch` already does)
|
|
15
|
+
* and the spinner stays until it settles. A rejection is logged and ends the
|
|
16
|
+
* spinner; show the user a curated message from the call itself.
|
|
17
|
+
*/
|
|
18
|
+
onRefresh: () => unknown;
|
|
19
|
+
/**
|
|
20
|
+
* The screen's own loading flag, when the data is already tracked elsewhere.
|
|
21
|
+
* The spinner shows while this is true or a refresh started here is running.
|
|
22
|
+
*/
|
|
23
|
+
refreshing?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Haptic when a pull starts the refresh. Default: `'gestureStart'` on Android
|
|
26
|
+
* and none on iOS or web (no iOS haptic until a device check shows whether the
|
|
27
|
+
* system already taps). `false` turns it off; a type fires on every native
|
|
28
|
+
* platform.
|
|
29
|
+
*/
|
|
30
|
+
haptic?: HapticType | false;
|
|
31
|
+
/**
|
|
32
|
+
* iOS only: the line under the spinner, for what changed ("Updated 2 minutes
|
|
33
|
+
* ago"). Never use it to explain how to refresh.
|
|
34
|
+
*/
|
|
35
|
+
title?: string;
|
|
36
|
+
/** A refresh started here keeps the spinner at least this long. Default 400. */
|
|
37
|
+
minVisibleMs?: number;
|
|
38
|
+
labels?: UseRefreshControlLabels;
|
|
39
|
+
};
|
|
40
|
+
export type UseRefreshControlResult = {
|
|
41
|
+
/** Pass as `refreshControl` to a FlatList, SectionList, ScrollView or KeyboardAwareScrollView. */
|
|
42
|
+
refreshControl: React.ReactElement<RefreshControlProps>;
|
|
43
|
+
/** True while the spinner shows. Give an AppBar action or IconButton this as `loading`. */
|
|
44
|
+
refreshing: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Starts a refresh without a pull: the single-pointer path for an AppBar
|
|
47
|
+
* action or a button. Ignored while one is running. Fires no haptic (the
|
|
48
|
+
* button gives its own) and announces the start and the end. Never rejects.
|
|
49
|
+
*/
|
|
50
|
+
refresh: () => Promise<void>;
|
|
51
|
+
/** Spread on a focusable element so a screen reader offers Refresh in its actions menu. */
|
|
52
|
+
accessibilityProps: {
|
|
53
|
+
accessibilityActions: {
|
|
54
|
+
name: 'refresh';
|
|
55
|
+
label: string;
|
|
56
|
+
}[];
|
|
57
|
+
onAccessibilityAction: (event: AccessibilityActionEvent) => void;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Themed pull to refresh plus the way to refresh without pulling.
|
|
62
|
+
*
|
|
63
|
+
* React Native's RefreshControl reports only that a refresh started, never that
|
|
64
|
+
* the pull crossed the trigger, so the haptic fires at that start. Web draws no
|
|
65
|
+
* pull at all, and a swipe is not available to everyone: pair the control with
|
|
66
|
+
* an AppBar action that calls `refresh()` so a person on any platform, or with a
|
|
67
|
+
* screen reader or keyboard, can reload.
|
|
68
|
+
*
|
|
69
|
+
* const { refreshControl, refresh, refreshing } = useRefreshControl({ onRefresh: refetch });
|
|
70
|
+
* <FlatList refreshControl={refreshControl} ... />
|
|
71
|
+
* <AppBar rightActions={[{ icon: <AppIcon name="refresh" />, onPress: refresh,
|
|
72
|
+
* accessibilityLabel: 'Refresh' }]} />
|
|
73
|
+
*/
|
|
74
|
+
export declare const useRefreshControl: (options: UseRefreshControlOptions) => UseRefreshControlResult;
|
|
75
|
+
//# sourceMappingURL=useRefreshControl.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { NativeScrollEvent, NativeSyntheticEvent } from 'react-native';
|
|
2
|
+
export type ScrollDirection = 'up' | 'down' | 'idle';
|
|
3
|
+
export type UseScrollDirectionOptions = {
|
|
4
|
+
/** Points of travel in one direction before the direction flips. Default 8. */
|
|
5
|
+
threshold?: number;
|
|
6
|
+
};
|
|
7
|
+
export type UseScrollDirectionResult = {
|
|
8
|
+
direction: ScrollDirection;
|
|
9
|
+
onScroll: (e: NativeSyntheticEvent<NativeScrollEvent>) => void;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Direction of the user's scroll, for bars that hide on scroll down and return
|
|
13
|
+
* on scroll up. `'idle'` until the list has moved past the top; it returns to
|
|
14
|
+
* `'idle'` when the offset reaches the top. Rubber-band overscroll at either
|
|
15
|
+
* end is clamped away, so a bounce never reads as a reversal. State changes
|
|
16
|
+
* only when the direction changes, not on every scroll event.
|
|
17
|
+
*
|
|
18
|
+
* Pass `onScroll` to a ScrollView or FlatList with `scrollEventThrottle={16}`.
|
|
19
|
+
*/
|
|
20
|
+
export declare const useScrollDirection: (options?: UseScrollDirectionOptions) => UseScrollDirectionResult;
|
|
21
|
+
//# sourceMappingURL=useScrollDirection.d.ts.map
|
|
@@ -3,14 +3,14 @@ export type { AppIconName, AppIconProps, AppIconSize, CuratedIconName, IconName,
|
|
|
3
3
|
export { APP_ICON_SIZES, AppIcon, CURATED_ICON_NAMES, defaultIcons, ICON_NAMES, ICONSAX_SUFFIX, renderSlotIcon } from './components/AppIcon';
|
|
4
4
|
export type { FieldArrayApi, FieldInputProps, FieldRules, FieldState, FocusableNode, FormApi, FormCompletion, FormConfig, FormErrors, FormTouched, FormValidateFn, FormValues, HookFieldProps, HookFormFieldProps, SubmitHelpers, UseFormCompletionOptions, ValidateOn, ValidationResult, ValidationRule, ValidationSchema } from './form';
|
|
5
5
|
export { deletePath, Form, getPath, HookFormField, isFieldFilled, rules, setPath, useField, useFieldArray, useForm, useFormCompletion, useFormContext, useHookFormField, useOptionalFormContext } from './form';
|
|
6
|
-
export type { PressAnimationPreset, UseControllableStateOptions, UsePressAnimationOptions, UsePressAnimationResult, UseToggleResult } from './hooks';
|
|
7
|
-
export { FLICK_TOLERANCE, PRESS_ANIMATION_PRESETS, useControllableState, useDebounce, useFlickGuard, usePressAnimation, useReducedMotion, useToggle } from './hooks';
|
|
6
|
+
export type { PressAnimationPreset, ScrollDirection, UseControllableStateOptions, UsePressAnimationOptions, UsePressAnimationResult, UseRefreshControlLabels, UseRefreshControlOptions, UseRefreshControlResult, UseScrollDirectionOptions, UseScrollDirectionResult, UseToggleResult } from './hooks';
|
|
7
|
+
export { FLICK_TOLERANCE, PRESS_ANIMATION_PRESETS, useControllableState, useDebounce, useFlickGuard, usePressAnimation, useReducedMotion, useRefreshControl, useScrollDirection, useToggle } from './hooks';
|
|
8
8
|
export type { InitUIOptions } from './initUI';
|
|
9
9
|
export { initUI } from './initUI';
|
|
10
10
|
export type { NetworkStatusBannerProps } from './network';
|
|
11
11
|
export { NetworkStatusBanner } from './network';
|
|
12
12
|
export type { ColorMode, ColorPalette, ColorSchemePreference, DeepPartial, IconRegistry, IconRenderer, MotionScale, RadiusScale, ShadowDefinition, ShadowScale, SpacingScale, TextVariantSpec, Theme, ThemeOverrides, ThemeProviderProps, TypographyScale } from './theme';
|
|
13
13
|
export { darkTheme, getColorMode, getTheme, lightTheme, mergeTheme, resetTheme, setColorMode, setTheme, subscribeTheme, ThemeProvider, useTheme, useThemeMode } from './theme';
|
|
14
|
-
export type { BreakpointKey, FeedbackIntent, HapticType, ResponsiveScales, ScreenInfo, SpacingToken, SquirclePathParams } from './utils';
|
|
15
|
-
export { Breakpoints, configureFeedback, feedback, hapticForIntent, isFeedbackEnabled, isScreenSize, isTablet, Margin, Padding, Responsive, ScreenDimensions, Spacing, SQUIRCLE_MIN_RADIUS, SQUIRCLE_SMOOTHING, setHapticImplementation, shadowStyle, smoothCorners, squircleApplies, squircleHostRadius, squirclePath, triggerHaptic, useScreenDimensions, warnUnknownProps } from './utils';
|
|
14
|
+
export type { AnnounceOptions, BreakpointKey, FeedbackIntent, HapticType, ResponsiveScales, ScreenInfo, SpacingToken, SquirclePathParams } from './utils';
|
|
15
|
+
export { announce, Breakpoints, configureFeedback, feedback, hapticForIntent, isFeedbackEnabled, isScreenSize, isTablet, Margin, Padding, Responsive, ScreenDimensions, Spacing, SQUIRCLE_MIN_RADIUS, SQUIRCLE_SMOOTHING, setHapticImplementation, shadowStyle, smoothCorners, squircleApplies, squircleHostRadius, squirclePath, triggerHaptic, useScreenDimensions, warnUnknownProps } from './utils';
|
|
16
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type AnnounceOptions = {
|
|
2
|
+
/** Polite (default) waits for current speech; `false` interrupts. Use `false` only for errors. */
|
|
3
|
+
polite?: boolean;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Speaks `message` through the screen reader without moving focus.
|
|
7
|
+
*
|
|
8
|
+
* iOS: queued behind current speech when polite, high priority and interrupting
|
|
9
|
+
* when not. Android: React Native exposes one announcement path with no
|
|
10
|
+
* priority, so polite and assertive both go through it. Web: a hidden
|
|
11
|
+
* `aria-live` region, `polite` or `assertive` (role `alert`).
|
|
12
|
+
*/
|
|
13
|
+
export declare const announce: (message: string, options?: AnnounceOptions) => void;
|
|
14
|
+
//# sourceMappingURL=announce.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type HapticType = 'selection' | 'impactLight' | 'impactMedium' | 'impactHeavy' | 'notificationSuccess' | 'notificationWarning' | 'notificationError';
|
|
1
|
+
export type HapticType = 'selection' | 'impactLight' | 'impactMedium' | 'impactHeavy' | 'notificationSuccess' | 'notificationWarning' | 'notificationError' | 'longPress' | 'tick' | 'denseTick' | 'confirm' | 'reject' | 'gestureStart';
|
|
2
2
|
export declare const triggerHaptic: (type?: HapticType) => void;
|
|
3
3
|
/**
|
|
4
4
|
* Replace the haptic backend. Intended for TESTS and for the showcase; an app
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { LayoutRectangle } from 'react-native';
|
|
2
|
+
import type { EdgeInsets } from 'react-native-safe-area-context';
|
|
3
|
+
/**
|
|
4
|
+
* The anchored-surface engine: where a menu, a context menu or a tooltip sits
|
|
5
|
+
* against the view that opened it. Pure geometry in window coordinates (what
|
|
6
|
+
* `measureInWindow` reports), so it runs the same on iOS, Android and web.
|
|
7
|
+
*/
|
|
8
|
+
export type PlacementPreference = 'top' | 'bottom' | 'auto';
|
|
9
|
+
export type ResolvedPlacement = 'top' | 'bottom';
|
|
10
|
+
export type PlacementAlign = 'center' | 'start' | 'end';
|
|
11
|
+
export interface PlacementViewport {
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
insets: EdgeInsets;
|
|
15
|
+
}
|
|
16
|
+
export interface PlacementOptions {
|
|
17
|
+
/** Space between the anchor and the surface. Default 8. */
|
|
18
|
+
gap?: number;
|
|
19
|
+
/** Least distance from each safe edge of the viewport. Default 8. */
|
|
20
|
+
margin?: number;
|
|
21
|
+
/** Horizontal alignment against the anchor, in left-to-right terms. Default `'center'`. */
|
|
22
|
+
align?: PlacementAlign;
|
|
23
|
+
}
|
|
24
|
+
export interface PlacementResult {
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
27
|
+
placement: ResolvedPlacement;
|
|
28
|
+
}
|
|
29
|
+
export interface PlacementRoom {
|
|
30
|
+
above: number;
|
|
31
|
+
below: number;
|
|
32
|
+
}
|
|
33
|
+
export declare const PLACEMENT_GAP = 8;
|
|
34
|
+
export declare const PLACEMENT_MARGIN = 8;
|
|
35
|
+
/** Height free above and below the anchor, inside the safe area and the margin. */
|
|
36
|
+
export declare const placementRoom: (anchor: LayoutRectangle, viewport: PlacementViewport, options?: PlacementOptions) => PlacementRoom;
|
|
37
|
+
/**
|
|
38
|
+
* Places a surface of `content` size against `anchor`. `'top'` and `'bottom'`
|
|
39
|
+
* are preferences that flip when the surface does not fit and the other side
|
|
40
|
+
* has more room; `'auto'` takes the side with more room. The surface never
|
|
41
|
+
* covers a visible anchor: when it is taller than the room on its side the
|
|
42
|
+
* caller caps its height to `placementRoom(...)` and lets it scroll. The
|
|
43
|
+
* horizontal position is clamped inside the safe area.
|
|
44
|
+
*/
|
|
45
|
+
export declare const computePlacement: (anchor: LayoutRectangle, content: {
|
|
46
|
+
width: number;
|
|
47
|
+
height: number;
|
|
48
|
+
}, viewport: PlacementViewport, preferred: PlacementPreference, options?: PlacementOptions) => PlacementResult;
|
|
49
|
+
/**
|
|
50
|
+
* Where along a surface's edge an arrow sits so it points at the anchor's
|
|
51
|
+
* centre, kept `cornerPadding` away from the surface's corners.
|
|
52
|
+
*/
|
|
53
|
+
export declare const arrowOffset: (anchorCenter: number, surfaceStart: number, surfaceLength: number, cornerPadding: number) => number;
|
|
54
|
+
export declare const claimAnchoredSurface: (close: () => void) => (() => void);
|
|
55
|
+
//# sourceMappingURL=placement.d.ts.map
|