@retray-dev/ui-kit 12.1.0 → 12.2.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 +98 -4
- package/README.md +4 -4
- package/dist/Accordion.d.mts +6 -0
- package/dist/Accordion.d.ts +6 -0
- package/dist/Accordion.js +16 -0
- package/dist/Accordion.mjs +2 -2
- package/dist/AlertBanner.js +2 -0
- package/dist/AlertBanner.mjs +2 -2
- package/dist/AppHeader.js +2 -0
- package/dist/AppHeader.mjs +3 -3
- package/dist/Avatar.js +2 -0
- package/dist/Avatar.mjs +2 -2
- package/dist/Badge.js +2 -0
- package/dist/Badge.mjs +2 -2
- package/dist/Button.js +17 -17
- package/dist/Button.mjs +2 -2
- package/dist/Card.js +2 -0
- package/dist/Card.mjs +2 -2
- package/dist/CategoryStrip.js +2 -0
- package/dist/CategoryStrip.mjs +2 -2
- package/dist/Checkbox.js +2 -0
- package/dist/Checkbox.mjs +2 -2
- package/dist/Chip.js +2 -0
- package/dist/Chip.mjs +2 -2
- package/dist/ConfirmDialog.js +26 -20
- package/dist/ConfirmDialog.mjs +3 -3
- package/dist/CurrencyDisplay.js +2 -0
- package/dist/CurrencyDisplay.mjs +2 -2
- package/dist/CurrencyInput.js +2 -0
- package/dist/CurrencyInput.mjs +3 -3
- package/dist/DetailRow.js +2 -0
- package/dist/DetailRow.mjs +2 -2
- package/dist/EmptyState.js +17 -17
- package/dist/EmptyState.mjs +3 -3
- package/dist/ErrorBoundary.js +2 -0
- package/dist/ErrorBoundary.mjs +2 -2
- package/dist/Form.js +2 -0
- package/dist/Form.mjs +2 -2
- package/dist/IconButton.js +2 -0
- package/dist/IconButton.mjs +2 -2
- package/dist/IconPicker.js +2 -0
- package/dist/IconPicker.mjs +3 -3
- package/dist/ImageUpload.d.mts +3 -1
- package/dist/ImageUpload.d.ts +3 -1
- package/dist/ImageUpload.js +10 -3
- package/dist/ImageUpload.mjs +3 -3
- package/dist/ImageViewer.js +2 -0
- package/dist/ImageViewer.mjs +4 -4
- package/dist/Input.js +2 -0
- package/dist/Input.mjs +2 -2
- package/dist/LabelValue.js +2 -0
- package/dist/LabelValue.mjs +2 -2
- package/dist/ListGroup.js +2 -0
- package/dist/ListGroup.mjs +2 -2
- package/dist/ListItem.js +2 -0
- package/dist/ListItem.mjs +2 -2
- package/dist/MediaCard.js +2 -0
- package/dist/MediaCard.mjs +2 -2
- package/dist/MenuGroup.js +2 -0
- package/dist/MenuGroup.mjs +2 -2
- package/dist/MenuItem.js +2 -0
- package/dist/MenuItem.mjs +2 -2
- package/dist/MonthPicker.js +2 -0
- package/dist/MonthPicker.mjs +2 -2
- package/dist/NumberStepper.js +2 -0
- package/dist/NumberStepper.mjs +2 -2
- package/dist/PagerDots.js +2 -0
- package/dist/PagerDots.mjs +2 -2
- package/dist/PricingCard.js +17 -17
- package/dist/PricingCard.mjs +4 -4
- package/dist/Progress.js +2 -0
- package/dist/Progress.mjs +2 -2
- package/dist/RadioGroup.js +2 -0
- package/dist/RadioGroup.mjs +2 -2
- package/dist/RetrayProvider.d.mts +1 -1
- package/dist/RetrayProvider.d.ts +1 -1
- package/dist/RetrayProvider.js +2 -0
- package/dist/RetrayProvider.mjs +3 -3
- package/dist/Select.js +2 -0
- package/dist/Select.mjs +2 -2
- package/dist/SelectableCard.d.mts +27 -0
- package/dist/SelectableCard.d.ts +27 -0
- package/dist/SelectableCard.js +511 -0
- package/dist/SelectableCard.mjs +8 -0
- package/dist/SelectableGrid.js +2 -0
- package/dist/SelectableGrid.mjs +2 -2
- package/dist/Separator.js +2 -0
- package/dist/Separator.mjs +2 -2
- package/dist/Sheet.js +11 -3
- package/dist/Sheet.mjs +2 -2
- package/dist/SheetSelect.js +2 -0
- package/dist/SheetSelect.mjs +2 -2
- package/dist/Skeleton.d.mts +3 -1
- package/dist/Skeleton.d.ts +3 -1
- package/dist/Skeleton.js +5 -2
- package/dist/Skeleton.mjs +2 -2
- package/dist/Slider.js +2 -0
- package/dist/Slider.mjs +2 -2
- package/dist/Spinner.js +2 -0
- package/dist/Spinner.mjs +2 -2
- package/dist/Stats.d.mts +4 -1
- package/dist/Stats.d.ts +4 -1
- package/dist/Stats.js +27 -3
- package/dist/Stats.mjs +2 -2
- package/dist/Switch.js +2 -0
- package/dist/Switch.mjs +2 -2
- package/dist/TabBar.js +2 -0
- package/dist/TabBar.mjs +2 -2
- package/dist/Tabs.js +2 -0
- package/dist/Tabs.mjs +2 -2
- package/dist/Text.js +2 -0
- package/dist/Text.mjs +2 -2
- package/dist/Textarea.js +2 -0
- package/dist/Textarea.mjs +2 -2
- package/dist/Toast.js +2 -0
- package/dist/Toast.mjs +2 -2
- package/dist/Toggle.js +2 -0
- package/dist/Toggle.mjs +2 -2
- package/dist/{chunk-JNVAIDLK.mjs → chunk-2BA3JMKK.mjs} +1 -1
- package/dist/{chunk-X26S5EVZ.mjs → chunk-2HFD4IHU.mjs} +1 -1
- package/dist/{chunk-ZHMSAYLT.mjs → chunk-2LG326TT.mjs} +1 -1
- package/dist/chunk-2P2CB235.mjs +236 -0
- package/dist/{chunk-MYZ2EDYU.mjs → chunk-3XCFYSX4.mjs} +1 -1
- package/dist/{chunk-DOGIPOF5.mjs → chunk-4J2PXL36.mjs} +16 -18
- package/dist/{chunk-V6NFJXKO.mjs → chunk-4OORJ2DY.mjs} +1 -1
- package/dist/{chunk-5OLNXP3S.mjs → chunk-4XOB5TTD.mjs} +26 -4
- package/dist/{chunk-P64WHW4A.mjs → chunk-57V2LXCK.mjs} +1 -1
- package/dist/{chunk-HJ46DTJE.mjs → chunk-7AFZWSCI.mjs} +1 -1
- package/dist/{chunk-AQEVCEXV.mjs → chunk-7ELGZ66G.mjs} +1 -1
- package/dist/{chunk-I4V5XZPS.mjs → chunk-AENAVIKT.mjs} +1 -1
- package/dist/{chunk-2CBQKU7H.mjs → chunk-BXF4AMHY.mjs} +1 -1
- package/dist/{chunk-JULSIZDM.mjs → chunk-C43HRKXH.mjs} +1 -1
- package/dist/{chunk-GK4VRMNE.mjs → chunk-CF27NBXO.mjs} +11 -6
- package/dist/{chunk-PGERH3P7.mjs → chunk-DF7JA72E.mjs} +1 -1
- package/dist/{chunk-F4V6XLP4.mjs → chunk-E5UKLSJZ.mjs} +3 -3
- package/dist/{chunk-FUVYSVGR.mjs → chunk-EDLCGYIO.mjs} +1 -1
- package/dist/{chunk-N4ZPVCJH.mjs → chunk-ELGEOM7I.mjs} +1 -1
- package/dist/{chunk-FA2KMTH5.mjs → chunk-F3YTWO3T.mjs} +1 -1
- package/dist/{chunk-3UYAZ7I4.mjs → chunk-GH67YXG6.mjs} +1 -1
- package/dist/{chunk-357YO24D.mjs → chunk-GUTDFUNF.mjs} +1 -1
- package/dist/{chunk-7HSILTC4.mjs → chunk-HC4VVCWY.mjs} +2 -2
- package/dist/{chunk-WOEWGSTU.mjs → chunk-HEDQPK4I.mjs} +1 -1
- package/dist/{chunk-3GEYJ7I5.mjs → chunk-IVSRW4HS.mjs} +1 -1
- package/dist/{chunk-P73V2EKS.mjs → chunk-KSUWPU2F.mjs} +1 -1
- package/dist/{chunk-BCWEHE34.mjs → chunk-LIS6I5UP.mjs} +1 -1
- package/dist/{chunk-J6Q2YJEV.mjs → chunk-LNPKGWBG.mjs} +1 -1
- package/dist/{chunk-DF6DU42P.mjs → chunk-LOBLCFMN.mjs} +1 -1
- package/dist/{chunk-2A2LEFZG.mjs → chunk-LPV4NJJK.mjs} +2 -2
- package/dist/{chunk-FFTYLPSB.mjs → chunk-M3C7XM2M.mjs} +11 -5
- package/dist/{chunk-BQZE3HAW.mjs → chunk-MEPSKGBO.mjs} +1 -1
- package/dist/{chunk-ISY26JQJ.mjs → chunk-MVMGPZN6.mjs} +2 -2
- package/dist/{chunk-265G6A46.mjs → chunk-NHDI3VQB.mjs} +15 -1
- package/dist/{chunk-D3Y2T42P.mjs → chunk-NJG7DHVF.mjs} +1 -1
- package/dist/{chunk-LRM4AVYY.mjs → chunk-NLZY4TXU.mjs} +1 -1
- package/dist/{chunk-OULVKTWL.mjs → chunk-OLVJFKXS.mjs} +1 -1
- package/dist/{chunk-BOVUP27T.mjs → chunk-QDAZGZUF.mjs} +4 -3
- package/dist/{chunk-S3KJCPEJ.mjs → chunk-QOLWA2PW.mjs} +1 -1
- package/dist/{chunk-JCZQOY4O.mjs → chunk-QXDGGOLC.mjs} +12 -6
- package/dist/{chunk-4WFMPFZB.mjs → chunk-RJNLAH76.mjs} +1 -1
- package/dist/{chunk-HLMPMUK2.mjs → chunk-RMRS44MQ.mjs} +1 -1
- package/dist/{chunk-KHYX4IOM.mjs → chunk-SAWUXP3A.mjs} +2 -2
- package/dist/{chunk-2I2AYECM.mjs → chunk-TS7DGUIR.mjs} +1 -1
- package/dist/{chunk-3N2M3WZL.mjs → chunk-UBUXUMER.mjs} +1 -1
- package/dist/{chunk-AKM4EPOT.mjs → chunk-ULGNQPNE.mjs} +1 -1
- package/dist/{chunk-FVTVCJAH.mjs → chunk-UNNRUJTM.mjs} +1 -1
- package/dist/{chunk-DI7CBDL6.mjs → chunk-UQ4742ET.mjs} +1 -1
- package/dist/{chunk-EFLFRAHD.mjs → chunk-VJBUCITV.mjs} +1 -1
- package/dist/{chunk-QSFV2P7O.mjs → chunk-YMYIEVZP.mjs} +1 -1
- package/dist/{chunk-EMUWGDWC.mjs → chunk-YTXRIXNZ.mjs} +2 -0
- package/dist/{chunk-XBAGGKLW.mjs → chunk-ZIMY2QUM.mjs} +2 -2
- package/dist/{chunk-NXI4YDZ2.mjs → chunk-ZR6HSEAB.mjs} +1 -1
- package/dist/{index-wt-orHUi.d.ts → index-CY34hxPN.d.mts} +1 -0
- package/dist/{index-wt-orHUi.d.mts → index-CY34hxPN.d.ts} +1 -0
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +733 -453
- package/dist/index.mjs +53 -52
- package/package.json +1 -1
- package/src/components/Accordion/Accordion.tsx +20 -0
- package/src/components/Button/Button.tsx +29 -26
- package/src/components/ConfirmDialog/ConfirmDialog.tsx +10 -3
- package/src/components/ImageUpload/ImageUpload.tsx +10 -3
- package/src/components/SelectableCard/SelectableCard.tsx +304 -0
- package/src/components/SelectableCard/index.ts +1 -0
- package/src/components/Sheet/Sheet.tsx +10 -3
- package/src/components/Skeleton/Skeleton.tsx +5 -2
- package/src/components/Stats/Stats.tsx +35 -7
- package/src/index.ts +1 -0
- package/src/theme/colors.ts +7 -0
- package/src/theme/types.ts +4 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React55 = require('react');
|
|
4
4
|
var reactNative = require('react-native');
|
|
5
5
|
var reactNativeSizeMatters = require('react-native-size-matters');
|
|
6
6
|
var AntDesign = require('@expo/vector-icons/AntDesign');
|
|
@@ -24,7 +24,7 @@ var reactNativeGestureHandler = require('react-native-gesture-handler');
|
|
|
24
24
|
|
|
25
25
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var React55__default = /*#__PURE__*/_interopDefault(React55);
|
|
28
28
|
var AntDesign__default = /*#__PURE__*/_interopDefault(AntDesign);
|
|
29
29
|
var Entypo__default = /*#__PURE__*/_interopDefault(Entypo);
|
|
30
30
|
var Feather__default = /*#__PURE__*/_interopDefault(Feather);
|
|
@@ -144,6 +144,7 @@ function deriveColors(t, scheme) {
|
|
|
144
144
|
const foregroundMuted = mixWithBackground(t.foreground, bg, 0.62);
|
|
145
145
|
const surface = dark ? lighten(bg, -0.06) : darken(bg, 0.04);
|
|
146
146
|
const surfaceStrong = dark ? lighten(bg, -0.12) : darken(bg, 0.08);
|
|
147
|
+
const skeleton = dark ? lighten(bg, -0.1) : darken(bg, 0.1);
|
|
147
148
|
const destructiveTint = dark ? withAlphaOnDark(t.destructive, 0.15, bg) : withAlphaOnWhite(t.destructive, 0.08);
|
|
148
149
|
const destructiveBorder = dark ? withAlphaOnDark(t.destructive, 0.45, bg) : withAlphaOnWhite(t.destructive, 0.3);
|
|
149
150
|
const successTint = dark ? withAlphaOnDark(t.success, 0.15, bg) : withAlphaOnWhite(t.success, 0.08);
|
|
@@ -156,6 +157,7 @@ function deriveColors(t, scheme) {
|
|
|
156
157
|
foregroundMuted,
|
|
157
158
|
surface,
|
|
158
159
|
surfaceStrong,
|
|
160
|
+
skeleton,
|
|
159
161
|
destructiveTint,
|
|
160
162
|
destructiveBorder,
|
|
161
163
|
successTint,
|
|
@@ -172,23 +174,23 @@ function deriveColors(t, scheme) {
|
|
|
172
174
|
}
|
|
173
175
|
|
|
174
176
|
// src/theme/ThemeProvider.tsx
|
|
175
|
-
var ThemeContext =
|
|
177
|
+
var ThemeContext = React55.createContext({
|
|
176
178
|
colors: deriveColors(defaultLight, "light"),
|
|
177
179
|
colorScheme: "light"
|
|
178
180
|
});
|
|
179
181
|
function ThemeProvider({ children, theme, colorScheme = "system" }) {
|
|
180
182
|
const systemScheme = reactNative.useColorScheme() ?? "light";
|
|
181
183
|
const resolvedScheme = colorScheme === "system" ? systemScheme : colorScheme;
|
|
182
|
-
const colors =
|
|
184
|
+
const colors = React55.useMemo(() => {
|
|
183
185
|
const base = resolvedScheme === "dark" ? defaultDark : defaultLight;
|
|
184
186
|
const override = resolvedScheme === "dark" ? theme?.dark : theme?.light;
|
|
185
187
|
const merged = override ? { ...base, ...override } : base;
|
|
186
188
|
return deriveColors(merged, resolvedScheme);
|
|
187
189
|
}, [resolvedScheme, theme]);
|
|
188
|
-
return /* @__PURE__ */
|
|
190
|
+
return /* @__PURE__ */ React55__default.default.createElement(ThemeContext.Provider, { value: { colors, colorScheme: resolvedScheme } }, children);
|
|
189
191
|
}
|
|
190
192
|
function useTheme() {
|
|
191
|
-
const context =
|
|
193
|
+
const context = React55.useContext(ThemeContext);
|
|
192
194
|
if (!context) {
|
|
193
195
|
throw new Error("useTheme must be used within a ThemeProvider");
|
|
194
196
|
}
|
|
@@ -412,10 +414,10 @@ function Icon({ name, size, color, family }) {
|
|
|
412
414
|
}
|
|
413
415
|
if (!resolved) return null;
|
|
414
416
|
const Component = resolved.component;
|
|
415
|
-
return
|
|
417
|
+
return React55__default.default.createElement(Component, { name, size, color });
|
|
416
418
|
}
|
|
417
419
|
function renderIcon(name, size, color) {
|
|
418
|
-
return
|
|
420
|
+
return React55__default.default.createElement(Icon, { name, size, color });
|
|
419
421
|
}
|
|
420
422
|
|
|
421
423
|
// src/tokens.ts
|
|
@@ -719,28 +721,30 @@ function ButtonBase({
|
|
|
719
721
|
impactMedium();
|
|
720
722
|
onPress?.();
|
|
721
723
|
};
|
|
722
|
-
const containerVariantStyle = {
|
|
724
|
+
const containerVariantStyle = isDisabled ? {
|
|
725
|
+
primary: { backgroundColor: colors.surface },
|
|
726
|
+
secondary: { backgroundColor: "transparent", borderWidth: 1.5, borderColor: colors.border },
|
|
727
|
+
text: { backgroundColor: "transparent" },
|
|
728
|
+
destructive: { backgroundColor: colors.surface }
|
|
729
|
+
}[variant] : {
|
|
723
730
|
primary: { backgroundColor: colors.primary },
|
|
724
731
|
secondary: { backgroundColor: "transparent", borderWidth: 1.5, borderColor: colors.primary },
|
|
725
732
|
text: { backgroundColor: "transparent" },
|
|
726
733
|
destructive: { backgroundColor: colors.destructive }
|
|
727
734
|
}[variant];
|
|
728
|
-
const
|
|
729
|
-
primary:
|
|
730
|
-
secondary:
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
// carry the brand voltage. Falls back to primary when no accent is defined.
|
|
734
|
-
text: { color: colors.accentResolved },
|
|
735
|
-
destructive: { color: colors.destructiveForeground }
|
|
735
|
+
const labelColor = isDisabled ? colors.foregroundMuted : {
|
|
736
|
+
primary: colors.primaryForeground,
|
|
737
|
+
secondary: colors.primary,
|
|
738
|
+
text: colors.accentResolved,
|
|
739
|
+
destructive: colors.destructiveForeground
|
|
736
740
|
}[variant];
|
|
737
|
-
const textColor = iconColor ??
|
|
741
|
+
const textColor = iconColor ?? labelColor;
|
|
738
742
|
const effectiveIcon = iconName ? renderIcon(iconName, iconSizeMap[size], textColor) : typeof icon === "function" ? icon({ label, size, variant, color: textColor }) : icon;
|
|
739
|
-
const spinnerColor = variant === "destructive" ? colors.destructiveForeground : variant === "primary" ? colors.primaryForeground : colors.accentResolved;
|
|
743
|
+
const spinnerColor = isDisabled ? colors.foregroundMuted : variant === "destructive" ? colors.destructiveForeground : variant === "primary" ? colors.primaryForeground : colors.accentResolved;
|
|
740
744
|
const styleArray = Array.isArray(style) ? style : style ? [style] : [];
|
|
741
745
|
const flatStyle = reactNative.StyleSheet.flatten(styleArray);
|
|
742
746
|
const { flex, ...restStyle } = flatStyle || {};
|
|
743
|
-
return /* @__PURE__ */
|
|
747
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [fullWidth && styles.fullWidth, flex !== void 0 && { flex }] }, /* @__PURE__ */ React55__default.default.createElement(
|
|
744
748
|
PressableButton,
|
|
745
749
|
{
|
|
746
750
|
style: [
|
|
@@ -748,7 +752,6 @@ function ButtonBase({
|
|
|
748
752
|
containerVariantStyle,
|
|
749
753
|
containerSizeStyles[size],
|
|
750
754
|
fullWidth && styles.fullWidth,
|
|
751
|
-
isDisabled && styles.disabled,
|
|
752
755
|
restStyle
|
|
753
756
|
],
|
|
754
757
|
enabled: !isDisabled,
|
|
@@ -761,26 +764,26 @@ function ButtonBase({
|
|
|
761
764
|
accessibilityHint,
|
|
762
765
|
accessibilityState: { disabled: isDisabled, busy: loading }
|
|
763
766
|
},
|
|
764
|
-
loading ? /* @__PURE__ */
|
|
767
|
+
loading ? /* @__PURE__ */ React55__default.default.createElement(React55__default.default.Fragment, null, /* @__PURE__ */ React55__default.default.createElement(reactNative.ActivityIndicator, { size: "small", color: spinnerColor, style: { marginRight: s(6) } }), /* @__PURE__ */ React55__default.default.createElement(
|
|
765
768
|
reactNative.Text,
|
|
766
769
|
{
|
|
767
|
-
style: [styles.label,
|
|
770
|
+
style: [styles.label, { color: labelColor }, labelSizeStyles[size], styles.labelLoading],
|
|
768
771
|
allowFontScaling: true,
|
|
769
772
|
numberOfLines: 1
|
|
770
773
|
},
|
|
771
774
|
label
|
|
772
|
-
)) : /* @__PURE__ */
|
|
775
|
+
)) : /* @__PURE__ */ React55__default.default.createElement(React55__default.default.Fragment, null, effectiveIcon && iconPosition === "left" && /* @__PURE__ */ React55__default.default.createElement(React55__default.default.Fragment, null, effectiveIcon), /* @__PURE__ */ React55__default.default.createElement(
|
|
773
776
|
reactNative.Text,
|
|
774
777
|
{
|
|
775
|
-
style: [styles.label,
|
|
778
|
+
style: [styles.label, { color: labelColor }, labelSizeStyles[size], effectiveIcon ? styles.labelWithIcon : void 0],
|
|
776
779
|
allowFontScaling: true,
|
|
777
780
|
numberOfLines: 1
|
|
778
781
|
},
|
|
779
782
|
label
|
|
780
|
-
), effectiveIcon && iconPosition === "right" && /* @__PURE__ */
|
|
783
|
+
), effectiveIcon && iconPosition === "right" && /* @__PURE__ */ React55__default.default.createElement(React55__default.default.Fragment, null, effectiveIcon))
|
|
781
784
|
));
|
|
782
785
|
}
|
|
783
|
-
var Button =
|
|
786
|
+
var Button = React55__default.default.memo(ButtonBase);
|
|
784
787
|
var styles = reactNative.StyleSheet.create({
|
|
785
788
|
base: {
|
|
786
789
|
borderRadius: RADIUS.md,
|
|
@@ -791,9 +794,6 @@ var styles = reactNative.StyleSheet.create({
|
|
|
791
794
|
fullWidth: {
|
|
792
795
|
width: "100%"
|
|
793
796
|
},
|
|
794
|
-
disabled: {
|
|
795
|
-
opacity: 0.45
|
|
796
|
-
},
|
|
797
797
|
label: {
|
|
798
798
|
fontFamily: "Sohne-Medium",
|
|
799
799
|
flexShrink: 1
|
|
@@ -806,7 +806,7 @@ var styles = reactNative.StyleSheet.create({
|
|
|
806
806
|
}
|
|
807
807
|
});
|
|
808
808
|
function ButtonGroup({ children, gap = 12, vertical = false, style }) {
|
|
809
|
-
return /* @__PURE__ */
|
|
809
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
810
810
|
reactNative.View,
|
|
811
811
|
{
|
|
812
812
|
style: [
|
|
@@ -816,8 +816,8 @@ function ButtonGroup({ children, gap = 12, vertical = false, style }) {
|
|
|
816
816
|
style
|
|
817
817
|
]
|
|
818
818
|
},
|
|
819
|
-
|
|
820
|
-
if (!
|
|
819
|
+
React55__default.default.Children.map(children, (child) => {
|
|
820
|
+
if (!React55__default.default.isValidElement(child)) return child;
|
|
821
821
|
const childProps = child.props;
|
|
822
822
|
const extraProps = {
|
|
823
823
|
style: [child.props.style, { flex: 1 }]
|
|
@@ -825,7 +825,7 @@ function ButtonGroup({ children, gap = 12, vertical = false, style }) {
|
|
|
825
825
|
if (!vertical && "label" in childProps && childProps["size"] === void 0) {
|
|
826
826
|
extraProps["size"] = "sm";
|
|
827
827
|
}
|
|
828
|
-
return
|
|
828
|
+
return React55__default.default.cloneElement(child, extraProps);
|
|
829
829
|
})
|
|
830
830
|
);
|
|
831
831
|
}
|
|
@@ -886,7 +886,7 @@ function IconButtonBase({
|
|
|
886
886
|
const showBadge = badge !== void 0 && badge !== false && badge !== 0;
|
|
887
887
|
const badgeCount = typeof badge === "number" ? Math.min(badge, 99) : null;
|
|
888
888
|
const showCount = typeof badge === "number" && badge > 0;
|
|
889
|
-
return /* @__PURE__ */
|
|
889
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles3.wrapper }, /* @__PURE__ */ React55__default.default.createElement(
|
|
890
890
|
PressableButton,
|
|
891
891
|
{
|
|
892
892
|
style: [
|
|
@@ -906,14 +906,14 @@ function IconButtonBase({
|
|
|
906
906
|
accessibilityHint,
|
|
907
907
|
accessibilityState: { disabled: isDisabled, busy: loading }
|
|
908
908
|
},
|
|
909
|
-
loading ? /* @__PURE__ */
|
|
910
|
-
), showBadge && /* @__PURE__ */
|
|
909
|
+
loading ? /* @__PURE__ */ React55__default.default.createElement(reactNative.ActivityIndicator, { size: "small", color: spinnerColor }) : resolvedIcon
|
|
910
|
+
), showBadge && /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [
|
|
911
911
|
styles3.badge,
|
|
912
912
|
{ backgroundColor: colors.primary },
|
|
913
913
|
showCount ? styles3.badgeCount : styles3.badgeDot
|
|
914
|
-
] }, showCount && /* @__PURE__ */
|
|
914
|
+
] }, showCount && /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles3.badgeText, { color: colors.primaryForeground }] }, badgeCount)));
|
|
915
915
|
}
|
|
916
|
-
var IconButton =
|
|
916
|
+
var IconButton = React55__default.default.memo(IconButtonBase);
|
|
917
917
|
var styles3 = reactNative.StyleSheet.create({
|
|
918
918
|
wrapper: {
|
|
919
919
|
alignSelf: "flex-start"
|
|
@@ -1008,7 +1008,7 @@ function TextBase({ variant = "body-md", color, style, uppercase, children, ...p
|
|
|
1008
1008
|
const { colors } = useTheme();
|
|
1009
1009
|
const colorKey = defaultColorVariant[variant] ?? "foreground";
|
|
1010
1010
|
const resolvedColor = color ?? colors[colorKey];
|
|
1011
|
-
return /* @__PURE__ */
|
|
1011
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
1012
1012
|
reactNative.Text,
|
|
1013
1013
|
{
|
|
1014
1014
|
style: [variantStyles[variant], { color: resolvedColor }, uppercase && { textTransform: "uppercase" }, style],
|
|
@@ -1018,17 +1018,17 @@ function TextBase({ variant = "body-md", color, style, uppercase, children, ...p
|
|
|
1018
1018
|
children
|
|
1019
1019
|
);
|
|
1020
1020
|
}
|
|
1021
|
-
var Text3 =
|
|
1021
|
+
var Text3 = React55__default.default.memo(TextBase);
|
|
1022
1022
|
var webInputResetStyle = reactNative.Platform.OS === "web" ? { outlineStyle: "none", outlineWidth: 0, outlineColor: "transparent", boxShadow: "none" } : {};
|
|
1023
1023
|
function Input({ label, error, hint, disabled, prefix, suffix, prefixStyle, suffixStyle, prefixIcon, suffixIcon, prefixIconColor, suffixIconColor, type = "text", containerStyle, inputWrapperStyle, sheetMode = false, style, onFocus, onBlur, secureTextEntry, editable, accessibilityLabel, ...props }) {
|
|
1024
1024
|
const { colors } = useTheme();
|
|
1025
|
-
const [focused, setFocused] =
|
|
1026
|
-
const [showPassword, setShowPassword] =
|
|
1025
|
+
const [focused, setFocused] = React55.useState(false);
|
|
1026
|
+
const [showPassword, setShowPassword] = React55.useState(false);
|
|
1027
1027
|
const isDisabled = disabled || editable === false;
|
|
1028
1028
|
const isPassword = type === "password";
|
|
1029
1029
|
const effectiveSecure = isPassword ? !showPassword : secureTextEntry;
|
|
1030
1030
|
const effectivePrefix = prefixIcon ? renderIcon(prefixIcon, 20, prefixIconColor ?? colors.foregroundMuted) : prefix;
|
|
1031
|
-
const effectiveSuffix = isPassword && !suffix && !suffixIcon ? /* @__PURE__ */
|
|
1031
|
+
const effectiveSuffix = isPassword && !suffix && !suffixIcon ? /* @__PURE__ */ React55__default.default.createElement(
|
|
1032
1032
|
reactNative.TouchableOpacity,
|
|
1033
1033
|
{
|
|
1034
1034
|
onPress: () => setShowPassword(!showPassword),
|
|
@@ -1037,10 +1037,10 @@ function Input({ label, error, hint, disabled, prefix, suffix, prefixStyle, suff
|
|
|
1037
1037
|
accessibilityRole: "button",
|
|
1038
1038
|
accessibilityLabel: showPassword ? "Hide password" : "Show password"
|
|
1039
1039
|
},
|
|
1040
|
-
/* @__PURE__ */
|
|
1040
|
+
/* @__PURE__ */ React55__default.default.createElement(vectorIcons.AntDesign, { name: showPassword ? "eye" : "eye-invisible", size: 20, color: colors.foregroundMuted })
|
|
1041
1041
|
) : suffixIcon ? renderIcon(suffixIcon, 20, suffixIconColor ?? colors.foregroundMuted) : suffix;
|
|
1042
1042
|
const borderColor = error ? colors.destructive : focused ? colors.primary : colors.border;
|
|
1043
|
-
return /* @__PURE__ */
|
|
1043
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles4.container, isDisabled && styles4.containerDisabled, containerStyle] }, label ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles4.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, /* @__PURE__ */ React55__default.default.createElement(
|
|
1044
1044
|
reactNativeEase.EaseView,
|
|
1045
1045
|
{
|
|
1046
1046
|
style: [
|
|
@@ -1052,8 +1052,8 @@ function Input({ label, error, hint, disabled, prefix, suffix, prefixStyle, suff
|
|
|
1052
1052
|
animate: { borderColor },
|
|
1053
1053
|
transition: COLOR_TRANSITION
|
|
1054
1054
|
},
|
|
1055
|
-
effectivePrefix ? typeof effectivePrefix === "string" ? /* @__PURE__ */
|
|
1056
|
-
sheetMode ? /* @__PURE__ */
|
|
1055
|
+
effectivePrefix ? typeof effectivePrefix === "string" ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles4.prefixText, { color: colors.foregroundMuted }, prefixStyle], allowFontScaling: true }, effectivePrefix) : /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles4.prefixContainer }, effectivePrefix) : null,
|
|
1056
|
+
sheetMode ? /* @__PURE__ */ React55__default.default.createElement(
|
|
1057
1057
|
bottomSheet.BottomSheetTextInput,
|
|
1058
1058
|
{
|
|
1059
1059
|
style: [
|
|
@@ -1077,7 +1077,7 @@ function Input({ label, error, hint, disabled, prefix, suffix, prefixStyle, suff
|
|
|
1077
1077
|
accessibilityLabel: accessibilityLabel ?? label,
|
|
1078
1078
|
...props
|
|
1079
1079
|
}
|
|
1080
|
-
) : /* @__PURE__ */
|
|
1080
|
+
) : /* @__PURE__ */ React55__default.default.createElement(
|
|
1081
1081
|
reactNative.TextInput,
|
|
1082
1082
|
{
|
|
1083
1083
|
style: [
|
|
@@ -1102,8 +1102,8 @@ function Input({ label, error, hint, disabled, prefix, suffix, prefixStyle, suff
|
|
|
1102
1102
|
...props
|
|
1103
1103
|
}
|
|
1104
1104
|
),
|
|
1105
|
-
effectiveSuffix ? typeof effectiveSuffix === "string" ? /* @__PURE__ */
|
|
1106
|
-
), error ? /* @__PURE__ */
|
|
1105
|
+
effectiveSuffix ? typeof effectiveSuffix === "string" ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles4.suffixText, { color: colors.foregroundMuted }, suffixStyle], allowFontScaling: true }, effectiveSuffix) : /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles4.suffixContainer }, effectiveSuffix) : null
|
|
1106
|
+
), error ? /* @__PURE__ */ React55__default.default.createElement(
|
|
1107
1107
|
reactNative.Text,
|
|
1108
1108
|
{
|
|
1109
1109
|
style: [styles4.helperText, { color: colors.destructive }],
|
|
@@ -1111,7 +1111,7 @@ function Input({ label, error, hint, disabled, prefix, suffix, prefixStyle, suff
|
|
|
1111
1111
|
accessibilityLiveRegion: "polite"
|
|
1112
1112
|
},
|
|
1113
1113
|
error
|
|
1114
|
-
) : null, !error && hint ? /* @__PURE__ */
|
|
1114
|
+
) : null, !error && hint ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles4.helperText, { color: colors.foregroundMuted }], allowFontScaling: true }, hint) : null);
|
|
1115
1115
|
}
|
|
1116
1116
|
var styles4 = reactNative.StyleSheet.create({
|
|
1117
1117
|
container: {
|
|
@@ -1213,7 +1213,7 @@ function BadgeBase({ label, children, variant = "default", size = "md", icon, ic
|
|
|
1213
1213
|
const effectiveIcon = iconName ? renderIcon(iconName, sizeIconSize[size], iconColor ?? textColor) : icon;
|
|
1214
1214
|
const content = children ?? label;
|
|
1215
1215
|
const a11yLabel = typeof content === "string" ? content : label;
|
|
1216
|
-
return /* @__PURE__ */
|
|
1216
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
1217
1217
|
reactNative.View,
|
|
1218
1218
|
{
|
|
1219
1219
|
style: [styles5.container, containerStyle, sizePadding[size], { gap: sizeIconGap[size] }, style],
|
|
@@ -1221,10 +1221,10 @@ function BadgeBase({ label, children, variant = "default", size = "md", icon, ic
|
|
|
1221
1221
|
accessibilityLabel: a11yLabel
|
|
1222
1222
|
},
|
|
1223
1223
|
effectiveIcon,
|
|
1224
|
-
typeof content === "string" ? /* @__PURE__ */
|
|
1224
|
+
typeof content === "string" ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles5.label, { color: textColor }, sizeFontSize[size]], allowFontScaling: true }, content) : content
|
|
1225
1225
|
);
|
|
1226
1226
|
}
|
|
1227
|
-
var Badge =
|
|
1227
|
+
var Badge = React55__default.default.memo(BadgeBase);
|
|
1228
1228
|
var styles5 = reactNative.StyleSheet.create({
|
|
1229
1229
|
container: {
|
|
1230
1230
|
borderRadius: 9999,
|
|
@@ -1269,9 +1269,9 @@ function Card({ children, variant = "elevated", onPress, style, accessibilityLab
|
|
|
1269
1269
|
elevation: 0
|
|
1270
1270
|
}
|
|
1271
1271
|
}[variant];
|
|
1272
|
-
const cardContent = /* @__PURE__ */
|
|
1272
|
+
const cardContent = /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles6.card, variantStyle, style] }, children);
|
|
1273
1273
|
if (onPress) {
|
|
1274
|
-
return /* @__PURE__ */
|
|
1274
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
1275
1275
|
PressableCard,
|
|
1276
1276
|
{
|
|
1277
1277
|
onPress: handlePress,
|
|
@@ -1287,21 +1287,21 @@ function Card({ children, variant = "elevated", onPress, style, accessibilityLab
|
|
|
1287
1287
|
return cardContent;
|
|
1288
1288
|
}
|
|
1289
1289
|
function CardHeader({ children, style }) {
|
|
1290
|
-
return /* @__PURE__ */
|
|
1290
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles6.header, style] }, children);
|
|
1291
1291
|
}
|
|
1292
1292
|
function CardTitle({ children, style }) {
|
|
1293
1293
|
const { colors } = useTheme();
|
|
1294
|
-
return /* @__PURE__ */
|
|
1294
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles6.title, { color: colors.foreground }, style], allowFontScaling: true }, children);
|
|
1295
1295
|
}
|
|
1296
1296
|
function CardDescription({ children, style }) {
|
|
1297
1297
|
const { colors } = useTheme();
|
|
1298
|
-
return /* @__PURE__ */
|
|
1298
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles6.description, { color: colors.foregroundSubtle }, style], allowFontScaling: true }, children);
|
|
1299
1299
|
}
|
|
1300
1300
|
function CardContent({ children, style }) {
|
|
1301
|
-
return /* @__PURE__ */
|
|
1301
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles6.content, style] }, children);
|
|
1302
1302
|
}
|
|
1303
1303
|
function CardFooter({ children, style }) {
|
|
1304
|
-
return /* @__PURE__ */
|
|
1304
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles6.footer, style] }, children);
|
|
1305
1305
|
}
|
|
1306
1306
|
var styles6 = reactNative.StyleSheet.create({
|
|
1307
1307
|
card: {
|
|
@@ -1339,7 +1339,7 @@ var styles6 = reactNative.StyleSheet.create({
|
|
|
1339
1339
|
});
|
|
1340
1340
|
function Separator({ orientation = "horizontal", style }) {
|
|
1341
1341
|
const { colors } = useTheme();
|
|
1342
|
-
return /* @__PURE__ */
|
|
1342
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
1343
1343
|
reactNative.View,
|
|
1344
1344
|
{
|
|
1345
1345
|
style: [
|
|
@@ -1374,7 +1374,7 @@ function Spinner({ size = "md", color, label, ...props }) {
|
|
|
1374
1374
|
const { colors } = useTheme();
|
|
1375
1375
|
const a11yLabel = label || "Loading";
|
|
1376
1376
|
if (label) {
|
|
1377
|
-
return /* @__PURE__ */
|
|
1377
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
1378
1378
|
reactNative.View,
|
|
1379
1379
|
{
|
|
1380
1380
|
style: styles8.wrapper,
|
|
@@ -1382,8 +1382,8 @@ function Spinner({ size = "md", color, label, ...props }) {
|
|
|
1382
1382
|
accessibilityLabel: a11yLabel,
|
|
1383
1383
|
accessibilityState: { busy: true }
|
|
1384
1384
|
},
|
|
1385
|
-
/* @__PURE__ */
|
|
1386
|
-
/* @__PURE__ */
|
|
1385
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.ActivityIndicator, { size: sizeMap2[size], color: color ?? colors.primary, ...props }),
|
|
1386
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
1387
1387
|
reactNative.Text,
|
|
1388
1388
|
{
|
|
1389
1389
|
style: [styles8.label, { color: colors.foregroundMuted, fontSize: labelFontSize[size] }],
|
|
@@ -1393,7 +1393,7 @@ function Spinner({ size = "md", color, label, ...props }) {
|
|
|
1393
1393
|
)
|
|
1394
1394
|
);
|
|
1395
1395
|
}
|
|
1396
|
-
return /* @__PURE__ */
|
|
1396
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
1397
1397
|
reactNative.ActivityIndicator,
|
|
1398
1398
|
{
|
|
1399
1399
|
size: sizeMap2[size],
|
|
@@ -1421,13 +1421,14 @@ function Skeleton({
|
|
|
1421
1421
|
borderRadius = 6,
|
|
1422
1422
|
preset = "base",
|
|
1423
1423
|
diameter = 40,
|
|
1424
|
+
backgroundColor,
|
|
1424
1425
|
style
|
|
1425
1426
|
}) {
|
|
1426
1427
|
const { colors, colorScheme } = useTheme();
|
|
1427
1428
|
const shimmer = Animated12.useSharedValue(0);
|
|
1428
|
-
const [containerWidth, setContainerWidth] =
|
|
1429
|
-
const shimmerHighlight = colorScheme === "dark" ? "rgba(255,255,255,0.08)" : "rgba(
|
|
1430
|
-
|
|
1429
|
+
const [containerWidth, setContainerWidth] = React55.useState(300);
|
|
1430
|
+
const shimmerHighlight = colorScheme === "dark" ? "rgba(255,255,255,0.08)" : "rgba(0,0,0,0.07)";
|
|
1431
|
+
React55.useEffect(() => {
|
|
1431
1432
|
shimmer.value = Animated12.withRepeat(
|
|
1432
1433
|
Animated12.withTiming(1, { duration: TIMINGS.shimmer.duration, easing: Animated12.Easing.linear }),
|
|
1433
1434
|
-1,
|
|
@@ -1440,12 +1441,12 @@ function Skeleton({
|
|
|
1440
1441
|
const resolvedWidth = preset === "circle" ? s(diameter) : preset === "text" ? "60%" : width;
|
|
1441
1442
|
const resolvedHeight = preset === "circle" ? s(diameter) : preset === "text" ? 14 : height;
|
|
1442
1443
|
const resolvedRadius = preset === "circle" ? 9999 : preset === "text" ? 4 : borderRadius;
|
|
1443
|
-
return /* @__PURE__ */
|
|
1444
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
1444
1445
|
reactNative.View,
|
|
1445
1446
|
{
|
|
1446
1447
|
style: [
|
|
1447
1448
|
styles9.base,
|
|
1448
|
-
{ width: resolvedWidth, height: resolvedHeight, borderRadius: resolvedRadius, backgroundColor: colors.
|
|
1449
|
+
{ width: resolvedWidth, height: resolvedHeight, borderRadius: resolvedRadius, backgroundColor: backgroundColor ?? colors.skeleton },
|
|
1449
1450
|
style
|
|
1450
1451
|
],
|
|
1451
1452
|
onLayout: (e) => setContainerWidth(e.nativeEvent.layout.width),
|
|
@@ -1453,7 +1454,7 @@ function Skeleton({
|
|
|
1453
1454
|
accessibilityLabel: "Loading",
|
|
1454
1455
|
accessibilityState: { busy: true }
|
|
1455
1456
|
},
|
|
1456
|
-
/* @__PURE__ */
|
|
1457
|
+
/* @__PURE__ */ React55__default.default.createElement(Animated12__default.default.View, { style: [reactNative.StyleSheet.absoluteFill, shimmerStyle] }, /* @__PURE__ */ React55__default.default.createElement(
|
|
1457
1458
|
expoLinearGradient.LinearGradient,
|
|
1458
1459
|
{
|
|
1459
1460
|
colors: ["transparent", shimmerHighlight, "transparent"],
|
|
@@ -1473,10 +1474,10 @@ var aspectRatioMap = {
|
|
|
1473
1474
|
};
|
|
1474
1475
|
function MediaCardSkeleton({ aspectRatio = "4:3", showSubtitle = true, style }) {
|
|
1475
1476
|
const ratio = aspectRatioMap[aspectRatio];
|
|
1476
|
-
return /* @__PURE__ */
|
|
1477
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style }, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: { paddingTop: `${ratio * 100}%` } }, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: reactNative.StyleSheet.absoluteFill }, /* @__PURE__ */ React55__default.default.createElement(Skeleton, { width: "100%", height: void 0, style: skeletonStyles.fill, borderRadius: RADIUS.md }))), /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: skeletonStyles.meta }, /* @__PURE__ */ React55__default.default.createElement(Skeleton, { width: "70%", height: vs(14), borderRadius: RADIUS.xs }), showSubtitle ? /* @__PURE__ */ React55__default.default.createElement(Skeleton, { width: "45%", height: vs(12), borderRadius: RADIUS.xs }) : null));
|
|
1477
1478
|
}
|
|
1478
1479
|
function ListItemSkeleton({ showAvatar = true, showSubtitle = true, style }) {
|
|
1479
|
-
return /* @__PURE__ */
|
|
1480
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [skeletonStyles.row, style] }, showAvatar ? /* @__PURE__ */ React55__default.default.createElement(Skeleton, { preset: "circle", diameter: 40 }) : null, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: skeletonStyles.rowText }, /* @__PURE__ */ React55__default.default.createElement(Skeleton, { width: "60%", height: vs(14), borderRadius: RADIUS.xs }), showSubtitle ? /* @__PURE__ */ React55__default.default.createElement(Skeleton, { width: "40%", height: vs(12), borderRadius: RADIUS.xs }) : null));
|
|
1480
1481
|
}
|
|
1481
1482
|
function ListSkeleton({
|
|
1482
1483
|
count = 6,
|
|
@@ -1487,10 +1488,10 @@ function ListSkeleton({
|
|
|
1487
1488
|
style
|
|
1488
1489
|
}) {
|
|
1489
1490
|
if (columns <= 1) {
|
|
1490
|
-
return /* @__PURE__ */
|
|
1491
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [{ gap: vs(gap) }, style] }, Array.from({ length: count }).map((_, i) => /* @__PURE__ */ React55__default.default.createElement(ListItemSkeleton, { key: i, showAvatar })));
|
|
1491
1492
|
}
|
|
1492
1493
|
const widthPct = `${100 / columns}%`;
|
|
1493
|
-
return /* @__PURE__ */
|
|
1494
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [skeletonStyles.grid, { marginHorizontal: -s(gap) / 2 }, style] }, Array.from({ length: count }).map((_, i) => /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { key: i, style: { width: widthPct, paddingHorizontal: s(gap) / 2, marginBottom: vs(gap) } }, /* @__PURE__ */ React55__default.default.createElement(MediaCardSkeleton, { aspectRatio }))));
|
|
1494
1495
|
}
|
|
1495
1496
|
Skeleton.MediaCard = MediaCardSkeleton;
|
|
1496
1497
|
Skeleton.ListItem = ListItemSkeleton;
|
|
@@ -1553,7 +1554,7 @@ function getInitials(fallback, fallbackText) {
|
|
|
1553
1554
|
}
|
|
1554
1555
|
function AvatarBase({ src, fallback, fallbackText, size = "md", status, style }) {
|
|
1555
1556
|
const { colors } = useTheme();
|
|
1556
|
-
const [imageError, setImageError] =
|
|
1557
|
+
const [imageError, setImageError] = React55.useState(false);
|
|
1557
1558
|
const dimension = typeof size === "number" ? size : sizeMap3[size];
|
|
1558
1559
|
const fontSize = typeof size === "number" ? size * 0.38 : fontSizeMap[size];
|
|
1559
1560
|
const showFallback = !src || imageError;
|
|
@@ -1572,21 +1573,21 @@ function AvatarBase({ src, fallback, fallbackText, size = "md", status, style })
|
|
|
1572
1573
|
overflow: "hidden"
|
|
1573
1574
|
};
|
|
1574
1575
|
const a11yLabel = fallbackText || fallback || "Avatar";
|
|
1575
|
-
return /* @__PURE__ */
|
|
1576
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
1576
1577
|
reactNative.View,
|
|
1577
1578
|
{
|
|
1578
1579
|
style: [styles10.wrapper, style],
|
|
1579
1580
|
accessibilityRole: "image",
|
|
1580
1581
|
accessibilityLabel: a11yLabel
|
|
1581
1582
|
},
|
|
1582
|
-
/* @__PURE__ */
|
|
1583
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles10.base, containerStyle] }, !showFallback ? /* @__PURE__ */ React55__default.default.createElement(
|
|
1583
1584
|
reactNative.Image,
|
|
1584
1585
|
{
|
|
1585
1586
|
source: { uri: src },
|
|
1586
1587
|
style: { width: dimension, height: dimension },
|
|
1587
1588
|
onError: () => setImageError(true)
|
|
1588
1589
|
}
|
|
1589
|
-
) : /* @__PURE__ */
|
|
1590
|
+
) : /* @__PURE__ */ React55__default.default.createElement(
|
|
1590
1591
|
reactNative.Text,
|
|
1591
1592
|
{
|
|
1592
1593
|
style: [styles10.fallback, { color: colors.foregroundMuted, fontSize }],
|
|
@@ -1594,7 +1595,7 @@ function AvatarBase({ src, fallback, fallbackText, size = "md", status, style })
|
|
|
1594
1595
|
},
|
|
1595
1596
|
getInitials(fallback, fallbackText)
|
|
1596
1597
|
)),
|
|
1597
|
-
status && /* @__PURE__ */
|
|
1598
|
+
status && /* @__PURE__ */ React55__default.default.createElement(
|
|
1598
1599
|
reactNative.View,
|
|
1599
1600
|
{
|
|
1600
1601
|
style: [
|
|
@@ -1612,7 +1613,7 @@ function AvatarBase({ src, fallback, fallbackText, size = "md", status, style })
|
|
|
1612
1613
|
)
|
|
1613
1614
|
);
|
|
1614
1615
|
}
|
|
1615
|
-
var Avatar =
|
|
1616
|
+
var Avatar = React55__default.default.memo(AvatarBase);
|
|
1616
1617
|
var styles10 = reactNative.StyleSheet.create({
|
|
1617
1618
|
wrapper: {
|
|
1618
1619
|
alignSelf: "flex-start",
|
|
@@ -1637,15 +1638,15 @@ function AlertBanner({ title, description, variant = "default", icon, iconName,
|
|
|
1637
1638
|
const accentColor = variant === "destructive" ? colors.destructive : variant === "success" ? colors.success : variant === "warning" ? colors.warning : colors.foreground;
|
|
1638
1639
|
const bgColor = variant === "destructive" ? isDark ? "rgba(239, 83, 80, 0.15)" : "rgba(199, 40, 40, 0.10)" : variant === "success" ? isDark ? "rgba(46, 125, 82, 0.15)" : "rgba(26, 122, 69, 0.10)" : variant === "warning" ? isDark ? "rgba(245, 166, 35, 0.15)" : "rgba(154, 82, 0, 0.10)" : colors.surface;
|
|
1639
1640
|
const borderColor = variant === "destructive" ? isDark ? "rgba(239, 83, 80, 0.30)" : "rgba(199, 40, 40, 0.25)" : variant === "success" ? isDark ? "rgba(46, 125, 82, 0.30)" : "rgba(26, 122, 69, 0.25)" : variant === "warning" ? isDark ? "rgba(245, 166, 35, 0.30)" : "rgba(154, 82, 0, 0.25)" : colors.border;
|
|
1640
|
-
const defaultIcon = variant === "success" ? /* @__PURE__ */
|
|
1641
|
+
const defaultIcon = variant === "success" ? /* @__PURE__ */ React55__default.default.createElement(vectorIcons.FontAwesome5, { name: "check-circle", size: ms(16), color: accentColor }) : variant === "destructive" ? /* @__PURE__ */ React55__default.default.createElement(vectorIcons.MaterialIcons, { name: "error-outline", size: ms(17), color: accentColor }) : variant === "warning" ? /* @__PURE__ */ React55__default.default.createElement(vectorIcons.MaterialIcons, { name: "warning-amber", size: ms(17), color: accentColor }) : (
|
|
1641
1642
|
// AUDIT FIX: default variant previously used colors.primary (near-black)
|
|
1642
1643
|
// as the info icon tint — ambiguous and heavy. accentResolved gives it
|
|
1643
1644
|
// a meaningful chromatic signal when an accent is defined.
|
|
1644
|
-
/* @__PURE__ */
|
|
1645
|
+
/* @__PURE__ */ React55__default.default.createElement(vectorIcons.Entypo, { name: "info-with-circle", size: ms(16), color: accentColor })
|
|
1645
1646
|
);
|
|
1646
1647
|
const effectiveIcon = iconName ? renderIcon(iconName, ms(16), iconColor ?? accentColor) : icon ?? defaultIcon;
|
|
1647
1648
|
const a11yLabel = description ? `${title}. ${description}` : title;
|
|
1648
|
-
return /* @__PURE__ */
|
|
1649
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
1649
1650
|
reactNative.View,
|
|
1650
1651
|
{
|
|
1651
1652
|
style: [
|
|
@@ -1656,9 +1657,9 @@ function AlertBanner({ title, description, variant = "default", icon, iconName,
|
|
|
1656
1657
|
accessibilityRole: "alert",
|
|
1657
1658
|
accessibilityLabel: a11yLabel
|
|
1658
1659
|
},
|
|
1659
|
-
/* @__PURE__ */
|
|
1660
|
-
/* @__PURE__ */
|
|
1661
|
-
onDismiss ? /* @__PURE__ */
|
|
1660
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles11.iconSlot }, effectiveIcon),
|
|
1661
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles11.content }, /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles11.title, { color: colors.foreground }], allowFontScaling: true }, title), description ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles11.description, { color: colors.foreground, opacity: 0.85 }], allowFontScaling: true }, description) : null),
|
|
1662
|
+
onDismiss ? /* @__PURE__ */ React55__default.default.createElement(
|
|
1662
1663
|
reactNative.TouchableOpacity,
|
|
1663
1664
|
{
|
|
1664
1665
|
onPress: onDismiss,
|
|
@@ -1667,7 +1668,7 @@ function AlertBanner({ title, description, variant = "default", icon, iconName,
|
|
|
1667
1668
|
accessibilityRole: "button",
|
|
1668
1669
|
accessibilityLabel: "Dismiss"
|
|
1669
1670
|
},
|
|
1670
|
-
/* @__PURE__ */
|
|
1671
|
+
/* @__PURE__ */ React55__default.default.createElement(vectorIcons.Feather, { name: "x", size: ms(16), color: colors.foregroundMuted })
|
|
1671
1672
|
) : null
|
|
1672
1673
|
);
|
|
1673
1674
|
}
|
|
@@ -1704,9 +1705,9 @@ var styles11 = reactNative.StyleSheet.create({
|
|
|
1704
1705
|
function Progress({ value = 0, max = 100, variant = "default", style, accessibilityLabel }) {
|
|
1705
1706
|
const { colors } = useTheme();
|
|
1706
1707
|
const percent = Math.min(Math.max(value / max * 100, 0), 100);
|
|
1707
|
-
const [trackWidth, setTrackWidth] =
|
|
1708
|
+
const [trackWidth, setTrackWidth] = React55.useState(0);
|
|
1708
1709
|
const animatedWidth = Animated12.useSharedValue(0);
|
|
1709
|
-
|
|
1710
|
+
React55.useEffect(() => {
|
|
1710
1711
|
if (trackWidth === 0) return;
|
|
1711
1712
|
animatedWidth.value = Animated12.withSpring(percent / 100 * trackWidth, SPRINGS.glide);
|
|
1712
1713
|
}, [percent, trackWidth, animatedWidth]);
|
|
@@ -1714,7 +1715,7 @@ function Progress({ value = 0, max = 100, variant = "default", style, accessibil
|
|
|
1714
1715
|
width: animatedWidth.value
|
|
1715
1716
|
}));
|
|
1716
1717
|
const indicatorColor = variant === "success" ? colors.success : variant === "warning" ? colors.warning : variant === "destructive" ? colors.destructive : colors.primary;
|
|
1717
|
-
return /* @__PURE__ */
|
|
1718
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
1718
1719
|
reactNative.View,
|
|
1719
1720
|
{
|
|
1720
1721
|
style: [styles12.track, { backgroundColor: colors.surface }, style],
|
|
@@ -1723,7 +1724,7 @@ function Progress({ value = 0, max = 100, variant = "default", style, accessibil
|
|
|
1723
1724
|
accessibilityLabel,
|
|
1724
1725
|
accessibilityValue: { min: 0, max: 100, now: Math.round(percent) }
|
|
1725
1726
|
},
|
|
1726
|
-
/* @__PURE__ */
|
|
1727
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
1727
1728
|
Animated12__default.default.View,
|
|
1728
1729
|
{
|
|
1729
1730
|
style: [styles12.indicator, { backgroundColor: indicatorColor }, indicatorAnimatedStyle]
|
|
@@ -1747,7 +1748,7 @@ function EmptyState({ icon, iconName, iconColor, title, description, action, act
|
|
|
1747
1748
|
const { colors } = useTheme();
|
|
1748
1749
|
const isCompact = size === "compact";
|
|
1749
1750
|
const effectiveIcon = iconName ? renderIcon(iconName, isCompact ? 32 : 48, iconColor ?? colors.foregroundMuted) : icon;
|
|
1750
|
-
return /* @__PURE__ */
|
|
1751
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
1751
1752
|
reactNative.View,
|
|
1752
1753
|
{
|
|
1753
1754
|
style: [
|
|
@@ -1757,7 +1758,7 @@ function EmptyState({ icon, iconName, iconColor, title, description, action, act
|
|
|
1757
1758
|
style
|
|
1758
1759
|
]
|
|
1759
1760
|
},
|
|
1760
|
-
effectiveIcon ? /* @__PURE__ */
|
|
1761
|
+
effectiveIcon ? /* @__PURE__ */ React55__default.default.createElement(
|
|
1761
1762
|
reactNative.View,
|
|
1762
1763
|
{
|
|
1763
1764
|
style: [
|
|
@@ -1768,15 +1769,15 @@ function EmptyState({ icon, iconName, iconColor, title, description, action, act
|
|
|
1768
1769
|
},
|
|
1769
1770
|
effectiveIcon
|
|
1770
1771
|
) : null,
|
|
1771
|
-
/* @__PURE__ */
|
|
1772
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles13.textWrapper }, /* @__PURE__ */ React55__default.default.createElement(
|
|
1772
1773
|
reactNative.Text,
|
|
1773
1774
|
{
|
|
1774
1775
|
style: [styles13.title, isCompact && styles13.titleCompact, { color: colors.foreground }],
|
|
1775
1776
|
allowFontScaling: true
|
|
1776
1777
|
},
|
|
1777
1778
|
title
|
|
1778
|
-
), description && !isCompact ? /* @__PURE__ */
|
|
1779
|
-
!isCompact && (action ? /* @__PURE__ */
|
|
1779
|
+
), description && !isCompact ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles13.description, { color: colors.foregroundMuted }], allowFontScaling: true }, description) : null),
|
|
1780
|
+
!isCompact && (action ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles13.action }, action) : actionLabel && onAction ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles13.action }, /* @__PURE__ */ React55__default.default.createElement(Button, { label: actionLabel, variant: "primary", onPress: onAction })) : null)
|
|
1780
1781
|
);
|
|
1781
1782
|
}
|
|
1782
1783
|
var styles13 = reactNative.StyleSheet.create({
|
|
@@ -1835,7 +1836,7 @@ var styles13 = reactNative.StyleSheet.create({
|
|
|
1835
1836
|
function useColorTransition(active, options = {}) {
|
|
1836
1837
|
const { duration = TIMINGS.state.duration } = options;
|
|
1837
1838
|
const progress = Animated12.useSharedValue(active ? 1 : 0);
|
|
1838
|
-
|
|
1839
|
+
React55.useEffect(() => {
|
|
1839
1840
|
progress.value = Animated12.withTiming(active ? 1 : 0, { duration, easing: EASINGS.standard });
|
|
1840
1841
|
}, [active, duration, progress]);
|
|
1841
1842
|
return progress;
|
|
@@ -1859,7 +1860,7 @@ function Textarea({
|
|
|
1859
1860
|
...props
|
|
1860
1861
|
}) {
|
|
1861
1862
|
const { colors } = useTheme();
|
|
1862
|
-
const [focused, setFocused] =
|
|
1863
|
+
const [focused, setFocused] = React55.useState(false);
|
|
1863
1864
|
const focusProgress = useColorTransition(focused, {
|
|
1864
1865
|
duration: focused ? TIMINGS.focusIn.duration : TIMINGS.focusOut.duration
|
|
1865
1866
|
});
|
|
@@ -1868,7 +1869,7 @@ function Textarea({
|
|
|
1868
1869
|
borderColor: error ? colors.destructive : Animated12.interpolateColor(focusProgress.value, [0, 1], [colors.border, colors.primary]),
|
|
1869
1870
|
borderWidth: error ? 2 : Animated12.interpolate(focusProgress.value, [0, 1], [1, 2])
|
|
1870
1871
|
}));
|
|
1871
|
-
return /* @__PURE__ */
|
|
1872
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles14.container, containerStyle] }, label ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles14.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, /* @__PURE__ */ React55__default.default.createElement(
|
|
1872
1873
|
Animated12__default.default.View,
|
|
1873
1874
|
{
|
|
1874
1875
|
style: [
|
|
@@ -1876,9 +1877,9 @@ function Textarea({
|
|
|
1876
1877
|
{ backgroundColor: colors.background }
|
|
1877
1878
|
]
|
|
1878
1879
|
},
|
|
1879
|
-
/* @__PURE__ */
|
|
1880
|
-
resolvedPrefixIcon ? /* @__PURE__ */
|
|
1881
|
-
/* @__PURE__ */
|
|
1880
|
+
/* @__PURE__ */ React55__default.default.createElement(Animated12__default.default.View, { style: [styles14.borderOverlay, borderAnimStyle], pointerEvents: "none" }),
|
|
1881
|
+
resolvedPrefixIcon ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles14.prefixIcon }, resolvedPrefixIcon) : null,
|
|
1882
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
1882
1883
|
reactNative.TextInput,
|
|
1883
1884
|
{
|
|
1884
1885
|
multiline: true,
|
|
@@ -1907,7 +1908,7 @@ function Textarea({
|
|
|
1907
1908
|
...props
|
|
1908
1909
|
}
|
|
1909
1910
|
)
|
|
1910
|
-
), error ? /* @__PURE__ */
|
|
1911
|
+
), error ? /* @__PURE__ */ React55__default.default.createElement(
|
|
1911
1912
|
reactNative.Text,
|
|
1912
1913
|
{
|
|
1913
1914
|
style: [styles14.helperText, { color: colors.destructive }],
|
|
@@ -1915,7 +1916,7 @@ function Textarea({
|
|
|
1915
1916
|
accessibilityLiveRegion: "polite"
|
|
1916
1917
|
},
|
|
1917
1918
|
error
|
|
1918
|
-
) : null, !error && hint ? /* @__PURE__ */
|
|
1919
|
+
) : null, !error && hint ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles14.helperText, { color: colors.foregroundMuted }], allowFontScaling: true }, hint) : null);
|
|
1919
1920
|
}
|
|
1920
1921
|
var styles14 = reactNative.StyleSheet.create({
|
|
1921
1922
|
container: {
|
|
@@ -1975,7 +1976,7 @@ function Checkbox({
|
|
|
1975
1976
|
// AUDIT FIX: opacity was applied only to the box, leaving the label at full
|
|
1976
1977
|
// opacity when disabled — a contradictory visual signal. Now the entire row
|
|
1977
1978
|
// dims uniformly so label and control communicate the same disabled state.
|
|
1978
|
-
/* @__PURE__ */
|
|
1979
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
1979
1980
|
PressableButton,
|
|
1980
1981
|
{
|
|
1981
1982
|
style: [styles15.row, disabled && styles15.rowDisabled, style],
|
|
@@ -1987,7 +1988,7 @@ function Checkbox({
|
|
|
1987
1988
|
accessibilityLabel: accessibilityLabel ?? label,
|
|
1988
1989
|
accessibilityState: { checked, disabled: !!disabled }
|
|
1989
1990
|
},
|
|
1990
|
-
/* @__PURE__ */
|
|
1991
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
1991
1992
|
reactNativeEase.EaseView,
|
|
1992
1993
|
{
|
|
1993
1994
|
style: styles15.box,
|
|
@@ -1997,9 +1998,9 @@ function Checkbox({
|
|
|
1997
1998
|
},
|
|
1998
1999
|
transition: COLOR_TRANSITION
|
|
1999
2000
|
},
|
|
2000
|
-
/* @__PURE__ */
|
|
2001
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNativeEase.EaseView, { animate: { opacity: checked ? 1 : 0 }, transition: OPACITY_TRANSITION }, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles15.checkmark, { borderColor: colors.primaryForeground }] }))
|
|
2001
2002
|
),
|
|
2002
|
-
label ? /* @__PURE__ */
|
|
2003
|
+
label ? /* @__PURE__ */ React55__default.default.createElement(
|
|
2003
2004
|
reactNative.Text,
|
|
2004
2005
|
{
|
|
2005
2006
|
style: [styles15.label, { color: colors.foreground }],
|
|
@@ -2051,7 +2052,7 @@ var DISABLED_OPACITY = 0.45;
|
|
|
2051
2052
|
function Switch({ checked = false, onCheckedChange, disabled, style, accessibilityLabel }) {
|
|
2052
2053
|
const { colors } = useTheme();
|
|
2053
2054
|
const isDisabled = !!disabled;
|
|
2054
|
-
return /* @__PURE__ */
|
|
2055
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [{ alignSelf: "flex-start" }, style] }, /* @__PURE__ */ React55__default.default.createElement(
|
|
2055
2056
|
reactNative.TouchableOpacity,
|
|
2056
2057
|
{
|
|
2057
2058
|
onPress: () => {
|
|
@@ -2066,14 +2067,14 @@ function Switch({ checked = false, onCheckedChange, disabled, style, accessibili
|
|
|
2066
2067
|
accessibilityState: { checked, disabled: isDisabled },
|
|
2067
2068
|
style: styles16.touchable
|
|
2068
2069
|
},
|
|
2069
|
-
/* @__PURE__ */
|
|
2070
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles16.trackContainer }, /* @__PURE__ */ React55__default.default.createElement(
|
|
2070
2071
|
reactNativeEase.EaseView,
|
|
2071
2072
|
{
|
|
2072
2073
|
style: [styles16.track, isDisabled && styles16.disabledTrack],
|
|
2073
2074
|
animate: { backgroundColor: checked ? colors.primary : colors.surfaceStrong },
|
|
2074
2075
|
transition: COLOR_TRANSITION
|
|
2075
2076
|
}
|
|
2076
|
-
), /* @__PURE__ */
|
|
2077
|
+
), /* @__PURE__ */ React55__default.default.createElement(
|
|
2077
2078
|
reactNativeEase.EaseView,
|
|
2078
2079
|
{
|
|
2079
2080
|
style: [styles16.trackBorder, { borderWidth: 1.5 }],
|
|
@@ -2081,30 +2082,30 @@ function Switch({ checked = false, onCheckedChange, disabled, style, accessibili
|
|
|
2081
2082
|
animate: { borderColor: checked ? "transparent" : colors.border },
|
|
2082
2083
|
transition: COLOR_TRANSITION
|
|
2083
2084
|
}
|
|
2084
|
-
), /* @__PURE__ */
|
|
2085
|
+
), /* @__PURE__ */ React55__default.default.createElement(
|
|
2085
2086
|
reactNativeEase.EaseView,
|
|
2086
2087
|
{
|
|
2087
2088
|
style: [styles16.thumb, { backgroundColor: colors.primaryForeground }],
|
|
2088
2089
|
animate: { translateX: checked ? THUMB_TRAVEL : 0 },
|
|
2089
2090
|
transition: SPRING_ELASTIC
|
|
2090
2091
|
},
|
|
2091
|
-
/* @__PURE__ */
|
|
2092
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
2092
2093
|
reactNativeEase.EaseView,
|
|
2093
2094
|
{
|
|
2094
2095
|
style: styles16.iconWrapper,
|
|
2095
2096
|
animate: { opacity: checked ? isDisabled ? DISABLED_OPACITY : 1 : 0 },
|
|
2096
2097
|
transition: OPACITY_TRANSITION
|
|
2097
2098
|
},
|
|
2098
|
-
/* @__PURE__ */
|
|
2099
|
+
/* @__PURE__ */ React55__default.default.createElement(vectorIcons.Feather, { name: "check", size: ICON_SIZE, color: colors.primary })
|
|
2099
2100
|
),
|
|
2100
|
-
/* @__PURE__ */
|
|
2101
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
2101
2102
|
reactNativeEase.EaseView,
|
|
2102
2103
|
{
|
|
2103
2104
|
style: styles16.iconWrapper,
|
|
2104
2105
|
animate: { opacity: checked ? 0 : isDisabled ? DISABLED_OPACITY : 1 },
|
|
2105
2106
|
transition: OPACITY_TRANSITION
|
|
2106
2107
|
},
|
|
2107
|
-
/* @__PURE__ */
|
|
2108
|
+
/* @__PURE__ */ React55__default.default.createElement(vectorIcons.Feather, { name: "x", size: ICON_SIZE, color: colors.foregroundMuted })
|
|
2108
2109
|
)
|
|
2109
2110
|
))
|
|
2110
2111
|
));
|
|
@@ -2157,15 +2158,15 @@ function ToggleIcon({ pressed, iconName, activeIconName, icon, activeIcon, iconC
|
|
|
2157
2158
|
return prop;
|
|
2158
2159
|
};
|
|
2159
2160
|
if (pressed) {
|
|
2160
|
-
if (activeIconName) return /* @__PURE__ */
|
|
2161
|
+
if (activeIconName) return /* @__PURE__ */ React55__default.default.createElement(React55__default.default.Fragment, null, renderIcon(activeIconName, iconSize, activeIconColor ?? primaryColor));
|
|
2161
2162
|
const active = renderProp(activeIcon);
|
|
2162
|
-
if (active) return /* @__PURE__ */
|
|
2163
|
-
return /* @__PURE__ */
|
|
2163
|
+
if (active) return /* @__PURE__ */ React55__default.default.createElement(React55__default.default.Fragment, null, active);
|
|
2164
|
+
return /* @__PURE__ */ React55__default.default.createElement(vectorIcons.FontAwesome5, { name: "check-circle", size: iconSize, color: primaryColor });
|
|
2164
2165
|
}
|
|
2165
|
-
if (iconName) return /* @__PURE__ */
|
|
2166
|
+
if (iconName) return /* @__PURE__ */ React55__default.default.createElement(React55__default.default.Fragment, null, renderIcon(iconName, iconSize, iconColor ?? mutedColor));
|
|
2166
2167
|
const custom = renderProp(icon);
|
|
2167
|
-
if (custom) return /* @__PURE__ */
|
|
2168
|
-
return /* @__PURE__ */
|
|
2168
|
+
if (custom) return /* @__PURE__ */ React55__default.default.createElement(React55__default.default.Fragment, null, custom);
|
|
2169
|
+
return /* @__PURE__ */ React55__default.default.createElement(vectorIcons.FontAwesome5, { name: "circle", size: iconSize, color: mutedColor });
|
|
2169
2170
|
}
|
|
2170
2171
|
var sizeStyles = {
|
|
2171
2172
|
sm: { paddingHorizontal: s(12), paddingVertical: vs(8), minWidth: s(40), minHeight: vs(40) },
|
|
@@ -2196,7 +2197,7 @@ function Toggle({
|
|
|
2196
2197
|
selectionAsync();
|
|
2197
2198
|
onPressedChange?.(!pressed);
|
|
2198
2199
|
};
|
|
2199
|
-
return /* @__PURE__ */
|
|
2200
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [disabled && styles17.disabled, style] }, /* @__PURE__ */ React55__default.default.createElement(
|
|
2200
2201
|
PressableButton,
|
|
2201
2202
|
{
|
|
2202
2203
|
onPress: handlePress,
|
|
@@ -2208,7 +2209,7 @@ function Toggle({
|
|
|
2208
2209
|
accessibilityLabel: accessibilityLabel ?? label,
|
|
2209
2210
|
accessibilityState: { selected: pressed, disabled: !!disabled }
|
|
2210
2211
|
},
|
|
2211
|
-
/* @__PURE__ */
|
|
2212
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
2212
2213
|
reactNativeEase.EaseView,
|
|
2213
2214
|
{
|
|
2214
2215
|
style: [styles17.base, sizeStyles[size], { borderWidth: 2 }],
|
|
@@ -2218,7 +2219,7 @@ function Toggle({
|
|
|
2218
2219
|
},
|
|
2219
2220
|
transition: COLOR_TRANSITION
|
|
2220
2221
|
},
|
|
2221
|
-
/* @__PURE__ */
|
|
2222
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles17.inner }, /* @__PURE__ */ React55__default.default.createElement(
|
|
2222
2223
|
ToggleIcon,
|
|
2223
2224
|
{
|
|
2224
2225
|
pressed,
|
|
@@ -2232,7 +2233,7 @@ function Toggle({
|
|
|
2232
2233
|
primaryColor: colors.primary,
|
|
2233
2234
|
mutedColor: colors.foregroundMuted
|
|
2234
2235
|
}
|
|
2235
|
-
), label ? /* @__PURE__ */
|
|
2236
|
+
), label ? /* @__PURE__ */ React55__default.default.createElement(
|
|
2236
2237
|
reactNative.Text,
|
|
2237
2238
|
{
|
|
2238
2239
|
style: [styles17.label, { color: pressed ? colors.primary : colors.foreground }],
|
|
@@ -2262,9 +2263,9 @@ var styles17 = reactNative.StyleSheet.create({
|
|
|
2262
2263
|
}
|
|
2263
2264
|
});
|
|
2264
2265
|
function useHover() {
|
|
2265
|
-
const [hovered, setHovered] =
|
|
2266
|
-
const onMouseEnter =
|
|
2267
|
-
const onMouseLeave =
|
|
2266
|
+
const [hovered, setHovered] = React55.useState(false);
|
|
2267
|
+
const onMouseEnter = React55.useCallback(() => setHovered(true), []);
|
|
2268
|
+
const onMouseLeave = React55.useCallback(() => setHovered(false), []);
|
|
2268
2269
|
if (reactNative.Platform.OS !== "web") {
|
|
2269
2270
|
return { hovered: false, hoverHandlers: {} };
|
|
2270
2271
|
}
|
|
@@ -2281,11 +2282,11 @@ function usePressScale({
|
|
|
2281
2282
|
} = {}) {
|
|
2282
2283
|
const scale2 = Animated12.useSharedValue(1);
|
|
2283
2284
|
const { hovered, hoverHandlers } = useHover();
|
|
2284
|
-
const onPressIn =
|
|
2285
|
+
const onPressIn = React55.useCallback(() => {
|
|
2285
2286
|
if (disabled) return;
|
|
2286
2287
|
scale2.value = Animated12.withSpring(pressScale, pressInSpring);
|
|
2287
2288
|
}, [disabled, pressScale, pressInSpring, scale2]);
|
|
2288
|
-
const onPressOut =
|
|
2289
|
+
const onPressOut = React55.useCallback(() => {
|
|
2289
2290
|
if (disabled) return;
|
|
2290
2291
|
scale2.value = Animated12.withSpring(1, pressOutSpring);
|
|
2291
2292
|
}, [disabled, pressOutSpring, scale2]);
|
|
@@ -2318,7 +2319,7 @@ function RadioItem({
|
|
|
2318
2319
|
// AUDIT FIX: opacity was applied only to the radio circle, leaving the label
|
|
2319
2320
|
// at full opacity when disabled. The whole row now dims uniformly so users
|
|
2320
2321
|
// get a single, consistent disabled signal across the entire item.
|
|
2321
|
-
/* @__PURE__ */
|
|
2322
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
2322
2323
|
reactNative.TouchableOpacity,
|
|
2323
2324
|
{
|
|
2324
2325
|
style: [styles18.row, option.disabled && styles18.rowDisabled],
|
|
@@ -2337,14 +2338,14 @@ function RadioItem({
|
|
|
2337
2338
|
accessibilityLabel: option.label,
|
|
2338
2339
|
accessibilityState: { checked: selected, disabled: !!option.disabled }
|
|
2339
2340
|
},
|
|
2340
|
-
/* @__PURE__ */
|
|
2341
|
+
/* @__PURE__ */ React55__default.default.createElement(Animated12__default.default.View, { style: scaleStyle }, /* @__PURE__ */ React55__default.default.createElement(
|
|
2341
2342
|
reactNativeEase.EaseView,
|
|
2342
2343
|
{
|
|
2343
2344
|
style: styles18.radio,
|
|
2344
2345
|
animate: { borderColor: selected ? colors.primary : colors.border },
|
|
2345
2346
|
transition: COLOR_TRANSITION
|
|
2346
2347
|
},
|
|
2347
|
-
/* @__PURE__ */
|
|
2348
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
2348
2349
|
reactNativeEase.EaseView,
|
|
2349
2350
|
{
|
|
2350
2351
|
style: [styles18.dot, { backgroundColor: colors.primary }],
|
|
@@ -2353,7 +2354,7 @@ function RadioItem({
|
|
|
2353
2354
|
}
|
|
2354
2355
|
)
|
|
2355
2356
|
)),
|
|
2356
|
-
/* @__PURE__ */
|
|
2357
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
2357
2358
|
reactNative.Text,
|
|
2358
2359
|
{
|
|
2359
2360
|
style: [styles18.label, { color: colors.foreground }],
|
|
@@ -2372,14 +2373,14 @@ function RadioGroup({
|
|
|
2372
2373
|
style,
|
|
2373
2374
|
accessibilityLabel
|
|
2374
2375
|
}) {
|
|
2375
|
-
return /* @__PURE__ */
|
|
2376
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
2376
2377
|
reactNative.View,
|
|
2377
2378
|
{
|
|
2378
2379
|
style: [styles18.container, orientation === "horizontal" && styles18.horizontal, style],
|
|
2379
2380
|
accessibilityRole: "radiogroup",
|
|
2380
2381
|
accessibilityLabel
|
|
2381
2382
|
},
|
|
2382
|
-
options.map((option) => /* @__PURE__ */
|
|
2383
|
+
options.map((option) => /* @__PURE__ */ React55__default.default.createElement(
|
|
2383
2384
|
RadioItem,
|
|
2384
2385
|
{
|
|
2385
2386
|
key: option.value,
|
|
@@ -2435,7 +2436,7 @@ function TabTrigger({
|
|
|
2435
2436
|
}) {
|
|
2436
2437
|
const { colors } = useTheme();
|
|
2437
2438
|
const isUnderline = variant === "underline";
|
|
2438
|
-
return /* @__PURE__ */
|
|
2439
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { onLayout, style: styles19.triggerWrap }, /* @__PURE__ */ React55__default.default.createElement(
|
|
2439
2440
|
PressableTab,
|
|
2440
2441
|
{
|
|
2441
2442
|
style: [
|
|
@@ -2450,7 +2451,7 @@ function TabTrigger({
|
|
|
2450
2451
|
accessibilityState: { selected: isActive },
|
|
2451
2452
|
accessibilityLabel: tab.label
|
|
2452
2453
|
},
|
|
2453
|
-
/* @__PURE__ */
|
|
2454
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles19.triggerInner }, tab.icon ? typeof tab.icon === "function" ? tab.icon(isActive) : tab.icon : null, /* @__PURE__ */ React55__default.default.createElement(
|
|
2454
2455
|
reactNative.Text,
|
|
2455
2456
|
{
|
|
2456
2457
|
style: [
|
|
@@ -2468,14 +2469,14 @@ function TabTrigger({
|
|
|
2468
2469
|
));
|
|
2469
2470
|
}
|
|
2470
2471
|
function Tabs({ tabs, variant = "pill", value, onValueChange, children, style }) {
|
|
2471
|
-
const [internal, setInternal] =
|
|
2472
|
+
const [internal, setInternal] = React55.useState(tabs[0]?.value ?? "");
|
|
2472
2473
|
const { colors } = useTheme();
|
|
2473
2474
|
const active = value ?? internal;
|
|
2474
|
-
const tabLayouts =
|
|
2475
|
+
const tabLayouts = React55.useRef({});
|
|
2475
2476
|
const pillX = Animated12.useSharedValue(0);
|
|
2476
2477
|
const pillWidth = Animated12.useSharedValue(0);
|
|
2477
|
-
const initialised =
|
|
2478
|
-
const animatePill =
|
|
2478
|
+
const initialised = React55.useRef(false);
|
|
2479
|
+
const animatePill = React55.useCallback((tabValue, animate) => {
|
|
2479
2480
|
const layout = tabLayouts.current[tabValue];
|
|
2480
2481
|
if (!layout) return;
|
|
2481
2482
|
if (animate) {
|
|
@@ -2486,7 +2487,7 @@ function Tabs({ tabs, variant = "pill", value, onValueChange, children, style })
|
|
|
2486
2487
|
pillWidth.value = layout.width;
|
|
2487
2488
|
}
|
|
2488
2489
|
}, [pillX, pillWidth]);
|
|
2489
|
-
|
|
2490
|
+
React55.useEffect(() => {
|
|
2490
2491
|
if (initialised.current) animatePill(active, true);
|
|
2491
2492
|
}, [active, animatePill]);
|
|
2492
2493
|
const handlePress = (v) => {
|
|
@@ -2498,7 +2499,7 @@ function Tabs({ tabs, variant = "pill", value, onValueChange, children, style })
|
|
|
2498
2499
|
transform: [{ translateX: pillX.value }],
|
|
2499
2500
|
width: pillWidth.value
|
|
2500
2501
|
}));
|
|
2501
|
-
return /* @__PURE__ */
|
|
2502
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style }, /* @__PURE__ */ React55__default.default.createElement(
|
|
2502
2503
|
reactNative.View,
|
|
2503
2504
|
{
|
|
2504
2505
|
style: [
|
|
@@ -2506,7 +2507,7 @@ function Tabs({ tabs, variant = "pill", value, onValueChange, children, style })
|
|
|
2506
2507
|
],
|
|
2507
2508
|
accessibilityRole: "tablist"
|
|
2508
2509
|
},
|
|
2509
|
-
variant === "pill" && /* @__PURE__ */
|
|
2510
|
+
variant === "pill" && /* @__PURE__ */ React55__default.default.createElement(
|
|
2510
2511
|
Animated12__default.default.View,
|
|
2511
2512
|
{
|
|
2512
2513
|
style: [
|
|
@@ -2528,7 +2529,7 @@ function Tabs({ tabs, variant = "pill", value, onValueChange, children, style })
|
|
|
2528
2529
|
]
|
|
2529
2530
|
}
|
|
2530
2531
|
),
|
|
2531
|
-
tabs.map((tab) => /* @__PURE__ */
|
|
2532
|
+
tabs.map((tab) => /* @__PURE__ */ React55__default.default.createElement(
|
|
2532
2533
|
TabTrigger,
|
|
2533
2534
|
{
|
|
2534
2535
|
key: tab.value,
|
|
@@ -2550,7 +2551,7 @@ function Tabs({ tabs, variant = "pill", value, onValueChange, children, style })
|
|
|
2550
2551
|
}
|
|
2551
2552
|
function TabsContent({ value, activeValue, children, style }) {
|
|
2552
2553
|
if (value !== activeValue) return null;
|
|
2553
|
-
return /* @__PURE__ */
|
|
2554
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style, accessibilityRole: "none" }, children);
|
|
2554
2555
|
}
|
|
2555
2556
|
var styles19 = reactNative.StyleSheet.create({
|
|
2556
2557
|
list: {
|
|
@@ -2611,7 +2612,7 @@ function AccordionItemComponent({
|
|
|
2611
2612
|
const resolvedIcon = item.iconName ? renderIcon(item.iconName, ms(16), item.iconColor ?? colors.foregroundMuted) : item.icon;
|
|
2612
2613
|
const isExpanded = Animated12.useSharedValue(isOpen);
|
|
2613
2614
|
const height = Animated12.useSharedValue(0);
|
|
2614
|
-
|
|
2615
|
+
React55__default.default.useEffect(() => {
|
|
2615
2616
|
isExpanded.value = isOpen;
|
|
2616
2617
|
}, [isOpen, isExpanded]);
|
|
2617
2618
|
const derivedHeight = Animated12.useDerivedValue(
|
|
@@ -2633,7 +2634,7 @@ function AccordionItemComponent({
|
|
|
2633
2634
|
const rotationStyle = Animated12.useAnimatedStyle(() => ({
|
|
2634
2635
|
transform: [{ rotate: `${derivedRotation.value * 180}deg` }]
|
|
2635
2636
|
}));
|
|
2636
|
-
return /* @__PURE__ */
|
|
2637
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles20.item, { backgroundColor: colors.card, borderColor: colors.border }] }, /* @__PURE__ */ React55__default.default.createElement(
|
|
2637
2638
|
reactNative.Pressable,
|
|
2638
2639
|
{
|
|
2639
2640
|
style: ({ pressed }) => [styles20.trigger, { opacity: pressed ? 0.6 : 1 }],
|
|
@@ -2645,9 +2646,17 @@ function AccordionItemComponent({
|
|
|
2645
2646
|
accessibilityState: { expanded: isOpen },
|
|
2646
2647
|
accessibilityLabel: typeof item.trigger === "string" ? item.trigger : void 0
|
|
2647
2648
|
},
|
|
2648
|
-
/* @__PURE__ */
|
|
2649
|
-
|
|
2650
|
-
|
|
2649
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles20.triggerContent }, resolvedIcon ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles20.icon }, resolvedIcon) : null, typeof item.trigger === "string" ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles20.triggerText, { color: colors.foreground }], allowFontScaling: true }, item.trigger) : item.trigger),
|
|
2650
|
+
item.triggerActions ? /* @__PURE__ */ React55__default.default.createElement(
|
|
2651
|
+
reactNative.View,
|
|
2652
|
+
{
|
|
2653
|
+
style: styles20.triggerActions,
|
|
2654
|
+
onTouchEnd: (e) => e.stopPropagation()
|
|
2655
|
+
},
|
|
2656
|
+
item.triggerActions
|
|
2657
|
+
) : null,
|
|
2658
|
+
/* @__PURE__ */ React55__default.default.createElement(Animated12__default.default.View, { style: [styles20.chevron, rotationStyle] }, /* @__PURE__ */ React55__default.default.createElement(vectorIcons.Entypo, { name: "chevron-down", size: 18, color: colors.foregroundMuted }))
|
|
2659
|
+
), /* @__PURE__ */ React55__default.default.createElement(Animated12__default.default.View, { style: bodyStyle }, /* @__PURE__ */ React55__default.default.createElement(
|
|
2651
2660
|
reactNative.View,
|
|
2652
2661
|
{
|
|
2653
2662
|
style: styles20.content,
|
|
@@ -2655,11 +2664,11 @@ function AccordionItemComponent({
|
|
|
2655
2664
|
height.value = e.nativeEvent.layout.height;
|
|
2656
2665
|
}
|
|
2657
2666
|
},
|
|
2658
|
-
typeof item.content === "string" || typeof item.content === "number" ? /* @__PURE__ */
|
|
2667
|
+
typeof item.content === "string" || typeof item.content === "number" ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles20.contentText, { color: colors.foregroundMuted }], allowFontScaling: true }, item.content) : item.content
|
|
2659
2668
|
)));
|
|
2660
2669
|
}
|
|
2661
2670
|
function Accordion({ items, type = "single", defaultValue, style }) {
|
|
2662
|
-
const [openValues, setOpenValues] =
|
|
2671
|
+
const [openValues, setOpenValues] = React55.useState(() => {
|
|
2663
2672
|
if (!defaultValue) return [];
|
|
2664
2673
|
return Array.isArray(defaultValue) ? defaultValue : [defaultValue];
|
|
2665
2674
|
});
|
|
@@ -2672,7 +2681,7 @@ function Accordion({ items, type = "single", defaultValue, style }) {
|
|
|
2672
2681
|
);
|
|
2673
2682
|
}
|
|
2674
2683
|
};
|
|
2675
|
-
return /* @__PURE__ */
|
|
2684
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles20.list, style] }, items.map((item) => /* @__PURE__ */ React55__default.default.createElement(
|
|
2676
2685
|
AccordionItemComponent,
|
|
2677
2686
|
{
|
|
2678
2687
|
key: item.value,
|
|
@@ -2715,6 +2724,12 @@ var styles20 = reactNative.StyleSheet.create({
|
|
|
2715
2724
|
chevron: {
|
|
2716
2725
|
marginLeft: s(8)
|
|
2717
2726
|
},
|
|
2727
|
+
triggerActions: {
|
|
2728
|
+
flexDirection: "row",
|
|
2729
|
+
alignItems: "center",
|
|
2730
|
+
gap: s(4),
|
|
2731
|
+
marginLeft: s(8)
|
|
2732
|
+
},
|
|
2718
2733
|
// position:'absolute' is the key — the inner View escapes the animated wrapper's
|
|
2719
2734
|
// clipped height so onLayout always reports the true content height.
|
|
2720
2735
|
content: {
|
|
@@ -2744,7 +2759,7 @@ function Slider({
|
|
|
2744
2759
|
style
|
|
2745
2760
|
}) {
|
|
2746
2761
|
const { colors } = useTheme();
|
|
2747
|
-
const lastSteppedValue =
|
|
2762
|
+
const lastSteppedValue = React55.useRef(value);
|
|
2748
2763
|
const handleValueChange = (v) => {
|
|
2749
2764
|
if (step && v !== lastSteppedValue.current) {
|
|
2750
2765
|
lastSteppedValue.current = v;
|
|
@@ -2752,7 +2767,7 @@ function Slider({
|
|
|
2752
2767
|
}
|
|
2753
2768
|
onValueChange?.(v);
|
|
2754
2769
|
};
|
|
2755
|
-
return /* @__PURE__ */
|
|
2770
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
2756
2771
|
reactNative.View,
|
|
2757
2772
|
{
|
|
2758
2773
|
style: [styles21.wrapper, style],
|
|
@@ -2765,8 +2780,8 @@ function Slider({
|
|
|
2765
2780
|
text: formatValue2(value)
|
|
2766
2781
|
}
|
|
2767
2782
|
},
|
|
2768
|
-
label || showValue ? /* @__PURE__ */
|
|
2769
|
-
/* @__PURE__ */
|
|
2783
|
+
label || showValue ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles21.header }, label ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles21.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, showValue ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles21.valueText, { color: colors.foregroundMuted }], allowFontScaling: true }, formatValue2(value)) : null) : null,
|
|
2784
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: disabled ? styles21.disabled : void 0 }, /* @__PURE__ */ React55__default.default.createElement(
|
|
2770
2785
|
RNSlider__default.default,
|
|
2771
2786
|
{
|
|
2772
2787
|
value,
|
|
@@ -2811,14 +2826,14 @@ var styles21 = reactNative.StyleSheet.create({
|
|
|
2811
2826
|
}
|
|
2812
2827
|
});
|
|
2813
2828
|
function SheetHeader({ children, style }) {
|
|
2814
|
-
return /* @__PURE__ */
|
|
2829
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles22.header, style] }, children);
|
|
2815
2830
|
}
|
|
2816
2831
|
function SheetContent({ children, style }) {
|
|
2817
|
-
return /* @__PURE__ */
|
|
2832
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles22.sheetContent, style] }, children);
|
|
2818
2833
|
}
|
|
2819
2834
|
function SheetFooter({ children, style }) {
|
|
2820
2835
|
const { colors } = useTheme();
|
|
2821
|
-
return /* @__PURE__ */
|
|
2836
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles22.sheetFooter, { backgroundColor: colors.card, borderTopColor: colors.border }, style] }, children);
|
|
2822
2837
|
}
|
|
2823
2838
|
function Sheet({
|
|
2824
2839
|
open,
|
|
@@ -2840,20 +2855,26 @@ function Sheet({
|
|
|
2840
2855
|
}) {
|
|
2841
2856
|
const { colors } = useTheme();
|
|
2842
2857
|
const insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
2843
|
-
const ref =
|
|
2844
|
-
const wasOpened =
|
|
2845
|
-
const
|
|
2846
|
-
|
|
2847
|
-
|
|
2858
|
+
const ref = React55.useRef(null);
|
|
2859
|
+
const wasOpened = React55.useRef(false);
|
|
2860
|
+
const isPresentedRef = React55.useRef(false);
|
|
2861
|
+
const name = React55.useId();
|
|
2862
|
+
const handleDismiss = React55.useCallback(() => {
|
|
2863
|
+
isPresentedRef.current = false;
|
|
2864
|
+
onClose?.();
|
|
2865
|
+
}, [onClose]);
|
|
2866
|
+
React55.useEffect(() => {
|
|
2867
|
+
if (open && !isPresentedRef.current) {
|
|
2848
2868
|
impactMedium();
|
|
2849
2869
|
ref.current?.present();
|
|
2850
2870
|
wasOpened.current = true;
|
|
2851
|
-
|
|
2871
|
+
isPresentedRef.current = true;
|
|
2872
|
+
} else if (!open && wasOpened.current && isPresentedRef.current) {
|
|
2852
2873
|
ref.current?.dismiss();
|
|
2853
2874
|
}
|
|
2854
2875
|
}, [open]);
|
|
2855
|
-
const renderBackdrop =
|
|
2856
|
-
(props) => /* @__PURE__ */
|
|
2876
|
+
const renderBackdrop = React55.useCallback(
|
|
2877
|
+
(props) => /* @__PURE__ */ React55__default.default.createElement(
|
|
2857
2878
|
bottomSheet.BottomSheetBackdrop,
|
|
2858
2879
|
{
|
|
2859
2880
|
...props,
|
|
@@ -2864,15 +2885,15 @@ function Sheet({
|
|
|
2864
2885
|
),
|
|
2865
2886
|
[]
|
|
2866
2887
|
);
|
|
2867
|
-
const childArray =
|
|
2868
|
-
const customHeader = childArray.find((child) =>
|
|
2869
|
-
const customContent = childArray.find((child) =>
|
|
2870
|
-
const customFooter = childArray.find((child) =>
|
|
2888
|
+
const childArray = React55__default.default.Children.toArray(children);
|
|
2889
|
+
const customHeader = childArray.find((child) => React55__default.default.isValidElement(child) && child.type === SheetHeader);
|
|
2890
|
+
const customContent = childArray.find((child) => React55__default.default.isValidElement(child) && child.type === SheetContent);
|
|
2891
|
+
const customFooter = childArray.find((child) => React55__default.default.isValidElement(child) && child.type === SheetFooter);
|
|
2871
2892
|
const filteredChildren = customHeader || customContent || customFooter ? childArray.filter(
|
|
2872
|
-
(child) => !
|
|
2893
|
+
(child) => !React55__default.default.isValidElement(child) || child.type !== SheetHeader && child.type !== SheetContent && child.type !== SheetFooter
|
|
2873
2894
|
) : children;
|
|
2874
2895
|
const showHeader = !!(title || subtitle || showCloseButton) && !customHeader;
|
|
2875
|
-
const headerNode = customHeader ? customHeader : showHeader ? /* @__PURE__ */
|
|
2896
|
+
const headerNode = customHeader ? customHeader : showHeader ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles22.header, { backgroundColor: colors.card }], accessibilityRole: "header" }, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles22.headerRow }, title ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles22.title, { color: colors.foreground }], allowFontScaling: true }, title) : /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: { flex: 1 } }), showCloseButton ? /* @__PURE__ */ React55__default.default.createElement(
|
|
2876
2897
|
reactNative.TouchableOpacity,
|
|
2877
2898
|
{
|
|
2878
2899
|
onPress: onClose,
|
|
@@ -2883,24 +2904,24 @@ function Sheet({
|
|
|
2883
2904
|
accessibilityLabel: "Close",
|
|
2884
2905
|
hitSlop: { top: 12, bottom: 12, left: 12, right: 12 }
|
|
2885
2906
|
},
|
|
2886
|
-
/* @__PURE__ */
|
|
2887
|
-
) : null), subtitle ? /* @__PURE__ */
|
|
2907
|
+
/* @__PURE__ */ React55__default.default.createElement(vectorIcons.AntDesign, { name: "close", size: ms(18), color: colors.foregroundMuted })
|
|
2908
|
+
) : null), subtitle ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles22.subtitle, { color: colors.foregroundMuted }], allowFontScaling: true }, subtitle) : null) : null;
|
|
2888
2909
|
const contentNode = customContent ? customContent : filteredChildren;
|
|
2889
2910
|
const effectiveFooter = customFooter ? customFooter : footer;
|
|
2890
|
-
const renderFooter =
|
|
2911
|
+
const renderFooter = React55.useCallback(
|
|
2891
2912
|
(props) => {
|
|
2892
2913
|
if (!effectiveFooter) return null;
|
|
2893
|
-
return /* @__PURE__ */
|
|
2914
|
+
return /* @__PURE__ */ React55__default.default.createElement(bottomSheet.BottomSheetFooter, { ...props }, effectiveFooter);
|
|
2894
2915
|
},
|
|
2895
2916
|
[effectiveFooter]
|
|
2896
2917
|
);
|
|
2897
2918
|
const useDynamicSizing = !snapPoints;
|
|
2898
|
-
return /* @__PURE__ */
|
|
2919
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
2899
2920
|
bottomSheet.BottomSheetModal,
|
|
2900
2921
|
{
|
|
2901
2922
|
ref,
|
|
2902
2923
|
name,
|
|
2903
|
-
onDismiss:
|
|
2924
|
+
onDismiss: handleDismiss,
|
|
2904
2925
|
enableDynamicSizing: useDynamicSizing,
|
|
2905
2926
|
snapPoints,
|
|
2906
2927
|
maxDynamicContentSize: useDynamicSizing && maxHeight ? maxHeight : void 0,
|
|
@@ -2915,7 +2936,7 @@ function Sheet({
|
|
|
2915
2936
|
android_keyboardInputMode,
|
|
2916
2937
|
enableBlurKeyboardOnGesture
|
|
2917
2938
|
},
|
|
2918
|
-
scrollable ? /* @__PURE__ */
|
|
2939
|
+
scrollable ? /* @__PURE__ */ React55__default.default.createElement(
|
|
2919
2940
|
bottomSheet.BottomSheetScrollView,
|
|
2920
2941
|
{
|
|
2921
2942
|
contentContainerStyle: [styles22.scrollContent, style],
|
|
@@ -2926,7 +2947,7 @@ function Sheet({
|
|
|
2926
2947
|
},
|
|
2927
2948
|
headerNode,
|
|
2928
2949
|
contentNode
|
|
2929
|
-
) : /* @__PURE__ */
|
|
2950
|
+
) : /* @__PURE__ */ React55__default.default.createElement(bottomSheet.BottomSheetView, { style: [styles22.content, contentStyle, style] }, headerNode, contentNode)
|
|
2930
2951
|
);
|
|
2931
2952
|
}
|
|
2932
2953
|
Sheet.Header = SheetHeader;
|
|
@@ -3005,9 +3026,9 @@ function Select({
|
|
|
3005
3026
|
pressScale: PRESS_SCALE.button,
|
|
3006
3027
|
disabled
|
|
3007
3028
|
});
|
|
3008
|
-
const [pickerVisible, setPickerVisible] =
|
|
3009
|
-
const [pendingValue, setPendingValue] =
|
|
3010
|
-
const pickerRef =
|
|
3029
|
+
const [pickerVisible, setPickerVisible] = React55.useState(false);
|
|
3030
|
+
const [pendingValue, setPendingValue] = React55.useState(value);
|
|
3031
|
+
const pickerRef = React55.useRef(null);
|
|
3011
3032
|
const selected = options.find((o) => o.value === value);
|
|
3012
3033
|
const handleOpen = () => {
|
|
3013
3034
|
if (disabled) return;
|
|
@@ -3029,7 +3050,7 @@ function Select({
|
|
|
3029
3050
|
}
|
|
3030
3051
|
setPickerVisible(false);
|
|
3031
3052
|
};
|
|
3032
|
-
return /* @__PURE__ */
|
|
3053
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles23.container, style] }, label ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles23.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, !isWeb2 ? /* @__PURE__ */ React55__default.default.createElement(Animated12__default.default.View, { style: [animatedStyle, { opacity: disabled ? 0.45 : 1 }] }, /* @__PURE__ */ React55__default.default.createElement(
|
|
3033
3054
|
reactNative.TouchableOpacity,
|
|
3034
3055
|
{
|
|
3035
3056
|
style: [
|
|
@@ -3049,7 +3070,7 @@ function Select({
|
|
|
3049
3070
|
accessibilityValue: { text: selected?.label ?? placeholder },
|
|
3050
3071
|
accessibilityState: { disabled: !!disabled, expanded: pickerVisible }
|
|
3051
3072
|
},
|
|
3052
|
-
/* @__PURE__ */
|
|
3073
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
3053
3074
|
reactNative.Text,
|
|
3054
3075
|
{
|
|
3055
3076
|
style: [
|
|
@@ -3061,8 +3082,8 @@ function Select({
|
|
|
3061
3082
|
},
|
|
3062
3083
|
selected?.label ?? placeholder
|
|
3063
3084
|
),
|
|
3064
|
-
/* @__PURE__ */
|
|
3065
|
-
)) : null, isIOS ? /* @__PURE__ */
|
|
3085
|
+
/* @__PURE__ */ React55__default.default.createElement(vectorIcons.Entypo, { name: "chevron-down", size: 20, color: colors.foregroundMuted })
|
|
3086
|
+
)) : null, isIOS ? /* @__PURE__ */ React55__default.default.createElement(
|
|
3066
3087
|
reactNative.Modal,
|
|
3067
3088
|
{
|
|
3068
3089
|
visible: pickerVisible,
|
|
@@ -3070,16 +3091,16 @@ function Select({
|
|
|
3070
3091
|
animationType: "slide",
|
|
3071
3092
|
onRequestClose: handleDismiss
|
|
3072
3093
|
},
|
|
3073
|
-
/* @__PURE__ */
|
|
3074
|
-
/* @__PURE__ */
|
|
3094
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.TouchableOpacity, { style: styles23.iosBackdrop, activeOpacity: 1, onPress: handleDismiss }),
|
|
3095
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles23.iosSheet, { backgroundColor: colors.card }] }, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles23.iosToolbar, { borderBottomColor: colors.border }] }, label ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles23.iosToolbarTitle, { color: colors.foreground }], allowFontScaling: true }, label) : /* @__PURE__ */ React55__default.default.createElement(reactNative.View, null), /* @__PURE__ */ React55__default.default.createElement(reactNative.TouchableOpacity, { onPress: handleConfirm, style: styles23.iosDoneBtn, hitSlop: { top: 8, bottom: 8, left: 8, right: 8 } }, /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles23.iosDoneBtnText, { color: colors.primary }], allowFontScaling: true }, "Done"))), /* @__PURE__ */ React55__default.default.createElement(
|
|
3075
3096
|
picker.Picker,
|
|
3076
3097
|
{
|
|
3077
3098
|
selectedValue: pendingValue ?? "",
|
|
3078
3099
|
onValueChange: (val) => setPendingValue(val),
|
|
3079
3100
|
itemStyle: { color: colors.foreground }
|
|
3080
3101
|
},
|
|
3081
|
-
!value ? /* @__PURE__ */
|
|
3082
|
-
options.map((o) => /* @__PURE__ */
|
|
3102
|
+
!value ? /* @__PURE__ */ React55__default.default.createElement(picker.Picker.Item, { label: placeholder, value: "", color: colors.foregroundMuted, enabled: false }) : null,
|
|
3103
|
+
options.map((o) => /* @__PURE__ */ React55__default.default.createElement(
|
|
3083
3104
|
picker.Picker.Item,
|
|
3084
3105
|
{
|
|
3085
3106
|
key: o.value,
|
|
@@ -3090,7 +3111,7 @@ function Select({
|
|
|
3090
3111
|
}
|
|
3091
3112
|
))
|
|
3092
3113
|
))
|
|
3093
|
-
) : null, isAndroid ? /* @__PURE__ */
|
|
3114
|
+
) : null, isAndroid ? /* @__PURE__ */ React55__default.default.createElement(
|
|
3094
3115
|
picker.Picker,
|
|
3095
3116
|
{
|
|
3096
3117
|
ref: pickerRef,
|
|
@@ -3106,8 +3127,8 @@ function Select({
|
|
|
3106
3127
|
prompt: label,
|
|
3107
3128
|
style: styles23.androidHiddenPicker
|
|
3108
3129
|
},
|
|
3109
|
-
!value ? /* @__PURE__ */
|
|
3110
|
-
options.map((o) => /* @__PURE__ */
|
|
3130
|
+
!value ? /* @__PURE__ */ React55__default.default.createElement(picker.Picker.Item, { label: placeholder, value: "", enabled: false }) : null,
|
|
3131
|
+
options.map((o) => /* @__PURE__ */ React55__default.default.createElement(
|
|
3111
3132
|
picker.Picker.Item,
|
|
3112
3133
|
{
|
|
3113
3134
|
key: o.value,
|
|
@@ -3116,7 +3137,7 @@ function Select({
|
|
|
3116
3137
|
enabled: !o.disabled
|
|
3117
3138
|
}
|
|
3118
3139
|
))
|
|
3119
|
-
) : null, isWeb2 ? /* @__PURE__ */
|
|
3140
|
+
) : null, isWeb2 ? /* @__PURE__ */ React55__default.default.createElement(
|
|
3120
3141
|
picker.Picker,
|
|
3121
3142
|
{
|
|
3122
3143
|
selectedValue: value ?? "",
|
|
@@ -3136,8 +3157,8 @@ function Select({
|
|
|
3136
3157
|
}
|
|
3137
3158
|
]
|
|
3138
3159
|
},
|
|
3139
|
-
/* @__PURE__ */
|
|
3140
|
-
options.map((o) => /* @__PURE__ */
|
|
3160
|
+
/* @__PURE__ */ React55__default.default.createElement(picker.Picker.Item, { label: placeholder, value: "", enabled: false }),
|
|
3161
|
+
options.map((o) => /* @__PURE__ */ React55__default.default.createElement(
|
|
3141
3162
|
picker.Picker.Item,
|
|
3142
3163
|
{
|
|
3143
3164
|
key: o.value,
|
|
@@ -3146,7 +3167,7 @@ function Select({
|
|
|
3146
3167
|
enabled: !o.disabled
|
|
3147
3168
|
}
|
|
3148
3169
|
))
|
|
3149
|
-
) : null, error ? /* @__PURE__ */
|
|
3170
|
+
) : null, error ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles23.helperText, { color: colors.destructive }], allowFontScaling: true }, error) : null);
|
|
3150
3171
|
}
|
|
3151
3172
|
var styles23 = reactNative.StyleSheet.create({
|
|
3152
3173
|
container: {
|
|
@@ -3227,7 +3248,7 @@ function useToast() {
|
|
|
3227
3248
|
function ToastProvider({ children }) {
|
|
3228
3249
|
const { colorScheme } = useTheme();
|
|
3229
3250
|
const insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
3230
|
-
return /* @__PURE__ */
|
|
3251
|
+
return /* @__PURE__ */ React55__default.default.createElement(React55__default.default.Fragment, null, children, /* @__PURE__ */ React55__default.default.createElement(
|
|
3231
3252
|
sonnerNative.Toaster,
|
|
3232
3253
|
{
|
|
3233
3254
|
theme: colorScheme,
|
|
@@ -3296,7 +3317,7 @@ function CurrencyInput({
|
|
|
3296
3317
|
fontSize: isLarge ? ms(32) : ms(17)
|
|
3297
3318
|
};
|
|
3298
3319
|
const displayValue = value && prefix && value.startsWith(prefix) ? value.slice(prefix.length) : value;
|
|
3299
|
-
return /* @__PURE__ */
|
|
3320
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
3300
3321
|
Input,
|
|
3301
3322
|
{
|
|
3302
3323
|
...props,
|
|
@@ -3347,7 +3368,7 @@ function CurrencyDisplayBase({ value, prefix = "$", showDecimals = false, textCo
|
|
|
3347
3368
|
const baseFontSize = variant ? variantFontSize[variant] : ms(56);
|
|
3348
3369
|
const fontSize = maxFontSize ?? baseFontSize;
|
|
3349
3370
|
const letterSpacing = variant ? variantLetterSpacing[variant] : -2;
|
|
3350
|
-
return /* @__PURE__ */
|
|
3371
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles24.container, style] }, /* @__PURE__ */ React55__default.default.createElement(
|
|
3351
3372
|
reactNative.Text,
|
|
3352
3373
|
{
|
|
3353
3374
|
style: [styles24.amount, { color: textColor ?? colors.foreground, fontSize, letterSpacing }],
|
|
@@ -3359,7 +3380,7 @@ function CurrencyDisplayBase({ value, prefix = "$", showDecimals = false, textCo
|
|
|
3359
3380
|
formatted
|
|
3360
3381
|
));
|
|
3361
3382
|
}
|
|
3362
|
-
var CurrencyDisplay =
|
|
3383
|
+
var CurrencyDisplay = React55__default.default.memo(CurrencyDisplayBase);
|
|
3363
3384
|
var styles24 = reactNative.StyleSheet.create({
|
|
3364
3385
|
container: {
|
|
3365
3386
|
alignSelf: "flex-start"
|
|
@@ -3399,7 +3420,7 @@ function ListItemBase({
|
|
|
3399
3420
|
selectionAsync();
|
|
3400
3421
|
onPress?.();
|
|
3401
3422
|
};
|
|
3402
|
-
const effectiveLeft = imageSource ? /* @__PURE__ */
|
|
3423
|
+
const effectiveLeft = imageSource ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Image, { source: imageSource, style: styles25.image }) : leftIcon ? renderIcon(leftIcon, 24, leftIconColor ?? colors.foreground) : leftRender;
|
|
3403
3424
|
const hasRightContent = !!(rightIcon || rightActions && rightActions.length > 0 || rightRender !== void 0 || showChevron);
|
|
3404
3425
|
const cardStyle = variant === "card" ? {
|
|
3405
3426
|
backgroundColor: colors.card,
|
|
@@ -3413,7 +3434,7 @@ function ListItemBase({
|
|
|
3413
3434
|
elevation: 2
|
|
3414
3435
|
} : {};
|
|
3415
3436
|
const a11yLabel = accessibilityLabel ?? [title, subtitle, caption].filter(Boolean).join(". ");
|
|
3416
|
-
const content = /* @__PURE__ */
|
|
3437
|
+
const content = /* @__PURE__ */ React55__default.default.createElement(React55__default.default.Fragment, null, effectiveLeft ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles25.leftContainer }, effectiveLeft) : null, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles25.content }, /* @__PURE__ */ React55__default.default.createElement(
|
|
3417
3438
|
reactNative.Text,
|
|
3418
3439
|
{
|
|
3419
3440
|
style: [styles25.title, { color: colors.foreground }, titleStyle],
|
|
@@ -3421,7 +3442,7 @@ function ListItemBase({
|
|
|
3421
3442
|
allowFontScaling: true
|
|
3422
3443
|
},
|
|
3423
3444
|
title
|
|
3424
|
-
), subtitle ? /* @__PURE__ */
|
|
3445
|
+
), subtitle ? /* @__PURE__ */ React55__default.default.createElement(
|
|
3425
3446
|
reactNative.Text,
|
|
3426
3447
|
{
|
|
3427
3448
|
style: [styles25.subtitle, { color: colors.foregroundMuted }, subtitleStyle],
|
|
@@ -3429,7 +3450,7 @@ function ListItemBase({
|
|
|
3429
3450
|
allowFontScaling: true
|
|
3430
3451
|
},
|
|
3431
3452
|
subtitle
|
|
3432
|
-
) : null, caption ? /* @__PURE__ */
|
|
3453
|
+
) : null, caption ? /* @__PURE__ */ React55__default.default.createElement(
|
|
3433
3454
|
reactNative.Text,
|
|
3434
3455
|
{
|
|
3435
3456
|
style: [styles25.caption, { color: colors.foregroundMuted }, captionStyle],
|
|
@@ -3437,16 +3458,16 @@ function ListItemBase({
|
|
|
3437
3458
|
allowFontScaling: true
|
|
3438
3459
|
},
|
|
3439
3460
|
caption
|
|
3440
|
-
) : null), hasRightContent ? rightIcon ? /* @__PURE__ */
|
|
3461
|
+
) : null), hasRightContent ? rightIcon ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles25.rightContainer }, renderIcon(rightIcon, 24, rightIconColor ?? colors.foregroundMuted)) : rightActions && rightActions.length > 0 ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles25.rightActionsContainer }, rightActions.map((action, i) => /* @__PURE__ */ React55__default.default.createElement(React55__default.default.Fragment, { key: i }, action))) : rightRender !== void 0 ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles25.rightContainer }, typeof rightRender === "string" ? /* @__PURE__ */ React55__default.default.createElement(
|
|
3441
3462
|
reactNative.Text,
|
|
3442
3463
|
{
|
|
3443
3464
|
style: [styles25.rightText, { color: colors.foregroundMuted }],
|
|
3444
3465
|
allowFontScaling: true
|
|
3445
3466
|
},
|
|
3446
3467
|
rightRender
|
|
3447
|
-
) : rightRender) : showChevron ? /* @__PURE__ */
|
|
3468
|
+
) : rightRender) : showChevron ? /* @__PURE__ */ React55__default.default.createElement(vectorIcons.Entypo, { name: "chevron-with-circle-right", size: 20, color: colors.foregroundMuted }) : null : null);
|
|
3448
3469
|
if (onPress) {
|
|
3449
|
-
return /* @__PURE__ */
|
|
3470
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: disabled && styles25.disabled }, /* @__PURE__ */ React55__default.default.createElement(
|
|
3450
3471
|
PressableRow,
|
|
3451
3472
|
{
|
|
3452
3473
|
style: [styles25.container, cardStyle, style],
|
|
@@ -3460,11 +3481,11 @@ function ListItemBase({
|
|
|
3460
3481
|
accessibilityState: { disabled: !!disabled }
|
|
3461
3482
|
},
|
|
3462
3483
|
content
|
|
3463
|
-
), showSeparator ? /* @__PURE__ */
|
|
3484
|
+
), showSeparator ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles25.separator, { backgroundColor: colors.separator }] }) : null);
|
|
3464
3485
|
}
|
|
3465
|
-
return /* @__PURE__ */
|
|
3486
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [disabled && styles25.disabled] }, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles25.container, cardStyle, style] }, content), showSeparator ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles25.separator, { backgroundColor: colors.separator }] }) : null);
|
|
3466
3487
|
}
|
|
3467
|
-
var ListItem =
|
|
3488
|
+
var ListItem = React55__default.default.memo(ListItemBase);
|
|
3468
3489
|
var styles25 = reactNative.StyleSheet.create({
|
|
3469
3490
|
container: {
|
|
3470
3491
|
flexDirection: "row",
|
|
@@ -3531,17 +3552,17 @@ var styles25 = reactNative.StyleSheet.create({
|
|
|
3531
3552
|
});
|
|
3532
3553
|
function ListGroup({ children, variant = "plain", style }) {
|
|
3533
3554
|
const { colors } = useTheme();
|
|
3534
|
-
const processedChildren =
|
|
3535
|
-
if (!
|
|
3555
|
+
const processedChildren = React55__default.default.Children.map(children, (child, index) => {
|
|
3556
|
+
if (!React55__default.default.isValidElement(child)) return child;
|
|
3536
3557
|
if (child.type === ListGroupHeader || child.type === ListGroupFooter) {
|
|
3537
3558
|
return child;
|
|
3538
3559
|
}
|
|
3539
3560
|
const childProps = child.props;
|
|
3540
3561
|
const isListItem = "title" in childProps;
|
|
3541
3562
|
if (!isListItem) return child;
|
|
3542
|
-
const isLast = index ===
|
|
3563
|
+
const isLast = index === React55__default.default.Children.count(children) - 1;
|
|
3543
3564
|
if (childProps["showSeparator"] === void 0 && !isLast) {
|
|
3544
|
-
return
|
|
3565
|
+
return React55__default.default.cloneElement(child, {
|
|
3545
3566
|
showSeparator: true
|
|
3546
3567
|
});
|
|
3547
3568
|
}
|
|
@@ -3559,21 +3580,21 @@ function ListGroup({ children, variant = "plain", style }) {
|
|
|
3559
3580
|
elevation: 2,
|
|
3560
3581
|
paddingVertical: vs(4)
|
|
3561
3582
|
} : {};
|
|
3562
|
-
return /* @__PURE__ */
|
|
3583
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles26.container, cardStyle, style] }, processedChildren);
|
|
3563
3584
|
}
|
|
3564
3585
|
function ListGroupHeader({ children, style }) {
|
|
3565
3586
|
const { colors } = useTheme();
|
|
3566
3587
|
if (typeof children === "string") {
|
|
3567
|
-
return /* @__PURE__ */
|
|
3588
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles26.header, { borderBottomColor: colors.separator }, style] }, /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles26.headerText, { color: colors.foregroundMuted }], allowFontScaling: true }, children));
|
|
3568
3589
|
}
|
|
3569
|
-
return /* @__PURE__ */
|
|
3590
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles26.header, { borderBottomColor: colors.separator }, style] }, children);
|
|
3570
3591
|
}
|
|
3571
3592
|
function ListGroupFooter({ children, style }) {
|
|
3572
3593
|
const { colors } = useTheme();
|
|
3573
3594
|
if (typeof children === "string") {
|
|
3574
|
-
return /* @__PURE__ */
|
|
3595
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles26.footer, style] }, /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles26.footerText, { color: colors.foregroundMuted }], allowFontScaling: true }, children));
|
|
3575
3596
|
}
|
|
3576
|
-
return /* @__PURE__ */
|
|
3597
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles26.footer, style] }, children);
|
|
3577
3598
|
}
|
|
3578
3599
|
ListGroup.Header = ListGroupHeader;
|
|
3579
3600
|
ListGroup.Footer = ListGroupFooter;
|
|
@@ -3637,7 +3658,7 @@ function MenuItemBase({
|
|
|
3637
3658
|
elevation: 2
|
|
3638
3659
|
} : {};
|
|
3639
3660
|
const a11yLabel = accessibilityLabel ?? (subtitle ? `${label}. ${subtitle}` : label);
|
|
3640
|
-
return /* @__PURE__ */
|
|
3661
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: disabled && styles27.disabled }, /* @__PURE__ */ React55__default.default.createElement(
|
|
3641
3662
|
PressableRow,
|
|
3642
3663
|
{
|
|
3643
3664
|
style: [styles27.container, cardStyle, style],
|
|
@@ -3650,8 +3671,8 @@ function MenuItemBase({
|
|
|
3650
3671
|
accessibilityLabel: a11yLabel,
|
|
3651
3672
|
accessibilityState: { disabled }
|
|
3652
3673
|
},
|
|
3653
|
-
resolvedIcon ? /* @__PURE__ */
|
|
3654
|
-
/* @__PURE__ */
|
|
3674
|
+
resolvedIcon ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles27.iconContainer }, resolvedIcon) : null,
|
|
3675
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles27.labelContainer }, /* @__PURE__ */ React55__default.default.createElement(
|
|
3655
3676
|
reactNative.Text,
|
|
3656
3677
|
{
|
|
3657
3678
|
style: [styles27.label, { color: colors.foreground }, labelStyle],
|
|
@@ -3659,7 +3680,7 @@ function MenuItemBase({
|
|
|
3659
3680
|
allowFontScaling: true
|
|
3660
3681
|
},
|
|
3661
3682
|
label
|
|
3662
|
-
), subtitle ? /* @__PURE__ */
|
|
3683
|
+
), subtitle ? /* @__PURE__ */ React55__default.default.createElement(
|
|
3663
3684
|
reactNative.Text,
|
|
3664
3685
|
{
|
|
3665
3686
|
style: [styles27.subtitle, { color: colors.foregroundMuted }],
|
|
@@ -3668,7 +3689,7 @@ function MenuItemBase({
|
|
|
3668
3689
|
},
|
|
3669
3690
|
subtitle
|
|
3670
3691
|
) : null),
|
|
3671
|
-
rightRender !== void 0 ? /* @__PURE__ */
|
|
3692
|
+
rightRender !== void 0 ? /* @__PURE__ */ React55__default.default.createElement(
|
|
3672
3693
|
reactNative.View,
|
|
3673
3694
|
{
|
|
3674
3695
|
style: styles27.rightContainer,
|
|
@@ -3677,10 +3698,10 @@ function MenuItemBase({
|
|
|
3677
3698
|
}
|
|
3678
3699
|
},
|
|
3679
3700
|
rightRender
|
|
3680
|
-
) : showChevron ? /* @__PURE__ */
|
|
3681
|
-
), showSeparator ? /* @__PURE__ */
|
|
3701
|
+
) : showChevron ? /* @__PURE__ */ React55__default.default.createElement(vectorIcons.Entypo, { name: "chevron-right", size: 18, color: colors.foregroundMuted }) : null
|
|
3702
|
+
), showSeparator ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles27.separator, { backgroundColor: colors.separator }] }) : null);
|
|
3682
3703
|
}
|
|
3683
|
-
var MenuItem =
|
|
3704
|
+
var MenuItem = React55__default.default.memo(MenuItemBase);
|
|
3684
3705
|
var styles27 = reactNative.StyleSheet.create({
|
|
3685
3706
|
container: {
|
|
3686
3707
|
flexDirection: "row",
|
|
@@ -3724,17 +3745,17 @@ var styles27 = reactNative.StyleSheet.create({
|
|
|
3724
3745
|
});
|
|
3725
3746
|
function MenuGroup({ children, variant = "plain", style }) {
|
|
3726
3747
|
const { colors } = useTheme();
|
|
3727
|
-
const processedChildren =
|
|
3728
|
-
if (!
|
|
3748
|
+
const processedChildren = React55__default.default.Children.map(children, (child, index) => {
|
|
3749
|
+
if (!React55__default.default.isValidElement(child)) return child;
|
|
3729
3750
|
if (child.type === MenuGroupHeader || child.type === MenuGroupFooter) {
|
|
3730
3751
|
return child;
|
|
3731
3752
|
}
|
|
3732
3753
|
const childProps = child.props;
|
|
3733
3754
|
const isMenuItem = "onPress" in childProps;
|
|
3734
3755
|
if (!isMenuItem) return child;
|
|
3735
|
-
const isLast = index ===
|
|
3756
|
+
const isLast = index === React55__default.default.Children.count(children) - 1;
|
|
3736
3757
|
if (childProps["showSeparator"] === void 0 && !isLast) {
|
|
3737
|
-
return
|
|
3758
|
+
return React55__default.default.cloneElement(child, {
|
|
3738
3759
|
showSeparator: true
|
|
3739
3760
|
});
|
|
3740
3761
|
}
|
|
@@ -3752,21 +3773,21 @@ function MenuGroup({ children, variant = "plain", style }) {
|
|
|
3752
3773
|
elevation: 2,
|
|
3753
3774
|
paddingVertical: vs(4)
|
|
3754
3775
|
} : {};
|
|
3755
|
-
return /* @__PURE__ */
|
|
3776
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles28.container, cardStyle, style] }, processedChildren);
|
|
3756
3777
|
}
|
|
3757
3778
|
function MenuGroupHeader({ children, style }) {
|
|
3758
3779
|
const { colors } = useTheme();
|
|
3759
3780
|
if (typeof children === "string") {
|
|
3760
|
-
return /* @__PURE__ */
|
|
3781
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles28.header, { borderBottomColor: colors.separator }, style] }, /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles28.headerText, { color: colors.foregroundMuted }], allowFontScaling: true }, children));
|
|
3761
3782
|
}
|
|
3762
|
-
return /* @__PURE__ */
|
|
3783
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles28.header, { borderBottomColor: colors.separator }, style] }, children);
|
|
3763
3784
|
}
|
|
3764
3785
|
function MenuGroupFooter({ children, style }) {
|
|
3765
3786
|
const { colors } = useTheme();
|
|
3766
3787
|
if (typeof children === "string") {
|
|
3767
|
-
return /* @__PURE__ */
|
|
3788
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles28.footer, style] }, /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles28.footerText, { color: colors.foregroundMuted }], allowFontScaling: true }, children));
|
|
3768
3789
|
}
|
|
3769
|
-
return /* @__PURE__ */
|
|
3790
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles28.footer, style] }, children);
|
|
3770
3791
|
}
|
|
3771
3792
|
MenuGroup.Header = MenuGroupHeader;
|
|
3772
3793
|
MenuGroup.Footer = MenuGroupFooter;
|
|
@@ -3803,7 +3824,7 @@ function ChipBase({ label, selected = false, onPress, icon, iconName, style, acc
|
|
|
3803
3824
|
onPress?.();
|
|
3804
3825
|
};
|
|
3805
3826
|
const resolvedIcon = iconName ? renderIcon(iconName, ms(13), selected ? colors.primaryForeground : colors.foreground) : icon;
|
|
3806
|
-
return /* @__PURE__ */
|
|
3827
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles29.wrapper, style] }, /* @__PURE__ */ React55__default.default.createElement(
|
|
3807
3828
|
PressableChip,
|
|
3808
3829
|
{
|
|
3809
3830
|
onPress: handlePress,
|
|
@@ -3813,7 +3834,7 @@ function ChipBase({ label, selected = false, onPress, icon, iconName, style, acc
|
|
|
3813
3834
|
accessibilityLabel: accessibilityLabel ?? label,
|
|
3814
3835
|
accessibilityState: { selected }
|
|
3815
3836
|
},
|
|
3816
|
-
/* @__PURE__ */
|
|
3837
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
3817
3838
|
reactNativeEase.EaseView,
|
|
3818
3839
|
{
|
|
3819
3840
|
style: styles29.chip,
|
|
@@ -3823,8 +3844,8 @@ function ChipBase({ label, selected = false, onPress, icon, iconName, style, acc
|
|
|
3823
3844
|
},
|
|
3824
3845
|
transition: COLOR_TRANSITION
|
|
3825
3846
|
},
|
|
3826
|
-
resolvedIcon ? /* @__PURE__ */
|
|
3827
|
-
/* @__PURE__ */
|
|
3847
|
+
resolvedIcon ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles29.chipIcon }, resolvedIcon) : null,
|
|
3848
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
3828
3849
|
reactNative.Text,
|
|
3829
3850
|
{
|
|
3830
3851
|
style: [styles29.label, { color: selected ? colors.primaryForeground : colors.foreground }],
|
|
@@ -3835,7 +3856,7 @@ function ChipBase({ label, selected = false, onPress, icon, iconName, style, acc
|
|
|
3835
3856
|
)
|
|
3836
3857
|
));
|
|
3837
3858
|
}
|
|
3838
|
-
var Chip =
|
|
3859
|
+
var Chip = React55__default.default.memo(ChipBase);
|
|
3839
3860
|
function ChipGroup({ options, value, onValueChange, multiSelect = false, style }) {
|
|
3840
3861
|
const handlePress = (optionValue) => {
|
|
3841
3862
|
if (!multiSelect) {
|
|
@@ -3851,7 +3872,7 @@ function ChipGroup({ options, value, onValueChange, multiSelect = false, style }
|
|
|
3851
3872
|
if (Array.isArray(value)) return value.includes(optionValue);
|
|
3852
3873
|
return optionValue === value;
|
|
3853
3874
|
};
|
|
3854
|
-
return /* @__PURE__ */
|
|
3875
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles29.group, style] }, options.map((opt) => /* @__PURE__ */ React55__default.default.createElement(
|
|
3855
3876
|
Chip,
|
|
3856
3877
|
{
|
|
3857
3878
|
key: opt.value,
|
|
@@ -3911,20 +3932,26 @@ function ConfirmDialog({
|
|
|
3911
3932
|
}) {
|
|
3912
3933
|
const { colors } = useTheme();
|
|
3913
3934
|
const insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
3914
|
-
const ref =
|
|
3915
|
-
const wasOpened =
|
|
3916
|
-
const
|
|
3917
|
-
|
|
3918
|
-
|
|
3935
|
+
const ref = React55.useRef(null);
|
|
3936
|
+
const wasOpened = React55.useRef(false);
|
|
3937
|
+
const isPresentedRef = React55.useRef(false);
|
|
3938
|
+
const name = React55.useId();
|
|
3939
|
+
const handleDismiss = React55.useCallback(() => {
|
|
3940
|
+
isPresentedRef.current = false;
|
|
3941
|
+
onCancel();
|
|
3942
|
+
}, [onCancel]);
|
|
3943
|
+
React55.useEffect(() => {
|
|
3944
|
+
if (visible && !isPresentedRef.current) {
|
|
3919
3945
|
impactMedium();
|
|
3920
3946
|
ref.current?.present();
|
|
3921
3947
|
wasOpened.current = true;
|
|
3922
|
-
|
|
3948
|
+
isPresentedRef.current = true;
|
|
3949
|
+
} else if (!visible && wasOpened.current && isPresentedRef.current) {
|
|
3923
3950
|
ref.current?.dismiss();
|
|
3924
3951
|
}
|
|
3925
3952
|
}, [visible]);
|
|
3926
|
-
const renderBackdrop =
|
|
3927
|
-
(props) => /* @__PURE__ */
|
|
3953
|
+
const renderBackdrop = React55.useCallback(
|
|
3954
|
+
(props) => /* @__PURE__ */ React55__default.default.createElement(
|
|
3928
3955
|
bottomSheet.BottomSheetBackdrop,
|
|
3929
3956
|
{
|
|
3930
3957
|
...props,
|
|
@@ -3935,12 +3962,12 @@ function ConfirmDialog({
|
|
|
3935
3962
|
),
|
|
3936
3963
|
[]
|
|
3937
3964
|
);
|
|
3938
|
-
return /* @__PURE__ */
|
|
3965
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
3939
3966
|
bottomSheet.BottomSheetModal,
|
|
3940
3967
|
{
|
|
3941
3968
|
ref,
|
|
3942
3969
|
name,
|
|
3943
|
-
onDismiss:
|
|
3970
|
+
onDismiss: handleDismiss,
|
|
3944
3971
|
enableDynamicSizing: true,
|
|
3945
3972
|
backdropComponent: renderBackdrop,
|
|
3946
3973
|
backgroundStyle: { ...styles30.background, backgroundColor: colors.card },
|
|
@@ -3948,7 +3975,7 @@ function ConfirmDialog({
|
|
|
3948
3975
|
enablePanDownToClose: true,
|
|
3949
3976
|
topInset: insets.top
|
|
3950
3977
|
},
|
|
3951
|
-
/* @__PURE__ */
|
|
3978
|
+
/* @__PURE__ */ React55__default.default.createElement(bottomSheet.BottomSheetView, { style: styles30.content }, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles30.header, accessibilityRole: "header" }, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles30.headerRow }, /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles30.title, { color: colors.foreground }], allowFontScaling: true }, title), showCloseButton ? /* @__PURE__ */ React55__default.default.createElement(
|
|
3952
3979
|
reactNative.TouchableOpacity,
|
|
3953
3980
|
{
|
|
3954
3981
|
onPress: onCancel,
|
|
@@ -3959,8 +3986,8 @@ function ConfirmDialog({
|
|
|
3959
3986
|
accessibilityLabel: "Close",
|
|
3960
3987
|
hitSlop: { top: 12, bottom: 12, left: 12, right: 12 }
|
|
3961
3988
|
},
|
|
3962
|
-
/* @__PURE__ */
|
|
3963
|
-
) : null), subtitle ? /* @__PURE__ */
|
|
3989
|
+
/* @__PURE__ */ React55__default.default.createElement(vectorIcons.Feather, { name: "x", size: ms(18), color: colors.foregroundMuted })
|
|
3990
|
+
) : null), subtitle ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles30.subtitle, { color: colors.foregroundMuted }], allowFontScaling: true }, subtitle) : null), /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles30.actions }, /* @__PURE__ */ React55__default.default.createElement(
|
|
3964
3991
|
Button,
|
|
3965
3992
|
{
|
|
3966
3993
|
label: confirmLabel,
|
|
@@ -3972,7 +3999,7 @@ function ConfirmDialog({
|
|
|
3972
3999
|
notificationSuccess();
|
|
3973
4000
|
onConfirm();
|
|
3974
4001
|
},
|
|
3975
|
-
icon: /* @__PURE__ */
|
|
4002
|
+
icon: /* @__PURE__ */ React55__default.default.createElement(
|
|
3976
4003
|
vectorIcons.Feather,
|
|
3977
4004
|
{
|
|
3978
4005
|
name: confirmVariant === "destructive" ? "trash-2" : "check",
|
|
@@ -3981,7 +4008,7 @@ function ConfirmDialog({
|
|
|
3981
4008
|
}
|
|
3982
4009
|
)
|
|
3983
4010
|
}
|
|
3984
|
-
), /* @__PURE__ */
|
|
4011
|
+
), /* @__PURE__ */ React55__default.default.createElement(
|
|
3985
4012
|
Button,
|
|
3986
4013
|
{
|
|
3987
4014
|
label: cancelLabel,
|
|
@@ -3991,7 +4018,7 @@ function ConfirmDialog({
|
|
|
3991
4018
|
selectionAsync();
|
|
3992
4019
|
onCancel();
|
|
3993
4020
|
},
|
|
3994
|
-
icon: /* @__PURE__ */
|
|
4021
|
+
icon: /* @__PURE__ */ React55__default.default.createElement(vectorIcons.Feather, { name: "x", size: 15, color: colors.foreground })
|
|
3995
4022
|
}
|
|
3996
4023
|
)))
|
|
3997
4024
|
);
|
|
@@ -4042,9 +4069,9 @@ var styles30 = reactNative.StyleSheet.create({
|
|
|
4042
4069
|
function LabelValueBase({ label, value, iconName, iconColor, style }) {
|
|
4043
4070
|
const { colors } = useTheme();
|
|
4044
4071
|
const resolvedIcon = iconName ? renderIcon(iconName, ms(14), iconColor ?? colors.foregroundMuted) : null;
|
|
4045
|
-
return /* @__PURE__ */
|
|
4072
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles31.container, style] }, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles31.labelSide }, resolvedIcon ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles31.icon }, resolvedIcon) : null, /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles31.label, { color: colors.foregroundMuted }], allowFontScaling: true }, label)), typeof value === "string" ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles31.value, { color: colors.foreground }], allowFontScaling: true }, value) : value);
|
|
4046
4073
|
}
|
|
4047
|
-
var LabelValue =
|
|
4074
|
+
var LabelValue = React55__default.default.memo(LabelValueBase);
|
|
4048
4075
|
var styles31 = reactNative.StyleSheet.create({
|
|
4049
4076
|
container: {
|
|
4050
4077
|
flexDirection: "row",
|
|
@@ -4109,7 +4136,7 @@ function MonthPicker({ value, onChange, minValue, maxValue, locale = "en", forma
|
|
|
4109
4136
|
selectionAsync();
|
|
4110
4137
|
onChange(fromIndex(index + 1));
|
|
4111
4138
|
};
|
|
4112
|
-
return /* @__PURE__ */
|
|
4139
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles32.container, style], accessibilityRole: "adjustable", accessibilityLabel: getLabel() }, /* @__PURE__ */ React55__default.default.createElement(
|
|
4113
4140
|
reactNative.TouchableOpacity,
|
|
4114
4141
|
{
|
|
4115
4142
|
style: [styles32.arrow, prevDisabled && styles32.arrowDisabled],
|
|
@@ -4122,8 +4149,8 @@ function MonthPicker({ value, onChange, minValue, maxValue, locale = "en", forma
|
|
|
4122
4149
|
accessibilityState: { disabled: prevDisabled },
|
|
4123
4150
|
hitSlop: { top: 8, bottom: 8, left: 8, right: 8 }
|
|
4124
4151
|
},
|
|
4125
|
-
/* @__PURE__ */
|
|
4126
|
-
), /* @__PURE__ */
|
|
4152
|
+
/* @__PURE__ */ React55__default.default.createElement(vectorIcons.Entypo, { name: "chevron-left", size: 22, color: colors.foreground })
|
|
4153
|
+
), /* @__PURE__ */ React55__default.default.createElement(
|
|
4127
4154
|
reactNative.Text,
|
|
4128
4155
|
{
|
|
4129
4156
|
style: [styles32.label, { color: colors.foreground }],
|
|
@@ -4131,7 +4158,7 @@ function MonthPicker({ value, onChange, minValue, maxValue, locale = "en", forma
|
|
|
4131
4158
|
accessibilityLiveRegion: "polite"
|
|
4132
4159
|
},
|
|
4133
4160
|
getLabel()
|
|
4134
|
-
), /* @__PURE__ */
|
|
4161
|
+
), /* @__PURE__ */ React55__default.default.createElement(
|
|
4135
4162
|
reactNative.TouchableOpacity,
|
|
4136
4163
|
{
|
|
4137
4164
|
style: [styles32.arrow, nextDisabled && styles32.arrowDisabled],
|
|
@@ -4144,7 +4171,7 @@ function MonthPicker({ value, onChange, minValue, maxValue, locale = "en", forma
|
|
|
4144
4171
|
accessibilityState: { disabled: nextDisabled },
|
|
4145
4172
|
hitSlop: { top: 8, bottom: 8, left: 8, right: 8 }
|
|
4146
4173
|
},
|
|
4147
|
-
/* @__PURE__ */
|
|
4174
|
+
/* @__PURE__ */ React55__default.default.createElement(vectorIcons.Entypo, { name: "chevron-right", size: 22, color: colors.foreground })
|
|
4148
4175
|
));
|
|
4149
4176
|
}
|
|
4150
4177
|
var styles32 = reactNative.StyleSheet.create({
|
|
@@ -4210,7 +4237,7 @@ function MediaCardBase({
|
|
|
4210
4237
|
const ratio = aspectRatioMap2[aspectRatio];
|
|
4211
4238
|
const resolvedActionIcon = actionIconName ? renderIcon(actionIconName, 18, actionActive ? colors.primary : colors.background) : actionIcon ?? renderIcon("heart", 18, actionActive ? colors.primary : colors.background);
|
|
4212
4239
|
const a11yLabel = accessibilityLabel ?? [title, subtitle].filter(Boolean).join(". ");
|
|
4213
|
-
const cardContent = /* @__PURE__ */
|
|
4240
|
+
const cardContent = /* @__PURE__ */ React55__default.default.createElement(
|
|
4214
4241
|
reactNative.View,
|
|
4215
4242
|
{
|
|
4216
4243
|
style: [
|
|
@@ -4220,14 +4247,14 @@ function MediaCardBase({
|
|
|
4220
4247
|
],
|
|
4221
4248
|
...reactNative.Platform.OS === "web" ? hoverHandlers : {}
|
|
4222
4249
|
},
|
|
4223
|
-
/* @__PURE__ */
|
|
4250
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles33.imageContainer, imageStyle] }, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: { paddingTop: `${ratio * 100}%` } }, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: reactNative.StyleSheet.absoluteFill }, imageSource ? /* @__PURE__ */ React55__default.default.createElement(
|
|
4224
4251
|
reactNative.Image,
|
|
4225
4252
|
{
|
|
4226
4253
|
source: imageSource,
|
|
4227
4254
|
style: styles33.image,
|
|
4228
4255
|
resizeMode: "cover"
|
|
4229
4256
|
}
|
|
4230
|
-
) : /* @__PURE__ */
|
|
4257
|
+
) : /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles33.imagePlaceholder, { backgroundColor: colors.surface }] }))), badge && /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles33.badgeContainer }, badge), (onActionPress || actionIcon || actionIconName) && /* @__PURE__ */ React55__default.default.createElement(
|
|
4231
4258
|
reactNative.TouchableOpacity,
|
|
4232
4259
|
{
|
|
4233
4260
|
style: [styles33.actionButton, { backgroundColor: "rgba(0,0,0,0.24)" }],
|
|
@@ -4244,10 +4271,10 @@ function MediaCardBase({
|
|
|
4244
4271
|
},
|
|
4245
4272
|
resolvedActionIcon
|
|
4246
4273
|
)),
|
|
4247
|
-
(title || subtitle || caption || footer) && /* @__PURE__ */
|
|
4274
|
+
(title || subtitle || caption || footer) && /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles33.meta }, title ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles33.title, { color: colors.foreground }], numberOfLines: 2, allowFontScaling: true }, title) : null, subtitle ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles33.subtitle, { color: colors.foregroundSubtle }], numberOfLines: 1, allowFontScaling: true }, subtitle) : null, caption ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles33.caption, { color: colors.foregroundMuted }], numberOfLines: 1, allowFontScaling: true }, caption) : null, footer)
|
|
4248
4275
|
);
|
|
4249
4276
|
if (onPress) {
|
|
4250
|
-
return /* @__PURE__ */
|
|
4277
|
+
return /* @__PURE__ */ React55__default.default.createElement(Animated12__default.default.View, { style: animatedStyle }, /* @__PURE__ */ React55__default.default.createElement(
|
|
4251
4278
|
reactNative.TouchableOpacity,
|
|
4252
4279
|
{
|
|
4253
4280
|
onPress: handlePress,
|
|
@@ -4263,7 +4290,7 @@ function MediaCardBase({
|
|
|
4263
4290
|
}
|
|
4264
4291
|
return cardContent;
|
|
4265
4292
|
}
|
|
4266
|
-
var MediaCard =
|
|
4293
|
+
var MediaCard = React55__default.default.memo(MediaCardBase);
|
|
4267
4294
|
var styles33 = reactNative.StyleSheet.create({
|
|
4268
4295
|
card: {
|
|
4269
4296
|
borderRadius: RADIUS.md,
|
|
@@ -4321,7 +4348,7 @@ var styles33 = reactNative.StyleSheet.create({
|
|
|
4321
4348
|
lineHeight: mvs(16)
|
|
4322
4349
|
}
|
|
4323
4350
|
});
|
|
4324
|
-
var CategoryChip =
|
|
4351
|
+
var CategoryChip = React55__default.default.memo(function CategoryChip2({
|
|
4325
4352
|
item,
|
|
4326
4353
|
selected,
|
|
4327
4354
|
onSelect
|
|
@@ -4332,7 +4359,7 @@ var CategoryChip = React54__default.default.memo(function CategoryChip2({
|
|
|
4332
4359
|
});
|
|
4333
4360
|
const iconColor = selected ? colors.primaryForeground : colors.foregroundSubtle;
|
|
4334
4361
|
const resolvedIcon = typeof item.icon === "string" ? renderIcon(item.icon, 16, iconColor) : item.icon ?? null;
|
|
4335
|
-
return /* @__PURE__ */
|
|
4362
|
+
return /* @__PURE__ */ React55__default.default.createElement(Animated12__default.default.View, { style: scaleStyle, ...hoverHandlers }, /* @__PURE__ */ React55__default.default.createElement(
|
|
4336
4363
|
reactNative.TouchableOpacity,
|
|
4337
4364
|
{
|
|
4338
4365
|
onPress: () => onSelect(item.value),
|
|
@@ -4344,7 +4371,7 @@ var CategoryChip = React54__default.default.memo(function CategoryChip2({
|
|
|
4344
4371
|
accessibilityLabel: item.label,
|
|
4345
4372
|
accessibilityState: { selected }
|
|
4346
4373
|
},
|
|
4347
|
-
/* @__PURE__ */
|
|
4374
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
4348
4375
|
reactNativeEase.EaseView,
|
|
4349
4376
|
{
|
|
4350
4377
|
style: styles34.chip,
|
|
@@ -4354,8 +4381,8 @@ var CategoryChip = React54__default.default.memo(function CategoryChip2({
|
|
|
4354
4381
|
},
|
|
4355
4382
|
transition: COLOR_TRANSITION
|
|
4356
4383
|
},
|
|
4357
|
-
resolvedIcon && /* @__PURE__ */
|
|
4358
|
-
/* @__PURE__ */
|
|
4384
|
+
resolvedIcon && /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles34.chipIcon }, resolvedIcon),
|
|
4385
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
4359
4386
|
reactNative.Text,
|
|
4360
4387
|
{
|
|
4361
4388
|
style: [styles34.chipLabel, { color: selected ? colors.primaryForeground : colors.foregroundSubtle }],
|
|
@@ -4363,7 +4390,7 @@ var CategoryChip = React54__default.default.memo(function CategoryChip2({
|
|
|
4363
4390
|
},
|
|
4364
4391
|
item.label
|
|
4365
4392
|
),
|
|
4366
|
-
item.badge !== void 0 && item.badge > 0 && /* @__PURE__ */
|
|
4393
|
+
item.badge !== void 0 && item.badge > 0 && /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles34.chipBadge, { backgroundColor: colors.primary }] }, /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles34.chipBadgeText, { color: colors.primaryForeground }] }, Math.min(item.badge, 99)))
|
|
4367
4394
|
)
|
|
4368
4395
|
));
|
|
4369
4396
|
});
|
|
@@ -4377,7 +4404,7 @@ function CategoryStrip({
|
|
|
4377
4404
|
accessibilityLabel
|
|
4378
4405
|
}) {
|
|
4379
4406
|
const selected = Array.isArray(value) ? value : value ? [value] : [];
|
|
4380
|
-
const handlePress =
|
|
4407
|
+
const handlePress = React55.useCallback(
|
|
4381
4408
|
(v) => {
|
|
4382
4409
|
selectionAsync();
|
|
4383
4410
|
if (multiSelect) {
|
|
@@ -4390,7 +4417,7 @@ function CategoryStrip({
|
|
|
4390
4417
|
},
|
|
4391
4418
|
[multiSelect, value, onValueChange]
|
|
4392
4419
|
);
|
|
4393
|
-
return /* @__PURE__ */
|
|
4420
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
4394
4421
|
reactNative.ScrollView,
|
|
4395
4422
|
{
|
|
4396
4423
|
horizontal: true,
|
|
@@ -4400,7 +4427,7 @@ function CategoryStrip({
|
|
|
4400
4427
|
accessibilityRole: multiSelect ? void 0 : "radiogroup",
|
|
4401
4428
|
accessibilityLabel
|
|
4402
4429
|
},
|
|
4403
|
-
categories.map((cat) => /* @__PURE__ */
|
|
4430
|
+
categories.map((cat) => /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { key: cat.value, style: itemStyle }, /* @__PURE__ */ React55__default.default.createElement(
|
|
4404
4431
|
CategoryChip,
|
|
4405
4432
|
{
|
|
4406
4433
|
item: cat,
|
|
@@ -4468,7 +4495,7 @@ function Pressable2({
|
|
|
4468
4495
|
if (haptics) impactLight();
|
|
4469
4496
|
onPress();
|
|
4470
4497
|
};
|
|
4471
|
-
return /* @__PURE__ */
|
|
4498
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
4472
4499
|
PressableCard,
|
|
4473
4500
|
{
|
|
4474
4501
|
style,
|
|
@@ -4516,23 +4543,23 @@ function DetailRowBase({
|
|
|
4516
4543
|
borderColor: "rgba(128,128,128,0.3)",
|
|
4517
4544
|
marginHorizontal: s(4)
|
|
4518
4545
|
};
|
|
4519
|
-
return /* @__PURE__ */
|
|
4546
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles35.row, style] }, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles35.labelSide }, resolvedLeftIcon ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles35.icon }, resolvedLeftIcon) : null, typeof label === "string" ? /* @__PURE__ */ React55__default.default.createElement(
|
|
4520
4547
|
reactNative.Text,
|
|
4521
4548
|
{
|
|
4522
4549
|
style: [styles35.labelText, { color: colors.foregroundMuted, fontFamily: weightMap[labelWeight] }, labelStyle],
|
|
4523
4550
|
allowFontScaling: true
|
|
4524
4551
|
},
|
|
4525
4552
|
label
|
|
4526
|
-
) : label), separatorStyle ? /* @__PURE__ */
|
|
4553
|
+
) : label), separatorStyle ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: separatorStyle }) : /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles35.spacer }), /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles35.valueSide }, typeof value === "string" ? /* @__PURE__ */ React55__default.default.createElement(
|
|
4527
4554
|
reactNative.Text,
|
|
4528
4555
|
{
|
|
4529
4556
|
style: [styles35.valueText, { color: valueColor ?? colors.foreground }, valueStyle],
|
|
4530
4557
|
allowFontScaling: true
|
|
4531
4558
|
},
|
|
4532
4559
|
value
|
|
4533
|
-
) : value, resolvedRightIcon ? /* @__PURE__ */
|
|
4560
|
+
) : value, resolvedRightIcon ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles35.icon }, resolvedRightIcon) : null));
|
|
4534
4561
|
}
|
|
4535
|
-
var DetailRow =
|
|
4562
|
+
var DetailRow = React55__default.default.memo(DetailRowBase);
|
|
4536
4563
|
var styles35 = reactNative.StyleSheet.create({
|
|
4537
4564
|
row: {
|
|
4538
4565
|
flexDirection: "row",
|
|
@@ -4569,7 +4596,7 @@ var styles35 = reactNative.StyleSheet.create({
|
|
|
4569
4596
|
}
|
|
4570
4597
|
});
|
|
4571
4598
|
function Form({ children, style }) {
|
|
4572
|
-
return /* @__PURE__ */
|
|
4599
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles36.form, style] }, children);
|
|
4573
4600
|
}
|
|
4574
4601
|
function FormField({
|
|
4575
4602
|
children,
|
|
@@ -4581,14 +4608,14 @@ function FormField({
|
|
|
4581
4608
|
errorStyle
|
|
4582
4609
|
}) {
|
|
4583
4610
|
const { colors } = useTheme();
|
|
4584
|
-
return /* @__PURE__ */
|
|
4611
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles36.field, style] }, label ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles36.label, { color: colors.foreground }, labelStyle], allowFontScaling: true }, label, required ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: { color: colors.destructive } }, " *") : null) : null, children, error ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles36.error, { color: colors.destructive }, errorStyle], allowFontScaling: true }, error) : null);
|
|
4585
4612
|
}
|
|
4586
4613
|
function FormSection({ children, title, description, style }) {
|
|
4587
4614
|
const { colors } = useTheme();
|
|
4588
|
-
return /* @__PURE__ */
|
|
4615
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles36.section, style] }, title ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles36.sectionHeader }, /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles36.sectionTitle, { color: colors.foreground }], allowFontScaling: true }, title), description ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles36.sectionDescription, { color: colors.foregroundMuted }], allowFontScaling: true }, description) : null) : null, children);
|
|
4589
4616
|
}
|
|
4590
4617
|
function FormFooter({ children, style }) {
|
|
4591
|
-
return /* @__PURE__ */
|
|
4618
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles36.footer, style] }, children);
|
|
4592
4619
|
}
|
|
4593
4620
|
Form.Field = FormField;
|
|
4594
4621
|
Form.Section = FormSection;
|
|
@@ -4637,7 +4664,7 @@ var defaultKeyExtractor = (item, index) => {
|
|
|
4637
4664
|
return id !== void 0 ? String(id) : String(index);
|
|
4638
4665
|
};
|
|
4639
4666
|
function VirtualListInner({ itemHeight, keyExtractor, renderItem, ...props }, ref) {
|
|
4640
|
-
const getItemLayout =
|
|
4667
|
+
const getItemLayout = React55.useCallback(
|
|
4641
4668
|
(_data, index) => ({
|
|
4642
4669
|
length: itemHeight ?? 0,
|
|
4643
4670
|
offset: (itemHeight ?? 0) * index,
|
|
@@ -4645,7 +4672,7 @@ function VirtualListInner({ itemHeight, keyExtractor, renderItem, ...props }, re
|
|
|
4645
4672
|
}),
|
|
4646
4673
|
[itemHeight]
|
|
4647
4674
|
);
|
|
4648
|
-
return /* @__PURE__ */
|
|
4675
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
4649
4676
|
reactNative.FlatList,
|
|
4650
4677
|
{
|
|
4651
4678
|
ref,
|
|
@@ -4657,9 +4684,9 @@ function VirtualListInner({ itemHeight, keyExtractor, renderItem, ...props }, re
|
|
|
4657
4684
|
}
|
|
4658
4685
|
);
|
|
4659
4686
|
}
|
|
4660
|
-
var VirtualList =
|
|
4687
|
+
var VirtualList = React55__default.default.forwardRef(VirtualListInner);
|
|
4661
4688
|
function RetrayProvider({ children, theme, colorScheme = "system" }) {
|
|
4662
|
-
return /* @__PURE__ */
|
|
4689
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNativeSafeAreaContext.SafeAreaProvider, { initialMetrics: reactNativeSafeAreaContext.initialWindowMetrics }, /* @__PURE__ */ React55__default.default.createElement(reactNativeGestureHandler.GestureHandlerRootView, { style: styles37.root }, /* @__PURE__ */ React55__default.default.createElement(ThemeProvider, { theme, colorScheme }, /* @__PURE__ */ React55__default.default.createElement(bottomSheet.BottomSheetModalProvider, null, /* @__PURE__ */ React55__default.default.createElement(ToastProvider, null, children)))));
|
|
4663
4690
|
}
|
|
4664
4691
|
var styles37 = reactNative.StyleSheet.create({
|
|
4665
4692
|
root: { flex: 1 }
|
|
@@ -4671,7 +4698,7 @@ function DefaultErrorFallback({
|
|
|
4671
4698
|
message
|
|
4672
4699
|
}) {
|
|
4673
4700
|
const { colors } = useTheme();
|
|
4674
|
-
return /* @__PURE__ */
|
|
4701
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles38.container, { backgroundColor: colors.background }], accessibilityRole: "alert" }, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles38.iconCircle, { backgroundColor: colors.destructiveTint }] }, renderIcon("alert-triangle", ms(28), colors.destructive)), /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles38.title, { color: colors.foreground }], allowFontScaling: true }, title), /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles38.message, { color: colors.foregroundMuted }], allowFontScaling: true }, message ?? error.message ?? "An unexpected error occurred."), /* @__PURE__ */ React55__default.default.createElement(
|
|
4675
4702
|
reactNative.TouchableOpacity,
|
|
4676
4703
|
{
|
|
4677
4704
|
style: [styles38.button, { backgroundColor: colors.primary }],
|
|
@@ -4684,10 +4711,10 @@ function DefaultErrorFallback({
|
|
|
4684
4711
|
accessibilityRole: "button",
|
|
4685
4712
|
accessibilityLabel: "Try again"
|
|
4686
4713
|
},
|
|
4687
|
-
/* @__PURE__ */
|
|
4714
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles38.buttonLabel, { color: colors.primaryForeground }], allowFontScaling: true }, "Try again")
|
|
4688
4715
|
));
|
|
4689
4716
|
}
|
|
4690
|
-
var ErrorBoundary = class extends
|
|
4717
|
+
var ErrorBoundary = class extends React55__default.default.Component {
|
|
4691
4718
|
constructor() {
|
|
4692
4719
|
super(...arguments);
|
|
4693
4720
|
this.state = { error: null };
|
|
@@ -4711,7 +4738,7 @@ var ErrorBoundary = class extends React54__default.default.Component {
|
|
|
4711
4738
|
if (fallback !== void 0) {
|
|
4712
4739
|
return fallback;
|
|
4713
4740
|
}
|
|
4714
|
-
return /* @__PURE__ */
|
|
4741
|
+
return /* @__PURE__ */ React55__default.default.createElement(DefaultErrorFallback, { error, reset: this.reset, title, message });
|
|
4715
4742
|
}
|
|
4716
4743
|
return this.props.children;
|
|
4717
4744
|
}
|
|
@@ -4760,20 +4787,20 @@ var styles38 = reactNative.StyleSheet.create({
|
|
|
4760
4787
|
});
|
|
4761
4788
|
function Dot({ active, size, activeColor, inactiveColor, onPress, index, total }) {
|
|
4762
4789
|
const progress = Animated12.useSharedValue(active ? 1 : 0);
|
|
4763
|
-
|
|
4790
|
+
React55.useEffect(() => {
|
|
4764
4791
|
progress.value = Animated12.withSpring(active ? 1 : 0, SPRINGS.glide);
|
|
4765
4792
|
}, [active, progress]);
|
|
4766
4793
|
const animatedStyle = Animated12.useAnimatedStyle(() => ({
|
|
4767
4794
|
width: size + progress.value * size * 1.5,
|
|
4768
4795
|
backgroundColor: Animated12.interpolateColor(progress.value, [0, 1], [inactiveColor, activeColor])
|
|
4769
4796
|
}));
|
|
4770
|
-
const dot = /* @__PURE__ */
|
|
4797
|
+
const dot = /* @__PURE__ */ React55__default.default.createElement(Animated12__default.default.View, { style: [{ height: size, borderRadius: size / 2 }, animatedStyle] });
|
|
4771
4798
|
if (!onPress) return dot;
|
|
4772
4799
|
const handlePress = () => {
|
|
4773
4800
|
selectionAsync();
|
|
4774
4801
|
onPress();
|
|
4775
4802
|
};
|
|
4776
|
-
return /* @__PURE__ */
|
|
4803
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
4777
4804
|
reactNative.TouchableOpacity,
|
|
4778
4805
|
{
|
|
4779
4806
|
onPress: handlePress,
|
|
@@ -4822,14 +4849,14 @@ function PagerDots({
|
|
|
4822
4849
|
onDotPress(activeIndex + 1);
|
|
4823
4850
|
}
|
|
4824
4851
|
};
|
|
4825
|
-
return /* @__PURE__ */
|
|
4852
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
4826
4853
|
reactNative.View,
|
|
4827
4854
|
{
|
|
4828
4855
|
style: [styles39.container, { gap: s(spacing) }, style],
|
|
4829
4856
|
accessibilityRole: "adjustable",
|
|
4830
4857
|
accessibilityLabel: `Page ${activeIndex + 1} of ${count}`
|
|
4831
4858
|
},
|
|
4832
|
-
hasControls && /* @__PURE__ */
|
|
4859
|
+
hasControls && /* @__PURE__ */ React55__default.default.createElement(
|
|
4833
4860
|
reactNative.TouchableOpacity,
|
|
4834
4861
|
{
|
|
4835
4862
|
onPress: handlePrevious,
|
|
@@ -4843,7 +4870,7 @@ function PagerDots({
|
|
|
4843
4870
|
},
|
|
4844
4871
|
renderIcon("chevron-left", s(18), canGoPrev ? colors.foreground : colors.foregroundMuted)
|
|
4845
4872
|
),
|
|
4846
|
-
/* @__PURE__ */
|
|
4873
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles39.dotsRow, { gap: s(spacing) }] }, Array.from({ length: count }).map((_, i) => /* @__PURE__ */ React55__default.default.createElement(
|
|
4847
4874
|
Dot,
|
|
4848
4875
|
{
|
|
4849
4876
|
key: i,
|
|
@@ -4856,7 +4883,7 @@ function PagerDots({
|
|
|
4856
4883
|
onPress: onDotPress ? () => onDotPress(i) : void 0
|
|
4857
4884
|
}
|
|
4858
4885
|
))),
|
|
4859
|
-
hasControls && /* @__PURE__ */
|
|
4886
|
+
hasControls && /* @__PURE__ */ React55__default.default.createElement(
|
|
4860
4887
|
reactNative.TouchableOpacity,
|
|
4861
4888
|
{
|
|
4862
4889
|
onPress: handleNext,
|
|
@@ -4907,7 +4934,7 @@ function AppHeader({
|
|
|
4907
4934
|
const { width } = reactNative.useWindowDimensions();
|
|
4908
4935
|
const isWide = width >= BREAKPOINTS.wide;
|
|
4909
4936
|
const centered = titleAlign === "center" || titleAlign === "auto" && isWide;
|
|
4910
|
-
const leftNode = left ?? (onBack ? /* @__PURE__ */
|
|
4937
|
+
const leftNode = left ?? (onBack ? /* @__PURE__ */ React55__default.default.createElement(
|
|
4911
4938
|
IconButton,
|
|
4912
4939
|
{
|
|
4913
4940
|
iconName: backIconName,
|
|
@@ -4917,7 +4944,7 @@ function AppHeader({
|
|
|
4917
4944
|
accessibilityLabel: "Go back"
|
|
4918
4945
|
}
|
|
4919
4946
|
) : null);
|
|
4920
|
-
const titleBlock = /* @__PURE__ */
|
|
4947
|
+
const titleBlock = /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles40.titleBlock, centered && styles40.titleBlockCentered], pointerEvents: "none" }, title ? /* @__PURE__ */ React55__default.default.createElement(
|
|
4921
4948
|
reactNative.Text,
|
|
4922
4949
|
{
|
|
4923
4950
|
style: [styles40.title, { color: colors.foreground }, centered && styles40.textCentered],
|
|
@@ -4926,7 +4953,7 @@ function AppHeader({
|
|
|
4926
4953
|
accessibilityRole: "header"
|
|
4927
4954
|
},
|
|
4928
4955
|
title
|
|
4929
|
-
) : null, subtitle ? /* @__PURE__ */
|
|
4956
|
+
) : null, subtitle ? /* @__PURE__ */ React55__default.default.createElement(
|
|
4930
4957
|
reactNative.Text,
|
|
4931
4958
|
{
|
|
4932
4959
|
style: [styles40.subtitle, { color: colors.foregroundMuted }, centered && styles40.textCentered],
|
|
@@ -4935,7 +4962,7 @@ function AppHeader({
|
|
|
4935
4962
|
},
|
|
4936
4963
|
subtitle
|
|
4937
4964
|
) : null);
|
|
4938
|
-
return /* @__PURE__ */
|
|
4965
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
4939
4966
|
reactNative.View,
|
|
4940
4967
|
{
|
|
4941
4968
|
style: [
|
|
@@ -4949,7 +4976,7 @@ function AppHeader({
|
|
|
4949
4976
|
style
|
|
4950
4977
|
]
|
|
4951
4978
|
},
|
|
4952
|
-
/* @__PURE__ */
|
|
4979
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles40.bar }, centered ? /* @__PURE__ */ React55__default.default.createElement(React55__default.default.Fragment, null, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: reactNative.StyleSheet.absoluteFill }, titleBlock), /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles40.side }, leftNode), /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles40.side, styles40.sideRight] }, right)) : /* @__PURE__ */ React55__default.default.createElement(React55__default.default.Fragment, null, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles40.side }, leftNode), titleBlock, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles40.side, styles40.sideRight] }, right)))
|
|
4953
4980
|
);
|
|
4954
4981
|
}
|
|
4955
4982
|
var styles40 = reactNative.StyleSheet.create({
|
|
@@ -5006,7 +5033,7 @@ function Cell({ item, selected, width, onPress }) {
|
|
|
5006
5033
|
});
|
|
5007
5034
|
const iconColor = selected ? colors.primary : colors.foregroundSubtle;
|
|
5008
5035
|
const iconNode = item.icon ?? (item.iconName ? renderIcon(item.iconName, ms(24), iconColor) : null);
|
|
5009
|
-
return /* @__PURE__ */
|
|
5036
|
+
return /* @__PURE__ */ React55__default.default.createElement(Animated12__default.default.View, { style: [{ width }, animatedStyle] }, /* @__PURE__ */ React55__default.default.createElement(
|
|
5010
5037
|
reactNative.TouchableOpacity,
|
|
5011
5038
|
{
|
|
5012
5039
|
onPress,
|
|
@@ -5029,7 +5056,7 @@ function Cell({ item, selected, width, onPress }) {
|
|
|
5029
5056
|
]
|
|
5030
5057
|
},
|
|
5031
5058
|
iconNode,
|
|
5032
|
-
item.label ? /* @__PURE__ */
|
|
5059
|
+
item.label ? /* @__PURE__ */ React55__default.default.createElement(
|
|
5033
5060
|
reactNative.Text,
|
|
5034
5061
|
{
|
|
5035
5062
|
style: [styles41.label, { color: selected ? colors.primary : colors.foreground }],
|
|
@@ -5050,7 +5077,7 @@ function SelectableGrid({
|
|
|
5050
5077
|
orientation = "grid",
|
|
5051
5078
|
style
|
|
5052
5079
|
}) {
|
|
5053
|
-
const [containerWidth, setContainerWidth] =
|
|
5080
|
+
const [containerWidth, setContainerWidth] = React55.useState(0);
|
|
5054
5081
|
const gapPx = s(gap);
|
|
5055
5082
|
const cellWidth = containerWidth > 0 ? (containerWidth - gapPx * (numColumns - 1)) / numColumns - 0.5 : 0;
|
|
5056
5083
|
const horizCellWidth = s(72);
|
|
@@ -5060,7 +5087,7 @@ function SelectableGrid({
|
|
|
5060
5087
|
onChange(item.value);
|
|
5061
5088
|
};
|
|
5062
5089
|
if (orientation === "horizontal") {
|
|
5063
|
-
return /* @__PURE__ */
|
|
5090
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
5064
5091
|
reactNative.ScrollView,
|
|
5065
5092
|
{
|
|
5066
5093
|
horizontal: true,
|
|
@@ -5068,7 +5095,7 @@ function SelectableGrid({
|
|
|
5068
5095
|
contentContainerStyle: [styles41.horizontal, { gap: gapPx }, style],
|
|
5069
5096
|
accessibilityRole: multiple ? void 0 : "radiogroup"
|
|
5070
5097
|
},
|
|
5071
|
-
items.map((item) => /* @__PURE__ */
|
|
5098
|
+
items.map((item) => /* @__PURE__ */ React55__default.default.createElement(
|
|
5072
5099
|
Cell,
|
|
5073
5100
|
{
|
|
5074
5101
|
key: String(item.value),
|
|
@@ -5080,14 +5107,14 @@ function SelectableGrid({
|
|
|
5080
5107
|
))
|
|
5081
5108
|
);
|
|
5082
5109
|
}
|
|
5083
|
-
return /* @__PURE__ */
|
|
5110
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
5084
5111
|
reactNative.View,
|
|
5085
5112
|
{
|
|
5086
5113
|
style: [styles41.grid, { gap: gapPx }, style],
|
|
5087
5114
|
onLayout: (e) => setContainerWidth(e.nativeEvent.layout.width),
|
|
5088
5115
|
accessibilityRole: multiple ? void 0 : "radiogroup"
|
|
5089
5116
|
},
|
|
5090
|
-
cellWidth > 0 ? items.map((item) => /* @__PURE__ */
|
|
5117
|
+
cellWidth > 0 ? items.map((item) => /* @__PURE__ */ React55__default.default.createElement(
|
|
5091
5118
|
Cell,
|
|
5092
5119
|
{
|
|
5093
5120
|
key: String(item.value),
|
|
@@ -5128,6 +5155,230 @@ var styles41 = reactNative.StyleSheet.create({
|
|
|
5128
5155
|
textAlign: "center"
|
|
5129
5156
|
}
|
|
5130
5157
|
});
|
|
5158
|
+
var SelectableCardContext = React55.createContext(null);
|
|
5159
|
+
function SelectableCardGroup({
|
|
5160
|
+
type,
|
|
5161
|
+
value,
|
|
5162
|
+
onValueChange,
|
|
5163
|
+
variant = "elevated",
|
|
5164
|
+
gap = s(8),
|
|
5165
|
+
style,
|
|
5166
|
+
children
|
|
5167
|
+
}) {
|
|
5168
|
+
return /* @__PURE__ */ React55__default.default.createElement(SelectableCardContext.Provider, { value: { type, value, onValueChange, variant } }, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles42.group, { gap }, style] }, children));
|
|
5169
|
+
}
|
|
5170
|
+
function SelectableCard({
|
|
5171
|
+
value,
|
|
5172
|
+
title,
|
|
5173
|
+
description,
|
|
5174
|
+
iconName,
|
|
5175
|
+
icon,
|
|
5176
|
+
disabled = false,
|
|
5177
|
+
style
|
|
5178
|
+
}) {
|
|
5179
|
+
const ctx = React55.useContext(SelectableCardContext);
|
|
5180
|
+
if (!ctx) {
|
|
5181
|
+
throw new Error("SelectableCard must be used inside <SelectableCard.Group>");
|
|
5182
|
+
}
|
|
5183
|
+
const { colors } = useTheme();
|
|
5184
|
+
const { type, value: selectedValue, onValueChange, variant } = ctx;
|
|
5185
|
+
const isSelected2 = type === "radio" ? selectedValue === value : Array.isArray(selectedValue) && selectedValue.includes(value);
|
|
5186
|
+
const handlePress = () => {
|
|
5187
|
+
if (disabled) return;
|
|
5188
|
+
impactLight();
|
|
5189
|
+
if (type === "radio") {
|
|
5190
|
+
onValueChange(value);
|
|
5191
|
+
} else {
|
|
5192
|
+
const arr = Array.isArray(selectedValue) ? selectedValue : [];
|
|
5193
|
+
if (arr.includes(value)) {
|
|
5194
|
+
onValueChange(arr.filter((v) => v !== value));
|
|
5195
|
+
} else {
|
|
5196
|
+
onValueChange([...arr, value]);
|
|
5197
|
+
}
|
|
5198
|
+
}
|
|
5199
|
+
};
|
|
5200
|
+
const variantStyle = (() => {
|
|
5201
|
+
const borderWidth = 2;
|
|
5202
|
+
const base = {
|
|
5203
|
+
elevated: {
|
|
5204
|
+
backgroundColor: colors.card,
|
|
5205
|
+
borderWidth,
|
|
5206
|
+
borderColor: "transparent"
|
|
5207
|
+
// reserve space for selected border
|
|
5208
|
+
},
|
|
5209
|
+
outlined: {
|
|
5210
|
+
backgroundColor: colors.card,
|
|
5211
|
+
borderWidth,
|
|
5212
|
+
borderColor: colors.border
|
|
5213
|
+
},
|
|
5214
|
+
filled: {
|
|
5215
|
+
backgroundColor: colors.surfaceStrong,
|
|
5216
|
+
borderWidth,
|
|
5217
|
+
borderColor: colors.border
|
|
5218
|
+
}
|
|
5219
|
+
}[variant];
|
|
5220
|
+
if (isSelected2 && !disabled) {
|
|
5221
|
+
return {
|
|
5222
|
+
...base,
|
|
5223
|
+
borderColor: colors.primary,
|
|
5224
|
+
shadowColor: "transparent",
|
|
5225
|
+
shadowOpacity: 0,
|
|
5226
|
+
shadowRadius: 0,
|
|
5227
|
+
elevation: 0
|
|
5228
|
+
};
|
|
5229
|
+
}
|
|
5230
|
+
if (disabled) {
|
|
5231
|
+
return {
|
|
5232
|
+
...base,
|
|
5233
|
+
shadowColor: "transparent",
|
|
5234
|
+
shadowOpacity: 0,
|
|
5235
|
+
shadowRadius: 0,
|
|
5236
|
+
elevation: 0,
|
|
5237
|
+
borderColor: colors.border
|
|
5238
|
+
};
|
|
5239
|
+
}
|
|
5240
|
+
return base;
|
|
5241
|
+
})();
|
|
5242
|
+
const resolvedIcon = iconName ? renderIcon(iconName, ms(22), disabled ? colors.foregroundMuted : colors.foregroundMuted) : icon;
|
|
5243
|
+
const resolvedIconElement = resolvedIcon ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles42.iconWrapper, disabled && { opacity: 0.45 }] }, resolvedIcon) : null;
|
|
5244
|
+
const selectorAccessibilityRole = type === "radio" ? "radio" : "checkbox";
|
|
5245
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
5246
|
+
reactNative.Pressable,
|
|
5247
|
+
{
|
|
5248
|
+
onPress: handlePress,
|
|
5249
|
+
disabled,
|
|
5250
|
+
accessibilityRole: "button",
|
|
5251
|
+
accessibilityLabel: `${title}${description ? `, ${description}` : ""}`,
|
|
5252
|
+
accessibilityState: { selected: isSelected2, disabled },
|
|
5253
|
+
style: [
|
|
5254
|
+
styles42.card,
|
|
5255
|
+
variantStyle,
|
|
5256
|
+
isSelected2 && !disabled && styles42.cardSelected,
|
|
5257
|
+
style
|
|
5258
|
+
]
|
|
5259
|
+
},
|
|
5260
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles42.row }, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles42.selectorContainer, accessibilityRole: selectorAccessibilityRole, accessibilityState: { selected: isSelected2, disabled } }, type === "radio" ? /* @__PURE__ */ React55__default.default.createElement(
|
|
5261
|
+
reactNativeEase.EaseView,
|
|
5262
|
+
{
|
|
5263
|
+
style: styles42.radioCircle,
|
|
5264
|
+
animate: { borderColor: !disabled && isSelected2 ? colors.primary : colors.border },
|
|
5265
|
+
transition: COLOR_TRANSITION
|
|
5266
|
+
},
|
|
5267
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
5268
|
+
reactNativeEase.EaseView,
|
|
5269
|
+
{
|
|
5270
|
+
animate: {
|
|
5271
|
+
scale: !disabled && isSelected2 ? 1 : 0,
|
|
5272
|
+
opacity: !disabled && isSelected2 ? 1 : 0
|
|
5273
|
+
},
|
|
5274
|
+
transition: SPRING_ELASTIC
|
|
5275
|
+
},
|
|
5276
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles42.radioDot, { backgroundColor: colors.primary }] })
|
|
5277
|
+
)
|
|
5278
|
+
) : /* @__PURE__ */ React55__default.default.createElement(
|
|
5279
|
+
reactNativeEase.EaseView,
|
|
5280
|
+
{
|
|
5281
|
+
style: styles42.checkboxBox,
|
|
5282
|
+
animate: {
|
|
5283
|
+
borderColor: !disabled && isSelected2 ? colors.primary : colors.border,
|
|
5284
|
+
backgroundColor: !disabled && isSelected2 ? colors.primary : "transparent"
|
|
5285
|
+
},
|
|
5286
|
+
transition: COLOR_TRANSITION
|
|
5287
|
+
},
|
|
5288
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
5289
|
+
reactNativeEase.EaseView,
|
|
5290
|
+
{
|
|
5291
|
+
animate: { opacity: !disabled && isSelected2 ? 1 : 0 },
|
|
5292
|
+
transition: OPACITY_TRANSITION
|
|
5293
|
+
},
|
|
5294
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles42.checkmark, { borderColor: colors.primaryForeground }] })
|
|
5295
|
+
)
|
|
5296
|
+
)), resolvedIconElement, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles42.textArea }, /* @__PURE__ */ React55__default.default.createElement(
|
|
5297
|
+
reactNative.Text,
|
|
5298
|
+
{
|
|
5299
|
+
style: [styles42.title, { color: disabled ? colors.foregroundMuted : colors.foreground }],
|
|
5300
|
+
allowFontScaling: true,
|
|
5301
|
+
numberOfLines: 2
|
|
5302
|
+
},
|
|
5303
|
+
title
|
|
5304
|
+
), description ? /* @__PURE__ */ React55__default.default.createElement(
|
|
5305
|
+
reactNative.Text,
|
|
5306
|
+
{
|
|
5307
|
+
style: [styles42.description, { color: disabled ? colors.foregroundMuted : colors.foregroundSubtle }],
|
|
5308
|
+
allowFontScaling: true,
|
|
5309
|
+
numberOfLines: 4
|
|
5310
|
+
},
|
|
5311
|
+
description
|
|
5312
|
+
) : null))
|
|
5313
|
+
);
|
|
5314
|
+
}
|
|
5315
|
+
var styles42 = reactNative.StyleSheet.create({
|
|
5316
|
+
group: {
|
|
5317
|
+
width: "100%"
|
|
5318
|
+
},
|
|
5319
|
+
card: {
|
|
5320
|
+
borderRadius: RADIUS.md,
|
|
5321
|
+
borderWidth: 1
|
|
5322
|
+
},
|
|
5323
|
+
cardSelected: {
|
|
5324
|
+
backgroundColor: void 0
|
|
5325
|
+
// overridden by variantStyle
|
|
5326
|
+
},
|
|
5327
|
+
row: {
|
|
5328
|
+
flexDirection: "row",
|
|
5329
|
+
alignItems: "flex-start",
|
|
5330
|
+
padding: s(16),
|
|
5331
|
+
gap: s(12)
|
|
5332
|
+
},
|
|
5333
|
+
selectorContainer: {
|
|
5334
|
+
paddingTop: vs(1)
|
|
5335
|
+
},
|
|
5336
|
+
radioCircle: {
|
|
5337
|
+
width: s(24),
|
|
5338
|
+
height: s(24),
|
|
5339
|
+
borderRadius: s(12),
|
|
5340
|
+
borderWidth: 2,
|
|
5341
|
+
alignItems: "center",
|
|
5342
|
+
justifyContent: "center"
|
|
5343
|
+
},
|
|
5344
|
+
radioDot: {
|
|
5345
|
+
width: s(10),
|
|
5346
|
+
height: s(10),
|
|
5347
|
+
borderRadius: s(5)
|
|
5348
|
+
},
|
|
5349
|
+
checkboxBox: {
|
|
5350
|
+
width: s(24),
|
|
5351
|
+
height: s(24),
|
|
5352
|
+
borderRadius: ms(4),
|
|
5353
|
+
borderWidth: 2,
|
|
5354
|
+
alignItems: "center",
|
|
5355
|
+
justifyContent: "center"
|
|
5356
|
+
},
|
|
5357
|
+
checkmark: {
|
|
5358
|
+
width: s(12),
|
|
5359
|
+
height: vs(7),
|
|
5360
|
+
borderLeftWidth: 2,
|
|
5361
|
+
borderBottomWidth: 2,
|
|
5362
|
+
transform: [{ rotate: "-45deg" }, { translateY: -1 }]
|
|
5363
|
+
},
|
|
5364
|
+
iconWrapper: {
|
|
5365
|
+
paddingTop: vs(1)
|
|
5366
|
+
},
|
|
5367
|
+
textArea: {
|
|
5368
|
+
flex: 1,
|
|
5369
|
+
gap: vs(4)
|
|
5370
|
+
},
|
|
5371
|
+
title: {
|
|
5372
|
+
fontFamily: "Sohne-SemiBold",
|
|
5373
|
+
fontSize: ms(16),
|
|
5374
|
+
lineHeight: mvs(22)
|
|
5375
|
+
},
|
|
5376
|
+
description: {
|
|
5377
|
+
fontFamily: "Sohne-Regular",
|
|
5378
|
+
fontSize: ms(13),
|
|
5379
|
+
lineHeight: mvs(18)
|
|
5380
|
+
}
|
|
5381
|
+
});
|
|
5131
5382
|
var normalize = (f) => typeof f === "string" ? { label: f, included: true } : { included: true, ...f };
|
|
5132
5383
|
function PricingCard({
|
|
5133
5384
|
name,
|
|
@@ -5143,11 +5394,11 @@ function PricingCard({
|
|
|
5143
5394
|
style
|
|
5144
5395
|
}) {
|
|
5145
5396
|
const { colors } = useTheme();
|
|
5146
|
-
return /* @__PURE__ */
|
|
5397
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
5147
5398
|
reactNative.View,
|
|
5148
5399
|
{
|
|
5149
5400
|
style: [
|
|
5150
|
-
|
|
5401
|
+
styles43.card,
|
|
5151
5402
|
{
|
|
5152
5403
|
backgroundColor: colors.card,
|
|
5153
5404
|
borderColor: highlighted ? colors.primary : colors.border,
|
|
@@ -5158,39 +5409,39 @@ function PricingCard({
|
|
|
5158
5409
|
],
|
|
5159
5410
|
accessibilityRole: "summary"
|
|
5160
5411
|
},
|
|
5161
|
-
/* @__PURE__ */
|
|
5162
|
-
/* @__PURE__ */
|
|
5163
|
-
description ? /* @__PURE__ */
|
|
5164
|
-
features.length > 0 ? /* @__PURE__ */
|
|
5412
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles43.header }, /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles43.name, { color: colors.foreground }], allowFontScaling: true }, name), badge ? /* @__PURE__ */ React55__default.default.createElement(Badge, { label: badge, variant: highlighted ? "default" : "secondary", size: "sm" }) : null),
|
|
5413
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles43.priceRow }, /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles43.price, { color: colors.foreground }], allowFontScaling: true }, price), period ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles43.period, { color: colors.foregroundMuted }], allowFontScaling: true }, period) : null),
|
|
5414
|
+
description ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles43.description, { color: colors.foregroundMuted }], allowFontScaling: true }, description) : null,
|
|
5415
|
+
features.length > 0 ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles43.features }, features.map(normalize).map((f, i) => /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { key: i, style: styles43.featureRow }, renderIcon(
|
|
5165
5416
|
f.included ? "check" : "minus",
|
|
5166
5417
|
ms(16),
|
|
5167
5418
|
f.included ? colors.success : colors.foregroundMuted
|
|
5168
|
-
), /* @__PURE__ */
|
|
5419
|
+
), /* @__PURE__ */ React55__default.default.createElement(
|
|
5169
5420
|
reactNative.Text,
|
|
5170
5421
|
{
|
|
5171
5422
|
style: [
|
|
5172
|
-
|
|
5423
|
+
styles43.featureLabel,
|
|
5173
5424
|
{ color: f.included ? colors.foreground : colors.foregroundMuted },
|
|
5174
|
-
!f.included &&
|
|
5425
|
+
!f.included && styles43.featureExcluded
|
|
5175
5426
|
],
|
|
5176
5427
|
allowFontScaling: true
|
|
5177
5428
|
},
|
|
5178
5429
|
f.label
|
|
5179
5430
|
)))) : null,
|
|
5180
|
-
ctaLabel ? /* @__PURE__ */
|
|
5431
|
+
ctaLabel ? /* @__PURE__ */ React55__default.default.createElement(
|
|
5181
5432
|
Button,
|
|
5182
5433
|
{
|
|
5183
5434
|
label: ctaLabel,
|
|
5184
5435
|
variant: highlighted ? "primary" : "secondary",
|
|
5185
5436
|
fullWidth: true,
|
|
5186
5437
|
onPress: onCtaPress,
|
|
5187
|
-
style:
|
|
5438
|
+
style: styles43.cta
|
|
5188
5439
|
}
|
|
5189
5440
|
) : null,
|
|
5190
|
-
footnote ? /* @__PURE__ */
|
|
5441
|
+
footnote ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles43.footnote, { color: colors.foregroundMuted }], allowFontScaling: true }, footnote) : null
|
|
5191
5442
|
);
|
|
5192
5443
|
}
|
|
5193
|
-
var
|
|
5444
|
+
var styles43 = reactNative.StyleSheet.create({
|
|
5194
5445
|
card: {
|
|
5195
5446
|
borderRadius: RADIUS.md,
|
|
5196
5447
|
padding: s(16),
|
|
@@ -5269,11 +5520,11 @@ function TabBar({
|
|
|
5269
5520
|
const insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
5270
5521
|
const resolvedActive = activeColor ?? colors.primary;
|
|
5271
5522
|
const resolvedInactive = inactiveColor ?? colors.foregroundMuted;
|
|
5272
|
-
return /* @__PURE__ */
|
|
5523
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
5273
5524
|
reactNative.View,
|
|
5274
5525
|
{
|
|
5275
5526
|
style: [
|
|
5276
|
-
|
|
5527
|
+
styles44.container,
|
|
5277
5528
|
{
|
|
5278
5529
|
backgroundColor: colors.card,
|
|
5279
5530
|
borderTopColor: colors.border,
|
|
@@ -5289,11 +5540,11 @@ function TabBar({
|
|
|
5289
5540
|
const iconNode = item.icon ?? (item.iconName ? renderIcon(item.iconName, ms(24), tint) : null);
|
|
5290
5541
|
const showBadge = item.badge !== void 0 && item.badge !== false;
|
|
5291
5542
|
const badgeCount = typeof item.badge === "number" ? item.badge : void 0;
|
|
5292
|
-
return /* @__PURE__ */
|
|
5543
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
5293
5544
|
reactNative.TouchableOpacity,
|
|
5294
5545
|
{
|
|
5295
5546
|
key: item.key,
|
|
5296
|
-
style:
|
|
5547
|
+
style: styles44.tab,
|
|
5297
5548
|
onPress: () => {
|
|
5298
5549
|
if (!active) selectionAsync();
|
|
5299
5550
|
onTabPress(item.key);
|
|
@@ -5304,23 +5555,23 @@ function TabBar({
|
|
|
5304
5555
|
accessibilityState: { selected: active },
|
|
5305
5556
|
accessibilityLabel: item.label ?? item.key
|
|
5306
5557
|
},
|
|
5307
|
-
/* @__PURE__ */
|
|
5558
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, null, iconNode, showBadge ? /* @__PURE__ */ React55__default.default.createElement(
|
|
5308
5559
|
reactNative.View,
|
|
5309
5560
|
{
|
|
5310
5561
|
style: [
|
|
5311
|
-
|
|
5562
|
+
styles44.badge,
|
|
5312
5563
|
{ backgroundColor: colors.destructive, borderColor: colors.card },
|
|
5313
|
-
badgeCount === void 0 &&
|
|
5564
|
+
badgeCount === void 0 && styles44.badgeDot
|
|
5314
5565
|
]
|
|
5315
5566
|
},
|
|
5316
|
-
badgeCount !== void 0 ? /* @__PURE__ */
|
|
5567
|
+
badgeCount !== void 0 ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles44.badgeText, { color: colors.destructiveForeground }], allowFontScaling: false }, badgeCount > 99 ? "99+" : badgeCount) : null
|
|
5317
5568
|
) : null),
|
|
5318
|
-
item.label ? /* @__PURE__ */
|
|
5569
|
+
item.label ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles44.label, { color: tint }], numberOfLines: 1, allowFontScaling: true }, item.label) : null
|
|
5319
5570
|
);
|
|
5320
5571
|
})
|
|
5321
5572
|
);
|
|
5322
5573
|
}
|
|
5323
|
-
var
|
|
5574
|
+
var styles44 = reactNative.StyleSheet.create({
|
|
5324
5575
|
container: {
|
|
5325
5576
|
flexDirection: "row",
|
|
5326
5577
|
borderTopWidth: reactNative.StyleSheet.hairlineWidth
|
|
@@ -5374,7 +5625,7 @@ function ZoomableImage({ source, width, height, onZoomChange }) {
|
|
|
5374
5625
|
const translateY = Animated12.useSharedValue(0);
|
|
5375
5626
|
const savedX = Animated12.useSharedValue(0);
|
|
5376
5627
|
const savedY = Animated12.useSharedValue(0);
|
|
5377
|
-
const reportZoom =
|
|
5628
|
+
const reportZoom = React55.useCallback((zoomed) => onZoomChange(zoomed), [onZoomChange]);
|
|
5378
5629
|
const reset = () => {
|
|
5379
5630
|
"worklet";
|
|
5380
5631
|
scale2.value = Animated12.withTiming(1);
|
|
@@ -5420,17 +5671,17 @@ function ZoomableImage({ source, width, height, onZoomChange }) {
|
|
|
5420
5671
|
{ scale: scale2.value }
|
|
5421
5672
|
]
|
|
5422
5673
|
}));
|
|
5423
|
-
return /* @__PURE__ */
|
|
5674
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNativeGestureHandler.GestureDetector, { gesture: composed }, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [{ width, height }, styles45.imageWrap], collapsable: false }, /* @__PURE__ */ React55__default.default.createElement(Animated12__default.default.View, { style: [{ width, height }, animatedStyle] }, /* @__PURE__ */ React55__default.default.createElement(reactNative.Image, { source, style: { width, height }, resizeMode: "contain" }))));
|
|
5424
5675
|
}
|
|
5425
5676
|
function ImageViewer({ images, visible, onClose, initialIndex = 0 }) {
|
|
5426
5677
|
const window = reactNative.useWindowDimensions();
|
|
5427
5678
|
const width = window.width > 0 ? window.width : reactNative.Dimensions.get("window").width;
|
|
5428
5679
|
const height = window.height > 0 ? window.height : reactNative.Dimensions.get("window").height;
|
|
5429
5680
|
const insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
5430
|
-
const [index, setIndex] =
|
|
5431
|
-
const [pagingEnabled, setPagingEnabled] =
|
|
5432
|
-
const scrollRef =
|
|
5433
|
-
|
|
5681
|
+
const [index, setIndex] = React55.useState(initialIndex);
|
|
5682
|
+
const [pagingEnabled, setPagingEnabled] = React55.useState(true);
|
|
5683
|
+
const scrollRef = React55__default.default.useRef(null);
|
|
5684
|
+
React55__default.default.useEffect(() => {
|
|
5434
5685
|
if (!visible) return;
|
|
5435
5686
|
const handle = requestAnimationFrame(() => {
|
|
5436
5687
|
setIndex(initialIndex);
|
|
@@ -5441,7 +5692,7 @@ function ImageViewer({ images, visible, onClose, initialIndex = 0 }) {
|
|
|
5441
5692
|
}, [visible, initialIndex, width]);
|
|
5442
5693
|
const dragY = Animated12.useSharedValue(0);
|
|
5443
5694
|
const DISMISS_THRESHOLD = height * 0.18;
|
|
5444
|
-
const closeViewer =
|
|
5695
|
+
const closeViewer = React55.useCallback(() => onClose(), [onClose]);
|
|
5445
5696
|
const swipeDown = reactNativeGestureHandler.Gesture.Pan().enabled(pagingEnabled).activeOffsetY(12).failOffsetX([-16, 16]).onUpdate((e) => {
|
|
5446
5697
|
dragY.value = Math.max(0, e.translationY);
|
|
5447
5698
|
}).onEnd((e) => {
|
|
@@ -5451,7 +5702,7 @@ function ImageViewer({ images, visible, onClose, initialIndex = 0 }) {
|
|
|
5451
5702
|
dragY.value = Animated12.withTiming(0);
|
|
5452
5703
|
}
|
|
5453
5704
|
});
|
|
5454
|
-
|
|
5705
|
+
React55__default.default.useEffect(() => {
|
|
5455
5706
|
if (visible) dragY.value = 0;
|
|
5456
5707
|
}, [visible, dragY]);
|
|
5457
5708
|
const dismissStyle = Animated12.useAnimatedStyle(() => ({
|
|
@@ -5468,7 +5719,7 @@ function ImageViewer({ images, visible, onClose, initialIndex = 0 }) {
|
|
|
5468
5719
|
scrollRef.current?.scrollTo({ x: page * width, animated: true });
|
|
5469
5720
|
setIndex(page);
|
|
5470
5721
|
};
|
|
5471
|
-
return /* @__PURE__ */
|
|
5722
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.Modal, { visible, transparent: false, animationType: "fade", onRequestClose: onClose, statusBarTranslucent: true }, /* @__PURE__ */ React55__default.default.createElement(reactNativeGestureHandler.GestureHandlerRootView, { style: styles45.root }, /* @__PURE__ */ React55__default.default.createElement(Animated12__default.default.View, { style: [styles45.backdrop, backdropStyle], pointerEvents: "none" }), /* @__PURE__ */ React55__default.default.createElement(Animated12__default.default.View, { style: [styles45.container, dismissStyle] }, /* @__PURE__ */ React55__default.default.createElement(reactNativeGestureHandler.GestureDetector, { gesture: swipeDown }, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles45.root, collapsable: false }, /* @__PURE__ */ React55__default.default.createElement(
|
|
5472
5723
|
reactNative.ScrollView,
|
|
5473
5724
|
{
|
|
5474
5725
|
ref: scrollRef,
|
|
@@ -5479,7 +5730,7 @@ function ImageViewer({ images, visible, onClose, initialIndex = 0 }) {
|
|
|
5479
5730
|
onMomentumScrollEnd: onMomentumEnd,
|
|
5480
5731
|
bounces: false
|
|
5481
5732
|
},
|
|
5482
|
-
images.map((source, i) => /* @__PURE__ */
|
|
5733
|
+
images.map((source, i) => /* @__PURE__ */ React55__default.default.createElement(
|
|
5483
5734
|
ZoomableImage,
|
|
5484
5735
|
{
|
|
5485
5736
|
key: i,
|
|
@@ -5489,7 +5740,7 @@ function ImageViewer({ images, visible, onClose, initialIndex = 0 }) {
|
|
|
5489
5740
|
onZoomChange: (zoomed) => setPagingEnabled(!zoomed)
|
|
5490
5741
|
}
|
|
5491
5742
|
))
|
|
5492
|
-
))), /* @__PURE__ */
|
|
5743
|
+
))), /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles45.closeButtonWrapper, { top: insets.top + vs(8) }] }, /* @__PURE__ */ React55__default.default.createElement(
|
|
5493
5744
|
IconButton,
|
|
5494
5745
|
{
|
|
5495
5746
|
iconName: "x",
|
|
@@ -5500,7 +5751,7 @@ function ImageViewer({ images, visible, onClose, initialIndex = 0 }) {
|
|
|
5500
5751
|
onPress: onClose,
|
|
5501
5752
|
accessibilityLabel: "Close"
|
|
5502
5753
|
}
|
|
5503
|
-
)), images.length > 1 ? /* @__PURE__ */
|
|
5754
|
+
)), images.length > 1 ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles45.dots, { bottom: insets.bottom + vs(16) }], pointerEvents: "box-none" }, /* @__PURE__ */ React55__default.default.createElement(
|
|
5504
5755
|
PagerDots,
|
|
5505
5756
|
{
|
|
5506
5757
|
count: images.length,
|
|
@@ -5511,7 +5762,7 @@ function ImageViewer({ images, visible, onClose, initialIndex = 0 }) {
|
|
|
5511
5762
|
}
|
|
5512
5763
|
)) : null)));
|
|
5513
5764
|
}
|
|
5514
|
-
var
|
|
5765
|
+
var styles45 = reactNative.StyleSheet.create({
|
|
5515
5766
|
root: {
|
|
5516
5767
|
flex: 1
|
|
5517
5768
|
},
|
|
@@ -5550,7 +5801,7 @@ function SheetSelectChip({
|
|
|
5550
5801
|
};
|
|
5551
5802
|
const iconColor = selected ? colors.primaryForeground : colors.foreground;
|
|
5552
5803
|
const resolvedIcon = option.iconName ? renderIcon(option.iconName, ms(13), iconColor) : null;
|
|
5553
|
-
return /* @__PURE__ */
|
|
5804
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
5554
5805
|
PressableChip,
|
|
5555
5806
|
{
|
|
5556
5807
|
onPress: option.disabled ? void 0 : handlePress,
|
|
@@ -5560,21 +5811,21 @@ function SheetSelectChip({
|
|
|
5560
5811
|
accessibilityLabel: option.disabled ? `${option.label}, unavailable` : option.label,
|
|
5561
5812
|
accessibilityState: { selected, disabled: option.disabled }
|
|
5562
5813
|
},
|
|
5563
|
-
/* @__PURE__ */
|
|
5814
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
5564
5815
|
reactNativeEase.EaseView,
|
|
5565
5816
|
{
|
|
5566
|
-
style: [
|
|
5817
|
+
style: [styles46.chip, option.disabled && styles46.chipDisabled],
|
|
5567
5818
|
animate: {
|
|
5568
5819
|
backgroundColor: selected ? colors.primary : colors.surface,
|
|
5569
5820
|
borderColor: selected ? colors.primary : colors.border
|
|
5570
5821
|
},
|
|
5571
5822
|
transition: COLOR_TRANSITION
|
|
5572
5823
|
},
|
|
5573
|
-
resolvedIcon ? /* @__PURE__ */
|
|
5574
|
-
/* @__PURE__ */
|
|
5824
|
+
resolvedIcon ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles46.chipIcon }, resolvedIcon) : null,
|
|
5825
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
5575
5826
|
reactNative.Text,
|
|
5576
5827
|
{
|
|
5577
|
-
style: [
|
|
5828
|
+
style: [styles46.chipLabel, { color: selected ? colors.primaryForeground : colors.foreground }],
|
|
5578
5829
|
allowFontScaling: true
|
|
5579
5830
|
},
|
|
5580
5831
|
option.label
|
|
@@ -5608,7 +5859,7 @@ function SheetSelect({
|
|
|
5608
5859
|
const newArray = alreadySelected ? currentArray.filter((v) => v !== optionValue) : [...currentArray, optionValue];
|
|
5609
5860
|
onValueChange?.(newArray);
|
|
5610
5861
|
};
|
|
5611
|
-
const chips = options.map((opt) => /* @__PURE__ */
|
|
5862
|
+
const chips = options.map((opt) => /* @__PURE__ */ React55__default.default.createElement(
|
|
5612
5863
|
SheetSelectChip,
|
|
5613
5864
|
{
|
|
5614
5865
|
key: opt.value,
|
|
@@ -5617,17 +5868,17 @@ function SheetSelect({
|
|
|
5617
5868
|
onPress: () => handlePress(opt.value)
|
|
5618
5869
|
}
|
|
5619
5870
|
));
|
|
5620
|
-
return /* @__PURE__ */
|
|
5871
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles46.container, style], accessibilityLabel }, label ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles46.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, wrap ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles46.wrapContainer }, chips) : /* @__PURE__ */ React55__default.default.createElement(
|
|
5621
5872
|
reactNative.ScrollView,
|
|
5622
5873
|
{
|
|
5623
5874
|
horizontal: true,
|
|
5624
5875
|
showsHorizontalScrollIndicator: false,
|
|
5625
|
-
contentContainerStyle:
|
|
5876
|
+
contentContainerStyle: styles46.scrollContent
|
|
5626
5877
|
},
|
|
5627
5878
|
chips
|
|
5628
|
-
), error ? /* @__PURE__ */
|
|
5879
|
+
), error ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles46.error, { color: colors.destructive }], allowFontScaling: true, accessibilityLiveRegion: "polite" }, error) : null);
|
|
5629
5880
|
}
|
|
5630
|
-
var
|
|
5881
|
+
var styles46 = reactNative.StyleSheet.create({
|
|
5631
5882
|
container: {
|
|
5632
5883
|
gap: vs(8)
|
|
5633
5884
|
},
|
|
@@ -5682,11 +5933,13 @@ function ImageUpload({
|
|
|
5682
5933
|
height = 200,
|
|
5683
5934
|
borderRadius = RADIUS.lg,
|
|
5684
5935
|
resizeMode = "cover",
|
|
5936
|
+
allowsEditing = true,
|
|
5685
5937
|
disabled = false,
|
|
5686
5938
|
style,
|
|
5687
5939
|
accessibilityLabel
|
|
5688
5940
|
}) {
|
|
5689
5941
|
const { colors } = useTheme();
|
|
5942
|
+
const [imageLoaded, setImageLoaded] = React55.useState(false);
|
|
5690
5943
|
const handlePress = async () => {
|
|
5691
5944
|
if (disabled || loading) return;
|
|
5692
5945
|
impactLight();
|
|
@@ -5711,10 +5964,11 @@ function ImageUpload({
|
|
|
5711
5964
|
}
|
|
5712
5965
|
const result = await picker.launchImageLibraryAsync({
|
|
5713
5966
|
mediaTypes: ["images"],
|
|
5714
|
-
allowsEditing
|
|
5967
|
+
allowsEditing,
|
|
5715
5968
|
quality: 0.8
|
|
5716
5969
|
});
|
|
5717
5970
|
if (!result.canceled && result.assets?.[0]) {
|
|
5971
|
+
setImageLoaded(false);
|
|
5718
5972
|
onChange?.(result.assets[0].uri);
|
|
5719
5973
|
}
|
|
5720
5974
|
};
|
|
@@ -5725,10 +5979,10 @@ function ImageUpload({
|
|
|
5725
5979
|
borderWidth: value ? 0 : 1,
|
|
5726
5980
|
borderStyle: "dashed",
|
|
5727
5981
|
borderColor: colors.border,
|
|
5728
|
-
backgroundColor: value ? "transparent" : colors.surface,
|
|
5982
|
+
backgroundColor: value && imageLoaded ? "transparent" : colors.surface,
|
|
5729
5983
|
overflow: "hidden"
|
|
5730
5984
|
};
|
|
5731
|
-
return /* @__PURE__ */
|
|
5985
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
5732
5986
|
PressableCard,
|
|
5733
5987
|
{
|
|
5734
5988
|
onPress: handlePress,
|
|
@@ -5740,27 +5994,29 @@ function ImageUpload({
|
|
|
5740
5994
|
accessibilityState: { disabled: disabled || loading },
|
|
5741
5995
|
style: [containerStyle, style]
|
|
5742
5996
|
},
|
|
5743
|
-
value ? /* @__PURE__ */
|
|
5997
|
+
value ? /* @__PURE__ */ React55__default.default.createElement(
|
|
5744
5998
|
reactNative.Image,
|
|
5745
5999
|
{
|
|
5746
6000
|
source: { uri: value },
|
|
5747
6001
|
style: [reactNative.StyleSheet.absoluteFillObject, { borderRadius }],
|
|
5748
|
-
resizeMode
|
|
6002
|
+
resizeMode,
|
|
6003
|
+
onLoad: () => setImageLoaded(true),
|
|
6004
|
+
onError: () => setImageLoaded(true)
|
|
5749
6005
|
}
|
|
5750
|
-
) : /* @__PURE__ */
|
|
6006
|
+
) : /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles47.placeholder }, /* @__PURE__ */ React55__default.default.createElement(vectorIcons.Feather, { name: "image", size: ms(28), color: colors.foregroundMuted }), showPlaceholderText ? /* @__PURE__ */ React55__default.default.createElement(
|
|
5751
6007
|
reactNative.Text,
|
|
5752
6008
|
{
|
|
5753
|
-
style: [
|
|
6009
|
+
style: [styles47.placeholderText, { color: colors.foregroundMuted }],
|
|
5754
6010
|
numberOfLines: 1,
|
|
5755
6011
|
allowFontScaling: true
|
|
5756
6012
|
},
|
|
5757
6013
|
placeholder
|
|
5758
6014
|
) : null),
|
|
5759
|
-
loading ? /* @__PURE__ */
|
|
5760
|
-
value && !loading ? /* @__PURE__ */
|
|
6015
|
+
loading ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles47.loadingOverlay, { backgroundColor: colors.overlay }] }, /* @__PURE__ */ React55__default.default.createElement(Spinner, { size: "md" })) : null,
|
|
6016
|
+
value && !loading ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles47.editBadge, pointerEvents: "none" }, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles47.editBadgeInner, { backgroundColor: colors.overlay }] }, /* @__PURE__ */ React55__default.default.createElement(vectorIcons.Feather, { name: "edit-2", size: ms(12), color: "#fff" }))) : null
|
|
5761
6017
|
);
|
|
5762
6018
|
}
|
|
5763
|
-
var
|
|
6019
|
+
var styles47 = reactNative.StyleSheet.create({
|
|
5764
6020
|
placeholder: {
|
|
5765
6021
|
flex: 1,
|
|
5766
6022
|
alignItems: "center",
|
|
@@ -6590,7 +6846,7 @@ function IconCell({ name, selected, size, onPress }) {
|
|
|
6590
6846
|
};
|
|
6591
6847
|
const iconColor = selected ? colors.primaryForeground : colors.foreground;
|
|
6592
6848
|
const bg = selected ? colors.primary : "transparent";
|
|
6593
|
-
return /* @__PURE__ */
|
|
6849
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
6594
6850
|
reactNative.TouchableOpacity,
|
|
6595
6851
|
{
|
|
6596
6852
|
onPress: handlePress,
|
|
@@ -6599,12 +6855,12 @@ function IconCell({ name, selected, size, onPress }) {
|
|
|
6599
6855
|
accessibilityRole: "button",
|
|
6600
6856
|
accessibilityState: { selected },
|
|
6601
6857
|
accessibilityLabel: name,
|
|
6602
|
-
style: [
|
|
6858
|
+
style: [styles48.cell, { width: size, height: size, backgroundColor: bg }]
|
|
6603
6859
|
},
|
|
6604
6860
|
renderIcon(name, ms(20), iconColor)
|
|
6605
6861
|
);
|
|
6606
6862
|
}
|
|
6607
|
-
var IconCellMemo =
|
|
6863
|
+
var IconCellMemo = React55__default.default.memo(IconCell);
|
|
6608
6864
|
function IconPicker({
|
|
6609
6865
|
value,
|
|
6610
6866
|
onChange,
|
|
@@ -6618,13 +6874,13 @@ function IconPicker({
|
|
|
6618
6874
|
}) {
|
|
6619
6875
|
const { colors } = useTheme();
|
|
6620
6876
|
const insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
6621
|
-
const sheetRef =
|
|
6622
|
-
const catScrollRef =
|
|
6623
|
-
const [activeCategory, setActiveCategory] =
|
|
6624
|
-
const [containerWidth, setContainerWidth] =
|
|
6625
|
-
const [ready, setReady] =
|
|
6626
|
-
const sheetName =
|
|
6627
|
-
const activeIcons =
|
|
6877
|
+
const sheetRef = React55.useRef(null);
|
|
6878
|
+
const catScrollRef = React55.useRef(null);
|
|
6879
|
+
const [activeCategory, setActiveCategory] = React55.useState(null);
|
|
6880
|
+
const [containerWidth, setContainerWidth] = React55.useState(() => reactNative.Dimensions.get("window").width - s(16) * 2);
|
|
6881
|
+
const [ready, setReady] = React55.useState(false);
|
|
6882
|
+
const sheetName = React55.useId();
|
|
6883
|
+
const activeIcons = React55.useMemo(() => {
|
|
6628
6884
|
if (activeCategory) {
|
|
6629
6885
|
return CURATED_ICONS.find((c) => c.name === activeCategory)?.icons ?? ALL_CURATED_ICONS;
|
|
6630
6886
|
}
|
|
@@ -6632,36 +6888,36 @@ function IconPicker({
|
|
|
6632
6888
|
}, [activeCategory]);
|
|
6633
6889
|
const gapPx = s(gap);
|
|
6634
6890
|
const cellSize = containerWidth > 0 ? Math.floor((containerWidth - gapPx * (numColumns - 1)) / numColumns) : 0;
|
|
6635
|
-
const rows =
|
|
6891
|
+
const rows = React55.useMemo(() => {
|
|
6636
6892
|
const result = [];
|
|
6637
6893
|
for (let i = 0; i < activeIcons.length; i += numColumns) {
|
|
6638
6894
|
result.push(activeIcons.slice(i, i + numColumns));
|
|
6639
6895
|
}
|
|
6640
6896
|
return result;
|
|
6641
6897
|
}, [activeIcons, numColumns]);
|
|
6642
|
-
const handleDismiss =
|
|
6898
|
+
const handleDismiss = React55.useCallback(() => {
|
|
6643
6899
|
setActiveCategory(null);
|
|
6644
6900
|
setReady(false);
|
|
6645
6901
|
}, []);
|
|
6646
|
-
const handleSelect =
|
|
6902
|
+
const handleSelect = React55.useCallback(
|
|
6647
6903
|
(iconName) => {
|
|
6648
6904
|
onChange(iconName);
|
|
6649
6905
|
},
|
|
6650
6906
|
[onChange]
|
|
6651
6907
|
);
|
|
6652
|
-
const handleOpen =
|
|
6908
|
+
const handleOpen = React55.useCallback(() => {
|
|
6653
6909
|
if (disabled) return;
|
|
6654
6910
|
impactMedium();
|
|
6655
6911
|
setActiveCategory(null);
|
|
6656
6912
|
setReady(false);
|
|
6657
6913
|
sheetRef.current?.present();
|
|
6658
6914
|
}, [disabled]);
|
|
6659
|
-
const renderBackdrop =
|
|
6660
|
-
(props) => /* @__PURE__ */
|
|
6915
|
+
const renderBackdrop = React55.useCallback(
|
|
6916
|
+
(props) => /* @__PURE__ */ React55__default.default.createElement(bottomSheet.BottomSheetBackdrop, { ...props, disappearsOnIndex: -1, appearsOnIndex: 0, pressBehavior: "close" }),
|
|
6661
6917
|
[]
|
|
6662
6918
|
);
|
|
6663
6919
|
const selectedIcon = value ? renderIcon(value, ms(28), colors.foreground) : null;
|
|
6664
|
-
return /* @__PURE__ */
|
|
6920
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles48.triggerContainer, style] }, label ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles48.triggerLabel, { color: colors.foreground }], allowFontScaling: true }, label) : null, /* @__PURE__ */ React55__default.default.createElement(
|
|
6665
6921
|
reactNative.TouchableOpacity,
|
|
6666
6922
|
{
|
|
6667
6923
|
onPress: handleOpen,
|
|
@@ -6672,26 +6928,26 @@ function IconPicker({
|
|
|
6672
6928
|
accessibilityLabel: label ?? "Seleccionar icono",
|
|
6673
6929
|
accessibilityState: { disabled },
|
|
6674
6930
|
style: [
|
|
6675
|
-
|
|
6931
|
+
styles48.trigger,
|
|
6676
6932
|
{
|
|
6677
6933
|
backgroundColor: disabled ? colors.surface : colors.background,
|
|
6678
6934
|
width: TRIGGER_SIZE,
|
|
6679
6935
|
height: TRIGGER_SIZE,
|
|
6680
6936
|
borderColor: error ? colors.destructive : value ? colors.primary : colors.border
|
|
6681
6937
|
},
|
|
6682
|
-
disabled &&
|
|
6938
|
+
disabled && styles48.triggerDisabled
|
|
6683
6939
|
]
|
|
6684
6940
|
},
|
|
6685
6941
|
selectedIcon ?? renderIcon("plus", ms(24), colors.foregroundMuted)
|
|
6686
|
-
), error ? /* @__PURE__ */
|
|
6942
|
+
), error ? /* @__PURE__ */ React55__default.default.createElement(
|
|
6687
6943
|
reactNative.Text,
|
|
6688
6944
|
{
|
|
6689
|
-
style: [
|
|
6945
|
+
style: [styles48.helperText, { color: colors.destructive }],
|
|
6690
6946
|
allowFontScaling: true,
|
|
6691
6947
|
accessibilityLiveRegion: "polite"
|
|
6692
6948
|
},
|
|
6693
6949
|
error
|
|
6694
|
-
) : null, !error && hint ? /* @__PURE__ */
|
|
6950
|
+
) : null, !error && hint ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles48.helperText, { color: colors.foregroundMuted }], allowFontScaling: true }, hint) : null, /* @__PURE__ */ React55__default.default.createElement(
|
|
6695
6951
|
bottomSheet.BottomSheetModal,
|
|
6696
6952
|
{
|
|
6697
6953
|
ref: sheetRef,
|
|
@@ -6700,37 +6956,37 @@ function IconPicker({
|
|
|
6700
6956
|
enableDynamicSizing: true,
|
|
6701
6957
|
maxDynamicContentSize: SCREEN_HEIGHT * 0.7,
|
|
6702
6958
|
backdropComponent: renderBackdrop,
|
|
6703
|
-
backgroundStyle: { ...
|
|
6704
|
-
handleIndicatorStyle: { ...
|
|
6959
|
+
backgroundStyle: { ...styles48.sheetBackground, backgroundColor: colors.card },
|
|
6960
|
+
handleIndicatorStyle: { ...styles48.handle, backgroundColor: colors.border },
|
|
6705
6961
|
enablePanDownToClose: true,
|
|
6706
6962
|
topInset: insets.top,
|
|
6707
6963
|
android_keyboardInputMode: "adjustPan"
|
|
6708
6964
|
},
|
|
6709
|
-
/* @__PURE__ */
|
|
6965
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
6710
6966
|
bottomSheet.BottomSheetScrollView,
|
|
6711
6967
|
{
|
|
6712
|
-
contentContainerStyle:
|
|
6968
|
+
contentContainerStyle: styles48.sheetContent,
|
|
6713
6969
|
showsVerticalScrollIndicator: true
|
|
6714
6970
|
},
|
|
6715
|
-
/* @__PURE__ */
|
|
6971
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
6716
6972
|
reactNative.View,
|
|
6717
6973
|
{
|
|
6718
|
-
style:
|
|
6974
|
+
style: styles48.gridContainer,
|
|
6719
6975
|
onLayout: (e) => {
|
|
6720
6976
|
setContainerWidth(e.nativeEvent.layout.width);
|
|
6721
6977
|
setReady(true);
|
|
6722
6978
|
}
|
|
6723
6979
|
},
|
|
6724
|
-
!ready ? /* @__PURE__ */
|
|
6980
|
+
!ready ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles48.loader }, /* @__PURE__ */ React55__default.default.createElement(Spinner, { size: "md", color: colors.primary, label: "Cargando iconos..." })) : /* @__PURE__ */ React55__default.default.createElement(React55__default.default.Fragment, null, /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles48.sectionLabel, { color: colors.foregroundSubtle }], allowFontScaling: true }, "Categor\xEDas"), /* @__PURE__ */ React55__default.default.createElement(
|
|
6725
6981
|
reactNativeGestureHandler.ScrollView,
|
|
6726
6982
|
{
|
|
6727
6983
|
ref: catScrollRef,
|
|
6728
6984
|
horizontal: true,
|
|
6729
6985
|
showsHorizontalScrollIndicator: false,
|
|
6730
|
-
contentContainerStyle:
|
|
6731
|
-
style:
|
|
6986
|
+
contentContainerStyle: styles48.categoryStrip,
|
|
6987
|
+
style: styles48.categoryScroll
|
|
6732
6988
|
},
|
|
6733
|
-
/* @__PURE__ */
|
|
6989
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
6734
6990
|
reactNative.TouchableOpacity,
|
|
6735
6991
|
{
|
|
6736
6992
|
onPress: () => setActiveCategory(null),
|
|
@@ -6740,18 +6996,18 @@ function IconPicker({
|
|
|
6740
6996
|
accessibilityLabel: "Todos",
|
|
6741
6997
|
accessibilityState: { selected: activeCategory === null },
|
|
6742
6998
|
style: [
|
|
6743
|
-
|
|
6999
|
+
styles48.categoryChip,
|
|
6744
7000
|
{
|
|
6745
7001
|
backgroundColor: activeCategory === null ? colors.primary : colors.surface,
|
|
6746
7002
|
borderColor: activeCategory === null ? colors.primary : colors.border
|
|
6747
7003
|
}
|
|
6748
7004
|
]
|
|
6749
7005
|
},
|
|
6750
|
-
/* @__PURE__ */
|
|
7006
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles48.categoryChipInner }, renderIcon("grid", ms(14), activeCategory === null ? colors.primaryForeground : colors.foregroundSubtle), /* @__PURE__ */ React55__default.default.createElement(
|
|
6751
7007
|
reactNative.Text,
|
|
6752
7008
|
{
|
|
6753
7009
|
style: [
|
|
6754
|
-
|
|
7010
|
+
styles48.categoryChipText,
|
|
6755
7011
|
{ color: activeCategory === null ? colors.primaryForeground : colors.foreground }
|
|
6756
7012
|
],
|
|
6757
7013
|
allowFontScaling: true,
|
|
@@ -6760,7 +7016,7 @@ function IconPicker({
|
|
|
6760
7016
|
"Todos"
|
|
6761
7017
|
))
|
|
6762
7018
|
),
|
|
6763
|
-
CURATED_ICONS.map((cat) => /* @__PURE__ */
|
|
7019
|
+
CURATED_ICONS.map((cat) => /* @__PURE__ */ React55__default.default.createElement(
|
|
6764
7020
|
reactNative.TouchableOpacity,
|
|
6765
7021
|
{
|
|
6766
7022
|
key: cat.name,
|
|
@@ -6771,18 +7027,18 @@ function IconPicker({
|
|
|
6771
7027
|
accessibilityLabel: cat.labelEs,
|
|
6772
7028
|
accessibilityState: { selected: activeCategory === cat.name },
|
|
6773
7029
|
style: [
|
|
6774
|
-
|
|
7030
|
+
styles48.categoryChip,
|
|
6775
7031
|
{
|
|
6776
7032
|
backgroundColor: activeCategory === cat.name ? colors.primary : colors.surface,
|
|
6777
7033
|
borderColor: activeCategory === cat.name ? colors.primary : colors.border
|
|
6778
7034
|
}
|
|
6779
7035
|
]
|
|
6780
7036
|
},
|
|
6781
|
-
/* @__PURE__ */
|
|
7037
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles48.categoryChipInner }, renderIcon(cat.categoryIcon, ms(14), activeCategory === cat.name ? colors.primaryForeground : colors.foregroundSubtle), /* @__PURE__ */ React55__default.default.createElement(
|
|
6782
7038
|
reactNative.Text,
|
|
6783
7039
|
{
|
|
6784
7040
|
style: [
|
|
6785
|
-
|
|
7041
|
+
styles48.categoryChipText,
|
|
6786
7042
|
{ color: activeCategory === cat.name ? colors.primaryForeground : colors.foreground }
|
|
6787
7043
|
],
|
|
6788
7044
|
allowFontScaling: true,
|
|
@@ -6791,7 +7047,7 @@ function IconPicker({
|
|
|
6791
7047
|
cat.labelEs
|
|
6792
7048
|
))
|
|
6793
7049
|
))
|
|
6794
|
-
), /* @__PURE__ */
|
|
7050
|
+
), /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles48.separator, { backgroundColor: colors.border }] }), cellSize > 0 ? rows.map((row, i) => /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { key: row[0] ?? `row-${i}`, style: [styles48.row, { marginBottom: gapPx }] }, row.map((name) => /* @__PURE__ */ React55__default.default.createElement(
|
|
6795
7051
|
IconCellMemo,
|
|
6796
7052
|
{
|
|
6797
7053
|
key: name,
|
|
@@ -6803,12 +7059,12 @@ function IconPicker({
|
|
|
6803
7059
|
sheetRef.current?.dismiss();
|
|
6804
7060
|
}
|
|
6805
7061
|
}
|
|
6806
|
-
)), Array.from({ length: numColumns - row.length }).map((_, j) => /* @__PURE__ */
|
|
7062
|
+
)), Array.from({ length: numColumns - row.length }).map((_, j) => /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { key: `spacer-${j}`, style: { width: cellSize, height: cellSize } })))) : null)
|
|
6807
7063
|
)
|
|
6808
7064
|
)
|
|
6809
7065
|
));
|
|
6810
7066
|
}
|
|
6811
|
-
var
|
|
7067
|
+
var styles48 = reactNative.StyleSheet.create({
|
|
6812
7068
|
triggerContainer: {
|
|
6813
7069
|
gap: vs(8)
|
|
6814
7070
|
},
|
|
@@ -6922,18 +7178,18 @@ function NumberStepperBase({
|
|
|
6922
7178
|
};
|
|
6923
7179
|
const { button: buttonSize, icon: iconSize, valueFontSize, valueLineHeight, valueMinWidth } = sizeConfig[size];
|
|
6924
7180
|
const displayValue = String(value);
|
|
6925
|
-
return /* @__PURE__ */
|
|
7181
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles49.container, style] }, /* @__PURE__ */ React55__default.default.createElement(
|
|
6926
7182
|
PressableButton,
|
|
6927
7183
|
{
|
|
6928
7184
|
style: [
|
|
6929
|
-
|
|
7185
|
+
styles49.button,
|
|
6930
7186
|
{
|
|
6931
7187
|
width: buttonSize,
|
|
6932
7188
|
height: buttonSize,
|
|
6933
7189
|
backgroundColor: colors.surface,
|
|
6934
7190
|
borderColor: colors.border
|
|
6935
7191
|
},
|
|
6936
|
-
!canDecrement &&
|
|
7192
|
+
!canDecrement && styles49.buttonDisabled
|
|
6937
7193
|
],
|
|
6938
7194
|
enabled: canDecrement,
|
|
6939
7195
|
onPress: handleDecrement,
|
|
@@ -6944,11 +7200,11 @@ function NumberStepperBase({
|
|
|
6944
7200
|
accessibilityState: { disabled: !canDecrement }
|
|
6945
7201
|
},
|
|
6946
7202
|
renderIcon("minus", iconSize, canDecrement ? colors.foreground : colors.foregroundMuted)
|
|
6947
|
-
), /* @__PURE__ */
|
|
7203
|
+
), /* @__PURE__ */ React55__default.default.createElement(
|
|
6948
7204
|
reactNative.Text,
|
|
6949
7205
|
{
|
|
6950
7206
|
style: [
|
|
6951
|
-
|
|
7207
|
+
styles49.value,
|
|
6952
7208
|
{
|
|
6953
7209
|
color: colors.foreground,
|
|
6954
7210
|
fontSize: valueFontSize,
|
|
@@ -6961,18 +7217,18 @@ function NumberStepperBase({
|
|
|
6961
7217
|
accessibilityRole: "text"
|
|
6962
7218
|
},
|
|
6963
7219
|
displayValue
|
|
6964
|
-
), /* @__PURE__ */
|
|
7220
|
+
), /* @__PURE__ */ React55__default.default.createElement(
|
|
6965
7221
|
PressableButton,
|
|
6966
7222
|
{
|
|
6967
7223
|
style: [
|
|
6968
|
-
|
|
7224
|
+
styles49.button,
|
|
6969
7225
|
{
|
|
6970
7226
|
width: buttonSize,
|
|
6971
7227
|
height: buttonSize,
|
|
6972
7228
|
backgroundColor: colors.surface,
|
|
6973
7229
|
borderColor: colors.border
|
|
6974
7230
|
},
|
|
6975
|
-
!canIncrement &&
|
|
7231
|
+
!canIncrement && styles49.buttonDisabled
|
|
6976
7232
|
],
|
|
6977
7233
|
enabled: canIncrement,
|
|
6978
7234
|
onPress: handleIncrement,
|
|
@@ -6985,8 +7241,8 @@ function NumberStepperBase({
|
|
|
6985
7241
|
renderIcon("plus", iconSize, canIncrement ? colors.foreground : colors.foregroundMuted)
|
|
6986
7242
|
));
|
|
6987
7243
|
}
|
|
6988
|
-
var NumberStepper =
|
|
6989
|
-
var
|
|
7244
|
+
var NumberStepper = React55__default.default.memo(NumberStepperBase);
|
|
7245
|
+
var styles49 = reactNative.StyleSheet.create({
|
|
6990
7246
|
container: {
|
|
6991
7247
|
flexDirection: "row",
|
|
6992
7248
|
alignItems: "center",
|
|
@@ -7015,13 +7271,14 @@ function StatsComponent({
|
|
|
7015
7271
|
iconName,
|
|
7016
7272
|
iconColor,
|
|
7017
7273
|
variant = "elevated",
|
|
7274
|
+
size = "default",
|
|
7018
7275
|
onPress,
|
|
7019
7276
|
style,
|
|
7020
7277
|
accessibilityLabel
|
|
7021
7278
|
}) {
|
|
7022
7279
|
const { colors } = useTheme();
|
|
7023
|
-
const [containerWidth, setContainerWidth] =
|
|
7024
|
-
const handleLayout =
|
|
7280
|
+
const [containerWidth, setContainerWidth] = React55.useState(0);
|
|
7281
|
+
const handleLayout = React55.useCallback((e) => {
|
|
7025
7282
|
const w = e.nativeEvent.layout.width;
|
|
7026
7283
|
if (w > 0 && w !== containerWidth) {
|
|
7027
7284
|
setContainerWidth(w);
|
|
@@ -7033,6 +7290,27 @@ function StatsComponent({
|
|
|
7033
7290
|
onPress();
|
|
7034
7291
|
};
|
|
7035
7292
|
const isCompact = containerWidth > 0 && containerWidth < COMPACT_THRESHOLD && !!(icon ?? iconName);
|
|
7293
|
+
const sizeStyles2 = size === "compact" ? {
|
|
7294
|
+
valueFontFamily: "Sohne-SemiBold",
|
|
7295
|
+
valueFontSize: ms(16),
|
|
7296
|
+
valueLineHeight: mvs(20),
|
|
7297
|
+
labelFontSize: ms(11),
|
|
7298
|
+
labelLineHeight: mvs(14),
|
|
7299
|
+
descriptionFontSize: ms(10),
|
|
7300
|
+
descriptionLineHeight: mvs(14),
|
|
7301
|
+
iconSize: ms(18),
|
|
7302
|
+
padding: s(12)
|
|
7303
|
+
} : {
|
|
7304
|
+
valueFontFamily: "Sohne-Bold",
|
|
7305
|
+
valueFontSize: ms(21),
|
|
7306
|
+
valueLineHeight: mvs(25),
|
|
7307
|
+
labelFontSize: ms(13),
|
|
7308
|
+
labelLineHeight: mvs(18),
|
|
7309
|
+
descriptionFontSize: ms(12),
|
|
7310
|
+
descriptionLineHeight: mvs(16),
|
|
7311
|
+
iconSize: ms(20),
|
|
7312
|
+
padding: s(16)
|
|
7313
|
+
};
|
|
7036
7314
|
const variantStyle = {
|
|
7037
7315
|
elevated: {
|
|
7038
7316
|
backgroundColor: colors.card,
|
|
@@ -7057,12 +7335,12 @@ function StatsComponent({
|
|
|
7057
7335
|
}
|
|
7058
7336
|
}[variant];
|
|
7059
7337
|
const iconColorResolved = iconColor ?? colors.primary;
|
|
7060
|
-
const resolvedIcon = iconName ? renderIcon(iconName,
|
|
7061
|
-
const iconElement = resolvedIcon ? /* @__PURE__ */
|
|
7062
|
-
const valueElement = /* @__PURE__ */
|
|
7063
|
-
const cardContent = /* @__PURE__ */
|
|
7338
|
+
const resolvedIcon = iconName ? renderIcon(iconName, sizeStyles2.iconSize, iconColorResolved) : icon;
|
|
7339
|
+
const iconElement = resolvedIcon ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles50.iconWrapper }, resolvedIcon) : null;
|
|
7340
|
+
const valueElement = /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles50.value, { color: colors.foreground, fontFamily: sizeStyles2.valueFontFamily, fontSize: sizeStyles2.valueFontSize, lineHeight: sizeStyles2.valueLineHeight }], allowFontScaling: true }, value);
|
|
7341
|
+
const cardContent = /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles50.card, variantStyle, { padding: sizeStyles2.padding }, style], onLayout: handleLayout }, isCompact ? /* @__PURE__ */ React55__default.default.createElement(React55__default.default.Fragment, null, iconElement, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles50.compactValue }, valueElement), /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles50.label, { color: colors.foregroundSubtle, fontSize: sizeStyles2.labelFontSize, lineHeight: sizeStyles2.labelLineHeight }], allowFontScaling: true }, label), description ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles50.description, { color: colors.foregroundMuted, fontSize: sizeStyles2.descriptionFontSize, lineHeight: sizeStyles2.descriptionLineHeight }], allowFontScaling: true }, description) : null) : /* @__PURE__ */ React55__default.default.createElement(React55__default.default.Fragment, null, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles50.valueRow }, iconElement, valueElement), /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles50.label, { color: colors.foregroundSubtle, fontSize: sizeStyles2.labelFontSize, lineHeight: sizeStyles2.labelLineHeight }], allowFontScaling: true }, label), description ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles50.description, { color: colors.foregroundMuted, fontSize: sizeStyles2.descriptionFontSize, lineHeight: sizeStyles2.descriptionLineHeight }], allowFontScaling: true }, description) : null));
|
|
7064
7342
|
if (onPress) {
|
|
7065
|
-
return /* @__PURE__ */
|
|
7343
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
7066
7344
|
PressableCard,
|
|
7067
7345
|
{
|
|
7068
7346
|
onPress: handlePress,
|
|
@@ -7078,18 +7356,18 @@ function StatsComponent({
|
|
|
7078
7356
|
return cardContent;
|
|
7079
7357
|
}
|
|
7080
7358
|
function StatsGroup({ children, gap = s(12), style }) {
|
|
7081
|
-
return /* @__PURE__ */
|
|
7082
|
-
if (!
|
|
7359
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles50.group, { gap }, style] }, React55__default.default.Children.map(children, (child) => {
|
|
7360
|
+
if (!React55__default.default.isValidElement(child)) return child;
|
|
7083
7361
|
const childStyle = child.props.style;
|
|
7084
7362
|
const mergedStyle = childStyle ? [childStyle, { alignSelf: "stretch" }] : [{ alignSelf: "stretch" }];
|
|
7085
|
-
return /* @__PURE__ */
|
|
7363
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles50.groupItem }, React55__default.default.cloneElement(
|
|
7086
7364
|
child,
|
|
7087
7365
|
{ style: mergedStyle }
|
|
7088
7366
|
));
|
|
7089
7367
|
}));
|
|
7090
7368
|
}
|
|
7091
|
-
var Stats = Object.assign(
|
|
7092
|
-
var
|
|
7369
|
+
var Stats = Object.assign(React55__default.default.memo(StatsComponent), { Group: StatsGroup });
|
|
7370
|
+
var styles50 = reactNative.StyleSheet.create({
|
|
7093
7371
|
card: {
|
|
7094
7372
|
borderRadius: RADIUS.md,
|
|
7095
7373
|
borderWidth: 1,
|
|
@@ -7154,14 +7432,14 @@ function getResponsiveFontSize(text, maxSize, steps = [
|
|
|
7154
7432
|
return maxSize - 8;
|
|
7155
7433
|
}
|
|
7156
7434
|
function useConfirmDialog(options) {
|
|
7157
|
-
const [visible, setVisible] =
|
|
7158
|
-
const [target, setTarget] =
|
|
7159
|
-
const [loading, setLoading] =
|
|
7160
|
-
const open =
|
|
7435
|
+
const [visible, setVisible] = React55.useState(false);
|
|
7436
|
+
const [target, setTarget] = React55.useState(null);
|
|
7437
|
+
const [loading, setLoading] = React55.useState(false);
|
|
7438
|
+
const open = React55.useCallback((t) => {
|
|
7161
7439
|
setTarget(t ?? null);
|
|
7162
7440
|
setVisible(true);
|
|
7163
7441
|
}, []);
|
|
7164
|
-
const handleConfirm =
|
|
7442
|
+
const handleConfirm = React55.useCallback(async () => {
|
|
7165
7443
|
setLoading(true);
|
|
7166
7444
|
try {
|
|
7167
7445
|
await options.onConfirm();
|
|
@@ -7171,7 +7449,7 @@ function useConfirmDialog(options) {
|
|
|
7171
7449
|
setTarget(null);
|
|
7172
7450
|
}
|
|
7173
7451
|
}, [options]);
|
|
7174
|
-
const handleCancel =
|
|
7452
|
+
const handleCancel = React55.useCallback(() => {
|
|
7175
7453
|
setVisible(false);
|
|
7176
7454
|
setTarget(null);
|
|
7177
7455
|
options.onCancel?.();
|
|
@@ -7259,6 +7537,8 @@ exports.RetrayProvider = RetrayProvider;
|
|
|
7259
7537
|
exports.SHADOWS = SHADOWS;
|
|
7260
7538
|
exports.SPACING = SPACING;
|
|
7261
7539
|
exports.Select = Select;
|
|
7540
|
+
exports.SelectableCard = SelectableCard;
|
|
7541
|
+
exports.SelectableCardGroup = SelectableCardGroup;
|
|
7262
7542
|
exports.SelectableGrid = SelectableGrid;
|
|
7263
7543
|
exports.Separator = Separator;
|
|
7264
7544
|
exports.Sheet = Sheet;
|