@hero-design/rn 8.131.1 → 8.131.3
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/CHANGELOG.md +12 -0
- package/es/index.js +39 -86
- package/lib/index.js +38 -85
- package/package.json +1 -1
- package/src/components/Alert/index.tsx +1 -1
- package/src/components/AppCue/index.tsx +1 -1
- package/src/components/Attachment/index.tsx +1 -1
- package/src/components/BottomNavigation/index.tsx +1 -1
- package/src/components/Carousel/index.tsx +1 -1
- package/src/components/Chip/index.tsx +1 -1
- package/src/components/ContentNavigator/index.tsx +1 -1
- package/src/components/Divider/index.tsx +1 -1
- package/src/components/Drawer/index.tsx +1 -1
- package/src/components/FloatingIsland/index.tsx +1 -1
- package/src/components/HeroDesignProvider/index.tsx +1 -1
- package/src/components/Icon/index.tsx +0 -2
- package/src/components/LocaleProvider/index.tsx +1 -1
- package/src/components/PinInput/index.tsx +1 -1
- package/src/components/Rate/index.tsx +1 -1
- package/src/components/RefreshControl/index.tsx +1 -1
- package/src/components/SectionHeading/index.tsx +1 -1
- package/src/components/Skeleton/index.tsx +1 -1
- package/src/components/Spinner/index.tsx +1 -1
- package/src/components/Tabs/ScrollableTabsHeader/hooks/useIndicatorAnimation.ts +68 -62
- package/src/components/Tabs/StyledScrollableTabs.tsx +4 -4
- package/src/components/Tag/index.tsx +1 -1
- package/src/types.ts +99 -99
- package/types/components/Alert/index.d.ts +1 -1
- package/types/components/AppCue/index.d.ts +1 -1
- package/types/components/Attachment/index.d.ts +1 -1
- package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +1 -1
- package/types/components/BottomNavigation/index.d.ts +1 -1
- package/types/components/Carousel/index.d.ts +1 -1
- package/types/components/Chip/index.d.ts +1 -1
- package/types/components/ContentNavigator/index.d.ts +1 -1
- package/types/components/Divider/index.d.ts +1 -1
- package/types/components/Drawer/index.d.ts +1 -1
- package/types/components/FloatingIsland/index.d.ts +1 -1
- package/types/components/HeroDesignProvider/index.d.ts +1 -1
- package/types/components/Icon/index.d.ts +0 -2
- package/types/components/LocaleProvider/index.d.ts +1 -1
- package/types/components/PinInput/index.d.ts +1 -1
- package/types/components/Rate/index.d.ts +1 -1
- package/types/components/RefreshControl/index.d.ts +1 -1
- package/types/components/SectionHeading/index.d.ts +1 -1
- package/types/components/Skeleton/index.d.ts +1 -1
- package/types/components/Spinner/index.d.ts +1 -1
- package/types/components/StatusScreens/Error/StyledError.d.ts +1 -1
- package/types/components/StatusScreens/Success/StyledSuccess.d.ts +1 -1
- package/types/components/Tabs/ScrollableTabsHeader/hooks/useIndicatorAnimation.d.ts +0 -38
- package/types/components/Tag/index.d.ts +1 -1
- package/types/types.d.ts +89 -43
|
@@ -4,7 +4,7 @@ import type { ViewProps } from 'react-native';
|
|
|
4
4
|
import { StyledSpinnerContainer, StyledView } from './StyledSpinner';
|
|
5
5
|
import { AnimatedSpinner } from './AnimatedSpinner';
|
|
6
6
|
|
|
7
|
-
interface SpinnerProps extends ViewProps {
|
|
7
|
+
export interface SpinnerProps extends ViewProps {
|
|
8
8
|
/**
|
|
9
9
|
* Size of Spinner.
|
|
10
10
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Animated } from 'react-native';
|
|
2
|
+
import { Animated, PixelRatio } from 'react-native';
|
|
3
3
|
import type { LayoutChangeEvent } from 'react-native';
|
|
4
4
|
|
|
5
5
|
type Layout = { x: number; width: number };
|
|
@@ -9,9 +9,9 @@ type Layout = { x: number; width: number };
|
|
|
9
9
|
*
|
|
10
10
|
* Layer 1 — bottom border / underline (indicatorStyle)
|
|
11
11
|
* ─────────────────────────────────────────────────────
|
|
12
|
-
* Uses the "width:1 + scaleX" trick: the element has a
|
|
13
|
-
* width of
|
|
14
|
-
*
|
|
12
|
+
* Uses the "width:1/PixelRatio + scaleX" trick: the element has a stylesheet
|
|
13
|
+
* width of 1 physical pixel (1/PixelRatio dp) and scaleX is set to
|
|
14
|
+
* targetWidth * PixelRatio, giving a visual width of targetWidth dp.
|
|
15
15
|
* Both translateX and scaleX are transform properties → native driver.
|
|
16
16
|
* Caveat: scaleX also scales border-radius, so this layer has no border-radius.
|
|
17
17
|
*
|
|
@@ -21,27 +21,43 @@ type Layout = { x: number; width: number };
|
|
|
21
21
|
* border-radius is never distorted by scale:
|
|
22
22
|
*
|
|
23
23
|
* ┌──────────────────────────────────────────────────────┐
|
|
24
|
-
* │ [cap-left
|
|
24
|
+
* │ [cap-left cap] [body 1px + scaleX] [cap-right cap] │
|
|
25
25
|
* └──────────────────────────────────────────────────────┘
|
|
26
26
|
*
|
|
27
|
-
* cap-left — fixed
|
|
28
|
-
* body —
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* translateX = pillX + tabWidth - 8 (via Animated.add)
|
|
33
|
-
*
|
|
34
|
-
* All four animated values use the native driver (translateX and scaleX are
|
|
35
|
-
* transform properties). `width` is never animated, so no JS driver needed.
|
|
27
|
+
* cap-left — fixed pillCapWidth dp, borderTopLeftRadius, translateX = pillX
|
|
28
|
+
* body — 1px + scaleX trick (scaleX = (tabWidth - 2*cap) * PixelRatio),
|
|
29
|
+
* translateX = pillX + pillCapWidth (via Animated.add)
|
|
30
|
+
* cap-right — fixed pillCapWidth dp, borderTopRightRadius,
|
|
31
|
+
* translateX = pillX + rightOffset (via Animated.add)
|
|
36
32
|
*
|
|
37
33
|
* Driver summary:
|
|
38
|
-
* indicatorX
|
|
39
|
-
* indicatorScaleX
|
|
40
|
-
* pillX
|
|
41
|
-
* pillBodyScaleX
|
|
42
|
-
*
|
|
43
|
-
* (Animated.add: pillX + tabWidth - 8)
|
|
34
|
+
* indicatorX native translateX — slides the bottom border
|
|
35
|
+
* indicatorScaleX native scaleX — stretches the bottom border
|
|
36
|
+
* pillX native translateX — slides all three pill pieces
|
|
37
|
+
* pillBodyScaleX native scaleX — stretches the pill body
|
|
38
|
+
* pillRightOffset native translateX — positions the right cap
|
|
44
39
|
*/
|
|
40
|
+
|
|
41
|
+
type AnimValues = {
|
|
42
|
+
indicatorX: number;
|
|
43
|
+
indicatorScaleX: number;
|
|
44
|
+
pillX: number;
|
|
45
|
+
pillBodyScaleX: number;
|
|
46
|
+
pillRightOffset: number;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** Centralised calculation for all animated values given a tab layout. */
|
|
50
|
+
const computeValues = (layout: Layout, pillCapWidth: number): AnimValues => {
|
|
51
|
+
const pr = PixelRatio.get();
|
|
52
|
+
return {
|
|
53
|
+
indicatorX: layout.x,
|
|
54
|
+
indicatorScaleX: layout.width * pr,
|
|
55
|
+
pillX: layout.x,
|
|
56
|
+
pillBodyScaleX: Math.max(layout.width - pillCapWidth * 2, 0) * pr,
|
|
57
|
+
pillRightOffset: Math.max(layout.width - pillCapWidth, 0),
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
|
|
45
61
|
const useIndicatorAnimation = ({
|
|
46
62
|
selectedIndex,
|
|
47
63
|
tabsLength,
|
|
@@ -57,9 +73,6 @@ const useIndicatorAnimation = ({
|
|
|
57
73
|
const indicatorScaleX = React.useRef(new Animated.Value(1)).current;
|
|
58
74
|
|
|
59
75
|
// Layer 2 — native driver (pill background, three-piece split).
|
|
60
|
-
// pillX: left edge of the pill (shared by all three pieces as base).
|
|
61
|
-
// pillBodyScaleX: scaleX for the body piece (tabWidth - 2 * CAP_WIDTH).
|
|
62
|
-
// pillRightOffset: additional x offset for the right cap (tabWidth - CAP_WIDTH).
|
|
63
76
|
const pillX = React.useRef(new Animated.Value(0)).current;
|
|
64
77
|
const pillBodyScaleX = React.useRef(new Animated.Value(1)).current;
|
|
65
78
|
const pillRightOffset = React.useRef(new Animated.Value(0)).current;
|
|
@@ -86,51 +99,37 @@ const useIndicatorAnimation = ({
|
|
|
86
99
|
runningAnimRef.current?.stop();
|
|
87
100
|
runningAnimRef.current = null;
|
|
88
101
|
|
|
89
|
-
|
|
90
|
-
const indicatorScaleXValue = layout.width;
|
|
91
|
-
// Layer 2 body: width:1 element, scaleX fills space between the two caps.
|
|
92
|
-
const bodyScaleX = Math.max(layout.width - pillCapWidth * 2, 0);
|
|
93
|
-
// Layer 2 right cap: offset from pillX to reach the right edge.
|
|
94
|
-
// Clamped to 0 so the right cap never slides left of the pill's origin
|
|
95
|
-
// when the tab is narrower than one cap width.
|
|
96
|
-
const rightOffset = Math.max(layout.width - pillCapWidth, 0);
|
|
102
|
+
const values = computeValues(layout, pillCapWidth);
|
|
97
103
|
|
|
98
104
|
if (!animate || !initializedRef.current) {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
pillRightOffset.setValue(rightOffset);
|
|
105
|
+
indicatorX.setValue(values.indicatorX);
|
|
106
|
+
indicatorScaleX.setValue(values.indicatorScaleX);
|
|
107
|
+
pillX.setValue(values.pillX);
|
|
108
|
+
pillBodyScaleX.setValue(values.pillBodyScaleX);
|
|
109
|
+
pillRightOffset.setValue(values.pillRightOffset);
|
|
105
110
|
initializedRef.current = true;
|
|
106
111
|
return;
|
|
107
112
|
}
|
|
108
113
|
|
|
109
|
-
// All five animations run on the native driver (UI thread):
|
|
110
|
-
// indicatorX — slides the bottom border
|
|
111
|
-
// indicatorScaleX — stretches the bottom border
|
|
112
|
-
// pillX — slides all three pill pieces together
|
|
113
|
-
// pillBodyScaleX — resizes the body piece to fill between caps
|
|
114
|
-
// pillRightOffset — keeps the right cap at the pill's right edge
|
|
115
114
|
const anim = Animated.parallel([
|
|
116
115
|
Animated.timing(indicatorX, {
|
|
117
|
-
toValue:
|
|
116
|
+
toValue: values.indicatorX,
|
|
118
117
|
useNativeDriver: true,
|
|
119
118
|
}),
|
|
120
119
|
Animated.timing(indicatorScaleX, {
|
|
121
|
-
toValue:
|
|
120
|
+
toValue: values.indicatorScaleX,
|
|
122
121
|
useNativeDriver: true,
|
|
123
122
|
}),
|
|
124
123
|
Animated.timing(pillX, {
|
|
125
|
-
toValue:
|
|
124
|
+
toValue: values.pillX,
|
|
126
125
|
useNativeDriver: true,
|
|
127
126
|
}),
|
|
128
127
|
Animated.timing(pillBodyScaleX, {
|
|
129
|
-
toValue:
|
|
128
|
+
toValue: values.pillBodyScaleX,
|
|
130
129
|
useNativeDriver: true,
|
|
131
130
|
}),
|
|
132
131
|
Animated.timing(pillRightOffset, {
|
|
133
|
-
toValue:
|
|
132
|
+
toValue: values.pillRightOffset,
|
|
134
133
|
useNativeDriver: true,
|
|
135
134
|
}),
|
|
136
135
|
]);
|
|
@@ -155,7 +154,6 @@ const useIndicatorAnimation = ({
|
|
|
155
154
|
if (layoutsRef.current[selectedIndex]) {
|
|
156
155
|
animateTo(selectedIndex, initializedRef.current);
|
|
157
156
|
} else {
|
|
158
|
-
// Layout not yet measured — store as pending and resolve in onTabLayout.
|
|
159
157
|
pendingIndexRef.current = selectedIndex;
|
|
160
158
|
}
|
|
161
159
|
}, [selectedIndex, animateTo]);
|
|
@@ -169,7 +167,10 @@ const useIndicatorAnimation = ({
|
|
|
169
167
|
|
|
170
168
|
const onTabLayout = React.useCallback(
|
|
171
169
|
(index: number, event: LayoutChangeEvent) => {
|
|
172
|
-
const
|
|
170
|
+
const x = PixelRatio.roundToNearestPixel(event.nativeEvent.layout.x);
|
|
171
|
+
const width = PixelRatio.roundToNearestPixel(
|
|
172
|
+
event.nativeEvent.layout.width
|
|
173
|
+
);
|
|
173
174
|
const prev = layoutsRef.current[index];
|
|
174
175
|
// Skip if layout hasn't meaningfully changed (sub-pixel tolerance).
|
|
175
176
|
if (
|
|
@@ -181,39 +182,44 @@ const useIndicatorAnimation = ({
|
|
|
181
182
|
}
|
|
182
183
|
layoutsRef.current[index] = { x, width };
|
|
183
184
|
|
|
184
|
-
// Animate if this tab is the selected one (covers the pending case where
|
|
185
|
-
// selectedIndex was set before the layout was measured).
|
|
186
185
|
if (index === selectedIndex || index === pendingIndexRef.current) {
|
|
187
186
|
if (index === pendingIndexRef.current)
|
|
188
187
|
pendingIndexRef.current = undefined;
|
|
189
188
|
animateTo(index, initializedRef.current);
|
|
190
189
|
}
|
|
191
190
|
|
|
192
|
-
// If no tab is selected yet, snap indicators to tab 0 on its first
|
|
193
|
-
// layout so they appear at a sensible default position.
|
|
191
|
+
// If no tab is selected yet, snap indicators to tab 0 on its first layout.
|
|
194
192
|
if (
|
|
195
193
|
!initializedRef.current &&
|
|
196
194
|
index === 0 &&
|
|
197
195
|
selectedIndex === undefined
|
|
198
196
|
) {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
197
|
+
const values = computeValues({ x, width }, pillCapWidth);
|
|
198
|
+
indicatorX.setValue(values.indicatorX);
|
|
199
|
+
indicatorScaleX.setValue(values.indicatorScaleX);
|
|
200
|
+
pillX.setValue(values.pillX);
|
|
201
|
+
pillBodyScaleX.setValue(values.pillBodyScaleX);
|
|
202
|
+
pillRightOffset.setValue(values.pillRightOffset);
|
|
203
203
|
initializedRef.current = true;
|
|
204
204
|
}
|
|
205
205
|
},
|
|
206
|
-
[
|
|
206
|
+
[
|
|
207
|
+
selectedIndex,
|
|
208
|
+
animateTo,
|
|
209
|
+
pillCapWidth,
|
|
210
|
+
indicatorX,
|
|
211
|
+
indicatorScaleX,
|
|
212
|
+
pillX,
|
|
213
|
+
pillBodyScaleX,
|
|
214
|
+
pillRightOffset,
|
|
215
|
+
]
|
|
207
216
|
);
|
|
208
217
|
|
|
209
|
-
// Layer 1: transformOrigin 'left center' pins scaleX expansion to left edge.
|
|
210
218
|
const indicatorStyle = {
|
|
211
219
|
transformOrigin: 'left center',
|
|
212
220
|
transform: [{ translateX: indicatorX }, { scaleX: indicatorScaleX }],
|
|
213
221
|
} as const;
|
|
214
222
|
|
|
215
|
-
// Layer 2: three pieces, all absolutely positioned, all native driver.
|
|
216
|
-
// Animated.add computes derived positions without creating JS-driver nodes.
|
|
217
223
|
const pillLeftStyle = {
|
|
218
224
|
transform: [{ translateX: pillX }],
|
|
219
225
|
} as const;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Animated, Platform, View } from 'react-native';
|
|
1
|
+
import { Animated, PixelRatio, Platform, View } from 'react-native';
|
|
2
2
|
import styled from '@emotion/native';
|
|
3
3
|
|
|
4
4
|
// Checks if the platform is Android 7x and 8.x, i.e., API levels 24 to 27 (Android 7.0 to 8.1),
|
|
@@ -67,7 +67,7 @@ const HeaderTabPillBody = styled(Animated.View)(({ theme }) => ({
|
|
|
67
67
|
top: 0,
|
|
68
68
|
bottom: 0,
|
|
69
69
|
left: 0,
|
|
70
|
-
width: 1,
|
|
70
|
+
width: 1 / PixelRatio.get(),
|
|
71
71
|
backgroundColor: theme.__hd__.tabs.colors.highlightedActiveBackground,
|
|
72
72
|
}));
|
|
73
73
|
|
|
@@ -84,7 +84,7 @@ const HeaderTabPillRight = styled(Animated.View)(({ theme }) => ({
|
|
|
84
84
|
const HeaderTabItemActiveBorder = styled(Animated.View)(({ theme }) => ({
|
|
85
85
|
position: 'absolute',
|
|
86
86
|
bottom: 0,
|
|
87
|
-
width: 1,
|
|
87
|
+
width: 1 / PixelRatio.get(),
|
|
88
88
|
height: theme.__hd__.tabs.borderWidths.highlightedActiveBorder,
|
|
89
89
|
backgroundColor: theme.__hd__.tabs.colors.highlightedActiveBorder,
|
|
90
90
|
}));
|
|
@@ -99,7 +99,7 @@ const HeaderTabItemWrapper = styled(View)(({ theme }) => ({
|
|
|
99
99
|
}));
|
|
100
100
|
|
|
101
101
|
const HeaderTabItemIndicator = styled(Animated.View)(({ theme }) => ({
|
|
102
|
-
width: 1,
|
|
102
|
+
width: 1 / PixelRatio.get(),
|
|
103
103
|
height: theme.__hd__.tabs.sizes.indicator,
|
|
104
104
|
position: 'absolute',
|
|
105
105
|
bottom: theme.__hd__.tabs.space.tabIndicatorBottom,
|
|
@@ -5,7 +5,7 @@ import { StyledText, StyledView, StyledTagIcon } from './StyledTag';
|
|
|
5
5
|
import { useDeprecation } from '../../utils/hooks';
|
|
6
6
|
import type { IconName } from '../Icon';
|
|
7
7
|
|
|
8
|
-
interface TagProps extends ViewProps {
|
|
8
|
+
export interface TagProps extends ViewProps {
|
|
9
9
|
/**
|
|
10
10
|
* Content of the Tag.
|
|
11
11
|
*/
|
package/src/types.ts
CHANGED
|
@@ -1,119 +1,119 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
export type {
|
|
2
|
+
BottomNavigationTabType,
|
|
3
|
+
BottomNavigationProps,
|
|
4
|
+
} from './components/BottomNavigation';
|
|
5
|
+
export type { IconName, IconProps } from './components/Icon';
|
|
6
|
+
export type { SingleSelectProps, MultiSelectProps } from './components/Select';
|
|
7
|
+
export type { TabType, TabsHeaderProps, TabsProps } from './components/Tabs';
|
|
8
|
+
export type { TextInputProps, TextInputHandles } from './components/TextInput';
|
|
9
|
+
export type {
|
|
7
10
|
RichTextEditorRef,
|
|
8
11
|
RichTextEditorProps,
|
|
9
12
|
} from './components/RichTextEditor';
|
|
10
|
-
|
|
11
|
-
|
|
13
|
+
export type { Theme } from './theme';
|
|
14
|
+
export type {
|
|
12
15
|
ListRenderOptionInfo,
|
|
13
16
|
SectionListRenderOptionInfo,
|
|
14
17
|
SelectOptionType,
|
|
15
18
|
} from './components/Select/types';
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
export type { SwipeableProps } from './components/Swipeable';
|
|
20
|
+
export type { TextProps } from './components/Typography/Text';
|
|
21
|
+
export type {
|
|
22
|
+
CardCarouselHandles,
|
|
23
|
+
CardCarouselProps,
|
|
24
|
+
} from './components/Carousel/CardCarousel';
|
|
25
|
+
export type { FABHandles, FABProps } from './components/FAB/FAB';
|
|
26
|
+
export type {
|
|
21
27
|
ActionGroupHandles,
|
|
22
28
|
ActionGroupProps,
|
|
23
29
|
} from './components/FAB/ActionGroup';
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
30
|
+
export type { ActionItemProps } from './components/FAB/ActionGroup/ActionItem';
|
|
31
|
+
export type { SliderRangeValue } from './components/Slider/RangeSlider';
|
|
32
|
+
export type { CalendarDateRange } from './components/Calendar/CalendarRange';
|
|
33
|
+
export type {
|
|
28
34
|
LocaleCode,
|
|
29
35
|
LocaleValues,
|
|
30
36
|
DateTimeFormats,
|
|
31
37
|
} from './locales/types';
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
38
|
+
export type { ColumnChartProps } from './components/Chart/ColumnChart';
|
|
39
|
+
export type { LineChartProps } from './components/Chart/Line';
|
|
40
|
+
export type { Scale, SystemPalette } from './theme/global';
|
|
41
|
+
export type {
|
|
36
42
|
BrandSystemPalette,
|
|
37
43
|
GlobalSystemPalette,
|
|
38
44
|
} from './theme/global/colors/types';
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
} from './components/
|
|
57
|
-
import type { PinInputHandler } from './components/PinInput';
|
|
58
|
-
import type { ThemeScale } from './components/Box/types';
|
|
59
|
-
import type { TimePickerProps } from './components/TimePicker/types';
|
|
60
|
-
import type { DatePickerProps } from './components/DatePicker/types';
|
|
61
|
-
import type { SegmentedControlItemConfig } from './components/SegmentedControl/types';
|
|
62
|
-
import type { ProgressSegmentedBarProps } from './components/Progress/SegmentedBar/types';
|
|
63
|
-
|
|
45
|
+
export type { ToolbarItemProps } from './components/Toolbar/ToolbarItem';
|
|
46
|
+
export type { CheckboxProps } from './components/Checkbox';
|
|
47
|
+
export type { SwitchOptionType } from './components/Switch/SelectorSwitch';
|
|
48
|
+
export type { BoxProps } from './components/Box';
|
|
49
|
+
export type { BodyProps } from './components/Typography/Body';
|
|
50
|
+
export type { ToolbarButtonName } from './components/RichTextEditor/types';
|
|
51
|
+
export type { ListItemProps } from './components/List/ListItem';
|
|
52
|
+
export type { IconButtonProps } from './components/Button/IconButton';
|
|
53
|
+
export type { BadgeProps } from './components/Badge';
|
|
54
|
+
export type {
|
|
55
|
+
ToastProps,
|
|
56
|
+
ToastContainerProps,
|
|
57
|
+
ToastItemProps,
|
|
58
|
+
} from './components/Toast/types';
|
|
59
|
+
export type { Space } from './theme/global/space';
|
|
60
|
+
export type { CaptionProps } from './components/Typography/Caption';
|
|
61
|
+
export type { Radii } from './theme/global/borders';
|
|
62
|
+
export type { TitleProps } from './components/Typography/Title';
|
|
64
63
|
export type {
|
|
65
|
-
Space,
|
|
66
|
-
CaptionProps,
|
|
67
|
-
Radii,
|
|
68
|
-
TitleProps,
|
|
69
64
|
CarouselData,
|
|
70
65
|
CarouselImageProps,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
};
|
|
66
|
+
} from './components/Carousel/types';
|
|
67
|
+
export type { PinInputHandler, PinInputProps } from './components/PinInput';
|
|
68
|
+
export type { ThemeScale } from './components/Box/types';
|
|
69
|
+
export type { TimePickerProps } from './components/TimePicker/types';
|
|
70
|
+
export type { DatePickerProps } from './components/DatePicker/types';
|
|
71
|
+
export type { SegmentedControlItemConfig } from './components/SegmentedControl/types';
|
|
72
|
+
export type { ProgressSegmentedBarProps } from './components/Progress/SegmentedBar/types';
|
|
73
|
+
export type { DragableDrawerProps } from './components/Drawer/DragableDrawer';
|
|
74
|
+
export type { DragableScrollViewProps } from './components/Drawer/DragableDrawer/DragableScrollView';
|
|
75
|
+
export type { PortalHostProps } from './components/Portal/PortalHost';
|
|
76
|
+
export type { PortalProviderProps } from './components/Portal/PortalProvider';
|
|
77
|
+
export type { ToolbarGroupProps } from './components/Toolbar/ToolbarGroup';
|
|
78
|
+
export type { InlineCheckboxProps } from './components/Checkbox/InlineCheckBox';
|
|
79
|
+
export type { EditorToolbarProps } from './components/RichTextEditor/EditorToolbar';
|
|
80
|
+
export type { RichTextEditorInputProps } from './components/RichTextEditor/RichTextEditorInput';
|
|
81
|
+
export type { AccordionProps } from './components/Accordion';
|
|
82
|
+
export type { AlertProps } from './components/Alert';
|
|
83
|
+
export type { AppCueProps } from './components/AppCue';
|
|
84
|
+
export type { AttachmentProps } from './components/Attachment';
|
|
85
|
+
export type { AvatarProps } from './components/Avatar/Avatar';
|
|
86
|
+
export type { AvatarStackProps } from './components/Avatar/AvatarStack';
|
|
87
|
+
export type { BottomSheetProps } from './components/BottomSheet';
|
|
88
|
+
export type { ButtonProps } from './components/Button/Button';
|
|
89
|
+
export type { CalendarProps } from './components/Calendar/types';
|
|
90
|
+
export type { CardProps } from './components/Card';
|
|
91
|
+
export type { CarouselProps } from './components/Carousel';
|
|
92
|
+
export type { ChipProps } from './components/Chip';
|
|
93
|
+
export type { CollapseProps } from './components/Collapse';
|
|
94
|
+
export type { ContentNavigatorProps } from './components/ContentNavigator';
|
|
95
|
+
export type { DividerProps } from './components/Divider';
|
|
96
|
+
export type { DrawerProps } from './components/Drawer';
|
|
97
|
+
export type { FilterTriggerProps } from './components/FilterTrigger';
|
|
98
|
+
export type { FloatingIslandProps } from './components/FloatingIsland';
|
|
99
|
+
export type { HeroDesignProviderProps } from './components/HeroDesignProvider';
|
|
100
|
+
export type { ImageProps } from './components/Image';
|
|
101
|
+
export type { InlineLoaderProps } from './components/InlineLoader';
|
|
102
|
+
export type { LabelProps } from './components/Typography/Label';
|
|
103
|
+
export type { LocaleProviderProps } from './components/LocaleProvider';
|
|
104
|
+
export type { MapPinProps } from './components/MapPin/types';
|
|
105
|
+
export type { ModalProps } from './components/Modal';
|
|
106
|
+
export type { PageControlProps } from './components/PageControl';
|
|
107
|
+
export type { ProgressBarProps } from './components/Progress/ProgressBar';
|
|
108
|
+
export type { ProgressCircleProps } from './components/Progress/ProgressCircle';
|
|
109
|
+
export type { ProgressStepProps } from './components/Progress/ProgressStep';
|
|
110
|
+
export type { RadioGroupProps } from './components/Radio/RadioGroup';
|
|
111
|
+
export type { RateProps } from './components/Rate';
|
|
112
|
+
export type { RefreshControlProps } from './components/RefreshControl';
|
|
113
|
+
export type { SectionHeadingProps } from './components/SectionHeading';
|
|
114
|
+
export type { SegmentedControlProps } from './components/SegmentedControl';
|
|
115
|
+
export type { SingleSliderProps } from './components/Slider/SingleSlider';
|
|
116
|
+
export type { SkeletonProps } from './components/Skeleton';
|
|
117
|
+
export type { SpinnerProps } from './components/Spinner';
|
|
118
|
+
export type { SwitchProps } from './components/Switch';
|
|
119
|
+
export type { TagProps } from './components/Tag';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
3
|
import type { Placement } from './StyledAppCue';
|
|
4
|
-
interface AppCueProps {
|
|
4
|
+
export interface AppCueProps {
|
|
5
5
|
content: string | React.ReactElement;
|
|
6
6
|
target: React.ReactElement<{
|
|
7
7
|
onPress?: () => void;
|
|
@@ -3,7 +3,7 @@ import type { ReactElement } from 'react';
|
|
|
3
3
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
4
4
|
import type { IconProps } from '../Icon';
|
|
5
5
|
import type { ImageProps } from '../Image';
|
|
6
|
-
interface AttachmentProps {
|
|
6
|
+
export interface AttachmentProps {
|
|
7
7
|
/**
|
|
8
8
|
* Attachment filename.
|
|
9
9
|
*/
|
|
@@ -44,7 +44,7 @@ declare const BottomBarItem: import("@emotion/native").StyledComponent<import("r
|
|
|
44
44
|
}, {}, {
|
|
45
45
|
ref?: import("react").Ref<View> | undefined;
|
|
46
46
|
}>;
|
|
47
|
-
declare const StyledBottomBarText: import("@emotion/native").StyledComponent<import("
|
|
47
|
+
declare const StyledBottomBarText: import("@emotion/native").StyledComponent<import("../..").LabelProps & {
|
|
48
48
|
theme?: import("@emotion/react").Theme;
|
|
49
49
|
as?: React.ElementType;
|
|
50
50
|
}, {}, {}>;
|
|
@@ -19,7 +19,7 @@ export type BottomNavigationTabType = {
|
|
|
19
19
|
testID?: string;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
interface BottomNavigationProps extends ViewProps {
|
|
22
|
+
export interface BottomNavigationProps extends ViewProps {
|
|
23
23
|
/**
|
|
24
24
|
* Callback which is called on tab press, receiving key of upcoming active Tab.
|
|
25
25
|
*/
|
|
@@ -2,7 +2,7 @@ import type { Dispatch, ReactElement, SetStateAction } from 'react';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { StyleProp, ViewProps, ViewStyle } from 'react-native';
|
|
4
4
|
import type { CarouselData } from './types';
|
|
5
|
-
interface CarouselProps extends ViewProps {
|
|
5
|
+
export interface CarouselProps extends ViewProps {
|
|
6
6
|
/**
|
|
7
7
|
* Additional style.
|
|
8
8
|
*/
|
|
@@ -7,7 +7,7 @@ import type { IconName } from '../Icon';
|
|
|
7
7
|
*/
|
|
8
8
|
type DeprecatedVariant = 'outlined' | 'filled';
|
|
9
9
|
type ValidVariant = 'selection' | 'filter' | 'compact' | 'compact-outlined';
|
|
10
|
-
interface ChipProps extends ViewProps {
|
|
10
|
+
export interface ChipProps extends ViewProps {
|
|
11
11
|
/**
|
|
12
12
|
* The label of the chip.
|
|
13
13
|
*/
|
|
@@ -2,7 +2,7 @@ import type { ReactNode } from 'react';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { TouchableOpacityProps } from 'react-native';
|
|
4
4
|
import type { IconName } from '../Icon';
|
|
5
|
-
interface FloatingIslandProps extends TouchableOpacityProps {
|
|
5
|
+
export interface FloatingIslandProps extends TouchableOpacityProps {
|
|
6
6
|
/**
|
|
7
7
|
* Callback that is called when the floating island is pressed.
|
|
8
8
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ThemeProviderProps } from '../../theme/ThemeProvider';
|
|
3
3
|
import type { LocaleValues } from '../../locales/types';
|
|
4
|
-
interface HeroDesignProviderProps extends ThemeProviderProps {
|
|
4
|
+
export interface HeroDesignProviderProps extends ThemeProviderProps {
|
|
5
5
|
locale?: LocaleValues;
|
|
6
6
|
}
|
|
7
7
|
declare const HeroDesignProvider: ({ theme, locale, children, }: HeroDesignProviderProps) => React.JSX.Element;
|
|
@@ -5,8 +5,6 @@ export type IconName = typeof IconList[number];
|
|
|
5
5
|
export interface IconProps extends AccessibilityProps {
|
|
6
6
|
/**
|
|
7
7
|
* Name of the Icon.
|
|
8
|
-
*
|
|
9
|
-
* icon['carat-*'] - @deprecated Icons starting with 'carat' are deprecated and will be removed in the next major release, please use 'caret' instead.
|
|
10
8
|
*/
|
|
11
9
|
icon: IconName;
|
|
12
10
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { LocaleValues } from '../../locales/types';
|
|
3
|
-
interface LocaleProviderProps {
|
|
3
|
+
export interface LocaleProviderProps {
|
|
4
4
|
locale: LocaleValues;
|
|
5
5
|
}
|
|
6
6
|
declare const LocaleProvider: (props: React.PropsWithChildren<LocaleProviderProps>) => React.JSX.Element;
|