@retray-dev/ui-kit 1.7.0 → 1.8.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/COMPONENTS.md +181 -34
- package/README.md +6 -5
- package/dist/index.d.mts +73 -8
- package/dist/index.d.ts +73 -8
- package/dist/index.js +385 -16
- package/dist/index.mjs +380 -17
- package/package.json +1 -1
- package/src/components/Alert/Alert.tsx +22 -10
- package/src/components/Alert/index.ts +2 -2
- package/src/components/Button/Button.tsx +11 -4
- package/src/components/Chip/Chip.tsx +142 -0
- package/src/components/Chip/index.ts +2 -0
- package/src/components/ConfirmDialog/ConfirmDialog.tsx +87 -0
- package/src/components/ConfirmDialog/index.ts +2 -0
- package/src/components/CurrencyDisplay/CurrencyDisplay.tsx +4 -2
- package/src/components/EmptyState/EmptyState.tsx +40 -6
- package/src/components/LabelValue/LabelValue.tsx +47 -0
- package/src/components/LabelValue/index.ts +2 -0
- package/src/components/ListItem/ListItem.tsx +121 -0
- package/src/components/ListItem/index.ts +2 -0
- package/src/components/MonthPicker/MonthPicker.tsx +92 -0
- package/src/components/MonthPicker/index.ts +2 -0
- package/src/components/Switch/Switch.tsx +4 -2
- package/src/index.ts +5 -0
package/dist/index.js
CHANGED
|
@@ -98,6 +98,7 @@ function ThemeProvider({ children, theme, colorScheme = "system" }) {
|
|
|
98
98
|
function useTheme() {
|
|
99
99
|
return React23.useContext(ThemeContext);
|
|
100
100
|
}
|
|
101
|
+
var nativeDriver = reactNative.Platform.OS !== "web";
|
|
101
102
|
var containerSizeStyles = {
|
|
102
103
|
sm: { paddingHorizontal: 20, paddingVertical: 12 },
|
|
103
104
|
md: { paddingHorizontal: 24, paddingVertical: 16 },
|
|
@@ -128,13 +129,13 @@ function Button({
|
|
|
128
129
|
if (isDisabled) return;
|
|
129
130
|
reactNative.Animated.spring(scale, {
|
|
130
131
|
toValue: 0.95,
|
|
131
|
-
useNativeDriver:
|
|
132
|
+
useNativeDriver: nativeDriver,
|
|
132
133
|
speed: 40,
|
|
133
134
|
bounciness: 0
|
|
134
135
|
}).start();
|
|
135
136
|
};
|
|
136
137
|
const handlePressOut = () => {
|
|
137
|
-
reactNative.Animated.spring(scale, { toValue: 1, useNativeDriver:
|
|
138
|
+
reactNative.Animated.spring(scale, { toValue: 1, useNativeDriver: nativeDriver, speed: 40, bounciness: 4 }).start();
|
|
138
139
|
};
|
|
139
140
|
const handlePress = (e) => {
|
|
140
141
|
Haptics11__namespace.impactAsync(Haptics11__namespace.ImpactFeedbackStyle.Light);
|
|
@@ -144,15 +145,17 @@ function Button({
|
|
|
144
145
|
primary: { backgroundColor: colors.primary },
|
|
145
146
|
secondary: { backgroundColor: colors.secondary },
|
|
146
147
|
outline: { backgroundColor: "transparent", borderWidth: 1.5, borderColor: colors.border },
|
|
147
|
-
ghost: { backgroundColor: "transparent" }
|
|
148
|
+
ghost: { backgroundColor: "transparent" },
|
|
149
|
+
destructive: { backgroundColor: colors.destructive }
|
|
148
150
|
}[variant];
|
|
149
151
|
const labelVariantStyle = {
|
|
150
152
|
primary: { color: colors.primaryForeground },
|
|
151
153
|
secondary: { color: colors.secondaryForeground },
|
|
152
154
|
outline: { color: colors.foreground },
|
|
153
|
-
ghost: { color: colors.foreground }
|
|
155
|
+
ghost: { color: colors.foreground },
|
|
156
|
+
destructive: { color: colors.destructiveForeground }
|
|
154
157
|
}[variant];
|
|
155
|
-
const spinnerColor = variant === "primary" || variant === "secondary" ? colors.primaryForeground : colors.foreground;
|
|
158
|
+
const spinnerColor = variant === "destructive" ? colors.destructiveForeground : variant === "primary" || variant === "secondary" ? colors.primaryForeground : colors.foreground;
|
|
156
159
|
return /* @__PURE__ */ React23__default.default.createElement(reactNative.Animated.View, { style: [fullWidth && styles.fullWidth, { transform: [{ scale }] }] }, /* @__PURE__ */ React23__default.default.createElement(
|
|
157
160
|
reactNative.TouchableOpacity,
|
|
158
161
|
{
|
|
@@ -480,12 +483,13 @@ var styles7 = reactNative.StyleSheet.create({
|
|
|
480
483
|
fontWeight: "500"
|
|
481
484
|
}
|
|
482
485
|
});
|
|
483
|
-
function
|
|
486
|
+
function AlertBanner({ title, description, variant = "default", icon, style }) {
|
|
484
487
|
const { colors } = useTheme();
|
|
485
|
-
const borderColor = variant === "destructive" ? colors.destructive : colors.border;
|
|
486
|
-
const titleColor = variant === "destructive" ? colors.destructive : colors.foreground;
|
|
487
|
-
const descColor = variant === "destructive" ? colors.destructive : colors.mutedForeground;
|
|
488
|
-
|
|
488
|
+
const borderColor = variant === "destructive" ? colors.destructive : variant === "success" ? colors.success : colors.border;
|
|
489
|
+
const titleColor = variant === "destructive" ? colors.destructive : variant === "success" ? colors.success : colors.foreground;
|
|
490
|
+
const descColor = variant === "destructive" ? colors.destructive : variant === "success" ? colors.success : colors.mutedForeground;
|
|
491
|
+
const defaultIcon = variant === "destructive" ? "\u26A0" : variant === "success" ? "\u2713" : "\u2139";
|
|
492
|
+
return /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: [styles8.container, { backgroundColor: colors.card, borderColor }, style] }, icon ? /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: styles8.icon }, icon) : /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: styles8.icon }, /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles8.defaultIcon, { color: titleColor }] }, defaultIcon)), /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: styles8.content }, title ? /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles8.title, { color: titleColor }] }, title) : null, description ? /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles8.description, { color: descColor }] }, description) : null));
|
|
489
493
|
}
|
|
490
494
|
var styles8 = reactNative.StyleSheet.create({
|
|
491
495
|
container: {
|
|
@@ -556,9 +560,39 @@ var styles9 = reactNative.StyleSheet.create({
|
|
|
556
560
|
borderRadius: 999
|
|
557
561
|
}
|
|
558
562
|
});
|
|
559
|
-
function EmptyState({ icon, title, description, action, style }) {
|
|
563
|
+
function EmptyState({ icon, title, description, action, size = "default", style }) {
|
|
560
564
|
const { colors } = useTheme();
|
|
561
|
-
|
|
565
|
+
const isCompact = size === "compact";
|
|
566
|
+
return /* @__PURE__ */ React23__default.default.createElement(
|
|
567
|
+
reactNative.View,
|
|
568
|
+
{
|
|
569
|
+
style: [
|
|
570
|
+
styles10.container,
|
|
571
|
+
isCompact && styles10.containerCompact,
|
|
572
|
+
{ borderColor: colors.border },
|
|
573
|
+
style
|
|
574
|
+
]
|
|
575
|
+
},
|
|
576
|
+
icon ? /* @__PURE__ */ React23__default.default.createElement(
|
|
577
|
+
reactNative.View,
|
|
578
|
+
{
|
|
579
|
+
style: [
|
|
580
|
+
styles10.iconWrapper,
|
|
581
|
+
isCompact && styles10.iconWrapperCompact,
|
|
582
|
+
{ backgroundColor: colors.muted }
|
|
583
|
+
]
|
|
584
|
+
},
|
|
585
|
+
icon
|
|
586
|
+
) : null,
|
|
587
|
+
/* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: styles10.textWrapper }, /* @__PURE__ */ React23__default.default.createElement(
|
|
588
|
+
reactNative.Text,
|
|
589
|
+
{
|
|
590
|
+
style: [styles10.title, isCompact && styles10.titleCompact, { color: colors.foreground }]
|
|
591
|
+
},
|
|
592
|
+
title
|
|
593
|
+
), description && !isCompact ? /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles10.description, { color: colors.mutedForeground }] }, description) : null),
|
|
594
|
+
action && !isCompact ? /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: styles10.action }, action) : null
|
|
595
|
+
);
|
|
562
596
|
}
|
|
563
597
|
var styles10 = reactNative.StyleSheet.create({
|
|
564
598
|
container: {
|
|
@@ -570,6 +604,10 @@ var styles10 = reactNative.StyleSheet.create({
|
|
|
570
604
|
padding: 32,
|
|
571
605
|
gap: 16
|
|
572
606
|
},
|
|
607
|
+
containerCompact: {
|
|
608
|
+
padding: 20,
|
|
609
|
+
gap: 10
|
|
610
|
+
},
|
|
573
611
|
iconWrapper: {
|
|
574
612
|
width: 48,
|
|
575
613
|
height: 48,
|
|
@@ -577,6 +615,11 @@ var styles10 = reactNative.StyleSheet.create({
|
|
|
577
615
|
alignItems: "center",
|
|
578
616
|
justifyContent: "center"
|
|
579
617
|
},
|
|
618
|
+
iconWrapperCompact: {
|
|
619
|
+
width: 36,
|
|
620
|
+
height: 36,
|
|
621
|
+
borderRadius: 8
|
|
622
|
+
},
|
|
580
623
|
textWrapper: {
|
|
581
624
|
alignItems: "center",
|
|
582
625
|
gap: 8,
|
|
@@ -587,6 +630,9 @@ var styles10 = reactNative.StyleSheet.create({
|
|
|
587
630
|
fontWeight: "500",
|
|
588
631
|
textAlign: "center"
|
|
589
632
|
},
|
|
633
|
+
titleCompact: {
|
|
634
|
+
fontSize: 15
|
|
635
|
+
},
|
|
590
636
|
description: {
|
|
591
637
|
fontSize: 14,
|
|
592
638
|
lineHeight: 20,
|
|
@@ -738,6 +784,7 @@ var styles12 = reactNative.StyleSheet.create({
|
|
|
738
784
|
lineHeight: 22
|
|
739
785
|
}
|
|
740
786
|
});
|
|
787
|
+
var nativeDriver2 = reactNative.Platform.OS !== "web";
|
|
741
788
|
var TRACK_WIDTH = 60;
|
|
742
789
|
var TRACK_HEIGHT = 36;
|
|
743
790
|
var THUMB_SIZE = 28;
|
|
@@ -751,7 +798,7 @@ function Switch({ checked = false, onCheckedChange, disabled, style }) {
|
|
|
751
798
|
reactNative.Animated.parallel([
|
|
752
799
|
reactNative.Animated.spring(translateX, {
|
|
753
800
|
toValue: checked ? THUMB_TRAVEL : 0,
|
|
754
|
-
useNativeDriver:
|
|
801
|
+
useNativeDriver: nativeDriver2,
|
|
755
802
|
bounciness: 4
|
|
756
803
|
}),
|
|
757
804
|
reactNative.Animated.timing(trackOpacity, {
|
|
@@ -1853,10 +1900,10 @@ function formatValue(value, prefix, showDecimals) {
|
|
|
1853
1900
|
}
|
|
1854
1901
|
return `${sign}${prefix}${intPart}`;
|
|
1855
1902
|
}
|
|
1856
|
-
function CurrencyDisplay({ value, prefix = "$", showDecimals = false, style }) {
|
|
1903
|
+
function CurrencyDisplay({ value, prefix = "$", showDecimals = false, textColor, style }) {
|
|
1857
1904
|
const { colors } = useTheme();
|
|
1858
1905
|
const formatted = formatValue(value, prefix, showDecimals);
|
|
1859
|
-
return /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: [styles22.container, style] }, /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles22.amount, { color: colors.foreground }], allowFontScaling: true }, formatted));
|
|
1906
|
+
return /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: [styles22.container, style] }, /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles22.amount, { color: textColor ?? colors.foreground }], allowFontScaling: true }, formatted));
|
|
1860
1907
|
}
|
|
1861
1908
|
var styles22 = reactNative.StyleSheet.create({
|
|
1862
1909
|
container: {},
|
|
@@ -1908,13 +1955,329 @@ function CurrencyInputLarge({
|
|
|
1908
1955
|
}
|
|
1909
1956
|
);
|
|
1910
1957
|
}
|
|
1958
|
+
var nativeDriver3 = reactNative.Platform.OS !== "web";
|
|
1959
|
+
function ListItem({ icon, title, subtitle, trailing, onPress, disabled, style }) {
|
|
1960
|
+
const { colors } = useTheme();
|
|
1961
|
+
const scale = React23.useRef(new reactNative.Animated.Value(1)).current;
|
|
1962
|
+
const handlePressIn = () => {
|
|
1963
|
+
if (!onPress || disabled) return;
|
|
1964
|
+
reactNative.Animated.spring(scale, {
|
|
1965
|
+
toValue: 0.97,
|
|
1966
|
+
useNativeDriver: nativeDriver3,
|
|
1967
|
+
speed: 40,
|
|
1968
|
+
bounciness: 0
|
|
1969
|
+
}).start();
|
|
1970
|
+
};
|
|
1971
|
+
const handlePressOut = () => {
|
|
1972
|
+
reactNative.Animated.spring(scale, {
|
|
1973
|
+
toValue: 1,
|
|
1974
|
+
useNativeDriver: nativeDriver3,
|
|
1975
|
+
speed: 40,
|
|
1976
|
+
bounciness: 4
|
|
1977
|
+
}).start();
|
|
1978
|
+
};
|
|
1979
|
+
const handlePress = () => {
|
|
1980
|
+
Haptics11__namespace.selectionAsync();
|
|
1981
|
+
onPress?.();
|
|
1982
|
+
};
|
|
1983
|
+
return /* @__PURE__ */ React23__default.default.createElement(reactNative.Animated.View, { style: [{ transform: [{ scale }] }, disabled && styles23.disabled] }, /* @__PURE__ */ React23__default.default.createElement(
|
|
1984
|
+
reactNative.TouchableOpacity,
|
|
1985
|
+
{
|
|
1986
|
+
style: [styles23.container, style],
|
|
1987
|
+
onPress: onPress ? handlePress : void 0,
|
|
1988
|
+
onPressIn: handlePressIn,
|
|
1989
|
+
onPressOut: handlePressOut,
|
|
1990
|
+
disabled,
|
|
1991
|
+
activeOpacity: 1,
|
|
1992
|
+
touchSoundDisabled: true
|
|
1993
|
+
},
|
|
1994
|
+
icon ? /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: styles23.iconWrapper }, icon) : null,
|
|
1995
|
+
/* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: styles23.content }, /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles23.title, { color: colors.foreground }], allowFontScaling: true }, title), subtitle ? /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles23.subtitle, { color: colors.mutedForeground }], allowFontScaling: true }, subtitle) : null),
|
|
1996
|
+
trailing !== void 0 ? typeof trailing === "string" ? /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles23.trailing, { color: colors.mutedForeground }], allowFontScaling: true }, trailing) : trailing : null
|
|
1997
|
+
));
|
|
1998
|
+
}
|
|
1999
|
+
var styles23 = reactNative.StyleSheet.create({
|
|
2000
|
+
container: {
|
|
2001
|
+
flexDirection: "row",
|
|
2002
|
+
alignItems: "center",
|
|
2003
|
+
paddingHorizontal: 16,
|
|
2004
|
+
paddingVertical: 14,
|
|
2005
|
+
gap: 12
|
|
2006
|
+
},
|
|
2007
|
+
iconWrapper: {
|
|
2008
|
+
alignItems: "center",
|
|
2009
|
+
justifyContent: "center"
|
|
2010
|
+
},
|
|
2011
|
+
content: {
|
|
2012
|
+
flex: 1,
|
|
2013
|
+
gap: 3
|
|
2014
|
+
},
|
|
2015
|
+
title: {
|
|
2016
|
+
fontSize: 16,
|
|
2017
|
+
fontWeight: "500",
|
|
2018
|
+
lineHeight: 22
|
|
2019
|
+
},
|
|
2020
|
+
subtitle: {
|
|
2021
|
+
fontSize: 13,
|
|
2022
|
+
lineHeight: 18
|
|
2023
|
+
},
|
|
2024
|
+
trailing: {
|
|
2025
|
+
fontSize: 15
|
|
2026
|
+
},
|
|
2027
|
+
disabled: {
|
|
2028
|
+
opacity: 0.45
|
|
2029
|
+
}
|
|
2030
|
+
});
|
|
2031
|
+
var nativeDriver4 = reactNative.Platform.OS !== "web";
|
|
2032
|
+
function Chip({ label, selected = false, onPress, style }) {
|
|
2033
|
+
const { colors } = useTheme();
|
|
2034
|
+
const scale = React23.useRef(new reactNative.Animated.Value(1)).current;
|
|
2035
|
+
const pressAnim = React23.useRef(new reactNative.Animated.Value(selected ? 1 : 0)).current;
|
|
2036
|
+
React23.useEffect(() => {
|
|
2037
|
+
reactNative.Animated.timing(pressAnim, {
|
|
2038
|
+
toValue: selected ? 1 : 0,
|
|
2039
|
+
duration: 150,
|
|
2040
|
+
easing: reactNative.Easing.out(reactNative.Easing.ease),
|
|
2041
|
+
useNativeDriver: false
|
|
2042
|
+
}).start();
|
|
2043
|
+
}, [selected, pressAnim]);
|
|
2044
|
+
const handlePressIn = () => {
|
|
2045
|
+
reactNative.Animated.spring(scale, {
|
|
2046
|
+
toValue: 0.95,
|
|
2047
|
+
useNativeDriver: nativeDriver4,
|
|
2048
|
+
speed: 40,
|
|
2049
|
+
bounciness: 0
|
|
2050
|
+
}).start();
|
|
2051
|
+
};
|
|
2052
|
+
const handlePressOut = () => {
|
|
2053
|
+
reactNative.Animated.spring(scale, {
|
|
2054
|
+
toValue: 1,
|
|
2055
|
+
useNativeDriver: nativeDriver4,
|
|
2056
|
+
speed: 40,
|
|
2057
|
+
bounciness: 4
|
|
2058
|
+
}).start();
|
|
2059
|
+
};
|
|
2060
|
+
const handlePress = () => {
|
|
2061
|
+
Haptics11__namespace.selectionAsync();
|
|
2062
|
+
onPress?.();
|
|
2063
|
+
};
|
|
2064
|
+
const backgroundColor = pressAnim.interpolate({
|
|
2065
|
+
inputRange: [0, 1],
|
|
2066
|
+
outputRange: [colors.secondary, colors.primary]
|
|
2067
|
+
});
|
|
2068
|
+
const textColor = pressAnim.interpolate({
|
|
2069
|
+
inputRange: [0, 1],
|
|
2070
|
+
outputRange: [colors.foreground, colors.primaryForeground]
|
|
2071
|
+
});
|
|
2072
|
+
const borderColor = pressAnim.interpolate({
|
|
2073
|
+
inputRange: [0, 1],
|
|
2074
|
+
outputRange: [colors.border, colors.primary]
|
|
2075
|
+
});
|
|
2076
|
+
return /* @__PURE__ */ React23__default.default.createElement(reactNative.Animated.View, { style: [styles24.wrapper, { transform: [{ scale }] }, style] }, /* @__PURE__ */ React23__default.default.createElement(
|
|
2077
|
+
reactNative.TouchableOpacity,
|
|
2078
|
+
{
|
|
2079
|
+
onPress: handlePress,
|
|
2080
|
+
onPressIn: handlePressIn,
|
|
2081
|
+
onPressOut: handlePressOut,
|
|
2082
|
+
activeOpacity: 1,
|
|
2083
|
+
touchSoundDisabled: true
|
|
2084
|
+
},
|
|
2085
|
+
/* @__PURE__ */ React23__default.default.createElement(reactNative.Animated.View, { style: [styles24.chip, { backgroundColor, borderColor }] }, /* @__PURE__ */ React23__default.default.createElement(reactNative.Animated.Text, { style: [styles24.label, { color: textColor }], allowFontScaling: true }, label))
|
|
2086
|
+
));
|
|
2087
|
+
}
|
|
2088
|
+
function ChipGroup({ options, value, onValueChange, style }) {
|
|
2089
|
+
return /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: [styles24.group, style] }, options.map((opt) => /* @__PURE__ */ React23__default.default.createElement(
|
|
2090
|
+
Chip,
|
|
2091
|
+
{
|
|
2092
|
+
key: opt.value,
|
|
2093
|
+
label: opt.label,
|
|
2094
|
+
selected: opt.value === value,
|
|
2095
|
+
onPress: () => onValueChange?.(opt.value)
|
|
2096
|
+
}
|
|
2097
|
+
)));
|
|
2098
|
+
}
|
|
2099
|
+
var styles24 = reactNative.StyleSheet.create({
|
|
2100
|
+
wrapper: {},
|
|
2101
|
+
chip: {
|
|
2102
|
+
borderRadius: 999,
|
|
2103
|
+
paddingHorizontal: 14,
|
|
2104
|
+
paddingVertical: 8,
|
|
2105
|
+
borderWidth: 1.5,
|
|
2106
|
+
alignItems: "center",
|
|
2107
|
+
justifyContent: "center"
|
|
2108
|
+
},
|
|
2109
|
+
label: {
|
|
2110
|
+
fontSize: 14,
|
|
2111
|
+
fontWeight: "500",
|
|
2112
|
+
lineHeight: 20
|
|
2113
|
+
},
|
|
2114
|
+
group: {
|
|
2115
|
+
flexDirection: "row",
|
|
2116
|
+
flexWrap: "wrap",
|
|
2117
|
+
gap: 8
|
|
2118
|
+
}
|
|
2119
|
+
});
|
|
2120
|
+
function ConfirmDialog({
|
|
2121
|
+
visible,
|
|
2122
|
+
title,
|
|
2123
|
+
description,
|
|
2124
|
+
confirmLabel = "Confirm",
|
|
2125
|
+
cancelLabel = "Cancel",
|
|
2126
|
+
confirmVariant = "primary",
|
|
2127
|
+
onConfirm,
|
|
2128
|
+
onCancel
|
|
2129
|
+
}) {
|
|
2130
|
+
const { colors } = useTheme();
|
|
2131
|
+
return /* @__PURE__ */ React23__default.default.createElement(reactNative.Modal, { visible, transparent: true, animationType: "fade", onRequestClose: onCancel }, /* @__PURE__ */ React23__default.default.createElement(reactNative.TouchableOpacity, { style: styles25.overlay, activeOpacity: 1, onPress: onCancel }, /* @__PURE__ */ React23__default.default.createElement(
|
|
2132
|
+
reactNative.View,
|
|
2133
|
+
{
|
|
2134
|
+
style: [styles25.dialog, { backgroundColor: colors.card }],
|
|
2135
|
+
onStartShouldSetResponder: () => true
|
|
2136
|
+
},
|
|
2137
|
+
/* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles25.title, { color: colors.cardForeground }], allowFontScaling: true }, title),
|
|
2138
|
+
description ? /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles25.description, { color: colors.mutedForeground }], allowFontScaling: true }, description) : null,
|
|
2139
|
+
/* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: styles25.actions }, /* @__PURE__ */ React23__default.default.createElement(Button, { label: cancelLabel, variant: "outline", fullWidth: true, onPress: onCancel }), /* @__PURE__ */ React23__default.default.createElement(Button, { label: confirmLabel, variant: confirmVariant, fullWidth: true, onPress: onConfirm }))
|
|
2140
|
+
)));
|
|
2141
|
+
}
|
|
2142
|
+
var styles25 = reactNative.StyleSheet.create({
|
|
2143
|
+
overlay: {
|
|
2144
|
+
flex: 1,
|
|
2145
|
+
backgroundColor: "rgba(0,0,0,0.5)",
|
|
2146
|
+
justifyContent: "center",
|
|
2147
|
+
alignItems: "center",
|
|
2148
|
+
padding: 24
|
|
2149
|
+
},
|
|
2150
|
+
dialog: {
|
|
2151
|
+
width: "100%",
|
|
2152
|
+
maxWidth: 400,
|
|
2153
|
+
borderRadius: 16,
|
|
2154
|
+
padding: 24,
|
|
2155
|
+
gap: 12,
|
|
2156
|
+
shadowColor: "#000",
|
|
2157
|
+
shadowOffset: { width: 0, height: 8 },
|
|
2158
|
+
shadowOpacity: 0.15,
|
|
2159
|
+
shadowRadius: 16,
|
|
2160
|
+
elevation: 8
|
|
2161
|
+
},
|
|
2162
|
+
title: {
|
|
2163
|
+
fontSize: 18,
|
|
2164
|
+
fontWeight: "600",
|
|
2165
|
+
lineHeight: 26
|
|
2166
|
+
},
|
|
2167
|
+
description: {
|
|
2168
|
+
fontSize: 15,
|
|
2169
|
+
lineHeight: 22
|
|
2170
|
+
},
|
|
2171
|
+
actions: {
|
|
2172
|
+
gap: 10,
|
|
2173
|
+
marginTop: 8
|
|
2174
|
+
}
|
|
2175
|
+
});
|
|
2176
|
+
function LabelValue({ label, value, style }) {
|
|
2177
|
+
const { colors } = useTheme();
|
|
2178
|
+
return /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: [styles26.container, style] }, /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles26.label, { color: colors.mutedForeground }], allowFontScaling: true }, label), typeof value === "string" ? /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles26.value, { color: colors.foreground }], allowFontScaling: true }, value) : value);
|
|
2179
|
+
}
|
|
2180
|
+
var styles26 = reactNative.StyleSheet.create({
|
|
2181
|
+
container: {
|
|
2182
|
+
flexDirection: "row",
|
|
2183
|
+
justifyContent: "space-between",
|
|
2184
|
+
alignItems: "center",
|
|
2185
|
+
gap: 12
|
|
2186
|
+
},
|
|
2187
|
+
label: {
|
|
2188
|
+
fontSize: 13,
|
|
2189
|
+
lineHeight: 18
|
|
2190
|
+
},
|
|
2191
|
+
value: {
|
|
2192
|
+
fontSize: 15,
|
|
2193
|
+
fontWeight: "500",
|
|
2194
|
+
lineHeight: 22,
|
|
2195
|
+
textAlign: "right"
|
|
2196
|
+
}
|
|
2197
|
+
});
|
|
2198
|
+
var MONTH_NAMES = [
|
|
2199
|
+
"January",
|
|
2200
|
+
"February",
|
|
2201
|
+
"March",
|
|
2202
|
+
"April",
|
|
2203
|
+
"May",
|
|
2204
|
+
"June",
|
|
2205
|
+
"July",
|
|
2206
|
+
"August",
|
|
2207
|
+
"September",
|
|
2208
|
+
"October",
|
|
2209
|
+
"November",
|
|
2210
|
+
"December"
|
|
2211
|
+
];
|
|
2212
|
+
function MonthPicker({ value, onChange, style }) {
|
|
2213
|
+
const { colors } = useTheme();
|
|
2214
|
+
const handlePrev = () => {
|
|
2215
|
+
Haptics11__namespace.selectionAsync();
|
|
2216
|
+
if (value.month === 1) {
|
|
2217
|
+
onChange({ month: 12, year: value.year - 1 });
|
|
2218
|
+
} else {
|
|
2219
|
+
onChange({ month: value.month - 1, year: value.year });
|
|
2220
|
+
}
|
|
2221
|
+
};
|
|
2222
|
+
const handleNext = () => {
|
|
2223
|
+
Haptics11__namespace.selectionAsync();
|
|
2224
|
+
if (value.month === 12) {
|
|
2225
|
+
onChange({ month: 1, year: value.year + 1 });
|
|
2226
|
+
} else {
|
|
2227
|
+
onChange({ month: value.month + 1, year: value.year });
|
|
2228
|
+
}
|
|
2229
|
+
};
|
|
2230
|
+
return /* @__PURE__ */ React23__default.default.createElement(reactNative.View, { style: [styles27.container, style] }, /* @__PURE__ */ React23__default.default.createElement(
|
|
2231
|
+
reactNative.TouchableOpacity,
|
|
2232
|
+
{
|
|
2233
|
+
style: styles27.arrow,
|
|
2234
|
+
onPress: handlePrev,
|
|
2235
|
+
activeOpacity: 0.6,
|
|
2236
|
+
touchSoundDisabled: true
|
|
2237
|
+
},
|
|
2238
|
+
/* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles27.arrowText, { color: colors.foreground }] }, "\u2039")
|
|
2239
|
+
), /* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles27.label, { color: colors.foreground }], allowFontScaling: true }, MONTH_NAMES[value.month - 1], " ", value.year), /* @__PURE__ */ React23__default.default.createElement(
|
|
2240
|
+
reactNative.TouchableOpacity,
|
|
2241
|
+
{
|
|
2242
|
+
style: styles27.arrow,
|
|
2243
|
+
onPress: handleNext,
|
|
2244
|
+
activeOpacity: 0.6,
|
|
2245
|
+
touchSoundDisabled: true
|
|
2246
|
+
},
|
|
2247
|
+
/* @__PURE__ */ React23__default.default.createElement(reactNative.Text, { style: [styles27.arrowText, { color: colors.foreground }] }, "\u203A")
|
|
2248
|
+
));
|
|
2249
|
+
}
|
|
2250
|
+
var styles27 = reactNative.StyleSheet.create({
|
|
2251
|
+
container: {
|
|
2252
|
+
flexDirection: "row",
|
|
2253
|
+
alignItems: "center",
|
|
2254
|
+
justifyContent: "space-between"
|
|
2255
|
+
},
|
|
2256
|
+
arrow: {
|
|
2257
|
+
width: 44,
|
|
2258
|
+
height: 44,
|
|
2259
|
+
alignItems: "center",
|
|
2260
|
+
justifyContent: "center"
|
|
2261
|
+
},
|
|
2262
|
+
arrowText: {
|
|
2263
|
+
fontSize: 24,
|
|
2264
|
+
lineHeight: 30
|
|
2265
|
+
},
|
|
2266
|
+
label: {
|
|
2267
|
+
fontSize: 17,
|
|
2268
|
+
fontWeight: "500",
|
|
2269
|
+
lineHeight: 24,
|
|
2270
|
+
textAlign: "center",
|
|
2271
|
+
minWidth: 160
|
|
2272
|
+
}
|
|
2273
|
+
});
|
|
1911
2274
|
|
|
1912
2275
|
Object.defineProperty(exports, "BottomSheetModalProvider", {
|
|
1913
2276
|
enumerable: true,
|
|
1914
2277
|
get: function () { return bottomSheet.BottomSheetModalProvider; }
|
|
1915
2278
|
});
|
|
1916
2279
|
exports.Accordion = Accordion;
|
|
1917
|
-
exports.
|
|
2280
|
+
exports.AlertBanner = AlertBanner;
|
|
1918
2281
|
exports.Avatar = Avatar;
|
|
1919
2282
|
exports.Badge = Badge;
|
|
1920
2283
|
exports.Button = Button;
|
|
@@ -1925,11 +2288,17 @@ exports.CardFooter = CardFooter;
|
|
|
1925
2288
|
exports.CardHeader = CardHeader;
|
|
1926
2289
|
exports.CardTitle = CardTitle;
|
|
1927
2290
|
exports.Checkbox = Checkbox;
|
|
2291
|
+
exports.Chip = Chip;
|
|
2292
|
+
exports.ChipGroup = ChipGroup;
|
|
2293
|
+
exports.ConfirmDialog = ConfirmDialog;
|
|
1928
2294
|
exports.CurrencyDisplay = CurrencyDisplay;
|
|
1929
2295
|
exports.CurrencyInput = CurrencyInput;
|
|
1930
2296
|
exports.CurrencyInputLarge = CurrencyInputLarge;
|
|
1931
2297
|
exports.EmptyState = EmptyState;
|
|
1932
2298
|
exports.Input = Input;
|
|
2299
|
+
exports.LabelValue = LabelValue;
|
|
2300
|
+
exports.ListItem = ListItem;
|
|
2301
|
+
exports.MonthPicker = MonthPicker;
|
|
1933
2302
|
exports.Progress = Progress;
|
|
1934
2303
|
exports.RadioGroup = RadioGroup;
|
|
1935
2304
|
exports.Select = Select;
|