@xaui/native 0.2.8 → 0.9.1-alpha.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/dist/chunk-JDS6KGCM.cjs +791 -0
- package/dist/chunk-T3ZI2PZ6.js +791 -0
- package/dist/index.cjs +32 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +32 -0
- package/dist/theme/index.cjs +32 -0
- package/dist/theme/index.d.cts +669 -0
- package/dist/theme/index.d.ts +669 -0
- package/dist/theme/index.js +32 -0
- package/package.json +26 -249
- package/README.md +0 -178
- package/dist/alert/index.cjs +0 -340
- package/dist/alert/index.d.cts +0 -46
- package/dist/alert/index.d.ts +0 -46
- package/dist/alert/index.js +0 -340
- package/dist/app-bar/index.cjs +0 -148
- package/dist/app-bar/index.d.cts +0 -59
- package/dist/app-bar/index.d.ts +0 -59
- package/dist/app-bar/index.js +0 -148
- package/dist/autocomplete/index.cjs +0 -1122
- package/dist/autocomplete/index.d.cts +0 -88
- package/dist/autocomplete/index.d.ts +0 -88
- package/dist/autocomplete/index.js +0 -1122
- package/dist/avatar/index.cjs +0 -281
- package/dist/avatar/index.d.cts +0 -123
- package/dist/avatar/index.d.ts +0 -123
- package/dist/avatar/index.js +0 -281
- package/dist/badge/index.cjs +0 -197
- package/dist/badge/index.d.cts +0 -94
- package/dist/badge/index.d.ts +0 -94
- package/dist/badge/index.js +0 -197
- package/dist/bottom-sheet/index.cjs +0 -9
- package/dist/bottom-sheet/index.d.cts +0 -84
- package/dist/bottom-sheet/index.d.ts +0 -84
- package/dist/bottom-sheet/index.js +0 -9
- package/dist/bottom-tab-bar/index.cjs +0 -497
- package/dist/bottom-tab-bar/index.d.cts +0 -211
- package/dist/bottom-tab-bar/index.d.ts +0 -211
- package/dist/bottom-tab-bar/index.js +0 -497
- package/dist/button/index.cjs +0 -392
- package/dist/button/index.d.cts +0 -174
- package/dist/button/index.d.ts +0 -174
- package/dist/button/index.js +0 -392
- package/dist/button.type-j1ZdkkSl.d.cts +0 -4
- package/dist/button.type-j1ZdkkSl.d.ts +0 -4
- package/dist/card/index.cjs +0 -338
- package/dist/card/index.d.cts +0 -191
- package/dist/card/index.d.ts +0 -191
- package/dist/card/index.js +0 -338
- package/dist/carousel/index.cjs +0 -381
- package/dist/carousel/index.d.cts +0 -147
- package/dist/carousel/index.d.ts +0 -147
- package/dist/carousel/index.js +0 -381
- package/dist/chart/index.cjs +0 -1026
- package/dist/chart/index.d.cts +0 -218
- package/dist/chart/index.d.ts +0 -218
- package/dist/chart/index.js +0 -1026
- package/dist/checkbox/index.cjs +0 -443
- package/dist/checkbox/index.d.cts +0 -73
- package/dist/checkbox/index.d.ts +0 -73
- package/dist/checkbox/index.js +0 -443
- package/dist/chip/index.cjs +0 -503
- package/dist/chip/index.d.cts +0 -195
- package/dist/chip/index.d.ts +0 -195
- package/dist/chip/index.js +0 -503
- package/dist/chunk-4JFWQ5XT.js +0 -368
- package/dist/chunk-56RPWZD2.cjs +0 -9
- package/dist/chunk-7UFBLUMV.cjs +0 -136
- package/dist/chunk-A45TVXU5.js +0 -337
- package/dist/chunk-BYWUAPC4.cjs +0 -368
- package/dist/chunk-DECMUMCI.js +0 -0
- package/dist/chunk-DHSTKO3K.cjs +0 -19
- package/dist/chunk-DJ4Q37UT.cjs +0 -75
- package/dist/chunk-EUQDGTST.cjs +0 -1
- package/dist/chunk-GBHQCAKW.js +0 -19
- package/dist/chunk-RBSA4NH4.js +0 -136
- package/dist/chunk-SHBDANQN.js +0 -9
- package/dist/chunk-UGEINZM7.cjs +0 -290
- package/dist/chunk-UU4HHBDN.js +0 -290
- package/dist/chunk-VSZEXOUN.js +0 -384
- package/dist/chunk-YIEUN3G5.cjs +0 -384
- package/dist/chunk-ZH6ZSV2Q.cjs +0 -337
- package/dist/chunk-ZY7IUTAT.js +0 -75
- package/dist/color-picker/index.cjs +0 -457
- package/dist/color-picker/index.d.cts +0 -124
- package/dist/color-picker/index.d.ts +0 -124
- package/dist/color-picker/index.js +0 -457
- package/dist/core/index.cjs +0 -24
- package/dist/core/index.d.cts +0 -28
- package/dist/core/index.d.ts +0 -28
- package/dist/core/index.js +0 -24
- package/dist/datepicker/index.cjs +0 -1625
- package/dist/datepicker/index.d.cts +0 -45
- package/dist/datepicker/index.d.ts +0 -45
- package/dist/datepicker/index.js +0 -1625
- package/dist/dialog/index.cjs +0 -372
- package/dist/dialog/index.d.cts +0 -151
- package/dist/dialog/index.d.ts +0 -151
- package/dist/dialog/index.js +0 -372
- package/dist/divider/index.cjs +0 -8
- package/dist/divider/index.d.cts +0 -30
- package/dist/divider/index.d.ts +0 -30
- package/dist/divider/index.js +0 -8
- package/dist/drawer/index.cjs +0 -237
- package/dist/drawer/index.d.cts +0 -58
- package/dist/drawer/index.d.ts +0 -58
- package/dist/drawer/index.js +0 -237
- package/dist/expansion-panel/index.cjs +0 -441
- package/dist/expansion-panel/index.d.cts +0 -153
- package/dist/expansion-panel/index.d.ts +0 -153
- package/dist/expansion-panel/index.js +0 -441
- package/dist/fab/index.cjs +0 -9
- package/dist/fab/index.d.cts +0 -10
- package/dist/fab/index.d.ts +0 -10
- package/dist/fab/index.js +0 -9
- package/dist/fab-menu/index.cjs +0 -330
- package/dist/fab-menu/index.d.cts +0 -125
- package/dist/fab-menu/index.d.ts +0 -125
- package/dist/fab-menu/index.js +0 -330
- package/dist/fab.type-CkUHmXU_.d.ts +0 -86
- package/dist/fab.type-DN0vtAh6.d.cts +0 -86
- package/dist/feature-discovery/index.cjs +0 -464
- package/dist/feature-discovery/index.d.cts +0 -82
- package/dist/feature-discovery/index.d.ts +0 -82
- package/dist/feature-discovery/index.js +0 -464
- package/dist/indicator/index.cjs +0 -8
- package/dist/indicator/index.d.cts +0 -47
- package/dist/indicator/index.d.ts +0 -47
- package/dist/indicator/index.js +0 -8
- package/dist/input/index.cjs +0 -1462
- package/dist/input/index.d.cts +0 -522
- package/dist/input/index.d.ts +0 -522
- package/dist/input/index.js +0 -1462
- package/dist/input-trigger/index.cjs +0 -197
- package/dist/input-trigger/index.d.cts +0 -11
- package/dist/input-trigger/index.d.ts +0 -11
- package/dist/input-trigger/index.js +0 -197
- package/dist/input-trigger.type-Ba4bM3Qp.d.cts +0 -180
- package/dist/input-trigger.type-Ba4bM3Qp.d.ts +0 -180
- package/dist/list/index.cjs +0 -395
- package/dist/list/index.d.cts +0 -188
- package/dist/list/index.d.ts +0 -188
- package/dist/list/index.js +0 -395
- package/dist/menu/index.cjs +0 -316
- package/dist/menu/index.d.cts +0 -115
- package/dist/menu/index.d.ts +0 -115
- package/dist/menu/index.js +0 -316
- package/dist/menubox/index.cjs +0 -297
- package/dist/menubox/index.d.cts +0 -98
- package/dist/menubox/index.d.ts +0 -98
- package/dist/menubox/index.js +0 -297
- package/dist/pager/index.cjs +0 -205
- package/dist/pager/index.d.cts +0 -93
- package/dist/pager/index.d.ts +0 -93
- package/dist/pager/index.js +0 -205
- package/dist/picker/index.cjs +0 -244
- package/dist/picker/index.d.cts +0 -121
- package/dist/picker/index.d.ts +0 -121
- package/dist/picker/index.js +0 -244
- package/dist/progress/index.cjs +0 -219
- package/dist/progress/index.d.cts +0 -47
- package/dist/progress/index.d.ts +0 -47
- package/dist/progress/index.js +0 -219
- package/dist/radio/index.cjs +0 -465
- package/dist/radio/index.d.cts +0 -145
- package/dist/radio/index.d.ts +0 -145
- package/dist/radio/index.js +0 -465
- package/dist/refresh-control/index.cjs +0 -45
- package/dist/refresh-control/index.d.cts +0 -55
- package/dist/refresh-control/index.d.ts +0 -55
- package/dist/refresh-control/index.js +0 -45
- package/dist/segment-button/index.cjs +0 -405
- package/dist/segment-button/index.d.cts +0 -141
- package/dist/segment-button/index.d.ts +0 -141
- package/dist/segment-button/index.js +0 -405
- package/dist/select/index.cjs +0 -878
- package/dist/select/index.d.cts +0 -192
- package/dist/select/index.d.ts +0 -192
- package/dist/select/index.js +0 -878
- package/dist/skeleton/index.cjs +0 -89
- package/dist/skeleton/index.d.cts +0 -45
- package/dist/skeleton/index.d.ts +0 -45
- package/dist/skeleton/index.js +0 -89
- package/dist/slider/index.cjs +0 -576
- package/dist/slider/index.d.cts +0 -171
- package/dist/slider/index.d.ts +0 -171
- package/dist/slider/index.js +0 -576
- package/dist/snackbar/index.cjs +0 -436
- package/dist/snackbar/index.d.cts +0 -174
- package/dist/snackbar/index.d.ts +0 -174
- package/dist/snackbar/index.js +0 -436
- package/dist/snippet/index.cjs +0 -314
- package/dist/snippet/index.d.cts +0 -95
- package/dist/snippet/index.d.ts +0 -95
- package/dist/snippet/index.js +0 -314
- package/dist/stepper/index.cjs +0 -550
- package/dist/stepper/index.d.cts +0 -137
- package/dist/stepper/index.d.ts +0 -137
- package/dist/stepper/index.js +0 -550
- package/dist/switch/index.cjs +0 -358
- package/dist/switch/index.d.cts +0 -28
- package/dist/switch/index.d.ts +0 -28
- package/dist/switch/index.js +0 -358
- package/dist/tabs/index.cjs +0 -440
- package/dist/tabs/index.d.cts +0 -180
- package/dist/tabs/index.d.ts +0 -180
- package/dist/tabs/index.js +0 -440
- package/dist/timepicker/index.cjs +0 -823
- package/dist/timepicker/index.d.cts +0 -215
- package/dist/timepicker/index.d.ts +0 -215
- package/dist/timepicker/index.js +0 -823
- package/dist/toolbar/index.cjs +0 -333
- package/dist/toolbar/index.d.cts +0 -100
- package/dist/toolbar/index.d.ts +0 -100
- package/dist/toolbar/index.js +0 -333
- package/dist/typography/index.cjs +0 -238
- package/dist/typography/index.d.cts +0 -113
- package/dist/typography/index.d.ts +0 -113
- package/dist/typography/index.js +0 -238
- package/dist/view/index.cjs +0 -1361
- package/dist/view/index.d.cts +0 -833
- package/dist/view/index.d.ts +0 -833
- package/dist/view/index.js +0 -1361
package/dist/card/index.js
DELETED
|
@@ -1,338 +0,0 @@
|
|
|
1
|
-
import "../chunk-SHBDANQN.js";
|
|
2
|
-
import {
|
|
3
|
-
useBorderRadiusStyles,
|
|
4
|
-
useXUITheme
|
|
5
|
-
} from "../chunk-RBSA4NH4.js";
|
|
6
|
-
|
|
7
|
-
// src/components/card/card.tsx
|
|
8
|
-
import React from "react";
|
|
9
|
-
import { Animated, Pressable, Text, View } from "react-native";
|
|
10
|
-
|
|
11
|
-
// src/components/card/card.style.ts
|
|
12
|
-
import { StyleSheet } from "react-native";
|
|
13
|
-
var styles = StyleSheet.create({
|
|
14
|
-
card: {
|
|
15
|
-
overflow: "hidden",
|
|
16
|
-
borderWidth: 1
|
|
17
|
-
},
|
|
18
|
-
fullWidth: {
|
|
19
|
-
flexShrink: 1,
|
|
20
|
-
flexBasis: "auto",
|
|
21
|
-
width: "100%"
|
|
22
|
-
},
|
|
23
|
-
disabled: {
|
|
24
|
-
opacity: 0.55
|
|
25
|
-
},
|
|
26
|
-
header: {
|
|
27
|
-
flexDirection: "row",
|
|
28
|
-
alignItems: "center",
|
|
29
|
-
gap: 12,
|
|
30
|
-
paddingHorizontal: 16,
|
|
31
|
-
paddingTop: 14,
|
|
32
|
-
paddingBottom: 10
|
|
33
|
-
},
|
|
34
|
-
body: {
|
|
35
|
-
paddingHorizontal: 16,
|
|
36
|
-
paddingVertical: 12
|
|
37
|
-
},
|
|
38
|
-
footer: {
|
|
39
|
-
flexDirection: "row",
|
|
40
|
-
alignItems: "center",
|
|
41
|
-
gap: 12,
|
|
42
|
-
paddingHorizontal: 16,
|
|
43
|
-
paddingTop: 10,
|
|
44
|
-
paddingBottom: 14
|
|
45
|
-
},
|
|
46
|
-
title: {
|
|
47
|
-
fontSize: 16,
|
|
48
|
-
fontWeight: "600",
|
|
49
|
-
includeFontPadding: false
|
|
50
|
-
},
|
|
51
|
-
description: {
|
|
52
|
-
fontSize: 14,
|
|
53
|
-
lineHeight: 20,
|
|
54
|
-
includeFontPadding: false
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
// src/components/card/card.hook.ts
|
|
59
|
-
import { useMemo } from "react";
|
|
60
|
-
import { getSafeThemeColor, withOpacity } from "@xaui/core";
|
|
61
|
-
var useCardContainerStyles = (themeColor, isBlurred) => {
|
|
62
|
-
const theme = useXUITheme();
|
|
63
|
-
return useMemo(() => {
|
|
64
|
-
const safeThemeColor = getSafeThemeColor(themeColor);
|
|
65
|
-
const colorScheme = theme.colors[safeThemeColor];
|
|
66
|
-
const isDefaultThemeColor = safeThemeColor === "default";
|
|
67
|
-
const defaultBackgroundColor = theme.mode === "dark" ? theme.colors.default.container : "#FFFFFF";
|
|
68
|
-
return {
|
|
69
|
-
backgroundColor: isBlurred ? theme.mode === "dark" ? "rgba(24, 24, 27, 0.82)" : "rgba(255, 255, 255, 0.82)" : isDefaultThemeColor ? defaultBackgroundColor : colorScheme.container,
|
|
70
|
-
borderColor: withOpacity(colorScheme.main, 0.05)
|
|
71
|
-
};
|
|
72
|
-
}, [isBlurred, theme, themeColor]);
|
|
73
|
-
};
|
|
74
|
-
var useCardElevationStyles = (elevation = 0) => {
|
|
75
|
-
const theme = useXUITheme();
|
|
76
|
-
return useMemo(() => {
|
|
77
|
-
const shadowStyles = elevation === 0 ? {} : elevation === 1 ? theme.shadows.sm : elevation === 2 ? theme.shadows.md : elevation === 3 ? theme.shadows.lg : theme.shadows.xl;
|
|
78
|
-
return {
|
|
79
|
-
...shadowStyles,
|
|
80
|
-
...elevation > 0 ? { elevation } : {}
|
|
81
|
-
};
|
|
82
|
-
}, [elevation, theme]);
|
|
83
|
-
};
|
|
84
|
-
var useCardTextStyles = (themeColor) => {
|
|
85
|
-
const theme = useXUITheme();
|
|
86
|
-
return useMemo(() => {
|
|
87
|
-
const safeThemeColor = getSafeThemeColor(themeColor);
|
|
88
|
-
const colorScheme = theme.colors[safeThemeColor];
|
|
89
|
-
return {
|
|
90
|
-
titleColor: colorScheme.main,
|
|
91
|
-
descriptionColor: theme.mode === "dark" ? withOpacity(theme.colors.foreground, 0.8) : withOpacity(theme.colors.foreground, 0.72)
|
|
92
|
-
};
|
|
93
|
-
}, [theme, themeColor]);
|
|
94
|
-
};
|
|
95
|
-
var useCardFooterStyles = (themeColor, isFooterBlurred) => {
|
|
96
|
-
const theme = useXUITheme();
|
|
97
|
-
return useMemo(() => {
|
|
98
|
-
const safeThemeColor = getSafeThemeColor(themeColor);
|
|
99
|
-
const colorScheme = theme.colors[safeThemeColor];
|
|
100
|
-
if (!isFooterBlurred) {
|
|
101
|
-
return {};
|
|
102
|
-
}
|
|
103
|
-
return {
|
|
104
|
-
backgroundColor: theme.mode === "dark" ? "rgba(24, 24, 27, 0.68)" : "rgba(255, 255, 255, 0.72)",
|
|
105
|
-
borderTopWidth: theme.borderWidth.sm,
|
|
106
|
-
borderTopColor: theme.mode === "dark" ? withOpacity(colorScheme.main, 0.4) : withOpacity(colorScheme.main, 0.18)
|
|
107
|
-
};
|
|
108
|
-
}, [isFooterBlurred, theme, themeColor]);
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
// src/components/card/card.tsx
|
|
112
|
-
var CardContext = React.createContext({
|
|
113
|
-
themeColor: "default",
|
|
114
|
-
isFooterBlurred: false
|
|
115
|
-
});
|
|
116
|
-
var Card = ({
|
|
117
|
-
children,
|
|
118
|
-
themeColor = "default",
|
|
119
|
-
radius = "lg",
|
|
120
|
-
padding = 16,
|
|
121
|
-
elevation = 0,
|
|
122
|
-
fullWidth = false,
|
|
123
|
-
isHoverable = false,
|
|
124
|
-
isPressable = false,
|
|
125
|
-
isBlurred = false,
|
|
126
|
-
isFooterBlurred = false,
|
|
127
|
-
isDisabled = false,
|
|
128
|
-
disableAnimation = false,
|
|
129
|
-
disableRipple: _disableRipple = false,
|
|
130
|
-
allowTextSelectionOnPress: _allowTextSelectionOnPress = false,
|
|
131
|
-
customAppearance,
|
|
132
|
-
onPress,
|
|
133
|
-
onLongPress,
|
|
134
|
-
onPressIn,
|
|
135
|
-
onPressOut
|
|
136
|
-
}) => {
|
|
137
|
-
const animatedScale = React.useRef(new Animated.Value(1)).current;
|
|
138
|
-
const animatedOpacity = React.useRef(new Animated.Value(1)).current;
|
|
139
|
-
const radiusStyles = useBorderRadiusStyles(radius);
|
|
140
|
-
const containerStyles = useCardContainerStyles(themeColor, isBlurred);
|
|
141
|
-
const elevationStyles = useCardElevationStyles(elevation);
|
|
142
|
-
const contextValue = React.useMemo(
|
|
143
|
-
() => ({
|
|
144
|
-
themeColor,
|
|
145
|
-
isFooterBlurred,
|
|
146
|
-
customAppearance
|
|
147
|
-
}),
|
|
148
|
-
[customAppearance, isFooterBlurred, themeColor]
|
|
149
|
-
);
|
|
150
|
-
const animateTo = React.useCallback(
|
|
151
|
-
(scale, opacity, duration) => {
|
|
152
|
-
if (disableAnimation) {
|
|
153
|
-
animatedScale.setValue(scale);
|
|
154
|
-
animatedOpacity.setValue(opacity);
|
|
155
|
-
return;
|
|
156
|
-
}
|
|
157
|
-
Animated.parallel([
|
|
158
|
-
Animated.timing(animatedScale, {
|
|
159
|
-
toValue: scale,
|
|
160
|
-
duration,
|
|
161
|
-
useNativeDriver: true
|
|
162
|
-
}),
|
|
163
|
-
Animated.timing(animatedOpacity, {
|
|
164
|
-
toValue: opacity,
|
|
165
|
-
duration,
|
|
166
|
-
useNativeDriver: true
|
|
167
|
-
})
|
|
168
|
-
]).start();
|
|
169
|
-
},
|
|
170
|
-
[animatedOpacity, animatedScale, disableAnimation]
|
|
171
|
-
);
|
|
172
|
-
const handlePressIn = React.useCallback(
|
|
173
|
-
(event) => {
|
|
174
|
-
if (!isDisabled && isPressable) {
|
|
175
|
-
animateTo(0.985, 0.95, 110);
|
|
176
|
-
}
|
|
177
|
-
onPressIn?.(event);
|
|
178
|
-
},
|
|
179
|
-
[animateTo, isDisabled, isPressable, onPressIn]
|
|
180
|
-
);
|
|
181
|
-
const handlePressOut = React.useCallback(
|
|
182
|
-
(event) => {
|
|
183
|
-
if (!isDisabled && isPressable) {
|
|
184
|
-
animateTo(1, 1, 140);
|
|
185
|
-
}
|
|
186
|
-
onPressOut?.(event);
|
|
187
|
-
},
|
|
188
|
-
[animateTo, isDisabled, isPressable, onPressOut]
|
|
189
|
-
);
|
|
190
|
-
const handleHoverIn = React.useCallback(() => {
|
|
191
|
-
if (!isDisabled && isHoverable && !isPressable) {
|
|
192
|
-
animateTo(1.01, 1, 130);
|
|
193
|
-
}
|
|
194
|
-
}, [animateTo, isDisabled, isHoverable, isPressable]);
|
|
195
|
-
const handleHoverOut = React.useCallback(() => {
|
|
196
|
-
if (!isDisabled && isHoverable && !isPressable) {
|
|
197
|
-
animateTo(1, 1, 130);
|
|
198
|
-
}
|
|
199
|
-
}, [animateTo, isDisabled, isHoverable, isPressable]);
|
|
200
|
-
const cardContent = /* @__PURE__ */ React.createElement(
|
|
201
|
-
Animated.View,
|
|
202
|
-
{
|
|
203
|
-
style: [
|
|
204
|
-
styles.card,
|
|
205
|
-
radiusStyles,
|
|
206
|
-
containerStyles,
|
|
207
|
-
elevationStyles,
|
|
208
|
-
fullWidth && styles.fullWidth,
|
|
209
|
-
isDisabled && styles.disabled,
|
|
210
|
-
{
|
|
211
|
-
padding,
|
|
212
|
-
transform: [{ scale: animatedScale }],
|
|
213
|
-
opacity: animatedOpacity
|
|
214
|
-
},
|
|
215
|
-
customAppearance?.container
|
|
216
|
-
]
|
|
217
|
-
},
|
|
218
|
-
/* @__PURE__ */ React.createElement(CardContext.Provider, { value: contextValue }, children)
|
|
219
|
-
);
|
|
220
|
-
if (!isPressable) {
|
|
221
|
-
return cardContent;
|
|
222
|
-
}
|
|
223
|
-
return /* @__PURE__ */ React.createElement(
|
|
224
|
-
Pressable,
|
|
225
|
-
{
|
|
226
|
-
onPress: isDisabled ? void 0 : onPress,
|
|
227
|
-
onLongPress: isDisabled ? void 0 : onLongPress,
|
|
228
|
-
onPressIn: handlePressIn,
|
|
229
|
-
onPressOut: handlePressOut,
|
|
230
|
-
onHoverIn: isHoverable ? handleHoverIn : void 0,
|
|
231
|
-
onHoverOut: isHoverable ? handleHoverOut : void 0,
|
|
232
|
-
disabled: isDisabled
|
|
233
|
-
},
|
|
234
|
-
cardContent
|
|
235
|
-
);
|
|
236
|
-
};
|
|
237
|
-
var CardHeader = ({
|
|
238
|
-
children,
|
|
239
|
-
customAppearance
|
|
240
|
-
}) => {
|
|
241
|
-
const cardContext = React.useContext(CardContext);
|
|
242
|
-
return /* @__PURE__ */ React.createElement(
|
|
243
|
-
View,
|
|
244
|
-
{
|
|
245
|
-
style: [
|
|
246
|
-
styles.header,
|
|
247
|
-
cardContext.customAppearance?.header,
|
|
248
|
-
customAppearance?.container
|
|
249
|
-
]
|
|
250
|
-
},
|
|
251
|
-
children
|
|
252
|
-
);
|
|
253
|
-
};
|
|
254
|
-
var CardBody = ({
|
|
255
|
-
children,
|
|
256
|
-
customAppearance
|
|
257
|
-
}) => {
|
|
258
|
-
const cardContext = React.useContext(CardContext);
|
|
259
|
-
return /* @__PURE__ */ React.createElement(
|
|
260
|
-
View,
|
|
261
|
-
{
|
|
262
|
-
style: [
|
|
263
|
-
styles.body,
|
|
264
|
-
cardContext.customAppearance?.body,
|
|
265
|
-
customAppearance?.container
|
|
266
|
-
]
|
|
267
|
-
},
|
|
268
|
-
children
|
|
269
|
-
);
|
|
270
|
-
};
|
|
271
|
-
var CardFooter = ({
|
|
272
|
-
children,
|
|
273
|
-
customAppearance
|
|
274
|
-
}) => {
|
|
275
|
-
const cardContext = React.useContext(CardContext);
|
|
276
|
-
const footerStyles = useCardFooterStyles(
|
|
277
|
-
cardContext.themeColor,
|
|
278
|
-
cardContext.isFooterBlurred
|
|
279
|
-
);
|
|
280
|
-
return /* @__PURE__ */ React.createElement(
|
|
281
|
-
View,
|
|
282
|
-
{
|
|
283
|
-
style: [
|
|
284
|
-
styles.footer,
|
|
285
|
-
footerStyles,
|
|
286
|
-
cardContext.customAppearance?.footer,
|
|
287
|
-
customAppearance?.container
|
|
288
|
-
]
|
|
289
|
-
},
|
|
290
|
-
children
|
|
291
|
-
);
|
|
292
|
-
};
|
|
293
|
-
var CardTitle = ({
|
|
294
|
-
children,
|
|
295
|
-
customAppearance
|
|
296
|
-
}) => {
|
|
297
|
-
const cardContext = React.useContext(CardContext);
|
|
298
|
-
const { titleColor } = useCardTextStyles(cardContext.themeColor);
|
|
299
|
-
return /* @__PURE__ */ React.createElement(
|
|
300
|
-
Text,
|
|
301
|
-
{
|
|
302
|
-
style: [
|
|
303
|
-
styles.title,
|
|
304
|
-
{ color: titleColor },
|
|
305
|
-
cardContext.customAppearance?.title,
|
|
306
|
-
customAppearance?.text
|
|
307
|
-
]
|
|
308
|
-
},
|
|
309
|
-
children
|
|
310
|
-
);
|
|
311
|
-
};
|
|
312
|
-
var CardDescription = ({
|
|
313
|
-
children,
|
|
314
|
-
customAppearance
|
|
315
|
-
}) => {
|
|
316
|
-
const cardContext = React.useContext(CardContext);
|
|
317
|
-
const { descriptionColor } = useCardTextStyles(cardContext.themeColor);
|
|
318
|
-
return /* @__PURE__ */ React.createElement(
|
|
319
|
-
Text,
|
|
320
|
-
{
|
|
321
|
-
style: [
|
|
322
|
-
styles.description,
|
|
323
|
-
{ color: descriptionColor },
|
|
324
|
-
cardContext.customAppearance?.description,
|
|
325
|
-
customAppearance?.text
|
|
326
|
-
]
|
|
327
|
-
},
|
|
328
|
-
children
|
|
329
|
-
);
|
|
330
|
-
};
|
|
331
|
-
export {
|
|
332
|
-
Card,
|
|
333
|
-
CardBody,
|
|
334
|
-
CardDescription,
|
|
335
|
-
CardFooter,
|
|
336
|
-
CardHeader,
|
|
337
|
-
CardTitle
|
|
338
|
-
};
|
package/dist/carousel/index.cjs
DELETED
|
@@ -1,381 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
-
|
|
3
|
-
var _chunk7UFBLUMVcjs = require('../chunk-7UFBLUMV.cjs');
|
|
4
|
-
|
|
5
|
-
// src/components/carousel/carousel.tsx
|
|
6
|
-
var _react = require('react'); var _react2 = _interopRequireDefault(_react);
|
|
7
|
-
var _reactnative = require('react-native');
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var _reactnativereanimated = require('react-native-reanimated'); var _reactnativereanimated2 = _interopRequireDefault(_reactnativereanimated);
|
|
13
|
-
|
|
14
|
-
// src/components/carousel/carousel.style.ts
|
|
15
|
-
|
|
16
|
-
var styles = _reactnative.StyleSheet.create({
|
|
17
|
-
scrollContent: {
|
|
18
|
-
flexDirection: "row",
|
|
19
|
-
alignItems: "center"
|
|
20
|
-
},
|
|
21
|
-
item: {
|
|
22
|
-
overflow: "hidden"
|
|
23
|
-
},
|
|
24
|
-
indicatorContainer: {
|
|
25
|
-
flexDirection: "row",
|
|
26
|
-
justifyContent: "center",
|
|
27
|
-
alignItems: "center",
|
|
28
|
-
paddingVertical: 12,
|
|
29
|
-
gap: 8
|
|
30
|
-
},
|
|
31
|
-
indicator: {
|
|
32
|
-
width: 8,
|
|
33
|
-
height: 8,
|
|
34
|
-
borderRadius: 4,
|
|
35
|
-
backgroundColor: "#CAC4D0"
|
|
36
|
-
},
|
|
37
|
-
activeIndicator: {
|
|
38
|
-
width: 24,
|
|
39
|
-
borderRadius: 4,
|
|
40
|
-
backgroundColor: "#49454F"
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
// src/components/carousel/carousel.hook.ts
|
|
45
|
-
|
|
46
|
-
var HERO_PEEK_WIDTH = 56;
|
|
47
|
-
function computeMultiBrowseLayout(config) {
|
|
48
|
-
const { preferredItemWidth, itemSpacing } = config;
|
|
49
|
-
return {
|
|
50
|
-
computedItemWidth: preferredItemWidth,
|
|
51
|
-
snapInterval: preferredItemWidth + itemSpacing,
|
|
52
|
-
pagingEnabled: false
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
function computeUncontainedLayout(config) {
|
|
56
|
-
const { preferredItemWidth, itemSpacing } = config;
|
|
57
|
-
return {
|
|
58
|
-
computedItemWidth: preferredItemWidth,
|
|
59
|
-
snapInterval: preferredItemWidth + itemSpacing,
|
|
60
|
-
pagingEnabled: false
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
function computeHeroLayout(config) {
|
|
64
|
-
const { containerWidth, contentPadding, itemSpacing } = config;
|
|
65
|
-
const availableWidth = containerWidth - 2 * contentPadding;
|
|
66
|
-
const largeItemWidth = availableWidth - HERO_PEEK_WIDTH - itemSpacing;
|
|
67
|
-
return {
|
|
68
|
-
computedItemWidth: Math.max(largeItemWidth, 0),
|
|
69
|
-
snapInterval: Math.max(largeItemWidth + itemSpacing, 1),
|
|
70
|
-
pagingEnabled: false
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
function computeFullScreenLayout(config) {
|
|
74
|
-
const { containerWidth } = config;
|
|
75
|
-
return {
|
|
76
|
-
computedItemWidth: containerWidth,
|
|
77
|
-
snapInterval: containerWidth,
|
|
78
|
-
pagingEnabled: true
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
function useCarouselLayout(config) {
|
|
82
|
-
return _react.useMemo.call(void 0, () => {
|
|
83
|
-
const layoutMap = {
|
|
84
|
-
"multi-browse": computeMultiBrowseLayout,
|
|
85
|
-
uncontained: computeUncontainedLayout,
|
|
86
|
-
hero: computeHeroLayout,
|
|
87
|
-
"full-screen": computeFullScreenLayout
|
|
88
|
-
};
|
|
89
|
-
const compute = _nullishCoalesce(layoutMap[config.layout], () => ( computeMultiBrowseLayout));
|
|
90
|
-
return compute(config);
|
|
91
|
-
}, [
|
|
92
|
-
config.layout,
|
|
93
|
-
config.containerWidth,
|
|
94
|
-
config.preferredItemWidth,
|
|
95
|
-
config.itemSpacing,
|
|
96
|
-
config.contentPadding
|
|
97
|
-
]);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// src/components/carousel/carousel-item.tsx
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
var CarouselItem = ({
|
|
104
|
-
children,
|
|
105
|
-
width,
|
|
106
|
-
height,
|
|
107
|
-
radius,
|
|
108
|
-
spacing,
|
|
109
|
-
isLast,
|
|
110
|
-
customStyle
|
|
111
|
-
}) => /* @__PURE__ */ _react2.default.createElement(
|
|
112
|
-
_reactnative.View,
|
|
113
|
-
{
|
|
114
|
-
style: [
|
|
115
|
-
styles.item,
|
|
116
|
-
{
|
|
117
|
-
width,
|
|
118
|
-
height,
|
|
119
|
-
borderRadius: radius,
|
|
120
|
-
marginRight: isLast ? 0 : spacing
|
|
121
|
-
},
|
|
122
|
-
customStyle
|
|
123
|
-
]
|
|
124
|
-
},
|
|
125
|
-
children
|
|
126
|
-
);
|
|
127
|
-
|
|
128
|
-
// src/components/carousel/animated-carousel-item.tsx
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
var AnimatedCarouselItem = ({
|
|
136
|
-
children,
|
|
137
|
-
index,
|
|
138
|
-
scrollX,
|
|
139
|
-
width,
|
|
140
|
-
height,
|
|
141
|
-
radius,
|
|
142
|
-
spacing,
|
|
143
|
-
isLast,
|
|
144
|
-
customStyle,
|
|
145
|
-
layout,
|
|
146
|
-
snapInterval,
|
|
147
|
-
containerWidth,
|
|
148
|
-
contentPadding
|
|
149
|
-
}) => {
|
|
150
|
-
const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, () => {
|
|
151
|
-
const inputRange = [
|
|
152
|
-
(index - 1) * snapInterval,
|
|
153
|
-
index * snapInterval,
|
|
154
|
-
(index + 1) * snapInterval
|
|
155
|
-
];
|
|
156
|
-
if (layout === "multi-browse") {
|
|
157
|
-
const scale = _reactnativereanimated.interpolate.call(void 0,
|
|
158
|
-
scrollX.value,
|
|
159
|
-
inputRange,
|
|
160
|
-
[0.85, 1, 0.85],
|
|
161
|
-
_reactnativereanimated.Extrapolation.CLAMP
|
|
162
|
-
);
|
|
163
|
-
const opacity = _reactnativereanimated.interpolate.call(void 0,
|
|
164
|
-
scrollX.value,
|
|
165
|
-
inputRange,
|
|
166
|
-
[0.6, 1, 0.6],
|
|
167
|
-
_reactnativereanimated.Extrapolation.CLAMP
|
|
168
|
-
);
|
|
169
|
-
return {
|
|
170
|
-
transform: [{ scale }],
|
|
171
|
-
opacity
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
if (layout === "hero") {
|
|
175
|
-
const centerOffset = containerWidth / 2 - contentPadding - width / 2;
|
|
176
|
-
const itemPosition = index * snapInterval + contentPadding;
|
|
177
|
-
const inputRangeHero = [
|
|
178
|
-
itemPosition - centerOffset - snapInterval,
|
|
179
|
-
itemPosition - centerOffset,
|
|
180
|
-
itemPosition - centerOffset + snapInterval
|
|
181
|
-
];
|
|
182
|
-
const scale = _reactnativereanimated.interpolate.call(void 0,
|
|
183
|
-
scrollX.value,
|
|
184
|
-
inputRangeHero,
|
|
185
|
-
[0.9, 1, 0.9],
|
|
186
|
-
_reactnativereanimated.Extrapolation.CLAMP
|
|
187
|
-
);
|
|
188
|
-
const opacity = _reactnativereanimated.interpolate.call(void 0,
|
|
189
|
-
scrollX.value,
|
|
190
|
-
inputRangeHero,
|
|
191
|
-
[0.5, 1, 0.5],
|
|
192
|
-
_reactnativereanimated.Extrapolation.CLAMP
|
|
193
|
-
);
|
|
194
|
-
const translateX = _reactnativereanimated.interpolate.call(void 0,
|
|
195
|
-
scrollX.value,
|
|
196
|
-
inputRangeHero,
|
|
197
|
-
[-10, 0, 10],
|
|
198
|
-
_reactnativereanimated.Extrapolation.CLAMP
|
|
199
|
-
);
|
|
200
|
-
return {
|
|
201
|
-
transform: [{ scale }, { translateX }],
|
|
202
|
-
opacity
|
|
203
|
-
};
|
|
204
|
-
}
|
|
205
|
-
return {};
|
|
206
|
-
}, [index, snapInterval, layout, containerWidth, contentPadding, width]);
|
|
207
|
-
return /* @__PURE__ */ _react2.default.createElement(
|
|
208
|
-
_reactnativereanimated2.default.View,
|
|
209
|
-
{
|
|
210
|
-
style: [
|
|
211
|
-
styles.item,
|
|
212
|
-
{
|
|
213
|
-
width,
|
|
214
|
-
height,
|
|
215
|
-
borderRadius: radius,
|
|
216
|
-
marginRight: isLast ? 0 : spacing
|
|
217
|
-
},
|
|
218
|
-
customStyle,
|
|
219
|
-
animatedStyle
|
|
220
|
-
]
|
|
221
|
-
},
|
|
222
|
-
children
|
|
223
|
-
);
|
|
224
|
-
};
|
|
225
|
-
|
|
226
|
-
// src/components/carousel/carousel.tsx
|
|
227
|
-
var DEFAULT_ITEM_WIDTH = 196;
|
|
228
|
-
var DEFAULT_ITEM_HEIGHT = 205;
|
|
229
|
-
var DEFAULT_ITEM_SPACING = 8;
|
|
230
|
-
var DEFAULT_ITEM_SPACING_MULTI_BROWSE = 4;
|
|
231
|
-
var DEFAULT_CONTENT_PADDING = 16;
|
|
232
|
-
var DEFAULT_AUTO_PLAY_INTERVAL = 3e3;
|
|
233
|
-
function Carousel({
|
|
234
|
-
data,
|
|
235
|
-
renderItem,
|
|
236
|
-
keyExtractor,
|
|
237
|
-
layout = "multi-browse",
|
|
238
|
-
itemWidth = DEFAULT_ITEM_WIDTH,
|
|
239
|
-
itemHeight = DEFAULT_ITEM_HEIGHT,
|
|
240
|
-
itemSpacing,
|
|
241
|
-
contentPadding = DEFAULT_CONTENT_PADDING,
|
|
242
|
-
radius = "lg",
|
|
243
|
-
showIndicator = false,
|
|
244
|
-
autoPlay = false,
|
|
245
|
-
autoPlayInterval = DEFAULT_AUTO_PLAY_INTERVAL,
|
|
246
|
-
initialIndex = 0,
|
|
247
|
-
onActiveItemChange,
|
|
248
|
-
customAppearance
|
|
249
|
-
}) {
|
|
250
|
-
const [containerWidth, setContainerWidth] = _react.useState.call(void 0, 0);
|
|
251
|
-
const [activeIndex, setActiveIndex] = _react.useState.call(void 0, initialIndex);
|
|
252
|
-
const scrollRef = _reactnativereanimated.useAnimatedRef.call(void 0, );
|
|
253
|
-
const onActiveItemChangeRef = _react.useRef.call(void 0, onActiveItemChange);
|
|
254
|
-
onActiveItemChangeRef.current = onActiveItemChange;
|
|
255
|
-
const scrollX = _reactnativereanimated.useSharedValue.call(void 0, 0);
|
|
256
|
-
const { borderRadius } = _chunk7UFBLUMVcjs.useBorderRadiusStyles.call(void 0, radius);
|
|
257
|
-
const defaultSpacing = layout === "multi-browse" ? DEFAULT_ITEM_SPACING_MULTI_BROWSE : DEFAULT_ITEM_SPACING;
|
|
258
|
-
const resolvedSpacing = _nullishCoalesce(itemSpacing, () => ( defaultSpacing));
|
|
259
|
-
const isFullScreen = layout === "full-screen";
|
|
260
|
-
const effectivePadding = isFullScreen ? 0 : contentPadding;
|
|
261
|
-
const effectiveSpacing = isFullScreen ? 0 : resolvedSpacing;
|
|
262
|
-
const { computedItemWidth, snapInterval, pagingEnabled } = useCarouselLayout({
|
|
263
|
-
layout,
|
|
264
|
-
containerWidth,
|
|
265
|
-
preferredItemWidth: itemWidth,
|
|
266
|
-
itemSpacing: effectiveSpacing,
|
|
267
|
-
contentPadding: effectivePadding
|
|
268
|
-
});
|
|
269
|
-
const handleLayout = _react.useCallback.call(void 0, (event) => {
|
|
270
|
-
setContainerWidth(event.nativeEvent.layout.width);
|
|
271
|
-
}, []);
|
|
272
|
-
const scrollHandler = _reactnativereanimated.useAnimatedScrollHandler.call(void 0, {
|
|
273
|
-
onScroll: (event) => {
|
|
274
|
-
scrollX.value = event.contentOffset.x;
|
|
275
|
-
}
|
|
276
|
-
});
|
|
277
|
-
const handleMomentumScrollEnd = _react.useCallback.call(void 0,
|
|
278
|
-
(event) => {
|
|
279
|
-
if (snapInterval <= 0) return;
|
|
280
|
-
const offsetX = event.nativeEvent.contentOffset.x;
|
|
281
|
-
const newIndex = Math.round(offsetX / snapInterval);
|
|
282
|
-
const clampedIndex = Math.max(0, Math.min(newIndex, data.length - 1));
|
|
283
|
-
setActiveIndex(clampedIndex);
|
|
284
|
-
_optionalChain([onActiveItemChangeRef, 'access', _2 => _2.current, 'optionalCall', _3 => _3(clampedIndex)]);
|
|
285
|
-
},
|
|
286
|
-
[snapInterval, data.length]
|
|
287
|
-
);
|
|
288
|
-
_react.useEffect.call(void 0, () => {
|
|
289
|
-
if (!autoPlay || data.length <= 1) return;
|
|
290
|
-
if (containerWidth <= 0 || snapInterval <= 0) return;
|
|
291
|
-
const timer = setInterval(() => {
|
|
292
|
-
setActiveIndex((prev) => {
|
|
293
|
-
const nextIndex = (prev + 1) % data.length;
|
|
294
|
-
_optionalChain([scrollRef, 'access', _4 => _4.current, 'optionalAccess', _5 => _5.scrollTo, 'call', _6 => _6({ x: nextIndex * snapInterval, animated: true })]);
|
|
295
|
-
_optionalChain([onActiveItemChangeRef, 'access', _7 => _7.current, 'optionalCall', _8 => _8(nextIndex)]);
|
|
296
|
-
return nextIndex;
|
|
297
|
-
});
|
|
298
|
-
}, autoPlayInterval);
|
|
299
|
-
return () => clearInterval(timer);
|
|
300
|
-
}, [autoPlay, autoPlayInterval, data.length, snapInterval, containerWidth]);
|
|
301
|
-
if (containerWidth <= 0) {
|
|
302
|
-
return /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: _optionalChain([customAppearance, 'optionalAccess', _9 => _9.container]), onLayout: handleLayout });
|
|
303
|
-
}
|
|
304
|
-
const shouldAnimate = layout === "multi-browse" || layout === "hero";
|
|
305
|
-
return /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: _optionalChain([customAppearance, 'optionalAccess', _10 => _10.container]), onLayout: handleLayout }, /* @__PURE__ */ _react2.default.createElement(
|
|
306
|
-
_reactnativereanimated2.default.ScrollView,
|
|
307
|
-
{
|
|
308
|
-
ref: scrollRef,
|
|
309
|
-
horizontal: true,
|
|
310
|
-
showsHorizontalScrollIndicator: false,
|
|
311
|
-
snapToInterval: pagingEnabled ? void 0 : snapInterval,
|
|
312
|
-
pagingEnabled,
|
|
313
|
-
decelerationRate: "fast",
|
|
314
|
-
contentContainerStyle: [
|
|
315
|
-
styles.scrollContent,
|
|
316
|
-
{ paddingHorizontal: effectivePadding }
|
|
317
|
-
],
|
|
318
|
-
onScroll: scrollHandler,
|
|
319
|
-
scrollEventThrottle: 16,
|
|
320
|
-
onMomentumScrollEnd: handleMomentumScrollEnd,
|
|
321
|
-
contentOffset: { x: initialIndex * snapInterval, y: 0 }
|
|
322
|
-
},
|
|
323
|
-
data.map((item, index) => {
|
|
324
|
-
const content = renderItem({ item, index });
|
|
325
|
-
if (shouldAnimate) {
|
|
326
|
-
return /* @__PURE__ */ _react2.default.createElement(
|
|
327
|
-
AnimatedCarouselItem,
|
|
328
|
-
{
|
|
329
|
-
key: keyExtractor ? keyExtractor(item, index) : String(index),
|
|
330
|
-
index,
|
|
331
|
-
scrollX,
|
|
332
|
-
width: computedItemWidth,
|
|
333
|
-
height: itemHeight,
|
|
334
|
-
radius: borderRadius,
|
|
335
|
-
spacing: effectiveSpacing,
|
|
336
|
-
isLast: index === data.length - 1,
|
|
337
|
-
customStyle: _optionalChain([customAppearance, 'optionalAccess', _11 => _11.item]),
|
|
338
|
-
layout,
|
|
339
|
-
snapInterval,
|
|
340
|
-
containerWidth,
|
|
341
|
-
contentPadding: effectivePadding
|
|
342
|
-
},
|
|
343
|
-
content
|
|
344
|
-
);
|
|
345
|
-
}
|
|
346
|
-
return /* @__PURE__ */ _react2.default.createElement(
|
|
347
|
-
CarouselItem,
|
|
348
|
-
{
|
|
349
|
-
key: keyExtractor ? keyExtractor(item, index) : String(index),
|
|
350
|
-
width: computedItemWidth,
|
|
351
|
-
height: itemHeight,
|
|
352
|
-
radius: borderRadius,
|
|
353
|
-
spacing: effectiveSpacing,
|
|
354
|
-
isLast: index === data.length - 1,
|
|
355
|
-
customStyle: _optionalChain([customAppearance, 'optionalAccess', _12 => _12.item])
|
|
356
|
-
},
|
|
357
|
-
content
|
|
358
|
-
);
|
|
359
|
-
})
|
|
360
|
-
), showIndicator && data.length > 1 && /* @__PURE__ */ _react2.default.createElement(
|
|
361
|
-
_reactnative.View,
|
|
362
|
-
{
|
|
363
|
-
style: [styles.indicatorContainer, _optionalChain([customAppearance, 'optionalAccess', _13 => _13.indicatorContainer])]
|
|
364
|
-
},
|
|
365
|
-
data.map((_, index) => /* @__PURE__ */ _react2.default.createElement(
|
|
366
|
-
_reactnative.View,
|
|
367
|
-
{
|
|
368
|
-
key: `indicator-${String(index)}`,
|
|
369
|
-
style: [
|
|
370
|
-
styles.indicator,
|
|
371
|
-
_optionalChain([customAppearance, 'optionalAccess', _14 => _14.indicator]),
|
|
372
|
-
activeIndex === index && styles.activeIndicator,
|
|
373
|
-
activeIndex === index && _optionalChain([customAppearance, 'optionalAccess', _15 => _15.activeIndicator])
|
|
374
|
-
]
|
|
375
|
-
}
|
|
376
|
-
))
|
|
377
|
-
));
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
exports.Carousel = Carousel;
|