@retray-dev/ui-kit 10.0.0 → 10.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 +150 -17
- package/CONSUMER.md +1 -1
- package/README.md +4 -4
- package/dist/Accordion.d.mts +1 -1
- package/dist/Accordion.d.ts +1 -1
- package/dist/Accordion.js +3 -3
- package/dist/Accordion.mjs +2 -2
- package/dist/AlertBanner.js +1 -1
- package/dist/AlertBanner.mjs +2 -2
- package/dist/AppHeader.js +1 -1
- package/dist/AppHeader.mjs +3 -3
- package/dist/Badge.js +1 -1
- package/dist/Badge.mjs +2 -2
- package/dist/Button.js +1 -1
- package/dist/Button.mjs +2 -2
- package/dist/CategoryStrip.js +1 -1
- package/dist/CategoryStrip.mjs +2 -2
- package/dist/Chip.js +1 -1
- package/dist/Chip.mjs +2 -2
- package/dist/ConfirmDialog.d.mts +6 -1
- package/dist/ConfirmDialog.d.ts +6 -1
- package/dist/ConfirmDialog.js +45 -15
- package/dist/ConfirmDialog.mjs +3 -3
- package/dist/CurrencyInput.js +1 -1
- package/dist/CurrencyInput.mjs +3 -3
- package/dist/DetailRow.d.mts +1 -1
- package/dist/DetailRow.d.ts +1 -1
- package/dist/DetailRow.js +1 -1
- package/dist/DetailRow.mjs +2 -2
- package/dist/EmptyState.js +1 -1
- package/dist/EmptyState.mjs +3 -3
- package/dist/ErrorBoundary.js +1 -1
- package/dist/ErrorBoundary.mjs +2 -2
- package/dist/IconButton.js +1 -1
- package/dist/IconButton.mjs +2 -2
- package/dist/IconPicker.d.mts +17 -0
- package/dist/IconPicker.d.ts +17 -0
- package/dist/IconPicker.js +997 -0
- package/dist/IconPicker.mjs +7 -0
- package/dist/ImageUpload.d.mts +3 -1
- package/dist/ImageUpload.d.ts +3 -1
- package/dist/ImageUpload.js +28 -10
- package/dist/ImageUpload.mjs +1 -1
- package/dist/ImageViewer.js +282 -141
- package/dist/ImageViewer.mjs +5 -3
- package/dist/Input.js +1 -1
- package/dist/Input.mjs +2 -2
- package/dist/LabelValue.js +1 -1
- package/dist/LabelValue.mjs +2 -2
- package/dist/ListItem.js +1 -1
- package/dist/ListItem.mjs +2 -2
- package/dist/MediaCard.js +1 -1
- package/dist/MediaCard.mjs +2 -2
- package/dist/MenuItem.js +1 -1
- package/dist/MenuItem.mjs +2 -2
- package/dist/NumberStepper.d.mts +19 -0
- package/dist/NumberStepper.d.ts +19 -0
- package/dist/NumberStepper.js +410 -0
- package/dist/NumberStepper.mjs +9 -0
- package/dist/PagerDots.js +1 -1
- package/dist/PagerDots.mjs +2 -2
- package/dist/PricingCard.js +1 -1
- package/dist/PricingCard.mjs +4 -4
- package/dist/SelectableGrid.js +1 -1
- package/dist/SelectableGrid.mjs +2 -2
- package/dist/Sheet.js +16 -13
- package/dist/Sheet.mjs +1 -1
- package/dist/SheetSelect.js +1 -1
- package/dist/SheetSelect.mjs +2 -2
- package/dist/Switch.js +40 -17
- package/dist/Switch.mjs +1 -1
- package/dist/TabBar.js +1 -1
- package/dist/TabBar.mjs +2 -2
- package/dist/Textarea.js +1 -1
- package/dist/Textarea.mjs +2 -2
- package/dist/Toggle.js +1 -1
- package/dist/Toggle.mjs +2 -2
- package/dist/chunk-53Z3NYGE.mjs +742 -0
- package/dist/{chunk-VQ57HWPL.mjs → chunk-6L4G6PBT.mjs} +1 -1
- package/dist/{chunk-6OAZJ577.mjs → chunk-6SECQ2ZF.mjs} +2 -2
- package/dist/{chunk-KIHCWCWL.mjs → chunk-7LWRKMF5.mjs} +1 -1
- package/dist/{chunk-4I7D47FH.mjs → chunk-AJRVDP2H.mjs} +3 -3
- package/dist/{chunk-6MKGPAR2.mjs → chunk-BEMIQXXU.mjs} +1 -1
- package/dist/chunk-BUMAMSTZ.mjs +126 -0
- package/dist/{chunk-UREA2GYY.mjs → chunk-DYT7BG5I.mjs} +1 -1
- package/dist/{chunk-Z4BVUWW6.mjs → chunk-ELXBDILQ.mjs} +20 -32
- package/dist/{chunk-A4MDAP7G.mjs → chunk-FCSSQK3L.mjs} +1 -1
- package/dist/{chunk-2TFTAWVJ.mjs → chunk-HTHGSXFG.mjs} +1 -1
- package/dist/{chunk-VGTDN7SW.mjs → chunk-IX3NYLYQ.mjs} +1 -1
- package/dist/{chunk-T7XZ7H7Y.mjs → chunk-KA7LTET3.mjs} +17 -3
- package/dist/{chunk-URI2WBIV.mjs → chunk-KOO4WITD.mjs} +1 -1
- package/dist/{chunk-JUXSWN54.mjs → chunk-NMU5FMQJ.mjs} +1 -1
- package/dist/{chunk-LXJIIOYQ.mjs → chunk-RYZC432S.mjs} +1 -1
- package/dist/{chunk-JB67UOB5.mjs → chunk-S2R7UVOE.mjs} +1 -1
- package/dist/{chunk-ZUR7AU5R.mjs → chunk-SXLKNTA4.mjs} +1 -1
- package/dist/{chunk-3U4SSNWP.mjs → chunk-T2KCAHOS.mjs} +1 -1
- package/dist/{chunk-ZJKGQMYH.mjs → chunk-TB6SD2FT.mjs} +1 -1
- package/dist/{chunk-AZJF2BLK.mjs → chunk-TBNZHU6C.mjs} +1 -1
- package/dist/{chunk-Y4GL2MHX.mjs → chunk-TZDGAP5N.mjs} +28 -10
- package/dist/{chunk-CZCQZHG6.mjs → chunk-U2XJFYED.mjs} +1 -1
- package/dist/{chunk-TERDKCLE.mjs → chunk-VF2ATYN3.mjs} +1 -1
- package/dist/{chunk-OHBNABL5.mjs → chunk-VKID2D2I.mjs} +1 -1
- package/dist/{chunk-QKH5ZOD5.mjs → chunk-WF2XDFRK.mjs} +40 -17
- package/dist/{chunk-FZZLPJ6B.mjs → chunk-WYEUNUTP.mjs} +44 -15
- package/dist/{chunk-PFZTM6D5.mjs → chunk-Y2NS74WS.mjs} +9 -7
- package/dist/{chunk-O3HA6TYM.mjs → chunk-YJ7I257J.mjs} +3 -3
- package/dist/{chunk-NA7PARID.mjs → chunk-Z4VHZ7B5.mjs} +1 -1
- package/dist/{chunk-MLF3EZFW.mjs → chunk-Z6SFHN6T.mjs} +1 -1
- package/dist/{chunk-4K625MVM.mjs → chunk-ZZ2R6KZ3.mjs} +1 -1
- package/dist/index.d.mts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +1011 -88
- package/dist/index.mjs +34 -32
- package/package.json +1 -1
- package/src/components/Accordion/Accordion.tsx +7 -3
- package/src/components/ConfirmDialog/ConfirmDialog.tsx +61 -23
- package/src/components/DetailRow/DetailRow.tsx +1 -1
- package/src/components/IconPicker/IconPicker.tsx +383 -0
- package/src/components/IconPicker/index.ts +1 -0
- package/src/components/ImageUpload/ImageUpload.tsx +34 -12
- package/src/components/ImageViewer/ImageViewer.tsx +25 -30
- package/src/components/NumberStepper/NumberStepper.tsx +147 -0
- package/src/components/NumberStepper/index.ts +1 -0
- package/src/components/Sheet/Sheet.tsx +10 -9
- package/src/components/Switch/Switch.tsx +30 -17
- package/src/index.ts +3 -1
- package/src/utils/curatedIcons.ts +286 -0
- package/src/utils/icons.ts +20 -2
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ var Ionicons = require('@expo/vector-icons/Ionicons');
|
|
|
12
12
|
var pressto = require('pressto');
|
|
13
13
|
var Animated12 = require('react-native-reanimated');
|
|
14
14
|
var expoFont = require('expo-font');
|
|
15
|
-
var
|
|
15
|
+
var BottomSheet = require('@gorhom/bottom-sheet');
|
|
16
16
|
var reactNativeEase = require('react-native-ease');
|
|
17
17
|
var vectorIcons = require('@expo/vector-icons');
|
|
18
18
|
var expoLinearGradient = require('expo-linear-gradient');
|
|
@@ -32,6 +32,7 @@ var FontAwesome5__default = /*#__PURE__*/_interopDefault(FontAwesome5);
|
|
|
32
32
|
var MaterialIcons__default = /*#__PURE__*/_interopDefault(MaterialIcons);
|
|
33
33
|
var Ionicons__default = /*#__PURE__*/_interopDefault(Ionicons);
|
|
34
34
|
var Animated12__default = /*#__PURE__*/_interopDefault(Animated12);
|
|
35
|
+
var BottomSheet__default = /*#__PURE__*/_interopDefault(BottomSheet);
|
|
35
36
|
var RNSlider__default = /*#__PURE__*/_interopDefault(RNSlider);
|
|
36
37
|
|
|
37
38
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
@@ -368,9 +369,9 @@ function configureIconFamilies(families) {
|
|
|
368
369
|
activeFamilies = order.length > 0 ? order : ALL_FAMILIES;
|
|
369
370
|
resolvedCache = null;
|
|
370
371
|
}
|
|
371
|
-
function buildCache() {
|
|
372
|
+
function buildCache(families) {
|
|
372
373
|
const cache = /* @__PURE__ */ new Map();
|
|
373
|
-
for (const family of activeFamilies) {
|
|
374
|
+
for (const family of families ?? activeFamilies) {
|
|
374
375
|
const glyphMap = family.getGlyphMap();
|
|
375
376
|
for (const iconName of Object.keys(glyphMap)) {
|
|
376
377
|
cache.set(iconName, family);
|
|
@@ -384,6 +385,20 @@ function resolveFamily(name) {
|
|
|
384
385
|
}
|
|
385
386
|
return resolvedCache.get(name) ?? null;
|
|
386
387
|
}
|
|
388
|
+
var cachedIconNames = null;
|
|
389
|
+
function getValidIconNames(families) {
|
|
390
|
+
if (families && families.length > 0) {
|
|
391
|
+
const tempFamilies = families.map((n) => ALL_FAMILIES.find((f) => f.name === n)).filter((f) => f !== void 0);
|
|
392
|
+
if (tempFamilies.length === 0) return [];
|
|
393
|
+
const cache = buildCache(tempFamilies);
|
|
394
|
+
return Array.from(cache.keys());
|
|
395
|
+
}
|
|
396
|
+
if (!cachedIconNames) {
|
|
397
|
+
const cache = buildCache();
|
|
398
|
+
cachedIconNames = Array.from(cache.keys());
|
|
399
|
+
}
|
|
400
|
+
return cachedIconNames;
|
|
401
|
+
}
|
|
387
402
|
function Icon({ name, size, color, family }) {
|
|
388
403
|
let resolved = null;
|
|
389
404
|
if (family) {
|
|
@@ -1035,7 +1050,7 @@ function Input({ label, error, hint, disabled, prefix, suffix, prefixStyle, suff
|
|
|
1035
1050
|
},
|
|
1036
1051
|
effectivePrefix ? typeof effectivePrefix === "string" ? /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles4.prefixText, { color: colors.foregroundMuted }, prefixStyle], allowFontScaling: true }, effectivePrefix) : /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles4.prefixContainer }, effectivePrefix) : null,
|
|
1037
1052
|
sheetMode ? /* @__PURE__ */ React25__default.default.createElement(
|
|
1038
|
-
|
|
1053
|
+
BottomSheet.BottomSheetTextInput,
|
|
1039
1054
|
{
|
|
1040
1055
|
style: [
|
|
1041
1056
|
styles4.input,
|
|
@@ -2028,9 +2043,11 @@ var THUMB_SIZE = s(24);
|
|
|
2028
2043
|
var THUMB_OFFSET = s(3);
|
|
2029
2044
|
var THUMB_TRAVEL = TRACK_WIDTH - THUMB_SIZE - THUMB_OFFSET * 2;
|
|
2030
2045
|
var ICON_SIZE = s(13);
|
|
2046
|
+
var DISABLED_OPACITY = 0.45;
|
|
2031
2047
|
function Switch({ checked = false, onCheckedChange, disabled, style, accessibilityLabel }) {
|
|
2032
2048
|
const { colors } = useTheme();
|
|
2033
|
-
|
|
2049
|
+
const isDisabled = !!disabled;
|
|
2050
|
+
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [{ alignSelf: "flex-start" }, style] }, /* @__PURE__ */ React25__default.default.createElement(
|
|
2034
2051
|
reactNative.TouchableOpacity,
|
|
2035
2052
|
{
|
|
2036
2053
|
onPress: () => {
|
|
@@ -2042,47 +2059,68 @@ function Switch({ checked = false, onCheckedChange, disabled, style, accessibili
|
|
|
2042
2059
|
touchSoundDisabled: true,
|
|
2043
2060
|
accessibilityRole: "switch",
|
|
2044
2061
|
accessibilityLabel,
|
|
2045
|
-
accessibilityState: { checked, disabled:
|
|
2062
|
+
accessibilityState: { checked, disabled: isDisabled },
|
|
2046
2063
|
style: styles16.touchable
|
|
2047
2064
|
},
|
|
2048
|
-
/* @__PURE__ */ React25__default.default.createElement(
|
|
2065
|
+
/* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles16.trackContainer }, /* @__PURE__ */ React25__default.default.createElement(
|
|
2049
2066
|
reactNativeEase.EaseView,
|
|
2050
2067
|
{
|
|
2051
|
-
style: styles16.track,
|
|
2068
|
+
style: [styles16.track, isDisabled && styles16.disabledTrack],
|
|
2052
2069
|
animate: { backgroundColor: checked ? colors.primary : colors.surfaceStrong },
|
|
2053
2070
|
transition: COLOR_TRANSITION
|
|
2071
|
+
}
|
|
2072
|
+
), /* @__PURE__ */ React25__default.default.createElement(
|
|
2073
|
+
reactNativeEase.EaseView,
|
|
2074
|
+
{
|
|
2075
|
+
style: [styles16.trackBorder, { borderWidth: 1.5 }],
|
|
2076
|
+
pointerEvents: "none",
|
|
2077
|
+
animate: { borderColor: checked ? "transparent" : colors.border },
|
|
2078
|
+
transition: COLOR_TRANSITION
|
|
2079
|
+
}
|
|
2080
|
+
), /* @__PURE__ */ React25__default.default.createElement(
|
|
2081
|
+
reactNativeEase.EaseView,
|
|
2082
|
+
{
|
|
2083
|
+
style: [styles16.thumb, { backgroundColor: colors.primaryForeground }],
|
|
2084
|
+
animate: { translateX: checked ? THUMB_TRAVEL : 0 },
|
|
2085
|
+
transition: SPRING_ELASTIC
|
|
2054
2086
|
},
|
|
2055
2087
|
/* @__PURE__ */ React25__default.default.createElement(
|
|
2056
2088
|
reactNativeEase.EaseView,
|
|
2057
2089
|
{
|
|
2058
|
-
style:
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
}
|
|
2090
|
+
style: styles16.iconWrapper,
|
|
2091
|
+
animate: { opacity: checked ? isDisabled ? DISABLED_OPACITY : 1 : 0 },
|
|
2092
|
+
transition: OPACITY_TRANSITION
|
|
2093
|
+
},
|
|
2094
|
+
/* @__PURE__ */ React25__default.default.createElement(vectorIcons.Feather, { name: "check", size: ICON_SIZE, color: colors.primary })
|
|
2063
2095
|
),
|
|
2064
2096
|
/* @__PURE__ */ React25__default.default.createElement(
|
|
2065
2097
|
reactNativeEase.EaseView,
|
|
2066
2098
|
{
|
|
2067
|
-
style:
|
|
2068
|
-
animate: {
|
|
2069
|
-
transition:
|
|
2099
|
+
style: styles16.iconWrapper,
|
|
2100
|
+
animate: { opacity: checked ? 0 : isDisabled ? DISABLED_OPACITY : 1 },
|
|
2101
|
+
transition: OPACITY_TRANSITION
|
|
2070
2102
|
},
|
|
2071
|
-
/* @__PURE__ */ React25__default.default.createElement(
|
|
2072
|
-
/* @__PURE__ */ React25__default.default.createElement(reactNativeEase.EaseView, { style: styles16.iconWrapper, animate: { opacity: checked ? 0 : 1 }, transition: OPACITY_TRANSITION }, /* @__PURE__ */ React25__default.default.createElement(vectorIcons.Feather, { name: "x", size: ICON_SIZE, color: colors.foregroundMuted }))
|
|
2103
|
+
/* @__PURE__ */ React25__default.default.createElement(vectorIcons.Feather, { name: "x", size: ICON_SIZE, color: colors.foregroundMuted })
|
|
2073
2104
|
)
|
|
2074
|
-
)
|
|
2105
|
+
))
|
|
2075
2106
|
));
|
|
2076
2107
|
}
|
|
2077
2108
|
var styles16 = reactNative.StyleSheet.create({
|
|
2078
2109
|
touchable: {
|
|
2079
2110
|
alignSelf: "flex-start"
|
|
2080
2111
|
},
|
|
2081
|
-
|
|
2112
|
+
trackContainer: {
|
|
2113
|
+
position: "relative",
|
|
2082
2114
|
width: TRACK_WIDTH,
|
|
2083
|
-
height: TRACK_HEIGHT
|
|
2115
|
+
height: TRACK_HEIGHT
|
|
2116
|
+
},
|
|
2117
|
+
track: {
|
|
2118
|
+
...reactNative.StyleSheet.absoluteFillObject,
|
|
2084
2119
|
borderRadius: TRACK_HEIGHT / 2
|
|
2085
2120
|
},
|
|
2121
|
+
disabledTrack: {
|
|
2122
|
+
opacity: DISABLED_OPACITY
|
|
2123
|
+
},
|
|
2086
2124
|
trackBorder: {
|
|
2087
2125
|
...reactNative.StyleSheet.absoluteFillObject,
|
|
2088
2126
|
borderRadius: TRACK_HEIGHT / 2
|
|
@@ -2601,9 +2639,9 @@ function AccordionItemComponent({
|
|
|
2601
2639
|
},
|
|
2602
2640
|
accessibilityRole: "button",
|
|
2603
2641
|
accessibilityState: { expanded: isOpen },
|
|
2604
|
-
accessibilityLabel: item.trigger
|
|
2642
|
+
accessibilityLabel: typeof item.trigger === "string" ? item.trigger : void 0
|
|
2605
2643
|
},
|
|
2606
|
-
/* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles20.triggerContent }, resolvedIcon ? /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles20.icon }, resolvedIcon) : null, /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles20.triggerText, { color: colors.foreground }], allowFontScaling: true }, item.trigger)),
|
|
2644
|
+
/* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles20.triggerContent }, resolvedIcon ? /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles20.icon }, resolvedIcon) : null, typeof item.trigger === "string" ? /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles20.triggerText, { color: colors.foreground }], allowFontScaling: true }, item.trigger) : item.trigger),
|
|
2607
2645
|
/* @__PURE__ */ React25__default.default.createElement(Animated12__default.default.View, { style: [styles20.chevron, rotationStyle] }, /* @__PURE__ */ React25__default.default.createElement(vectorIcons.Entypo, { name: "chevron-down", size: 18, color: colors.foregroundMuted }))
|
|
2608
2646
|
), /* @__PURE__ */ React25__default.default.createElement(Animated12__default.default.View, { style: bodyStyle }, /* @__PURE__ */ React25__default.default.createElement(
|
|
2609
2647
|
reactNative.View,
|
|
@@ -2811,13 +2849,13 @@ function Sheet({
|
|
|
2811
2849
|
React25.useEffect(() => {
|
|
2812
2850
|
if (open) {
|
|
2813
2851
|
impactMedium();
|
|
2814
|
-
ref.current?.
|
|
2852
|
+
ref.current?.snapToIndex(0);
|
|
2815
2853
|
} else {
|
|
2816
|
-
ref.current?.
|
|
2854
|
+
ref.current?.close();
|
|
2817
2855
|
}
|
|
2818
2856
|
}, [open]);
|
|
2819
2857
|
const renderBackdrop = React25.useCallback((props) => /* @__PURE__ */ React25__default.default.createElement(
|
|
2820
|
-
|
|
2858
|
+
BottomSheet.BottomSheetBackdrop,
|
|
2821
2859
|
{
|
|
2822
2860
|
...props,
|
|
2823
2861
|
disappearsOnIndex: -1,
|
|
@@ -2834,7 +2872,7 @@ function Sheet({
|
|
|
2834
2872
|
) : children;
|
|
2835
2873
|
const effectiveSubtitle = subtitle ?? description;
|
|
2836
2874
|
const showHeader = !!(title || effectiveSubtitle || showCloseButton) && !customHeader;
|
|
2837
|
-
const headerNode = customHeader ? customHeader : showHeader ? /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles22.header, accessibilityRole: "header" }, /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles22.headerRow }, title ? /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles22.title, { color: colors.foreground }], allowFontScaling: true }, title) : /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: { flex: 1 } }), showCloseButton ? /* @__PURE__ */ React25__default.default.createElement(
|
|
2875
|
+
const headerNode = customHeader ? customHeader : showHeader ? /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [styles22.header, { backgroundColor: colors.card }], accessibilityRole: "header" }, /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles22.headerRow }, title ? /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles22.title, { color: colors.foreground }], allowFontScaling: true }, title) : /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: { flex: 1 } }), showCloseButton ? /* @__PURE__ */ React25__default.default.createElement(
|
|
2838
2876
|
reactNative.TouchableOpacity,
|
|
2839
2877
|
{
|
|
2840
2878
|
onPress: onClose,
|
|
@@ -2851,7 +2889,7 @@ function Sheet({
|
|
|
2851
2889
|
const effectiveFooter = customFooter ? customFooter : footer;
|
|
2852
2890
|
const renderFooter = React25.useCallback((props) => {
|
|
2853
2891
|
if (!effectiveFooter) return null;
|
|
2854
|
-
return /* @__PURE__ */ React25__default.default.createElement(
|
|
2892
|
+
return /* @__PURE__ */ React25__default.default.createElement(BottomSheet.BottomSheetFooter, { ...props }, effectiveFooter);
|
|
2855
2893
|
}, [effectiveFooter]);
|
|
2856
2894
|
if (asDialog) {
|
|
2857
2895
|
return /* @__PURE__ */ React25__default.default.createElement(reactNative.Modal, { visible: open, transparent: true, animationType: "fade", onRequestClose: onClose }, /* @__PURE__ */ React25__default.default.createElement(reactNative.Pressable, { style: styles22.dialogBackdrop, onPress: onClose, accessibilityRole: "button", accessibilityLabel: "Close" }, /* @__PURE__ */ React25__default.default.createElement(
|
|
@@ -2882,13 +2920,14 @@ function Sheet({
|
|
|
2882
2920
|
const effectiveMaxHeight = maxHeight ?? DEFAULT_MAX_HEIGHT;
|
|
2883
2921
|
const useDynamicSizing = !snapPoints;
|
|
2884
2922
|
return /* @__PURE__ */ React25__default.default.createElement(
|
|
2885
|
-
|
|
2923
|
+
BottomSheet__default.default,
|
|
2886
2924
|
{
|
|
2887
2925
|
ref,
|
|
2926
|
+
index: -1,
|
|
2927
|
+
onClose,
|
|
2888
2928
|
enableDynamicSizing: useDynamicSizing,
|
|
2889
2929
|
snapPoints,
|
|
2890
2930
|
maxDynamicContentSize: useDynamicSizing ? effectiveMaxHeight : void 0,
|
|
2891
|
-
onDismiss: onClose,
|
|
2892
2931
|
backdropComponent: renderBackdrop,
|
|
2893
2932
|
footerComponent: effectiveFooter ? renderFooter : void 0,
|
|
2894
2933
|
backgroundStyle: [styles22.background, { backgroundColor: colors.card }],
|
|
@@ -2901,7 +2940,7 @@ function Sheet({
|
|
|
2901
2940
|
enableBlurKeyboardOnGesture
|
|
2902
2941
|
},
|
|
2903
2942
|
useScroll ? /* @__PURE__ */ React25__default.default.createElement(
|
|
2904
|
-
|
|
2943
|
+
BottomSheet.BottomSheetScrollView,
|
|
2905
2944
|
{
|
|
2906
2945
|
contentContainerStyle: [
|
|
2907
2946
|
styles22.scrollContent,
|
|
@@ -2910,11 +2949,12 @@ function Sheet({
|
|
|
2910
2949
|
style: contentStyle,
|
|
2911
2950
|
showsVerticalScrollIndicator: true,
|
|
2912
2951
|
indicatorStyle: "black",
|
|
2913
|
-
persistentScrollbar: isAndroid
|
|
2952
|
+
persistentScrollbar: isAndroid,
|
|
2953
|
+
stickyHeaderIndices: headerNode ? [0] : void 0
|
|
2914
2954
|
},
|
|
2915
2955
|
headerNode,
|
|
2916
2956
|
contentNode
|
|
2917
|
-
) : /* @__PURE__ */ React25__default.default.createElement(
|
|
2957
|
+
) : /* @__PURE__ */ React25__default.default.createElement(BottomSheet.BottomSheetView, { style: [styles22.content, contentStyle, style] }, headerNode, contentNode)
|
|
2918
2958
|
);
|
|
2919
2959
|
}
|
|
2920
2960
|
Sheet.Header = SheetHeader;
|
|
@@ -3900,26 +3940,29 @@ var styles29 = reactNative.StyleSheet.create({
|
|
|
3900
3940
|
function ConfirmDialog({
|
|
3901
3941
|
visible,
|
|
3902
3942
|
title,
|
|
3943
|
+
subtitle,
|
|
3903
3944
|
description,
|
|
3904
3945
|
confirmLabel = "Confirm",
|
|
3905
3946
|
cancelLabel = "Cancel",
|
|
3906
3947
|
confirmVariant = "primary",
|
|
3907
3948
|
loading = false,
|
|
3949
|
+
showCloseButton = false,
|
|
3908
3950
|
onConfirm,
|
|
3909
3951
|
onCancel
|
|
3910
3952
|
}) {
|
|
3911
3953
|
const { colors } = useTheme();
|
|
3912
3954
|
const ref = React25.useRef(null);
|
|
3955
|
+
const effectiveSubtitle = subtitle ?? description;
|
|
3913
3956
|
React25.useEffect(() => {
|
|
3914
3957
|
if (visible) {
|
|
3915
3958
|
impactMedium();
|
|
3916
|
-
ref.current?.
|
|
3959
|
+
ref.current?.snapToIndex(0);
|
|
3917
3960
|
} else {
|
|
3918
|
-
ref.current?.
|
|
3961
|
+
ref.current?.close();
|
|
3919
3962
|
}
|
|
3920
3963
|
}, [visible]);
|
|
3921
3964
|
const renderBackdrop = (props) => /* @__PURE__ */ React25__default.default.createElement(
|
|
3922
|
-
|
|
3965
|
+
BottomSheet.BottomSheetBackdrop,
|
|
3923
3966
|
{
|
|
3924
3967
|
...props,
|
|
3925
3968
|
disappearsOnIndex: -1,
|
|
@@ -3928,17 +3971,30 @@ function ConfirmDialog({
|
|
|
3928
3971
|
}
|
|
3929
3972
|
);
|
|
3930
3973
|
return /* @__PURE__ */ React25__default.default.createElement(
|
|
3931
|
-
|
|
3974
|
+
BottomSheet__default.default,
|
|
3932
3975
|
{
|
|
3933
3976
|
ref,
|
|
3977
|
+
index: -1,
|
|
3978
|
+
onClose: onCancel,
|
|
3934
3979
|
enableDynamicSizing: true,
|
|
3935
|
-
onDismiss: onCancel,
|
|
3936
3980
|
backdropComponent: renderBackdrop,
|
|
3937
3981
|
backgroundStyle: [styles30.background, { backgroundColor: colors.card }],
|
|
3938
3982
|
handleIndicatorStyle: [styles30.handle, { backgroundColor: colors.border }],
|
|
3939
3983
|
enablePanDownToClose: true
|
|
3940
3984
|
},
|
|
3941
|
-
/* @__PURE__ */ React25__default.default.createElement(
|
|
3985
|
+
/* @__PURE__ */ React25__default.default.createElement(BottomSheet.BottomSheetView, { style: styles30.content }, /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles30.header, accessibilityRole: "header" }, /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles30.headerRow }, /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles30.title, { color: colors.foreground }], allowFontScaling: true }, title), showCloseButton ? /* @__PURE__ */ React25__default.default.createElement(
|
|
3986
|
+
reactNative.TouchableOpacity,
|
|
3987
|
+
{
|
|
3988
|
+
onPress: onCancel,
|
|
3989
|
+
style: styles30.closeButton,
|
|
3990
|
+
activeOpacity: 0.6,
|
|
3991
|
+
touchSoundDisabled: true,
|
|
3992
|
+
accessibilityRole: "button",
|
|
3993
|
+
accessibilityLabel: "Close",
|
|
3994
|
+
hitSlop: { top: 12, bottom: 12, left: 12, right: 12 }
|
|
3995
|
+
},
|
|
3996
|
+
/* @__PURE__ */ React25__default.default.createElement(vectorIcons.Feather, { name: "x", size: ms(18), color: colors.foregroundMuted })
|
|
3997
|
+
) : null), effectiveSubtitle ? /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles30.subtitle, { color: colors.foregroundMuted }], allowFontScaling: true }, effectiveSubtitle) : null), /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles30.actions }, /* @__PURE__ */ React25__default.default.createElement(
|
|
3942
3998
|
Button,
|
|
3943
3999
|
{
|
|
3944
4000
|
label: confirmLabel,
|
|
@@ -3985,19 +4041,32 @@ var styles30 = reactNative.StyleSheet.create({
|
|
|
3985
4041
|
borderRadius: ms(2)
|
|
3986
4042
|
},
|
|
3987
4043
|
content: {
|
|
3988
|
-
paddingHorizontal: s(
|
|
3989
|
-
paddingBottom: vs(32)
|
|
3990
|
-
|
|
4044
|
+
paddingHorizontal: s(16),
|
|
4045
|
+
paddingBottom: vs(32)
|
|
4046
|
+
},
|
|
4047
|
+
header: {
|
|
4048
|
+
paddingTop: vs(4),
|
|
4049
|
+
paddingBottom: vs(12),
|
|
4050
|
+
gap: vs(4)
|
|
4051
|
+
},
|
|
4052
|
+
headerRow: {
|
|
4053
|
+
flexDirection: "row",
|
|
4054
|
+
alignItems: "center",
|
|
4055
|
+
justifyContent: "space-between"
|
|
3991
4056
|
},
|
|
3992
4057
|
title: {
|
|
3993
4058
|
fontFamily: "Sohne-SemiBold",
|
|
3994
4059
|
fontSize: ms(18),
|
|
3995
|
-
|
|
4060
|
+
flex: 1
|
|
3996
4061
|
},
|
|
3997
|
-
|
|
4062
|
+
closeButton: {
|
|
4063
|
+
padding: s(4),
|
|
4064
|
+
marginLeft: s(8)
|
|
4065
|
+
},
|
|
4066
|
+
subtitle: {
|
|
3998
4067
|
fontFamily: "Sohne-Regular",
|
|
3999
|
-
fontSize: ms(
|
|
4000
|
-
lineHeight: mvs(
|
|
4068
|
+
fontSize: ms(14),
|
|
4069
|
+
lineHeight: mvs(20)
|
|
4001
4070
|
},
|
|
4002
4071
|
actions: {
|
|
4003
4072
|
gap: vs(10),
|
|
@@ -4620,7 +4689,7 @@ function VirtualListInner({ itemHeight, keyExtractor, renderItem, ...props }, re
|
|
|
4620
4689
|
}
|
|
4621
4690
|
var VirtualList = React25__default.default.forwardRef(VirtualListInner);
|
|
4622
4691
|
function RetrayProvider({ children, theme, colorScheme = "system" }) {
|
|
4623
|
-
return /* @__PURE__ */ React25__default.default.createElement(reactNativeSafeAreaContext.SafeAreaProvider, { initialMetrics: reactNativeSafeAreaContext.initialWindowMetrics }, /* @__PURE__ */ React25__default.default.createElement(reactNativeGestureHandler.GestureHandlerRootView, { style: styles37.root }, /* @__PURE__ */ React25__default.default.createElement(ThemeProvider, { theme, colorScheme }, /* @__PURE__ */ React25__default.default.createElement(
|
|
4692
|
+
return /* @__PURE__ */ React25__default.default.createElement(reactNativeSafeAreaContext.SafeAreaProvider, { initialMetrics: reactNativeSafeAreaContext.initialWindowMetrics }, /* @__PURE__ */ React25__default.default.createElement(reactNativeGestureHandler.GestureHandlerRootView, { style: styles37.root }, /* @__PURE__ */ React25__default.default.createElement(ThemeProvider, { theme, colorScheme }, /* @__PURE__ */ React25__default.default.createElement(BottomSheet.BottomSheetModalProvider, null, /* @__PURE__ */ React25__default.default.createElement(ToastProvider, null, children)))));
|
|
4624
4693
|
}
|
|
4625
4694
|
var styles37 = reactNative.StyleSheet.create({
|
|
4626
4695
|
root: { flex: 1 }
|
|
@@ -5381,17 +5450,12 @@ function ZoomableImage({ source, width, height, onZoomChange }) {
|
|
|
5381
5450
|
{ scale: scale2.value }
|
|
5382
5451
|
]
|
|
5383
5452
|
}));
|
|
5384
|
-
return /* @__PURE__ */ React25__default.default.createElement(reactNativeGestureHandler.GestureDetector, { gesture: composed }, /* @__PURE__ */ React25__default.default.createElement(
|
|
5385
|
-
Animated12__default.default.Image,
|
|
5386
|
-
{
|
|
5387
|
-
source,
|
|
5388
|
-
style: [{ width, height }, animatedStyle],
|
|
5389
|
-
resizeMode: "contain"
|
|
5390
|
-
}
|
|
5391
|
-
)));
|
|
5453
|
+
return /* @__PURE__ */ React25__default.default.createElement(reactNativeGestureHandler.GestureDetector, { gesture: composed }, /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [{ width, height }, styles44.imageWrap], collapsable: false }, /* @__PURE__ */ React25__default.default.createElement(Animated12__default.default.View, { style: [{ width, height }, animatedStyle] }, /* @__PURE__ */ React25__default.default.createElement(reactNative.Image, { source, style: { width, height }, resizeMode: "contain" }))));
|
|
5392
5454
|
}
|
|
5393
5455
|
function ImageViewer({ images, visible, onClose, initialIndex = 0 }) {
|
|
5394
|
-
const
|
|
5456
|
+
const window = reactNative.useWindowDimensions();
|
|
5457
|
+
const width = window.width > 0 ? window.width : reactNative.Dimensions.get("window").width;
|
|
5458
|
+
const height = window.height > 0 ? window.height : reactNative.Dimensions.get("window").height;
|
|
5395
5459
|
const insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
5396
5460
|
const [index, setIndex] = React25.useState(initialIndex);
|
|
5397
5461
|
const [pagingEnabled, setPagingEnabled] = React25.useState(true);
|
|
@@ -5434,7 +5498,7 @@ function ImageViewer({ images, visible, onClose, initialIndex = 0 }) {
|
|
|
5434
5498
|
scrollRef.current?.scrollTo({ x: page * width, animated: true });
|
|
5435
5499
|
setIndex(page);
|
|
5436
5500
|
};
|
|
5437
|
-
return /* @__PURE__ */ React25__default.default.createElement(reactNative.Modal, { visible, transparent: false, animationType: "fade", onRequestClose: onClose, statusBarTranslucent: true }, /* @__PURE__ */ React25__default.default.createElement(reactNativeGestureHandler.GestureHandlerRootView, { style: styles44.root }, /* @__PURE__ */ React25__default.default.createElement(Animated12__default.default.View, { style: [styles44.backdrop, backdropStyle], pointerEvents: "none" }), /* @__PURE__ */ React25__default.default.createElement(Animated12__default.default.View, { style: [styles44.container, dismissStyle] }, /* @__PURE__ */ React25__default.default.createElement(reactNativeGestureHandler.GestureDetector, { gesture: swipeDown }, /* @__PURE__ */ React25__default.default.createElement(
|
|
5501
|
+
return /* @__PURE__ */ React25__default.default.createElement(reactNative.Modal, { visible, transparent: false, animationType: "fade", onRequestClose: onClose, statusBarTranslucent: true }, /* @__PURE__ */ React25__default.default.createElement(reactNativeGestureHandler.GestureHandlerRootView, { style: styles44.root }, /* @__PURE__ */ React25__default.default.createElement(Animated12__default.default.View, { style: [styles44.backdrop, backdropStyle], pointerEvents: "none" }), /* @__PURE__ */ React25__default.default.createElement(Animated12__default.default.View, { style: [styles44.container, dismissStyle] }, /* @__PURE__ */ React25__default.default.createElement(reactNativeGestureHandler.GestureDetector, { gesture: swipeDown }, /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles44.root, collapsable: false }, /* @__PURE__ */ React25__default.default.createElement(
|
|
5438
5502
|
reactNative.ScrollView,
|
|
5439
5503
|
{
|
|
5440
5504
|
ref: scrollRef,
|
|
@@ -5455,19 +5519,18 @@ function ImageViewer({ images, visible, onClose, initialIndex = 0 }) {
|
|
|
5455
5519
|
onZoomChange: (zoomed) => setPagingEnabled(!zoomed)
|
|
5456
5520
|
}
|
|
5457
5521
|
))
|
|
5458
|
-
))), /* @__PURE__ */ React25__default.default.createElement(
|
|
5459
|
-
|
|
5522
|
+
))), /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [styles44.closeButtonWrapper, { top: insets.top + vs(8) }] }, /* @__PURE__ */ React25__default.default.createElement(
|
|
5523
|
+
IconButton,
|
|
5460
5524
|
{
|
|
5461
|
-
|
|
5525
|
+
iconName: "x",
|
|
5526
|
+
size: "md",
|
|
5527
|
+
variant: "text",
|
|
5528
|
+
style: { backgroundColor: "rgba(255,255,255,0.18)" },
|
|
5529
|
+
iconColor: "#fff",
|
|
5462
5530
|
onPress: onClose,
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
accessibilityLabel: "Close",
|
|
5467
|
-
hitSlop: { top: 12, bottom: 12, left: 12, right: 12 }
|
|
5468
|
-
},
|
|
5469
|
-
renderIcon("x", 26, "#fff")
|
|
5470
|
-
), images.length > 1 ? /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [styles44.dots, { bottom: insets.bottom + vs(16) }], pointerEvents: "box-none" }, /* @__PURE__ */ React25__default.default.createElement(
|
|
5531
|
+
accessibilityLabel: "Close"
|
|
5532
|
+
}
|
|
5533
|
+
)), images.length > 1 ? /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [styles44.dots, { bottom: insets.bottom + vs(16) }], pointerEvents: "box-none" }, /* @__PURE__ */ React25__default.default.createElement(
|
|
5471
5534
|
PagerDots,
|
|
5472
5535
|
{
|
|
5473
5536
|
count: images.length,
|
|
@@ -5494,15 +5557,9 @@ var styles44 = reactNative.StyleSheet.create({
|
|
|
5494
5557
|
justifyContent: "center",
|
|
5495
5558
|
overflow: "hidden"
|
|
5496
5559
|
},
|
|
5497
|
-
|
|
5560
|
+
closeButtonWrapper: {
|
|
5498
5561
|
position: "absolute",
|
|
5499
|
-
right: s(12)
|
|
5500
|
-
width: s(40),
|
|
5501
|
-
height: s(40),
|
|
5502
|
-
borderRadius: s(20),
|
|
5503
|
-
backgroundColor: "rgba(0,0,0,0.4)",
|
|
5504
|
-
alignItems: "center",
|
|
5505
|
-
justifyContent: "center"
|
|
5562
|
+
right: s(12)
|
|
5506
5563
|
},
|
|
5507
5564
|
dots: {
|
|
5508
5565
|
position: "absolute",
|
|
@@ -5650,6 +5707,7 @@ function ImageUpload({
|
|
|
5650
5707
|
onChange,
|
|
5651
5708
|
loading = false,
|
|
5652
5709
|
placeholder = "Tap to add image",
|
|
5710
|
+
showPlaceholderText = true,
|
|
5653
5711
|
width,
|
|
5654
5712
|
height = 200,
|
|
5655
5713
|
borderRadius = RADIUS.lg,
|
|
@@ -5662,23 +5720,31 @@ function ImageUpload({
|
|
|
5662
5720
|
const handlePress = async () => {
|
|
5663
5721
|
if (disabled || loading) return;
|
|
5664
5722
|
impactLight();
|
|
5665
|
-
let
|
|
5723
|
+
let picker;
|
|
5666
5724
|
try {
|
|
5667
|
-
|
|
5725
|
+
const mod = await import('expo-image-picker/build/ExponentImagePicker');
|
|
5726
|
+
picker = mod.default;
|
|
5668
5727
|
} catch {
|
|
5669
|
-
|
|
5670
|
-
|
|
5728
|
+
try {
|
|
5729
|
+
picker = await import('expo-image-picker');
|
|
5730
|
+
} catch {
|
|
5731
|
+
if (__DEV__) console.warn("[ImageUpload] expo-image-picker not installed.");
|
|
5732
|
+
return;
|
|
5733
|
+
}
|
|
5671
5734
|
}
|
|
5672
5735
|
if (reactNative.Platform.OS !== "web") {
|
|
5673
|
-
|
|
5674
|
-
|
|
5736
|
+
try {
|
|
5737
|
+
const { status } = await picker.requestMediaLibraryPermissionsAsync();
|
|
5738
|
+
if (status !== "granted") return;
|
|
5739
|
+
} catch {
|
|
5740
|
+
}
|
|
5675
5741
|
}
|
|
5676
|
-
const result = await
|
|
5742
|
+
const result = await picker.launchImageLibraryAsync({
|
|
5677
5743
|
mediaTypes: ["images"],
|
|
5678
5744
|
allowsEditing: true,
|
|
5679
5745
|
quality: 0.8
|
|
5680
5746
|
});
|
|
5681
|
-
if (!result.canceled && result.assets[0]) {
|
|
5747
|
+
if (!result.canceled && result.assets?.[0]) {
|
|
5682
5748
|
onChange?.(result.assets[0].uri);
|
|
5683
5749
|
}
|
|
5684
5750
|
};
|
|
@@ -5711,7 +5777,15 @@ function ImageUpload({
|
|
|
5711
5777
|
style: [reactNative.StyleSheet.absoluteFillObject, { borderRadius }],
|
|
5712
5778
|
resizeMode
|
|
5713
5779
|
}
|
|
5714
|
-
) : /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles46.placeholder }, /* @__PURE__ */ React25__default.default.createElement(vectorIcons.Feather, { name: "image", size: ms(28), color: colors.foregroundMuted }), /* @__PURE__ */ React25__default.default.createElement(
|
|
5780
|
+
) : /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles46.placeholder }, /* @__PURE__ */ React25__default.default.createElement(vectorIcons.Feather, { name: "image", size: ms(28), color: colors.foregroundMuted }), showPlaceholderText ? /* @__PURE__ */ React25__default.default.createElement(
|
|
5781
|
+
reactNative.Text,
|
|
5782
|
+
{
|
|
5783
|
+
style: [styles46.placeholderText, { color: colors.foregroundMuted }],
|
|
5784
|
+
numberOfLines: 1,
|
|
5785
|
+
allowFontScaling: true
|
|
5786
|
+
},
|
|
5787
|
+
placeholder
|
|
5788
|
+
) : null),
|
|
5715
5789
|
loading ? /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [styles46.loadingOverlay, { backgroundColor: colors.overlay }] }, /* @__PURE__ */ React25__default.default.createElement(Spinner, { size: "md" })) : null,
|
|
5716
5790
|
value && !loading ? /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles46.editBadge, pointerEvents: "none" }, /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [styles46.editBadgeInner, { backgroundColor: colors.overlay }] }, /* @__PURE__ */ React25__default.default.createElement(vectorIcons.Feather, { name: "edit-2", size: ms(12), color: "#fff" }))) : null
|
|
5717
5791
|
);
|
|
@@ -5725,7 +5799,8 @@ var styles46 = reactNative.StyleSheet.create({
|
|
|
5725
5799
|
},
|
|
5726
5800
|
placeholderText: {
|
|
5727
5801
|
fontFamily: "Sohne-Regular",
|
|
5728
|
-
fontSize: ms(13)
|
|
5802
|
+
fontSize: ms(13),
|
|
5803
|
+
textAlign: "center"
|
|
5729
5804
|
},
|
|
5730
5805
|
loadingOverlay: {
|
|
5731
5806
|
...reactNative.StyleSheet.absoluteFillObject,
|
|
@@ -5746,6 +5821,851 @@ var styles46 = reactNative.StyleSheet.create({
|
|
|
5746
5821
|
}
|
|
5747
5822
|
});
|
|
5748
5823
|
|
|
5824
|
+
// src/utils/curatedIcons.ts
|
|
5825
|
+
var CURATED_ICONS = [
|
|
5826
|
+
{
|
|
5827
|
+
name: "food",
|
|
5828
|
+
label: "Food",
|
|
5829
|
+
labelEs: "Comida",
|
|
5830
|
+
categoryIcon: "coffee",
|
|
5831
|
+
icons: [
|
|
5832
|
+
// Bebidas
|
|
5833
|
+
"coffee",
|
|
5834
|
+
"wine-glass",
|
|
5835
|
+
"beer",
|
|
5836
|
+
"cocktail",
|
|
5837
|
+
"mug-hot",
|
|
5838
|
+
"glass-cheers",
|
|
5839
|
+
"wine",
|
|
5840
|
+
// Comidas
|
|
5841
|
+
"restaurant",
|
|
5842
|
+
"hamburger",
|
|
5843
|
+
"pizza-slice",
|
|
5844
|
+
"ice-cream",
|
|
5845
|
+
"cake",
|
|
5846
|
+
"egg",
|
|
5847
|
+
"fish",
|
|
5848
|
+
"bread-slice",
|
|
5849
|
+
"cookie",
|
|
5850
|
+
"cheese",
|
|
5851
|
+
"carrot",
|
|
5852
|
+
"hotdog",
|
|
5853
|
+
// Cocina / utilidades
|
|
5854
|
+
"utensils",
|
|
5855
|
+
// Delivery / pedidos
|
|
5856
|
+
"shopping-bag",
|
|
5857
|
+
"clock",
|
|
5858
|
+
"star",
|
|
5859
|
+
"heart",
|
|
5860
|
+
"map-pin",
|
|
5861
|
+
"phone"
|
|
5862
|
+
]
|
|
5863
|
+
},
|
|
5864
|
+
{
|
|
5865
|
+
name: "sports",
|
|
5866
|
+
label: "Sports",
|
|
5867
|
+
labelEs: "Deportes",
|
|
5868
|
+
categoryIcon: "activity",
|
|
5869
|
+
icons: [
|
|
5870
|
+
// Deportes específicos
|
|
5871
|
+
"futbol",
|
|
5872
|
+
"dumbbell",
|
|
5873
|
+
"running",
|
|
5874
|
+
"bicycle",
|
|
5875
|
+
"heartbeat",
|
|
5876
|
+
"fitness-center",
|
|
5877
|
+
// Competencia / logros
|
|
5878
|
+
"target",
|
|
5879
|
+
"award",
|
|
5880
|
+
"flag",
|
|
5881
|
+
"star",
|
|
5882
|
+
"zap",
|
|
5883
|
+
// Bienestar
|
|
5884
|
+
"heart",
|
|
5885
|
+
"clock",
|
|
5886
|
+
"activity",
|
|
5887
|
+
"sun",
|
|
5888
|
+
"user",
|
|
5889
|
+
"users"
|
|
5890
|
+
]
|
|
5891
|
+
},
|
|
5892
|
+
{
|
|
5893
|
+
name: "business",
|
|
5894
|
+
label: "Business",
|
|
5895
|
+
labelEs: "Negocios",
|
|
5896
|
+
categoryIcon: "briefcase",
|
|
5897
|
+
icons: [
|
|
5898
|
+
"shopping-cart",
|
|
5899
|
+
"shopping-bag",
|
|
5900
|
+
"credit-card",
|
|
5901
|
+
"dollar-sign",
|
|
5902
|
+
"percent",
|
|
5903
|
+
"briefcase",
|
|
5904
|
+
"truck",
|
|
5905
|
+
"package",
|
|
5906
|
+
"gift",
|
|
5907
|
+
"bar-chart",
|
|
5908
|
+
"bar-chart-2",
|
|
5909
|
+
"pie-chart",
|
|
5910
|
+
"trending-up",
|
|
5911
|
+
"trending-down",
|
|
5912
|
+
"activity",
|
|
5913
|
+
"tag",
|
|
5914
|
+
"bookmark",
|
|
5915
|
+
"pocket"
|
|
5916
|
+
]
|
|
5917
|
+
},
|
|
5918
|
+
{
|
|
5919
|
+
name: "objects",
|
|
5920
|
+
label: "Objects",
|
|
5921
|
+
labelEs: "Objetos",
|
|
5922
|
+
categoryIcon: "folder",
|
|
5923
|
+
icons: [
|
|
5924
|
+
"file",
|
|
5925
|
+
"file-text",
|
|
5926
|
+
"file-plus",
|
|
5927
|
+
"file-minus",
|
|
5928
|
+
"folder",
|
|
5929
|
+
"folder-plus",
|
|
5930
|
+
"folder-minus",
|
|
5931
|
+
"lock",
|
|
5932
|
+
"unlock",
|
|
5933
|
+
"key",
|
|
5934
|
+
"shield",
|
|
5935
|
+
"shield-off",
|
|
5936
|
+
"settings",
|
|
5937
|
+
"sliders",
|
|
5938
|
+
"toggle-left",
|
|
5939
|
+
"toggle-right",
|
|
5940
|
+
"tool",
|
|
5941
|
+
"printer",
|
|
5942
|
+
"database",
|
|
5943
|
+
"server",
|
|
5944
|
+
"hard-drive",
|
|
5945
|
+
"cpu",
|
|
5946
|
+
"paperclip",
|
|
5947
|
+
"aperture",
|
|
5948
|
+
"box",
|
|
5949
|
+
"radio"
|
|
5950
|
+
]
|
|
5951
|
+
},
|
|
5952
|
+
{
|
|
5953
|
+
name: "status",
|
|
5954
|
+
label: "Status",
|
|
5955
|
+
labelEs: "Estado",
|
|
5956
|
+
categoryIcon: "alert-circle",
|
|
5957
|
+
icons: [
|
|
5958
|
+
"alert-circle",
|
|
5959
|
+
"alert-triangle",
|
|
5960
|
+
"alert-octagon",
|
|
5961
|
+
"info",
|
|
5962
|
+
"help-circle",
|
|
5963
|
+
"bell",
|
|
5964
|
+
"bell-off",
|
|
5965
|
+
"eye",
|
|
5966
|
+
"eye-off",
|
|
5967
|
+
"flag",
|
|
5968
|
+
"zap",
|
|
5969
|
+
"zap-off",
|
|
5970
|
+
"loader",
|
|
5971
|
+
"clock",
|
|
5972
|
+
"watch"
|
|
5973
|
+
]
|
|
5974
|
+
},
|
|
5975
|
+
{
|
|
5976
|
+
name: "actions",
|
|
5977
|
+
label: "Actions",
|
|
5978
|
+
labelEs: "Acciones",
|
|
5979
|
+
categoryIcon: "edit-3",
|
|
5980
|
+
icons: [
|
|
5981
|
+
"plus",
|
|
5982
|
+
"plus-circle",
|
|
5983
|
+
"plus-square",
|
|
5984
|
+
"minus",
|
|
5985
|
+
"minus-circle",
|
|
5986
|
+
"minus-square",
|
|
5987
|
+
"x",
|
|
5988
|
+
"x-circle",
|
|
5989
|
+
"x-square",
|
|
5990
|
+
"x-octagon",
|
|
5991
|
+
"check",
|
|
5992
|
+
"check-circle",
|
|
5993
|
+
"check-square",
|
|
5994
|
+
"edit",
|
|
5995
|
+
"edit-2",
|
|
5996
|
+
"edit-3",
|
|
5997
|
+
"trash",
|
|
5998
|
+
"trash-2",
|
|
5999
|
+
"copy",
|
|
6000
|
+
"clipboard",
|
|
6001
|
+
"scissors",
|
|
6002
|
+
"download",
|
|
6003
|
+
"download-cloud",
|
|
6004
|
+
"upload",
|
|
6005
|
+
"upload-cloud",
|
|
6006
|
+
"share",
|
|
6007
|
+
"share-2",
|
|
6008
|
+
"link",
|
|
6009
|
+
"link-2",
|
|
6010
|
+
"search",
|
|
6011
|
+
"zoom-in",
|
|
6012
|
+
"zoom-out",
|
|
6013
|
+
"save",
|
|
6014
|
+
"archive",
|
|
6015
|
+
"log-in",
|
|
6016
|
+
"log-out",
|
|
6017
|
+
"power",
|
|
6018
|
+
"refresh-cw",
|
|
6019
|
+
"rotate-cw",
|
|
6020
|
+
"slash"
|
|
6021
|
+
]
|
|
6022
|
+
},
|
|
6023
|
+
{
|
|
6024
|
+
name: "communication",
|
|
6025
|
+
label: "Communication",
|
|
6026
|
+
labelEs: "Comunicaci\xF3n",
|
|
6027
|
+
categoryIcon: "message-circle",
|
|
6028
|
+
icons: [
|
|
6029
|
+
"mail",
|
|
6030
|
+
"message-circle",
|
|
6031
|
+
"message-square",
|
|
6032
|
+
"send",
|
|
6033
|
+
"phone",
|
|
6034
|
+
"phone-call",
|
|
6035
|
+
"phone-incoming",
|
|
6036
|
+
"phone-outgoing",
|
|
6037
|
+
"phone-missed",
|
|
6038
|
+
"phone-off",
|
|
6039
|
+
"phone-forwarded",
|
|
6040
|
+
"at-sign",
|
|
6041
|
+
"inbox",
|
|
6042
|
+
"user",
|
|
6043
|
+
"user-plus",
|
|
6044
|
+
"user-minus",
|
|
6045
|
+
"user-check",
|
|
6046
|
+
"user-x",
|
|
6047
|
+
"users",
|
|
6048
|
+
"smile",
|
|
6049
|
+
"frown",
|
|
6050
|
+
"meh",
|
|
6051
|
+
"heart",
|
|
6052
|
+
"thumbs-up",
|
|
6053
|
+
"thumbs-down",
|
|
6054
|
+
"star",
|
|
6055
|
+
"award"
|
|
6056
|
+
]
|
|
6057
|
+
},
|
|
6058
|
+
{
|
|
6059
|
+
name: "navigation",
|
|
6060
|
+
label: "Navigation",
|
|
6061
|
+
labelEs: "Navegaci\xF3n",
|
|
6062
|
+
categoryIcon: "compass",
|
|
6063
|
+
icons: [
|
|
6064
|
+
"arrow-up",
|
|
6065
|
+
"arrow-down",
|
|
6066
|
+
"arrow-left",
|
|
6067
|
+
"arrow-right",
|
|
6068
|
+
"arrow-up-left",
|
|
6069
|
+
"arrow-up-right",
|
|
6070
|
+
"arrow-down-left",
|
|
6071
|
+
"arrow-down-right",
|
|
6072
|
+
"chevron-up",
|
|
6073
|
+
"chevron-down",
|
|
6074
|
+
"chevron-left",
|
|
6075
|
+
"chevron-right",
|
|
6076
|
+
"chevrons-up",
|
|
6077
|
+
"chevrons-down",
|
|
6078
|
+
"chevrons-left",
|
|
6079
|
+
"chevrons-right",
|
|
6080
|
+
"corner-up-left",
|
|
6081
|
+
"corner-up-right",
|
|
6082
|
+
"corner-down-left",
|
|
6083
|
+
"corner-down-right",
|
|
6084
|
+
"corner-left-up",
|
|
6085
|
+
"corner-left-down",
|
|
6086
|
+
"corner-right-up",
|
|
6087
|
+
"corner-right-down",
|
|
6088
|
+
"refresh-cw",
|
|
6089
|
+
"refresh-ccw",
|
|
6090
|
+
"rotate-cw",
|
|
6091
|
+
"rotate-ccw",
|
|
6092
|
+
"navigation",
|
|
6093
|
+
"navigation-2",
|
|
6094
|
+
"compass",
|
|
6095
|
+
"map",
|
|
6096
|
+
"map-pin",
|
|
6097
|
+
"target",
|
|
6098
|
+
"crosshair",
|
|
6099
|
+
"home",
|
|
6100
|
+
"maximize",
|
|
6101
|
+
"maximize-2",
|
|
6102
|
+
"minimize",
|
|
6103
|
+
"minimize-2",
|
|
6104
|
+
"external-link",
|
|
6105
|
+
"move",
|
|
6106
|
+
"anchor"
|
|
6107
|
+
]
|
|
6108
|
+
},
|
|
6109
|
+
{
|
|
6110
|
+
name: "media",
|
|
6111
|
+
label: "Media",
|
|
6112
|
+
labelEs: "Medios",
|
|
6113
|
+
categoryIcon: "image",
|
|
6114
|
+
icons: [
|
|
6115
|
+
"image",
|
|
6116
|
+
"film",
|
|
6117
|
+
"video",
|
|
6118
|
+
"video-off",
|
|
6119
|
+
"play",
|
|
6120
|
+
"play-circle",
|
|
6121
|
+
"pause",
|
|
6122
|
+
"pause-circle",
|
|
6123
|
+
"square",
|
|
6124
|
+
"stop-circle",
|
|
6125
|
+
"music",
|
|
6126
|
+
"headphones",
|
|
6127
|
+
"speaker",
|
|
6128
|
+
"camera",
|
|
6129
|
+
"camera-off",
|
|
6130
|
+
"mic",
|
|
6131
|
+
"mic-off",
|
|
6132
|
+
"volume",
|
|
6133
|
+
"volume-1",
|
|
6134
|
+
"volume-2",
|
|
6135
|
+
"volume-x",
|
|
6136
|
+
"fast-forward",
|
|
6137
|
+
"rewind",
|
|
6138
|
+
"skip-forward",
|
|
6139
|
+
"skip-back",
|
|
6140
|
+
"repeat",
|
|
6141
|
+
"shuffle",
|
|
6142
|
+
"disc"
|
|
6143
|
+
]
|
|
6144
|
+
},
|
|
6145
|
+
{
|
|
6146
|
+
name: "layout",
|
|
6147
|
+
label: "Layout",
|
|
6148
|
+
labelEs: "Dise\xF1o",
|
|
6149
|
+
categoryIcon: "grid",
|
|
6150
|
+
icons: [
|
|
6151
|
+
"menu",
|
|
6152
|
+
"more-horizontal",
|
|
6153
|
+
"more-vertical",
|
|
6154
|
+
"grid",
|
|
6155
|
+
"columns",
|
|
6156
|
+
"sidebar",
|
|
6157
|
+
"layout",
|
|
6158
|
+
"list",
|
|
6159
|
+
"align-left",
|
|
6160
|
+
"align-center",
|
|
6161
|
+
"align-right",
|
|
6162
|
+
"align-justify",
|
|
6163
|
+
"bold",
|
|
6164
|
+
"italic",
|
|
6165
|
+
"underline",
|
|
6166
|
+
"type",
|
|
6167
|
+
"filter",
|
|
6168
|
+
"crop",
|
|
6169
|
+
"layers",
|
|
6170
|
+
"hash",
|
|
6171
|
+
"table",
|
|
6172
|
+
"trello",
|
|
6173
|
+
"circle",
|
|
6174
|
+
"square",
|
|
6175
|
+
"triangle",
|
|
6176
|
+
"hexagon",
|
|
6177
|
+
"octagon",
|
|
6178
|
+
"feather",
|
|
6179
|
+
"pen-tool"
|
|
6180
|
+
]
|
|
6181
|
+
},
|
|
6182
|
+
{
|
|
6183
|
+
name: "nature",
|
|
6184
|
+
label: "Nature",
|
|
6185
|
+
labelEs: "Naturaleza",
|
|
6186
|
+
categoryIcon: "sun",
|
|
6187
|
+
icons: [
|
|
6188
|
+
"sun",
|
|
6189
|
+
"sunrise",
|
|
6190
|
+
"sunset",
|
|
6191
|
+
"moon",
|
|
6192
|
+
"cloud",
|
|
6193
|
+
"cloud-drizzle",
|
|
6194
|
+
"cloud-lightning",
|
|
6195
|
+
"cloud-off",
|
|
6196
|
+
"cloud-rain",
|
|
6197
|
+
"cloud-snow",
|
|
6198
|
+
"wind",
|
|
6199
|
+
"umbrella",
|
|
6200
|
+
"thermometer",
|
|
6201
|
+
"droplet",
|
|
6202
|
+
"life-buoy"
|
|
6203
|
+
]
|
|
6204
|
+
},
|
|
6205
|
+
{
|
|
6206
|
+
name: "brands",
|
|
6207
|
+
label: "Brands",
|
|
6208
|
+
labelEs: "Marcas",
|
|
6209
|
+
categoryIcon: "globe",
|
|
6210
|
+
icons: [
|
|
6211
|
+
"github",
|
|
6212
|
+
"gitlab",
|
|
6213
|
+
"twitter",
|
|
6214
|
+
"facebook",
|
|
6215
|
+
"instagram",
|
|
6216
|
+
"linkedin",
|
|
6217
|
+
"youtube",
|
|
6218
|
+
"dribbble",
|
|
6219
|
+
"twitch",
|
|
6220
|
+
"slack",
|
|
6221
|
+
"figma",
|
|
6222
|
+
"framer",
|
|
6223
|
+
"chrome",
|
|
6224
|
+
"codepen",
|
|
6225
|
+
"codesandbox",
|
|
6226
|
+
"globe",
|
|
6227
|
+
"rss",
|
|
6228
|
+
"airplay",
|
|
6229
|
+
"cast",
|
|
6230
|
+
"bluetooth",
|
|
6231
|
+
"wifi",
|
|
6232
|
+
"wifi-off",
|
|
6233
|
+
"battery",
|
|
6234
|
+
"battery-charging",
|
|
6235
|
+
"monitor",
|
|
6236
|
+
"tablet",
|
|
6237
|
+
"smartphone",
|
|
6238
|
+
"tv"
|
|
6239
|
+
]
|
|
6240
|
+
}
|
|
6241
|
+
];
|
|
6242
|
+
var ALL_CURATED_ICONS = [
|
|
6243
|
+
...new Set(CURATED_ICONS.flatMap((c) => c.icons))
|
|
6244
|
+
];
|
|
6245
|
+
|
|
6246
|
+
// src/components/IconPicker/IconPicker.tsx
|
|
6247
|
+
var NUM_COLUMNS = 6;
|
|
6248
|
+
var GAP = 6;
|
|
6249
|
+
var TRIGGER_SIZE = s(56);
|
|
6250
|
+
var SCREEN_HEIGHT2 = reactNative.Dimensions.get("window").height;
|
|
6251
|
+
function IconCell({ name, selected, size, onPress }) {
|
|
6252
|
+
const { colors } = useTheme();
|
|
6253
|
+
const handlePress = () => {
|
|
6254
|
+
selectionAsync();
|
|
6255
|
+
onPress();
|
|
6256
|
+
};
|
|
6257
|
+
const iconColor = selected ? colors.primaryForeground : colors.foreground;
|
|
6258
|
+
const bg = selected ? colors.primary : "transparent";
|
|
6259
|
+
return /* @__PURE__ */ React25__default.default.createElement(
|
|
6260
|
+
reactNative.TouchableOpacity,
|
|
6261
|
+
{
|
|
6262
|
+
onPress: handlePress,
|
|
6263
|
+
activeOpacity: 0.6,
|
|
6264
|
+
touchSoundDisabled: true,
|
|
6265
|
+
accessibilityRole: "button",
|
|
6266
|
+
accessibilityState: { selected },
|
|
6267
|
+
accessibilityLabel: name,
|
|
6268
|
+
style: [styles47.cell, { width: size, height: size, backgroundColor: bg }]
|
|
6269
|
+
},
|
|
6270
|
+
renderIcon(name, ms(20), iconColor)
|
|
6271
|
+
);
|
|
6272
|
+
}
|
|
6273
|
+
var IconCellMemo = React25__default.default.memo(IconCell);
|
|
6274
|
+
function IconPicker({
|
|
6275
|
+
value,
|
|
6276
|
+
onChange,
|
|
6277
|
+
label,
|
|
6278
|
+
error,
|
|
6279
|
+
hint,
|
|
6280
|
+
disabled = false,
|
|
6281
|
+
numColumns = NUM_COLUMNS,
|
|
6282
|
+
gap = GAP,
|
|
6283
|
+
style
|
|
6284
|
+
}) {
|
|
6285
|
+
const { colors } = useTheme();
|
|
6286
|
+
const insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
6287
|
+
const sheetRef = React25.useRef(null);
|
|
6288
|
+
const catScrollRef = React25.useRef(null);
|
|
6289
|
+
const [open, setOpen] = React25.useState(false);
|
|
6290
|
+
const [activeCategory, setActiveCategory] = React25.useState(null);
|
|
6291
|
+
const [containerWidth, setContainerWidth] = React25.useState(() => reactNative.Dimensions.get("window").width - s(16) * 2);
|
|
6292
|
+
const sheetName = React25.useId();
|
|
6293
|
+
const activeIcons = React25.useMemo(() => {
|
|
6294
|
+
if (activeCategory) {
|
|
6295
|
+
return CURATED_ICONS.find((c) => c.name === activeCategory)?.icons ?? ALL_CURATED_ICONS;
|
|
6296
|
+
}
|
|
6297
|
+
return ALL_CURATED_ICONS;
|
|
6298
|
+
}, [activeCategory]);
|
|
6299
|
+
const gapPx = s(gap);
|
|
6300
|
+
const cellSize = containerWidth > 0 ? Math.floor((containerWidth - gapPx * (numColumns - 1)) / numColumns) : 0;
|
|
6301
|
+
const rows = React25.useMemo(() => {
|
|
6302
|
+
const result = [];
|
|
6303
|
+
for (let i = 0; i < activeIcons.length; i += numColumns) {
|
|
6304
|
+
result.push(activeIcons.slice(i, i + numColumns));
|
|
6305
|
+
}
|
|
6306
|
+
return result;
|
|
6307
|
+
}, [activeIcons, numColumns]);
|
|
6308
|
+
React25.useEffect(() => {
|
|
6309
|
+
if (open) {
|
|
6310
|
+
impactMedium();
|
|
6311
|
+
sheetRef.current?.present();
|
|
6312
|
+
} else {
|
|
6313
|
+
sheetRef.current?.dismiss();
|
|
6314
|
+
}
|
|
6315
|
+
}, [open]);
|
|
6316
|
+
const handleSelect = React25.useCallback(
|
|
6317
|
+
(iconName) => {
|
|
6318
|
+
onChange(iconName);
|
|
6319
|
+
setOpen(false);
|
|
6320
|
+
setActiveCategory(null);
|
|
6321
|
+
},
|
|
6322
|
+
[onChange]
|
|
6323
|
+
);
|
|
6324
|
+
const handleOpen = React25.useCallback(() => {
|
|
6325
|
+
if (disabled) return;
|
|
6326
|
+
setActiveCategory(null);
|
|
6327
|
+
setOpen(true);
|
|
6328
|
+
}, [disabled]);
|
|
6329
|
+
const handleClose = React25.useCallback(() => {
|
|
6330
|
+
setOpen(false);
|
|
6331
|
+
setActiveCategory(null);
|
|
6332
|
+
}, []);
|
|
6333
|
+
const renderBackdrop = React25.useCallback(
|
|
6334
|
+
(props) => /* @__PURE__ */ React25__default.default.createElement(BottomSheet.BottomSheetBackdrop, { ...props, disappearsOnIndex: -1, appearsOnIndex: 0, pressBehavior: "close" }),
|
|
6335
|
+
[]
|
|
6336
|
+
);
|
|
6337
|
+
const selectedIcon = value ? renderIcon(value, ms(28), colors.foreground) : null;
|
|
6338
|
+
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [styles47.triggerContainer, style] }, label ? /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles47.triggerLabel, { color: colors.foreground }], allowFontScaling: true }, label) : null, /* @__PURE__ */ React25__default.default.createElement(
|
|
6339
|
+
reactNative.TouchableOpacity,
|
|
6340
|
+
{
|
|
6341
|
+
onPress: handleOpen,
|
|
6342
|
+
disabled,
|
|
6343
|
+
activeOpacity: 0.7,
|
|
6344
|
+
touchSoundDisabled: true,
|
|
6345
|
+
accessibilityRole: "button",
|
|
6346
|
+
accessibilityLabel: label ?? "Seleccionar icono",
|
|
6347
|
+
accessibilityState: { disabled },
|
|
6348
|
+
style: [
|
|
6349
|
+
styles47.trigger,
|
|
6350
|
+
{
|
|
6351
|
+
backgroundColor: disabled ? colors.surface : colors.background,
|
|
6352
|
+
width: TRIGGER_SIZE,
|
|
6353
|
+
height: TRIGGER_SIZE,
|
|
6354
|
+
borderColor: error ? colors.destructive : value ? colors.primary : colors.border
|
|
6355
|
+
},
|
|
6356
|
+
disabled && styles47.triggerDisabled
|
|
6357
|
+
]
|
|
6358
|
+
},
|
|
6359
|
+
selectedIcon ?? renderIcon("plus", ms(24), colors.foregroundMuted)
|
|
6360
|
+
), error ? /* @__PURE__ */ React25__default.default.createElement(
|
|
6361
|
+
reactNative.Text,
|
|
6362
|
+
{
|
|
6363
|
+
style: [styles47.helperText, { color: colors.destructive }],
|
|
6364
|
+
allowFontScaling: true,
|
|
6365
|
+
accessibilityLiveRegion: "polite"
|
|
6366
|
+
},
|
|
6367
|
+
error
|
|
6368
|
+
) : null, !error && hint ? /* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles47.helperText, { color: colors.foregroundMuted }], allowFontScaling: true }, hint) : null, /* @__PURE__ */ React25__default.default.createElement(
|
|
6369
|
+
BottomSheet.BottomSheetModal,
|
|
6370
|
+
{
|
|
6371
|
+
ref: sheetRef,
|
|
6372
|
+
name: sheetName,
|
|
6373
|
+
onDismiss: handleClose,
|
|
6374
|
+
enableDynamicSizing: true,
|
|
6375
|
+
maxDynamicContentSize: SCREEN_HEIGHT2 * 0.7,
|
|
6376
|
+
backdropComponent: renderBackdrop,
|
|
6377
|
+
backgroundStyle: [styles47.sheetBackground, { backgroundColor: colors.card }],
|
|
6378
|
+
handleIndicatorStyle: [styles47.handle, { backgroundColor: colors.border }],
|
|
6379
|
+
enablePanDownToClose: true,
|
|
6380
|
+
topInset: insets.top,
|
|
6381
|
+
android_keyboardInputMode: "adjustPan"
|
|
6382
|
+
},
|
|
6383
|
+
/* @__PURE__ */ React25__default.default.createElement(
|
|
6384
|
+
BottomSheet.BottomSheetScrollView,
|
|
6385
|
+
{
|
|
6386
|
+
contentContainerStyle: styles47.sheetContent,
|
|
6387
|
+
showsVerticalScrollIndicator: true
|
|
6388
|
+
},
|
|
6389
|
+
/* @__PURE__ */ React25__default.default.createElement(reactNative.Text, { style: [styles47.sectionLabel, { color: colors.foregroundSubtle }], allowFontScaling: true }, "Categor\xEDas"),
|
|
6390
|
+
/* @__PURE__ */ React25__default.default.createElement(
|
|
6391
|
+
reactNativeGestureHandler.ScrollView,
|
|
6392
|
+
{
|
|
6393
|
+
ref: catScrollRef,
|
|
6394
|
+
horizontal: true,
|
|
6395
|
+
showsHorizontalScrollIndicator: false,
|
|
6396
|
+
contentContainerStyle: styles47.categoryStrip,
|
|
6397
|
+
style: styles47.categoryScroll
|
|
6398
|
+
},
|
|
6399
|
+
/* @__PURE__ */ React25__default.default.createElement(
|
|
6400
|
+
reactNative.TouchableOpacity,
|
|
6401
|
+
{
|
|
6402
|
+
onPress: () => setActiveCategory(null),
|
|
6403
|
+
activeOpacity: 0.7,
|
|
6404
|
+
touchSoundDisabled: true,
|
|
6405
|
+
accessibilityRole: "button",
|
|
6406
|
+
accessibilityLabel: "Todos",
|
|
6407
|
+
accessibilityState: { selected: activeCategory === null },
|
|
6408
|
+
style: [
|
|
6409
|
+
styles47.categoryChip,
|
|
6410
|
+
{
|
|
6411
|
+
backgroundColor: activeCategory === null ? colors.primary : colors.surface,
|
|
6412
|
+
borderColor: activeCategory === null ? colors.primary : colors.border
|
|
6413
|
+
}
|
|
6414
|
+
]
|
|
6415
|
+
},
|
|
6416
|
+
/* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles47.categoryChipInner }, renderIcon("grid", ms(14), activeCategory === null ? colors.primaryForeground : colors.foregroundSubtle), /* @__PURE__ */ React25__default.default.createElement(
|
|
6417
|
+
reactNative.Text,
|
|
6418
|
+
{
|
|
6419
|
+
style: [
|
|
6420
|
+
styles47.categoryChipText,
|
|
6421
|
+
{ color: activeCategory === null ? colors.primaryForeground : colors.foreground }
|
|
6422
|
+
],
|
|
6423
|
+
allowFontScaling: true,
|
|
6424
|
+
numberOfLines: 1
|
|
6425
|
+
},
|
|
6426
|
+
"Todos"
|
|
6427
|
+
))
|
|
6428
|
+
),
|
|
6429
|
+
CURATED_ICONS.map((cat) => /* @__PURE__ */ React25__default.default.createElement(
|
|
6430
|
+
reactNative.TouchableOpacity,
|
|
6431
|
+
{
|
|
6432
|
+
key: cat.name,
|
|
6433
|
+
onPress: () => setActiveCategory(cat.name),
|
|
6434
|
+
activeOpacity: 0.7,
|
|
6435
|
+
touchSoundDisabled: true,
|
|
6436
|
+
accessibilityRole: "button",
|
|
6437
|
+
accessibilityLabel: cat.labelEs,
|
|
6438
|
+
accessibilityState: { selected: activeCategory === cat.name },
|
|
6439
|
+
style: [
|
|
6440
|
+
styles47.categoryChip,
|
|
6441
|
+
{
|
|
6442
|
+
backgroundColor: activeCategory === cat.name ? colors.primary : colors.surface,
|
|
6443
|
+
borderColor: activeCategory === cat.name ? colors.primary : colors.border
|
|
6444
|
+
}
|
|
6445
|
+
]
|
|
6446
|
+
},
|
|
6447
|
+
/* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles47.categoryChipInner }, renderIcon(cat.categoryIcon, ms(14), activeCategory === cat.name ? colors.primaryForeground : colors.foregroundSubtle), /* @__PURE__ */ React25__default.default.createElement(
|
|
6448
|
+
reactNative.Text,
|
|
6449
|
+
{
|
|
6450
|
+
style: [
|
|
6451
|
+
styles47.categoryChipText,
|
|
6452
|
+
{ color: activeCategory === cat.name ? colors.primaryForeground : colors.foreground }
|
|
6453
|
+
],
|
|
6454
|
+
allowFontScaling: true,
|
|
6455
|
+
numberOfLines: 1
|
|
6456
|
+
},
|
|
6457
|
+
cat.labelEs
|
|
6458
|
+
))
|
|
6459
|
+
))
|
|
6460
|
+
),
|
|
6461
|
+
/* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [styles47.separator, { backgroundColor: colors.border }] }),
|
|
6462
|
+
/* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: styles47.gridContainer, onLayout: (e) => setContainerWidth(e.nativeEvent.layout.width) }, cellSize > 0 ? rows.map((row, i) => /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { key: row[0] ?? `row-${i}`, style: [styles47.row, { marginBottom: gapPx }] }, row.map((name) => /* @__PURE__ */ React25__default.default.createElement(
|
|
6463
|
+
IconCellMemo,
|
|
6464
|
+
{
|
|
6465
|
+
key: name,
|
|
6466
|
+
name,
|
|
6467
|
+
selected: value === name,
|
|
6468
|
+
size: cellSize,
|
|
6469
|
+
onPress: () => handleSelect(name)
|
|
6470
|
+
}
|
|
6471
|
+
)), Array.from({ length: numColumns - row.length }).map((_, j) => /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { key: `spacer-${j}`, style: { width: cellSize, height: cellSize } })))) : null)
|
|
6472
|
+
)
|
|
6473
|
+
));
|
|
6474
|
+
}
|
|
6475
|
+
var styles47 = reactNative.StyleSheet.create({
|
|
6476
|
+
triggerContainer: {
|
|
6477
|
+
gap: vs(8)
|
|
6478
|
+
},
|
|
6479
|
+
triggerLabel: {
|
|
6480
|
+
fontFamily: "Sohne-Medium",
|
|
6481
|
+
fontSize: ms(14)
|
|
6482
|
+
},
|
|
6483
|
+
trigger: {
|
|
6484
|
+
borderRadius: RADIUS.md,
|
|
6485
|
+
borderWidth: 1,
|
|
6486
|
+
alignItems: "center",
|
|
6487
|
+
justifyContent: "center"
|
|
6488
|
+
},
|
|
6489
|
+
triggerDisabled: {
|
|
6490
|
+
opacity: 0.6
|
|
6491
|
+
},
|
|
6492
|
+
helperText: {
|
|
6493
|
+
fontFamily: "Sohne-Regular",
|
|
6494
|
+
fontSize: ms(13)
|
|
6495
|
+
},
|
|
6496
|
+
sheetBackground: {
|
|
6497
|
+
borderTopLeftRadius: ms(16),
|
|
6498
|
+
borderTopRightRadius: ms(16)
|
|
6499
|
+
},
|
|
6500
|
+
handle: {
|
|
6501
|
+
width: s(36),
|
|
6502
|
+
height: vs(4),
|
|
6503
|
+
borderRadius: ms(2)
|
|
6504
|
+
},
|
|
6505
|
+
sheetContent: {
|
|
6506
|
+
paddingHorizontal: s(16),
|
|
6507
|
+
paddingBottom: vs(24)
|
|
6508
|
+
},
|
|
6509
|
+
sectionLabel: {
|
|
6510
|
+
fontFamily: "Sohne-Medium",
|
|
6511
|
+
fontSize: ms(12),
|
|
6512
|
+
marginBottom: vs(8),
|
|
6513
|
+
textTransform: "uppercase",
|
|
6514
|
+
letterSpacing: 0.5
|
|
6515
|
+
},
|
|
6516
|
+
categoryScroll: {
|
|
6517
|
+
flexGrow: 0,
|
|
6518
|
+
flexShrink: 0
|
|
6519
|
+
},
|
|
6520
|
+
categoryStrip: {
|
|
6521
|
+
gap: s(8)
|
|
6522
|
+
},
|
|
6523
|
+
categoryChip: {
|
|
6524
|
+
borderRadius: RADIUS.full,
|
|
6525
|
+
borderWidth: 1,
|
|
6526
|
+
paddingVertical: vs(6),
|
|
6527
|
+
paddingHorizontal: s(12)
|
|
6528
|
+
},
|
|
6529
|
+
categoryChipInner: {
|
|
6530
|
+
flexDirection: "row",
|
|
6531
|
+
alignItems: "center",
|
|
6532
|
+
gap: s(6)
|
|
6533
|
+
},
|
|
6534
|
+
categoryChipText: {
|
|
6535
|
+
fontFamily: "Sohne-Medium",
|
|
6536
|
+
fontSize: ms(12)
|
|
6537
|
+
},
|
|
6538
|
+
separator: {
|
|
6539
|
+
height: reactNative.StyleSheet.hairlineWidth,
|
|
6540
|
+
marginVertical: vs(12)
|
|
6541
|
+
},
|
|
6542
|
+
gridContainer: {},
|
|
6543
|
+
row: {
|
|
6544
|
+
flexDirection: "row",
|
|
6545
|
+
gap: GAP
|
|
6546
|
+
},
|
|
6547
|
+
cell: {
|
|
6548
|
+
borderRadius: RADIUS.md,
|
|
6549
|
+
alignItems: "center",
|
|
6550
|
+
justifyContent: "center"
|
|
6551
|
+
}
|
|
6552
|
+
});
|
|
6553
|
+
var sizeConfig = {
|
|
6554
|
+
sm: { button: s(40), icon: 16, valueFontSize: ms(18), valueLineHeight: mvs(24), valueMinWidth: s(32) },
|
|
6555
|
+
md: { button: s(44), icon: 18, valueFontSize: ms(22), valueLineHeight: mvs(28), valueMinWidth: s(36) },
|
|
6556
|
+
lg: { button: s(52), icon: 22, valueFontSize: ms(26), valueLineHeight: mvs(32), valueMinWidth: s(40) }
|
|
6557
|
+
};
|
|
6558
|
+
function NumberStepperBase({
|
|
6559
|
+
value,
|
|
6560
|
+
onValueChange,
|
|
6561
|
+
min = 1,
|
|
6562
|
+
max = 99,
|
|
6563
|
+
step = 1,
|
|
6564
|
+
size = "md",
|
|
6565
|
+
disabled = false,
|
|
6566
|
+
style,
|
|
6567
|
+
accessibilityLabel
|
|
6568
|
+
}) {
|
|
6569
|
+
const { colors } = useTheme();
|
|
6570
|
+
const canDecrement = value > min && !disabled;
|
|
6571
|
+
const canIncrement = value < max && !disabled;
|
|
6572
|
+
const handleDecrement = () => {
|
|
6573
|
+
if (!canDecrement) return;
|
|
6574
|
+
impactLight();
|
|
6575
|
+
onValueChange(Math.max(min, value - step));
|
|
6576
|
+
};
|
|
6577
|
+
const handleIncrement = () => {
|
|
6578
|
+
if (!canIncrement) return;
|
|
6579
|
+
impactLight();
|
|
6580
|
+
onValueChange(Math.min(max, value + step));
|
|
6581
|
+
};
|
|
6582
|
+
const { button: buttonSize, icon: iconSize, valueFontSize, valueLineHeight, valueMinWidth } = sizeConfig[size];
|
|
6583
|
+
const displayValue = String(value);
|
|
6584
|
+
return /* @__PURE__ */ React25__default.default.createElement(reactNative.View, { style: [styles48.container, style] }, /* @__PURE__ */ React25__default.default.createElement(
|
|
6585
|
+
PressableButton,
|
|
6586
|
+
{
|
|
6587
|
+
style: [
|
|
6588
|
+
styles48.button,
|
|
6589
|
+
{
|
|
6590
|
+
width: buttonSize,
|
|
6591
|
+
height: buttonSize,
|
|
6592
|
+
backgroundColor: colors.surface,
|
|
6593
|
+
borderColor: colors.border
|
|
6594
|
+
},
|
|
6595
|
+
!canDecrement && styles48.buttonDisabled
|
|
6596
|
+
],
|
|
6597
|
+
enabled: canDecrement,
|
|
6598
|
+
onPress: handleDecrement,
|
|
6599
|
+
rippleColor: "transparent",
|
|
6600
|
+
touchSoundDisabled: true,
|
|
6601
|
+
accessibilityRole: "button",
|
|
6602
|
+
accessibilityLabel: `Decrease, current value ${displayValue}`,
|
|
6603
|
+
accessibilityState: { disabled: !canDecrement }
|
|
6604
|
+
},
|
|
6605
|
+
renderIcon("minus", iconSize, canDecrement ? colors.foreground : colors.foregroundMuted)
|
|
6606
|
+
), /* @__PURE__ */ React25__default.default.createElement(
|
|
6607
|
+
reactNative.Text,
|
|
6608
|
+
{
|
|
6609
|
+
style: [
|
|
6610
|
+
styles48.value,
|
|
6611
|
+
{
|
|
6612
|
+
color: colors.foreground,
|
|
6613
|
+
fontSize: valueFontSize,
|
|
6614
|
+
lineHeight: valueLineHeight,
|
|
6615
|
+
minWidth: valueMinWidth
|
|
6616
|
+
}
|
|
6617
|
+
],
|
|
6618
|
+
allowFontScaling: true,
|
|
6619
|
+
accessibilityLabel: accessibilityLabel ?? `Quantity: ${displayValue}`,
|
|
6620
|
+
accessibilityRole: "text"
|
|
6621
|
+
},
|
|
6622
|
+
displayValue
|
|
6623
|
+
), /* @__PURE__ */ React25__default.default.createElement(
|
|
6624
|
+
PressableButton,
|
|
6625
|
+
{
|
|
6626
|
+
style: [
|
|
6627
|
+
styles48.button,
|
|
6628
|
+
{
|
|
6629
|
+
width: buttonSize,
|
|
6630
|
+
height: buttonSize,
|
|
6631
|
+
backgroundColor: colors.surface,
|
|
6632
|
+
borderColor: colors.border
|
|
6633
|
+
},
|
|
6634
|
+
!canIncrement && styles48.buttonDisabled
|
|
6635
|
+
],
|
|
6636
|
+
enabled: canIncrement,
|
|
6637
|
+
onPress: handleIncrement,
|
|
6638
|
+
rippleColor: "transparent",
|
|
6639
|
+
touchSoundDisabled: true,
|
|
6640
|
+
accessibilityRole: "button",
|
|
6641
|
+
accessibilityLabel: `Increase, current value ${displayValue}`,
|
|
6642
|
+
accessibilityState: { disabled: !canIncrement }
|
|
6643
|
+
},
|
|
6644
|
+
renderIcon("plus", iconSize, canIncrement ? colors.foreground : colors.foregroundMuted)
|
|
6645
|
+
));
|
|
6646
|
+
}
|
|
6647
|
+
var NumberStepper = React25__default.default.memo(NumberStepperBase);
|
|
6648
|
+
var styles48 = reactNative.StyleSheet.create({
|
|
6649
|
+
container: {
|
|
6650
|
+
flexDirection: "row",
|
|
6651
|
+
alignItems: "center",
|
|
6652
|
+
gap: s(12)
|
|
6653
|
+
},
|
|
6654
|
+
button: {
|
|
6655
|
+
borderRadius: RADIUS.md,
|
|
6656
|
+
alignItems: "center",
|
|
6657
|
+
justifyContent: "center",
|
|
6658
|
+
borderWidth: 1.5
|
|
6659
|
+
},
|
|
6660
|
+
buttonDisabled: {
|
|
6661
|
+
opacity: 0.35
|
|
6662
|
+
},
|
|
6663
|
+
value: {
|
|
6664
|
+
fontFamily: "Sohne-Medium",
|
|
6665
|
+
textAlign: "center"
|
|
6666
|
+
}
|
|
6667
|
+
});
|
|
6668
|
+
|
|
5749
6669
|
// src/utils/typography.ts
|
|
5750
6670
|
function getResponsiveFontSize(text, maxSize, steps = [
|
|
5751
6671
|
{ maxLen: 10, subtract: 0 },
|
|
@@ -5798,11 +6718,11 @@ function useConfirmDialog(options) {
|
|
|
5798
6718
|
|
|
5799
6719
|
Object.defineProperty(exports, "BottomSheetModalProvider", {
|
|
5800
6720
|
enumerable: true,
|
|
5801
|
-
get: function () { return
|
|
6721
|
+
get: function () { return BottomSheet.BottomSheetModalProvider; }
|
|
5802
6722
|
});
|
|
5803
6723
|
Object.defineProperty(exports, "SheetTextInput", {
|
|
5804
6724
|
enumerable: true,
|
|
5805
|
-
get: function () { return
|
|
6725
|
+
get: function () { return BottomSheet.BottomSheetTextInput; }
|
|
5806
6726
|
});
|
|
5807
6727
|
Object.defineProperty(exports, "toast", {
|
|
5808
6728
|
enumerable: true,
|
|
@@ -5839,6 +6759,7 @@ exports.FormSection = FormSection;
|
|
|
5839
6759
|
exports.ICON_SIZES = ICON_SIZES;
|
|
5840
6760
|
exports.Icon = Icon;
|
|
5841
6761
|
exports.IconButton = IconButton;
|
|
6762
|
+
exports.IconPicker = IconPicker;
|
|
5842
6763
|
exports.ImageUpload = ImageUpload;
|
|
5843
6764
|
exports.ImageViewer = ImageViewer;
|
|
5844
6765
|
exports.Input = Input;
|
|
@@ -5853,6 +6774,7 @@ exports.MenuGroupFooter = MenuGroupFooter;
|
|
|
5853
6774
|
exports.MenuGroupHeader = MenuGroupHeader;
|
|
5854
6775
|
exports.MenuItem = MenuItem;
|
|
5855
6776
|
exports.MonthPicker = MonthPicker;
|
|
6777
|
+
exports.NumberStepper = NumberStepper;
|
|
5856
6778
|
exports.PagerDots = PagerDots;
|
|
5857
6779
|
exports.Pressable = Pressable3;
|
|
5858
6780
|
exports.PricingCard = PricingCard;
|
|
@@ -5887,6 +6809,7 @@ exports.defaultDark = defaultDark;
|
|
|
5887
6809
|
exports.defaultLight = defaultLight;
|
|
5888
6810
|
exports.deriveColors = deriveColors;
|
|
5889
6811
|
exports.getResponsiveFontSize = getResponsiveFontSize;
|
|
6812
|
+
exports.getValidIconNames = getValidIconNames;
|
|
5890
6813
|
exports.impactHeavy = impactHeavy;
|
|
5891
6814
|
exports.impactLight = impactLight;
|
|
5892
6815
|
exports.impactMedium = impactMedium;
|