@webority-technologies/mobile 0.0.14 → 0.0.20
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 +60 -19
- package/lib/commonjs/components/AppBar/AppBar.js +29 -20
- package/lib/commonjs/components/Avatar/Avatar.js +38 -8
- package/lib/commonjs/components/Badge/Badge.js +66 -4
- package/lib/commonjs/components/Banner/Banner.js +146 -66
- package/lib/commonjs/components/BottomNavigation/BottomNavigation.js +37 -15
- package/lib/commonjs/components/BottomSheet/BottomSheet.js +85 -50
- package/lib/commonjs/components/Button/Button.js +12 -5
- package/lib/commonjs/components/Card/Card.js +106 -16
- package/lib/commonjs/components/Carousel/Carousel.js +66 -12
- package/lib/commonjs/components/Checkbox/Checkbox.js +11 -7
- package/lib/commonjs/components/Chip/Chip.js +44 -12
- package/lib/commonjs/components/DatePicker/DatePicker.js +185 -76
- package/lib/commonjs/components/DateRangePicker/DateRangePicker.js +133 -59
- package/lib/commonjs/components/Dialog/Dialog.js +16 -10
- package/lib/commonjs/components/Drawer/Drawer.js +13 -10
- package/lib/commonjs/components/FieldBase/FieldBase.js +306 -0
- package/lib/commonjs/components/FieldBase/index.js +32 -0
- package/lib/commonjs/components/FloatingActionButton/FloatingActionButton.js +69 -44
- package/lib/commonjs/components/ForceUpdateDialog/ForceUpdateDialog.js +8 -2
- package/lib/commonjs/components/FormField/FormField.js +3 -2
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +132 -44
- package/lib/commonjs/components/Input/Input.js +144 -181
- package/lib/commonjs/components/ListItem/ListItem.js +90 -11
- package/lib/commonjs/components/Modal/Modal.js +55 -27
- package/lib/commonjs/components/NumberInput/NumberInput.js +60 -106
- package/lib/commonjs/components/OTPInput/OTPInput.js +65 -58
- package/lib/commonjs/components/PickerTrigger/PickerTrigger.js +185 -0
- package/lib/commonjs/components/{AppIcon → PickerTrigger}/index.js +4 -4
- package/lib/commonjs/components/ProgressBar/ProgressBar.js +19 -11
- package/lib/commonjs/components/Radio/Radio.js +11 -6
- package/lib/commonjs/components/Rating/Rating.js +85 -19
- package/lib/commonjs/components/SearchBar/SearchBar.js +84 -107
- package/lib/commonjs/components/SegmentedControl/SegmentedControl.js +22 -11
- package/lib/commonjs/components/Select/Select.js +62 -91
- package/lib/commonjs/components/Skeleton/Skeleton.js +131 -174
- package/lib/commonjs/components/Skeleton/SkeletonClock.js +117 -0
- package/lib/commonjs/components/Skeleton/SkeletonContent.js +164 -81
- package/lib/commonjs/components/Skeleton/SkeletonProvider.js +72 -10
- package/lib/commonjs/components/Skeleton/index.js +17 -16
- package/lib/commonjs/components/Slider/Slider.js +44 -25
- package/lib/commonjs/components/Stepper/Stepper.js +199 -29
- package/lib/commonjs/components/Swipeable/Swipeable.js +36 -19
- package/lib/commonjs/components/Switch/Switch.js +9 -2
- package/lib/commonjs/components/Tabs/Tabs.js +84 -21
- package/lib/commonjs/components/TimePicker/TimePicker.js +123 -45
- package/lib/commonjs/components/Toast/Toast.js +27 -16
- package/lib/commonjs/components/Tooltip/Tooltip.js +56 -32
- package/lib/commonjs/components/index.js +37 -37
- package/lib/commonjs/theme/tokens.js +55 -7
- package/lib/module/components/Accordion/Accordion.js +61 -20
- package/lib/module/components/AppBar/AppBar.js +29 -20
- package/lib/module/components/Avatar/Avatar.js +39 -9
- package/lib/module/components/Badge/Badge.js +67 -5
- package/lib/module/components/Banner/Banner.js +147 -67
- package/lib/module/components/BottomNavigation/BottomNavigation.js +37 -15
- package/lib/module/components/BottomSheet/BottomSheet.js +87 -52
- package/lib/module/components/Button/Button.js +12 -5
- package/lib/module/components/Card/Card.js +107 -17
- package/lib/module/components/Carousel/Carousel.js +67 -13
- package/lib/module/components/Checkbox/Checkbox.js +11 -7
- package/lib/module/components/Chip/Chip.js +45 -13
- package/lib/module/components/DatePicker/DatePicker.js +185 -76
- package/lib/module/components/DateRangePicker/DateRangePicker.js +134 -60
- package/lib/module/components/Dialog/Dialog.js +16 -10
- package/lib/module/components/Drawer/Drawer.js +13 -10
- package/lib/module/components/FieldBase/FieldBase.js +297 -0
- package/lib/module/components/FieldBase/index.js +4 -0
- package/lib/module/components/FloatingActionButton/FloatingActionButton.js +69 -44
- package/lib/module/components/ForceUpdateDialog/ForceUpdateDialog.js +8 -2
- package/lib/module/components/FormField/FormField.js +3 -2
- package/lib/module/components/ImageGallery/ImageGallery.js +128 -40
- package/lib/module/components/Input/Input.js +144 -179
- package/lib/module/components/ListItem/ListItem.js +91 -12
- package/lib/module/components/Modal/Modal.js +55 -27
- package/lib/module/components/NumberInput/NumberInput.js +60 -106
- package/lib/module/components/OTPInput/OTPInput.js +65 -58
- package/lib/module/components/PickerTrigger/PickerTrigger.js +181 -0
- package/lib/module/components/PickerTrigger/index.js +4 -0
- package/lib/module/components/ProgressBar/ProgressBar.js +19 -11
- package/lib/module/components/Radio/Radio.js +11 -6
- package/lib/module/components/Rating/Rating.js +86 -20
- package/lib/module/components/SearchBar/SearchBar.js +84 -107
- package/lib/module/components/SegmentedControl/SegmentedControl.js +22 -11
- package/lib/module/components/Select/Select.js +62 -91
- package/lib/module/components/Skeleton/Skeleton.js +135 -175
- package/lib/module/components/Skeleton/SkeletonClock.js +110 -0
- package/lib/module/components/Skeleton/SkeletonContent.js +167 -84
- package/lib/module/components/Skeleton/SkeletonProvider.js +71 -10
- package/lib/module/components/Skeleton/index.js +3 -2
- package/lib/module/components/Slider/Slider.js +44 -25
- package/lib/module/components/Stepper/Stepper.js +201 -31
- package/lib/module/components/Swipeable/Swipeable.js +36 -19
- package/lib/module/components/Switch/Switch.js +9 -2
- package/lib/module/components/Tabs/Tabs.js +84 -21
- package/lib/module/components/TimePicker/TimePicker.js +123 -45
- package/lib/module/components/Toast/Toast.js +27 -16
- package/lib/module/components/Tooltip/Tooltip.js +56 -32
- package/lib/module/components/index.js +2 -2
- package/lib/module/theme/tokens.js +55 -7
- package/lib/typescript/commonjs/components/Accordion/Accordion.d.ts +10 -5
- package/lib/typescript/commonjs/components/AppBar/AppBar.d.ts +8 -0
- package/lib/typescript/commonjs/components/Avatar/Avatar.d.ts +12 -6
- package/lib/typescript/commonjs/components/Badge/Badge.d.ts +7 -6
- package/lib/typescript/commonjs/components/Banner/Banner.d.ts +17 -6
- package/lib/typescript/commonjs/components/BottomSheet/BottomSheet.d.ts +7 -0
- package/lib/typescript/commonjs/components/Card/Card.d.ts +17 -6
- package/lib/typescript/commonjs/components/Carousel/Carousel.d.ts +7 -6
- package/lib/typescript/commonjs/components/Checkbox/Checkbox.d.ts +9 -1
- package/lib/typescript/commonjs/components/Chip/Chip.d.ts +13 -6
- package/lib/typescript/commonjs/components/DatePicker/DatePicker.d.ts +38 -3
- package/lib/typescript/commonjs/components/DateRangePicker/DateRangePicker.d.ts +36 -3
- package/lib/typescript/commonjs/components/Dialog/Dialog.d.ts +13 -1
- package/lib/typescript/commonjs/components/FieldBase/FieldBase.d.ts +141 -0
- package/lib/typescript/commonjs/components/FieldBase/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/FloatingActionButton/FloatingActionButton.d.ts +8 -6
- package/lib/typescript/commonjs/components/FloatingActionButton/index.d.ts +1 -1
- package/lib/typescript/commonjs/components/ForceUpdateDialog/ForceUpdateDialog.d.ts +7 -0
- package/lib/typescript/commonjs/components/FormField/FormField.d.ts +7 -0
- package/lib/typescript/commonjs/components/ImageGallery/ImageGallery.d.ts +6 -4
- package/lib/typescript/commonjs/components/Input/Input.d.ts +6 -0
- package/lib/typescript/commonjs/components/ListItem/ListItem.d.ts +13 -6
- package/lib/typescript/commonjs/components/NumberInput/NumberInput.d.ts +3 -0
- package/lib/typescript/commonjs/components/PickerTrigger/PickerTrigger.d.ts +57 -0
- package/lib/typescript/commonjs/components/PickerTrigger/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/ProgressBar/ProgressBar.d.ts +2 -0
- package/lib/typescript/commonjs/components/Radio/Radio.d.ts +3 -0
- package/lib/typescript/commonjs/components/Rating/Rating.d.ts +9 -6
- package/lib/typescript/commonjs/components/SegmentedControl/SegmentedControl.d.ts +3 -0
- package/lib/typescript/commonjs/components/Skeleton/Skeleton.d.ts +49 -20
- package/lib/typescript/commonjs/components/Skeleton/SkeletonClock.d.ts +60 -0
- package/lib/typescript/commonjs/components/Skeleton/SkeletonContent.d.ts +80 -19
- package/lib/typescript/commonjs/components/Skeleton/SkeletonProvider.d.ts +39 -5
- package/lib/typescript/commonjs/components/Skeleton/index.d.ts +6 -4
- package/lib/typescript/commonjs/components/Slider/Slider.d.ts +12 -1
- package/lib/typescript/commonjs/components/Stepper/Stepper.d.ts +18 -6
- package/lib/typescript/commonjs/components/Swipeable/Swipeable.d.ts +2 -0
- package/lib/typescript/commonjs/components/Switch/Switch.d.ts +1 -0
- package/lib/typescript/commonjs/components/Tabs/Tabs.d.ts +26 -2
- package/lib/typescript/commonjs/components/TimePicker/TimePicker.d.ts +36 -3
- package/lib/typescript/commonjs/components/Toast/Toast.d.ts +8 -0
- package/lib/typescript/commonjs/components/Tooltip/Tooltip.d.ts +7 -1
- package/lib/typescript/commonjs/components/index.d.ts +5 -5
- package/lib/typescript/commonjs/index.d.ts +1 -1
- package/lib/typescript/commonjs/theme/index.d.ts +1 -1
- package/lib/typescript/commonjs/theme/types.d.ts +553 -11
- package/lib/typescript/module/components/Accordion/Accordion.d.ts +10 -5
- package/lib/typescript/module/components/AppBar/AppBar.d.ts +8 -0
- package/lib/typescript/module/components/Avatar/Avatar.d.ts +12 -6
- package/lib/typescript/module/components/Badge/Badge.d.ts +7 -6
- package/lib/typescript/module/components/Banner/Banner.d.ts +17 -6
- package/lib/typescript/module/components/BottomSheet/BottomSheet.d.ts +7 -0
- package/lib/typescript/module/components/Card/Card.d.ts +17 -6
- package/lib/typescript/module/components/Carousel/Carousel.d.ts +7 -6
- package/lib/typescript/module/components/Checkbox/Checkbox.d.ts +9 -1
- package/lib/typescript/module/components/Chip/Chip.d.ts +13 -6
- package/lib/typescript/module/components/DatePicker/DatePicker.d.ts +38 -3
- package/lib/typescript/module/components/DateRangePicker/DateRangePicker.d.ts +36 -3
- package/lib/typescript/module/components/Dialog/Dialog.d.ts +13 -1
- package/lib/typescript/module/components/FieldBase/FieldBase.d.ts +141 -0
- package/lib/typescript/module/components/FieldBase/index.d.ts +3 -0
- package/lib/typescript/module/components/FloatingActionButton/FloatingActionButton.d.ts +8 -6
- package/lib/typescript/module/components/FloatingActionButton/index.d.ts +1 -1
- package/lib/typescript/module/components/ForceUpdateDialog/ForceUpdateDialog.d.ts +7 -0
- package/lib/typescript/module/components/FormField/FormField.d.ts +7 -0
- package/lib/typescript/module/components/ImageGallery/ImageGallery.d.ts +6 -4
- package/lib/typescript/module/components/Input/Input.d.ts +6 -0
- package/lib/typescript/module/components/ListItem/ListItem.d.ts +13 -6
- package/lib/typescript/module/components/NumberInput/NumberInput.d.ts +3 -0
- package/lib/typescript/module/components/PickerTrigger/PickerTrigger.d.ts +57 -0
- package/lib/typescript/module/components/PickerTrigger/index.d.ts +3 -0
- package/lib/typescript/module/components/ProgressBar/ProgressBar.d.ts +2 -0
- package/lib/typescript/module/components/Radio/Radio.d.ts +3 -0
- package/lib/typescript/module/components/Rating/Rating.d.ts +9 -6
- package/lib/typescript/module/components/SegmentedControl/SegmentedControl.d.ts +3 -0
- package/lib/typescript/module/components/Skeleton/Skeleton.d.ts +49 -20
- package/lib/typescript/module/components/Skeleton/SkeletonClock.d.ts +60 -0
- package/lib/typescript/module/components/Skeleton/SkeletonContent.d.ts +80 -19
- package/lib/typescript/module/components/Skeleton/SkeletonProvider.d.ts +39 -5
- package/lib/typescript/module/components/Skeleton/index.d.ts +6 -4
- package/lib/typescript/module/components/Slider/Slider.d.ts +12 -1
- package/lib/typescript/module/components/Stepper/Stepper.d.ts +18 -6
- package/lib/typescript/module/components/Swipeable/Swipeable.d.ts +2 -0
- package/lib/typescript/module/components/Switch/Switch.d.ts +1 -0
- package/lib/typescript/module/components/Tabs/Tabs.d.ts +26 -2
- package/lib/typescript/module/components/TimePicker/TimePicker.d.ts +36 -3
- package/lib/typescript/module/components/Toast/Toast.d.ts +8 -0
- package/lib/typescript/module/components/Tooltip/Tooltip.d.ts +7 -1
- package/lib/typescript/module/components/index.d.ts +5 -5
- package/lib/typescript/module/index.d.ts +1 -1
- package/lib/typescript/module/theme/index.d.ts +1 -1
- package/lib/typescript/module/theme/types.d.ts +553 -11
- package/package.json +2 -6
- package/lib/commonjs/components/AppIcon/AppIcon.js +0 -120
- package/lib/commonjs/types/vector-icons.d.js +0 -2
- package/lib/module/components/AppIcon/AppIcon.js +0 -111
- package/lib/module/components/AppIcon/index.js +0 -4
- package/lib/module/types/vector-icons.d.js +0 -2
- package/lib/typescript/commonjs/components/AppIcon/AppIcon.d.ts +0 -20
- package/lib/typescript/commonjs/components/AppIcon/index.d.ts +0 -3
- package/lib/typescript/module/components/AppIcon/AppIcon.d.ts +0 -20
- package/lib/typescript/module/components/AppIcon/index.d.ts +0 -3
|
@@ -4,12 +4,14 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
|
|
4
4
|
import { Animated, Dimensions, Modal, Pressable, StyleSheet, Text, View } from 'react-native';
|
|
5
5
|
import { useTheme, createAnimatedValue } from "../../theme/index.js";
|
|
6
6
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
7
|
+
const DEFAULT_TOOLTIP_GAP = 8;
|
|
8
|
+
const DEFAULT_SCREEN_PADDING = 8;
|
|
9
|
+
const DEFAULT_PRESS_AUTO_HIDE_MS = 4000;
|
|
10
|
+
const DEFAULT_ARROW_HALF_WIDTH = 4; // half of 8px arrow base
|
|
11
|
+
const DEFAULT_ARROW_HEIGHT = 6;
|
|
12
|
+
const DEFAULT_ARROW_CORNER_PADDING = 12;
|
|
13
|
+
const DEFAULT_MAX_WIDTH = 240;
|
|
14
|
+
const DEFAULT_LINE_HEIGHT = 18;
|
|
13
15
|
const Tooltip = props => {
|
|
14
16
|
const {
|
|
15
17
|
content,
|
|
@@ -19,14 +21,28 @@ const Tooltip = props => {
|
|
|
19
21
|
visible: controlledVisible,
|
|
20
22
|
onVisibleChange,
|
|
21
23
|
hideOnContentPress = true,
|
|
22
|
-
maxWidth
|
|
24
|
+
maxWidth,
|
|
23
25
|
showArrow = true,
|
|
24
26
|
accessibilityLabel,
|
|
25
27
|
style,
|
|
28
|
+
containerStyle,
|
|
29
|
+
arrowStyle: arrowStyleOverride,
|
|
30
|
+
messageStyle,
|
|
26
31
|
testID
|
|
27
32
|
} = props;
|
|
28
33
|
const theme = useTheme();
|
|
29
34
|
const styles = useMemo(() => buildStyles(theme), [theme]);
|
|
35
|
+
const tooltipTokens = theme.components.tooltip;
|
|
36
|
+
const TOOLTIP_GAP = tooltipTokens?.gap ?? DEFAULT_TOOLTIP_GAP;
|
|
37
|
+
const SCREEN_PADDING = tooltipTokens?.screenPadding ?? DEFAULT_SCREEN_PADDING;
|
|
38
|
+
const PRESS_AUTO_HIDE_MS = tooltipTokens?.pressAutoHideMs ?? DEFAULT_PRESS_AUTO_HIDE_MS;
|
|
39
|
+
const ARROW_HALF_WIDTH = tooltipTokens?.arrowHalfWidth ?? DEFAULT_ARROW_HALF_WIDTH;
|
|
40
|
+
const ARROW_HEIGHT = tooltipTokens?.arrowHeight ?? DEFAULT_ARROW_HEIGHT;
|
|
41
|
+
const ARROW_CORNER_PADDING = tooltipTokens?.arrowCornerPadding ?? DEFAULT_ARROW_CORNER_PADDING;
|
|
42
|
+
const MESSAGE_LINE_HEIGHT = tooltipTokens?.lineHeight ?? DEFAULT_LINE_HEIGHT;
|
|
43
|
+
const resolvedMaxWidth = maxWidth ?? tooltipTokens?.maxWidth ?? DEFAULT_MAX_WIDTH;
|
|
44
|
+
const enableScaleAnimation = tooltipTokens?.enableScaleAnimation ?? false;
|
|
45
|
+
const exitDurationMs = tooltipTokens?.exitDurationMs ?? 150;
|
|
30
46
|
const isControlled = trigger === 'manual' || typeof controlledVisible === 'boolean';
|
|
31
47
|
const [internalVisible, setInternalVisible] = useState(false);
|
|
32
48
|
const visible = isControlled ? Boolean(controlledVisible) : internalVisible;
|
|
@@ -36,7 +52,7 @@ const Tooltip = props => {
|
|
|
36
52
|
height: 0
|
|
37
53
|
});
|
|
38
54
|
const wrapperRef = useRef(null);
|
|
39
|
-
const scale = useRef(createAnimatedValue(visible ? 1 : 0.85)).current;
|
|
55
|
+
const scale = useRef(createAnimatedValue(visible ? 1 : enableScaleAnimation ? 0.85 : 1)).current;
|
|
40
56
|
const opacity = useRef(createAnimatedValue(visible ? 1 : 0)).current;
|
|
41
57
|
const autoHideTimer = useRef(null);
|
|
42
58
|
const didMount = useRef(false);
|
|
@@ -88,17 +104,21 @@ const Tooltip = props => {
|
|
|
88
104
|
}
|
|
89
105
|
if (visible) {
|
|
90
106
|
measureAnchor();
|
|
91
|
-
|
|
92
|
-
toValue: 1,
|
|
93
|
-
damping: theme.motion.spring.snappy.damping,
|
|
94
|
-
stiffness: theme.motion.spring.snappy.stiffness,
|
|
95
|
-
mass: theme.motion.spring.snappy.mass,
|
|
96
|
-
useNativeDriver: true
|
|
97
|
-
}), Animated.timing(opacity, {
|
|
107
|
+
const enterAnims = [Animated.timing(opacity, {
|
|
98
108
|
toValue: 1,
|
|
99
109
|
duration: theme.motion.duration.fast,
|
|
100
110
|
useNativeDriver: true
|
|
101
|
-
})]
|
|
111
|
+
})];
|
|
112
|
+
if (enableScaleAnimation) {
|
|
113
|
+
enterAnims.push(Animated.spring(scale, {
|
|
114
|
+
toValue: 1,
|
|
115
|
+
damping: theme.motion.spring.snappy.damping,
|
|
116
|
+
stiffness: theme.motion.spring.snappy.stiffness,
|
|
117
|
+
mass: theme.motion.spring.snappy.mass,
|
|
118
|
+
useNativeDriver: true
|
|
119
|
+
}));
|
|
120
|
+
}
|
|
121
|
+
Animated.parallel(enterAnims).start();
|
|
102
122
|
if (trigger === 'press') {
|
|
103
123
|
if (autoHideTimer.current) clearTimeout(autoHideTimer.current);
|
|
104
124
|
autoHideTimer.current = setTimeout(() => {
|
|
@@ -106,15 +126,19 @@ const Tooltip = props => {
|
|
|
106
126
|
}, PRESS_AUTO_HIDE_MS);
|
|
107
127
|
}
|
|
108
128
|
} else {
|
|
109
|
-
|
|
110
|
-
toValue: 0.85,
|
|
111
|
-
duration: 150,
|
|
112
|
-
useNativeDriver: true
|
|
113
|
-
}), Animated.timing(opacity, {
|
|
129
|
+
const exitAnims = [Animated.timing(opacity, {
|
|
114
130
|
toValue: 0,
|
|
115
|
-
duration:
|
|
131
|
+
duration: exitDurationMs,
|
|
116
132
|
useNativeDriver: true
|
|
117
|
-
})]
|
|
133
|
+
})];
|
|
134
|
+
if (enableScaleAnimation) {
|
|
135
|
+
exitAnims.push(Animated.timing(scale, {
|
|
136
|
+
toValue: 0.85,
|
|
137
|
+
duration: exitDurationMs,
|
|
138
|
+
useNativeDriver: true
|
|
139
|
+
}));
|
|
140
|
+
}
|
|
141
|
+
Animated.parallel(exitAnims).start();
|
|
118
142
|
if (autoHideTimer.current) {
|
|
119
143
|
clearTimeout(autoHideTimer.current);
|
|
120
144
|
autoHideTimer.current = null;
|
|
@@ -151,7 +175,7 @@ const Tooltip = props => {
|
|
|
151
175
|
arrowOffset: 0
|
|
152
176
|
};
|
|
153
177
|
}
|
|
154
|
-
const tooltipWidth = size.width || Math.min(
|
|
178
|
+
const tooltipWidth = size.width || Math.min(resolvedMaxWidth, screen.width - SCREEN_PADDING * 2);
|
|
155
179
|
const tooltipHeight = size.height || 0;
|
|
156
180
|
|
|
157
181
|
// Choose placement.
|
|
@@ -210,7 +234,7 @@ const Tooltip = props => {
|
|
|
210
234
|
placement: resolved,
|
|
211
235
|
arrowOffset
|
|
212
236
|
};
|
|
213
|
-
}, [anchor, size, placement,
|
|
237
|
+
}, [anchor, size, placement, resolvedMaxWidth, SCREEN_PADDING, TOOLTIP_GAP, ARROW_CORNER_PADDING]);
|
|
214
238
|
|
|
215
239
|
// Build the cloned trigger.
|
|
216
240
|
const triggerProps = {};
|
|
@@ -287,7 +311,7 @@ const Tooltip = props => {
|
|
|
287
311
|
rotate: '-90deg'
|
|
288
312
|
}]
|
|
289
313
|
};
|
|
290
|
-
}, [showArrow, position, theme]);
|
|
314
|
+
}, [showArrow, position, theme, ARROW_HALF_WIDTH, ARROW_HEIGHT]);
|
|
291
315
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
292
316
|
children: [/*#__PURE__*/_jsx(View, {
|
|
293
317
|
ref: wrapperRef,
|
|
@@ -316,12 +340,12 @@ const Tooltip = props => {
|
|
|
316
340
|
position: 'absolute',
|
|
317
341
|
top: position.top,
|
|
318
342
|
left: position.left,
|
|
319
|
-
maxWidth,
|
|
343
|
+
maxWidth: resolvedMaxWidth,
|
|
320
344
|
opacity,
|
|
321
345
|
transform: [{
|
|
322
346
|
scale
|
|
323
347
|
}]
|
|
324
|
-
}, style],
|
|
348
|
+
}, style, containerStyle],
|
|
325
349
|
children: [/*#__PURE__*/_jsx(View, {
|
|
326
350
|
style: [styles.tooltip, {
|
|
327
351
|
backgroundColor: theme.colors.background.inverse,
|
|
@@ -332,15 +356,15 @@ const Tooltip = props => {
|
|
|
332
356
|
shadowColor: theme.shadows.lg.shadowColor
|
|
333
357
|
}],
|
|
334
358
|
children: typeof content === 'string' ? /*#__PURE__*/_jsx(Text, {
|
|
335
|
-
style: {
|
|
359
|
+
style: [{
|
|
336
360
|
color: theme.colors.text.inverse,
|
|
337
361
|
fontSize: theme.typography.fontSize.sm,
|
|
338
|
-
lineHeight:
|
|
339
|
-
},
|
|
362
|
+
lineHeight: MESSAGE_LINE_HEIGHT
|
|
363
|
+
}, messageStyle],
|
|
340
364
|
children: content
|
|
341
365
|
}) : content
|
|
342
366
|
}), arrowStyle ? /*#__PURE__*/_jsx(View, {
|
|
343
|
-
style: arrowStyle,
|
|
367
|
+
style: [arrowStyle, arrowStyleOverride],
|
|
344
368
|
pointerEvents: "none"
|
|
345
369
|
}) : null]
|
|
346
370
|
}) : null
|
|
@@ -21,7 +21,6 @@ export { FormField } from "./FormField/index.js";
|
|
|
21
21
|
export { FloatingActionButton, FloatingActionButtonGroup } from "./FloatingActionButton/index.js";
|
|
22
22
|
export { ForceUpdateDialog } from "./ForceUpdateDialog/index.js";
|
|
23
23
|
export { AppBar } from "./AppBar/index.js";
|
|
24
|
-
export { AppIcon } from "./AppIcon/index.js";
|
|
25
24
|
export { ImageGallery } from "./ImageGallery/index.js";
|
|
26
25
|
export { Input } from "./Input/index.js";
|
|
27
26
|
export { ListItem } from "./ListItem/index.js";
|
|
@@ -29,6 +28,7 @@ export { Spinner } from "./Spinner/index.js";
|
|
|
29
28
|
export { Modal } from "./Modal/index.js";
|
|
30
29
|
export { NumberInput } from "./NumberInput/index.js";
|
|
31
30
|
export { OTPInput } from "./OTPInput/index.js";
|
|
31
|
+
export { PickerTrigger } from "./PickerTrigger/index.js";
|
|
32
32
|
export { ProgressBar } from "./ProgressBar/index.js";
|
|
33
33
|
export { Radio, RadioGroup } from "./Radio/index.js";
|
|
34
34
|
export { Rating } from "./Rating/index.js";
|
|
@@ -36,7 +36,7 @@ export { SearchBar } from "./SearchBar/index.js";
|
|
|
36
36
|
export { SegmentedControl } from "./SegmentedControl/index.js";
|
|
37
37
|
export { Select } from "./Select/index.js";
|
|
38
38
|
export { Stepper } from "./Stepper/index.js";
|
|
39
|
-
export { Skeleton,
|
|
39
|
+
export { Skeleton, SkeletonCircle, SkeletonClockProvider, SkeletonContent, SkeletonList, SkeletonProvider, SkeletonSkip, SkeletonText, useReduceMotion, useSkeletonClock, useSkeletonDefaults } from "./Skeleton/index.js";
|
|
40
40
|
export { Slider } from "./Slider/index.js";
|
|
41
41
|
export { Swipeable } from "./Swipeable/index.js";
|
|
42
42
|
export { Switch } from "./Switch/index.js";
|
|
@@ -50,6 +50,39 @@ const radius = {
|
|
|
50
50
|
'2xl': 28,
|
|
51
51
|
full: 9999
|
|
52
52
|
};
|
|
53
|
+
|
|
54
|
+
// `field` tokens hold the canonical dimensions every input-like control
|
|
55
|
+
// inherits via FieldBase. Heights, radii and padding ladders here are the
|
|
56
|
+
// single source of truth — Input, Select, SearchBar, NumberInput, OTPInput
|
|
57
|
+
// cell and PickerTrigger fall through to these unless their own component
|
|
58
|
+
// tokens override. Fill / border colours resolve at theme-build time inside
|
|
59
|
+
// the providers (which know `colors.*`) — these defaults are dimension-only.
|
|
60
|
+
const fieldSizes = {
|
|
61
|
+
sm: {
|
|
62
|
+
paddingHorizontal: 12,
|
|
63
|
+
paddingVertical: 8,
|
|
64
|
+
minHeight: 38,
|
|
65
|
+
fontSize: 13,
|
|
66
|
+
borderRadius: 10,
|
|
67
|
+
iconSize: 16
|
|
68
|
+
},
|
|
69
|
+
md: {
|
|
70
|
+
paddingHorizontal: 14,
|
|
71
|
+
paddingVertical: 11,
|
|
72
|
+
minHeight: 46,
|
|
73
|
+
fontSize: 15,
|
|
74
|
+
borderRadius: 12,
|
|
75
|
+
iconSize: 18
|
|
76
|
+
},
|
|
77
|
+
lg: {
|
|
78
|
+
paddingHorizontal: 16,
|
|
79
|
+
paddingVertical: 14,
|
|
80
|
+
minHeight: 54,
|
|
81
|
+
fontSize: 16,
|
|
82
|
+
borderRadius: 14,
|
|
83
|
+
iconSize: 20
|
|
84
|
+
}
|
|
85
|
+
};
|
|
53
86
|
const components = {
|
|
54
87
|
button: {
|
|
55
88
|
xs: {
|
|
@@ -118,26 +151,33 @@ const components = {
|
|
|
118
151
|
}
|
|
119
152
|
},
|
|
120
153
|
searchBar: {
|
|
154
|
+
// `borderRadius: radius.full` keeps the historical pill shape as the
|
|
155
|
+
// library default. Brands wanting SearchBar to share Input / Select's
|
|
156
|
+
// rounded-rect shape override per size to match `field.<size>.borderRadius`
|
|
157
|
+
// (10 / 12 / 14), or drop a single value in via theme merge.
|
|
121
158
|
sm: {
|
|
122
159
|
height: 36,
|
|
123
160
|
paddingHorizontal: 10,
|
|
124
161
|
fontSize: 13,
|
|
125
162
|
iconSize: 16,
|
|
126
|
-
gap: 6
|
|
163
|
+
gap: 6,
|
|
164
|
+
borderRadius: radius.full
|
|
127
165
|
},
|
|
128
166
|
md: {
|
|
129
167
|
height: 44,
|
|
130
168
|
paddingHorizontal: 12,
|
|
131
169
|
fontSize: 15,
|
|
132
170
|
iconSize: 18,
|
|
133
|
-
gap: 8
|
|
171
|
+
gap: 8,
|
|
172
|
+
borderRadius: radius.full
|
|
134
173
|
},
|
|
135
174
|
lg: {
|
|
136
175
|
height: 52,
|
|
137
176
|
paddingHorizontal: 14,
|
|
138
177
|
fontSize: 16,
|
|
139
178
|
iconSize: 20,
|
|
140
|
-
gap: 10
|
|
179
|
+
gap: 10,
|
|
180
|
+
borderRadius: radius.full
|
|
141
181
|
},
|
|
142
182
|
cancelButtonWidth: 72
|
|
143
183
|
},
|
|
@@ -161,6 +201,14 @@ const components = {
|
|
|
161
201
|
paddingVertical: '2xl'
|
|
162
202
|
}
|
|
163
203
|
},
|
|
204
|
+
field: {
|
|
205
|
+
defaultVariant: 'outlined',
|
|
206
|
+
sm: fieldSizes.sm,
|
|
207
|
+
md: fieldSizes.md,
|
|
208
|
+
lg: fieldSizes.lg
|
|
209
|
+
// Variant fill / border colours are filled in at theme-build time by the
|
|
210
|
+
// light/dark Theme objects below — they need access to `colors.*`.
|
|
211
|
+
},
|
|
164
212
|
listItem: {
|
|
165
213
|
sm: {
|
|
166
214
|
paddingVertical: 'sm',
|
|
@@ -229,7 +277,6 @@ const components = {
|
|
|
229
277
|
lg: {
|
|
230
278
|
boxSize: 24
|
|
231
279
|
},
|
|
232
|
-
borderWidth: 1.5,
|
|
233
280
|
labelGap: 10
|
|
234
281
|
},
|
|
235
282
|
radio: {
|
|
@@ -245,7 +292,6 @@ const components = {
|
|
|
245
292
|
outer: 24,
|
|
246
293
|
inner: 12
|
|
247
294
|
},
|
|
248
|
-
borderWidth: 1.5,
|
|
249
295
|
labelGap: 10
|
|
250
296
|
},
|
|
251
297
|
switch: {
|
|
@@ -495,7 +541,8 @@ export const lightTheme = {
|
|
|
495
541
|
primary: '#E5E5EC',
|
|
496
542
|
secondary: '#EFEFF3',
|
|
497
543
|
focus: '#5B5BD6',
|
|
498
|
-
error: '#E5484D'
|
|
544
|
+
error: '#E5484D',
|
|
545
|
+
width: 1.5
|
|
499
546
|
},
|
|
500
547
|
surface: {
|
|
501
548
|
pressed: 'rgba(15, 15, 26, 0.06)',
|
|
@@ -549,7 +596,8 @@ export const darkTheme = {
|
|
|
549
596
|
primary: '#27272F',
|
|
550
597
|
secondary: '#1C1C26',
|
|
551
598
|
focus: '#7C7CE8',
|
|
552
|
-
error: '#F87171'
|
|
599
|
+
error: '#F87171',
|
|
600
|
+
width: 1.5
|
|
553
601
|
},
|
|
554
602
|
surface: {
|
|
555
603
|
pressed: 'rgba(255, 255, 255, 0.08)',
|
|
@@ -15,12 +15,15 @@ export interface AccordionProps {
|
|
|
15
15
|
style?: StyleProp<ViewStyle>;
|
|
16
16
|
headerStyle?: StyleProp<ViewStyle>;
|
|
17
17
|
contentStyle?: StyleProp<ViewStyle>;
|
|
18
|
+
/** Style applied to the animated wrapper around the expandable content. */
|
|
19
|
+
contentWrapperStyle?: StyleProp<ViewStyle>;
|
|
20
|
+
/** Style applied to the outermost container View. */
|
|
21
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
18
22
|
testID?: string;
|
|
19
23
|
/**
|
|
20
|
-
* When true, renders the accordion as
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* the accordion is still being fetched.
|
|
24
|
+
* When true, renders the accordion as its authored skeleton placeholder
|
|
25
|
+
* shape (header row, collapsed body). Footprint matches the closed live
|
|
26
|
+
* accordion so the layout doesn't shift when data arrives.
|
|
24
27
|
*/
|
|
25
28
|
loading?: boolean;
|
|
26
29
|
}
|
|
@@ -34,7 +37,9 @@ export interface AccordionGroupProps {
|
|
|
34
37
|
testID?: string;
|
|
35
38
|
}
|
|
36
39
|
declare const AccordionGroup: React.FC<AccordionGroupProps>;
|
|
37
|
-
declare const Accordion: React.FC<AccordionProps
|
|
40
|
+
declare const Accordion: React.FC<AccordionProps> & {
|
|
41
|
+
Skeleton: React.FC<AccordionProps>;
|
|
42
|
+
};
|
|
38
43
|
export { Accordion, AccordionGroup };
|
|
39
44
|
export default Accordion;
|
|
40
45
|
//# sourceMappingURL=Accordion.d.ts.map
|
|
@@ -28,6 +28,14 @@ export interface AppBarProps {
|
|
|
28
28
|
*/
|
|
29
29
|
scrollY?: Animated.Value | Animated.AnimatedInterpolation<number>;
|
|
30
30
|
style?: StyleProp<ViewStyle>;
|
|
31
|
+
/** Alias for `style` applied to the outer container (animated when collapsing). */
|
|
32
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
33
|
+
/** Style applied to the title Animated.Text. */
|
|
34
|
+
titleStyle?: StyleProp<ViewStyle>;
|
|
35
|
+
/** Style applied to the subtitle Animated.Text. */
|
|
36
|
+
subtitleStyle?: StyleProp<ViewStyle>;
|
|
37
|
+
/** Style applied to the right-action badge bubble. */
|
|
38
|
+
badgeStyle?: StyleProp<ViewStyle>;
|
|
31
39
|
testID?: string;
|
|
32
40
|
}
|
|
33
41
|
declare const AppBar: React.ForwardRefExoticComponent<AppBarProps & React.RefAttributes<View>>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
import type { ImageSourcePropType, StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
2
|
+
import type { ImageSourcePropType, StyleProp, TextStyle, View as RNView, ViewStyle } from 'react-native';
|
|
4
3
|
export type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | number;
|
|
5
4
|
export type AvatarShape = 'circle' | 'square' | 'rounded';
|
|
6
5
|
export type AvatarStatus = 'online' | 'offline' | 'busy' | 'away' | null;
|
|
@@ -15,9 +14,14 @@ export interface AvatarProps {
|
|
|
15
14
|
backgroundColor?: string;
|
|
16
15
|
color?: string;
|
|
17
16
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
|
|
17
|
+
* Per-instance initials font size in pixels. Wins over theme tokens
|
|
18
|
+
* (`avatar.fontSize` and `avatar.fontSizeRatio`) and the size-derived default.
|
|
19
|
+
*/
|
|
20
|
+
fontSize?: number;
|
|
21
|
+
/**
|
|
22
|
+
* When true, renders the component as its authored skeleton placeholder shape.
|
|
23
|
+
* The placeholder mirrors the real layout's footprint so the UI doesn't reflow
|
|
24
|
+
* when data arrives. Use this while the data driving the component is being fetched.
|
|
21
25
|
*/
|
|
22
26
|
loading?: boolean;
|
|
23
27
|
accessibilityLabel?: string;
|
|
@@ -25,7 +29,9 @@ export interface AvatarProps {
|
|
|
25
29
|
textStyle?: StyleProp<TextStyle>;
|
|
26
30
|
testID?: string;
|
|
27
31
|
}
|
|
28
|
-
declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<
|
|
32
|
+
declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<RNView>> & {
|
|
33
|
+
Skeleton: React.FC<AvatarProps>;
|
|
34
|
+
};
|
|
29
35
|
export type AvatarGroupSpacing = 'tight' | 'normal' | 'loose';
|
|
30
36
|
export type AvatarGroupOverflowVariant = 'count' | 'plus';
|
|
31
37
|
export interface AvatarGroupProps {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
import type { StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
2
|
+
import type { StyleProp, TextStyle, View as RNView, ViewStyle } from 'react-native';
|
|
4
3
|
export type BadgeVariant = 'standard' | 'dot';
|
|
5
4
|
export type BadgeTone = 'primary' | 'success' | 'warning' | 'error' | 'neutral' | 'info';
|
|
6
5
|
export type BadgeSize = 'sm' | 'md';
|
|
@@ -13,9 +12,9 @@ export interface BadgeProps {
|
|
|
13
12
|
size?: BadgeSize;
|
|
14
13
|
invisible?: boolean;
|
|
15
14
|
/**
|
|
16
|
-
* When true, renders the component as
|
|
17
|
-
*
|
|
18
|
-
*
|
|
15
|
+
* When true, renders the component as its authored skeleton placeholder shape.
|
|
16
|
+
* The placeholder mirrors the real layout's footprint so the UI doesn't reflow
|
|
17
|
+
* when data arrives. Use this while the data driving the component is being fetched.
|
|
19
18
|
*/
|
|
20
19
|
loading?: boolean;
|
|
21
20
|
children?: React.ReactNode;
|
|
@@ -27,7 +26,9 @@ export interface BadgeProps {
|
|
|
27
26
|
textStyle?: StyleProp<TextStyle>;
|
|
28
27
|
testID?: string;
|
|
29
28
|
}
|
|
30
|
-
declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<
|
|
29
|
+
declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<RNView>> & {
|
|
30
|
+
Skeleton: React.FC<BadgeProps>;
|
|
31
|
+
};
|
|
31
32
|
export { Badge };
|
|
32
33
|
export default Badge;
|
|
33
34
|
//# sourceMappingURL=Badge.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
import type { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
import type { StyleProp, View as RNView, ViewStyle } from 'react-native';
|
|
4
3
|
export type BannerVariant = 'info' | 'success' | 'warning' | 'error' | 'neutral';
|
|
5
4
|
export interface BannerAction {
|
|
6
5
|
label: string;
|
|
@@ -18,16 +17,28 @@ export interface BannerProps {
|
|
|
18
17
|
visible?: boolean;
|
|
19
18
|
animateMount?: boolean;
|
|
20
19
|
/**
|
|
21
|
-
* When true, renders the component as
|
|
22
|
-
*
|
|
23
|
-
*
|
|
20
|
+
* When true, renders the component as its authored skeleton placeholder shape.
|
|
21
|
+
* The placeholder mirrors the real layout's footprint so the UI doesn't reflow
|
|
22
|
+
* when data arrives. Use this while the data driving the component is being fetched.
|
|
24
23
|
*/
|
|
25
24
|
loading?: boolean;
|
|
26
25
|
accessibilityLabel?: string;
|
|
27
26
|
style?: StyleProp<ViewStyle>;
|
|
27
|
+
/** Alias for `style` — applied to the outer animated container. */
|
|
28
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
29
|
+
/** Style applied to the auto-rendered icon circle (when no custom `icon` is provided). */
|
|
30
|
+
iconCircleStyle?: StyleProp<ViewStyle>;
|
|
31
|
+
/** Style applied to the leading tint bar. */
|
|
32
|
+
tintBarStyle?: StyleProp<ViewStyle>;
|
|
33
|
+
/** Style applied to the dismiss/close button. */
|
|
34
|
+
closeButtonStyle?: StyleProp<ViewStyle>;
|
|
35
|
+
/** Style applied to each action button (Pressable). */
|
|
36
|
+
actionButtonStyle?: StyleProp<ViewStyle>;
|
|
28
37
|
testID?: string;
|
|
29
38
|
}
|
|
30
|
-
declare const Banner: React.ForwardRefExoticComponent<BannerProps & React.RefAttributes<
|
|
39
|
+
declare const Banner: React.ForwardRefExoticComponent<BannerProps & React.RefAttributes<RNView>> & {
|
|
40
|
+
Skeleton: React.FC<BannerProps>;
|
|
41
|
+
};
|
|
31
42
|
export { Banner };
|
|
32
43
|
export default Banner;
|
|
33
44
|
//# sourceMappingURL=Banner.d.ts.map
|
|
@@ -28,6 +28,13 @@ export interface BottomSheetProps {
|
|
|
28
28
|
onAnimate?: (from: number, to: number) => void;
|
|
29
29
|
enablePanDownToClose?: boolean;
|
|
30
30
|
enableBackdropPress?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated Backdrop opacity is now controlled by the theme token
|
|
33
|
+
* `colors.background.overlay` (alpha baked into the rgba value). Animated
|
|
34
|
+
* opacity on the backdrop was unreliable under Fabric view-flattening, so
|
|
35
|
+
* the scrim is now a static plain View. To tune dim level, override
|
|
36
|
+
* `theme.colors.background.overlay` in your theme bridge.
|
|
37
|
+
*/
|
|
31
38
|
backdropOpacity?: number;
|
|
32
39
|
/**
|
|
33
40
|
* How the sheet reacts to the soft keyboard.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
import type { GestureResponderEvent, ImageSourcePropType, PressableProps, StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
import type { GestureResponderEvent, ImageSourcePropType, PressableProps, StyleProp, View as RNView, ViewStyle } from 'react-native';
|
|
4
3
|
import type { GradientDefinition } from '../../theme/types';
|
|
5
4
|
export type CardVariant = 'elevated' | 'outlined' | 'filled';
|
|
6
5
|
export type CardElevation = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
@@ -20,9 +19,9 @@ export interface CardProps extends Omit<PressableProps, 'style' | 'children'> {
|
|
|
20
19
|
imageAspectRatio?: number;
|
|
21
20
|
imageOverlay?: React.ReactNode;
|
|
22
21
|
/**
|
|
23
|
-
* When true, renders the component as
|
|
24
|
-
*
|
|
25
|
-
*
|
|
22
|
+
* When true, renders the component as its authored skeleton placeholder shape.
|
|
23
|
+
* The placeholder mirrors the real layout's footprint so the UI doesn't reflow
|
|
24
|
+
* when data arrives. Use this while the data driving the component is being fetched.
|
|
26
25
|
*/
|
|
27
26
|
loading?: boolean;
|
|
28
27
|
/**
|
|
@@ -35,9 +34,21 @@ export interface CardProps extends Omit<PressableProps, 'style' | 'children'> {
|
|
|
35
34
|
onPress?: (event: GestureResponderEvent) => void;
|
|
36
35
|
accessibilityLabel?: string;
|
|
37
36
|
style?: StyleProp<ViewStyle>;
|
|
37
|
+
/** Alias for `style` — applied to the outer card element. */
|
|
38
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
39
|
+
/** Style applied to the header wrapper View. */
|
|
40
|
+
headerStyle?: StyleProp<ViewStyle>;
|
|
41
|
+
/** Style applied to the body wrapper View (only present when header or footer is provided). */
|
|
42
|
+
bodyStyle?: StyleProp<ViewStyle>;
|
|
43
|
+
/** Style applied to the footer wrapper View. */
|
|
44
|
+
footerStyle?: StyleProp<ViewStyle>;
|
|
45
|
+
/** Per-instance override of the corner radius. Wins over the `radius` token. */
|
|
46
|
+
borderRadius?: number;
|
|
38
47
|
testID?: string;
|
|
39
48
|
}
|
|
40
|
-
declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<
|
|
49
|
+
declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<RNView>> & {
|
|
50
|
+
Skeleton: React.FC<CardProps>;
|
|
51
|
+
};
|
|
41
52
|
export { Card };
|
|
42
53
|
export default Card;
|
|
43
54
|
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -53,10 +53,9 @@ export interface CarouselProps<T = unknown> {
|
|
|
53
53
|
*/
|
|
54
54
|
renderThumbnail?: (item: T, index: number) => React.ReactNode;
|
|
55
55
|
/**
|
|
56
|
-
* When true, renders the carousel as
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* driving the carousel is still being fetched.
|
|
56
|
+
* When true, renders the carousel as its authored skeleton placeholder
|
|
57
|
+
* shape: a single slide block plus pagination dots. Footprint matches the
|
|
58
|
+
* loaded carousel so the layout doesn't shift when data arrives.
|
|
60
59
|
*/
|
|
61
60
|
loading?: boolean;
|
|
62
61
|
}
|
|
@@ -65,9 +64,11 @@ export interface CarouselRef {
|
|
|
65
64
|
next: () => void;
|
|
66
65
|
prev: () => void;
|
|
67
66
|
}
|
|
68
|
-
declare const Carousel: <T = unknown>(props: CarouselProps<T> & {
|
|
67
|
+
declare const Carousel: (<T = unknown>(props: CarouselProps<T> & {
|
|
69
68
|
ref?: React.Ref<CarouselRef>;
|
|
70
|
-
}) => React.ReactElement | null
|
|
69
|
+
}) => React.ReactElement | null) & {
|
|
70
|
+
Skeleton: React.FC<CarouselProps<unknown>>;
|
|
71
|
+
};
|
|
71
72
|
export { Carousel };
|
|
72
73
|
export default Carousel;
|
|
73
74
|
//# sourceMappingURL=Carousel.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
|
-
import type { PressableProps, StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import type { PressableProps, StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
4
4
|
import type { HapticType } from '../../utils/hapticUtils';
|
|
5
5
|
export type CheckboxSize = 'sm' | 'md' | 'lg';
|
|
6
6
|
export type CheckboxTone = 'primary' | 'success' | 'warning' | 'error';
|
|
@@ -16,6 +16,14 @@ export interface CheckboxProps extends Omit<PressableProps, 'style' | 'children'
|
|
|
16
16
|
haptic?: HapticType | false;
|
|
17
17
|
style?: StyleProp<ViewStyle>;
|
|
18
18
|
boxStyle?: StyleProp<ViewStyle>;
|
|
19
|
+
/** Style override for the check glyph (✓) inside the box. */
|
|
20
|
+
checkIconStyle?: StyleProp<TextStyle>;
|
|
21
|
+
/** Style override for the indeterminate bar inside the box. */
|
|
22
|
+
indeterminateBarStyle?: StyleProp<ViewStyle>;
|
|
23
|
+
/** Style override for the outer row container. */
|
|
24
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
25
|
+
/** Style override for the label text. */
|
|
26
|
+
labelStyle?: StyleProp<TextStyle>;
|
|
19
27
|
testID?: string;
|
|
20
28
|
}
|
|
21
29
|
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<View>>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
import type { StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
2
|
+
import type { StyleProp, TextStyle, View as RNView, ViewStyle } from 'react-native';
|
|
4
3
|
export type ChipVariant = 'filled' | 'outlined';
|
|
5
4
|
export type ChipTone = 'primary' | 'neutral' | 'success' | 'warning' | 'error' | 'info';
|
|
6
5
|
export type ChipSize = 'sm' | 'md';
|
|
@@ -15,17 +14,25 @@ export interface ChipProps {
|
|
|
15
14
|
size?: ChipSize;
|
|
16
15
|
disabled?: boolean;
|
|
17
16
|
/**
|
|
18
|
-
* When true, renders the component as
|
|
19
|
-
*
|
|
20
|
-
*
|
|
17
|
+
* When true, renders the component as its authored skeleton placeholder shape.
|
|
18
|
+
* The placeholder mirrors the real layout's footprint so the UI doesn't reflow
|
|
19
|
+
* when data arrives. Use this while the data driving the component is being fetched.
|
|
21
20
|
*/
|
|
22
21
|
loading?: boolean;
|
|
23
22
|
accessibilityLabel?: string;
|
|
24
23
|
style?: StyleProp<ViewStyle>;
|
|
25
24
|
textStyle?: StyleProp<TextStyle>;
|
|
25
|
+
/** Style override for the chip outer container (alias to style, applied after). */
|
|
26
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
27
|
+
/** Style override for the close (×) button pressable. */
|
|
28
|
+
closeButtonStyle?: StyleProp<ViewStyle>;
|
|
29
|
+
/** Style override for the close (×) glyph text. */
|
|
30
|
+
closeIconStyle?: StyleProp<TextStyle>;
|
|
26
31
|
testID?: string;
|
|
27
32
|
}
|
|
28
|
-
declare const Chip: React.ForwardRefExoticComponent<ChipProps & React.RefAttributes<
|
|
33
|
+
declare const Chip: React.ForwardRefExoticComponent<ChipProps & React.RefAttributes<RNView>> & {
|
|
34
|
+
Skeleton: React.FC<ChipProps>;
|
|
35
|
+
};
|
|
29
36
|
export { Chip };
|
|
30
37
|
export default Chip;
|
|
31
38
|
//# sourceMappingURL=Chip.d.ts.map
|