@webority/mobile-ui 0.15.0 → 0.16.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/Accordion/Accordion.js +1 -1
- package/lib/commonjs/components/AmountSlider/AmountSlider.js +1 -1
- package/lib/commonjs/components/AnimatePresence/AnimatePresence.js +1 -1
- package/lib/commonjs/components/AppBar/AppBar.js +1 -1
- package/lib/commonjs/components/AsyncBlock/AsyncBlock.js +1 -1
- package/lib/commonjs/components/Banner/Banner.js +1 -1
- package/lib/commonjs/components/BottomSheet/BottomSheet.js +1 -1
- package/lib/commonjs/components/Button/Button.js +1 -1
- package/lib/commonjs/components/Calendar/Calendar.js +1 -1
- package/lib/commonjs/components/Card/Card.js +1 -1
- package/lib/commonjs/components/Carousel/Carousel.js +1 -1
- package/lib/commonjs/components/Chip/Chip.js +1 -1
- package/lib/commonjs/components/DatePicker/DatePicker.js +1 -1
- package/lib/commonjs/components/DateRangePicker/DateRangePicker.js +1 -1
- package/lib/commonjs/components/Drawer/Drawer.js +1 -1
- package/lib/commonjs/components/EmptyState/EmptyState.js +1 -1
- package/lib/commonjs/components/FloatingActionButton/FloatingActionButton.js +1 -1
- package/lib/commonjs/components/IconButton/IconButton.js +1 -1
- package/lib/commonjs/components/ListItem/ListItem.js +1 -1
- package/lib/commonjs/components/LoaderOverlay/LoaderOverlay.js +1 -1
- package/lib/commonjs/components/Menu/MenuSurface.js +1 -1
- package/lib/commonjs/components/MessageBubble/MessageBubble.js +1 -1
- package/lib/commonjs/components/Modal/Modal.js +1 -1
- package/lib/commonjs/components/OTPInput/OTPInput.js +1 -1
- package/lib/commonjs/components/OnboardingPager/OnboardingPager.js +1 -1
- package/lib/commonjs/components/OptionSheet/OptionSheet.js +1 -1
- package/lib/commonjs/components/ProgressBar/ProgressBar.js +1 -1
- package/lib/commonjs/components/Screen/Screen.js +1 -0
- package/lib/commonjs/components/Screen/index.js +1 -0
- package/lib/commonjs/components/SignaturePad/SignaturePad.js +1 -1
- package/lib/commonjs/components/Skeleton/Skeleton.js +1 -1
- package/lib/commonjs/components/Skeleton/SkeletonContent.js +1 -1
- package/lib/commonjs/components/Skeleton/SkeletonProvider.js +1 -1
- package/lib/commonjs/components/Skeleton/index.js +1 -1
- package/lib/commonjs/components/Spinner/Spinner.js +1 -1
- package/lib/commonjs/components/TagInput/TagInput.js +1 -1
- package/lib/commonjs/components/Text/Text.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/Tooltip/Tooltip.js +1 -1
- package/lib/commonjs/components/Tour/Tour.js +1 -1
- package/lib/commonjs/components/WheelPicker/Wheel.js +1 -1
- package/lib/commonjs/components/WheelPicker/WheelPicker.js +1 -1
- package/lib/commonjs/components/index.js +1 -1
- package/lib/commonjs/hooks/index.js +1 -1
- package/lib/commonjs/hooks/useDragToDismiss.js +1 -1
- package/lib/commonjs/hooks/useFieldChain.js +1 -0
- package/lib/commonjs/hooks/usePresenceMotion.js +1 -0
- package/lib/commonjs/hooks/usePressAnimation.js +1 -1
- package/lib/commonjs/hooks/useReducedMotion.js +1 -1
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/network/NetworkStatusBanner.js +1 -1
- package/lib/commonjs/theme/tokens.js +1 -1
- package/lib/commonjs/utils/hapticUtils.js +1 -1
- package/lib/module/components/Accordion/Accordion.js +1 -1
- package/lib/module/components/AmountSlider/AmountSlider.js +1 -1
- package/lib/module/components/AnimatePresence/AnimatePresence.js +1 -1
- package/lib/module/components/AppBar/AppBar.js +1 -1
- package/lib/module/components/AsyncBlock/AsyncBlock.js +1 -1
- package/lib/module/components/Banner/Banner.js +1 -1
- package/lib/module/components/BottomSheet/BottomSheet.js +1 -1
- package/lib/module/components/Button/Button.js +1 -1
- package/lib/module/components/Calendar/Calendar.js +1 -1
- package/lib/module/components/Card/Card.js +1 -1
- package/lib/module/components/Carousel/Carousel.js +1 -1
- package/lib/module/components/Chip/Chip.js +1 -1
- package/lib/module/components/DatePicker/DatePicker.js +1 -1
- package/lib/module/components/DateRangePicker/DateRangePicker.js +1 -1
- package/lib/module/components/Drawer/Drawer.js +1 -1
- package/lib/module/components/EmptyState/EmptyState.js +1 -1
- package/lib/module/components/FloatingActionButton/FloatingActionButton.js +1 -1
- package/lib/module/components/IconButton/IconButton.js +1 -1
- package/lib/module/components/ListItem/ListItem.js +1 -1
- package/lib/module/components/LoaderOverlay/LoaderOverlay.js +1 -1
- package/lib/module/components/Menu/MenuSurface.js +1 -1
- package/lib/module/components/MessageBubble/MessageBubble.js +1 -1
- package/lib/module/components/Modal/Modal.js +1 -1
- package/lib/module/components/OTPInput/OTPInput.js +1 -1
- package/lib/module/components/OnboardingPager/OnboardingPager.js +1 -1
- package/lib/module/components/OptionSheet/OptionSheet.js +1 -1
- package/lib/module/components/ProgressBar/ProgressBar.js +1 -1
- package/lib/module/components/Screen/Screen.js +1 -0
- package/lib/module/components/Screen/index.js +1 -0
- package/lib/module/components/SignaturePad/SignaturePad.js +1 -1
- package/lib/module/components/Skeleton/Skeleton.js +1 -1
- package/lib/module/components/Skeleton/SkeletonContent.js +1 -1
- package/lib/module/components/Skeleton/SkeletonProvider.js +1 -1
- package/lib/module/components/Skeleton/index.js +1 -1
- package/lib/module/components/Spinner/Spinner.js +1 -1
- package/lib/module/components/TagInput/TagInput.js +1 -1
- package/lib/module/components/Text/Text.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/Tooltip/Tooltip.js +1 -1
- package/lib/module/components/Tour/Tour.js +1 -1
- package/lib/module/components/WheelPicker/Wheel.js +1 -1
- package/lib/module/components/WheelPicker/WheelPicker.js +1 -1
- package/lib/module/components/index.js +1 -1
- package/lib/module/hooks/index.js +1 -1
- package/lib/module/hooks/useDragToDismiss.js +1 -1
- package/lib/module/hooks/useFieldChain.js +1 -0
- package/lib/module/hooks/usePresenceMotion.js +1 -0
- package/lib/module/hooks/usePressAnimation.js +1 -1
- package/lib/module/hooks/useReducedMotion.js +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/network/NetworkStatusBanner.js +1 -1
- package/lib/module/theme/tokens.js +1 -1
- package/lib/module/utils/hapticUtils.js +1 -1
- package/lib/typescript/commonjs/components/AnimatePresence/AnimatePresence.d.ts +5 -5
- package/lib/typescript/commonjs/components/AsyncBlock/AsyncBlock.d.ts +11 -6
- package/lib/typescript/commonjs/components/BottomSheet/BottomSheet.d.ts +8 -2
- package/lib/typescript/commonjs/components/Button/Button.d.ts +6 -3
- package/lib/typescript/commonjs/components/Card/Card.d.ts +1 -1
- package/lib/typescript/commonjs/components/Carousel/Carousel.d.ts +2 -0
- package/lib/typescript/commonjs/components/ListItem/ListItem.d.ts +1 -1
- package/lib/typescript/commonjs/components/MessageBubble/MessageBubble.d.ts +6 -3
- package/lib/typescript/commonjs/components/OTPInput/OTPInput.d.ts +1 -2
- package/lib/typescript/commonjs/components/Screen/Screen.d.ts +39 -0
- package/lib/typescript/commonjs/components/Screen/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/SignaturePad/SignaturePad.d.ts +6 -0
- package/lib/typescript/commonjs/components/Skeleton/Skeleton.d.ts +2 -2
- package/lib/typescript/commonjs/components/Skeleton/SkeletonProvider.d.ts +3 -11
- package/lib/typescript/commonjs/components/Skeleton/index.d.ts +1 -1
- package/lib/typescript/commonjs/components/WheelPicker/Wheel.d.ts +2 -0
- package/lib/typescript/commonjs/components/WheelPicker/WheelPicker.d.ts +5 -0
- package/lib/typescript/commonjs/components/index.d.ts +3 -1
- package/lib/typescript/commonjs/hooks/index.d.ts +4 -0
- package/lib/typescript/commonjs/hooks/useDragToDismiss.d.ts +10 -2
- package/lib/typescript/commonjs/hooks/useFieldChain.d.ts +10 -0
- package/lib/typescript/commonjs/hooks/usePresenceMotion.d.ts +14 -0
- package/lib/typescript/commonjs/hooks/usePressAnimation.d.ts +2 -2
- package/lib/typescript/commonjs/hooks/useReducedMotion.d.ts +0 -6
- package/lib/typescript/commonjs/index.d.ts +2 -2
- package/lib/typescript/commonjs/theme/types.d.ts +4 -0
- package/lib/typescript/module/components/AnimatePresence/AnimatePresence.d.ts +5 -5
- package/lib/typescript/module/components/AsyncBlock/AsyncBlock.d.ts +11 -6
- package/lib/typescript/module/components/BottomSheet/BottomSheet.d.ts +8 -2
- package/lib/typescript/module/components/Button/Button.d.ts +6 -3
- package/lib/typescript/module/components/Card/Card.d.ts +1 -1
- package/lib/typescript/module/components/Carousel/Carousel.d.ts +2 -0
- package/lib/typescript/module/components/ListItem/ListItem.d.ts +1 -1
- package/lib/typescript/module/components/MessageBubble/MessageBubble.d.ts +6 -3
- package/lib/typescript/module/components/OTPInput/OTPInput.d.ts +1 -2
- package/lib/typescript/module/components/Screen/Screen.d.ts +39 -0
- package/lib/typescript/module/components/Screen/index.d.ts +3 -0
- package/lib/typescript/module/components/SignaturePad/SignaturePad.d.ts +6 -0
- package/lib/typescript/module/components/Skeleton/Skeleton.d.ts +2 -2
- package/lib/typescript/module/components/Skeleton/SkeletonProvider.d.ts +3 -11
- package/lib/typescript/module/components/Skeleton/index.d.ts +1 -1
- package/lib/typescript/module/components/WheelPicker/Wheel.d.ts +2 -0
- package/lib/typescript/module/components/WheelPicker/WheelPicker.d.ts +5 -0
- package/lib/typescript/module/components/index.d.ts +3 -1
- package/lib/typescript/module/hooks/index.d.ts +4 -0
- package/lib/typescript/module/hooks/useDragToDismiss.d.ts +10 -2
- package/lib/typescript/module/hooks/useFieldChain.d.ts +10 -0
- package/lib/typescript/module/hooks/usePresenceMotion.d.ts +14 -0
- package/lib/typescript/module/hooks/usePressAnimation.d.ts +2 -2
- package/lib/typescript/module/hooks/useReducedMotion.d.ts +0 -6
- package/lib/typescript/module/index.d.ts +2 -2
- package/lib/typescript/module/theme/types.d.ts +4 -0
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{useNetworkStatus}from"@webority/mobile-core";import{useEffect,useMemo,useRef,useState}from"react";import{Animated,StyleSheet,Text}from"react-native";import{useSafeAreaInsets}from"react-native-safe-area-context";import{fontFor,useTheme}from"../theme/index.js";import{jsx as _jsx}from"react/jsx-runtime";export const NetworkStatusBanner=({message:e="You are offline. Some features may be unavailable.",position:t="top",style:o,disabled:n=!1,safeArea:
|
|
1
|
+
"use strict";import{useNetworkStatus}from"@webority/mobile-core";import{useEffect,useMemo,useRef,useState}from"react";import{Animated,StyleSheet,Text}from"react-native";import{useSafeAreaInsets}from"react-native-safe-area-context";import{usePresenceMotion}from"../hooks/usePresenceMotion.js";import{fontFor,useTheme}from"../theme/index.js";import{jsx as _jsx}from"react/jsx-runtime";export const NetworkStatusBanner=({message:e="You are offline. Some features may be unavailable.",position:t="top",style:o,disabled:n=!1,safeArea:r=!0})=>{const a=useTheme(),i=usePresenceMotion(),s=useSafeAreaInsets(),u=r?"top"===t?s.top:s.bottom:0,[l,m]=useState(0),c=l>0?l:56+u,{isConnected:p,isInternetReachable:d}=useNetworkStatus(),f=!(n||p&&!1!==d),b=useRef(new Animated.Value(0)).current,S=useRef(new Animated.Value(0)).current,g=i.duration("normal");useEffect(()=>{Animated.parallel([Animated.timing(b,{toValue:f?1:0,duration:a.motion.duration.normal,useNativeDriver:!0}),Animated.timing(S,{toValue:f?1:0,duration:g,useNativeDriver:!0})]).start()},[f,b,S,a.motion.duration.normal,g]);const y=useMemo(()=>buildStyles(),[]),h=b.interpolate({inputRange:[0,1],outputRange:i.range("top"===t?-c:c,0)});return _jsx(Animated.View,{pointerEvents:f?"auto":"none",accessibilityRole:"alert",accessibilityLiveRegion:f?"polite":"none",onLayout:e=>m(e.nativeEvent.layout.height),style:[y.container,"top"===t?y.top:y.bottom,"top"===t?{paddingTop:10+u}:{paddingBottom:10+u},{backgroundColor:a.colors.error,opacity:S,transform:[{translateY:h}]},o],children:_jsx(Text,{style:{color:a.colors.onError,fontSize:a.typography.fontSize.sm,...fontFor(a,"semibold"),textAlign:"center"},numberOfLines:2,children:e})})};const buildStyles=()=>StyleSheet.create({container:{position:"absolute",left:0,right:0,paddingVertical:10,paddingHorizontal:16,zIndex:1e3,elevation:8},top:{top:0},bottom:{bottom:0}});export default NetworkStatusBanner;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{SQUIRCLE_SMOOTHING}from"../utils/squircle.js";const typography={fontSize:{xs:11,sm:13,base:15,lg:17,xl:20,"2xl":24,"3xl":30,"4xl":36},fontWeight:{normal:"400",medium:"500",semibold:"600",bold:"700"},lineHeight:{tight:1.2,normal:1.4,relaxed:1.6},letterSpacing:{tight:-.2,normal:0,wide:.4}},spacing={none:0,xxs:2,xs:4,sm:8,md:12,lg:16,xl:24,"2xl":32,"3xl":48,"4xl":64},radius={none:0,xs:4,sm:6,md:10,lg:14,xl:20,"2xl":28,full:9999},FIELD_RADIUS=10,fieldSizes={sm:{paddingHorizontal:12,paddingVertical:10,minHeight:38,fontSize:13,borderRadius:10,iconSize:14,labelFontSize:11,labelGap:4,messageFontSize:11,messageGap:2},md:{paddingHorizontal:14,paddingVertical:13,minHeight:44,fontSize:14,borderRadius:10,iconSize:16,labelFontSize:12,labelGap:4,messageFontSize:12,messageGap:2},lg:{paddingHorizontal:16,paddingVertical:15,minHeight:52,fontSize:16,borderRadius:10,iconSize:18,labelFontSize:13,labelGap:4,messageFontSize:13,messageGap:2}},components={button:{xs:{paddingHorizontal:10,paddingVertical:4,minHeight:28,fontSize:12,borderRadius:8},sm:{paddingHorizontal:12,paddingVertical:6,minHeight:34,fontSize:14,borderRadius:10},md:{paddingHorizontal:16,paddingVertical:9,minHeight:42,fontSize:16,borderRadius:12},lg:{paddingHorizontal:20,paddingVertical:12,minHeight:50,fontSize:18,borderRadius:14},xl:{paddingHorizontal:24,paddingVertical:14,minHeight:58,fontSize:20,borderRadius:16}},input:{sm:{...fieldSizes.sm,multilineMinHeight:72},md:{...fieldSizes.md,multilineMinHeight:92},lg:{...fieldSizes.lg,multilineMinHeight:110}},searchBar:{sm:{borderRadius:radius.full},md:{borderRadius:radius.full},lg:{borderRadius:radius.full}},emptyState:{sm:{iconSize:48,titleFontSize:"lg",descriptionFontSize:"sm",paddingVertical:"lg",titleGap:"md",descriptionGap:"xs"},md:{iconSize:64,titleFontSize:"xl",descriptionFontSize:"base",paddingVertical:"xl",titleGap:"md",descriptionGap:"xs"},lg:{iconSize:80,titleFontSize:"2xl",descriptionFontSize:"base",paddingVertical:"2xl",titleGap:"md",descriptionGap:"xs"}},field:{defaultVariant:"outlined",sm:fieldSizes.sm,md:fieldSizes.md,lg:fieldSizes.lg},listItem:{sm:{paddingVertical:"sm",titleFontSize:"sm",subtitleFontSize:"xs",minHeight:44},md:{paddingVertical:"md",titleFontSize:"base",subtitleFontSize:"sm",minHeight:56},lg:{paddingVertical:"lg",titleFontSize:"lg",subtitleFontSize:"sm",minHeight:72}},badge:{sm:{fontSize:10,minWidth:16,height:16,paddingHorizontal:5,dotSize:8},md:{fontSize:11,minWidth:20,height:20,paddingHorizontal:6,dotSize:10},borderWidth:1.5,anchorOffset:4},chip:{sm:{paddingHorizontal:10,paddingVertical:4,fontSize:12,minHeight:26,closeSize:16,closeFontSize:12,gap:6},md:{paddingHorizontal:12,paddingVertical:6,fontSize:13,minHeight:32,closeSize:18,closeFontSize:13,gap:8}},checkbox:{sm:{boxSize:16},md:{boxSize:20},lg:{boxSize:24},labelGap:10},radio:{sm:{outer:16,inner:8},md:{outer:20,inner:10},lg:{outer:24,inner:12},labelGap:10},switch:{sm:{trackWidth:42,trackHeight:26,thumbSize:22,padding:2},md:{trackWidth:51,trackHeight:31,thumbSize:27,padding:2},lg:{trackWidth:60,trackHeight:36,thumbSize:32,padding:2},thumbColor:"#FFFFFF"},otpInput:{sm:{cell:36,fontSize:16,borderRadius:8,gap:8},md:{cell:48,fontSize:20,borderRadius:10,gap:10},lg:{cell:56,fontSize:24,borderRadius:12,gap:12}},dialog:{iconWrapperSize:48,iconWrapperBorderRadius:24,actionButtonMinHeight:44},toast:{iconCircleSize:28,iconCircleBorderRadius:14,iconGlyphFontSize:16,tintBarWidth:0},banner:{tintBarWidth:0},formField:{inlineLabelWidth:"35%"}},motion={duration:{instant:80,fast:160,normal:240,slow:360,slower:500},easing:{standard:[.4,0,.2,1],accelerate:[.4,0,1,1],decelerate:[0,0,.2,1],sharp:[.4,0,.6,1]},spring:{gentle:{damping:26,stiffness:240,mass:.9},bouncy:{damping:16,stiffness:200,mass:.7},snappy:{damping:20,stiffness:300,mass:.7}}},lightShadows={none:{},xs:{shadowColor:"#000",shadowOffset:{width:0,height:1},shadowOpacity:.04,shadowRadius:2,elevation:1},sm:{shadowColor:"#000",shadowOffset:{width:0,height:2},shadowOpacity:.06,shadowRadius:4,elevation:2},md:{shadowColor:"#000",shadowOffset:{width:0,height:4},shadowOpacity:.08,shadowRadius:8,elevation:4},lg:{shadowColor:"#000",shadowOffset:{width:0,height:8},shadowOpacity:.1,shadowRadius:16,elevation:8},xl:{shadowColor:"#000",shadowOffset:{width:0,height:12},shadowOpacity:.14,shadowRadius:24,elevation:12},"2xl":{shadowColor:"#000",shadowOffset:{width:0,height:20},shadowOpacity:.18,shadowRadius:32,elevation:20}},darkShadows={none:{},xs:{shadowColor:"#000",shadowOffset:{width:0,height:1},shadowOpacity:.3,shadowRadius:2,elevation:1},sm:{shadowColor:"#000",shadowOffset:{width:0,height:2},shadowOpacity:.4,shadowRadius:4,elevation:2},md:{shadowColor:"#000",shadowOffset:{width:0,height:4},shadowOpacity:.5,shadowRadius:8,elevation:4},lg:{shadowColor:"#000",shadowOffset:{width:0,height:8},shadowOpacity:.55,shadowRadius:16,elevation:8},xl:{shadowColor:"#000",shadowOffset:{width:0,height:12},shadowOpacity:.6,shadowRadius:24,elevation:12},"2xl":{shadowColor:"#000",shadowOffset:{width:0,height:20},shadowOpacity:.7,shadowRadius:32,elevation:20}};export const lightTheme={mode:"light",colors:{primary:"#5B5BD6",primaryHover:"#4F4FBF",primaryPressed:"#4040A8",primaryMuted:"#EEEEFC",secondary:"#F4F4F8",secondaryHover:"#E9E9F0",success:"#18864F",warning:"#F59E0B",error:"#E12C32",info:"#1B6EF5",onPrimary:"#FFFFFF",onNeutral:"#FFFFFF",onSecondary:"#0F0F1A",onSuccess:"#FFFFFF",onWarning:"#0F0F1A",onError:"#FFFFFF",onInfo:"#FFFFFF",onOverlay:"#FFFFFF",toneText:{primary:"#4F4FD3",success:"#147042",warning:"#8F5C06",error:"#BC1B20",info:"#0958D9"},text:{primary:"#0F0F1A",secondary:"#52525B",tertiary:"#62626B",inverse:"#FFFFFF",strong:"#252F4A",disabled:"#B4B4BB",link:"#5B5BD6"},background:{primary:"#FFFFFF",secondary:"#F8F8FB",tertiary:"#F1F1F5",elevated:"#FFFFFF",overlay:"rgba(15, 15, 26, 0.5)",inverse:"#0F0F1A"},border:{primary:"#E5E5EC",secondary:"#EFEFF3",focus:"#5B5BD6",error:"#E5484D",width:1},field:{background:"#F9FBFC",backgroundFocused:"#FFFFFF",backgroundDisabled:"#F5F6FA",border:"#EBEDF3",borderFocused:"#BED2F9",borderError:"#FDBFCE",label:"#242F4A",text:"#252F4A",textDisabled:"#C4CADA",placeholder:"#626D8B",placeholderDisabled:"#C4CADA",icon:"#7A849F",iconFocused:"#4B5675",iconDisabled:"#C4CADA",caret:"#5B8DEE",message:"#D81736"},surface:{pressed:"rgba(15, 15, 26, 0.06)",hovered:"rgba(15, 15, 26, 0.04)",selected:"rgba(91, 91, 214, 0.1)",disabled:"#F1F1F5"},glass:{fill:"rgba(255, 255, 255, 0.28)",border:"rgba(255, 255, 255, 0.45)",on:"#0F0F1A",badge:"#FFFFFF"},skeleton:{background:"#EBEDF3",highlight:"#F5F6FA"},avatarPalette:["#5B5BD6","#0A7979","#A45A05","#CD226E","#2462EB","#7C3AED","#047C57","#D42222"]},typography:typography,spacing:spacing,radius:radius,cornerSmoothing:SQUIRCLE_SMOOTHING,shadows:lightShadows,motion:motion,components:components,gradients:{}};export const darkTheme={mode:"dark",colors:{primary:"#7C7CE8",primaryHover:"#9292EE",primaryPressed:"#A8A8F2",primaryMuted:"#1F1F3D",secondary:"#1F1F26",secondaryHover:"#2A2A33",success:"#30C780",warning:"#FBBF24",error:"#F87171",info:"#60A5FA",onPrimary:"#0F0F1A",onNeutral:"#0F0F1A",onSecondary:"#FAFAFA",onSuccess:"#0F0F1A",onWarning:"#0F0F1A",onError:"#0F0F1A",onInfo:"#0F0F1A",onOverlay:"#FFFFFF",toneText:{primary:"#8989EA",success:"#30C780",warning:"#FBBF24",error:"#F87171",info:"#60A5FA"},text:{primary:"#FAFAFA",secondary:"#B4B4BB",tertiary:"#919199",inverse:"#0F0F1A",strong:"#E2E2E2",disabled:"#52525B",link:"#9292EE"},background:{primary:"#0B0B12",secondary:"#13131C",tertiary:"#1C1C26",elevated:"#1C1C26",overlay:"rgba(0, 0, 0, 0.65)",inverse:"#FAFAFA"},border:{primary:"#27272F",secondary:"#1C1C26",focus:"#7C7CE8",error:"#F87171",width:1},field:{background:"#13131C",backgroundFocused:"#0B0B12",backgroundDisabled:"#1C1C26",border:"#27272F",borderFocused:"#3D5FB0",borderError:"#8A2F42",label:"#E4E6EE",text:"#FAFAFA",textDisabled:"#52525B",placeholder:"#84848D",placeholderDisabled:"#52525B",icon:"#8B8B95",iconFocused:"#D4D4DB",iconDisabled:"#52525B",caret:"#7C9EF0",message:"#F87171"},surface:{pressed:"rgba(255, 255, 255, 0.08)",hovered:"rgba(255, 255, 255, 0.05)",selected:"rgba(124, 124, 232, 0.18)",disabled:"#1C1C26"},glass:{fill:"rgba(255, 255, 255, 0.28)",border:"rgba(255, 255, 255, 0.45)",on:"#0F0F1A",badge:"#FFFFFF"},skeleton:{background:"#1C1C26",highlight:"#27272F"},avatarPalette:["#8B8BEE","#2DD4BF","#FCD34D","#F472B6","#60A5FA","#A78BFA","#34D399","#F87171"]},typography:typography,spacing:spacing,radius:radius,cornerSmoothing:SQUIRCLE_SMOOTHING,shadows:darkShadows,motion:motion,components:components,gradients:{}};
|
|
1
|
+
"use strict";import{SQUIRCLE_SMOOTHING}from"../utils/squircle.js";const typography={fontSize:{xs:11,sm:13,base:15,lg:17,xl:20,"2xl":24,"3xl":30,"4xl":36},fontWeight:{normal:"400",medium:"500",semibold:"600",bold:"700"},lineHeight:{tight:1.2,normal:1.4,relaxed:1.6},letterSpacing:{tight:-.2,normal:0,wide:.4}},spacing={none:0,xxs:2,xs:4,sm:8,md:12,lg:16,xl:24,"2xl":32,"3xl":48,"4xl":64},radius={none:0,xs:4,sm:6,md:10,lg:14,xl:20,"2xl":28,full:9999},FIELD_RADIUS=10,fieldSizes={sm:{paddingHorizontal:12,paddingVertical:10,minHeight:38,fontSize:13,borderRadius:10,iconSize:14,labelFontSize:11,labelGap:4,messageFontSize:11,messageGap:2},md:{paddingHorizontal:14,paddingVertical:13,minHeight:44,fontSize:14,borderRadius:10,iconSize:16,labelFontSize:12,labelGap:4,messageFontSize:12,messageGap:2},lg:{paddingHorizontal:16,paddingVertical:15,minHeight:52,fontSize:16,borderRadius:10,iconSize:18,labelFontSize:13,labelGap:4,messageFontSize:13,messageGap:2}},components={button:{xs:{paddingHorizontal:10,paddingVertical:4,minHeight:28,fontSize:12,borderRadius:8},sm:{paddingHorizontal:12,paddingVertical:6,minHeight:34,fontSize:14,borderRadius:10},md:{paddingHorizontal:16,paddingVertical:9,minHeight:42,fontSize:16,borderRadius:12},lg:{paddingHorizontal:20,paddingVertical:12,minHeight:50,fontSize:18,borderRadius:14},xl:{paddingHorizontal:24,paddingVertical:14,minHeight:58,fontSize:20,borderRadius:16}},input:{sm:{...fieldSizes.sm,multilineMinHeight:72},md:{...fieldSizes.md,multilineMinHeight:92},lg:{...fieldSizes.lg,multilineMinHeight:110}},searchBar:{sm:{borderRadius:radius.full},md:{borderRadius:radius.full},lg:{borderRadius:radius.full}},emptyState:{sm:{iconSize:48,titleFontSize:"lg",descriptionFontSize:"sm",paddingVertical:"lg",titleGap:"md",descriptionGap:"xs"},md:{iconSize:64,titleFontSize:"xl",descriptionFontSize:"base",paddingVertical:"xl",titleGap:"md",descriptionGap:"xs"},lg:{iconSize:80,titleFontSize:"2xl",descriptionFontSize:"base",paddingVertical:"2xl",titleGap:"md",descriptionGap:"xs"}},field:{defaultVariant:"outlined",sm:fieldSizes.sm,md:fieldSizes.md,lg:fieldSizes.lg},listItem:{sm:{paddingVertical:"sm",titleFontSize:"sm",subtitleFontSize:"xs",minHeight:44},md:{paddingVertical:"md",titleFontSize:"base",subtitleFontSize:"sm",minHeight:56},lg:{paddingVertical:"lg",titleFontSize:"lg",subtitleFontSize:"sm",minHeight:72}},badge:{sm:{fontSize:10,minWidth:16,height:16,paddingHorizontal:5,dotSize:8},md:{fontSize:11,minWidth:20,height:20,paddingHorizontal:6,dotSize:10},borderWidth:1.5,anchorOffset:4},chip:{sm:{paddingHorizontal:10,paddingVertical:4,fontSize:12,minHeight:26,closeSize:16,closeFontSize:12,gap:6},md:{paddingHorizontal:12,paddingVertical:6,fontSize:13,minHeight:32,closeSize:18,closeFontSize:13,gap:8}},checkbox:{sm:{boxSize:16},md:{boxSize:20},lg:{boxSize:24},labelGap:10},radio:{sm:{outer:16,inner:8},md:{outer:20,inner:10},lg:{outer:24,inner:12},labelGap:10},switch:{sm:{trackWidth:42,trackHeight:26,thumbSize:22,padding:2},md:{trackWidth:51,trackHeight:31,thumbSize:27,padding:2},lg:{trackWidth:60,trackHeight:36,thumbSize:32,padding:2},thumbColor:"#FFFFFF"},otpInput:{sm:{cell:36,fontSize:16,borderRadius:8,gap:8},md:{cell:48,fontSize:20,borderRadius:10,gap:10},lg:{cell:56,fontSize:24,borderRadius:12,gap:12}},dialog:{iconWrapperSize:48,iconWrapperBorderRadius:24,actionButtonMinHeight:44},toast:{iconCircleSize:28,iconCircleBorderRadius:14,iconGlyphFontSize:16,tintBarWidth:0},banner:{tintBarWidth:0},formField:{inlineLabelWidth:"35%"}},motion={duration:{instant:80,fast:160,normal:240,slow:360,slower:500},fadeDuration:160,easing:{standard:[.4,0,.2,1],accelerate:[.4,0,1,1],decelerate:[0,0,.2,1],sharp:[.4,0,.6,1]},spring:{gentle:{damping:26,stiffness:240,mass:.9},bouncy:{damping:16,stiffness:200,mass:.7},snappy:{damping:20,stiffness:300,mass:.7}}},lightShadows={none:{},xs:{shadowColor:"#000",shadowOffset:{width:0,height:1},shadowOpacity:.04,shadowRadius:2,elevation:1},sm:{shadowColor:"#000",shadowOffset:{width:0,height:2},shadowOpacity:.06,shadowRadius:4,elevation:2},md:{shadowColor:"#000",shadowOffset:{width:0,height:4},shadowOpacity:.08,shadowRadius:8,elevation:4},lg:{shadowColor:"#000",shadowOffset:{width:0,height:8},shadowOpacity:.1,shadowRadius:16,elevation:8},xl:{shadowColor:"#000",shadowOffset:{width:0,height:12},shadowOpacity:.14,shadowRadius:24,elevation:12},"2xl":{shadowColor:"#000",shadowOffset:{width:0,height:20},shadowOpacity:.18,shadowRadius:32,elevation:20}},darkShadows={none:{},xs:{shadowColor:"#000",shadowOffset:{width:0,height:1},shadowOpacity:.3,shadowRadius:2,elevation:1},sm:{shadowColor:"#000",shadowOffset:{width:0,height:2},shadowOpacity:.4,shadowRadius:4,elevation:2},md:{shadowColor:"#000",shadowOffset:{width:0,height:4},shadowOpacity:.5,shadowRadius:8,elevation:4},lg:{shadowColor:"#000",shadowOffset:{width:0,height:8},shadowOpacity:.55,shadowRadius:16,elevation:8},xl:{shadowColor:"#000",shadowOffset:{width:0,height:12},shadowOpacity:.6,shadowRadius:24,elevation:12},"2xl":{shadowColor:"#000",shadowOffset:{width:0,height:20},shadowOpacity:.7,shadowRadius:32,elevation:20}};export const lightTheme={mode:"light",colors:{primary:"#5B5BD6",primaryHover:"#4F4FBF",primaryPressed:"#4040A8",primaryMuted:"#EEEEFC",secondary:"#F4F4F8",secondaryHover:"#E9E9F0",success:"#18864F",warning:"#F59E0B",error:"#E12C32",info:"#1B6EF5",onPrimary:"#FFFFFF",onNeutral:"#FFFFFF",onSecondary:"#0F0F1A",onSuccess:"#FFFFFF",onWarning:"#0F0F1A",onError:"#FFFFFF",onInfo:"#FFFFFF",onOverlay:"#FFFFFF",toneText:{primary:"#4F4FD3",success:"#147042",warning:"#8F5C06",error:"#BC1B20",info:"#0958D9"},text:{primary:"#0F0F1A",secondary:"#52525B",tertiary:"#62626B",inverse:"#FFFFFF",strong:"#252F4A",disabled:"#B4B4BB",link:"#5B5BD6"},background:{primary:"#FFFFFF",secondary:"#F8F8FB",tertiary:"#F1F1F5",elevated:"#FFFFFF",overlay:"rgba(15, 15, 26, 0.5)",inverse:"#0F0F1A"},border:{primary:"#E5E5EC",secondary:"#EFEFF3",focus:"#5B5BD6",error:"#E5484D",width:1},field:{background:"#F9FBFC",backgroundFocused:"#FFFFFF",backgroundDisabled:"#F5F6FA",border:"#EBEDF3",borderFocused:"#BED2F9",borderError:"#FDBFCE",label:"#242F4A",text:"#252F4A",textDisabled:"#C4CADA",placeholder:"#626D8B",placeholderDisabled:"#C4CADA",icon:"#7A849F",iconFocused:"#4B5675",iconDisabled:"#C4CADA",caret:"#5B8DEE",message:"#D81736"},surface:{pressed:"rgba(15, 15, 26, 0.06)",hovered:"rgba(15, 15, 26, 0.04)",selected:"rgba(91, 91, 214, 0.1)",disabled:"#F1F1F5"},glass:{fill:"rgba(255, 255, 255, 0.28)",border:"rgba(255, 255, 255, 0.45)",on:"#0F0F1A",badge:"#FFFFFF"},skeleton:{background:"#EBEDF3",highlight:"#F5F6FA"},avatarPalette:["#5B5BD6","#0A7979","#A45A05","#CD226E","#2462EB","#7C3AED","#047C57","#D42222"]},typography:typography,spacing:spacing,radius:radius,cornerSmoothing:SQUIRCLE_SMOOTHING,shadows:lightShadows,motion:motion,components:components,gradients:{}};export const darkTheme={mode:"dark",colors:{primary:"#7C7CE8",primaryHover:"#9292EE",primaryPressed:"#A8A8F2",primaryMuted:"#1F1F3D",secondary:"#1F1F26",secondaryHover:"#2A2A33",success:"#30C780",warning:"#FBBF24",error:"#F87171",info:"#60A5FA",onPrimary:"#0F0F1A",onNeutral:"#0F0F1A",onSecondary:"#FAFAFA",onSuccess:"#0F0F1A",onWarning:"#0F0F1A",onError:"#0F0F1A",onInfo:"#0F0F1A",onOverlay:"#FFFFFF",toneText:{primary:"#8989EA",success:"#30C780",warning:"#FBBF24",error:"#F87171",info:"#60A5FA"},text:{primary:"#FAFAFA",secondary:"#B4B4BB",tertiary:"#919199",inverse:"#0F0F1A",strong:"#E2E2E2",disabled:"#52525B",link:"#9292EE"},background:{primary:"#0B0B12",secondary:"#13131C",tertiary:"#1C1C26",elevated:"#1C1C26",overlay:"rgba(0, 0, 0, 0.65)",inverse:"#FAFAFA"},border:{primary:"#27272F",secondary:"#1C1C26",focus:"#7C7CE8",error:"#F87171",width:1},field:{background:"#13131C",backgroundFocused:"#0B0B12",backgroundDisabled:"#1C1C26",border:"#27272F",borderFocused:"#3D5FB0",borderError:"#8A2F42",label:"#E4E6EE",text:"#FAFAFA",textDisabled:"#52525B",placeholder:"#84848D",placeholderDisabled:"#52525B",icon:"#8B8B95",iconFocused:"#D4D4DB",iconDisabled:"#52525B",caret:"#7C9EF0",message:"#F87171"},surface:{pressed:"rgba(255, 255, 255, 0.08)",hovered:"rgba(255, 255, 255, 0.05)",selected:"rgba(124, 124, 232, 0.18)",disabled:"#1C1C26"},glass:{fill:"rgba(255, 255, 255, 0.28)",border:"rgba(255, 255, 255, 0.45)",on:"#0F0F1A",badge:"#FFFFFF"},skeleton:{background:"#1C1C26",highlight:"#27272F"},avatarPalette:["#8B8BEE","#2DD4BF","#FCD34D","#F472B6","#60A5FA","#A78BFA","#34D399","#F87171"]},typography:typography,spacing:spacing,radius:radius,cornerSmoothing:SQUIRCLE_SMOOTHING,shadows:darkShadows,motion:motion,components:components,gradients:{}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import*as Haptics from"expo-haptics";import{Platform
|
|
1
|
+
"use strict";import*as Haptics from"expo-haptics";import{Platform}from"react-native";let hapticImpl=null;const EXPO_HANDLERS={selection:()=>Haptics.selectionAsync(),impactLight:()=>Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light),impactMedium:()=>Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Medium),impactHeavy:()=>Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Heavy),notificationSuccess:()=>Haptics.notificationAsync(Haptics.NotificationFeedbackType.Success),notificationWarning:()=>Haptics.notificationAsync(Haptics.NotificationFeedbackType.Warning),notificationError:()=>Haptics.notificationAsync(Haptics.NotificationFeedbackType.Error),longPress:()=>Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Medium),tick:()=>Haptics.selectionAsync(),denseTick:()=>Haptics.selectionAsync(),confirm:()=>Haptics.notificationAsync(Haptics.NotificationFeedbackType.Success),reject:()=>Haptics.notificationAsync(Haptics.NotificationFeedbackType.Error),gestureStart:()=>Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light)},ANDROID_HAPTICS={longPress:"Long_Press",tick:"Segment_Tick",denseTick:"Segment_Frequent_Tick",confirm:"Confirm",reject:"Reject",gestureStart:"Gesture_Start"},androidHandler=t=>{const c=ANDROID_HAPTICS[t];return"android"===Platform.OS&&c&&"function"==typeof Haptics.performAndroidHapticsAsync&&Haptics.AndroidHaptics?.[c]?()=>Haptics.performAndroidHapticsAsync(Haptics.AndroidHaptics[c]):null};export const triggerHaptic=(t="selection")=>{if(hapticImpl)try{return void hapticImpl(t)}catch{}const c=androidHandler(t)??EXPO_HANDLERS[t];try{c().catch(()=>{})}catch{}};export const setHapticImplementation=t=>{hapticImpl=t};export const resolveHaptic=(t,c)=>!1===t?null:t??c;
|
|
@@ -10,19 +10,19 @@ export interface AnimatePresenceProps {
|
|
|
10
10
|
children?: React.ReactNode;
|
|
11
11
|
/** Enter/exit preset. Default `'fade'`. */
|
|
12
12
|
preset?: PresencePreset;
|
|
13
|
-
/** Animation duration (ms). Defaults to `theme.motion.duration.
|
|
13
|
+
/** Animation duration (ms). Defaults to `theme.motion.duration.normal`. */
|
|
14
14
|
duration?: number;
|
|
15
15
|
style?: StyleProp<ViewStyle>;
|
|
16
16
|
testID?: string;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* Animates a single child in on mount and out on unmount. Thin, theme-aware
|
|
20
|
-
* wrapper over Reanimated's `entering`/`exiting
|
|
21
|
-
* alive to play the exit, so the parent only toggles a condition.
|
|
22
|
-
* Reduce Motion setting
|
|
20
|
+
* wrapper over Reanimated's `entering`/`exiting`. Reanimated keeps the view
|
|
21
|
+
* alive to play the exit, so the parent only toggles a condition. Under the OS
|
|
22
|
+
* Reduce Motion setting every preset fades instead of moving.
|
|
23
23
|
*
|
|
24
24
|
* For animating items inside a list, use Reanimated's `itemLayoutAnimation`
|
|
25
|
-
* on `Animated.FlatList` instead
|
|
25
|
+
* on `Animated.FlatList` instead; this wrapper targets single conditional nodes.
|
|
26
26
|
*/
|
|
27
27
|
declare const AnimatePresence: React.FC<AnimatePresenceProps>;
|
|
28
28
|
export { AnimatePresence };
|
|
@@ -5,12 +5,17 @@ export type AsyncBlockErrorVariant = 'default' | 'offline';
|
|
|
5
5
|
export interface AsyncBlockProps {
|
|
6
6
|
/** Show the placeholder instead of content. */
|
|
7
7
|
loading?: boolean;
|
|
8
|
-
/** An error to show in place of content. Falsy means no error. */
|
|
9
|
-
error?: string | React.ReactNode;
|
|
10
8
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* `
|
|
9
|
+
* An error to show in place of content. Falsy means no error. A string is the
|
|
10
|
+
* description. A React element or array is rendered under the state. Any other
|
|
11
|
+
* truthy value is read with `extractApiError`, and its `message` is the description.
|
|
12
|
+
*/
|
|
13
|
+
error?: unknown;
|
|
14
|
+
/**
|
|
15
|
+
* `'offline'` draws the error state as a lost connection: a cloud icon and
|
|
16
|
+
* `offlineTitle`, with a reconnect hint unless the description is text. Unset,
|
|
17
|
+
* an error whose code is `OFFLINE_CODE` picks it and every other error is
|
|
18
|
+
* `'default'`. A set value always wins.
|
|
14
19
|
*/
|
|
15
20
|
errorVariant?: AsyncBlockErrorVariant;
|
|
16
21
|
/** The fetch succeeded with nothing to show. */
|
|
@@ -23,7 +28,7 @@ export interface AsyncBlockProps {
|
|
|
23
28
|
emptyTitle?: string;
|
|
24
29
|
emptyDescription?: string;
|
|
25
30
|
emptyIcon?: React.ReactNode;
|
|
26
|
-
/** Copy for the error state.
|
|
31
|
+
/** Copy for the error state. The description is `error` when it is a string, else the extracted message. */
|
|
27
32
|
errorTitle?: string;
|
|
28
33
|
/** Title of the offline error state. */
|
|
29
34
|
offlineTitle?: string;
|
|
@@ -49,11 +49,17 @@ export interface BottomSheetProps {
|
|
|
49
49
|
*/
|
|
50
50
|
onAfterClose?: () => void;
|
|
51
51
|
enablePanDownToClose?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Whether a tap on the scrim closes the sheet. Android Back and web Escape
|
|
54
|
+
* follow it: when off, they do nothing either, so a sheet that must be
|
|
55
|
+
* answered stays open.
|
|
56
|
+
*/
|
|
52
57
|
enableBackdropPress?: boolean;
|
|
53
58
|
/**
|
|
54
59
|
* Asked before the user dismisses the sheet: a handle drag past the close
|
|
55
|
-
* threshold or a fast swipe down,
|
|
56
|
-
*
|
|
60
|
+
* threshold or a fast swipe down, `requestClose()`, and, while
|
|
61
|
+
* `enableBackdropPress` is on, a tap on the scrim, hardware Back (Android)
|
|
62
|
+
* and Escape (web). Return `true` (or resolve `true`)
|
|
57
63
|
* to let it close, `false` to keep it open. A refused drag springs back to
|
|
58
64
|
* the snap point it started from, and `onChange(-1)` does not fire.
|
|
59
65
|
*
|
|
@@ -31,9 +31,10 @@ export interface ButtonProps extends Omit<PressableProps, 'style' | 'children'>
|
|
|
31
31
|
tone?: ButtonTone;
|
|
32
32
|
size?: ButtonSize;
|
|
33
33
|
/**
|
|
34
|
-
* When true, the button is disabled and
|
|
35
|
-
* Use for in-flight submissions. This is **not**
|
|
36
|
-
* pending action with an inline spinner, not a
|
|
34
|
+
* When true, the button is disabled and shows a Spinner in front of the title, in the leading
|
|
35
|
+
* icon slot, and the title stays readable. Use for in-flight submissions. This is **not**
|
|
36
|
+
* SkeletonContent. Interactive controls signal pending action with an inline spinner, not a
|
|
37
|
+
* placeholder shimmer.
|
|
37
38
|
*/
|
|
38
39
|
loading?: boolean;
|
|
39
40
|
disabled?: boolean;
|
|
@@ -69,6 +70,8 @@ export interface ButtonProps extends Omit<PressableProps, 'style' | 'children'>
|
|
|
69
70
|
*/
|
|
70
71
|
gradient?: string | GradientDefinition;
|
|
71
72
|
style?: StyleProp<ViewStyle>;
|
|
73
|
+
/** Style for the outer wrapper, outside the pressed area: margins go here so the tap target keeps its size. */
|
|
74
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
72
75
|
textStyle?: StyleProp<TextStyle>;
|
|
73
76
|
/**
|
|
74
77
|
* Press feedback by name: `'scale'` (default), `'bounce'`, `'fade'`,
|
|
@@ -70,7 +70,7 @@ export interface CardProps extends Omit<PressableProps, 'style' | 'children'> {
|
|
|
70
70
|
*/
|
|
71
71
|
gradient?: string | GradientDefinition;
|
|
72
72
|
onPress?: (event: GestureResponderEvent) => void;
|
|
73
|
-
/** Haptic feedback for interactions.
|
|
73
|
+
/** Haptic feedback for interactions. Off unless a HapticType is passed. */
|
|
74
74
|
haptic?: HapticType | false;
|
|
75
75
|
/**
|
|
76
76
|
* A long-press menu. Long press (right-click or Shift+F10 on the web) lifts
|
|
@@ -31,6 +31,8 @@ export interface CarouselProps<T = unknown> {
|
|
|
31
31
|
/** Initial index for uncontrolled usage. */
|
|
32
32
|
defaultIndex?: number;
|
|
33
33
|
onIndexChange?: (index: number) => void;
|
|
34
|
+
/** Horizontal scroll offset in dp, fired on each scroll frame. Listening costs a JS call per frame, so it is attached only when set. */
|
|
35
|
+
onScrollOffsetChange?: (offset: number) => void;
|
|
34
36
|
autoPlay?: boolean;
|
|
35
37
|
/** Auto-play tick in ms. Default 4000. */
|
|
36
38
|
autoPlayInterval?: number;
|
|
@@ -78,7 +78,7 @@ export interface ListItemProps {
|
|
|
78
78
|
*/
|
|
79
79
|
actions?: React.ReactNode | ListItemAction[];
|
|
80
80
|
onPress?: (event: GestureResponderEvent) => void;
|
|
81
|
-
/** Haptic feedback for interactions.
|
|
81
|
+
/** Haptic feedback for interactions. Off unless a HapticType is passed. */
|
|
82
82
|
haptic?: HapticType | false;
|
|
83
83
|
selected?: boolean;
|
|
84
84
|
disabled?: boolean;
|
|
@@ -31,6 +31,7 @@ export interface MessageBubbleLabels {
|
|
|
31
31
|
read: string;
|
|
32
32
|
failed: string;
|
|
33
33
|
retry: string;
|
|
34
|
+
copy: string;
|
|
34
35
|
replyTo: (author: string | undefined) => string;
|
|
35
36
|
}
|
|
36
37
|
export declare const DEFAULT_MESSAGE_BUBBLE_LABELS: Readonly<MessageBubbleLabels>;
|
|
@@ -61,11 +62,13 @@ export interface MessageBubbleProps {
|
|
|
61
62
|
/** Shows Try again under a failed message, and offers it as an accessibility action. */
|
|
62
63
|
onRetry?: () => void;
|
|
63
64
|
/**
|
|
64
|
-
* Long-press actions (
|
|
65
|
-
*
|
|
66
|
-
* typically in a menu. Without actions there is no long press.
|
|
65
|
+
* Long-press actions (Reply, and any the app adds). They are the items of the
|
|
66
|
+
* long-press menu over the bubble and the screen reader's accessibility actions.
|
|
67
67
|
*/
|
|
68
68
|
actions?: ReadonlyArray<MessageAction>;
|
|
69
|
+
/** Adds Copy to the long-press menu and the accessibility actions; the app writes `text` to the clipboard. */
|
|
70
|
+
onCopy?: (text: string) => void;
|
|
71
|
+
/** Called on a long press, after the menu opens. */
|
|
69
72
|
onLongPress?: () => void;
|
|
70
73
|
/** Content under the bubble on the same side (action cards, a rating). */
|
|
71
74
|
footer?: React.ReactNode;
|
|
@@ -30,8 +30,7 @@ export interface OTPInputProps {
|
|
|
30
30
|
size?: OTPInputSize;
|
|
31
31
|
secure?: boolean;
|
|
32
32
|
/**
|
|
33
|
-
* Haptic feedback for interactions.
|
|
34
|
-
* to override the default.
|
|
33
|
+
* Haptic feedback for interactions. Off unless a HapticType is passed.
|
|
35
34
|
*/
|
|
36
35
|
haptic?: HapticType | false;
|
|
37
36
|
accessibilityLabel?: string;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { FlatListProps, StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import type { AppBarRightAction } from '../AppBar';
|
|
4
|
+
import type { SafeAreaEdge } from '../KeyboardAwareScrollView/KeyboardAwareScrollView';
|
|
5
|
+
export interface ScreenProps<ItemT = unknown> {
|
|
6
|
+
title?: string;
|
|
7
|
+
subtitle?: string;
|
|
8
|
+
/** Large title that collapses into the bar on scroll. Default true. */
|
|
9
|
+
largeTitle?: boolean;
|
|
10
|
+
/** Shows the back chevron; runs on press and on Android Back. */
|
|
11
|
+
onBack?: () => void;
|
|
12
|
+
rightActions?: AppBarRightAction[];
|
|
13
|
+
leading?: React.ReactNode;
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
onRefresh?: () => unknown;
|
|
16
|
+
refreshing?: boolean;
|
|
17
|
+
/** Pinned under the content, above the keyboard. */
|
|
18
|
+
footer?: React.ReactNode;
|
|
19
|
+
footerStyle?: StyleProp<ViewStyle>;
|
|
20
|
+
/** Default true; false renders a plain View. */
|
|
21
|
+
scroll?: boolean;
|
|
22
|
+
/** Virtualised list mode; its scroll drives the title collapse. */
|
|
23
|
+
list?: Omit<FlatListProps<ItemT>, 'onScroll' | 'refreshControl'>;
|
|
24
|
+
/** Safe-area edges padded. Default top and bottom; a tab screen passes top only. */
|
|
25
|
+
edges?: SafeAreaEdge[];
|
|
26
|
+
/** Default true. */
|
|
27
|
+
keyboardToolbar?: boolean;
|
|
28
|
+
contentContainerStyle?: StyleProp<ViewStyle>;
|
|
29
|
+
style?: StyleProp<ViewStyle>;
|
|
30
|
+
testID?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The page shell: safe area, app bar with a large title that collapses as the
|
|
34
|
+
* content scrolls, a keyboard-aware scroll view (or a virtualised list), pull to
|
|
35
|
+
* refresh, a pinned footer and the keyboard toolbar. The app keeps its own back
|
|
36
|
+
* guard (`usePreventRemove`) and passes `onBack`; the screen never navigates.
|
|
37
|
+
*/
|
|
38
|
+
export declare function Screen<ItemT = unknown>(props: ScreenProps<ItemT>): React.ReactElement;
|
|
39
|
+
//# sourceMappingURL=Screen.d.ts.map
|
|
@@ -28,6 +28,12 @@ export interface SignaturePadLabels {
|
|
|
28
28
|
undoneAnnouncement: string;
|
|
29
29
|
/** Message of the error `toFile()` rejects with while nothing is signed. */
|
|
30
30
|
emptyError: string;
|
|
31
|
+
/** Opens the pad full screen. */
|
|
32
|
+
expand: string;
|
|
33
|
+
/** Closes the full-screen pad and keeps its strokes. */
|
|
34
|
+
done: string;
|
|
35
|
+
/** Closes the full-screen pad and discards its strokes. */
|
|
36
|
+
close: string;
|
|
31
37
|
}
|
|
32
38
|
export interface SignaturePadRef {
|
|
33
39
|
/**
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
* - For `animation: 'pulse'`, a full-fill Animated.View fades its opacity
|
|
16
16
|
* between 0 and 0.6. Cheap and useful for tiny shapes where a sweep
|
|
17
17
|
* would barely be visible.
|
|
18
|
-
* - For `animation: 'none'
|
|
19
|
-
*
|
|
18
|
+
* - For `animation: 'none'`, just the base color renders. Under the OS Reduce
|
|
19
|
+
* Motion preference an `'auto'` shimmer plays the pulse instead.
|
|
20
20
|
*
|
|
21
21
|
* `variant` describes the SHAPE: rect (default), rounded (theme.radius.md),
|
|
22
22
|
* circle (50%), or text (small radius, slightly inset height). Set width /
|
|
@@ -8,10 +8,8 @@
|
|
|
8
8
|
* every primitive shares a single Animated.Value — synchronized shimmer
|
|
9
9
|
* across the whole subtree, one native-driver loop per provider.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* if the user toggles the setting while the app is open the skeletons stop
|
|
14
|
-
* shimmering immediately.
|
|
11
|
+
* Under the OS "Reduce Motion" preference an `'auto'` skeleton pulses instead
|
|
12
|
+
* of sweeping (see Skeleton.tsx); the clock keeps running for the pulse.
|
|
15
13
|
*/
|
|
16
14
|
import type React from 'react';
|
|
17
15
|
import type { ReactNode } from 'react';
|
|
@@ -41,7 +39,7 @@ export interface SkeletonProviderDefaults {
|
|
|
41
39
|
fadeDuration?: number;
|
|
42
40
|
/**
|
|
43
41
|
* Hard override for animation. `'auto'` (default) follows the OS
|
|
44
|
-
* "Reduce Motion" preference: shimmer when off,
|
|
42
|
+
* "Reduce Motion" preference: shimmer when off, pulse when on. `'always'`
|
|
45
43
|
* forces shimmer regardless. `'never'` forces static — useful for tests or
|
|
46
44
|
* battery-sensitive screens.
|
|
47
45
|
*/
|
|
@@ -57,10 +55,4 @@ export declare const SkeletonProvider: React.FC<SkeletonProviderProps>;
|
|
|
57
55
|
* one — but without a shared clock or theme-coordinated colors.
|
|
58
56
|
*/
|
|
59
57
|
export declare const useSkeletonDefaults: () => SkeletonProviderDefaults;
|
|
60
|
-
/**
|
|
61
|
-
* Subscribes to the OS "Reduce Motion" preference. Live — updates when the
|
|
62
|
-
* user toggles the setting while the app is open. Used internally by
|
|
63
|
-
* `SkeletonProvider`; exposed so consumer screens can branch on it too.
|
|
64
|
-
*/
|
|
65
|
-
export declare const useReduceMotion: () => boolean;
|
|
66
58
|
//# sourceMappingURL=SkeletonProvider.d.ts.map
|
|
@@ -7,7 +7,7 @@ export { SkeletonContent } from './SkeletonContent';
|
|
|
7
7
|
export type { SkeletonListProps } from './SkeletonList';
|
|
8
8
|
export { SkeletonList } from './SkeletonList';
|
|
9
9
|
export type { SkeletonColors, SkeletonProviderDefaults, SkeletonProviderProps } from './SkeletonProvider';
|
|
10
|
-
export { SkeletonProvider,
|
|
10
|
+
export { SkeletonProvider, useSkeletonDefaults } from './SkeletonProvider';
|
|
11
11
|
export type { SkeletonSkipProps } from './SkeletonSkip';
|
|
12
12
|
export { SkeletonSkip } from './SkeletonSkip';
|
|
13
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -64,6 +64,11 @@ export interface WheelPickerDurationProps extends WheelPickerBaseProps {
|
|
|
64
64
|
minuteStep?: WheelDurationStep;
|
|
65
65
|
/** Upper bound in minutes. Default and ceiling 1439 (23 h 59 min). */
|
|
66
66
|
maxMinutes?: number;
|
|
67
|
+
/**
|
|
68
|
+
* Durations in minutes, drawn as chips below the wheel; a tap sets the duration. Each must be a
|
|
69
|
+
* whole number of minutes from 0 to `maxMinutes` in steps of `minuteStep`, or the picker throws.
|
|
70
|
+
*/
|
|
71
|
+
presets?: number[];
|
|
67
72
|
labels?: WheelPickerDurationLabels;
|
|
68
73
|
}
|
|
69
74
|
export type WheelPickerProps = WheelPickerColumnsProps | WheelPickerListProps | WheelPickerDurationProps;
|
|
@@ -140,6 +140,8 @@ export type { BlockMarkdownAction, EditorSelection, EditorState, InlineMarkdownA
|
|
|
140
140
|
export { applyMarkdownAction, RichTextEditor } from './RichTextEditor';
|
|
141
141
|
export type { ScannerOverlayLabels, ScannerOverlayProps, ScannerOverlayState } from './ScannerOverlay';
|
|
142
142
|
export { ScannerOverlay } from './ScannerOverlay';
|
|
143
|
+
export type { ScreenProps } from './Screen';
|
|
144
|
+
export { Screen } from './Screen';
|
|
143
145
|
export type { SearchBarProps, SearchBarSize, SearchBarVariant, SearchScope, SearchSuggestion, UseRecentSearchesOptions, UseRecentSearchesResult } from './SearchBar';
|
|
144
146
|
export { SearchBar, useRecentSearches } from './SearchBar';
|
|
145
147
|
export type { SectionHeaderProps, SectionHeaderVariant } from './SectionHeader';
|
|
@@ -151,7 +153,7 @@ export { Select } from './Select';
|
|
|
151
153
|
export type { SignatureMode, SignaturePadLabels, SignaturePadProps, SignaturePadRef, SignaturePoint, SignatureStroke } from './SignaturePad';
|
|
152
154
|
export { SignaturePad } from './SignaturePad';
|
|
153
155
|
export type { SkeletonCircleProps, SkeletonClockProviderProps, SkeletonClockValue, SkeletonColors, SkeletonContentProps, SkeletonListProps, SkeletonProps, SkeletonProviderDefaults, SkeletonProviderProps, SkeletonRadius, SkeletonShape, SkeletonSkipProps, SkeletonSpeed, SkeletonStaticOf, SkeletonTextProps, SkeletonVariant, SkeletonWidth } from './Skeleton';
|
|
154
|
-
export { Skeleton, SkeletonCircle, SkeletonClockProvider, SkeletonContent, SkeletonList, SkeletonProvider, SkeletonSkip, SkeletonText,
|
|
156
|
+
export { Skeleton, SkeletonCircle, SkeletonClockProvider, SkeletonContent, SkeletonList, SkeletonProvider, SkeletonSkip, SkeletonText, useSkeletonClock, useSkeletonDefaults } from './Skeleton';
|
|
155
157
|
export type { SliderProps, SliderSize, SliderTone, SliderVariant } from './Slider';
|
|
156
158
|
export { Slider } from './Slider';
|
|
157
159
|
export type { SliderFieldProps } from './SliderField';
|
|
@@ -3,7 +3,11 @@ export { useControllableState } from './useControllableState';
|
|
|
3
3
|
export { useDebounce } from './useDebounce';
|
|
4
4
|
export type { DragToDismissController, SheetNativeGesture, SheetPanGesture, UseDragToDismissOptions, UseDragToDismissResult } from './useDragToDismiss';
|
|
5
5
|
export { createDragToDismissController, DRAG_DISMISS_DISTANCE, DRAG_DISMISS_VELOCITY, useDragToDismiss } from './useDragToDismiss';
|
|
6
|
+
export type { FieldChain, FieldChainProps } from './useFieldChain';
|
|
7
|
+
export { useFieldChain } from './useFieldChain';
|
|
6
8
|
export { FLICK_TOLERANCE, useFlickGuard } from './useFlickGuard';
|
|
9
|
+
export type { MotionDurationKey, PresenceMotion } from './usePresenceMotion';
|
|
10
|
+
export { PRESENCE_REDUCE_MOTION, usePresenceMotion } from './usePresenceMotion';
|
|
7
11
|
export type { PressAnimationPreset, UsePressAnimationOptions, UsePressAnimationResult } from './usePressAnimation';
|
|
8
12
|
export { PRESS_ANIMATION_PRESETS, usePressAnimation } from './usePressAnimation';
|
|
9
13
|
export { useReducedMotion } from './useReducedMotion';
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
* top the same finger pulls the sheet down.
|
|
17
17
|
*
|
|
18
18
|
* Release past the distance or velocity threshold slides the sheet the rest
|
|
19
|
-
* of the way and calls `onDismiss`; a short drag springs back.
|
|
19
|
+
* of the way and calls `onDismiss`; a short drag springs back. Under Reduce
|
|
20
|
+
* Motion the close fades `opacity` out instead of sliding. The sheet's
|
|
20
21
|
* translation is a plain Animated.Value on the native driver, so the finger
|
|
21
22
|
* tracking stays off the JS thread once the value is set.
|
|
22
23
|
*
|
|
@@ -26,6 +27,7 @@
|
|
|
26
27
|
import { Animated } from 'react-native';
|
|
27
28
|
import { Gesture } from 'react-native-gesture-handler';
|
|
28
29
|
import type { Theme } from '../theme/types';
|
|
30
|
+
import { type PresenceMotion } from './usePresenceMotion';
|
|
29
31
|
/** The gesture types as the installed gesture-handler builds them; typed off the value so a second copy of the package cannot split them. */
|
|
30
32
|
export type SheetPanGesture = ReturnType<typeof Gesture.Pan>;
|
|
31
33
|
export type SheetNativeGesture = ReturnType<typeof Gesture.Native>;
|
|
@@ -49,6 +51,8 @@ export interface UseDragToDismissResult {
|
|
|
49
51
|
handleGesture: SheetPanGesture;
|
|
50
52
|
/** Wrap the sheet container in a `GestureDetector` with this. */
|
|
51
53
|
sheetGesture: SheetPanGesture;
|
|
54
|
+
/** 1 normally; fades to 0 on a Reduce Motion close. Multiply it into the dragged surface's opacity. */
|
|
55
|
+
opacity: Animated.Value;
|
|
52
56
|
}
|
|
53
57
|
/** The drag's state machine, free of gesture-handler so it can be unit-tested. */
|
|
54
58
|
export interface DragToDismissController {
|
|
@@ -59,6 +63,10 @@ export interface DragToDismissController {
|
|
|
59
63
|
/** Something else took the gesture: spring back. */
|
|
60
64
|
cancel: () => void;
|
|
61
65
|
}
|
|
62
|
-
export
|
|
66
|
+
export interface DragToDismissControllerOptions extends Pick<UseDragToDismissOptions, 'drag' | 'travel' | 'onDismiss'> {
|
|
67
|
+
/** Faded to 0 by the close under Reduce Motion, in place of the slide. */
|
|
68
|
+
opacity?: Animated.Value;
|
|
69
|
+
}
|
|
70
|
+
export declare const createDragToDismissController: ({ drag, travel, onDismiss, opacity }: DragToDismissControllerOptions, motion: Theme["motion"], presence?: PresenceMotion) => DragToDismissController;
|
|
63
71
|
export declare const useDragToDismiss: (options: UseDragToDismissOptions) => UseDragToDismissResult;
|
|
64
72
|
//# sourceMappingURL=useDragToDismiss.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { TextInputProps } from 'react-native';
|
|
2
|
+
export type FieldChainProps = Pick<TextInputProps, 'returnKeyType' | 'submitBehavior' | 'onSubmitEditing'>;
|
|
3
|
+
export interface FieldChain {
|
|
4
|
+
/** Spread on every field but the last: Next moves focus on. */
|
|
5
|
+
next: FieldChainProps;
|
|
6
|
+
/** Spread on the last field: Done runs onDone. */
|
|
7
|
+
last: FieldChainProps;
|
|
8
|
+
}
|
|
9
|
+
export declare const useFieldChain: (onDone?: () => void) => FieldChain;
|
|
10
|
+
//# sourceMappingURL=useFieldChain.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReduceMotion } from 'react-native-reanimated';
|
|
2
|
+
import type { MotionScale } from '../theme/types';
|
|
3
|
+
export type MotionDurationKey = keyof MotionScale['duration'];
|
|
4
|
+
/** The reduceMotion flag every Reanimated fade passes, so the fade still runs under the OS setting. */
|
|
5
|
+
export declare const PRESENCE_REDUCE_MOTION = ReduceMotion.Never;
|
|
6
|
+
export interface PresenceMotion {
|
|
7
|
+
reduced: boolean;
|
|
8
|
+
/** theme.motion.duration[key] normally, theme.motion.fadeDuration under Reduce Motion. */
|
|
9
|
+
duration: (key: MotionDurationKey) => number;
|
|
10
|
+
/** [hidden, shown] normally, [shown, shown] under Reduce Motion. */
|
|
11
|
+
range: <T extends number | string>(hidden: T, shown: T) => [T, T];
|
|
12
|
+
}
|
|
13
|
+
export declare const usePresenceMotion: () => PresenceMotion;
|
|
14
|
+
//# sourceMappingURL=usePresenceMotion.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Animated } from 'react-native';
|
|
2
2
|
/**
|
|
3
3
|
* Named press feedback. Every preset drives transform or opacity only, so it
|
|
4
|
-
* runs on the native driver
|
|
5
|
-
*
|
|
4
|
+
* runs on the native driver. Under Reduce Motion every preset plays as `'fade'`
|
|
5
|
+
* over the fade length, so a press never moves or springs.
|
|
6
6
|
*
|
|
7
7
|
* - `scale`: shrinks a touch on press-in, springs back on release. The default.
|
|
8
8
|
* - `bounce`: shrinks further and comes back on the bouncy spring, overshooting once.
|
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tracks the OS "Reduce Motion" accessibility setting. The library's
|
|
3
|
-
* ThemeProvider uses this to collapse `theme.motion` (durations → 0, springs →
|
|
4
|
-
* near-instant) so animations don't trigger vestibular discomfort; consumers
|
|
5
|
-
* can also read it directly to swap an animated path for a static one.
|
|
6
|
-
*/
|
|
7
1
|
export declare const useReducedMotion: () => boolean;
|
|
8
2
|
//# sourceMappingURL=useReducedMotion.d.ts.map
|
|
@@ -3,8 +3,8 @@ export type { AppIconName, AppIconProps, AppIconSize, CuratedIconName, IconName,
|
|
|
3
3
|
export { APP_ICON_SIZES, AppIcon, CURATED_ICON_NAMES, defaultIcons, ICON_NAMES, ICONSAX_SUFFIX, renderSlotIcon } from './components/AppIcon';
|
|
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, 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';
|
|
6
|
+
export type { FieldChain, FieldChainProps, MotionDurationKey, PresenceMotion, PressAnimationPreset, ScrollDirection, UseControllableStateOptions, UsePressAnimationOptions, UsePressAnimationResult, UseRefreshControlLabels, UseRefreshControlOptions, UseRefreshControlResult, UseScrollDirectionOptions, UseScrollDirectionResult, UseToggleResult } from './hooks';
|
|
7
|
+
export { FLICK_TOLERANCE, PRESENCE_REDUCE_MOTION, PRESS_ANIMATION_PRESETS, useControllableState, useDebounce, useFieldChain, useFlickGuard, usePresenceMotion, 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';
|
|
@@ -312,6 +312,8 @@ export interface MotionScale {
|
|
|
312
312
|
mass: number;
|
|
313
313
|
};
|
|
314
314
|
};
|
|
315
|
+
/** Length in ms of the opacity fade that replaces movement under Reduce Motion. Never collapsed. */
|
|
316
|
+
fadeDuration: number;
|
|
315
317
|
}
|
|
316
318
|
/**
|
|
317
319
|
* Per-component size tokens. Each component that exposes a `size` prop
|
|
@@ -1168,6 +1170,8 @@ export interface TextVariantSpec {
|
|
|
1168
1170
|
fontVariant?: TextStyle['fontVariant'];
|
|
1169
1171
|
/** `'display'` draws the variant in `typography.fontFamily.display` when the theme sets it; otherwise the weight faces. */
|
|
1170
1172
|
fontFamily?: 'display';
|
|
1173
|
+
/** Announce text in this variant as a heading (accessibilityRole header). */
|
|
1174
|
+
heading?: boolean;
|
|
1171
1175
|
}
|
|
1172
1176
|
export interface Theme {
|
|
1173
1177
|
mode: ColorMode;
|
|
@@ -10,19 +10,19 @@ export interface AnimatePresenceProps {
|
|
|
10
10
|
children?: React.ReactNode;
|
|
11
11
|
/** Enter/exit preset. Default `'fade'`. */
|
|
12
12
|
preset?: PresencePreset;
|
|
13
|
-
/** Animation duration (ms). Defaults to `theme.motion.duration.
|
|
13
|
+
/** Animation duration (ms). Defaults to `theme.motion.duration.normal`. */
|
|
14
14
|
duration?: number;
|
|
15
15
|
style?: StyleProp<ViewStyle>;
|
|
16
16
|
testID?: string;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* Animates a single child in on mount and out on unmount. Thin, theme-aware
|
|
20
|
-
* wrapper over Reanimated's `entering`/`exiting
|
|
21
|
-
* alive to play the exit, so the parent only toggles a condition.
|
|
22
|
-
* Reduce Motion setting
|
|
20
|
+
* wrapper over Reanimated's `entering`/`exiting`. Reanimated keeps the view
|
|
21
|
+
* alive to play the exit, so the parent only toggles a condition. Under the OS
|
|
22
|
+
* Reduce Motion setting every preset fades instead of moving.
|
|
23
23
|
*
|
|
24
24
|
* For animating items inside a list, use Reanimated's `itemLayoutAnimation`
|
|
25
|
-
* on `Animated.FlatList` instead
|
|
25
|
+
* on `Animated.FlatList` instead; this wrapper targets single conditional nodes.
|
|
26
26
|
*/
|
|
27
27
|
declare const AnimatePresence: React.FC<AnimatePresenceProps>;
|
|
28
28
|
export { AnimatePresence };
|
|
@@ -5,12 +5,17 @@ export type AsyncBlockErrorVariant = 'default' | 'offline';
|
|
|
5
5
|
export interface AsyncBlockProps {
|
|
6
6
|
/** Show the placeholder instead of content. */
|
|
7
7
|
loading?: boolean;
|
|
8
|
-
/** An error to show in place of content. Falsy means no error. */
|
|
9
|
-
error?: string | React.ReactNode;
|
|
10
8
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* `
|
|
9
|
+
* An error to show in place of content. Falsy means no error. A string is the
|
|
10
|
+
* description. A React element or array is rendered under the state. Any other
|
|
11
|
+
* truthy value is read with `extractApiError`, and its `message` is the description.
|
|
12
|
+
*/
|
|
13
|
+
error?: unknown;
|
|
14
|
+
/**
|
|
15
|
+
* `'offline'` draws the error state as a lost connection: a cloud icon and
|
|
16
|
+
* `offlineTitle`, with a reconnect hint unless the description is text. Unset,
|
|
17
|
+
* an error whose code is `OFFLINE_CODE` picks it and every other error is
|
|
18
|
+
* `'default'`. A set value always wins.
|
|
14
19
|
*/
|
|
15
20
|
errorVariant?: AsyncBlockErrorVariant;
|
|
16
21
|
/** The fetch succeeded with nothing to show. */
|
|
@@ -23,7 +28,7 @@ export interface AsyncBlockProps {
|
|
|
23
28
|
emptyTitle?: string;
|
|
24
29
|
emptyDescription?: string;
|
|
25
30
|
emptyIcon?: React.ReactNode;
|
|
26
|
-
/** Copy for the error state.
|
|
31
|
+
/** Copy for the error state. The description is `error` when it is a string, else the extracted message. */
|
|
27
32
|
errorTitle?: string;
|
|
28
33
|
/** Title of the offline error state. */
|
|
29
34
|
offlineTitle?: string;
|