@retray-dev/ui-kit 13.2.0 → 13.4.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/CHANGELOG.md +680 -0
- package/CONSUMER.md +2 -0
- package/README.md +4 -4
- package/SKILL.md +276 -12
- package/dist/Accordion.d.mts +6 -6
- package/dist/Accordion.d.ts +6 -6
- package/dist/Accordion.js +39 -40
- package/dist/Accordion.mjs +4 -4
- package/dist/AlertBanner.d.mts +3 -3
- package/dist/AlertBanner.d.ts +3 -3
- package/dist/AlertBanner.js +7 -13
- package/dist/AlertBanner.mjs +4 -4
- package/dist/AppHeader.d.mts +4 -4
- package/dist/AppHeader.d.ts +4 -4
- package/dist/AppHeader.js +37 -28
- package/dist/AppHeader.mjs +6 -6
- package/dist/Avatar.d.mts +4 -4
- package/dist/Avatar.d.ts +4 -4
- package/dist/Avatar.mjs +2 -2
- package/dist/Badge.d.mts +5 -5
- package/dist/Badge.d.ts +5 -5
- package/dist/Badge.js +7 -13
- package/dist/Badge.mjs +3 -3
- package/dist/Button.d.mts +5 -5
- package/dist/Button.d.ts +5 -5
- package/dist/Button.js +31 -29
- package/dist/Button.mjs +5 -5
- package/dist/ButtonGroup.d.mts +3 -3
- package/dist/ButtonGroup.d.ts +3 -3
- package/dist/Card.d.mts +13 -13
- package/dist/Card.d.ts +13 -13
- package/dist/Card.js +23 -14
- package/dist/Card.mjs +4 -4
- package/dist/CategoryStrip.d.mts +3 -3
- package/dist/CategoryStrip.d.ts +3 -3
- package/dist/CategoryStrip.js +30 -27
- package/dist/CategoryStrip.mjs +5 -5
- package/dist/Checkbox.d.mts +2 -2
- package/dist/Checkbox.d.ts +2 -2
- package/dist/Checkbox.js +23 -14
- package/dist/Checkbox.mjs +3 -3
- package/dist/Chip.d.mts +5 -5
- package/dist/Chip.d.ts +5 -5
- package/dist/Chip.js +30 -27
- package/dist/Chip.mjs +5 -5
- package/dist/ConfirmDialog.d.mts +2 -2
- package/dist/ConfirmDialog.d.ts +2 -2
- package/dist/ConfirmDialog.js +64 -58
- package/dist/ConfirmDialog.mjs +7 -6
- package/dist/CurrencyDisplay.d.mts +3 -3
- package/dist/CurrencyDisplay.d.ts +3 -3
- package/dist/CurrencyDisplay.mjs +2 -2
- package/dist/CurrencyInput.d.mts +2 -2
- package/dist/CurrencyInput.d.ts +2 -2
- package/dist/CurrencyInput.js +7 -13
- package/dist/CurrencyInput.mjs +4 -4
- package/dist/DetailRow.d.mts +6 -6
- package/dist/DetailRow.d.ts +6 -6
- package/dist/DetailRow.js +7 -13
- package/dist/DetailRow.mjs +3 -3
- package/dist/EmptyState.d.mts +4 -4
- package/dist/EmptyState.d.ts +4 -4
- package/dist/EmptyState.js +31 -29
- package/dist/EmptyState.mjs +6 -6
- package/dist/ErrorBoundary.d.mts +9 -7
- package/dist/ErrorBoundary.d.ts +9 -7
- package/dist/ErrorBoundary.js +33 -29
- package/dist/ErrorBoundary.mjs +5 -5
- package/dist/Form.d.mts +9 -9
- package/dist/Form.d.ts +9 -9
- package/dist/Form.mjs +2 -2
- package/dist/HolographicCard.d.mts +2 -2
- package/dist/HolographicCard.d.ts +2 -2
- package/dist/HolographicCard.js +23 -14
- package/dist/HolographicCard.mjs +2 -2
- package/dist/IconButton.d.mts +4 -4
- package/dist/IconButton.d.ts +4 -4
- package/dist/IconButton.js +30 -27
- package/dist/IconButton.mjs +4 -4
- package/dist/IconPicker.d.mts +2 -2
- package/dist/IconPicker.d.ts +2 -2
- package/dist/IconPicker.js +40 -45
- package/dist/IconPicker.mjs +6 -6
- package/dist/Image.d.mts +18 -0
- package/dist/Image.d.ts +18 -0
- package/dist/Image.js +53 -0
- package/dist/Image.mjs +2 -0
- package/dist/ImageUpload.d.mts +2 -2
- package/dist/ImageUpload.d.ts +2 -2
- package/dist/ImageUpload.js +24 -15
- package/dist/ImageUpload.mjs +5 -5
- package/dist/ImageViewer.d.mts +2 -2
- package/dist/ImageViewer.d.ts +2 -2
- package/dist/ImageViewer.js +31 -28
- package/dist/ImageViewer.mjs +6 -6
- package/dist/Input.d.mts +4 -4
- package/dist/Input.d.ts +4 -4
- package/dist/Input.js +7 -13
- package/dist/Input.mjs +3 -3
- package/dist/ItemGroup.d.mts +23 -0
- package/dist/ItemGroup.d.ts +23 -0
- package/dist/{ListGroup.js → ItemGroup.js} +11 -13
- package/dist/ItemGroup.mjs +4 -0
- package/dist/LabelValue.d.mts +4 -4
- package/dist/LabelValue.d.ts +4 -4
- package/dist/LabelValue.js +7 -13
- package/dist/LabelValue.mjs +3 -3
- package/dist/ListItem.d.mts +6 -6
- package/dist/ListItem.d.ts +6 -6
- package/dist/ListItem.js +30 -27
- package/dist/ListItem.mjs +5 -5
- package/dist/MediaCard.d.mts +6 -6
- package/dist/MediaCard.d.ts +6 -6
- package/dist/MediaCard.js +30 -27
- package/dist/MediaCard.mjs +5 -5
- package/dist/MenuItem.d.mts +5 -5
- package/dist/MenuItem.d.ts +5 -5
- package/dist/MenuItem.js +30 -27
- package/dist/MenuItem.mjs +5 -5
- package/dist/MonthPicker.d.mts +2 -2
- package/dist/MonthPicker.d.ts +2 -2
- package/dist/MonthPicker.js +23 -14
- package/dist/MonthPicker.mjs +3 -3
- package/dist/NumberStepper.d.mts +3 -3
- package/dist/NumberStepper.d.ts +3 -3
- package/dist/NumberStepper.js +30 -27
- package/dist/NumberStepper.mjs +5 -5
- package/dist/PagerDots.d.mts +2 -2
- package/dist/PagerDots.d.ts +2 -2
- package/dist/PagerDots.js +30 -27
- package/dist/PagerDots.mjs +4 -4
- package/dist/Pressable.d.mts +3 -27
- package/dist/Pressable.d.ts +3 -27
- package/dist/Pressable.js +23 -14
- package/dist/Pressable.mjs +2 -2
- package/dist/PricingCard.d.mts +2 -2
- package/dist/PricingCard.d.ts +2 -2
- package/dist/PricingCard.js +31 -29
- package/dist/PricingCard.mjs +7 -7
- package/dist/Progress.d.mts +2 -2
- package/dist/Progress.d.ts +2 -2
- package/dist/Progress.mjs +2 -2
- package/dist/RadioGroup.d.mts +2 -2
- package/dist/RadioGroup.d.ts +2 -2
- package/dist/RadioGroup.js +23 -14
- package/dist/RadioGroup.mjs +3 -3
- package/dist/RetrayProvider.d.mts +1 -1
- package/dist/RetrayProvider.d.ts +1 -1
- package/dist/RetrayProvider.js +14 -34
- package/dist/RetrayProvider.mjs +3 -3
- package/dist/ScreenContainer.d.mts +24 -0
- package/dist/ScreenContainer.d.ts +24 -0
- package/dist/ScreenContainer.js +85 -0
- package/dist/ScreenContainer.mjs +3 -0
- package/dist/Select.d.mts +2 -2
- package/dist/Select.d.ts +2 -2
- package/dist/Select.js +38 -45
- package/dist/Select.mjs +3 -3
- package/dist/SelectableCard.d.mts +5 -5
- package/dist/SelectableCard.d.ts +5 -5
- package/dist/SelectableCard.js +30 -27
- package/dist/SelectableCard.mjs +5 -5
- package/dist/SelectableGrid.d.mts +5 -4
- package/dist/SelectableGrid.d.ts +5 -4
- package/dist/SelectableGrid.js +80 -44
- package/dist/SelectableGrid.mjs +5 -5
- package/dist/Separator.d.mts +4 -2
- package/dist/Separator.d.ts +4 -2
- package/dist/Separator.js +29 -1
- package/dist/Separator.mjs +3 -2
- package/dist/Sheet.d.mts +10 -10
- package/dist/Sheet.d.ts +10 -10
- package/dist/Sheet.js +59 -44
- package/dist/Sheet.mjs +4 -3
- package/dist/SheetSelect.d.mts +2 -2
- package/dist/SheetSelect.d.ts +2 -2
- package/dist/SheetSelect.js +30 -27
- package/dist/SheetSelect.mjs +5 -5
- package/dist/Skeleton.d.mts +5 -5
- package/dist/Skeleton.d.ts +5 -5
- package/dist/Skeleton.mjs +3 -3
- package/dist/Slider.d.mts +2 -2
- package/dist/Slider.d.ts +2 -2
- package/dist/Slider.js +23 -14
- package/dist/Slider.mjs +3 -3
- package/dist/Spinner.d.mts +2 -2
- package/dist/Spinner.d.ts +2 -2
- package/dist/Spinner.mjs +2 -2
- package/dist/Stats.d.mts +6 -6
- package/dist/Stats.d.ts +6 -6
- package/dist/Stats.js +30 -27
- package/dist/Stats.mjs +5 -5
- package/dist/Switch.d.mts +2 -2
- package/dist/Switch.d.ts +2 -2
- package/dist/Switch.js +23 -14
- package/dist/Switch.mjs +3 -3
- package/dist/TabBar.d.mts +3 -3
- package/dist/TabBar.d.ts +3 -3
- package/dist/TabBar.js +30 -27
- package/dist/TabBar.mjs +4 -4
- package/dist/Tabs.d.mts +13 -13
- package/dist/Tabs.d.ts +13 -13
- package/dist/Tabs.js +23 -14
- package/dist/Tabs.mjs +3 -3
- package/dist/Text.d.mts +4 -4
- package/dist/Text.d.ts +4 -4
- package/dist/Text.js +20 -2
- package/dist/Text.mjs +3 -3
- package/dist/Textarea.d.mts +3 -3
- package/dist/Textarea.d.ts +3 -3
- package/dist/Textarea.js +7 -13
- package/dist/Textarea.mjs +3 -3
- package/dist/Toast.d.mts +4 -4
- package/dist/Toast.d.ts +4 -4
- package/dist/Toast.mjs +2 -2
- package/dist/Toggle.d.mts +4 -4
- package/dist/Toggle.d.ts +4 -4
- package/dist/Toggle.js +30 -27
- package/dist/Toggle.mjs +4 -4
- package/dist/VirtualizedList.d.mts +28 -0
- package/dist/VirtualizedList.d.ts +28 -0
- package/dist/VirtualizedList.js +130 -0
- package/dist/VirtualizedList.mjs +3 -0
- package/dist/{chunk-MZ6WRTD2.mjs → chunk-24JTXQ2M.mjs} +7 -13
- package/dist/{chunk-OBV72JD4.mjs → chunk-2DDJ53DK.mjs} +9 -11
- package/dist/{chunk-H6MQL7PS.mjs → chunk-2J5OZOMX.mjs} +12 -6
- package/dist/{chunk-4NQFTHN3.mjs → chunk-3GE4UFV5.mjs} +2 -2
- package/dist/{chunk-KAGADD2O.mjs → chunk-3RIZCKRM.mjs} +2 -2
- package/dist/{chunk-DE25XTVQ.mjs → chunk-3VHFOSZR.mjs} +2 -2
- package/dist/{chunk-C5ZRMR2E.mjs → chunk-4PF4LKNT.mjs} +2 -2
- package/dist/{chunk-5MYNAAFE.mjs → chunk-5J7VKFSZ.mjs} +4 -4
- package/dist/{chunk-E2PONRJG.mjs → chunk-5TNQ573V.mjs} +2 -2
- package/dist/{chunk-CZN6L2QU.mjs → chunk-6T2DVIQT.mjs} +4 -4
- package/dist/{chunk-L3YKPTJQ.mjs → chunk-7CE6PDCQ.mjs} +2 -2
- package/dist/{chunk-Y6YS33GM.mjs → chunk-AHFEAY6M.mjs} +4 -4
- package/dist/{chunk-77UOVFIS.mjs → chunk-AZRATPNP.mjs} +2 -2
- package/dist/{chunk-UMZTPUB3.mjs → chunk-BGXOEFDM.mjs} +6 -31
- package/dist/{chunk-KC5QDYGZ.mjs → chunk-BMAAAJWN.mjs} +2 -2
- package/dist/{chunk-IJCMPVW5.mjs → chunk-BQMJQMWY.mjs} +2 -2
- package/dist/{chunk-COA2YZOX.mjs → chunk-BTPCY4C7.mjs} +4 -4
- package/dist/chunk-BVJAYPAD.mjs +55 -0
- package/dist/{chunk-RA6SAAFE.mjs → chunk-BWLVX2SQ.mjs} +4 -4
- package/dist/{chunk-HHOOFDBA.mjs → chunk-CCEM3HIJ.mjs} +5 -5
- package/dist/chunk-CTUFFKGS.mjs +30 -0
- package/dist/{chunk-EHGBHFMH.mjs → chunk-CYGYC7XT.mjs} +8 -4
- package/dist/{chunk-ESQDPO5E.mjs → chunk-DLAOTHHS.mjs} +7 -6
- package/dist/{chunk-QY3X2UYR.mjs → chunk-DYYPDQA2.mjs} +21 -7
- package/dist/{chunk-S44XWTTC.mjs → chunk-E4BJ5WXG.mjs} +3 -3
- package/dist/{chunk-HUSSF6TF.mjs → chunk-EQNCMDZC.mjs} +1 -1
- package/dist/{chunk-PI6RULJX.mjs → chunk-EQYTDFDD.mjs} +1 -1
- package/dist/{chunk-BULKGOIZ.mjs → chunk-FE26TPCI.mjs} +4 -4
- package/dist/{chunk-DBHSUUKU.mjs → chunk-FOUSI6JD.mjs} +1 -1
- package/dist/{chunk-KPTY7UYQ.mjs → chunk-GR7PKEKD.mjs} +1 -1
- package/dist/{chunk-RRKM4MKB.mjs → chunk-HLWGFBIF.mjs} +3 -3
- package/dist/chunk-HMKJGVXA.mjs +35 -0
- package/dist/{chunk-U6DEBYU5.mjs → chunk-IFGZUJFH.mjs} +3 -3
- package/dist/{chunk-2VIDP72N.mjs → chunk-K3V6OTVB.mjs} +1 -1
- package/dist/{chunk-K7TKID3V.mjs → chunk-K4YFTUMC.mjs} +3 -3
- package/dist/{chunk-NGEN2EES.mjs → chunk-MQAK2W6L.mjs} +14 -22
- package/dist/{chunk-CM2DG4MR.mjs → chunk-MSS3CD6F.mjs} +4 -4
- package/dist/{chunk-2QXJDRVU.mjs → chunk-NQYS6RPX.mjs} +4 -4
- package/dist/{chunk-62BBSSUF.mjs → chunk-P5KC3RTG.mjs} +1 -1
- package/dist/{chunk-K3QX2M26.mjs → chunk-PPKCGCZ3.mjs} +5 -5
- package/dist/{chunk-ITG4JQM3.mjs → chunk-QEE3EQ3N.mjs} +2 -2
- package/dist/{chunk-IDVUZIVY.mjs → chunk-RLPPRIJ7.mjs} +17 -33
- package/dist/{chunk-XCIG6HT2.mjs → chunk-S433IOQE.mjs} +2 -2
- package/dist/{chunk-IGU223UM.mjs → chunk-SWUZKVYO.mjs} +1 -1
- package/dist/{chunk-NPCBNGNE.mjs → chunk-T4KMKHTI.mjs} +55 -22
- package/dist/{chunk-7BZJRB77.mjs → chunk-UBTP4NPP.mjs} +4 -30
- package/dist/{chunk-TMH263OK.mjs → chunk-UEA2VYGW.mjs} +3 -3
- package/dist/chunk-VISIOH33.mjs +37 -0
- package/dist/{chunk-SZEKQAOY.mjs → chunk-VSKBODEY.mjs} +1 -1
- package/dist/{chunk-FTTI6T5Q.mjs → chunk-W422TEH2.mjs} +3 -3
- package/dist/{chunk-WIPEDNSD.mjs → chunk-WD5LBXPR.mjs} +4 -4
- package/dist/chunk-WFNGSYS4.mjs +111 -0
- package/dist/chunk-WR6DCNAE.mjs +65 -0
- package/dist/{chunk-ERWJPVX7.mjs → chunk-XKBB2UZU.mjs} +2 -2
- package/dist/{chunk-422IVD3H.mjs → chunk-Y5TPAKOS.mjs} +13 -17
- package/dist/{chunk-AZV7KNJI.mjs → chunk-YKWIMVGU.mjs} +2 -2
- package/dist/{chunk-ZKDKKQCE.mjs → chunk-YOXSXHDE.mjs} +4 -4
- package/dist/{chunk-PGQ6FMXS.mjs → chunk-ZO5BRTCW.mjs} +2 -2
- package/dist/{chunk-KSSVIFYR.mjs → chunk-ZQGCQ7SA.mjs} +14 -34
- package/dist/{chunk-ZTPYUU5C.mjs → chunk-ZRUUUVOO.mjs} +3 -3
- package/dist/{index-CY34hxPN.d.mts → index-CinAt5Uo.d.mts} +3 -3
- package/dist/{index-CY34hxPN.d.ts → index-CinAt5Uo.d.ts} +3 -3
- package/dist/index.d.mts +68 -18
- package/dist/index.d.ts +68 -18
- package/dist/index.js +965 -825
- package/dist/index.mjs +76 -69
- package/package.json +3 -2
- package/src/components/Accordion/Accordion.tsx +9 -18
- package/src/components/AppHeader/AppHeader.tsx +9 -1
- package/src/components/ConfirmDialog/ConfirmDialog.tsx +4 -34
- package/src/components/ErrorBoundary/ErrorBoundary.tsx +5 -2
- package/src/components/Image/Image.tsx +50 -0
- package/src/components/Image/index.ts +2 -0
- package/src/components/ImageUpload/ImageUpload.tsx +1 -1
- package/src/components/{ListGroup/ListGroup.tsx → ItemGroup/ItemGroup.tsx} +15 -29
- package/src/components/ItemGroup/index.ts +2 -0
- package/src/components/ListGroup/index.tsx +20 -0
- package/src/components/MenuGroup/index.tsx +20 -0
- package/src/components/Pressable/Pressable.tsx +0 -24
- package/src/components/ScreenContainer/ScreenContainer.tsx +94 -0
- package/src/components/ScreenContainer/index.ts +2 -0
- package/src/components/Select/Select.tsx +22 -30
- package/src/components/SelectableGrid/SelectableGrid.tsx +51 -19
- package/src/components/Separator/Separator.tsx +35 -2
- package/src/components/Sheet/Sheet.tsx +3 -34
- package/src/components/Tabs/Tabs.tsx +9 -9
- package/src/components/Tabs/index.ts +1 -1
- package/src/components/Text/Text.tsx +6 -0
- package/src/components/VirtualizedList/VirtualizedList.tsx +154 -0
- package/src/components/VirtualizedList/index.ts +2 -0
- package/src/hooks/useConfirmDialog.ts +2 -11
- package/src/hooks/useSheetModal.ts +40 -0
- package/src/index.ts +5 -1
- package/src/theme/colors.ts +19 -57
- package/src/tokens.ts +21 -7
- package/src/utils/curatedIcons.ts +9 -18
- package/src/utils/haptics.ts +10 -21
- package/src/utils/icons.ts +7 -14
- package/dist/ListGroup.d.mts +0 -34
- package/dist/ListGroup.d.ts +0 -34
- package/dist/ListGroup.mjs +0 -4
- package/dist/MenuGroup.d.mts +0 -34
- package/dist/MenuGroup.d.ts +0 -34
- package/dist/MenuGroup.js +0 -106
- package/dist/MenuGroup.mjs +0 -4
- package/dist/chunk-ARONDO7M.mjs +0 -40
- package/dist/chunk-EW2FIDSM.mjs +0 -29
- package/dist/chunk-S2VGME7X.mjs +0 -82
- package/src/components/ListGroup/index.ts +0 -1
- package/src/components/MenuGroup/MenuGroup.tsx +0 -145
- package/src/components/MenuGroup/index.ts +0 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React55 = require('react');
|
|
4
4
|
var reactNative = require('react-native');
|
|
5
5
|
var reactNativeEase = require('react-native-ease');
|
|
6
|
+
var Haptics = require('expo-haptics');
|
|
6
7
|
var reactNativeSizeMatters = require('react-native-size-matters');
|
|
7
8
|
var AntDesign = require('@expo/vector-icons/AntDesign');
|
|
8
9
|
var Entypo = require('@expo/vector-icons/Entypo');
|
|
@@ -25,7 +26,26 @@ var reactNativeGestureHandler = require('react-native-gesture-handler');
|
|
|
25
26
|
|
|
26
27
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
function _interopNamespace(e) {
|
|
30
|
+
if (e && e.__esModule) return e;
|
|
31
|
+
var n = Object.create(null);
|
|
32
|
+
if (e) {
|
|
33
|
+
Object.keys(e).forEach(function (k) {
|
|
34
|
+
if (k !== 'default') {
|
|
35
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
36
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () { return e[k]; }
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
n.default = e;
|
|
44
|
+
return Object.freeze(n);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
var React55__default = /*#__PURE__*/_interopDefault(React55);
|
|
48
|
+
var Haptics__namespace = /*#__PURE__*/_interopNamespace(Haptics);
|
|
29
49
|
var AntDesign__default = /*#__PURE__*/_interopDefault(AntDesign);
|
|
30
50
|
var Entypo__default = /*#__PURE__*/_interopDefault(Entypo);
|
|
31
51
|
var Feather__default = /*#__PURE__*/_interopDefault(Feather);
|
|
@@ -61,23 +81,6 @@ function componentToHex(c) {
|
|
|
61
81
|
function rgbToHex(r, g, b) {
|
|
62
82
|
return `#${componentToHex(r)}${componentToHex(g)}${componentToHex(b)}`;
|
|
63
83
|
}
|
|
64
|
-
function withAlphaOnWhite(hex, alpha) {
|
|
65
|
-
const rgb = hexToRgb(hex);
|
|
66
|
-
if (!rgb) return hex;
|
|
67
|
-
const r = rgb.r * alpha + 255 * (1 - alpha);
|
|
68
|
-
const g = rgb.g * alpha + 255 * (1 - alpha);
|
|
69
|
-
const b = rgb.b * alpha + 255 * (1 - alpha);
|
|
70
|
-
return rgbToHex(r, g, b);
|
|
71
|
-
}
|
|
72
|
-
function withAlphaOnDark(hex, alpha, bgHex = "#0f0f0f") {
|
|
73
|
-
const rgb = hexToRgb(hex);
|
|
74
|
-
const bg = hexToRgb(bgHex);
|
|
75
|
-
if (!rgb || !bg) return hex;
|
|
76
|
-
const r = rgb.r * alpha + bg.r * (1 - alpha);
|
|
77
|
-
const g = rgb.g * alpha + bg.g * (1 - alpha);
|
|
78
|
-
const b = rgb.b * alpha + bg.b * (1 - alpha);
|
|
79
|
-
return rgbToHex(r, g, b);
|
|
80
|
-
}
|
|
81
84
|
function mixWithBackground(fgHex, bgHex, opacity) {
|
|
82
85
|
const fg = hexToRgb(fgHex);
|
|
83
86
|
const bg = hexToRgb(bgHex);
|
|
@@ -87,13 +90,11 @@ function mixWithBackground(fgHex, bgHex, opacity) {
|
|
|
87
90
|
const b = fg.b * opacity + bg.b * (1 - opacity);
|
|
88
91
|
return rgbToHex(r, g, b);
|
|
89
92
|
}
|
|
90
|
-
function
|
|
91
|
-
return
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
if (!rgb) return hex;
|
|
96
|
-
return rgbToHex(rgb.r * (1 - amount), rgb.g * (1 - amount), rgb.b * (1 - amount));
|
|
93
|
+
function createColorPair(fg, bg, dark) {
|
|
94
|
+
return {
|
|
95
|
+
tint: mixWithBackground(fg, dark ? bg : "#ffffff", dark ? 0.15 : 0.08),
|
|
96
|
+
border: mixWithBackground(fg, dark ? bg : "#ffffff", dark ? 0.45 : 0.3)
|
|
97
|
+
};
|
|
97
98
|
}
|
|
98
99
|
var defaultLight = {
|
|
99
100
|
background: "#ffffff",
|
|
@@ -136,17 +137,16 @@ var defaultDark = {
|
|
|
136
137
|
function deriveColors(t, scheme) {
|
|
137
138
|
const dark = scheme === "dark";
|
|
138
139
|
const bg = t.background;
|
|
140
|
+
const WHITE = "#ffffff";
|
|
141
|
+
const BLACK = "#000000";
|
|
139
142
|
const foregroundSubtle = mixWithBackground(t.foreground, bg, 0.7);
|
|
140
143
|
const foregroundMuted = mixWithBackground(t.foreground, bg, 0.62);
|
|
141
|
-
const surface = dark ?
|
|
142
|
-
const surfaceStrong = dark ?
|
|
143
|
-
const skeleton = dark ?
|
|
144
|
-
const destructiveTint
|
|
145
|
-
const
|
|
146
|
-
const
|
|
147
|
-
const successBorder = dark ? withAlphaOnDark(t.success, 0.45, bg) : withAlphaOnWhite(t.success, 0.3);
|
|
148
|
-
const warningTint = dark ? withAlphaOnDark(t.warning, 0.15, bg) : withAlphaOnWhite(t.warning, 0.08);
|
|
149
|
-
const warningBorder = dark ? withAlphaOnDark(t.warning, 0.45, bg) : withAlphaOnWhite(t.warning, 0.3);
|
|
144
|
+
const surface = dark ? mixWithBackground(bg, BLACK, 0.94) : mixWithBackground(bg, BLACK, 0.96);
|
|
145
|
+
const surfaceStrong = dark ? mixWithBackground(bg, BLACK, 0.88) : mixWithBackground(bg, BLACK, 0.92);
|
|
146
|
+
const skeleton = dark ? mixWithBackground(bg, BLACK, 0.9) : mixWithBackground(bg, BLACK, 0.9);
|
|
147
|
+
const { tint: destructiveTint, border: destructiveBorder } = createColorPair(t.destructive, bg, dark);
|
|
148
|
+
const { tint: successTint, border: successBorder } = createColorPair(t.success, bg, dark);
|
|
149
|
+
const { tint: warningTint, border: warningBorder } = createColorPair(t.warning, bg, dark);
|
|
150
150
|
return {
|
|
151
151
|
...t,
|
|
152
152
|
foregroundSubtle,
|
|
@@ -165,64 +165,53 @@ function deriveColors(t, scheme) {
|
|
|
165
165
|
accentForegroundResolved: t.accentForeground ?? t.primaryForeground,
|
|
166
166
|
ring: t.accent ?? t.primary,
|
|
167
167
|
input: t.border,
|
|
168
|
-
separator: dark ?
|
|
168
|
+
separator: dark ? mixWithBackground(t.border, WHITE, 0.78) : mixWithBackground(t.border, BLACK, 0.84)
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
171
|
|
|
172
172
|
// src/theme/ThemeProvider.tsx
|
|
173
|
-
var ThemeContext =
|
|
173
|
+
var ThemeContext = React55.createContext(void 0);
|
|
174
174
|
function ThemeProvider({ children, theme, colorScheme = "system" }) {
|
|
175
175
|
const systemScheme = reactNative.useColorScheme() ?? "light";
|
|
176
176
|
const resolvedScheme = colorScheme === "system" ? systemScheme : colorScheme;
|
|
177
|
-
const colors =
|
|
177
|
+
const colors = React55.useMemo(() => {
|
|
178
178
|
const base = resolvedScheme === "dark" ? defaultDark : defaultLight;
|
|
179
179
|
const override = resolvedScheme === "dark" ? theme?.dark : theme?.light;
|
|
180
180
|
const merged = override ? { ...base, ...override } : base;
|
|
181
181
|
return deriveColors(merged, resolvedScheme);
|
|
182
182
|
}, [resolvedScheme, theme]);
|
|
183
|
-
return /* @__PURE__ */
|
|
183
|
+
return /* @__PURE__ */ React55__default.default.createElement(ThemeContext.Provider, { value: { colors, colorScheme: resolvedScheme } }, children);
|
|
184
184
|
}
|
|
185
185
|
function useTheme() {
|
|
186
|
-
const context =
|
|
186
|
+
const context = React55.useContext(ThemeContext);
|
|
187
187
|
if (!context) {
|
|
188
188
|
throw new Error("useTheme must be used within a ThemeProvider");
|
|
189
189
|
}
|
|
190
190
|
return context;
|
|
191
191
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
async function getHaptics() {
|
|
195
|
-
if (reactNative.Platform.OS === "web") return null;
|
|
196
|
-
if (!_loaded) {
|
|
197
|
-
_loaded = true;
|
|
198
|
-
try {
|
|
199
|
-
_haptics = await import('expo-haptics');
|
|
200
|
-
} catch {
|
|
201
|
-
_haptics = null;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
return _haptics;
|
|
192
|
+
function maybeHaptics() {
|
|
193
|
+
return reactNative.Platform.OS === "web" ? null : Haptics__namespace;
|
|
205
194
|
}
|
|
206
195
|
function selectionAsync() {
|
|
207
|
-
|
|
196
|
+
maybeHaptics()?.selectionAsync();
|
|
208
197
|
}
|
|
209
198
|
function impactLight() {
|
|
210
|
-
|
|
199
|
+
maybeHaptics()?.impactAsync(Haptics__namespace.ImpactFeedbackStyle.Light);
|
|
211
200
|
}
|
|
212
201
|
function impactMedium() {
|
|
213
|
-
|
|
202
|
+
maybeHaptics()?.impactAsync(Haptics__namespace.ImpactFeedbackStyle.Medium);
|
|
214
203
|
}
|
|
215
204
|
function impactHeavy() {
|
|
216
|
-
|
|
205
|
+
maybeHaptics()?.impactAsync(Haptics__namespace.ImpactFeedbackStyle.Heavy);
|
|
217
206
|
}
|
|
218
207
|
function notificationSuccess() {
|
|
219
|
-
|
|
208
|
+
maybeHaptics()?.notificationAsync(Haptics__namespace.NotificationFeedbackType.Success);
|
|
220
209
|
}
|
|
221
210
|
function notificationError() {
|
|
222
|
-
|
|
211
|
+
maybeHaptics()?.notificationAsync(Haptics__namespace.NotificationFeedbackType.Error);
|
|
223
212
|
}
|
|
224
213
|
function notificationWarning() {
|
|
225
|
-
|
|
214
|
+
maybeHaptics()?.notificationAsync(Haptics__namespace.NotificationFeedbackType.Warning);
|
|
226
215
|
}
|
|
227
216
|
var isWeb = reactNative.Platform.OS === "web";
|
|
228
217
|
var s = isWeb ? (n) => n : reactNativeSizeMatters.scale;
|
|
@@ -237,26 +226,20 @@ var ALL_FAMILIES = [
|
|
|
237
226
|
{ name: "MaterialIcons", component: MaterialIcons__default.default },
|
|
238
227
|
{ name: "Ionicons", component: Ionicons__default.default }
|
|
239
228
|
];
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
try {
|
|
246
|
-
entry.glyphMap = entry.component.glyphMap;
|
|
247
|
-
} catch {
|
|
248
|
-
entry.glyphMap = {};
|
|
249
|
-
}
|
|
229
|
+
function getGlyphMap(component) {
|
|
230
|
+
try {
|
|
231
|
+
return component.glyphMap ?? {};
|
|
232
|
+
} catch {
|
|
233
|
+
return {};
|
|
250
234
|
}
|
|
251
235
|
}
|
|
252
236
|
function Icon({ name, size, color, family }) {
|
|
253
|
-
ensureGlyphCache();
|
|
254
237
|
const entry = family ? ALL_FAMILIES.find((f) => f.name === family) : ALL_FAMILIES.find((f) => {
|
|
255
|
-
const glyphMap = f.
|
|
256
|
-
return
|
|
238
|
+
const glyphMap = getGlyphMap(f.component);
|
|
239
|
+
return name in glyphMap;
|
|
257
240
|
});
|
|
258
241
|
if (!entry) return null;
|
|
259
|
-
return
|
|
242
|
+
return React55__default.default.createElement(entry.component, { name, size, color });
|
|
260
243
|
}
|
|
261
244
|
|
|
262
245
|
// src/tokens.ts
|
|
@@ -304,17 +287,17 @@ var SHADOWS = {
|
|
|
304
287
|
},
|
|
305
288
|
lg: {
|
|
306
289
|
shadowColor: "#000",
|
|
307
|
-
shadowOffset: { width: 0, height:
|
|
308
|
-
shadowOpacity: 0.
|
|
309
|
-
shadowRadius:
|
|
310
|
-
elevation:
|
|
290
|
+
shadowOffset: { width: 0, height: 4 },
|
|
291
|
+
shadowOpacity: 0.12,
|
|
292
|
+
shadowRadius: 12,
|
|
293
|
+
elevation: 8
|
|
311
294
|
},
|
|
312
295
|
xl: {
|
|
313
296
|
shadowColor: "#000",
|
|
314
|
-
shadowOffset: { width: 0, height:
|
|
315
|
-
shadowOpacity: 0.
|
|
297
|
+
shadowOffset: { width: 0, height: 8 },
|
|
298
|
+
shadowOpacity: 0.18,
|
|
316
299
|
shadowRadius: 24,
|
|
317
|
-
elevation:
|
|
300
|
+
elevation: 16
|
|
318
301
|
}
|
|
319
302
|
};
|
|
320
303
|
var BREAKPOINTS = {
|
|
@@ -446,6 +429,20 @@ var TYPOGRAPHY = {
|
|
|
446
429
|
fontWeight: "500",
|
|
447
430
|
lineHeight: 18,
|
|
448
431
|
letterSpacing: 0
|
|
432
|
+
},
|
|
433
|
+
"code-sm": {
|
|
434
|
+
fontFamily: "SohneMono-Regular",
|
|
435
|
+
fontSize: 13,
|
|
436
|
+
fontWeight: "400",
|
|
437
|
+
lineHeight: 18,
|
|
438
|
+
letterSpacing: 0
|
|
439
|
+
},
|
|
440
|
+
"code-md": {
|
|
441
|
+
fontFamily: "SohneMono-Regular",
|
|
442
|
+
fontSize: 15,
|
|
443
|
+
fontWeight: "400",
|
|
444
|
+
lineHeight: 22,
|
|
445
|
+
letterSpacing: 0
|
|
449
446
|
}
|
|
450
447
|
};
|
|
451
448
|
var makePressable = (scale2) => pressto.createAnimatedPressable((progress) => {
|
|
@@ -532,12 +529,12 @@ function ButtonBase({
|
|
|
532
529
|
destructive: colors.destructiveForeground
|
|
533
530
|
}[variant];
|
|
534
531
|
const textColor = iconColor ?? labelColor;
|
|
535
|
-
const effectiveIcon = iconName ? /* @__PURE__ */
|
|
532
|
+
const effectiveIcon = iconName ? /* @__PURE__ */ React55__default.default.createElement(Icon, { name: iconName, size: iconSizeMap[size], color: textColor }) : typeof icon === "function" ? icon({ label, size, variant, color: textColor }) : icon;
|
|
536
533
|
const spinnerColor = isDisabled ? colors.foregroundMuted : variant === "destructive" ? colors.destructiveForeground : variant === "primary" ? colors.primaryForeground : colors.accentResolved;
|
|
537
534
|
const styleArray = Array.isArray(style) ? style : style ? [style] : [];
|
|
538
535
|
const flatStyle = reactNative.StyleSheet.flatten(styleArray);
|
|
539
536
|
const { flex, ...restStyle } = flatStyle || {};
|
|
540
|
-
return /* @__PURE__ */
|
|
537
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [fullWidth && styles.fullWidth, flex !== void 0 && { flex }] }, /* @__PURE__ */ React55__default.default.createElement(
|
|
541
538
|
PressableButton,
|
|
542
539
|
{
|
|
543
540
|
enabled: !isDisabled,
|
|
@@ -550,7 +547,7 @@ function ButtonBase({
|
|
|
550
547
|
accessibilityHint,
|
|
551
548
|
accessibilityState: { disabled: isDisabled, busy: loading }
|
|
552
549
|
},
|
|
553
|
-
/* @__PURE__ */
|
|
550
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
554
551
|
reactNativeEase.EaseView,
|
|
555
552
|
{
|
|
556
553
|
style: [
|
|
@@ -563,7 +560,7 @@ function ButtonBase({
|
|
|
563
560
|
animate: { backgroundColor: animateBgColor, borderColor: animateBorderColor },
|
|
564
561
|
transition: COLOR_TRANSITION
|
|
565
562
|
},
|
|
566
|
-
loading ? /* @__PURE__ */
|
|
563
|
+
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(
|
|
567
564
|
reactNative.Text,
|
|
568
565
|
{
|
|
569
566
|
style: [styles.label, { color: labelColor }, labelSizeStyles[size], styles.labelLoading],
|
|
@@ -571,7 +568,7 @@ function ButtonBase({
|
|
|
571
568
|
numberOfLines: 1
|
|
572
569
|
},
|
|
573
570
|
label
|
|
574
|
-
)) : /* @__PURE__ */
|
|
571
|
+
)) : /* @__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(
|
|
575
572
|
reactNative.Text,
|
|
576
573
|
{
|
|
577
574
|
style: [styles.label, { color: labelColor }, labelSizeStyles[size], effectiveIcon ? styles.labelWithIcon : void 0],
|
|
@@ -579,11 +576,11 @@ function ButtonBase({
|
|
|
579
576
|
numberOfLines: 1
|
|
580
577
|
},
|
|
581
578
|
label
|
|
582
|
-
), effectiveIcon && iconPosition === "right" && /* @__PURE__ */
|
|
579
|
+
), effectiveIcon && iconPosition === "right" && /* @__PURE__ */ React55__default.default.createElement(React55__default.default.Fragment, null, effectiveIcon))
|
|
583
580
|
)
|
|
584
581
|
));
|
|
585
582
|
}
|
|
586
|
-
var Button =
|
|
583
|
+
var Button = React55__default.default.memo(ButtonBase);
|
|
587
584
|
var styles = reactNative.StyleSheet.create({
|
|
588
585
|
base: {
|
|
589
586
|
borderRadius: RADIUS.md,
|
|
@@ -606,7 +603,7 @@ var styles = reactNative.StyleSheet.create({
|
|
|
606
603
|
}
|
|
607
604
|
});
|
|
608
605
|
function ButtonGroup({ children, gap = 12, vertical = false, style }) {
|
|
609
|
-
return /* @__PURE__ */
|
|
606
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
610
607
|
reactNative.View,
|
|
611
608
|
{
|
|
612
609
|
style: [
|
|
@@ -616,8 +613,8 @@ function ButtonGroup({ children, gap = 12, vertical = false, style }) {
|
|
|
616
613
|
style
|
|
617
614
|
]
|
|
618
615
|
},
|
|
619
|
-
|
|
620
|
-
if (!
|
|
616
|
+
React55__default.default.Children.map(children, (child) => {
|
|
617
|
+
if (!React55__default.default.isValidElement(child)) return child;
|
|
621
618
|
const childProps = child.props;
|
|
622
619
|
const extraProps = {
|
|
623
620
|
style: [child.props.style, { flex: 1 }]
|
|
@@ -625,7 +622,7 @@ function ButtonGroup({ children, gap = 12, vertical = false, style }) {
|
|
|
625
622
|
if (!vertical && "label" in childProps && childProps["size"] === void 0) {
|
|
626
623
|
extraProps["size"] = "sm";
|
|
627
624
|
}
|
|
628
|
-
return
|
|
625
|
+
return React55__default.default.cloneElement(child, extraProps);
|
|
629
626
|
})
|
|
630
627
|
);
|
|
631
628
|
}
|
|
@@ -682,11 +679,11 @@ function IconButtonBase({
|
|
|
682
679
|
}[variant];
|
|
683
680
|
const spinnerColor = variant === "destructive" ? colors.destructiveForeground : variant === "primary" ? colors.primaryForeground : colors.foreground;
|
|
684
681
|
const { container: containerSize, icon: iconSize } = sizeMap[size];
|
|
685
|
-
const resolvedIcon = iconName ? /* @__PURE__ */
|
|
682
|
+
const resolvedIcon = iconName ? /* @__PURE__ */ React55__default.default.createElement(Icon, { name: iconName, size: iconSize, color: iconColor ?? defaultIconColor }) : icon;
|
|
686
683
|
const showBadge = badge !== void 0 && badge !== false && badge !== 0;
|
|
687
684
|
const badgeCount = typeof badge === "number" ? Math.min(badge, 99) : null;
|
|
688
685
|
const showCount = typeof badge === "number" && badge > 0;
|
|
689
|
-
return /* @__PURE__ */
|
|
686
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles3.wrapper }, /* @__PURE__ */ React55__default.default.createElement(
|
|
690
687
|
PressableButton,
|
|
691
688
|
{
|
|
692
689
|
style: [
|
|
@@ -706,14 +703,14 @@ function IconButtonBase({
|
|
|
706
703
|
accessibilityHint,
|
|
707
704
|
accessibilityState: { disabled: isDisabled, busy: loading }
|
|
708
705
|
},
|
|
709
|
-
loading ? /* @__PURE__ */
|
|
710
|
-
), showBadge && /* @__PURE__ */
|
|
706
|
+
loading ? /* @__PURE__ */ React55__default.default.createElement(reactNative.ActivityIndicator, { size: "small", color: spinnerColor }) : resolvedIcon
|
|
707
|
+
), showBadge && /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [
|
|
711
708
|
styles3.badge,
|
|
712
709
|
{ backgroundColor: colors.primary },
|
|
713
710
|
showCount ? styles3.badgeCount : styles3.badgeDot
|
|
714
|
-
] }, showCount && /* @__PURE__ */
|
|
711
|
+
] }, showCount && /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles3.badgeText, { color: colors.primaryForeground }] }, badgeCount)));
|
|
715
712
|
}
|
|
716
|
-
var IconButton =
|
|
713
|
+
var IconButton = React55__default.default.memo(IconButtonBase);
|
|
717
714
|
var styles3 = reactNative.StyleSheet.create({
|
|
718
715
|
wrapper: {
|
|
719
716
|
alignSelf: "flex-start"
|
|
@@ -766,7 +763,9 @@ var variantStyles = {
|
|
|
766
763
|
"micro-label": { ...TYPOGRAPHY["micro-label"], fontSize: ms(TYPOGRAPHY["micro-label"].fontSize), lineHeight: mvs(TYPOGRAPHY["micro-label"].lineHeight) },
|
|
767
764
|
"uppercase-tag": { ...TYPOGRAPHY["uppercase-tag"], fontSize: ms(TYPOGRAPHY["uppercase-tag"].fontSize), lineHeight: mvs(TYPOGRAPHY["uppercase-tag"].lineHeight) },
|
|
768
765
|
"button-lg": { ...TYPOGRAPHY["button-lg"], fontSize: ms(TYPOGRAPHY["button-lg"].fontSize), lineHeight: mvs(TYPOGRAPHY["button-lg"].lineHeight) },
|
|
769
|
-
"button-sm": { ...TYPOGRAPHY["button-sm"], fontSize: ms(TYPOGRAPHY["button-sm"].fontSize), lineHeight: mvs(TYPOGRAPHY["button-sm"].lineHeight) }
|
|
766
|
+
"button-sm": { ...TYPOGRAPHY["button-sm"], fontSize: ms(TYPOGRAPHY["button-sm"].fontSize), lineHeight: mvs(TYPOGRAPHY["button-sm"].lineHeight) },
|
|
767
|
+
"code-sm": { ...TYPOGRAPHY["code-sm"], fontSize: ms(TYPOGRAPHY["code-sm"].fontSize), lineHeight: mvs(TYPOGRAPHY["code-sm"].lineHeight) },
|
|
768
|
+
"code-md": { ...TYPOGRAPHY["code-md"], fontSize: ms(TYPOGRAPHY["code-md"].fontSize), lineHeight: mvs(TYPOGRAPHY["code-md"].lineHeight) }
|
|
770
769
|
};
|
|
771
770
|
var defaultColorVariant = {
|
|
772
771
|
"display-hero": "foreground",
|
|
@@ -785,7 +784,9 @@ var defaultColorVariant = {
|
|
|
785
784
|
"micro-label": "foreground",
|
|
786
785
|
"uppercase-tag": "foregroundMuted",
|
|
787
786
|
"button-lg": "foreground",
|
|
788
|
-
"button-sm": "foreground"
|
|
787
|
+
"button-sm": "foreground",
|
|
788
|
+
"code-sm": "foreground",
|
|
789
|
+
"code-md": "foreground"
|
|
789
790
|
};
|
|
790
791
|
var fontWarned = false;
|
|
791
792
|
function warnIfFontsMissing() {
|
|
@@ -800,7 +801,7 @@ function TextBase({ variant = "body-md", color, style, uppercase, children, ...p
|
|
|
800
801
|
const { colors } = useTheme();
|
|
801
802
|
const colorKey = defaultColorVariant[variant] ?? "foreground";
|
|
802
803
|
const resolvedColor = color ?? colors[colorKey];
|
|
803
|
-
return /* @__PURE__ */
|
|
804
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
804
805
|
reactNative.Text,
|
|
805
806
|
{
|
|
806
807
|
style: [variantStyles[variant], { color: resolvedColor }, uppercase && { textTransform: "uppercase" }, style],
|
|
@@ -810,19 +811,19 @@ function TextBase({ variant = "body-md", color, style, uppercase, children, ...p
|
|
|
810
811
|
children
|
|
811
812
|
);
|
|
812
813
|
}
|
|
813
|
-
var Text3 =
|
|
814
|
+
var Text3 = React55__default.default.memo(TextBase);
|
|
814
815
|
var webInputResetStyle = reactNative.Platform.OS === "web" ? { outlineStyle: "none", outlineWidth: 0, outlineColor: "transparent", boxShadow: "none" } : {};
|
|
815
816
|
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, autoCapitalize, autoCorrect, ...props }) {
|
|
816
817
|
const { colors } = useTheme();
|
|
817
|
-
const [focused, setFocused] =
|
|
818
|
-
const [showPassword, setShowPassword] =
|
|
818
|
+
const [focused, setFocused] = React55.useState(false);
|
|
819
|
+
const [showPassword, setShowPassword] = React55.useState(false);
|
|
819
820
|
const isDisabled = disabled || editable === false;
|
|
820
821
|
const isPassword = type === "password";
|
|
821
822
|
const effectiveSecure = isPassword ? !showPassword : secureTextEntry;
|
|
822
823
|
const effectiveAutoCapitalize = isPassword ? "none" : autoCapitalize;
|
|
823
824
|
const effectiveAutoCorrect = isPassword ? false : autoCorrect;
|
|
824
|
-
const effectivePrefix = prefixIcon ? /* @__PURE__ */
|
|
825
|
-
const effectiveSuffix = isPassword && !suffix && !suffixIcon ? /* @__PURE__ */
|
|
825
|
+
const effectivePrefix = prefixIcon ? /* @__PURE__ */ React55__default.default.createElement(Icon, { name: prefixIcon, size: 20, color: prefixIconColor ?? colors.foregroundMuted }) : prefix;
|
|
826
|
+
const effectiveSuffix = isPassword && !suffix && !suffixIcon ? /* @__PURE__ */ React55__default.default.createElement(
|
|
826
827
|
reactNative.TouchableOpacity,
|
|
827
828
|
{
|
|
828
829
|
onPress: () => setShowPassword(!showPassword),
|
|
@@ -831,10 +832,10 @@ function Input({ label, error, hint, disabled, prefix, suffix, prefixStyle, suff
|
|
|
831
832
|
accessibilityRole: "button",
|
|
832
833
|
accessibilityLabel: showPassword ? "Ocultar contrase\xF1a" : "Mostrar contrase\xF1a"
|
|
833
834
|
},
|
|
834
|
-
/* @__PURE__ */
|
|
835
|
-
) : suffixIcon ? /* @__PURE__ */
|
|
835
|
+
/* @__PURE__ */ React55__default.default.createElement(vectorIcons.AntDesign, { name: showPassword ? "eye" : "eye-invisible", size: 20, color: colors.foregroundMuted })
|
|
836
|
+
) : suffixIcon ? /* @__PURE__ */ React55__default.default.createElement(Icon, { name: suffixIcon, size: 20, color: suffixIconColor ?? colors.foregroundMuted }) : suffix;
|
|
836
837
|
const borderColor = error ? colors.destructive : focused ? colors.primary : colors.border;
|
|
837
|
-
return /* @__PURE__ */
|
|
838
|
+
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(
|
|
838
839
|
reactNativeEase.EaseView,
|
|
839
840
|
{
|
|
840
841
|
style: [
|
|
@@ -846,8 +847,8 @@ function Input({ label, error, hint, disabled, prefix, suffix, prefixStyle, suff
|
|
|
846
847
|
animate: { borderColor },
|
|
847
848
|
transition: COLOR_TRANSITION
|
|
848
849
|
},
|
|
849
|
-
effectivePrefix ? typeof effectivePrefix === "string" ? /* @__PURE__ */
|
|
850
|
-
sheetMode ? /* @__PURE__ */
|
|
850
|
+
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,
|
|
851
|
+
sheetMode ? /* @__PURE__ */ React55__default.default.createElement(
|
|
851
852
|
bottomSheet.BottomSheetTextInput,
|
|
852
853
|
{
|
|
853
854
|
style: [
|
|
@@ -873,7 +874,7 @@ function Input({ label, error, hint, disabled, prefix, suffix, prefixStyle, suff
|
|
|
873
874
|
autoCorrect: effectiveAutoCorrect,
|
|
874
875
|
...props
|
|
875
876
|
}
|
|
876
|
-
) : /* @__PURE__ */
|
|
877
|
+
) : /* @__PURE__ */ React55__default.default.createElement(
|
|
877
878
|
reactNative.TextInput,
|
|
878
879
|
{
|
|
879
880
|
style: [
|
|
@@ -900,8 +901,8 @@ function Input({ label, error, hint, disabled, prefix, suffix, prefixStyle, suff
|
|
|
900
901
|
...props
|
|
901
902
|
}
|
|
902
903
|
),
|
|
903
|
-
effectiveSuffix ? typeof effectiveSuffix === "string" ? /* @__PURE__ */
|
|
904
|
-
), error ? /* @__PURE__ */
|
|
904
|
+
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
|
|
905
|
+
), error ? /* @__PURE__ */ React55__default.default.createElement(
|
|
905
906
|
reactNative.Text,
|
|
906
907
|
{
|
|
907
908
|
style: [styles4.helperText, { color: colors.destructive }],
|
|
@@ -909,7 +910,7 @@ function Input({ label, error, hint, disabled, prefix, suffix, prefixStyle, suff
|
|
|
909
910
|
accessibilityLiveRegion: "polite"
|
|
910
911
|
},
|
|
911
912
|
error
|
|
912
|
-
) : null, !error && hint ? /* @__PURE__ */
|
|
913
|
+
) : null, !error && hint ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles4.helperText, { color: colors.foregroundMuted }], allowFontScaling: true }, hint) : null);
|
|
913
914
|
}
|
|
914
915
|
var styles4 = reactNative.StyleSheet.create({
|
|
915
916
|
container: {
|
|
@@ -1008,10 +1009,10 @@ function BadgeBase({ label, children, variant = "default", size = "md", icon, ic
|
|
|
1008
1009
|
destructiveOutline: colors.destructive,
|
|
1009
1010
|
warningOutline: colors.warning
|
|
1010
1011
|
}[variant];
|
|
1011
|
-
const effectiveIcon = iconName ? /* @__PURE__ */
|
|
1012
|
+
const effectiveIcon = iconName ? /* @__PURE__ */ React55__default.default.createElement(Icon, { name: iconName, size: sizeIconSize[size], color: iconColor ?? textColor }) : icon;
|
|
1012
1013
|
const content = children ?? label;
|
|
1013
1014
|
const a11yLabel = typeof content === "string" ? content : label;
|
|
1014
|
-
return /* @__PURE__ */
|
|
1015
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
1015
1016
|
reactNative.View,
|
|
1016
1017
|
{
|
|
1017
1018
|
style: [styles5.container, containerStyle, sizePadding[size], { gap: sizeIconGap[size] }, style],
|
|
@@ -1019,10 +1020,10 @@ function BadgeBase({ label, children, variant = "default", size = "md", icon, ic
|
|
|
1019
1020
|
accessibilityLabel: a11yLabel
|
|
1020
1021
|
},
|
|
1021
1022
|
effectiveIcon,
|
|
1022
|
-
typeof content === "string" ? /* @__PURE__ */
|
|
1023
|
+
typeof content === "string" ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles5.label, { color: textColor }, sizeFontSize[size]], allowFontScaling: true }, content) : content
|
|
1023
1024
|
);
|
|
1024
1025
|
}
|
|
1025
|
-
var Badge =
|
|
1026
|
+
var Badge = React55__default.default.memo(BadgeBase);
|
|
1026
1027
|
var styles5 = reactNative.StyleSheet.create({
|
|
1027
1028
|
container: {
|
|
1028
1029
|
borderRadius: 9999,
|
|
@@ -1067,9 +1068,9 @@ function Card({ children, variant = "elevated", onPress, style, accessibilityLab
|
|
|
1067
1068
|
elevation: 0
|
|
1068
1069
|
}
|
|
1069
1070
|
}[variant];
|
|
1070
|
-
const cardContent = /* @__PURE__ */
|
|
1071
|
+
const cardContent = /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles6.card, variantStyle, style] }, children);
|
|
1071
1072
|
if (onPress) {
|
|
1072
|
-
return /* @__PURE__ */
|
|
1073
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
1073
1074
|
PressableCard,
|
|
1074
1075
|
{
|
|
1075
1076
|
onPress: handlePress,
|
|
@@ -1086,21 +1087,21 @@ function Card({ children, variant = "elevated", onPress, style, accessibilityLab
|
|
|
1086
1087
|
return cardContent;
|
|
1087
1088
|
}
|
|
1088
1089
|
function CardHeader({ children, style }) {
|
|
1089
|
-
return /* @__PURE__ */
|
|
1090
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles6.header, style] }, children);
|
|
1090
1091
|
}
|
|
1091
1092
|
function CardTitle({ children, style }) {
|
|
1092
1093
|
const { colors } = useTheme();
|
|
1093
|
-
return /* @__PURE__ */
|
|
1094
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles6.title, { color: colors.foreground }, style], allowFontScaling: true }, children);
|
|
1094
1095
|
}
|
|
1095
1096
|
function CardDescription({ children, style }) {
|
|
1096
1097
|
const { colors } = useTheme();
|
|
1097
|
-
return /* @__PURE__ */
|
|
1098
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles6.description, { color: colors.foregroundSubtle }, style], allowFontScaling: true }, children);
|
|
1098
1099
|
}
|
|
1099
1100
|
function CardContent({ children, style }) {
|
|
1100
|
-
return /* @__PURE__ */
|
|
1101
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles6.content, style] }, children);
|
|
1101
1102
|
}
|
|
1102
1103
|
function CardFooter({ children, style }) {
|
|
1103
|
-
return /* @__PURE__ */
|
|
1104
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles6.footer, style] }, children);
|
|
1104
1105
|
}
|
|
1105
1106
|
var styles6 = reactNative.StyleSheet.create({
|
|
1106
1107
|
card: {
|
|
@@ -1136,9 +1137,19 @@ var styles6 = reactNative.StyleSheet.create({
|
|
|
1136
1137
|
alignItems: "center"
|
|
1137
1138
|
}
|
|
1138
1139
|
});
|
|
1139
|
-
function Separator({ orientation = "horizontal", style }) {
|
|
1140
|
+
function Separator({ orientation = "horizontal", label, style }) {
|
|
1140
1141
|
const { colors } = useTheme();
|
|
1141
|
-
|
|
1142
|
+
if (label && orientation !== "vertical") {
|
|
1143
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles7.row, style], accessibilityRole: "none" }, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles7.line, { backgroundColor: colors.separator }] }), /* @__PURE__ */ React55__default.default.createElement(
|
|
1144
|
+
reactNative.Text,
|
|
1145
|
+
{
|
|
1146
|
+
style: [styles7.label, { color: colors.foregroundMuted }],
|
|
1147
|
+
allowFontScaling: true
|
|
1148
|
+
},
|
|
1149
|
+
label
|
|
1150
|
+
), /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles7.line, { backgroundColor: colors.separator }] }));
|
|
1151
|
+
}
|
|
1152
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
1142
1153
|
reactNative.View,
|
|
1143
1154
|
{
|
|
1144
1155
|
style: [
|
|
@@ -1157,6 +1168,21 @@ var styles7 = reactNative.StyleSheet.create({
|
|
|
1157
1168
|
vertical: {
|
|
1158
1169
|
width: 1,
|
|
1159
1170
|
height: "100%"
|
|
1171
|
+
},
|
|
1172
|
+
row: {
|
|
1173
|
+
flexDirection: "row",
|
|
1174
|
+
alignItems: "center",
|
|
1175
|
+
gap: s(12)
|
|
1176
|
+
},
|
|
1177
|
+
line: {
|
|
1178
|
+
flex: 1,
|
|
1179
|
+
height: 1
|
|
1180
|
+
},
|
|
1181
|
+
label: {
|
|
1182
|
+
fontFamily: "Sohne-Medium",
|
|
1183
|
+
fontSize: 13,
|
|
1184
|
+
letterSpacing: 0.32,
|
|
1185
|
+
textTransform: "uppercase"
|
|
1160
1186
|
}
|
|
1161
1187
|
});
|
|
1162
1188
|
var sizeMap2 = {
|
|
@@ -1173,7 +1199,7 @@ function Spinner({ size = "md", color, label, ...props }) {
|
|
|
1173
1199
|
const { colors } = useTheme();
|
|
1174
1200
|
const a11yLabel = label || "Cargando";
|
|
1175
1201
|
if (label) {
|
|
1176
|
-
return /* @__PURE__ */
|
|
1202
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
1177
1203
|
reactNative.View,
|
|
1178
1204
|
{
|
|
1179
1205
|
style: styles8.wrapper,
|
|
@@ -1181,8 +1207,8 @@ function Spinner({ size = "md", color, label, ...props }) {
|
|
|
1181
1207
|
accessibilityLabel: a11yLabel,
|
|
1182
1208
|
accessibilityState: { busy: true }
|
|
1183
1209
|
},
|
|
1184
|
-
/* @__PURE__ */
|
|
1185
|
-
/* @__PURE__ */
|
|
1210
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.ActivityIndicator, { size: sizeMap2[size], color: color ?? colors.primary, ...props }),
|
|
1211
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
1186
1212
|
reactNative.Text,
|
|
1187
1213
|
{
|
|
1188
1214
|
style: [styles8.label, { color: colors.foregroundMuted, fontSize: labelFontSize[size] }],
|
|
@@ -1192,7 +1218,7 @@ function Spinner({ size = "md", color, label, ...props }) {
|
|
|
1192
1218
|
)
|
|
1193
1219
|
);
|
|
1194
1220
|
}
|
|
1195
|
-
return /* @__PURE__ */
|
|
1221
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
1196
1222
|
reactNative.ActivityIndicator,
|
|
1197
1223
|
{
|
|
1198
1224
|
size: sizeMap2[size],
|
|
@@ -1225,9 +1251,9 @@ function Skeleton({
|
|
|
1225
1251
|
}) {
|
|
1226
1252
|
const { colors, colorScheme } = useTheme();
|
|
1227
1253
|
const shimmer = Animated6.useSharedValue(0);
|
|
1228
|
-
const [containerWidth, setContainerWidth] =
|
|
1254
|
+
const [containerWidth, setContainerWidth] = React55.useState(300);
|
|
1229
1255
|
const shimmerHighlight = colorScheme === "dark" ? "rgba(255,255,255,0.08)" : "rgba(0,0,0,0.07)";
|
|
1230
|
-
|
|
1256
|
+
React55.useEffect(() => {
|
|
1231
1257
|
shimmer.value = Animated6.withRepeat(
|
|
1232
1258
|
Animated6.withTiming(1, { duration: TIMINGS.shimmer.duration, easing: Animated6.Easing.linear }),
|
|
1233
1259
|
-1,
|
|
@@ -1240,7 +1266,7 @@ function Skeleton({
|
|
|
1240
1266
|
const resolvedWidth = preset === "circle" ? s(diameter) : preset === "text" ? "60%" : width;
|
|
1241
1267
|
const resolvedHeight = preset === "circle" ? s(diameter) : preset === "text" ? 14 : height;
|
|
1242
1268
|
const resolvedRadius = preset === "circle" ? 9999 : preset === "text" ? 4 : borderRadius;
|
|
1243
|
-
return /* @__PURE__ */
|
|
1269
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
1244
1270
|
reactNative.View,
|
|
1245
1271
|
{
|
|
1246
1272
|
style: [
|
|
@@ -1253,7 +1279,7 @@ function Skeleton({
|
|
|
1253
1279
|
accessibilityLabel: "Cargando",
|
|
1254
1280
|
accessibilityState: { busy: true }
|
|
1255
1281
|
},
|
|
1256
|
-
/* @__PURE__ */
|
|
1282
|
+
/* @__PURE__ */ React55__default.default.createElement(Animated6__default.default.View, { style: [reactNative.StyleSheet.absoluteFill, shimmerStyle] }, /* @__PURE__ */ React55__default.default.createElement(
|
|
1257
1283
|
expoLinearGradient.LinearGradient,
|
|
1258
1284
|
{
|
|
1259
1285
|
colors: ["transparent", shimmerHighlight, "transparent"],
|
|
@@ -1273,10 +1299,10 @@ var aspectRatioMap = {
|
|
|
1273
1299
|
};
|
|
1274
1300
|
function MediaCardSkeleton({ aspectRatio = "4:3", showSubtitle = true, style }) {
|
|
1275
1301
|
const ratio = aspectRatioMap[aspectRatio];
|
|
1276
|
-
return /* @__PURE__ */
|
|
1302
|
+
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));
|
|
1277
1303
|
}
|
|
1278
1304
|
function ListItemSkeleton({ showAvatar = true, showSubtitle = true, style }) {
|
|
1279
|
-
return /* @__PURE__ */
|
|
1305
|
+
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));
|
|
1280
1306
|
}
|
|
1281
1307
|
function ListSkeleton({
|
|
1282
1308
|
count = 6,
|
|
@@ -1287,10 +1313,10 @@ function ListSkeleton({
|
|
|
1287
1313
|
style
|
|
1288
1314
|
}) {
|
|
1289
1315
|
if (columns <= 1) {
|
|
1290
|
-
return /* @__PURE__ */
|
|
1316
|
+
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 })));
|
|
1291
1317
|
}
|
|
1292
1318
|
const widthPct = `${100 / columns}%`;
|
|
1293
|
-
return /* @__PURE__ */
|
|
1319
|
+
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 }))));
|
|
1294
1320
|
}
|
|
1295
1321
|
Skeleton.MediaCard = MediaCardSkeleton;
|
|
1296
1322
|
Skeleton.ListItem = ListItemSkeleton;
|
|
@@ -1353,7 +1379,7 @@ function getInitials(fallback, fallbackText) {
|
|
|
1353
1379
|
}
|
|
1354
1380
|
function AvatarBase({ src, fallback, fallbackText, size = "md", status, style }) {
|
|
1355
1381
|
const { colors } = useTheme();
|
|
1356
|
-
const [imageError, setImageError] =
|
|
1382
|
+
const [imageError, setImageError] = React55.useState(false);
|
|
1357
1383
|
const dimension = typeof size === "number" ? size : sizeMap3[size];
|
|
1358
1384
|
const fontSize = typeof size === "number" ? size * 0.38 : fontSizeMap[size];
|
|
1359
1385
|
const showFallback = !src || imageError;
|
|
@@ -1372,21 +1398,21 @@ function AvatarBase({ src, fallback, fallbackText, size = "md", status, style })
|
|
|
1372
1398
|
overflow: "hidden"
|
|
1373
1399
|
};
|
|
1374
1400
|
const a11yLabel = fallbackText || fallback || "Avatar";
|
|
1375
|
-
return /* @__PURE__ */
|
|
1401
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
1376
1402
|
reactNative.View,
|
|
1377
1403
|
{
|
|
1378
1404
|
style: [styles10.wrapper, style],
|
|
1379
1405
|
accessibilityRole: "image",
|
|
1380
1406
|
accessibilityLabel: a11yLabel
|
|
1381
1407
|
},
|
|
1382
|
-
/* @__PURE__ */
|
|
1408
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles10.base, containerStyle] }, !showFallback ? /* @__PURE__ */ React55__default.default.createElement(
|
|
1383
1409
|
expoImage.Image,
|
|
1384
1410
|
{
|
|
1385
1411
|
source: { uri: src },
|
|
1386
1412
|
style: { width: dimension, height: dimension },
|
|
1387
1413
|
onError: () => setImageError(true)
|
|
1388
1414
|
}
|
|
1389
|
-
) : /* @__PURE__ */
|
|
1415
|
+
) : /* @__PURE__ */ React55__default.default.createElement(
|
|
1390
1416
|
reactNative.Text,
|
|
1391
1417
|
{
|
|
1392
1418
|
style: [styles10.fallback, { color: colors.foregroundMuted, fontSize }],
|
|
@@ -1394,7 +1420,7 @@ function AvatarBase({ src, fallback, fallbackText, size = "md", status, style })
|
|
|
1394
1420
|
},
|
|
1395
1421
|
getInitials(fallback, fallbackText)
|
|
1396
1422
|
)),
|
|
1397
|
-
status && /* @__PURE__ */
|
|
1423
|
+
status && /* @__PURE__ */ React55__default.default.createElement(
|
|
1398
1424
|
reactNative.View,
|
|
1399
1425
|
{
|
|
1400
1426
|
style: [
|
|
@@ -1412,7 +1438,7 @@ function AvatarBase({ src, fallback, fallbackText, size = "md", status, style })
|
|
|
1412
1438
|
)
|
|
1413
1439
|
);
|
|
1414
1440
|
}
|
|
1415
|
-
var Avatar =
|
|
1441
|
+
var Avatar = React55__default.default.memo(AvatarBase);
|
|
1416
1442
|
function AvatarGroup({
|
|
1417
1443
|
users,
|
|
1418
1444
|
max = 3,
|
|
@@ -1425,7 +1451,7 @@ function AvatarGroup({
|
|
|
1425
1451
|
const visible = users.slice(0, max);
|
|
1426
1452
|
const overflowCount = users.length - max;
|
|
1427
1453
|
const dimension = sizeMap3[size];
|
|
1428
|
-
return /* @__PURE__ */
|
|
1454
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles10.group, style], accessibilityLabel: `${users.length} avatares` }, visible.map((user, i) => /* @__PURE__ */ React55__default.default.createElement(
|
|
1429
1455
|
reactNative.View,
|
|
1430
1456
|
{
|
|
1431
1457
|
key: `${user.name}-${i}`,
|
|
@@ -1435,7 +1461,7 @@ function AvatarGroup({
|
|
|
1435
1461
|
{ zIndex: visible.length - i }
|
|
1436
1462
|
]
|
|
1437
1463
|
},
|
|
1438
|
-
/* @__PURE__ */
|
|
1464
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
1439
1465
|
Avatar,
|
|
1440
1466
|
{
|
|
1441
1467
|
src: user.src,
|
|
@@ -1443,7 +1469,7 @@ function AvatarGroup({
|
|
|
1443
1469
|
size
|
|
1444
1470
|
}
|
|
1445
1471
|
)
|
|
1446
|
-
)), overflowCount > 0 ? /* @__PURE__ */
|
|
1472
|
+
)), overflowCount > 0 ? /* @__PURE__ */ React55__default.default.createElement(
|
|
1447
1473
|
reactNative.TouchableOpacity,
|
|
1448
1474
|
{
|
|
1449
1475
|
style: [
|
|
@@ -1462,7 +1488,7 @@ function AvatarGroup({
|
|
|
1462
1488
|
accessibilityRole: "button",
|
|
1463
1489
|
accessibilityLabel: `${overflowCount} avatares m\xE1s`
|
|
1464
1490
|
},
|
|
1465
|
-
/* @__PURE__ */
|
|
1491
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
1466
1492
|
reactNative.Text,
|
|
1467
1493
|
{
|
|
1468
1494
|
style: [styles10.overflowText, { color: colors.foregroundMuted }],
|
|
@@ -1512,15 +1538,15 @@ function AlertBanner({ title, description, variant = "default", icon, iconName,
|
|
|
1512
1538
|
const accentColor = variant === "destructive" ? colors.destructive : variant === "success" ? colors.success : variant === "warning" ? colors.warning : colors.foreground;
|
|
1513
1539
|
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;
|
|
1514
1540
|
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;
|
|
1515
|
-
const defaultIcon = variant === "success" ? /* @__PURE__ */
|
|
1541
|
+
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 }) : (
|
|
1516
1542
|
// AUDIT FIX: default variant previously used colors.primary (near-black)
|
|
1517
1543
|
// as the info icon tint — ambiguous and heavy. accentResolved gives it
|
|
1518
1544
|
// a meaningful chromatic signal when an accent is defined.
|
|
1519
|
-
/* @__PURE__ */
|
|
1545
|
+
/* @__PURE__ */ React55__default.default.createElement(vectorIcons.Entypo, { name: "info-with-circle", size: ms(16), color: accentColor })
|
|
1520
1546
|
);
|
|
1521
|
-
const effectiveIcon = iconName ? /* @__PURE__ */
|
|
1547
|
+
const effectiveIcon = iconName ? /* @__PURE__ */ React55__default.default.createElement(Icon, { name: iconName, size: ms(16), color: iconColor ?? accentColor }) : icon ?? defaultIcon;
|
|
1522
1548
|
const a11yLabel = description ? `${title}. ${description}` : title;
|
|
1523
|
-
return /* @__PURE__ */
|
|
1549
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
1524
1550
|
reactNative.View,
|
|
1525
1551
|
{
|
|
1526
1552
|
style: [
|
|
@@ -1531,9 +1557,9 @@ function AlertBanner({ title, description, variant = "default", icon, iconName,
|
|
|
1531
1557
|
accessibilityRole: "alert",
|
|
1532
1558
|
accessibilityLabel: a11yLabel
|
|
1533
1559
|
},
|
|
1534
|
-
/* @__PURE__ */
|
|
1535
|
-
/* @__PURE__ */
|
|
1536
|
-
onDismiss ? /* @__PURE__ */
|
|
1560
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles11.iconSlot }, effectiveIcon),
|
|
1561
|
+
/* @__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),
|
|
1562
|
+
onDismiss ? /* @__PURE__ */ React55__default.default.createElement(
|
|
1537
1563
|
reactNative.TouchableOpacity,
|
|
1538
1564
|
{
|
|
1539
1565
|
onPress: onDismiss,
|
|
@@ -1543,7 +1569,7 @@ function AlertBanner({ title, description, variant = "default", icon, iconName,
|
|
|
1543
1569
|
accessibilityRole: "button",
|
|
1544
1570
|
accessibilityLabel: "Descartar"
|
|
1545
1571
|
},
|
|
1546
|
-
/* @__PURE__ */
|
|
1572
|
+
/* @__PURE__ */ React55__default.default.createElement(vectorIcons.Feather, { name: "x", size: ms(16), color: colors.foregroundMuted })
|
|
1547
1573
|
) : null
|
|
1548
1574
|
);
|
|
1549
1575
|
}
|
|
@@ -1580,9 +1606,9 @@ var styles11 = reactNative.StyleSheet.create({
|
|
|
1580
1606
|
function Progress({ value = 0, max = 100, variant = "default", style, accessibilityLabel }) {
|
|
1581
1607
|
const { colors } = useTheme();
|
|
1582
1608
|
const percent = Math.min(Math.max(value / max * 100, 0), 100);
|
|
1583
|
-
const [trackWidth, setTrackWidth] =
|
|
1609
|
+
const [trackWidth, setTrackWidth] = React55.useState(0);
|
|
1584
1610
|
const animatedWidth = Animated6.useSharedValue(0);
|
|
1585
|
-
|
|
1611
|
+
React55.useEffect(() => {
|
|
1586
1612
|
if (trackWidth === 0) return;
|
|
1587
1613
|
animatedWidth.value = Animated6.withSpring(percent / 100 * trackWidth, SPRINGS.glide);
|
|
1588
1614
|
}, [percent, trackWidth, animatedWidth]);
|
|
@@ -1590,7 +1616,7 @@ function Progress({ value = 0, max = 100, variant = "default", style, accessibil
|
|
|
1590
1616
|
width: animatedWidth.value
|
|
1591
1617
|
}));
|
|
1592
1618
|
const indicatorColor = variant === "success" ? colors.success : variant === "warning" ? colors.warning : variant === "destructive" ? colors.destructive : colors.primary;
|
|
1593
|
-
return /* @__PURE__ */
|
|
1619
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
1594
1620
|
reactNative.View,
|
|
1595
1621
|
{
|
|
1596
1622
|
style: [styles12.track, { backgroundColor: colors.surface }, style],
|
|
@@ -1599,7 +1625,7 @@ function Progress({ value = 0, max = 100, variant = "default", style, accessibil
|
|
|
1599
1625
|
accessibilityLabel,
|
|
1600
1626
|
accessibilityValue: { min: 0, max: 100, now: Math.round(percent) }
|
|
1601
1627
|
},
|
|
1602
|
-
/* @__PURE__ */
|
|
1628
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
1603
1629
|
Animated6__default.default.View,
|
|
1604
1630
|
{
|
|
1605
1631
|
style: [styles12.indicator, { backgroundColor: indicatorColor }, indicatorAnimatedStyle]
|
|
@@ -1622,8 +1648,8 @@ var styles12 = reactNative.StyleSheet.create({
|
|
|
1622
1648
|
function EmptyState({ icon, iconName, iconColor, title, description, action, actionLabel, onAction, size = "default", style }) {
|
|
1623
1649
|
const { colors } = useTheme();
|
|
1624
1650
|
const isCompact = size === "compact";
|
|
1625
|
-
const effectiveIcon = iconName ? /* @__PURE__ */
|
|
1626
|
-
return /* @__PURE__ */
|
|
1651
|
+
const effectiveIcon = iconName ? /* @__PURE__ */ React55__default.default.createElement(Icon, { name: iconName, size: isCompact ? 32 : 48, color: iconColor ?? colors.foregroundMuted }) : icon;
|
|
1652
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
1627
1653
|
reactNative.View,
|
|
1628
1654
|
{
|
|
1629
1655
|
style: [
|
|
@@ -1633,7 +1659,7 @@ function EmptyState({ icon, iconName, iconColor, title, description, action, act
|
|
|
1633
1659
|
style
|
|
1634
1660
|
]
|
|
1635
1661
|
},
|
|
1636
|
-
effectiveIcon ? /* @__PURE__ */
|
|
1662
|
+
effectiveIcon ? /* @__PURE__ */ React55__default.default.createElement(
|
|
1637
1663
|
reactNative.View,
|
|
1638
1664
|
{
|
|
1639
1665
|
style: [
|
|
@@ -1644,15 +1670,15 @@ function EmptyState({ icon, iconName, iconColor, title, description, action, act
|
|
|
1644
1670
|
},
|
|
1645
1671
|
effectiveIcon
|
|
1646
1672
|
) : null,
|
|
1647
|
-
/* @__PURE__ */
|
|
1673
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles13.textWrapper }, /* @__PURE__ */ React55__default.default.createElement(
|
|
1648
1674
|
reactNative.Text,
|
|
1649
1675
|
{
|
|
1650
1676
|
style: [styles13.title, isCompact && styles13.titleCompact, { color: colors.foreground }],
|
|
1651
1677
|
allowFontScaling: true
|
|
1652
1678
|
},
|
|
1653
1679
|
title
|
|
1654
|
-
), description && !isCompact ? /* @__PURE__ */
|
|
1655
|
-
!isCompact && (action ? /* @__PURE__ */
|
|
1680
|
+
), description && !isCompact ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles13.description, { color: colors.foregroundMuted }], allowFontScaling: true }, description) : null),
|
|
1681
|
+
!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)
|
|
1656
1682
|
);
|
|
1657
1683
|
}
|
|
1658
1684
|
var styles13 = reactNative.StyleSheet.create({
|
|
@@ -1726,10 +1752,10 @@ function Textarea({
|
|
|
1726
1752
|
...props
|
|
1727
1753
|
}) {
|
|
1728
1754
|
const { colors } = useTheme();
|
|
1729
|
-
const [focused, setFocused] =
|
|
1730
|
-
const resolvedPrefixIcon = prefixIcon ? /* @__PURE__ */
|
|
1755
|
+
const [focused, setFocused] = React55.useState(false);
|
|
1756
|
+
const resolvedPrefixIcon = prefixIcon ? /* @__PURE__ */ React55__default.default.createElement(Icon, { name: prefixIcon, size: ms(16), color: prefixIconColor ?? colors.foregroundMuted }) : prefixIconNode;
|
|
1731
1757
|
const borderColor = error ? colors.destructive : focused ? colors.primary : colors.border;
|
|
1732
|
-
return /* @__PURE__ */
|
|
1758
|
+
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(reactNative.View, { style: [styles14.inputWrapper, { backgroundColor: colors.background }] }, /* @__PURE__ */ React55__default.default.createElement(
|
|
1733
1759
|
reactNativeEase.EaseView,
|
|
1734
1760
|
{
|
|
1735
1761
|
style: [styles14.borderOverlay, { borderWidth: error ? 2 : 1 }],
|
|
@@ -1737,7 +1763,7 @@ function Textarea({
|
|
|
1737
1763
|
transition: COLOR_TRANSITION,
|
|
1738
1764
|
pointerEvents: "none"
|
|
1739
1765
|
}
|
|
1740
|
-
), resolvedPrefixIcon ? /* @__PURE__ */
|
|
1766
|
+
), resolvedPrefixIcon ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles14.prefixIcon }, resolvedPrefixIcon) : null, /* @__PURE__ */ React55__default.default.createElement(
|
|
1741
1767
|
reactNative.TextInput,
|
|
1742
1768
|
{
|
|
1743
1769
|
multiline: true,
|
|
@@ -1768,7 +1794,7 @@ function Textarea({
|
|
|
1768
1794
|
accessibilityState: { disabled: !!disabled },
|
|
1769
1795
|
...props
|
|
1770
1796
|
}
|
|
1771
|
-
)), error ? /* @__PURE__ */
|
|
1797
|
+
)), error ? /* @__PURE__ */ React55__default.default.createElement(
|
|
1772
1798
|
reactNative.Text,
|
|
1773
1799
|
{
|
|
1774
1800
|
style: [styles14.helperText, { color: colors.destructive }],
|
|
@@ -1776,7 +1802,7 @@ function Textarea({
|
|
|
1776
1802
|
accessibilityLiveRegion: "polite"
|
|
1777
1803
|
},
|
|
1778
1804
|
error
|
|
1779
|
-
) : null, !error && hint ? /* @__PURE__ */
|
|
1805
|
+
) : null, !error && hint ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles14.helperText, { color: colors.foregroundMuted }], allowFontScaling: true }, hint) : null);
|
|
1780
1806
|
}
|
|
1781
1807
|
var styles14 = reactNative.StyleSheet.create({
|
|
1782
1808
|
container: {
|
|
@@ -1835,7 +1861,7 @@ function Checkbox({
|
|
|
1835
1861
|
// AUDIT FIX: opacity was applied only to the box, leaving the label at full
|
|
1836
1862
|
// opacity when disabled — a contradictory visual signal. Now the entire row
|
|
1837
1863
|
// dims uniformly so label and control communicate the same disabled state.
|
|
1838
|
-
/* @__PURE__ */
|
|
1864
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
1839
1865
|
PressableButton,
|
|
1840
1866
|
{
|
|
1841
1867
|
style: [styles15.row, disabled && styles15.rowDisabled, style],
|
|
@@ -1848,7 +1874,7 @@ function Checkbox({
|
|
|
1848
1874
|
accessibilityHint,
|
|
1849
1875
|
accessibilityState: { checked, disabled: !!disabled }
|
|
1850
1876
|
},
|
|
1851
|
-
/* @__PURE__ */
|
|
1877
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
1852
1878
|
reactNativeEase.EaseView,
|
|
1853
1879
|
{
|
|
1854
1880
|
style: styles15.box,
|
|
@@ -1858,9 +1884,9 @@ function Checkbox({
|
|
|
1858
1884
|
},
|
|
1859
1885
|
transition: COLOR_TRANSITION
|
|
1860
1886
|
},
|
|
1861
|
-
/* @__PURE__ */
|
|
1887
|
+
/* @__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 }] }))
|
|
1862
1888
|
),
|
|
1863
|
-
label ? /* @__PURE__ */
|
|
1889
|
+
label ? /* @__PURE__ */ React55__default.default.createElement(
|
|
1864
1890
|
reactNative.Text,
|
|
1865
1891
|
{
|
|
1866
1892
|
style: [styles15.label, { color: colors.foreground }],
|
|
@@ -1912,7 +1938,7 @@ var DISABLED_OPACITY = 0.45;
|
|
|
1912
1938
|
function Switch({ checked = false, onCheckedChange, disabled, style, accessibilityLabel, accessibilityHint }) {
|
|
1913
1939
|
const { colors } = useTheme();
|
|
1914
1940
|
const isDisabled = !!disabled;
|
|
1915
|
-
return /* @__PURE__ */
|
|
1941
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [{ alignSelf: "flex-start" }, style] }, /* @__PURE__ */ React55__default.default.createElement(
|
|
1916
1942
|
PressableButton,
|
|
1917
1943
|
{
|
|
1918
1944
|
onPress: () => {
|
|
@@ -1928,14 +1954,14 @@ function Switch({ checked = false, onCheckedChange, disabled, style, accessibili
|
|
|
1928
1954
|
accessibilityState: { checked, disabled: isDisabled },
|
|
1929
1955
|
style: styles16.touchable
|
|
1930
1956
|
},
|
|
1931
|
-
/* @__PURE__ */
|
|
1957
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles16.trackContainer }, /* @__PURE__ */ React55__default.default.createElement(
|
|
1932
1958
|
reactNativeEase.EaseView,
|
|
1933
1959
|
{
|
|
1934
1960
|
style: [styles16.track, isDisabled && styles16.disabledTrack],
|
|
1935
1961
|
animate: { backgroundColor: checked ? colors.primary : colors.surfaceStrong },
|
|
1936
1962
|
transition: COLOR_TRANSITION
|
|
1937
1963
|
}
|
|
1938
|
-
), /* @__PURE__ */
|
|
1964
|
+
), /* @__PURE__ */ React55__default.default.createElement(
|
|
1939
1965
|
reactNativeEase.EaseView,
|
|
1940
1966
|
{
|
|
1941
1967
|
style: [styles16.trackBorder, { borderWidth: 1.5 }],
|
|
@@ -1943,30 +1969,30 @@ function Switch({ checked = false, onCheckedChange, disabled, style, accessibili
|
|
|
1943
1969
|
animate: { borderColor: checked ? "transparent" : colors.border },
|
|
1944
1970
|
transition: COLOR_TRANSITION
|
|
1945
1971
|
}
|
|
1946
|
-
), /* @__PURE__ */
|
|
1972
|
+
), /* @__PURE__ */ React55__default.default.createElement(
|
|
1947
1973
|
reactNativeEase.EaseView,
|
|
1948
1974
|
{
|
|
1949
1975
|
style: [styles16.thumb, { backgroundColor: colors.primaryForeground }],
|
|
1950
1976
|
animate: { translateX: checked ? THUMB_TRAVEL : 0 },
|
|
1951
1977
|
transition: SPRING_ELASTIC
|
|
1952
1978
|
},
|
|
1953
|
-
/* @__PURE__ */
|
|
1979
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
1954
1980
|
reactNativeEase.EaseView,
|
|
1955
1981
|
{
|
|
1956
1982
|
style: styles16.iconWrapper,
|
|
1957
1983
|
animate: { opacity: checked ? isDisabled ? DISABLED_OPACITY : 1 : 0 },
|
|
1958
1984
|
transition: OPACITY_TRANSITION
|
|
1959
1985
|
},
|
|
1960
|
-
/* @__PURE__ */
|
|
1986
|
+
/* @__PURE__ */ React55__default.default.createElement(vectorIcons.Feather, { name: "check", size: ICON_SIZE, color: colors.primary })
|
|
1961
1987
|
),
|
|
1962
|
-
/* @__PURE__ */
|
|
1988
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
1963
1989
|
reactNativeEase.EaseView,
|
|
1964
1990
|
{
|
|
1965
1991
|
style: styles16.iconWrapper,
|
|
1966
1992
|
animate: { opacity: checked ? 0 : isDisabled ? DISABLED_OPACITY : 1 },
|
|
1967
1993
|
transition: OPACITY_TRANSITION
|
|
1968
1994
|
},
|
|
1969
|
-
/* @__PURE__ */
|
|
1995
|
+
/* @__PURE__ */ React55__default.default.createElement(vectorIcons.Feather, { name: "x", size: ICON_SIZE, color: colors.foregroundMuted })
|
|
1970
1996
|
)
|
|
1971
1997
|
))
|
|
1972
1998
|
));
|
|
@@ -2021,15 +2047,15 @@ function ToggleIcon({ pressed, iconName, activeIconName, icon, activeIcon, iconC
|
|
|
2021
2047
|
return prop;
|
|
2022
2048
|
};
|
|
2023
2049
|
if (pressed) {
|
|
2024
|
-
if (activeIconName) return /* @__PURE__ */
|
|
2050
|
+
if (activeIconName) return /* @__PURE__ */ React55__default.default.createElement(Icon, { name: activeIconName, size: iconSize, color: activeIconColor ?? primaryColor });
|
|
2025
2051
|
const active = renderProp(activeIcon);
|
|
2026
|
-
if (active) return /* @__PURE__ */
|
|
2027
|
-
return /* @__PURE__ */
|
|
2052
|
+
if (active) return /* @__PURE__ */ React55__default.default.createElement(React55__default.default.Fragment, null, active);
|
|
2053
|
+
return /* @__PURE__ */ React55__default.default.createElement(vectorIcons.FontAwesome5, { name: "check-circle", size: iconSize, color: primaryColor });
|
|
2028
2054
|
}
|
|
2029
|
-
if (iconName) return /* @__PURE__ */
|
|
2055
|
+
if (iconName) return /* @__PURE__ */ React55__default.default.createElement(Icon, { name: iconName, size: iconSize, color: iconColor ?? mutedColor });
|
|
2030
2056
|
const custom = renderProp(icon);
|
|
2031
|
-
if (custom) return /* @__PURE__ */
|
|
2032
|
-
return /* @__PURE__ */
|
|
2057
|
+
if (custom) return /* @__PURE__ */ React55__default.default.createElement(React55__default.default.Fragment, null, custom);
|
|
2058
|
+
return /* @__PURE__ */ React55__default.default.createElement(vectorIcons.FontAwesome5, { name: "circle", size: iconSize, color: mutedColor });
|
|
2033
2059
|
}
|
|
2034
2060
|
var sizeStyles = {
|
|
2035
2061
|
sm: { paddingHorizontal: s(12), paddingVertical: vs(8), minWidth: s(40), minHeight: vs(40) },
|
|
@@ -2060,7 +2086,7 @@ function Toggle({
|
|
|
2060
2086
|
selectionAsync();
|
|
2061
2087
|
onPressedChange?.(!pressed);
|
|
2062
2088
|
};
|
|
2063
|
-
return /* @__PURE__ */
|
|
2089
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [disabled && styles17.disabled, style] }, /* @__PURE__ */ React55__default.default.createElement(
|
|
2064
2090
|
PressableButton,
|
|
2065
2091
|
{
|
|
2066
2092
|
onPress: handlePress,
|
|
@@ -2072,7 +2098,7 @@ function Toggle({
|
|
|
2072
2098
|
accessibilityLabel: accessibilityLabel ?? label,
|
|
2073
2099
|
accessibilityState: { selected: pressed, disabled: !!disabled }
|
|
2074
2100
|
},
|
|
2075
|
-
/* @__PURE__ */
|
|
2101
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
2076
2102
|
reactNativeEase.EaseView,
|
|
2077
2103
|
{
|
|
2078
2104
|
style: [styles17.base, sizeStyles[size], { borderWidth: 2 }],
|
|
@@ -2082,7 +2108,7 @@ function Toggle({
|
|
|
2082
2108
|
},
|
|
2083
2109
|
transition: COLOR_TRANSITION
|
|
2084
2110
|
},
|
|
2085
|
-
/* @__PURE__ */
|
|
2111
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles17.inner }, /* @__PURE__ */ React55__default.default.createElement(
|
|
2086
2112
|
ToggleIcon,
|
|
2087
2113
|
{
|
|
2088
2114
|
pressed,
|
|
@@ -2096,7 +2122,7 @@ function Toggle({
|
|
|
2096
2122
|
primaryColor: colors.primary,
|
|
2097
2123
|
mutedColor: colors.foregroundMuted
|
|
2098
2124
|
}
|
|
2099
|
-
), label ? /* @__PURE__ */
|
|
2125
|
+
), label ? /* @__PURE__ */ React55__default.default.createElement(
|
|
2100
2126
|
reactNative.Text,
|
|
2101
2127
|
{
|
|
2102
2128
|
style: [styles17.label, { color: pressed ? colors.primary : colors.foreground }],
|
|
@@ -2131,7 +2157,7 @@ function RadioItem({
|
|
|
2131
2157
|
onSelect
|
|
2132
2158
|
}) {
|
|
2133
2159
|
const { colors } = useTheme();
|
|
2134
|
-
return /* @__PURE__ */
|
|
2160
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
2135
2161
|
PressableButton,
|
|
2136
2162
|
{
|
|
2137
2163
|
style: [styles18.row, option.disabled && styles18.rowDisabled],
|
|
@@ -2148,14 +2174,14 @@ function RadioItem({
|
|
|
2148
2174
|
accessibilityLabel: option.label,
|
|
2149
2175
|
accessibilityState: { checked: selected, disabled: !!option.disabled }
|
|
2150
2176
|
},
|
|
2151
|
-
/* @__PURE__ */
|
|
2177
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
2152
2178
|
reactNativeEase.EaseView,
|
|
2153
2179
|
{
|
|
2154
2180
|
style: styles18.radio,
|
|
2155
2181
|
animate: { borderColor: selected ? colors.primary : colors.border },
|
|
2156
2182
|
transition: COLOR_TRANSITION
|
|
2157
2183
|
},
|
|
2158
|
-
/* @__PURE__ */
|
|
2184
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
2159
2185
|
reactNativeEase.EaseView,
|
|
2160
2186
|
{
|
|
2161
2187
|
style: [styles18.dot, { backgroundColor: colors.primary }],
|
|
@@ -2164,7 +2190,7 @@ function RadioItem({
|
|
|
2164
2190
|
}
|
|
2165
2191
|
)
|
|
2166
2192
|
),
|
|
2167
|
-
/* @__PURE__ */
|
|
2193
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
2168
2194
|
reactNative.Text,
|
|
2169
2195
|
{
|
|
2170
2196
|
style: [styles18.label, { color: colors.foreground }],
|
|
@@ -2182,14 +2208,14 @@ function RadioGroup({
|
|
|
2182
2208
|
style,
|
|
2183
2209
|
accessibilityLabel
|
|
2184
2210
|
}) {
|
|
2185
|
-
return /* @__PURE__ */
|
|
2211
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
2186
2212
|
reactNative.View,
|
|
2187
2213
|
{
|
|
2188
2214
|
style: [styles18.container, orientation === "horizontal" && styles18.horizontal, style],
|
|
2189
2215
|
accessibilityRole: "radiogroup",
|
|
2190
2216
|
accessibilityLabel
|
|
2191
2217
|
},
|
|
2192
|
-
options.map((option) => /* @__PURE__ */
|
|
2218
|
+
options.map((option) => /* @__PURE__ */ React55__default.default.createElement(
|
|
2193
2219
|
RadioItem,
|
|
2194
2220
|
{
|
|
2195
2221
|
key: option.value,
|
|
@@ -2244,7 +2270,7 @@ function TabTrigger({
|
|
|
2244
2270
|
}) {
|
|
2245
2271
|
const { colors } = useTheme();
|
|
2246
2272
|
const isUnderline = variant === "underline";
|
|
2247
|
-
return /* @__PURE__ */
|
|
2273
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { onLayout, style: styles19.triggerWrap }, /* @__PURE__ */ React55__default.default.createElement(
|
|
2248
2274
|
PressableTab,
|
|
2249
2275
|
{
|
|
2250
2276
|
style: [
|
|
@@ -2259,7 +2285,7 @@ function TabTrigger({
|
|
|
2259
2285
|
accessibilityState: { selected: isActive },
|
|
2260
2286
|
accessibilityLabel: tab.label
|
|
2261
2287
|
},
|
|
2262
|
-
/* @__PURE__ */
|
|
2288
|
+
/* @__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(
|
|
2263
2289
|
reactNative.Text,
|
|
2264
2290
|
{
|
|
2265
2291
|
style: [
|
|
@@ -2277,14 +2303,14 @@ function TabTrigger({
|
|
|
2277
2303
|
));
|
|
2278
2304
|
}
|
|
2279
2305
|
function Tabs({ tabs, variant = "pill", value, onValueChange, children, style }) {
|
|
2280
|
-
const [internal, setInternal] =
|
|
2306
|
+
const [internal, setInternal] = React55.useState(tabs[0]?.value ?? "");
|
|
2281
2307
|
const { colors } = useTheme();
|
|
2282
2308
|
const active = value ?? internal;
|
|
2283
|
-
const tabLayouts =
|
|
2309
|
+
const tabLayouts = React55.useRef({});
|
|
2284
2310
|
const pillX = Animated6.useSharedValue(0);
|
|
2285
2311
|
const pillWidth = Animated6.useSharedValue(0);
|
|
2286
|
-
const initialised =
|
|
2287
|
-
const animatePill =
|
|
2312
|
+
const initialised = React55.useRef(false);
|
|
2313
|
+
const animatePill = React55.useCallback((tabValue, animate) => {
|
|
2288
2314
|
const layout = tabLayouts.current[tabValue];
|
|
2289
2315
|
if (!layout) return;
|
|
2290
2316
|
if (animate) {
|
|
@@ -2295,7 +2321,7 @@ function Tabs({ tabs, variant = "pill", value, onValueChange, children, style })
|
|
|
2295
2321
|
pillWidth.value = layout.width;
|
|
2296
2322
|
}
|
|
2297
2323
|
}, [pillX, pillWidth]);
|
|
2298
|
-
|
|
2324
|
+
React55.useEffect(() => {
|
|
2299
2325
|
if (initialised.current) animatePill(active, true);
|
|
2300
2326
|
}, [active, animatePill]);
|
|
2301
2327
|
const handlePress = (v) => {
|
|
@@ -2307,7 +2333,7 @@ function Tabs({ tabs, variant = "pill", value, onValueChange, children, style })
|
|
|
2307
2333
|
transform: [{ translateX: pillX.value }],
|
|
2308
2334
|
width: pillWidth.value
|
|
2309
2335
|
}));
|
|
2310
|
-
return /* @__PURE__ */
|
|
2336
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style }, /* @__PURE__ */ React55__default.default.createElement(
|
|
2311
2337
|
reactNative.View,
|
|
2312
2338
|
{
|
|
2313
2339
|
style: [
|
|
@@ -2315,7 +2341,7 @@ function Tabs({ tabs, variant = "pill", value, onValueChange, children, style })
|
|
|
2315
2341
|
],
|
|
2316
2342
|
accessibilityRole: "tablist"
|
|
2317
2343
|
},
|
|
2318
|
-
variant === "pill" && /* @__PURE__ */
|
|
2344
|
+
variant === "pill" && /* @__PURE__ */ React55__default.default.createElement(
|
|
2319
2345
|
Animated6__default.default.View,
|
|
2320
2346
|
{
|
|
2321
2347
|
style: [
|
|
@@ -2337,7 +2363,7 @@ function Tabs({ tabs, variant = "pill", value, onValueChange, children, style })
|
|
|
2337
2363
|
]
|
|
2338
2364
|
}
|
|
2339
2365
|
),
|
|
2340
|
-
tabs.map((tab) => /* @__PURE__ */
|
|
2366
|
+
tabs.map((tab) => /* @__PURE__ */ React55__default.default.createElement(
|
|
2341
2367
|
TabTrigger,
|
|
2342
2368
|
{
|
|
2343
2369
|
key: tab.value,
|
|
@@ -2359,7 +2385,7 @@ function Tabs({ tabs, variant = "pill", value, onValueChange, children, style })
|
|
|
2359
2385
|
}
|
|
2360
2386
|
function TabsContent({ value, activeValue, children, style }) {
|
|
2361
2387
|
if (value !== activeValue) return null;
|
|
2362
|
-
return /* @__PURE__ */
|
|
2388
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style, accessibilityRole: "none" }, children);
|
|
2363
2389
|
}
|
|
2364
2390
|
var styles19 = reactNative.StyleSheet.create({
|
|
2365
2391
|
list: {
|
|
@@ -2417,32 +2443,28 @@ function AccordionItemComponent({
|
|
|
2417
2443
|
onToggle
|
|
2418
2444
|
}) {
|
|
2419
2445
|
const { colors } = useTheme();
|
|
2420
|
-
const resolvedIcon = item.iconName ? /* @__PURE__ */
|
|
2446
|
+
const resolvedIcon = item.iconName ? /* @__PURE__ */ React55__default.default.createElement(Icon, { name: item.iconName, size: ms(16), color: item.iconColor ?? colors.foregroundMuted }) : item.icon;
|
|
2421
2447
|
const isExpanded = Animated6.useSharedValue(isOpen);
|
|
2422
2448
|
const height = Animated6.useSharedValue(0);
|
|
2423
|
-
|
|
2449
|
+
React55__default.default.useEffect(() => {
|
|
2424
2450
|
isExpanded.value = isOpen;
|
|
2425
2451
|
}, [isOpen, isExpanded]);
|
|
2426
|
-
const
|
|
2427
|
-
|
|
2428
|
-
duration: isExpanded.value ? TIMINGS.expand.duration : TIMINGS.collapse.duration,
|
|
2429
|
-
easing: isExpanded.value ? Animated6.Easing.bezier(0.23, 1, 0.32, 1) : Animated6.Easing.in(Animated6.Easing.ease)
|
|
2430
|
-
})
|
|
2431
|
-
);
|
|
2432
|
-
const derivedRotation = Animated6.useDerivedValue(
|
|
2433
|
-
() => Animated6.withTiming(isExpanded.value ? 1 : 0, {
|
|
2452
|
+
const bodyStyle = Animated6.useAnimatedStyle(() => ({
|
|
2453
|
+
height: Animated6.withTiming(height.value * Number(isExpanded.value), {
|
|
2434
2454
|
duration: isExpanded.value ? TIMINGS.expand.duration : TIMINGS.collapse.duration,
|
|
2435
2455
|
easing: isExpanded.value ? Animated6.Easing.bezier(0.23, 1, 0.32, 1) : Animated6.Easing.in(Animated6.Easing.ease)
|
|
2436
|
-
})
|
|
2437
|
-
);
|
|
2438
|
-
const bodyStyle = Animated6.useAnimatedStyle(() => ({
|
|
2439
|
-
height: derivedHeight.value,
|
|
2456
|
+
}),
|
|
2440
2457
|
overflow: "hidden"
|
|
2441
2458
|
}));
|
|
2442
2459
|
const rotationStyle = Animated6.useAnimatedStyle(() => ({
|
|
2443
|
-
transform: [{
|
|
2460
|
+
transform: [{
|
|
2461
|
+
rotate: `${Animated6.withTiming(isExpanded.value ? 1 : 0, {
|
|
2462
|
+
duration: isExpanded.value ? TIMINGS.expand.duration : TIMINGS.collapse.duration,
|
|
2463
|
+
easing: isExpanded.value ? Animated6.Easing.bezier(0.23, 1, 0.32, 1) : Animated6.Easing.in(Animated6.Easing.ease)
|
|
2464
|
+
}) * 180}deg`
|
|
2465
|
+
}]
|
|
2444
2466
|
}));
|
|
2445
|
-
return /* @__PURE__ */
|
|
2467
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles20.item, { backgroundColor: colors.card, borderColor: colors.border }] }, /* @__PURE__ */ React55__default.default.createElement(
|
|
2446
2468
|
PressableRow,
|
|
2447
2469
|
{
|
|
2448
2470
|
onPress: () => {
|
|
@@ -2457,8 +2479,8 @@ function AccordionItemComponent({
|
|
|
2457
2479
|
accessibilityHint: item.accessibilityHint,
|
|
2458
2480
|
style: styles20.trigger
|
|
2459
2481
|
},
|
|
2460
|
-
/* @__PURE__ */
|
|
2461
|
-
item.triggerActions ? /* @__PURE__ */
|
|
2482
|
+
/* @__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),
|
|
2483
|
+
item.triggerActions ? /* @__PURE__ */ React55__default.default.createElement(
|
|
2462
2484
|
reactNative.View,
|
|
2463
2485
|
{
|
|
2464
2486
|
style: styles20.triggerActions,
|
|
@@ -2466,8 +2488,8 @@ function AccordionItemComponent({
|
|
|
2466
2488
|
},
|
|
2467
2489
|
item.triggerActions
|
|
2468
2490
|
) : null,
|
|
2469
|
-
/* @__PURE__ */
|
|
2470
|
-
), /* @__PURE__ */
|
|
2491
|
+
/* @__PURE__ */ React55__default.default.createElement(Animated6__default.default.View, { style: [styles20.chevron, rotationStyle] }, /* @__PURE__ */ React55__default.default.createElement(vectorIcons.Entypo, { name: "chevron-down", size: 18, color: colors.foregroundMuted }))
|
|
2492
|
+
), /* @__PURE__ */ React55__default.default.createElement(Animated6__default.default.View, { style: bodyStyle }, /* @__PURE__ */ React55__default.default.createElement(
|
|
2471
2493
|
reactNative.View,
|
|
2472
2494
|
{
|
|
2473
2495
|
style: styles20.content,
|
|
@@ -2475,11 +2497,11 @@ function AccordionItemComponent({
|
|
|
2475
2497
|
height.value = e.nativeEvent.layout.height;
|
|
2476
2498
|
}
|
|
2477
2499
|
},
|
|
2478
|
-
typeof item.content === "string" || typeof item.content === "number" ? /* @__PURE__ */
|
|
2500
|
+
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
|
|
2479
2501
|
)));
|
|
2480
2502
|
}
|
|
2481
2503
|
function Accordion({ items, type = "single", defaultValue, style }) {
|
|
2482
|
-
const [openValues, setOpenValues] =
|
|
2504
|
+
const [openValues, setOpenValues] = React55.useState(() => {
|
|
2483
2505
|
if (!defaultValue) return [];
|
|
2484
2506
|
return Array.isArray(defaultValue) ? defaultValue : [defaultValue];
|
|
2485
2507
|
});
|
|
@@ -2492,7 +2514,7 @@ function Accordion({ items, type = "single", defaultValue, style }) {
|
|
|
2492
2514
|
);
|
|
2493
2515
|
}
|
|
2494
2516
|
};
|
|
2495
|
-
return /* @__PURE__ */
|
|
2517
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles20.list, style] }, items.map((item) => /* @__PURE__ */ React55__default.default.createElement(
|
|
2496
2518
|
AccordionItemComponent,
|
|
2497
2519
|
{
|
|
2498
2520
|
key: item.value,
|
|
@@ -2571,7 +2593,7 @@ function Slider({
|
|
|
2571
2593
|
style
|
|
2572
2594
|
}) {
|
|
2573
2595
|
const { colors } = useTheme();
|
|
2574
|
-
const lastSteppedValue =
|
|
2596
|
+
const lastSteppedValue = React55.useRef(value);
|
|
2575
2597
|
const handleValueChange = (v) => {
|
|
2576
2598
|
if (step && v !== lastSteppedValue.current) {
|
|
2577
2599
|
lastSteppedValue.current = v;
|
|
@@ -2579,7 +2601,7 @@ function Slider({
|
|
|
2579
2601
|
}
|
|
2580
2602
|
onValueChange?.(v);
|
|
2581
2603
|
};
|
|
2582
|
-
return /* @__PURE__ */
|
|
2604
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
2583
2605
|
reactNative.View,
|
|
2584
2606
|
{
|
|
2585
2607
|
style: [styles21.wrapper, style],
|
|
@@ -2593,8 +2615,8 @@ function Slider({
|
|
|
2593
2615
|
text: formatValue2(value)
|
|
2594
2616
|
}
|
|
2595
2617
|
},
|
|
2596
|
-
label || showValue ? /* @__PURE__ */
|
|
2597
|
-
/* @__PURE__ */
|
|
2618
|
+
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,
|
|
2619
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: disabled ? styles21.disabled : void 0 }, /* @__PURE__ */ React55__default.default.createElement(
|
|
2598
2620
|
RNSlider__default.default,
|
|
2599
2621
|
{
|
|
2600
2622
|
value,
|
|
@@ -2638,15 +2660,47 @@ var styles21 = reactNative.StyleSheet.create({
|
|
|
2638
2660
|
opacity: 0.45
|
|
2639
2661
|
}
|
|
2640
2662
|
});
|
|
2663
|
+
function useSheetModal(visible, onDismiss) {
|
|
2664
|
+
const ref = React55.useRef(null);
|
|
2665
|
+
const state = React55.useRef("idle");
|
|
2666
|
+
const onDismissRef = React55.useRef(onDismiss);
|
|
2667
|
+
const [tick, setTick] = React55.useState(0);
|
|
2668
|
+
React55.useEffect(() => {
|
|
2669
|
+
onDismissRef.current = onDismiss;
|
|
2670
|
+
});
|
|
2671
|
+
React55.useEffect(() => {
|
|
2672
|
+
if (visible) {
|
|
2673
|
+
if (state.current === "idle") {
|
|
2674
|
+
state.current = "presenting";
|
|
2675
|
+
impactMedium();
|
|
2676
|
+
ref.current?.present();
|
|
2677
|
+
state.current = "presented";
|
|
2678
|
+
}
|
|
2679
|
+
} else {
|
|
2680
|
+
if (state.current === "presented" || state.current === "presenting") {
|
|
2681
|
+
state.current = "dismissing";
|
|
2682
|
+
ref.current?.dismiss();
|
|
2683
|
+
}
|
|
2684
|
+
}
|
|
2685
|
+
}, [visible, tick]);
|
|
2686
|
+
const handleDismiss = React55.useCallback(() => {
|
|
2687
|
+
state.current = "idle";
|
|
2688
|
+
onDismissRef.current?.();
|
|
2689
|
+
setTick((t) => t + 1);
|
|
2690
|
+
}, []);
|
|
2691
|
+
return { ref, handleDismiss };
|
|
2692
|
+
}
|
|
2693
|
+
|
|
2694
|
+
// src/components/Sheet/Sheet.tsx
|
|
2641
2695
|
function SheetHeader({ children, style }) {
|
|
2642
|
-
return /* @__PURE__ */
|
|
2696
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles22.header, style] }, children);
|
|
2643
2697
|
}
|
|
2644
2698
|
function SheetContent({ children, style }) {
|
|
2645
|
-
return /* @__PURE__ */
|
|
2699
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles22.sheetContent, style] }, children);
|
|
2646
2700
|
}
|
|
2647
2701
|
function SheetFooter({ children, style }) {
|
|
2648
2702
|
const { colors } = useTheme();
|
|
2649
|
-
return /* @__PURE__ */
|
|
2703
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles22.sheetFooter, { backgroundColor: colors.card, borderTopColor: colors.border }, style] }, children);
|
|
2650
2704
|
}
|
|
2651
2705
|
function Sheet({
|
|
2652
2706
|
open,
|
|
@@ -2668,36 +2722,10 @@ function Sheet({
|
|
|
2668
2722
|
}) {
|
|
2669
2723
|
const { colors } = useTheme();
|
|
2670
2724
|
const insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
2671
|
-
const ref =
|
|
2672
|
-
const
|
|
2673
|
-
const
|
|
2674
|
-
|
|
2675
|
-
const [tick, setTick] = React54.useState(0);
|
|
2676
|
-
React54.useEffect(() => {
|
|
2677
|
-
onCloseRef.current = onClose;
|
|
2678
|
-
}, [onClose]);
|
|
2679
|
-
const handleDismiss = React54.useCallback(() => {
|
|
2680
|
-
sheetState.current = "idle";
|
|
2681
|
-
onCloseRef.current?.();
|
|
2682
|
-
setTick((t) => t + 1);
|
|
2683
|
-
}, []);
|
|
2684
|
-
React54.useEffect(() => {
|
|
2685
|
-
if (open) {
|
|
2686
|
-
if (sheetState.current === "idle") {
|
|
2687
|
-
sheetState.current = "presenting";
|
|
2688
|
-
impactMedium();
|
|
2689
|
-
ref.current?.present();
|
|
2690
|
-
sheetState.current = "presented";
|
|
2691
|
-
}
|
|
2692
|
-
} else {
|
|
2693
|
-
if (sheetState.current === "presented" || sheetState.current === "presenting") {
|
|
2694
|
-
sheetState.current = "dismissing";
|
|
2695
|
-
ref.current?.dismiss();
|
|
2696
|
-
}
|
|
2697
|
-
}
|
|
2698
|
-
}, [open, tick]);
|
|
2699
|
-
const renderBackdrop = React54.useCallback(
|
|
2700
|
-
(props) => /* @__PURE__ */ React54__default.default.createElement(
|
|
2725
|
+
const { ref, handleDismiss } = useSheetModal(open, onClose);
|
|
2726
|
+
const name = React55.useId();
|
|
2727
|
+
const renderBackdrop = React55.useCallback(
|
|
2728
|
+
(props) => /* @__PURE__ */ React55__default.default.createElement(
|
|
2701
2729
|
bottomSheet.BottomSheetBackdrop,
|
|
2702
2730
|
{
|
|
2703
2731
|
...props,
|
|
@@ -2708,15 +2736,15 @@ function Sheet({
|
|
|
2708
2736
|
),
|
|
2709
2737
|
[]
|
|
2710
2738
|
);
|
|
2711
|
-
const childArray =
|
|
2712
|
-
const customHeader = childArray.find((child) =>
|
|
2713
|
-
const customContent = childArray.find((child) =>
|
|
2714
|
-
const customFooter = childArray.find((child) =>
|
|
2739
|
+
const childArray = React55__default.default.Children.toArray(children);
|
|
2740
|
+
const customHeader = childArray.find((child) => React55__default.default.isValidElement(child) && child.type === SheetHeader);
|
|
2741
|
+
const customContent = childArray.find((child) => React55__default.default.isValidElement(child) && child.type === SheetContent);
|
|
2742
|
+
const customFooter = childArray.find((child) => React55__default.default.isValidElement(child) && child.type === SheetFooter);
|
|
2715
2743
|
const filteredChildren = customHeader || customContent || customFooter ? childArray.filter(
|
|
2716
|
-
(child) => !
|
|
2744
|
+
(child) => !React55__default.default.isValidElement(child) || child.type !== SheetHeader && child.type !== SheetContent && child.type !== SheetFooter
|
|
2717
2745
|
) : children;
|
|
2718
2746
|
const showHeader = !!(title || subtitle || showCloseButton) && !customHeader;
|
|
2719
|
-
const headerNode = customHeader ? customHeader : showHeader ? /* @__PURE__ */
|
|
2747
|
+
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(
|
|
2720
2748
|
reactNative.TouchableOpacity,
|
|
2721
2749
|
{
|
|
2722
2750
|
onPress: onClose,
|
|
@@ -2727,19 +2755,19 @@ function Sheet({
|
|
|
2727
2755
|
accessibilityLabel: "Cerrar",
|
|
2728
2756
|
hitSlop: { top: 12, bottom: 12, left: 12, right: 12 }
|
|
2729
2757
|
},
|
|
2730
|
-
/* @__PURE__ */
|
|
2731
|
-
) : null), subtitle ? /* @__PURE__ */
|
|
2758
|
+
/* @__PURE__ */ React55__default.default.createElement(vectorIcons.AntDesign, { name: "close", size: ms(18), color: colors.foregroundMuted })
|
|
2759
|
+
) : null), subtitle ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles22.subtitle, { color: colors.foregroundMuted }], allowFontScaling: true }, subtitle) : null) : null;
|
|
2732
2760
|
const contentNode = customContent ? customContent : filteredChildren;
|
|
2733
2761
|
const effectiveFooter = customFooter ? customFooter : footer;
|
|
2734
|
-
const renderFooter =
|
|
2762
|
+
const renderFooter = React55.useCallback(
|
|
2735
2763
|
(props) => {
|
|
2736
2764
|
if (!effectiveFooter) return null;
|
|
2737
|
-
return /* @__PURE__ */
|
|
2765
|
+
return /* @__PURE__ */ React55__default.default.createElement(bottomSheet.BottomSheetFooter, { ...props }, effectiveFooter);
|
|
2738
2766
|
},
|
|
2739
2767
|
[effectiveFooter]
|
|
2740
2768
|
);
|
|
2741
2769
|
const useDynamicSizing = !snapPoints;
|
|
2742
|
-
return /* @__PURE__ */
|
|
2770
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
2743
2771
|
bottomSheet.BottomSheetModal,
|
|
2744
2772
|
{
|
|
2745
2773
|
ref,
|
|
@@ -2759,7 +2787,7 @@ function Sheet({
|
|
|
2759
2787
|
android_keyboardInputMode,
|
|
2760
2788
|
enableBlurKeyboardOnGesture
|
|
2761
2789
|
},
|
|
2762
|
-
scrollable ? /* @__PURE__ */
|
|
2790
|
+
scrollable ? /* @__PURE__ */ React55__default.default.createElement(
|
|
2763
2791
|
bottomSheet.BottomSheetScrollView,
|
|
2764
2792
|
{
|
|
2765
2793
|
contentContainerStyle: [styles22.scrollContent, style],
|
|
@@ -2770,7 +2798,7 @@ function Sheet({
|
|
|
2770
2798
|
},
|
|
2771
2799
|
headerNode,
|
|
2772
2800
|
contentNode
|
|
2773
|
-
) : /* @__PURE__ */
|
|
2801
|
+
) : /* @__PURE__ */ React55__default.default.createElement(bottomSheet.BottomSheetView, { style: [styles22.content, contentStyle, style] }, headerNode, contentNode)
|
|
2774
2802
|
);
|
|
2775
2803
|
}
|
|
2776
2804
|
Sheet.Header = SheetHeader;
|
|
@@ -2847,10 +2875,22 @@ function Select({
|
|
|
2847
2875
|
accessibilityHint
|
|
2848
2876
|
}) {
|
|
2849
2877
|
const { colors } = useTheme();
|
|
2850
|
-
const [pickerVisible, setPickerVisible] =
|
|
2851
|
-
const [pendingValue, setPendingValue] =
|
|
2852
|
-
const pickerRef =
|
|
2878
|
+
const [pickerVisible, setPickerVisible] = React55.useState(false);
|
|
2879
|
+
const [pendingValue, setPendingValue] = React55.useState(value);
|
|
2880
|
+
const pickerRef = React55.useRef(null);
|
|
2853
2881
|
const selected = options.find((o) => o.value === value);
|
|
2882
|
+
function renderPickerItems(includePlaceholder, itemColor, disabledColor) {
|
|
2883
|
+
return /* @__PURE__ */ React55__default.default.createElement(React55__default.default.Fragment, null, includePlaceholder ? /* @__PURE__ */ React55__default.default.createElement(picker.Picker.Item, { label: placeholder, value: "", enabled: false, color: disabledColor }) : null, options.map((o) => /* @__PURE__ */ React55__default.default.createElement(
|
|
2884
|
+
picker.Picker.Item,
|
|
2885
|
+
{
|
|
2886
|
+
key: o.value,
|
|
2887
|
+
label: o.label,
|
|
2888
|
+
value: o.value,
|
|
2889
|
+
enabled: !o.disabled,
|
|
2890
|
+
color: o.disabled ? disabledColor : itemColor
|
|
2891
|
+
}
|
|
2892
|
+
)));
|
|
2893
|
+
}
|
|
2854
2894
|
const handleOpen = () => {
|
|
2855
2895
|
if (disabled) return;
|
|
2856
2896
|
selectionAsync();
|
|
@@ -2871,7 +2911,7 @@ function Select({
|
|
|
2871
2911
|
}
|
|
2872
2912
|
setPickerVisible(false);
|
|
2873
2913
|
};
|
|
2874
|
-
return /* @__PURE__ */
|
|
2914
|
+
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(
|
|
2875
2915
|
PressableButton,
|
|
2876
2916
|
{
|
|
2877
2917
|
style: [
|
|
@@ -2892,7 +2932,7 @@ function Select({
|
|
|
2892
2932
|
accessibilityValue: { text: selected?.label ?? placeholder },
|
|
2893
2933
|
accessibilityState: { disabled: !!disabled, expanded: pickerVisible }
|
|
2894
2934
|
},
|
|
2895
|
-
/* @__PURE__ */
|
|
2935
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
2896
2936
|
reactNative.Text,
|
|
2897
2937
|
{
|
|
2898
2938
|
style: [
|
|
@@ -2904,8 +2944,8 @@ function Select({
|
|
|
2904
2944
|
},
|
|
2905
2945
|
selected?.label ?? placeholder
|
|
2906
2946
|
),
|
|
2907
|
-
/* @__PURE__ */
|
|
2908
|
-
) : null, isIOS ? /* @__PURE__ */
|
|
2947
|
+
/* @__PURE__ */ React55__default.default.createElement(vectorIcons.Entypo, { name: "chevron-down", size: 20, color: colors.foregroundMuted })
|
|
2948
|
+
) : null, isIOS ? /* @__PURE__ */ React55__default.default.createElement(
|
|
2909
2949
|
reactNative.Modal,
|
|
2910
2950
|
{
|
|
2911
2951
|
visible: pickerVisible,
|
|
@@ -2913,27 +2953,17 @@ function Select({
|
|
|
2913
2953
|
animationType: "slide",
|
|
2914
2954
|
onRequestClose: handleDismiss
|
|
2915
2955
|
},
|
|
2916
|
-
/* @__PURE__ */
|
|
2917
|
-
/* @__PURE__ */
|
|
2956
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.TouchableOpacity, { style: styles23.iosBackdrop, activeOpacity: 1, onPress: handleDismiss }),
|
|
2957
|
+
/* @__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(
|
|
2918
2958
|
picker.Picker,
|
|
2919
2959
|
{
|
|
2920
2960
|
selectedValue: pendingValue ?? "",
|
|
2921
2961
|
onValueChange: (val) => setPendingValue(val),
|
|
2922
2962
|
itemStyle: { color: colors.foreground }
|
|
2923
2963
|
},
|
|
2924
|
-
!value
|
|
2925
|
-
options.map((o) => /* @__PURE__ */ React54__default.default.createElement(
|
|
2926
|
-
picker.Picker.Item,
|
|
2927
|
-
{
|
|
2928
|
-
key: o.value,
|
|
2929
|
-
label: o.label,
|
|
2930
|
-
value: o.value,
|
|
2931
|
-
enabled: !o.disabled,
|
|
2932
|
-
color: o.disabled ? colors.foregroundMuted : colors.foreground
|
|
2933
|
-
}
|
|
2934
|
-
))
|
|
2964
|
+
renderPickerItems(!value, colors.foreground, colors.foregroundMuted)
|
|
2935
2965
|
))
|
|
2936
|
-
) : null, isAndroid ? /* @__PURE__ */
|
|
2966
|
+
) : null, isAndroid ? /* @__PURE__ */ React55__default.default.createElement(
|
|
2937
2967
|
picker.Picker,
|
|
2938
2968
|
{
|
|
2939
2969
|
ref: pickerRef,
|
|
@@ -2949,17 +2979,8 @@ function Select({
|
|
|
2949
2979
|
prompt: label,
|
|
2950
2980
|
style: styles23.androidHiddenPicker
|
|
2951
2981
|
},
|
|
2952
|
-
!value
|
|
2953
|
-
|
|
2954
|
-
picker.Picker.Item,
|
|
2955
|
-
{
|
|
2956
|
-
key: o.value,
|
|
2957
|
-
label: o.label,
|
|
2958
|
-
value: o.value,
|
|
2959
|
-
enabled: !o.disabled
|
|
2960
|
-
}
|
|
2961
|
-
))
|
|
2962
|
-
) : null, isWeb2 ? /* @__PURE__ */ React54__default.default.createElement(
|
|
2982
|
+
renderPickerItems(!value)
|
|
2983
|
+
) : null, isWeb2 ? /* @__PURE__ */ React55__default.default.createElement(
|
|
2963
2984
|
picker.Picker,
|
|
2964
2985
|
{
|
|
2965
2986
|
selectedValue: value ?? "",
|
|
@@ -2979,17 +3000,8 @@ function Select({
|
|
|
2979
3000
|
}
|
|
2980
3001
|
]
|
|
2981
3002
|
},
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
picker.Picker.Item,
|
|
2985
|
-
{
|
|
2986
|
-
key: o.value,
|
|
2987
|
-
label: o.label,
|
|
2988
|
-
value: o.value,
|
|
2989
|
-
enabled: !o.disabled
|
|
2990
|
-
}
|
|
2991
|
-
))
|
|
2992
|
-
) : null, error ? /* @__PURE__ */ React54__default.default.createElement(reactNative.Text, { style: [styles23.helperText, { color: colors.destructive }], allowFontScaling: true }, error) : !error && hint ? /* @__PURE__ */ React54__default.default.createElement(reactNative.Text, { style: [styles23.helperText, { color: colors.foregroundMuted }], allowFontScaling: true }, hint) : null);
|
|
3003
|
+
renderPickerItems(true)
|
|
3004
|
+
) : null, error ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles23.helperText, { color: colors.destructive }], allowFontScaling: true }, error) : !error && hint ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles23.helperText, { color: colors.foregroundMuted }], allowFontScaling: true }, hint) : null);
|
|
2993
3005
|
}
|
|
2994
3006
|
var styles23 = reactNative.StyleSheet.create({
|
|
2995
3007
|
container: {
|
|
@@ -3067,7 +3079,7 @@ function useToast() {
|
|
|
3067
3079
|
function ToastProvider({ children }) {
|
|
3068
3080
|
const { colorScheme } = useTheme();
|
|
3069
3081
|
const insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
3070
|
-
return /* @__PURE__ */
|
|
3082
|
+
return /* @__PURE__ */ React55__default.default.createElement(React55__default.default.Fragment, null, children, /* @__PURE__ */ React55__default.default.createElement(
|
|
3071
3083
|
sonnerNative.Toaster,
|
|
3072
3084
|
{
|
|
3073
3085
|
theme: colorScheme,
|
|
@@ -3136,7 +3148,7 @@ function CurrencyInput({
|
|
|
3136
3148
|
fontSize: isLarge ? ms(32) : ms(17)
|
|
3137
3149
|
};
|
|
3138
3150
|
const displayValue = value && prefix && value.startsWith(prefix) ? value.slice(prefix.length) : value;
|
|
3139
|
-
return /* @__PURE__ */
|
|
3151
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
3140
3152
|
Input,
|
|
3141
3153
|
{
|
|
3142
3154
|
...props,
|
|
@@ -3187,7 +3199,7 @@ function CurrencyDisplayBase({ value, prefix = "$", showDecimals = false, textCo
|
|
|
3187
3199
|
const baseFontSize = variant ? variantFontSize[variant] : ms(56);
|
|
3188
3200
|
const fontSize = maxFontSize ?? baseFontSize;
|
|
3189
3201
|
const letterSpacing = variant ? variantLetterSpacing[variant] : -2;
|
|
3190
|
-
return /* @__PURE__ */
|
|
3202
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles24.container, style] }, /* @__PURE__ */ React55__default.default.createElement(
|
|
3191
3203
|
reactNative.Text,
|
|
3192
3204
|
{
|
|
3193
3205
|
style: [styles24.amount, { color: textColor ?? colors.foreground, fontSize, letterSpacing }],
|
|
@@ -3199,7 +3211,7 @@ function CurrencyDisplayBase({ value, prefix = "$", showDecimals = false, textCo
|
|
|
3199
3211
|
formatted
|
|
3200
3212
|
));
|
|
3201
3213
|
}
|
|
3202
|
-
var CurrencyDisplay =
|
|
3214
|
+
var CurrencyDisplay = React55__default.default.memo(CurrencyDisplayBase);
|
|
3203
3215
|
var styles24 = reactNative.StyleSheet.create({
|
|
3204
3216
|
container: {
|
|
3205
3217
|
alignSelf: "flex-start"
|
|
@@ -3240,7 +3252,7 @@ function ListItemBase({
|
|
|
3240
3252
|
selectionAsync();
|
|
3241
3253
|
onPress?.();
|
|
3242
3254
|
};
|
|
3243
|
-
const effectiveLeft = imageSource ? /* @__PURE__ */
|
|
3255
|
+
const effectiveLeft = imageSource ? /* @__PURE__ */ React55__default.default.createElement(expoImage.Image, { source: imageSource, style: styles25.image }) : leftIcon ? /* @__PURE__ */ React55__default.default.createElement(Icon, { name: leftIcon, size: 24, color: leftIconColor ?? colors.foreground }) : leftRender;
|
|
3244
3256
|
const hasRightContent = !!(rightIcon || rightActions && rightActions.length > 0 || rightRender !== void 0 || showChevron);
|
|
3245
3257
|
const cardStyle = variant === "card" ? {
|
|
3246
3258
|
backgroundColor: colors.card,
|
|
@@ -3254,7 +3266,7 @@ function ListItemBase({
|
|
|
3254
3266
|
elevation: 2
|
|
3255
3267
|
} : {};
|
|
3256
3268
|
const a11yLabel = accessibilityLabel ?? [title, subtitle, caption].filter(Boolean).join(". ");
|
|
3257
|
-
const content = /* @__PURE__ */
|
|
3269
|
+
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(
|
|
3258
3270
|
reactNative.Text,
|
|
3259
3271
|
{
|
|
3260
3272
|
style: [styles25.title, { color: colors.foreground }, titleStyle],
|
|
@@ -3262,7 +3274,7 @@ function ListItemBase({
|
|
|
3262
3274
|
allowFontScaling: true
|
|
3263
3275
|
},
|
|
3264
3276
|
title
|
|
3265
|
-
), subtitle ? /* @__PURE__ */
|
|
3277
|
+
), subtitle ? /* @__PURE__ */ React55__default.default.createElement(
|
|
3266
3278
|
reactNative.Text,
|
|
3267
3279
|
{
|
|
3268
3280
|
style: [styles25.subtitle, { color: colors.foregroundMuted }, subtitleStyle],
|
|
@@ -3270,7 +3282,7 @@ function ListItemBase({
|
|
|
3270
3282
|
allowFontScaling: true
|
|
3271
3283
|
},
|
|
3272
3284
|
subtitle
|
|
3273
|
-
) : null, caption ? /* @__PURE__ */
|
|
3285
|
+
) : null, caption ? /* @__PURE__ */ React55__default.default.createElement(
|
|
3274
3286
|
reactNative.Text,
|
|
3275
3287
|
{
|
|
3276
3288
|
style: [styles25.caption, { color: colors.foregroundMuted }, captionStyle],
|
|
@@ -3278,16 +3290,16 @@ function ListItemBase({
|
|
|
3278
3290
|
allowFontScaling: true
|
|
3279
3291
|
},
|
|
3280
3292
|
caption
|
|
3281
|
-
) : null), hasRightContent ? rightIcon ? /* @__PURE__ */
|
|
3293
|
+
) : null), hasRightContent ? rightIcon ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles25.rightContainer }, /* @__PURE__ */ React55__default.default.createElement(Icon, { name: rightIcon, size: 24, color: 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(
|
|
3282
3294
|
reactNative.Text,
|
|
3283
3295
|
{
|
|
3284
3296
|
style: [styles25.rightText, { color: colors.foregroundMuted }],
|
|
3285
3297
|
allowFontScaling: true
|
|
3286
3298
|
},
|
|
3287
3299
|
rightRender
|
|
3288
|
-
) : rightRender) : showChevron ? /* @__PURE__ */
|
|
3300
|
+
) : rightRender) : showChevron ? /* @__PURE__ */ React55__default.default.createElement(vectorIcons.Entypo, { name: "chevron-with-circle-right", size: 20, color: colors.foregroundMuted }) : null : null);
|
|
3289
3301
|
if (onPress) {
|
|
3290
|
-
return /* @__PURE__ */
|
|
3302
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: disabled && styles25.disabled }, /* @__PURE__ */ React55__default.default.createElement(
|
|
3291
3303
|
PressableRow,
|
|
3292
3304
|
{
|
|
3293
3305
|
style: [styles25.container, cardStyle, style],
|
|
@@ -3302,11 +3314,11 @@ function ListItemBase({
|
|
|
3302
3314
|
accessibilityState: { disabled: !!disabled }
|
|
3303
3315
|
},
|
|
3304
3316
|
content
|
|
3305
|
-
), showSeparator ? /* @__PURE__ */
|
|
3317
|
+
), showSeparator ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles25.separator, { backgroundColor: colors.separator }] }) : null);
|
|
3306
3318
|
}
|
|
3307
|
-
return /* @__PURE__ */
|
|
3319
|
+
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);
|
|
3308
3320
|
}
|
|
3309
|
-
var ListItem =
|
|
3321
|
+
var ListItem = React55__default.default.memo(ListItemBase);
|
|
3310
3322
|
var styles25 = reactNative.StyleSheet.create({
|
|
3311
3323
|
container: {
|
|
3312
3324
|
flexDirection: "row",
|
|
@@ -3371,19 +3383,19 @@ var styles25 = reactNative.StyleSheet.create({
|
|
|
3371
3383
|
opacity: 0.45
|
|
3372
3384
|
}
|
|
3373
3385
|
});
|
|
3374
|
-
function
|
|
3386
|
+
function ItemGroup({ children, variant = "plain", childPropKey, style }) {
|
|
3375
3387
|
const { colors } = useTheme();
|
|
3376
|
-
const processedChildren =
|
|
3377
|
-
if (!
|
|
3378
|
-
if (child.type ===
|
|
3388
|
+
const processedChildren = React55__default.default.Children.map(children, (child, index) => {
|
|
3389
|
+
if (!React55__default.default.isValidElement(child)) return child;
|
|
3390
|
+
if (child.type === ItemGroupHeader || child.type === ItemGroupFooter) {
|
|
3379
3391
|
return child;
|
|
3380
3392
|
}
|
|
3381
3393
|
const childProps = child.props;
|
|
3382
|
-
const
|
|
3383
|
-
if (!
|
|
3384
|
-
const isLast = index ===
|
|
3394
|
+
const isTargetChild = childPropKey in childProps;
|
|
3395
|
+
if (!isTargetChild) return child;
|
|
3396
|
+
const isLast = index === React55__default.default.Children.count(children) - 1;
|
|
3385
3397
|
if (childProps["showSeparator"] === void 0 && !isLast) {
|
|
3386
|
-
return
|
|
3398
|
+
return React55__default.default.cloneElement(child, {
|
|
3387
3399
|
showSeparator: true
|
|
3388
3400
|
});
|
|
3389
3401
|
}
|
|
@@ -3401,24 +3413,22 @@ function ListGroup({ children, variant = "plain", style }) {
|
|
|
3401
3413
|
elevation: 2,
|
|
3402
3414
|
paddingVertical: vs(4)
|
|
3403
3415
|
} : {};
|
|
3404
|
-
return /* @__PURE__ */
|
|
3416
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles26.container, cardStyle, style] }, processedChildren);
|
|
3405
3417
|
}
|
|
3406
|
-
function
|
|
3418
|
+
function ItemGroupHeader({ children, style }) {
|
|
3407
3419
|
const { colors } = useTheme();
|
|
3408
3420
|
if (typeof children === "string") {
|
|
3409
|
-
return /* @__PURE__ */
|
|
3421
|
+
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));
|
|
3410
3422
|
}
|
|
3411
|
-
return /* @__PURE__ */
|
|
3423
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles26.header, { borderBottomColor: colors.separator }, style] }, children);
|
|
3412
3424
|
}
|
|
3413
|
-
function
|
|
3425
|
+
function ItemGroupFooter({ children, style }) {
|
|
3414
3426
|
const { colors } = useTheme();
|
|
3415
3427
|
if (typeof children === "string") {
|
|
3416
|
-
return /* @__PURE__ */
|
|
3428
|
+
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));
|
|
3417
3429
|
}
|
|
3418
|
-
return /* @__PURE__ */
|
|
3430
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles26.footer, style] }, children);
|
|
3419
3431
|
}
|
|
3420
|
-
ListGroup.Header = ListGroupHeader;
|
|
3421
|
-
ListGroup.Footer = ListGroupFooter;
|
|
3422
3432
|
var styles26 = reactNative.StyleSheet.create({
|
|
3423
3433
|
container: {
|
|
3424
3434
|
overflow: "hidden"
|
|
@@ -3445,6 +3455,13 @@ var styles26 = reactNative.StyleSheet.create({
|
|
|
3445
3455
|
fontSize: 12
|
|
3446
3456
|
}
|
|
3447
3457
|
});
|
|
3458
|
+
|
|
3459
|
+
// src/components/ListGroup/index.tsx
|
|
3460
|
+
function ListGroup(props) {
|
|
3461
|
+
return /* @__PURE__ */ React55__default.default.createElement(ItemGroup, { childPropKey: "title", ...props });
|
|
3462
|
+
}
|
|
3463
|
+
ListGroup.Header = ItemGroupHeader;
|
|
3464
|
+
ListGroup.Footer = ItemGroupFooter;
|
|
3448
3465
|
function MenuItemBase({
|
|
3449
3466
|
label,
|
|
3450
3467
|
subtitle,
|
|
@@ -3467,7 +3484,7 @@ function MenuItemBase({
|
|
|
3467
3484
|
selectionAsync();
|
|
3468
3485
|
onPress();
|
|
3469
3486
|
};
|
|
3470
|
-
const resolvedIcon = iconName ? /* @__PURE__ */
|
|
3487
|
+
const resolvedIcon = iconName ? /* @__PURE__ */ React55__default.default.createElement(Icon, { name: iconName, size: 22, color: iconColor ?? colors.foreground }) : icon;
|
|
3471
3488
|
const cardStyle = variant === "card" ? {
|
|
3472
3489
|
backgroundColor: colors.card,
|
|
3473
3490
|
borderRadius: RADIUS.md,
|
|
@@ -3480,7 +3497,7 @@ function MenuItemBase({
|
|
|
3480
3497
|
elevation: 2
|
|
3481
3498
|
} : {};
|
|
3482
3499
|
const a11yLabel = accessibilityLabel ?? (subtitle ? `${label}. ${subtitle}` : label);
|
|
3483
|
-
return /* @__PURE__ */
|
|
3500
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: disabled && styles27.disabled }, /* @__PURE__ */ React55__default.default.createElement(
|
|
3484
3501
|
PressableRow,
|
|
3485
3502
|
{
|
|
3486
3503
|
style: [styles27.container, cardStyle, style],
|
|
@@ -3494,8 +3511,8 @@ function MenuItemBase({
|
|
|
3494
3511
|
accessibilityHint,
|
|
3495
3512
|
accessibilityState: { disabled }
|
|
3496
3513
|
},
|
|
3497
|
-
resolvedIcon ? /* @__PURE__ */
|
|
3498
|
-
/* @__PURE__ */
|
|
3514
|
+
resolvedIcon ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles27.iconContainer }, resolvedIcon) : null,
|
|
3515
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles27.labelContainer }, /* @__PURE__ */ React55__default.default.createElement(
|
|
3499
3516
|
reactNative.Text,
|
|
3500
3517
|
{
|
|
3501
3518
|
style: [styles27.label, { color: colors.foreground }, labelStyle],
|
|
@@ -3503,7 +3520,7 @@ function MenuItemBase({
|
|
|
3503
3520
|
allowFontScaling: true
|
|
3504
3521
|
},
|
|
3505
3522
|
label
|
|
3506
|
-
), subtitle ? /* @__PURE__ */
|
|
3523
|
+
), subtitle ? /* @__PURE__ */ React55__default.default.createElement(
|
|
3507
3524
|
reactNative.Text,
|
|
3508
3525
|
{
|
|
3509
3526
|
style: [styles27.subtitle, { color: colors.foregroundMuted }],
|
|
@@ -3512,7 +3529,7 @@ function MenuItemBase({
|
|
|
3512
3529
|
},
|
|
3513
3530
|
subtitle
|
|
3514
3531
|
) : null),
|
|
3515
|
-
rightRender !== void 0 ? /* @__PURE__ */
|
|
3532
|
+
rightRender !== void 0 ? /* @__PURE__ */ React55__default.default.createElement(
|
|
3516
3533
|
reactNative.View,
|
|
3517
3534
|
{
|
|
3518
3535
|
style: styles27.rightContainer,
|
|
@@ -3521,10 +3538,10 @@ function MenuItemBase({
|
|
|
3521
3538
|
}
|
|
3522
3539
|
},
|
|
3523
3540
|
rightRender
|
|
3524
|
-
) : showChevron ? /* @__PURE__ */
|
|
3525
|
-
), showSeparator ? /* @__PURE__ */
|
|
3541
|
+
) : showChevron ? /* @__PURE__ */ React55__default.default.createElement(vectorIcons.Entypo, { name: "chevron-right", size: 18, color: colors.foregroundMuted }) : null
|
|
3542
|
+
), showSeparator ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles27.separator, { backgroundColor: colors.separator }] }) : null);
|
|
3526
3543
|
}
|
|
3527
|
-
var MenuItem =
|
|
3544
|
+
var MenuItem = React55__default.default.memo(MenuItemBase);
|
|
3528
3545
|
var styles27 = reactNative.StyleSheet.create({
|
|
3529
3546
|
container: {
|
|
3530
3547
|
flexDirection: "row",
|
|
@@ -3566,88 +3583,19 @@ var styles27 = reactNative.StyleSheet.create({
|
|
|
3566
3583
|
opacity: 0.45
|
|
3567
3584
|
}
|
|
3568
3585
|
});
|
|
3569
|
-
function MenuGroup(
|
|
3570
|
-
|
|
3571
|
-
const processedChildren = React54__default.default.Children.map(children, (child, index) => {
|
|
3572
|
-
if (!React54__default.default.isValidElement(child)) return child;
|
|
3573
|
-
if (child.type === MenuGroupHeader || child.type === MenuGroupFooter) {
|
|
3574
|
-
return child;
|
|
3575
|
-
}
|
|
3576
|
-
const childProps = child.props;
|
|
3577
|
-
const isMenuItem = "onPress" in childProps;
|
|
3578
|
-
if (!isMenuItem) return child;
|
|
3579
|
-
const isLast = index === React54__default.default.Children.count(children) - 1;
|
|
3580
|
-
if (childProps["showSeparator"] === void 0 && !isLast) {
|
|
3581
|
-
return React54__default.default.cloneElement(child, {
|
|
3582
|
-
showSeparator: true
|
|
3583
|
-
});
|
|
3584
|
-
}
|
|
3585
|
-
return child;
|
|
3586
|
-
});
|
|
3587
|
-
const cardStyle = variant === "card" ? {
|
|
3588
|
-
backgroundColor: colors.card,
|
|
3589
|
-
borderRadius: RADIUS.md,
|
|
3590
|
-
borderWidth: 1,
|
|
3591
|
-
borderColor: colors.border,
|
|
3592
|
-
shadowColor: "#000",
|
|
3593
|
-
shadowOffset: { width: 0, height: 2 },
|
|
3594
|
-
shadowOpacity: 0.06,
|
|
3595
|
-
shadowRadius: 6,
|
|
3596
|
-
elevation: 2,
|
|
3597
|
-
paddingVertical: vs(4)
|
|
3598
|
-
} : {};
|
|
3599
|
-
return /* @__PURE__ */ React54__default.default.createElement(reactNative.View, { style: [styles28.container, cardStyle, style] }, processedChildren);
|
|
3586
|
+
function MenuGroup(props) {
|
|
3587
|
+
return /* @__PURE__ */ React55__default.default.createElement(ItemGroup, { childPropKey: "onPress", ...props });
|
|
3600
3588
|
}
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
if (typeof children === "string") {
|
|
3604
|
-
return /* @__PURE__ */ React54__default.default.createElement(reactNative.View, { style: [styles28.header, { borderBottomColor: colors.separator }, style] }, /* @__PURE__ */ React54__default.default.createElement(reactNative.Text, { style: [styles28.headerText, { color: colors.foregroundMuted }], allowFontScaling: true }, children));
|
|
3605
|
-
}
|
|
3606
|
-
return /* @__PURE__ */ React54__default.default.createElement(reactNative.View, { style: [styles28.header, { borderBottomColor: colors.separator }, style] }, children);
|
|
3607
|
-
}
|
|
3608
|
-
function MenuGroupFooter({ children, style }) {
|
|
3609
|
-
const { colors } = useTheme();
|
|
3610
|
-
if (typeof children === "string") {
|
|
3611
|
-
return /* @__PURE__ */ React54__default.default.createElement(reactNative.View, { style: [styles28.footer, style] }, /* @__PURE__ */ React54__default.default.createElement(reactNative.Text, { style: [styles28.footerText, { color: colors.foregroundMuted }], allowFontScaling: true }, children));
|
|
3612
|
-
}
|
|
3613
|
-
return /* @__PURE__ */ React54__default.default.createElement(reactNative.View, { style: [styles28.footer, style] }, children);
|
|
3614
|
-
}
|
|
3615
|
-
MenuGroup.Header = MenuGroupHeader;
|
|
3616
|
-
MenuGroup.Footer = MenuGroupFooter;
|
|
3617
|
-
var styles28 = reactNative.StyleSheet.create({
|
|
3618
|
-
container: {
|
|
3619
|
-
overflow: "hidden"
|
|
3620
|
-
},
|
|
3621
|
-
header: {
|
|
3622
|
-
paddingHorizontal: s(16),
|
|
3623
|
-
paddingTop: vs(12),
|
|
3624
|
-
paddingBottom: vs(8),
|
|
3625
|
-
borderBottomWidth: reactNative.StyleSheet.hairlineWidth
|
|
3626
|
-
},
|
|
3627
|
-
headerText: {
|
|
3628
|
-
fontFamily: "Sohne-SemiBold",
|
|
3629
|
-
fontSize: 13,
|
|
3630
|
-
letterSpacing: 0.32,
|
|
3631
|
-
textTransform: "uppercase"
|
|
3632
|
-
},
|
|
3633
|
-
footer: {
|
|
3634
|
-
paddingHorizontal: s(16),
|
|
3635
|
-
paddingTop: vs(8),
|
|
3636
|
-
paddingBottom: vs(12)
|
|
3637
|
-
},
|
|
3638
|
-
footerText: {
|
|
3639
|
-
fontFamily: "Sohne-Regular",
|
|
3640
|
-
fontSize: 12
|
|
3641
|
-
}
|
|
3642
|
-
});
|
|
3589
|
+
MenuGroup.Header = ItemGroupHeader;
|
|
3590
|
+
MenuGroup.Footer = ItemGroupFooter;
|
|
3643
3591
|
function ChipBase({ label, selected = false, onPress, icon, iconName, style, accessibilityLabel }) {
|
|
3644
3592
|
const { colors } = useTheme();
|
|
3645
3593
|
const handlePress = () => {
|
|
3646
3594
|
selectionAsync();
|
|
3647
3595
|
onPress?.();
|
|
3648
3596
|
};
|
|
3649
|
-
const resolvedIcon = iconName ? /* @__PURE__ */
|
|
3650
|
-
return /* @__PURE__ */
|
|
3597
|
+
const resolvedIcon = iconName ? /* @__PURE__ */ React55__default.default.createElement(Icon, { name: iconName, size: ms(13), color: selected ? colors.primaryForeground : colors.foreground }) : icon;
|
|
3598
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles28.wrapper, style] }, /* @__PURE__ */ React55__default.default.createElement(
|
|
3651
3599
|
PressableChip,
|
|
3652
3600
|
{
|
|
3653
3601
|
onPress: handlePress,
|
|
@@ -3657,21 +3605,21 @@ function ChipBase({ label, selected = false, onPress, icon, iconName, style, acc
|
|
|
3657
3605
|
accessibilityLabel: accessibilityLabel ?? label,
|
|
3658
3606
|
accessibilityState: { selected }
|
|
3659
3607
|
},
|
|
3660
|
-
/* @__PURE__ */
|
|
3608
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
3661
3609
|
reactNativeEase.EaseView,
|
|
3662
3610
|
{
|
|
3663
|
-
style:
|
|
3611
|
+
style: styles28.chip,
|
|
3664
3612
|
animate: {
|
|
3665
3613
|
backgroundColor: selected ? colors.primary : colors.surface,
|
|
3666
3614
|
borderColor: selected ? colors.primary : colors.border
|
|
3667
3615
|
},
|
|
3668
3616
|
transition: COLOR_TRANSITION
|
|
3669
3617
|
},
|
|
3670
|
-
resolvedIcon ? /* @__PURE__ */
|
|
3671
|
-
/* @__PURE__ */
|
|
3618
|
+
resolvedIcon ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles28.chipIcon }, resolvedIcon) : null,
|
|
3619
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
3672
3620
|
reactNative.Text,
|
|
3673
3621
|
{
|
|
3674
|
-
style: [
|
|
3622
|
+
style: [styles28.label, { color: selected ? colors.primaryForeground : colors.foreground }],
|
|
3675
3623
|
allowFontScaling: true
|
|
3676
3624
|
},
|
|
3677
3625
|
label
|
|
@@ -3679,7 +3627,7 @@ function ChipBase({ label, selected = false, onPress, icon, iconName, style, acc
|
|
|
3679
3627
|
)
|
|
3680
3628
|
));
|
|
3681
3629
|
}
|
|
3682
|
-
var Chip =
|
|
3630
|
+
var Chip = React55__default.default.memo(ChipBase);
|
|
3683
3631
|
function ChipGroup({ options, value, onValueChange, multiSelect = false, style }) {
|
|
3684
3632
|
const handlePress = (optionValue) => {
|
|
3685
3633
|
if (!multiSelect) {
|
|
@@ -3695,7 +3643,7 @@ function ChipGroup({ options, value, onValueChange, multiSelect = false, style }
|
|
|
3695
3643
|
if (Array.isArray(value)) return value.includes(optionValue);
|
|
3696
3644
|
return optionValue === value;
|
|
3697
3645
|
};
|
|
3698
|
-
return /* @__PURE__ */
|
|
3646
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles28.group, style] }, options.map((opt) => /* @__PURE__ */ React55__default.default.createElement(
|
|
3699
3647
|
Chip,
|
|
3700
3648
|
{
|
|
3701
3649
|
key: opt.value,
|
|
@@ -3703,12 +3651,12 @@ function ChipGroup({ options, value, onValueChange, multiSelect = false, style }
|
|
|
3703
3651
|
selected: isSelected2(opt.value),
|
|
3704
3652
|
onPress: opt.disabled ? void 0 : () => handlePress(opt.value),
|
|
3705
3653
|
iconName: opt.iconName,
|
|
3706
|
-
style: opt.disabled ?
|
|
3654
|
+
style: opt.disabled ? styles28.chipDisabled : void 0,
|
|
3707
3655
|
accessibilityLabel: opt.disabled ? `${opt.label}, no disponible` : opt.label
|
|
3708
3656
|
}
|
|
3709
3657
|
)));
|
|
3710
3658
|
}
|
|
3711
|
-
var
|
|
3659
|
+
var styles28 = reactNative.StyleSheet.create({
|
|
3712
3660
|
wrapper: {},
|
|
3713
3661
|
chip: {
|
|
3714
3662
|
borderRadius: RADIUS.full,
|
|
@@ -3756,36 +3704,10 @@ function ConfirmDialog({
|
|
|
3756
3704
|
}) {
|
|
3757
3705
|
const { colors } = useTheme();
|
|
3758
3706
|
const insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
3759
|
-
const ref =
|
|
3760
|
-
const
|
|
3761
|
-
const
|
|
3762
|
-
|
|
3763
|
-
const [tick, setTick] = React54.useState(0);
|
|
3764
|
-
React54.useEffect(() => {
|
|
3765
|
-
onCancelRef.current = onCancel;
|
|
3766
|
-
}, [onCancel]);
|
|
3767
|
-
const handleDismiss = React54.useCallback(() => {
|
|
3768
|
-
dialogState.current = "idle";
|
|
3769
|
-
onCancelRef.current?.();
|
|
3770
|
-
setTick((t) => t + 1);
|
|
3771
|
-
}, []);
|
|
3772
|
-
React54.useEffect(() => {
|
|
3773
|
-
if (visible) {
|
|
3774
|
-
if (dialogState.current === "idle") {
|
|
3775
|
-
dialogState.current = "presenting";
|
|
3776
|
-
impactMedium();
|
|
3777
|
-
ref.current?.present();
|
|
3778
|
-
dialogState.current = "presented";
|
|
3779
|
-
}
|
|
3780
|
-
} else {
|
|
3781
|
-
if (dialogState.current === "presented" || dialogState.current === "presenting") {
|
|
3782
|
-
dialogState.current = "dismissing";
|
|
3783
|
-
ref.current?.dismiss();
|
|
3784
|
-
}
|
|
3785
|
-
}
|
|
3786
|
-
}, [visible, tick]);
|
|
3787
|
-
const renderBackdrop = React54.useCallback(
|
|
3788
|
-
(props) => /* @__PURE__ */ React54__default.default.createElement(
|
|
3707
|
+
const { ref, handleDismiss } = useSheetModal(visible, onCancel);
|
|
3708
|
+
const name = React55.useId();
|
|
3709
|
+
const renderBackdrop = React55.useCallback(
|
|
3710
|
+
(props) => /* @__PURE__ */ React55__default.default.createElement(
|
|
3789
3711
|
bottomSheet.BottomSheetBackdrop,
|
|
3790
3712
|
{
|
|
3791
3713
|
...props,
|
|
@@ -3796,7 +3718,7 @@ function ConfirmDialog({
|
|
|
3796
3718
|
),
|
|
3797
3719
|
[]
|
|
3798
3720
|
);
|
|
3799
|
-
return /* @__PURE__ */
|
|
3721
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
3800
3722
|
bottomSheet.BottomSheetModal,
|
|
3801
3723
|
{
|
|
3802
3724
|
ref,
|
|
@@ -3804,24 +3726,24 @@ function ConfirmDialog({
|
|
|
3804
3726
|
onDismiss: handleDismiss,
|
|
3805
3727
|
enableDynamicSizing: true,
|
|
3806
3728
|
backdropComponent: renderBackdrop,
|
|
3807
|
-
backgroundStyle: { ...
|
|
3808
|
-
handleIndicatorStyle: { ...
|
|
3729
|
+
backgroundStyle: { ...styles29.background, backgroundColor: colors.card },
|
|
3730
|
+
handleIndicatorStyle: { ...styles29.handle, backgroundColor: colors.border },
|
|
3809
3731
|
enablePanDownToClose: true,
|
|
3810
3732
|
topInset: insets.top
|
|
3811
3733
|
},
|
|
3812
|
-
/* @__PURE__ */
|
|
3734
|
+
/* @__PURE__ */ React55__default.default.createElement(bottomSheet.BottomSheetView, { style: styles29.content }, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles29.header, accessibilityRole: "header" }, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles29.headerRow }, /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles29.title, { color: colors.foreground }], allowFontScaling: true }, title), showCloseButton ? /* @__PURE__ */ React55__default.default.createElement(
|
|
3813
3735
|
reactNative.TouchableOpacity,
|
|
3814
3736
|
{
|
|
3815
3737
|
onPress: onCancel,
|
|
3816
|
-
style:
|
|
3738
|
+
style: styles29.closeButton,
|
|
3817
3739
|
activeOpacity: 0.6,
|
|
3818
3740
|
touchSoundDisabled: true,
|
|
3819
3741
|
accessibilityRole: "button",
|
|
3820
3742
|
accessibilityLabel: "Cerrar",
|
|
3821
3743
|
hitSlop: { top: 12, bottom: 12, left: 12, right: 12 }
|
|
3822
3744
|
},
|
|
3823
|
-
/* @__PURE__ */
|
|
3824
|
-
) : null), subtitle ? /* @__PURE__ */
|
|
3745
|
+
/* @__PURE__ */ React55__default.default.createElement(vectorIcons.Feather, { name: "x", size: ms(18), color: colors.foregroundMuted })
|
|
3746
|
+
) : null), subtitle ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles29.subtitle, { color: colors.foregroundMuted }], allowFontScaling: true }, subtitle) : null), /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles29.actions }, /* @__PURE__ */ React55__default.default.createElement(
|
|
3825
3747
|
Button,
|
|
3826
3748
|
{
|
|
3827
3749
|
label: confirmLabel,
|
|
@@ -3834,7 +3756,7 @@ function ConfirmDialog({
|
|
|
3834
3756
|
onConfirm();
|
|
3835
3757
|
},
|
|
3836
3758
|
accessibilityHint,
|
|
3837
|
-
icon: /* @__PURE__ */
|
|
3759
|
+
icon: /* @__PURE__ */ React55__default.default.createElement(
|
|
3838
3760
|
vectorIcons.Feather,
|
|
3839
3761
|
{
|
|
3840
3762
|
name: confirmVariant === "destructive" ? "trash-2" : "check",
|
|
@@ -3843,7 +3765,7 @@ function ConfirmDialog({
|
|
|
3843
3765
|
}
|
|
3844
3766
|
)
|
|
3845
3767
|
}
|
|
3846
|
-
), /* @__PURE__ */
|
|
3768
|
+
), /* @__PURE__ */ React55__default.default.createElement(
|
|
3847
3769
|
Button,
|
|
3848
3770
|
{
|
|
3849
3771
|
label: cancelLabel,
|
|
@@ -3853,12 +3775,12 @@ function ConfirmDialog({
|
|
|
3853
3775
|
selectionAsync();
|
|
3854
3776
|
onCancel();
|
|
3855
3777
|
},
|
|
3856
|
-
icon: /* @__PURE__ */
|
|
3778
|
+
icon: /* @__PURE__ */ React55__default.default.createElement(vectorIcons.Feather, { name: "x", size: 15, color: colors.foreground })
|
|
3857
3779
|
}
|
|
3858
3780
|
)))
|
|
3859
3781
|
);
|
|
3860
3782
|
}
|
|
3861
|
-
var
|
|
3783
|
+
var styles29 = reactNative.StyleSheet.create({
|
|
3862
3784
|
background: {
|
|
3863
3785
|
borderTopLeftRadius: ms(16),
|
|
3864
3786
|
borderTopRightRadius: ms(16)
|
|
@@ -3903,11 +3825,11 @@ var styles30 = reactNative.StyleSheet.create({
|
|
|
3903
3825
|
});
|
|
3904
3826
|
function LabelValueBase({ label, value, iconName, iconColor, style }) {
|
|
3905
3827
|
const { colors } = useTheme();
|
|
3906
|
-
const resolvedIcon = iconName ? /* @__PURE__ */
|
|
3907
|
-
return /* @__PURE__ */
|
|
3828
|
+
const resolvedIcon = iconName ? /* @__PURE__ */ React55__default.default.createElement(Icon, { name: iconName, size: ms(14), color: iconColor ?? colors.foregroundMuted }) : null;
|
|
3829
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles30.container, style] }, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles30.labelSide }, resolvedIcon ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles30.icon }, resolvedIcon) : null, /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles30.label, { color: colors.foregroundMuted }], allowFontScaling: true }, label)), typeof value === "string" ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles30.value, { color: colors.foreground }], allowFontScaling: true }, value) : value);
|
|
3908
3830
|
}
|
|
3909
|
-
var LabelValue =
|
|
3910
|
-
var
|
|
3831
|
+
var LabelValue = React55__default.default.memo(LabelValueBase);
|
|
3832
|
+
var styles30 = reactNative.StyleSheet.create({
|
|
3911
3833
|
container: {
|
|
3912
3834
|
flexDirection: "row",
|
|
3913
3835
|
justifyContent: "space-between",
|
|
@@ -3971,10 +3893,10 @@ function MonthPicker({ value, onChange, minValue, maxValue, locale = "en", forma
|
|
|
3971
3893
|
selectionAsync();
|
|
3972
3894
|
onChange(fromIndex(index + 1));
|
|
3973
3895
|
};
|
|
3974
|
-
return /* @__PURE__ */
|
|
3896
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles31.container, style], accessibilityRole: "adjustable", accessibilityLabel: getLabel() }, /* @__PURE__ */ React55__default.default.createElement(
|
|
3975
3897
|
reactNative.TouchableOpacity,
|
|
3976
3898
|
{
|
|
3977
|
-
style: [
|
|
3899
|
+
style: [styles31.arrow, prevDisabled && styles31.arrowDisabled],
|
|
3978
3900
|
onPress: handlePrev,
|
|
3979
3901
|
disabled: prevDisabled,
|
|
3980
3902
|
activeOpacity: 0.6,
|
|
@@ -3984,19 +3906,19 @@ function MonthPicker({ value, onChange, minValue, maxValue, locale = "en", forma
|
|
|
3984
3906
|
accessibilityState: { disabled: prevDisabled },
|
|
3985
3907
|
hitSlop: { top: 8, bottom: 8, left: 8, right: 8 }
|
|
3986
3908
|
},
|
|
3987
|
-
/* @__PURE__ */
|
|
3988
|
-
), /* @__PURE__ */
|
|
3909
|
+
/* @__PURE__ */ React55__default.default.createElement(vectorIcons.Entypo, { name: "chevron-left", size: 22, color: colors.foreground })
|
|
3910
|
+
), /* @__PURE__ */ React55__default.default.createElement(
|
|
3989
3911
|
reactNative.Text,
|
|
3990
3912
|
{
|
|
3991
|
-
style: [
|
|
3913
|
+
style: [styles31.label, { color: colors.foreground }],
|
|
3992
3914
|
allowFontScaling: true,
|
|
3993
3915
|
accessibilityLiveRegion: "polite"
|
|
3994
3916
|
},
|
|
3995
3917
|
getLabel()
|
|
3996
|
-
), /* @__PURE__ */
|
|
3918
|
+
), /* @__PURE__ */ React55__default.default.createElement(
|
|
3997
3919
|
reactNative.TouchableOpacity,
|
|
3998
3920
|
{
|
|
3999
|
-
style: [
|
|
3921
|
+
style: [styles31.arrow, nextDisabled && styles31.arrowDisabled],
|
|
4000
3922
|
onPress: handleNext,
|
|
4001
3923
|
disabled: nextDisabled,
|
|
4002
3924
|
activeOpacity: 0.6,
|
|
@@ -4006,10 +3928,10 @@ function MonthPicker({ value, onChange, minValue, maxValue, locale = "en", forma
|
|
|
4006
3928
|
accessibilityState: { disabled: nextDisabled },
|
|
4007
3929
|
hitSlop: { top: 8, bottom: 8, left: 8, right: 8 }
|
|
4008
3930
|
},
|
|
4009
|
-
/* @__PURE__ */
|
|
3931
|
+
/* @__PURE__ */ React55__default.default.createElement(vectorIcons.Entypo, { name: "chevron-right", size: 22, color: colors.foreground })
|
|
4010
3932
|
));
|
|
4011
3933
|
}
|
|
4012
|
-
var
|
|
3934
|
+
var styles31 = reactNative.StyleSheet.create({
|
|
4013
3935
|
container: {
|
|
4014
3936
|
flexDirection: "row",
|
|
4015
3937
|
alignItems: "center",
|
|
@@ -4032,6 +3954,39 @@ var styles32 = reactNative.StyleSheet.create({
|
|
|
4032
3954
|
minWidth: s(160)
|
|
4033
3955
|
}
|
|
4034
3956
|
});
|
|
3957
|
+
function Pressable({
|
|
3958
|
+
children,
|
|
3959
|
+
onPress,
|
|
3960
|
+
pressScale: _pressScale = PRESS_SCALE.card,
|
|
3961
|
+
haptics = true,
|
|
3962
|
+
style,
|
|
3963
|
+
disabled,
|
|
3964
|
+
hoverScale: _hoverScale = 1.02,
|
|
3965
|
+
accessibilityRole,
|
|
3966
|
+
accessibilityState,
|
|
3967
|
+
accessibilityLabel
|
|
3968
|
+
}) {
|
|
3969
|
+
const handlePress = () => {
|
|
3970
|
+
if (disabled || !onPress) return;
|
|
3971
|
+
if (haptics) impactLight();
|
|
3972
|
+
onPress();
|
|
3973
|
+
};
|
|
3974
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
3975
|
+
PressableCard,
|
|
3976
|
+
{
|
|
3977
|
+
style,
|
|
3978
|
+
onPress: handlePress,
|
|
3979
|
+
enabled: !disabled,
|
|
3980
|
+
rippleColor: "transparent",
|
|
3981
|
+
touchSoundDisabled: true,
|
|
3982
|
+
activateOnHover: true,
|
|
3983
|
+
accessibilityRole: accessibilityRole ?? "button",
|
|
3984
|
+
accessibilityState: accessibilityState ?? { disabled: !!disabled },
|
|
3985
|
+
accessibilityLabel
|
|
3986
|
+
},
|
|
3987
|
+
children
|
|
3988
|
+
);
|
|
3989
|
+
}
|
|
4035
3990
|
var aspectRatioMap2 = {
|
|
4036
3991
|
"1:1": 1,
|
|
4037
3992
|
"4:3": 3 / 4,
|
|
@@ -4063,19 +4018,19 @@ function MediaCardBase({
|
|
|
4063
4018
|
onPress();
|
|
4064
4019
|
};
|
|
4065
4020
|
const ratio = aspectRatioMap2[aspectRatio];
|
|
4066
|
-
const resolvedActionIcon = actionIconName ? /* @__PURE__ */
|
|
4021
|
+
const resolvedActionIcon = actionIconName ? /* @__PURE__ */ React55__default.default.createElement(Icon, { name: actionIconName, size: 18, color: actionActive ? colors.primary : colors.background }) : actionIcon ?? /* @__PURE__ */ React55__default.default.createElement(Icon, { name: "heart", size: 18, color: actionActive ? colors.primary : colors.background });
|
|
4067
4022
|
const a11yLabel = accessibilityLabel ?? [title, subtitle].filter(Boolean).join(". ");
|
|
4068
|
-
const cardContent = /* @__PURE__ */
|
|
4023
|
+
const cardContent = /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles32.card, style] }, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles32.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(
|
|
4069
4024
|
expoImage.Image,
|
|
4070
4025
|
{
|
|
4071
4026
|
source: imageSource,
|
|
4072
|
-
style:
|
|
4027
|
+
style: styles32.image,
|
|
4073
4028
|
contentFit: "cover"
|
|
4074
4029
|
}
|
|
4075
|
-
) : /* @__PURE__ */
|
|
4030
|
+
) : /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles32.imagePlaceholder, { backgroundColor: colors.surface }] }))), badge && /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles32.badgeContainer }, badge), (onActionPress || actionIcon || actionIconName) && /* @__PURE__ */ React55__default.default.createElement(
|
|
4076
4031
|
reactNative.TouchableOpacity,
|
|
4077
4032
|
{
|
|
4078
|
-
style: [
|
|
4033
|
+
style: [styles32.actionButton, { backgroundColor: "rgba(0,0,0,0.24)" }],
|
|
4079
4034
|
onPress: (e) => {
|
|
4080
4035
|
e?.stopPropagation?.();
|
|
4081
4036
|
impactLight();
|
|
@@ -4088,9 +4043,9 @@ function MediaCardBase({
|
|
|
4088
4043
|
accessibilityState: { selected: actionActive }
|
|
4089
4044
|
},
|
|
4090
4045
|
resolvedActionIcon
|
|
4091
|
-
)), (title || subtitle || caption || footer) && /* @__PURE__ */
|
|
4046
|
+
)), (title || subtitle || caption || footer) && /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles32.meta }, title ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles32.title, { color: colors.foreground }], numberOfLines: 2, allowFontScaling: true }, title) : null, subtitle ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles32.subtitle, { color: colors.foregroundSubtle }], numberOfLines: 1, allowFontScaling: true }, subtitle) : null, caption ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles32.caption, { color: colors.foregroundMuted }], numberOfLines: 1, allowFontScaling: true }, caption) : null, footer));
|
|
4092
4047
|
if (onPress) {
|
|
4093
|
-
return /* @__PURE__ */
|
|
4048
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
4094
4049
|
PressableCard,
|
|
4095
4050
|
{
|
|
4096
4051
|
onPress: handlePress,
|
|
@@ -4107,8 +4062,8 @@ function MediaCardBase({
|
|
|
4107
4062
|
}
|
|
4108
4063
|
return cardContent;
|
|
4109
4064
|
}
|
|
4110
|
-
var MediaCard =
|
|
4111
|
-
var
|
|
4065
|
+
var MediaCard = React55__default.default.memo(MediaCardBase);
|
|
4066
|
+
var styles32 = reactNative.StyleSheet.create({
|
|
4112
4067
|
card: {
|
|
4113
4068
|
borderRadius: RADIUS.md,
|
|
4114
4069
|
overflow: "hidden",
|
|
@@ -4162,15 +4117,15 @@ var styles33 = reactNative.StyleSheet.create({
|
|
|
4162
4117
|
lineHeight: mvs(16)
|
|
4163
4118
|
}
|
|
4164
4119
|
});
|
|
4165
|
-
var CategoryChip =
|
|
4120
|
+
var CategoryChip = React55__default.default.memo(function CategoryChip2({
|
|
4166
4121
|
item,
|
|
4167
4122
|
selected,
|
|
4168
4123
|
onSelect
|
|
4169
4124
|
}) {
|
|
4170
4125
|
const { colors } = useTheme();
|
|
4171
4126
|
const iconColor = selected ? colors.primaryForeground : colors.foregroundSubtle;
|
|
4172
|
-
const resolvedIcon = typeof item.icon === "string" ? /* @__PURE__ */
|
|
4173
|
-
return /* @__PURE__ */
|
|
4127
|
+
const resolvedIcon = typeof item.icon === "string" ? /* @__PURE__ */ React55__default.default.createElement(Icon, { name: item.icon, size: 16, color: iconColor }) : item.icon ?? null;
|
|
4128
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
4174
4129
|
PressableChip,
|
|
4175
4130
|
{
|
|
4176
4131
|
onPress: () => onSelect(item.value),
|
|
@@ -4182,26 +4137,26 @@ var CategoryChip = React54__default.default.memo(function CategoryChip2({
|
|
|
4182
4137
|
accessibilityLabel: item.label,
|
|
4183
4138
|
accessibilityState: { selected }
|
|
4184
4139
|
},
|
|
4185
|
-
/* @__PURE__ */
|
|
4140
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
4186
4141
|
reactNativeEase.EaseView,
|
|
4187
4142
|
{
|
|
4188
|
-
style:
|
|
4143
|
+
style: styles33.chip,
|
|
4189
4144
|
animate: {
|
|
4190
4145
|
backgroundColor: selected ? colors.primary : colors.surface,
|
|
4191
4146
|
borderColor: selected ? colors.primary : colors.border
|
|
4192
4147
|
},
|
|
4193
4148
|
transition: COLOR_TRANSITION
|
|
4194
4149
|
},
|
|
4195
|
-
resolvedIcon && /* @__PURE__ */
|
|
4196
|
-
/* @__PURE__ */
|
|
4150
|
+
resolvedIcon && /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles33.chipIcon }, resolvedIcon),
|
|
4151
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
4197
4152
|
reactNative.Text,
|
|
4198
4153
|
{
|
|
4199
|
-
style: [
|
|
4154
|
+
style: [styles33.chipLabel, { color: selected ? colors.primaryForeground : colors.foregroundSubtle }],
|
|
4200
4155
|
allowFontScaling: true
|
|
4201
4156
|
},
|
|
4202
4157
|
item.label
|
|
4203
4158
|
),
|
|
4204
|
-
item.badge !== void 0 && item.badge > 0 && /* @__PURE__ */
|
|
4159
|
+
item.badge !== void 0 && item.badge > 0 && /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles33.chipBadge, { backgroundColor: colors.primary }] }, /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles33.chipBadgeText, { color: colors.primaryForeground }] }, Math.min(item.badge, 99)))
|
|
4205
4160
|
)
|
|
4206
4161
|
);
|
|
4207
4162
|
});
|
|
@@ -4215,7 +4170,7 @@ function CategoryStrip({
|
|
|
4215
4170
|
accessibilityLabel
|
|
4216
4171
|
}) {
|
|
4217
4172
|
const selected = Array.isArray(value) ? value : value ? [value] : [];
|
|
4218
|
-
const handlePress =
|
|
4173
|
+
const handlePress = React55.useCallback(
|
|
4219
4174
|
(v) => {
|
|
4220
4175
|
selectionAsync();
|
|
4221
4176
|
if (multiSelect) {
|
|
@@ -4228,17 +4183,17 @@ function CategoryStrip({
|
|
|
4228
4183
|
},
|
|
4229
4184
|
[multiSelect, value, onValueChange]
|
|
4230
4185
|
);
|
|
4231
|
-
return /* @__PURE__ */
|
|
4186
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
4232
4187
|
reactNative.ScrollView,
|
|
4233
4188
|
{
|
|
4234
4189
|
horizontal: true,
|
|
4235
4190
|
showsHorizontalScrollIndicator: false,
|
|
4236
|
-
contentContainerStyle: [
|
|
4237
|
-
style:
|
|
4191
|
+
contentContainerStyle: [styles33.container, style],
|
|
4192
|
+
style: styles33.scroll,
|
|
4238
4193
|
accessibilityRole: multiSelect ? void 0 : "radiogroup",
|
|
4239
4194
|
accessibilityLabel
|
|
4240
4195
|
},
|
|
4241
|
-
categories.map((cat) => /* @__PURE__ */
|
|
4196
|
+
categories.map((cat) => /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { key: cat.value, style: itemStyle }, /* @__PURE__ */ React55__default.default.createElement(
|
|
4242
4197
|
CategoryChip,
|
|
4243
4198
|
{
|
|
4244
4199
|
item: cat,
|
|
@@ -4248,7 +4203,7 @@ function CategoryStrip({
|
|
|
4248
4203
|
)))
|
|
4249
4204
|
);
|
|
4250
4205
|
}
|
|
4251
|
-
var
|
|
4206
|
+
var styles33 = reactNative.StyleSheet.create({
|
|
4252
4207
|
scroll: {
|
|
4253
4208
|
flexGrow: 0
|
|
4254
4209
|
},
|
|
@@ -4289,39 +4244,6 @@ var styles34 = reactNative.StyleSheet.create({
|
|
|
4289
4244
|
lineHeight: 14
|
|
4290
4245
|
}
|
|
4291
4246
|
});
|
|
4292
|
-
function Pressable({
|
|
4293
|
-
children,
|
|
4294
|
-
onPress,
|
|
4295
|
-
pressScale: _pressScale = PRESS_SCALE.card,
|
|
4296
|
-
haptics = true,
|
|
4297
|
-
style,
|
|
4298
|
-
disabled,
|
|
4299
|
-
hoverScale: _hoverScale = 1.02,
|
|
4300
|
-
accessibilityRole,
|
|
4301
|
-
accessibilityState,
|
|
4302
|
-
accessibilityLabel
|
|
4303
|
-
}) {
|
|
4304
|
-
const handlePress = () => {
|
|
4305
|
-
if (disabled || !onPress) return;
|
|
4306
|
-
if (haptics) impactLight();
|
|
4307
|
-
onPress();
|
|
4308
|
-
};
|
|
4309
|
-
return /* @__PURE__ */ React54__default.default.createElement(
|
|
4310
|
-
PressableCard,
|
|
4311
|
-
{
|
|
4312
|
-
style,
|
|
4313
|
-
onPress: handlePress,
|
|
4314
|
-
enabled: !disabled,
|
|
4315
|
-
rippleColor: "transparent",
|
|
4316
|
-
touchSoundDisabled: true,
|
|
4317
|
-
activateOnHover: true,
|
|
4318
|
-
accessibilityRole: accessibilityRole ?? "button",
|
|
4319
|
-
accessibilityState: accessibilityState ?? { disabled: !!disabled },
|
|
4320
|
-
accessibilityLabel
|
|
4321
|
-
},
|
|
4322
|
-
children
|
|
4323
|
-
);
|
|
4324
|
-
}
|
|
4325
4247
|
var weightMap = {
|
|
4326
4248
|
normal: "Sohne-Regular",
|
|
4327
4249
|
medium: "Sohne-Medium",
|
|
@@ -4344,8 +4266,8 @@ function DetailRowBase({
|
|
|
4344
4266
|
valueStyle
|
|
4345
4267
|
}) {
|
|
4346
4268
|
const { colors } = useTheme();
|
|
4347
|
-
const resolvedLeftIcon = leftIconName ? /* @__PURE__ */
|
|
4348
|
-
const resolvedRightIcon = rightIconName ? /* @__PURE__ */
|
|
4269
|
+
const resolvedLeftIcon = leftIconName ? /* @__PURE__ */ React55__default.default.createElement(Icon, { name: leftIconName, size: ms(14), color: leftIconColor ?? colors.foregroundMuted }) : leftIcon;
|
|
4270
|
+
const resolvedRightIcon = rightIconName ? /* @__PURE__ */ React55__default.default.createElement(Icon, { name: rightIconName, size: ms(14), color: rightIconColor ?? colors.foregroundMuted }) : null;
|
|
4349
4271
|
const separatorStyle = separator === "none" ? null : {
|
|
4350
4272
|
flex: 1,
|
|
4351
4273
|
height: 1,
|
|
@@ -4354,24 +4276,24 @@ function DetailRowBase({
|
|
|
4354
4276
|
borderColor: "rgba(128,128,128,0.3)",
|
|
4355
4277
|
marginHorizontal: s(4)
|
|
4356
4278
|
};
|
|
4357
|
-
return /* @__PURE__ */
|
|
4279
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles34.row, style] }, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles34.labelSide }, resolvedLeftIcon ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles34.icon }, resolvedLeftIcon) : null, typeof label === "string" ? /* @__PURE__ */ React55__default.default.createElement(
|
|
4358
4280
|
reactNative.Text,
|
|
4359
4281
|
{
|
|
4360
|
-
style: [
|
|
4282
|
+
style: [styles34.labelText, { color: colors.foregroundMuted, fontFamily: weightMap[labelWeight] }, labelStyle],
|
|
4361
4283
|
allowFontScaling: true
|
|
4362
4284
|
},
|
|
4363
4285
|
label
|
|
4364
|
-
) : label), separatorStyle ? /* @__PURE__ */
|
|
4286
|
+
) : label), separatorStyle ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: separatorStyle }) : /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles34.spacer }), /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles34.valueSide }, typeof value === "string" ? /* @__PURE__ */ React55__default.default.createElement(
|
|
4365
4287
|
reactNative.Text,
|
|
4366
4288
|
{
|
|
4367
|
-
style: [
|
|
4289
|
+
style: [styles34.valueText, { color: valueColor ?? colors.foreground }, valueStyle],
|
|
4368
4290
|
allowFontScaling: true
|
|
4369
4291
|
},
|
|
4370
4292
|
value
|
|
4371
|
-
) : value, resolvedRightIcon ? /* @__PURE__ */
|
|
4293
|
+
) : value, resolvedRightIcon ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles34.icon }, resolvedRightIcon) : null));
|
|
4372
4294
|
}
|
|
4373
|
-
var DetailRow =
|
|
4374
|
-
var
|
|
4295
|
+
var DetailRow = React55__default.default.memo(DetailRowBase);
|
|
4296
|
+
var styles34 = reactNative.StyleSheet.create({
|
|
4375
4297
|
row: {
|
|
4376
4298
|
flexDirection: "row",
|
|
4377
4299
|
alignItems: "center",
|
|
@@ -4407,7 +4329,7 @@ var styles35 = reactNative.StyleSheet.create({
|
|
|
4407
4329
|
}
|
|
4408
4330
|
});
|
|
4409
4331
|
function Form({ children, style }) {
|
|
4410
|
-
return /* @__PURE__ */
|
|
4332
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles35.form, style] }, children);
|
|
4411
4333
|
}
|
|
4412
4334
|
function FormField({
|
|
4413
4335
|
children,
|
|
@@ -4419,19 +4341,19 @@ function FormField({
|
|
|
4419
4341
|
errorStyle
|
|
4420
4342
|
}) {
|
|
4421
4343
|
const { colors } = useTheme();
|
|
4422
|
-
return /* @__PURE__ */
|
|
4344
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles35.field, style] }, label ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles35.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: [styles35.error, { color: colors.destructive }, errorStyle], allowFontScaling: true }, error) : null);
|
|
4423
4345
|
}
|
|
4424
4346
|
function FormSection({ children, title, description, style }) {
|
|
4425
4347
|
const { colors } = useTheme();
|
|
4426
|
-
return /* @__PURE__ */
|
|
4348
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles35.section, style] }, title ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles35.sectionHeader }, /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles35.sectionTitle, { color: colors.foreground }], allowFontScaling: true }, title), description ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles35.sectionDescription, { color: colors.foregroundMuted }], allowFontScaling: true }, description) : null) : null, children);
|
|
4427
4349
|
}
|
|
4428
4350
|
function FormFooter({ children, style }) {
|
|
4429
|
-
return /* @__PURE__ */
|
|
4351
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles35.footer, style] }, children);
|
|
4430
4352
|
}
|
|
4431
4353
|
Form.Field = FormField;
|
|
4432
4354
|
Form.Section = FormSection;
|
|
4433
4355
|
Form.Footer = FormFooter;
|
|
4434
|
-
var
|
|
4356
|
+
var styles35 = reactNative.StyleSheet.create({
|
|
4435
4357
|
form: {
|
|
4436
4358
|
gap: vs(16)
|
|
4437
4359
|
},
|
|
@@ -4471,9 +4393,9 @@ var styles36 = reactNative.StyleSheet.create({
|
|
|
4471
4393
|
}
|
|
4472
4394
|
});
|
|
4473
4395
|
function RetrayProvider({ children, theme, colorScheme = "system" }) {
|
|
4474
|
-
return /* @__PURE__ */
|
|
4396
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNativeSafeAreaContext.SafeAreaProvider, { initialMetrics: reactNativeSafeAreaContext.initialWindowMetrics }, /* @__PURE__ */ React55__default.default.createElement(reactNativeGestureHandler.GestureHandlerRootView, { style: styles36.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)))));
|
|
4475
4397
|
}
|
|
4476
|
-
var
|
|
4398
|
+
var styles36 = reactNative.StyleSheet.create({
|
|
4477
4399
|
root: { flex: 1 }
|
|
4478
4400
|
});
|
|
4479
4401
|
function DefaultErrorFallback({
|
|
@@ -4483,10 +4405,10 @@ function DefaultErrorFallback({
|
|
|
4483
4405
|
message
|
|
4484
4406
|
}) {
|
|
4485
4407
|
const { colors } = useTheme();
|
|
4486
|
-
return /* @__PURE__ */
|
|
4408
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles37.container, { backgroundColor: colors.background }], accessibilityRole: "alert" }, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles37.iconCircle, { backgroundColor: colors.destructiveTint }] }, /* @__PURE__ */ React55__default.default.createElement(Icon, { name: "alert-triangle", size: ms(28), color: colors.destructive })), /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles37.title, { color: colors.foreground }], allowFontScaling: true }, title), /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles37.message, { color: colors.foregroundMuted }], allowFontScaling: true }, message ?? error.message ?? "Ocurri\xF3 un error inesperado."), /* @__PURE__ */ React55__default.default.createElement(
|
|
4487
4409
|
reactNative.TouchableOpacity,
|
|
4488
4410
|
{
|
|
4489
|
-
style: [
|
|
4411
|
+
style: [styles37.button, { backgroundColor: colors.primary }],
|
|
4490
4412
|
onPress: () => {
|
|
4491
4413
|
impactLight();
|
|
4492
4414
|
reset();
|
|
@@ -4496,10 +4418,10 @@ function DefaultErrorFallback({
|
|
|
4496
4418
|
accessibilityRole: "button",
|
|
4497
4419
|
accessibilityLabel: "Intentar de nuevo"
|
|
4498
4420
|
},
|
|
4499
|
-
/* @__PURE__ */
|
|
4421
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles37.buttonLabel, { color: colors.primaryForeground }], allowFontScaling: true }, "Intentar de nuevo")
|
|
4500
4422
|
));
|
|
4501
4423
|
}
|
|
4502
|
-
var ErrorBoundary = class extends
|
|
4424
|
+
var ErrorBoundary = class extends React55__default.default.Component {
|
|
4503
4425
|
constructor() {
|
|
4504
4426
|
super(...arguments);
|
|
4505
4427
|
this.state = { error: null };
|
|
@@ -4517,18 +4439,19 @@ var ErrorBoundary = class extends React54__default.default.Component {
|
|
|
4517
4439
|
const { error } = this.state;
|
|
4518
4440
|
if (error) {
|
|
4519
4441
|
const { fallback, title, message } = this.props;
|
|
4442
|
+
const componentStack = error.stack ?? "";
|
|
4520
4443
|
if (typeof fallback === "function") {
|
|
4521
|
-
return fallback({ error, reset: this.reset });
|
|
4444
|
+
return fallback({ error, componentStack, reset: this.reset });
|
|
4522
4445
|
}
|
|
4523
4446
|
if (fallback !== void 0) {
|
|
4524
4447
|
return fallback;
|
|
4525
4448
|
}
|
|
4526
|
-
return /* @__PURE__ */
|
|
4449
|
+
return /* @__PURE__ */ React55__default.default.createElement(DefaultErrorFallback, { error, componentStack, reset: this.reset, title, message });
|
|
4527
4450
|
}
|
|
4528
4451
|
return this.props.children;
|
|
4529
4452
|
}
|
|
4530
4453
|
};
|
|
4531
|
-
var
|
|
4454
|
+
var styles37 = reactNative.StyleSheet.create({
|
|
4532
4455
|
container: {
|
|
4533
4456
|
flex: 1,
|
|
4534
4457
|
alignItems: "center",
|
|
@@ -4572,20 +4495,20 @@ var styles38 = reactNative.StyleSheet.create({
|
|
|
4572
4495
|
});
|
|
4573
4496
|
function Dot({ active, size, activeColor, inactiveColor, onPress, index, total }) {
|
|
4574
4497
|
const progress = Animated6.useSharedValue(active ? 1 : 0);
|
|
4575
|
-
|
|
4498
|
+
React55.useEffect(() => {
|
|
4576
4499
|
progress.value = Animated6.withSpring(active ? 1 : 0, SPRINGS.glide);
|
|
4577
4500
|
}, [active, progress]);
|
|
4578
4501
|
const animatedStyle = Animated6.useAnimatedStyle(() => ({
|
|
4579
4502
|
width: size + progress.value * size,
|
|
4580
4503
|
backgroundColor: Animated6.interpolateColor(progress.value, [0, 1], [inactiveColor, activeColor])
|
|
4581
4504
|
}));
|
|
4582
|
-
const dot = /* @__PURE__ */
|
|
4505
|
+
const dot = /* @__PURE__ */ React55__default.default.createElement(Animated6__default.default.View, { style: [{ height: size, borderRadius: size / 2 }, animatedStyle] });
|
|
4583
4506
|
if (!onPress) return dot;
|
|
4584
4507
|
const handlePress = () => {
|
|
4585
4508
|
selectionAsync();
|
|
4586
4509
|
onPress();
|
|
4587
4510
|
};
|
|
4588
|
-
return /* @__PURE__ */
|
|
4511
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
4589
4512
|
PressableButton,
|
|
4590
4513
|
{
|
|
4591
4514
|
onPress: handlePress,
|
|
@@ -4594,7 +4517,7 @@ function Dot({ active, size, activeColor, inactiveColor, onPress, index, total }
|
|
|
4594
4517
|
accessibilityRole: "button",
|
|
4595
4518
|
accessibilityLabel: `P\xE1gina ${index + 1} de ${total}${active ? ", p\xE1gina actual" : ""}`,
|
|
4596
4519
|
hitSlop: { top: 10, bottom: 10, left: 18, right: 18 },
|
|
4597
|
-
style:
|
|
4520
|
+
style: styles38.dotTouchable
|
|
4598
4521
|
},
|
|
4599
4522
|
dot
|
|
4600
4523
|
);
|
|
@@ -4635,14 +4558,14 @@ function PagerDots({
|
|
|
4635
4558
|
onDotPress(activeIndex + 1);
|
|
4636
4559
|
}
|
|
4637
4560
|
};
|
|
4638
|
-
return /* @__PURE__ */
|
|
4561
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
4639
4562
|
reactNative.View,
|
|
4640
4563
|
{
|
|
4641
|
-
style: [
|
|
4564
|
+
style: [styles38.container, { gap: s(spacing) }, style],
|
|
4642
4565
|
accessibilityRole: "adjustable",
|
|
4643
4566
|
accessibilityLabel: `P\xE1gina ${activeIndex + 1} de ${count}`
|
|
4644
4567
|
},
|
|
4645
|
-
hasControls && /* @__PURE__ */
|
|
4568
|
+
hasControls && /* @__PURE__ */ React55__default.default.createElement(
|
|
4646
4569
|
PressableButton,
|
|
4647
4570
|
{
|
|
4648
4571
|
onPress: handlePrevious,
|
|
@@ -4652,11 +4575,11 @@ function PagerDots({
|
|
|
4652
4575
|
accessibilityRole: "button",
|
|
4653
4576
|
accessibilityLabel: "P\xE1gina anterior",
|
|
4654
4577
|
hitSlop: { top: 10, bottom: 10, left: 10, right: 10 },
|
|
4655
|
-
style: [
|
|
4578
|
+
style: [styles38.controlBtn, !canGoPrev && styles38.controlBtnDisabled]
|
|
4656
4579
|
},
|
|
4657
|
-
/* @__PURE__ */
|
|
4580
|
+
/* @__PURE__ */ React55__default.default.createElement(Icon, { name: "chevron-left", size: s(18), color: canGoPrev ? colors.foreground : colors.foregroundMuted })
|
|
4658
4581
|
),
|
|
4659
|
-
/* @__PURE__ */
|
|
4582
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles38.dotsRow, { gap: s(spacing) }] }, Array.from({ length: count }).map((_, i) => /* @__PURE__ */ React55__default.default.createElement(
|
|
4660
4583
|
Dot,
|
|
4661
4584
|
{
|
|
4662
4585
|
key: i,
|
|
@@ -4669,7 +4592,7 @@ function PagerDots({
|
|
|
4669
4592
|
onPress: onDotPress ? () => onDotPress(i) : void 0
|
|
4670
4593
|
}
|
|
4671
4594
|
))),
|
|
4672
|
-
hasControls && /* @__PURE__ */
|
|
4595
|
+
hasControls && /* @__PURE__ */ React55__default.default.createElement(
|
|
4673
4596
|
PressableButton,
|
|
4674
4597
|
{
|
|
4675
4598
|
onPress: handleNext,
|
|
@@ -4679,13 +4602,13 @@ function PagerDots({
|
|
|
4679
4602
|
accessibilityRole: "button",
|
|
4680
4603
|
accessibilityLabel: "P\xE1gina siguiente",
|
|
4681
4604
|
hitSlop: { top: 10, bottom: 10, left: 10, right: 10 },
|
|
4682
|
-
style: [
|
|
4605
|
+
style: [styles38.controlBtn, !canGoNext && styles38.controlBtnDisabled]
|
|
4683
4606
|
},
|
|
4684
|
-
/* @__PURE__ */
|
|
4607
|
+
/* @__PURE__ */ React55__default.default.createElement(Icon, { name: "chevron-right", size: s(18), color: canGoNext ? colors.foreground : colors.foregroundMuted })
|
|
4685
4608
|
)
|
|
4686
4609
|
);
|
|
4687
4610
|
}
|
|
4688
|
-
var
|
|
4611
|
+
var styles38 = reactNative.StyleSheet.create({
|
|
4689
4612
|
container: {
|
|
4690
4613
|
flexDirection: "row",
|
|
4691
4614
|
alignItems: "center",
|
|
@@ -4729,7 +4652,7 @@ function AppHeader({
|
|
|
4729
4652
|
const { width } = reactNative.useWindowDimensions();
|
|
4730
4653
|
const isWide = width >= BREAKPOINTS.wide;
|
|
4731
4654
|
const centered = titleAlign === "center" || titleAlign === "auto" && isWide;
|
|
4732
|
-
const leftNode = left ?? /* @__PURE__ */
|
|
4655
|
+
const leftNode = left ?? /* @__PURE__ */ React55__default.default.createElement(React55__default.default.Fragment, null, onBack ? /* @__PURE__ */ React55__default.default.createElement(
|
|
4733
4656
|
IconButton,
|
|
4734
4657
|
{
|
|
4735
4658
|
iconName: backIconName,
|
|
@@ -4738,30 +4661,30 @@ function AppHeader({
|
|
|
4738
4661
|
onPress: onBack,
|
|
4739
4662
|
accessibilityLabel: "Atr\xE1s"
|
|
4740
4663
|
}
|
|
4741
|
-
) : null, iconName && !left ? /* @__PURE__ */
|
|
4742
|
-
const titleBlock = /* @__PURE__ */
|
|
4664
|
+
) : null, iconName && !left ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles39.iconSlot }, /* @__PURE__ */ React55__default.default.createElement(Icon, { name: iconName, size: 20, color: colors.foreground })) : null);
|
|
4665
|
+
const titleBlock = /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles39.titleBlock, centered && styles39.titleBlockCentered], pointerEvents: "none" }, title ? /* @__PURE__ */ React55__default.default.createElement(
|
|
4743
4666
|
reactNative.Text,
|
|
4744
4667
|
{
|
|
4745
|
-
style: [
|
|
4668
|
+
style: [styles39.title, { color: colors.foreground }, centered && styles39.textCentered],
|
|
4746
4669
|
numberOfLines: 1,
|
|
4747
4670
|
allowFontScaling: true,
|
|
4748
4671
|
accessibilityRole: "header"
|
|
4749
4672
|
},
|
|
4750
4673
|
title
|
|
4751
|
-
) : null, subtitle ? /* @__PURE__ */
|
|
4674
|
+
) : null, subtitle ? /* @__PURE__ */ React55__default.default.createElement(
|
|
4752
4675
|
reactNative.Text,
|
|
4753
4676
|
{
|
|
4754
|
-
style: [
|
|
4677
|
+
style: [styles39.subtitle, { color: colors.foregroundMuted }, centered && styles39.textCentered],
|
|
4755
4678
|
numberOfLines: 1,
|
|
4756
4679
|
allowFontScaling: true
|
|
4757
4680
|
},
|
|
4758
4681
|
subtitle
|
|
4759
4682
|
) : null);
|
|
4760
|
-
return /* @__PURE__ */
|
|
4683
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
4761
4684
|
reactNative.View,
|
|
4762
4685
|
{
|
|
4763
4686
|
style: [
|
|
4764
|
-
|
|
4687
|
+
styles39.container,
|
|
4765
4688
|
{
|
|
4766
4689
|
backgroundColor: backgroundColor ?? colors.background,
|
|
4767
4690
|
paddingTop: withSafeArea ? insets.top : 0,
|
|
@@ -4771,10 +4694,10 @@ function AppHeader({
|
|
|
4771
4694
|
style
|
|
4772
4695
|
]
|
|
4773
4696
|
},
|
|
4774
|
-
/* @__PURE__ */
|
|
4697
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles39.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: styles39.side }, leftNode), /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles39.side, styles39.sideRight] }, right)) : /* @__PURE__ */ React55__default.default.createElement(React55__default.default.Fragment, null, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles39.side }, leftNode), titleBlock, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles39.side, styles39.sideRight] }, right)))
|
|
4775
4698
|
);
|
|
4776
4699
|
}
|
|
4777
|
-
var
|
|
4700
|
+
var styles39 = reactNative.StyleSheet.create({
|
|
4778
4701
|
container: {
|
|
4779
4702
|
width: "100%"
|
|
4780
4703
|
},
|
|
@@ -4815,6 +4738,12 @@ var styles40 = reactNative.StyleSheet.create({
|
|
|
4815
4738
|
fontSize: ms(13),
|
|
4816
4739
|
lineHeight: mvs(16)
|
|
4817
4740
|
},
|
|
4741
|
+
iconSlot: {
|
|
4742
|
+
width: s(44),
|
|
4743
|
+
height: s(44),
|
|
4744
|
+
alignItems: "center",
|
|
4745
|
+
justifyContent: "center"
|
|
4746
|
+
},
|
|
4818
4747
|
textCentered: {
|
|
4819
4748
|
textAlign: "center"
|
|
4820
4749
|
}
|
|
@@ -4825,9 +4754,11 @@ function isSelected(value, candidate) {
|
|
|
4825
4754
|
}
|
|
4826
4755
|
function Cell({ item, selected, width, onPress }) {
|
|
4827
4756
|
const { colors } = useTheme();
|
|
4757
|
+
const hasImage = !!item.imageUrl;
|
|
4828
4758
|
const iconColor = selected ? colors.primary : colors.foregroundSubtle;
|
|
4829
|
-
const iconNode = item.icon ?? (item.iconName ? /* @__PURE__ */
|
|
4830
|
-
|
|
4759
|
+
const iconNode = item.icon ?? (item.iconName ? /* @__PURE__ */ React55__default.default.createElement(Icon, { name: item.iconName, size: ms(24), color: iconColor }) : null);
|
|
4760
|
+
const imageSize = width - 4;
|
|
4761
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
4831
4762
|
PressableChip,
|
|
4832
4763
|
{
|
|
4833
4764
|
onPress,
|
|
@@ -4837,26 +4768,44 @@ function Cell({ item, selected, width, onPress }) {
|
|
|
4837
4768
|
activateOnHover: true,
|
|
4838
4769
|
accessibilityRole: "button",
|
|
4839
4770
|
accessibilityState: { selected, disabled: item.disabled },
|
|
4840
|
-
accessibilityLabel: item.label ?? String(item.value)
|
|
4841
|
-
style: [
|
|
4842
|
-
{ width },
|
|
4843
|
-
styles41.cell,
|
|
4844
|
-
{
|
|
4845
|
-
borderColor: selected ? colors.primary : "transparent"
|
|
4846
|
-
},
|
|
4847
|
-
item.disabled && styles41.cellDisabled
|
|
4848
|
-
]
|
|
4771
|
+
accessibilityLabel: item.label ?? String(item.value)
|
|
4849
4772
|
},
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
reactNative.Text,
|
|
4773
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
4774
|
+
reactNative.View,
|
|
4853
4775
|
{
|
|
4854
|
-
style: [
|
|
4855
|
-
|
|
4856
|
-
|
|
4776
|
+
style: [
|
|
4777
|
+
{ width },
|
|
4778
|
+
styles40.cell,
|
|
4779
|
+
hasImage && styles40.cellImage,
|
|
4780
|
+
{
|
|
4781
|
+
borderColor: selected ? colors.primary : "transparent"
|
|
4782
|
+
},
|
|
4783
|
+
item.disabled && styles40.cellDisabled
|
|
4784
|
+
]
|
|
4857
4785
|
},
|
|
4858
|
-
|
|
4859
|
-
|
|
4786
|
+
hasImage ? /* @__PURE__ */ React55__default.default.createElement(
|
|
4787
|
+
expoImage.Image,
|
|
4788
|
+
{
|
|
4789
|
+
source: item.imageUrl,
|
|
4790
|
+
style: { width: imageSize, height: imageSize },
|
|
4791
|
+
contentFit: "cover"
|
|
4792
|
+
}
|
|
4793
|
+
) : null,
|
|
4794
|
+
iconNode && !hasImage ? iconNode : null,
|
|
4795
|
+
item.label ? /* @__PURE__ */ React55__default.default.createElement(
|
|
4796
|
+
reactNative.Text,
|
|
4797
|
+
{
|
|
4798
|
+
style: [
|
|
4799
|
+
styles40.label,
|
|
4800
|
+
hasImage && styles40.labelImage,
|
|
4801
|
+
{ color: selected ? colors.primary : colors.foreground }
|
|
4802
|
+
],
|
|
4803
|
+
numberOfLines: 2,
|
|
4804
|
+
allowFontScaling: true
|
|
4805
|
+
},
|
|
4806
|
+
item.label
|
|
4807
|
+
) : null
|
|
4808
|
+
)
|
|
4860
4809
|
);
|
|
4861
4810
|
}
|
|
4862
4811
|
function SelectableGrid({
|
|
@@ -4869,7 +4818,7 @@ function SelectableGrid({
|
|
|
4869
4818
|
orientation = "grid",
|
|
4870
4819
|
style
|
|
4871
4820
|
}) {
|
|
4872
|
-
const [containerWidth, setContainerWidth] =
|
|
4821
|
+
const [containerWidth, setContainerWidth] = React55.useState(0);
|
|
4873
4822
|
const gapPx = s(gap);
|
|
4874
4823
|
const cellWidth = containerWidth > 0 ? (containerWidth - gapPx * (numColumns - 1)) / numColumns - 0.5 : 0;
|
|
4875
4824
|
const horizCellWidth = s(72);
|
|
@@ -4879,15 +4828,15 @@ function SelectableGrid({
|
|
|
4879
4828
|
onChange(item.value);
|
|
4880
4829
|
};
|
|
4881
4830
|
if (orientation === "horizontal") {
|
|
4882
|
-
return /* @__PURE__ */
|
|
4831
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
4883
4832
|
reactNative.ScrollView,
|
|
4884
4833
|
{
|
|
4885
4834
|
horizontal: true,
|
|
4886
4835
|
showsHorizontalScrollIndicator: false,
|
|
4887
|
-
contentContainerStyle: [
|
|
4836
|
+
contentContainerStyle: [styles40.horizontal, { gap: gapPx }, style],
|
|
4888
4837
|
accessibilityRole: multiple ? void 0 : "radiogroup"
|
|
4889
4838
|
},
|
|
4890
|
-
items.map((item) => /* @__PURE__ */
|
|
4839
|
+
items.map((item) => /* @__PURE__ */ React55__default.default.createElement(
|
|
4891
4840
|
Cell,
|
|
4892
4841
|
{
|
|
4893
4842
|
key: String(item.value),
|
|
@@ -4899,14 +4848,14 @@ function SelectableGrid({
|
|
|
4899
4848
|
))
|
|
4900
4849
|
);
|
|
4901
4850
|
}
|
|
4902
|
-
return /* @__PURE__ */
|
|
4851
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
4903
4852
|
reactNative.View,
|
|
4904
4853
|
{
|
|
4905
|
-
style: [
|
|
4854
|
+
style: [styles40.grid, { gap: gapPx }, style],
|
|
4906
4855
|
onLayout: (e) => setContainerWidth(e.nativeEvent.layout.width),
|
|
4907
4856
|
accessibilityRole: multiple ? void 0 : "radiogroup"
|
|
4908
4857
|
},
|
|
4909
|
-
cellWidth > 0 ? items.map((item) => /* @__PURE__ */
|
|
4858
|
+
cellWidth > 0 ? items.map((item) => /* @__PURE__ */ React55__default.default.createElement(
|
|
4910
4859
|
Cell,
|
|
4911
4860
|
{
|
|
4912
4861
|
key: String(item.value),
|
|
@@ -4918,7 +4867,7 @@ function SelectableGrid({
|
|
|
4918
4867
|
)) : null
|
|
4919
4868
|
);
|
|
4920
4869
|
}
|
|
4921
|
-
var
|
|
4870
|
+
var styles40 = reactNative.StyleSheet.create({
|
|
4922
4871
|
grid: {
|
|
4923
4872
|
flexDirection: "row",
|
|
4924
4873
|
flexWrap: "wrap"
|
|
@@ -4936,6 +4885,13 @@ var styles41 = reactNative.StyleSheet.create({
|
|
|
4936
4885
|
paddingHorizontal: s(8),
|
|
4937
4886
|
paddingVertical: vs(10)
|
|
4938
4887
|
},
|
|
4888
|
+
cellImage: {
|
|
4889
|
+
padding: 0,
|
|
4890
|
+
gap: 0,
|
|
4891
|
+
overflow: "hidden",
|
|
4892
|
+
alignItems: "stretch",
|
|
4893
|
+
justifyContent: "flex-start"
|
|
4894
|
+
},
|
|
4939
4895
|
cellDisabled: {
|
|
4940
4896
|
opacity: 0.4
|
|
4941
4897
|
},
|
|
@@ -4944,9 +4900,14 @@ var styles41 = reactNative.StyleSheet.create({
|
|
|
4944
4900
|
fontSize: ms(11),
|
|
4945
4901
|
lineHeight: mvs(14),
|
|
4946
4902
|
textAlign: "center"
|
|
4903
|
+
},
|
|
4904
|
+
labelImage: {
|
|
4905
|
+
paddingHorizontal: s(6),
|
|
4906
|
+
paddingBottom: vs(6),
|
|
4907
|
+
paddingTop: vs(3)
|
|
4947
4908
|
}
|
|
4948
4909
|
});
|
|
4949
|
-
var SelectableCardContext =
|
|
4910
|
+
var SelectableCardContext = React55.createContext(null);
|
|
4950
4911
|
function SelectableCardGroup({
|
|
4951
4912
|
type,
|
|
4952
4913
|
value,
|
|
@@ -4956,7 +4917,7 @@ function SelectableCardGroup({
|
|
|
4956
4917
|
style,
|
|
4957
4918
|
children
|
|
4958
4919
|
}) {
|
|
4959
|
-
return /* @__PURE__ */
|
|
4920
|
+
return /* @__PURE__ */ React55__default.default.createElement(SelectableCardContext.Provider, { value: { type, value, onValueChange, variant } }, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles41.group, { gap }, style] }, children));
|
|
4960
4921
|
}
|
|
4961
4922
|
function SelectableCard({
|
|
4962
4923
|
value,
|
|
@@ -4967,7 +4928,7 @@ function SelectableCard({
|
|
|
4967
4928
|
disabled = false,
|
|
4968
4929
|
style
|
|
4969
4930
|
}) {
|
|
4970
|
-
const ctx =
|
|
4931
|
+
const ctx = React55.useContext(SelectableCardContext);
|
|
4971
4932
|
if (!ctx) {
|
|
4972
4933
|
throw new Error("SelectableCard must be used inside <SelectableCard.Group>");
|
|
4973
4934
|
}
|
|
@@ -5030,9 +4991,9 @@ function SelectableCard({
|
|
|
5030
4991
|
}
|
|
5031
4992
|
return base;
|
|
5032
4993
|
})();
|
|
5033
|
-
const resolvedIcon = iconName ? /* @__PURE__ */
|
|
5034
|
-
const resolvedIconElement = resolvedIcon ? /* @__PURE__ */
|
|
5035
|
-
return /* @__PURE__ */
|
|
4994
|
+
const resolvedIcon = iconName ? /* @__PURE__ */ React55__default.default.createElement(Icon, { name: iconName, size: ms(22), color: disabled ? colors.foregroundMuted : colors.foregroundMuted }) : icon;
|
|
4995
|
+
const resolvedIconElement = resolvedIcon ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles41.iconWrapper, disabled && { opacity: 0.45 }] }, resolvedIcon) : null;
|
|
4996
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
5036
4997
|
reactNative.Pressable,
|
|
5037
4998
|
{
|
|
5038
4999
|
onPress: handlePress,
|
|
@@ -5041,20 +5002,20 @@ function SelectableCard({
|
|
|
5041
5002
|
accessibilityLabel: `${title}${description ? `, ${description}` : ""}`,
|
|
5042
5003
|
accessibilityState: { selected: isSelected2, disabled },
|
|
5043
5004
|
style: [
|
|
5044
|
-
|
|
5005
|
+
styles41.card,
|
|
5045
5006
|
variantStyle,
|
|
5046
|
-
isSelected2 && !disabled &&
|
|
5007
|
+
isSelected2 && !disabled && styles41.cardSelected,
|
|
5047
5008
|
style
|
|
5048
5009
|
]
|
|
5049
5010
|
},
|
|
5050
|
-
/* @__PURE__ */
|
|
5011
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles41.row }, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles41.selectorContainer }, type === "radio" ? /* @__PURE__ */ React55__default.default.createElement(
|
|
5051
5012
|
reactNativeEase.EaseView,
|
|
5052
5013
|
{
|
|
5053
|
-
style:
|
|
5014
|
+
style: styles41.radioCircle,
|
|
5054
5015
|
animate: { borderColor: !disabled && isSelected2 ? colors.primary : colors.border },
|
|
5055
5016
|
transition: COLOR_TRANSITION
|
|
5056
5017
|
},
|
|
5057
|
-
/* @__PURE__ */
|
|
5018
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
5058
5019
|
reactNativeEase.EaseView,
|
|
5059
5020
|
{
|
|
5060
5021
|
animate: {
|
|
@@ -5063,38 +5024,38 @@ function SelectableCard({
|
|
|
5063
5024
|
},
|
|
5064
5025
|
transition: SPRING_ELASTIC
|
|
5065
5026
|
},
|
|
5066
|
-
/* @__PURE__ */
|
|
5027
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles41.radioDot, { backgroundColor: colors.primary }] })
|
|
5067
5028
|
)
|
|
5068
|
-
) : /* @__PURE__ */
|
|
5029
|
+
) : /* @__PURE__ */ React55__default.default.createElement(
|
|
5069
5030
|
reactNativeEase.EaseView,
|
|
5070
5031
|
{
|
|
5071
|
-
style:
|
|
5032
|
+
style: styles41.checkboxBox,
|
|
5072
5033
|
animate: {
|
|
5073
5034
|
borderColor: !disabled && isSelected2 ? colors.primary : colors.border,
|
|
5074
5035
|
backgroundColor: !disabled && isSelected2 ? colors.primary : "transparent"
|
|
5075
5036
|
},
|
|
5076
5037
|
transition: COLOR_TRANSITION
|
|
5077
5038
|
},
|
|
5078
|
-
/* @__PURE__ */
|
|
5039
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
5079
5040
|
reactNativeEase.EaseView,
|
|
5080
5041
|
{
|
|
5081
5042
|
animate: { opacity: !disabled && isSelected2 ? 1 : 0 },
|
|
5082
5043
|
transition: OPACITY_TRANSITION
|
|
5083
5044
|
},
|
|
5084
|
-
/* @__PURE__ */
|
|
5045
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles41.checkmark, { borderColor: colors.primaryForeground }] })
|
|
5085
5046
|
)
|
|
5086
|
-
)), resolvedIconElement, /* @__PURE__ */
|
|
5047
|
+
)), resolvedIconElement, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles41.textArea }, /* @__PURE__ */ React55__default.default.createElement(
|
|
5087
5048
|
reactNative.Text,
|
|
5088
5049
|
{
|
|
5089
|
-
style: [
|
|
5050
|
+
style: [styles41.title, { color: disabled ? colors.foregroundMuted : colors.foreground }],
|
|
5090
5051
|
allowFontScaling: true,
|
|
5091
5052
|
numberOfLines: 2
|
|
5092
5053
|
},
|
|
5093
5054
|
title
|
|
5094
|
-
), description ? /* @__PURE__ */
|
|
5055
|
+
), description ? /* @__PURE__ */ React55__default.default.createElement(
|
|
5095
5056
|
reactNative.Text,
|
|
5096
5057
|
{
|
|
5097
|
-
style: [
|
|
5058
|
+
style: [styles41.description, { color: disabled ? colors.foregroundMuted : colors.foregroundSubtle }],
|
|
5098
5059
|
allowFontScaling: true,
|
|
5099
5060
|
numberOfLines: 4
|
|
5100
5061
|
},
|
|
@@ -5102,7 +5063,7 @@ function SelectableCard({
|
|
|
5102
5063
|
) : null))
|
|
5103
5064
|
);
|
|
5104
5065
|
}
|
|
5105
|
-
var
|
|
5066
|
+
var styles41 = reactNative.StyleSheet.create({
|
|
5106
5067
|
group: {
|
|
5107
5068
|
width: "100%"
|
|
5108
5069
|
},
|
|
@@ -5184,11 +5145,11 @@ function PricingCard({
|
|
|
5184
5145
|
style
|
|
5185
5146
|
}) {
|
|
5186
5147
|
const { colors } = useTheme();
|
|
5187
|
-
return /* @__PURE__ */
|
|
5148
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
5188
5149
|
reactNative.View,
|
|
5189
5150
|
{
|
|
5190
5151
|
style: [
|
|
5191
|
-
|
|
5152
|
+
styles42.card,
|
|
5192
5153
|
{
|
|
5193
5154
|
backgroundColor: colors.card,
|
|
5194
5155
|
borderColor: highlighted ? colors.primary : colors.border,
|
|
@@ -5199,42 +5160,42 @@ function PricingCard({
|
|
|
5199
5160
|
],
|
|
5200
5161
|
accessibilityRole: "summary"
|
|
5201
5162
|
},
|
|
5202
|
-
/* @__PURE__ */
|
|
5203
|
-
/* @__PURE__ */
|
|
5204
|
-
description ? /* @__PURE__ */
|
|
5205
|
-
features.length > 0 ? /* @__PURE__ */
|
|
5163
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles42.header }, /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles42.name, { color: colors.foreground }], allowFontScaling: true }, name), badge ? /* @__PURE__ */ React55__default.default.createElement(Badge, { label: badge, variant: highlighted ? "default" : "secondary", size: "sm" }) : null),
|
|
5164
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles42.priceRow }, /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles42.price, { color: colors.foreground }], allowFontScaling: true }, price), period ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles42.period, { color: colors.foregroundMuted }], allowFontScaling: true }, period) : null),
|
|
5165
|
+
description ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles42.description, { color: colors.foregroundMuted }], allowFontScaling: true }, description) : null,
|
|
5166
|
+
features.length > 0 ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles42.features }, features.map(normalize).map((f, i) => /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { key: i, style: styles42.featureRow }, /* @__PURE__ */ React55__default.default.createElement(
|
|
5206
5167
|
Icon,
|
|
5207
5168
|
{
|
|
5208
5169
|
name: f.included ? "check" : "minus",
|
|
5209
5170
|
size: ms(16),
|
|
5210
5171
|
color: f.included ? colors.success : colors.foregroundMuted
|
|
5211
5172
|
}
|
|
5212
|
-
), /* @__PURE__ */
|
|
5173
|
+
), /* @__PURE__ */ React55__default.default.createElement(
|
|
5213
5174
|
reactNative.Text,
|
|
5214
5175
|
{
|
|
5215
5176
|
style: [
|
|
5216
|
-
|
|
5177
|
+
styles42.featureLabel,
|
|
5217
5178
|
{ color: f.included ? colors.foreground : colors.foregroundMuted },
|
|
5218
|
-
!f.included &&
|
|
5179
|
+
!f.included && styles42.featureExcluded
|
|
5219
5180
|
],
|
|
5220
5181
|
allowFontScaling: true
|
|
5221
5182
|
},
|
|
5222
5183
|
f.label
|
|
5223
5184
|
)))) : null,
|
|
5224
|
-
ctaLabel ? /* @__PURE__ */
|
|
5185
|
+
ctaLabel ? /* @__PURE__ */ React55__default.default.createElement(
|
|
5225
5186
|
Button,
|
|
5226
5187
|
{
|
|
5227
5188
|
label: ctaLabel,
|
|
5228
5189
|
variant: highlighted ? "primary" : "secondary",
|
|
5229
5190
|
fullWidth: true,
|
|
5230
5191
|
onPress: onCtaPress,
|
|
5231
|
-
style:
|
|
5192
|
+
style: styles42.cta
|
|
5232
5193
|
}
|
|
5233
5194
|
) : null,
|
|
5234
|
-
footnote ? /* @__PURE__ */
|
|
5195
|
+
footnote ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles42.footnote, { color: colors.foregroundMuted }], allowFontScaling: true }, footnote) : null
|
|
5235
5196
|
);
|
|
5236
5197
|
}
|
|
5237
|
-
var
|
|
5198
|
+
var styles42 = reactNative.StyleSheet.create({
|
|
5238
5199
|
card: {
|
|
5239
5200
|
borderRadius: RADIUS.md,
|
|
5240
5201
|
padding: s(16),
|
|
@@ -5313,11 +5274,11 @@ function TabBar({
|
|
|
5313
5274
|
const insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
5314
5275
|
const resolvedActive = activeColor ?? colors.primary;
|
|
5315
5276
|
const resolvedInactive = inactiveColor ?? colors.foregroundMuted;
|
|
5316
|
-
return /* @__PURE__ */
|
|
5277
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
5317
5278
|
reactNative.View,
|
|
5318
5279
|
{
|
|
5319
5280
|
style: [
|
|
5320
|
-
|
|
5281
|
+
styles43.container,
|
|
5321
5282
|
{
|
|
5322
5283
|
backgroundColor: colors.card,
|
|
5323
5284
|
borderTopColor: colors.border,
|
|
@@ -5330,10 +5291,10 @@ function TabBar({
|
|
|
5330
5291
|
items.map((item) => {
|
|
5331
5292
|
const active = item.key === activeKey;
|
|
5332
5293
|
const tint = active ? resolvedActive : resolvedInactive;
|
|
5333
|
-
const iconNode = item.icon ?? (item.iconName ? /* @__PURE__ */
|
|
5294
|
+
const iconNode = item.icon ?? (item.iconName ? /* @__PURE__ */ React55__default.default.createElement(Icon, { name: item.iconName, size: ms(24), color: tint }) : null);
|
|
5334
5295
|
const showBadge = item.badge !== void 0 && item.badge !== false;
|
|
5335
5296
|
const badgeCount = typeof item.badge === "number" ? item.badge : void 0;
|
|
5336
|
-
return /* @__PURE__ */
|
|
5297
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
5337
5298
|
PressableTab,
|
|
5338
5299
|
{
|
|
5339
5300
|
key: item.key,
|
|
@@ -5346,25 +5307,25 @@ function TabBar({
|
|
|
5346
5307
|
accessibilityRole: "tab",
|
|
5347
5308
|
accessibilityState: { selected: active },
|
|
5348
5309
|
accessibilityLabel: item.label ?? item.key,
|
|
5349
|
-
style:
|
|
5310
|
+
style: styles43.tab
|
|
5350
5311
|
},
|
|
5351
|
-
/* @__PURE__ */
|
|
5312
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, null, iconNode, showBadge ? /* @__PURE__ */ React55__default.default.createElement(
|
|
5352
5313
|
reactNative.View,
|
|
5353
5314
|
{
|
|
5354
5315
|
style: [
|
|
5355
|
-
|
|
5316
|
+
styles43.badge,
|
|
5356
5317
|
{ backgroundColor: colors.destructive, borderColor: colors.card },
|
|
5357
|
-
badgeCount === void 0 &&
|
|
5318
|
+
badgeCount === void 0 && styles43.badgeDot
|
|
5358
5319
|
]
|
|
5359
5320
|
},
|
|
5360
|
-
badgeCount !== void 0 ? /* @__PURE__ */
|
|
5321
|
+
badgeCount !== void 0 ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles43.badgeText, { color: colors.destructiveForeground }], allowFontScaling: false }, badgeCount > 99 ? "99+" : badgeCount) : null
|
|
5361
5322
|
) : null),
|
|
5362
|
-
item.label ? /* @__PURE__ */
|
|
5323
|
+
item.label ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles43.label, { color: tint }], numberOfLines: 1, allowFontScaling: true }, item.label) : null
|
|
5363
5324
|
);
|
|
5364
5325
|
})
|
|
5365
5326
|
);
|
|
5366
5327
|
}
|
|
5367
|
-
var
|
|
5328
|
+
var styles43 = reactNative.StyleSheet.create({
|
|
5368
5329
|
container: {
|
|
5369
5330
|
flexDirection: "row",
|
|
5370
5331
|
borderTopWidth: reactNative.StyleSheet.hairlineWidth
|
|
@@ -5418,7 +5379,7 @@ function ZoomableImage({ source, width, height, onZoomChange }) {
|
|
|
5418
5379
|
const translateY = Animated6.useSharedValue(0);
|
|
5419
5380
|
const savedX = Animated6.useSharedValue(0);
|
|
5420
5381
|
const savedY = Animated6.useSharedValue(0);
|
|
5421
|
-
const reportZoom =
|
|
5382
|
+
const reportZoom = React55.useCallback((zoomed) => onZoomChange(zoomed), [onZoomChange]);
|
|
5422
5383
|
const reset = () => {
|
|
5423
5384
|
"worklet";
|
|
5424
5385
|
scale2.value = Animated6.withTiming(1);
|
|
@@ -5464,17 +5425,17 @@ function ZoomableImage({ source, width, height, onZoomChange }) {
|
|
|
5464
5425
|
{ scale: scale2.value }
|
|
5465
5426
|
]
|
|
5466
5427
|
}));
|
|
5467
|
-
return /* @__PURE__ */
|
|
5428
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNativeGestureHandler.GestureDetector, { gesture: composed }, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [{ width, height }, styles44.imageWrap], collapsable: false }, /* @__PURE__ */ React55__default.default.createElement(Animated6__default.default.View, { style: [{ width, height }, animatedStyle] }, /* @__PURE__ */ React55__default.default.createElement(expoImage.Image, { source, style: { width, height }, contentFit: "contain" }))));
|
|
5468
5429
|
}
|
|
5469
5430
|
function ImageViewer({ images, visible, onClose, initialIndex = 0 }) {
|
|
5470
5431
|
const window = reactNative.useWindowDimensions();
|
|
5471
5432
|
const width = window.width > 0 ? window.width : reactNative.Dimensions.get("window").width;
|
|
5472
5433
|
const height = window.height > 0 ? window.height : reactNative.Dimensions.get("window").height;
|
|
5473
5434
|
const insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
5474
|
-
const [index, setIndex] =
|
|
5475
|
-
const [pagingEnabled, setPagingEnabled] =
|
|
5476
|
-
const scrollRef =
|
|
5477
|
-
|
|
5435
|
+
const [index, setIndex] = React55.useState(initialIndex);
|
|
5436
|
+
const [pagingEnabled, setPagingEnabled] = React55.useState(true);
|
|
5437
|
+
const scrollRef = React55__default.default.useRef(null);
|
|
5438
|
+
React55__default.default.useEffect(() => {
|
|
5478
5439
|
if (!visible) return;
|
|
5479
5440
|
const handle = requestAnimationFrame(() => {
|
|
5480
5441
|
setIndex(initialIndex);
|
|
@@ -5485,7 +5446,7 @@ function ImageViewer({ images, visible, onClose, initialIndex = 0 }) {
|
|
|
5485
5446
|
}, [visible, initialIndex, width]);
|
|
5486
5447
|
const dragY = Animated6.useSharedValue(0);
|
|
5487
5448
|
const DISMISS_THRESHOLD = height * 0.18;
|
|
5488
|
-
const closeViewer =
|
|
5449
|
+
const closeViewer = React55.useCallback(() => onClose(), [onClose]);
|
|
5489
5450
|
const swipeDown = reactNativeGestureHandler.Gesture.Pan().enabled(pagingEnabled).activeOffsetY(12).failOffsetX([-16, 16]).onUpdate((e) => {
|
|
5490
5451
|
dragY.value = Math.max(0, e.translationY);
|
|
5491
5452
|
}).onEnd((e) => {
|
|
@@ -5495,7 +5456,7 @@ function ImageViewer({ images, visible, onClose, initialIndex = 0 }) {
|
|
|
5495
5456
|
dragY.value = Animated6.withTiming(0);
|
|
5496
5457
|
}
|
|
5497
5458
|
});
|
|
5498
|
-
|
|
5459
|
+
React55__default.default.useEffect(() => {
|
|
5499
5460
|
if (visible) dragY.value = 0;
|
|
5500
5461
|
}, [visible, dragY]);
|
|
5501
5462
|
const dismissStyle = Animated6.useAnimatedStyle(() => ({
|
|
@@ -5512,7 +5473,7 @@ function ImageViewer({ images, visible, onClose, initialIndex = 0 }) {
|
|
|
5512
5473
|
scrollRef.current?.scrollTo({ x: page * width, animated: true });
|
|
5513
5474
|
setIndex(page);
|
|
5514
5475
|
};
|
|
5515
|
-
return /* @__PURE__ */
|
|
5476
|
+
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: styles44.root }, /* @__PURE__ */ React55__default.default.createElement(Animated6__default.default.View, { style: [styles44.backdrop, backdropStyle], pointerEvents: "none" }), /* @__PURE__ */ React55__default.default.createElement(Animated6__default.default.View, { style: [styles44.container, dismissStyle] }, /* @__PURE__ */ React55__default.default.createElement(reactNativeGestureHandler.GestureDetector, { gesture: swipeDown }, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles44.root, collapsable: false }, /* @__PURE__ */ React55__default.default.createElement(
|
|
5516
5477
|
reactNative.ScrollView,
|
|
5517
5478
|
{
|
|
5518
5479
|
ref: scrollRef,
|
|
@@ -5523,7 +5484,7 @@ function ImageViewer({ images, visible, onClose, initialIndex = 0 }) {
|
|
|
5523
5484
|
onMomentumScrollEnd: onMomentumEnd,
|
|
5524
5485
|
bounces: false
|
|
5525
5486
|
},
|
|
5526
|
-
images.map((source, i) => /* @__PURE__ */
|
|
5487
|
+
images.map((source, i) => /* @__PURE__ */ React55__default.default.createElement(
|
|
5527
5488
|
ZoomableImage,
|
|
5528
5489
|
{
|
|
5529
5490
|
key: i,
|
|
@@ -5533,7 +5494,7 @@ function ImageViewer({ images, visible, onClose, initialIndex = 0 }) {
|
|
|
5533
5494
|
onZoomChange: (zoomed) => setPagingEnabled(!zoomed)
|
|
5534
5495
|
}
|
|
5535
5496
|
))
|
|
5536
|
-
))), /* @__PURE__ */
|
|
5497
|
+
))), /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles44.closeButtonWrapper, { top: insets.top + vs(8) }] }, /* @__PURE__ */ React55__default.default.createElement(
|
|
5537
5498
|
IconButton,
|
|
5538
5499
|
{
|
|
5539
5500
|
iconName: "x",
|
|
@@ -5544,7 +5505,7 @@ function ImageViewer({ images, visible, onClose, initialIndex = 0 }) {
|
|
|
5544
5505
|
onPress: onClose,
|
|
5545
5506
|
accessibilityLabel: "Cerrar"
|
|
5546
5507
|
}
|
|
5547
|
-
)), images.length > 1 ? /* @__PURE__ */
|
|
5508
|
+
)), images.length > 1 ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles44.dots, { bottom: insets.bottom + vs(16) }], pointerEvents: "box-none" }, /* @__PURE__ */ React55__default.default.createElement(
|
|
5548
5509
|
PagerDots,
|
|
5549
5510
|
{
|
|
5550
5511
|
count: images.length,
|
|
@@ -5555,7 +5516,7 @@ function ImageViewer({ images, visible, onClose, initialIndex = 0 }) {
|
|
|
5555
5516
|
}
|
|
5556
5517
|
)) : null)));
|
|
5557
5518
|
}
|
|
5558
|
-
var
|
|
5519
|
+
var styles44 = reactNative.StyleSheet.create({
|
|
5559
5520
|
root: {
|
|
5560
5521
|
flex: 1
|
|
5561
5522
|
},
|
|
@@ -5593,8 +5554,8 @@ function SheetSelectChip({
|
|
|
5593
5554
|
onPress();
|
|
5594
5555
|
};
|
|
5595
5556
|
const iconColor = selected ? colors.primaryForeground : colors.foreground;
|
|
5596
|
-
const resolvedIcon = option.iconName ? /* @__PURE__ */
|
|
5597
|
-
return /* @__PURE__ */
|
|
5557
|
+
const resolvedIcon = option.iconName ? /* @__PURE__ */ React55__default.default.createElement(Icon, { name: option.iconName, size: ms(13), color: iconColor }) : null;
|
|
5558
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
5598
5559
|
PressableChip,
|
|
5599
5560
|
{
|
|
5600
5561
|
onPress: option.disabled ? void 0 : handlePress,
|
|
@@ -5604,21 +5565,21 @@ function SheetSelectChip({
|
|
|
5604
5565
|
accessibilityLabel: option.disabled ? `${option.label}, no disponible` : option.label,
|
|
5605
5566
|
accessibilityState: { selected, disabled: option.disabled }
|
|
5606
5567
|
},
|
|
5607
|
-
/* @__PURE__ */
|
|
5568
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
5608
5569
|
reactNativeEase.EaseView,
|
|
5609
5570
|
{
|
|
5610
|
-
style: [
|
|
5571
|
+
style: [styles45.chip, option.disabled && styles45.chipDisabled],
|
|
5611
5572
|
animate: {
|
|
5612
5573
|
backgroundColor: selected ? colors.primary : colors.surface,
|
|
5613
5574
|
borderColor: selected ? colors.primary : colors.border
|
|
5614
5575
|
},
|
|
5615
5576
|
transition: COLOR_TRANSITION
|
|
5616
5577
|
},
|
|
5617
|
-
resolvedIcon ? /* @__PURE__ */
|
|
5618
|
-
/* @__PURE__ */
|
|
5578
|
+
resolvedIcon ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles45.chipIcon }, resolvedIcon) : null,
|
|
5579
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
5619
5580
|
reactNative.Text,
|
|
5620
5581
|
{
|
|
5621
|
-
style: [
|
|
5582
|
+
style: [styles45.chipLabel, { color: selected ? colors.primaryForeground : colors.foreground }],
|
|
5622
5583
|
allowFontScaling: true
|
|
5623
5584
|
},
|
|
5624
5585
|
option.label
|
|
@@ -5652,7 +5613,7 @@ function SheetSelect({
|
|
|
5652
5613
|
const newArray = alreadySelected ? currentArray.filter((v) => v !== optionValue) : [...currentArray, optionValue];
|
|
5653
5614
|
onValueChange?.(newArray);
|
|
5654
5615
|
};
|
|
5655
|
-
const chips = options.map((opt) => /* @__PURE__ */
|
|
5616
|
+
const chips = options.map((opt) => /* @__PURE__ */ React55__default.default.createElement(
|
|
5656
5617
|
SheetSelectChip,
|
|
5657
5618
|
{
|
|
5658
5619
|
key: opt.value,
|
|
@@ -5661,17 +5622,17 @@ function SheetSelect({
|
|
|
5661
5622
|
onPress: () => handlePress(opt.value)
|
|
5662
5623
|
}
|
|
5663
5624
|
));
|
|
5664
|
-
return /* @__PURE__ */
|
|
5625
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles45.container, style], accessibilityLabel }, label ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles45.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, wrap ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles45.wrapContainer }, chips) : /* @__PURE__ */ React55__default.default.createElement(
|
|
5665
5626
|
reactNative.ScrollView,
|
|
5666
5627
|
{
|
|
5667
5628
|
horizontal: true,
|
|
5668
5629
|
showsHorizontalScrollIndicator: false,
|
|
5669
|
-
contentContainerStyle:
|
|
5630
|
+
contentContainerStyle: styles45.scrollContent
|
|
5670
5631
|
},
|
|
5671
5632
|
chips
|
|
5672
|
-
), error ? /* @__PURE__ */
|
|
5633
|
+
), error ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles45.error, { color: colors.destructive }], allowFontScaling: true, accessibilityLiveRegion: "polite" }, error) : null);
|
|
5673
5634
|
}
|
|
5674
|
-
var
|
|
5635
|
+
var styles45 = reactNative.StyleSheet.create({
|
|
5675
5636
|
container: {
|
|
5676
5637
|
gap: vs(8)
|
|
5677
5638
|
},
|
|
@@ -5732,8 +5693,8 @@ function ImageUpload({
|
|
|
5732
5693
|
onPickerStarting
|
|
5733
5694
|
}) {
|
|
5734
5695
|
const { colors } = useTheme();
|
|
5735
|
-
const [imageLoaded, setImageLoaded] =
|
|
5736
|
-
const [isPicking, setIsPicking] =
|
|
5696
|
+
const [imageLoaded, setImageLoaded] = React55.useState(false);
|
|
5697
|
+
const [isPicking, setIsPicking] = React55.useState(false);
|
|
5737
5698
|
const handlePress = async () => {
|
|
5738
5699
|
if (disabled || loading || isPicking) return;
|
|
5739
5700
|
impactLight();
|
|
@@ -5771,7 +5732,7 @@ function ImageUpload({
|
|
|
5771
5732
|
backgroundColor: value && imageLoaded ? "transparent" : colors.surface,
|
|
5772
5733
|
overflow: "hidden"
|
|
5773
5734
|
};
|
|
5774
|
-
return /* @__PURE__ */
|
|
5735
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
5775
5736
|
PressableCard,
|
|
5776
5737
|
{
|
|
5777
5738
|
onPress: handlePress,
|
|
@@ -5783,7 +5744,7 @@ function ImageUpload({
|
|
|
5783
5744
|
accessibilityState: { disabled: disabled || loading },
|
|
5784
5745
|
style: [containerStyle, style]
|
|
5785
5746
|
},
|
|
5786
|
-
value ? /* @__PURE__ */
|
|
5747
|
+
value ? /* @__PURE__ */ React55__default.default.createElement(
|
|
5787
5748
|
expoImage.Image,
|
|
5788
5749
|
{
|
|
5789
5750
|
source: { uri: value },
|
|
@@ -5792,20 +5753,20 @@ function ImageUpload({
|
|
|
5792
5753
|
onLoad: () => setImageLoaded(true),
|
|
5793
5754
|
onError: () => setImageLoaded(true)
|
|
5794
5755
|
}
|
|
5795
|
-
) : /* @__PURE__ */
|
|
5756
|
+
) : /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles46.placeholder }, /* @__PURE__ */ React55__default.default.createElement(vectorIcons.Feather, { name: "image", size: ms(28), color: colors.foregroundMuted }), showPlaceholderText ? /* @__PURE__ */ React55__default.default.createElement(
|
|
5796
5757
|
reactNative.Text,
|
|
5797
5758
|
{
|
|
5798
|
-
style: [
|
|
5759
|
+
style: [styles46.placeholderText, { color: colors.foregroundMuted }],
|
|
5799
5760
|
numberOfLines: 1,
|
|
5800
5761
|
allowFontScaling: true
|
|
5801
5762
|
},
|
|
5802
5763
|
placeholder
|
|
5803
5764
|
) : null),
|
|
5804
|
-
loading || isPicking ? /* @__PURE__ */
|
|
5805
|
-
value && !loading ? /* @__PURE__ */
|
|
5765
|
+
loading || isPicking ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles46.loadingOverlay, { backgroundColor: colors.overlay, borderRadius }] }, /* @__PURE__ */ React55__default.default.createElement(Spinner, { size: "md" })) : null,
|
|
5766
|
+
value && !loading ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles46.editBadge, pointerEvents: "none" }, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles46.editBadgeInner, { backgroundColor: colors.overlay }] }, /* @__PURE__ */ React55__default.default.createElement(vectorIcons.Feather, { name: "edit-2", size: ms(12), color: "#fff" }))) : null
|
|
5806
5767
|
);
|
|
5807
5768
|
}
|
|
5808
|
-
var
|
|
5769
|
+
var styles46 = reactNative.StyleSheet.create({
|
|
5809
5770
|
placeholder: {
|
|
5810
5771
|
flex: 1,
|
|
5811
5772
|
alignItems: "center",
|
|
@@ -6063,29 +6024,21 @@ var CATEGORIES = [
|
|
|
6063
6024
|
]
|
|
6064
6025
|
}
|
|
6065
6026
|
];
|
|
6066
|
-
var _allIcons = null;
|
|
6067
|
-
var _categorized = null;
|
|
6068
6027
|
function getAllCuratedIcons() {
|
|
6069
|
-
|
|
6070
|
-
|
|
6071
|
-
|
|
6072
|
-
for (const
|
|
6073
|
-
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
result.push(name);
|
|
6077
|
-
}
|
|
6028
|
+
const seen = /* @__PURE__ */ new Set();
|
|
6029
|
+
const result = [];
|
|
6030
|
+
for (const cat of CATEGORIES) {
|
|
6031
|
+
for (const name of cat.icons) {
|
|
6032
|
+
if (!seen.has(name)) {
|
|
6033
|
+
seen.add(name);
|
|
6034
|
+
result.push(name);
|
|
6078
6035
|
}
|
|
6079
6036
|
}
|
|
6080
|
-
_allIcons = result;
|
|
6081
6037
|
}
|
|
6082
|
-
return
|
|
6038
|
+
return result;
|
|
6083
6039
|
}
|
|
6084
6040
|
function getCuratedCategories() {
|
|
6085
|
-
|
|
6086
|
-
_categorized = CATEGORIES.map((cat) => ({ ...cat, icons: [...cat.icons] }));
|
|
6087
|
-
}
|
|
6088
|
-
return _categorized;
|
|
6041
|
+
return CATEGORIES.map((cat) => ({ ...cat, icons: [...cat.icons] }));
|
|
6089
6042
|
}
|
|
6090
6043
|
|
|
6091
6044
|
// src/components/IconPicker/IconPicker.tsx
|
|
@@ -6101,7 +6054,7 @@ function IconCell({ name, selected, size, onPress }) {
|
|
|
6101
6054
|
};
|
|
6102
6055
|
const iconColor = selected ? colors.primaryForeground : colors.foreground;
|
|
6103
6056
|
const bg = selected ? colors.primary : "transparent";
|
|
6104
|
-
return /* @__PURE__ */
|
|
6057
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
6105
6058
|
reactNative.TouchableOpacity,
|
|
6106
6059
|
{
|
|
6107
6060
|
onPress: handlePress,
|
|
@@ -6110,12 +6063,12 @@ function IconCell({ name, selected, size, onPress }) {
|
|
|
6110
6063
|
accessibilityRole: "button",
|
|
6111
6064
|
accessibilityState: { selected },
|
|
6112
6065
|
accessibilityLabel: name,
|
|
6113
|
-
style: [
|
|
6066
|
+
style: [styles47.cell, { width: size, height: size, backgroundColor: bg }]
|
|
6114
6067
|
},
|
|
6115
|
-
/* @__PURE__ */
|
|
6068
|
+
/* @__PURE__ */ React55__default.default.createElement(Icon, { name, size: ms(20), color: iconColor })
|
|
6116
6069
|
);
|
|
6117
6070
|
}
|
|
6118
|
-
var IconCellMemo =
|
|
6071
|
+
var IconCellMemo = React55__default.default.memo(IconCell);
|
|
6119
6072
|
function IconPicker({
|
|
6120
6073
|
value,
|
|
6121
6074
|
onChange,
|
|
@@ -6129,13 +6082,13 @@ function IconPicker({
|
|
|
6129
6082
|
}) {
|
|
6130
6083
|
const { colors } = useTheme();
|
|
6131
6084
|
const insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
6132
|
-
const sheetRef =
|
|
6133
|
-
const catScrollRef =
|
|
6134
|
-
const [activeCategory, setActiveCategory] =
|
|
6135
|
-
const [containerWidth, setContainerWidth] =
|
|
6136
|
-
const [ready, setReady] =
|
|
6137
|
-
const sheetName =
|
|
6138
|
-
const activeIcons =
|
|
6085
|
+
const sheetRef = React55.useRef(null);
|
|
6086
|
+
const catScrollRef = React55.useRef(null);
|
|
6087
|
+
const [activeCategory, setActiveCategory] = React55.useState(null);
|
|
6088
|
+
const [containerWidth, setContainerWidth] = React55.useState(() => reactNative.Dimensions.get("window").width - s(16) * 2);
|
|
6089
|
+
const [ready, setReady] = React55.useState(false);
|
|
6090
|
+
const sheetName = React55.useId();
|
|
6091
|
+
const activeIcons = React55.useMemo(() => {
|
|
6139
6092
|
const allIcons = getAllCuratedIcons();
|
|
6140
6093
|
if (activeCategory) {
|
|
6141
6094
|
return getCuratedCategories().find((c) => c.name === activeCategory)?.icons ?? allIcons;
|
|
@@ -6144,36 +6097,36 @@ function IconPicker({
|
|
|
6144
6097
|
}, [activeCategory]);
|
|
6145
6098
|
const gapPx = s(gap);
|
|
6146
6099
|
const cellSize = containerWidth > 0 ? Math.floor((containerWidth - gapPx * (numColumns - 1)) / numColumns) : 0;
|
|
6147
|
-
const rows =
|
|
6100
|
+
const rows = React55.useMemo(() => {
|
|
6148
6101
|
const result = [];
|
|
6149
6102
|
for (let i = 0; i < activeIcons.length; i += numColumns) {
|
|
6150
6103
|
result.push(activeIcons.slice(i, i + numColumns));
|
|
6151
6104
|
}
|
|
6152
6105
|
return result;
|
|
6153
6106
|
}, [activeIcons, numColumns]);
|
|
6154
|
-
const handleDismiss =
|
|
6107
|
+
const handleDismiss = React55.useCallback(() => {
|
|
6155
6108
|
setActiveCategory(null);
|
|
6156
6109
|
setReady(false);
|
|
6157
6110
|
}, []);
|
|
6158
|
-
const handleSelect =
|
|
6111
|
+
const handleSelect = React55.useCallback(
|
|
6159
6112
|
(iconName) => {
|
|
6160
6113
|
onChange(iconName);
|
|
6161
6114
|
},
|
|
6162
6115
|
[onChange]
|
|
6163
6116
|
);
|
|
6164
|
-
const handleOpen =
|
|
6117
|
+
const handleOpen = React55.useCallback(() => {
|
|
6165
6118
|
if (disabled) return;
|
|
6166
6119
|
impactMedium();
|
|
6167
6120
|
setActiveCategory(null);
|
|
6168
6121
|
setReady(false);
|
|
6169
6122
|
sheetRef.current?.present();
|
|
6170
6123
|
}, [disabled]);
|
|
6171
|
-
const renderBackdrop =
|
|
6172
|
-
(props) => /* @__PURE__ */
|
|
6124
|
+
const renderBackdrop = React55.useCallback(
|
|
6125
|
+
(props) => /* @__PURE__ */ React55__default.default.createElement(bottomSheet.BottomSheetBackdrop, { ...props, disappearsOnIndex: -1, appearsOnIndex: 0, pressBehavior: "close" }),
|
|
6173
6126
|
[]
|
|
6174
6127
|
);
|
|
6175
|
-
const selectedIcon = value ? /* @__PURE__ */
|
|
6176
|
-
return /* @__PURE__ */
|
|
6128
|
+
const selectedIcon = value ? /* @__PURE__ */ React55__default.default.createElement(Icon, { name: value, size: ms(28), color: colors.foreground }) : null;
|
|
6129
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles47.triggerContainer, style] }, label ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles47.triggerLabel, { color: colors.foreground }], allowFontScaling: true }, label) : null, /* @__PURE__ */ React55__default.default.createElement(
|
|
6177
6130
|
reactNative.TouchableOpacity,
|
|
6178
6131
|
{
|
|
6179
6132
|
onPress: handleOpen,
|
|
@@ -6184,26 +6137,26 @@ function IconPicker({
|
|
|
6184
6137
|
accessibilityLabel: label ?? "Seleccionar icono",
|
|
6185
6138
|
accessibilityState: { disabled },
|
|
6186
6139
|
style: [
|
|
6187
|
-
|
|
6140
|
+
styles47.trigger,
|
|
6188
6141
|
{
|
|
6189
6142
|
backgroundColor: disabled ? colors.surface : colors.background,
|
|
6190
6143
|
width: TRIGGER_SIZE,
|
|
6191
6144
|
height: TRIGGER_SIZE,
|
|
6192
6145
|
borderColor: error ? colors.destructive : value ? colors.primary : colors.border
|
|
6193
6146
|
},
|
|
6194
|
-
disabled &&
|
|
6147
|
+
disabled && styles47.triggerDisabled
|
|
6195
6148
|
]
|
|
6196
6149
|
},
|
|
6197
|
-
selectedIcon ?? /* @__PURE__ */
|
|
6198
|
-
), error ? /* @__PURE__ */
|
|
6150
|
+
selectedIcon ?? /* @__PURE__ */ React55__default.default.createElement(Icon, { name: "plus", size: ms(24), color: colors.foregroundMuted })
|
|
6151
|
+
), error ? /* @__PURE__ */ React55__default.default.createElement(
|
|
6199
6152
|
reactNative.Text,
|
|
6200
6153
|
{
|
|
6201
|
-
style: [
|
|
6154
|
+
style: [styles47.helperText, { color: colors.destructive }],
|
|
6202
6155
|
allowFontScaling: true,
|
|
6203
6156
|
accessibilityLiveRegion: "polite"
|
|
6204
6157
|
},
|
|
6205
6158
|
error
|
|
6206
|
-
) : null, !error && hint ? /* @__PURE__ */
|
|
6159
|
+
) : null, !error && hint ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles47.helperText, { color: colors.foregroundMuted }], allowFontScaling: true }, hint) : null, /* @__PURE__ */ React55__default.default.createElement(
|
|
6207
6160
|
bottomSheet.BottomSheetModal,
|
|
6208
6161
|
{
|
|
6209
6162
|
ref: sheetRef,
|
|
@@ -6212,37 +6165,37 @@ function IconPicker({
|
|
|
6212
6165
|
enableDynamicSizing: true,
|
|
6213
6166
|
maxDynamicContentSize: SCREEN_HEIGHT * 0.7,
|
|
6214
6167
|
backdropComponent: renderBackdrop,
|
|
6215
|
-
backgroundStyle: { ...
|
|
6216
|
-
handleIndicatorStyle: { ...
|
|
6168
|
+
backgroundStyle: { ...styles47.sheetBackground, backgroundColor: colors.card },
|
|
6169
|
+
handleIndicatorStyle: { ...styles47.handle, backgroundColor: colors.border },
|
|
6217
6170
|
enablePanDownToClose: true,
|
|
6218
6171
|
topInset: insets.top,
|
|
6219
6172
|
android_keyboardInputMode: "adjustPan"
|
|
6220
6173
|
},
|
|
6221
|
-
/* @__PURE__ */
|
|
6174
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
6222
6175
|
bottomSheet.BottomSheetScrollView,
|
|
6223
6176
|
{
|
|
6224
|
-
contentContainerStyle:
|
|
6177
|
+
contentContainerStyle: styles47.sheetContent,
|
|
6225
6178
|
showsVerticalScrollIndicator: true
|
|
6226
6179
|
},
|
|
6227
|
-
/* @__PURE__ */
|
|
6180
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
6228
6181
|
reactNative.View,
|
|
6229
6182
|
{
|
|
6230
|
-
style:
|
|
6183
|
+
style: styles47.gridContainer,
|
|
6231
6184
|
onLayout: (e) => {
|
|
6232
6185
|
setContainerWidth(e.nativeEvent.layout.width);
|
|
6233
6186
|
setReady(true);
|
|
6234
6187
|
}
|
|
6235
6188
|
},
|
|
6236
|
-
!ready ? /* @__PURE__ */
|
|
6189
|
+
!ready ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles47.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: [styles47.sectionLabel, { color: colors.foregroundSubtle }], allowFontScaling: true }, "Categor\xEDas"), /* @__PURE__ */ React55__default.default.createElement(
|
|
6237
6190
|
reactNativeGestureHandler.ScrollView,
|
|
6238
6191
|
{
|
|
6239
6192
|
ref: catScrollRef,
|
|
6240
6193
|
horizontal: true,
|
|
6241
6194
|
showsHorizontalScrollIndicator: false,
|
|
6242
|
-
contentContainerStyle:
|
|
6243
|
-
style:
|
|
6195
|
+
contentContainerStyle: styles47.categoryStrip,
|
|
6196
|
+
style: styles47.categoryScroll
|
|
6244
6197
|
},
|
|
6245
|
-
/* @__PURE__ */
|
|
6198
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
6246
6199
|
reactNative.TouchableOpacity,
|
|
6247
6200
|
{
|
|
6248
6201
|
onPress: () => setActiveCategory(null),
|
|
@@ -6252,18 +6205,18 @@ function IconPicker({
|
|
|
6252
6205
|
accessibilityLabel: "Todas",
|
|
6253
6206
|
accessibilityState: { selected: activeCategory === null },
|
|
6254
6207
|
style: [
|
|
6255
|
-
|
|
6208
|
+
styles47.categoryChip,
|
|
6256
6209
|
{
|
|
6257
6210
|
backgroundColor: activeCategory === null ? colors.primary : colors.surface,
|
|
6258
6211
|
borderColor: activeCategory === null ? colors.primary : colors.border
|
|
6259
6212
|
}
|
|
6260
6213
|
]
|
|
6261
6214
|
},
|
|
6262
|
-
/* @__PURE__ */
|
|
6215
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles47.categoryChipInner }, /* @__PURE__ */ React55__default.default.createElement(Icon, { name: "grid", size: ms(14), color: activeCategory === null ? colors.primaryForeground : colors.foregroundSubtle }), /* @__PURE__ */ React55__default.default.createElement(
|
|
6263
6216
|
reactNative.Text,
|
|
6264
6217
|
{
|
|
6265
6218
|
style: [
|
|
6266
|
-
|
|
6219
|
+
styles47.categoryChipText,
|
|
6267
6220
|
{ color: activeCategory === null ? colors.primaryForeground : colors.foreground }
|
|
6268
6221
|
],
|
|
6269
6222
|
allowFontScaling: true,
|
|
@@ -6272,7 +6225,7 @@ function IconPicker({
|
|
|
6272
6225
|
"Todas"
|
|
6273
6226
|
))
|
|
6274
6227
|
),
|
|
6275
|
-
getCuratedCategories().map((cat) => /* @__PURE__ */
|
|
6228
|
+
getCuratedCategories().map((cat) => /* @__PURE__ */ React55__default.default.createElement(
|
|
6276
6229
|
reactNative.TouchableOpacity,
|
|
6277
6230
|
{
|
|
6278
6231
|
key: cat.name,
|
|
@@ -6283,18 +6236,18 @@ function IconPicker({
|
|
|
6283
6236
|
accessibilityLabel: cat.labelEs,
|
|
6284
6237
|
accessibilityState: { selected: activeCategory === cat.name },
|
|
6285
6238
|
style: [
|
|
6286
|
-
|
|
6239
|
+
styles47.categoryChip,
|
|
6287
6240
|
{
|
|
6288
6241
|
backgroundColor: activeCategory === cat.name ? colors.primary : colors.surface,
|
|
6289
6242
|
borderColor: activeCategory === cat.name ? colors.primary : colors.border
|
|
6290
6243
|
}
|
|
6291
6244
|
]
|
|
6292
6245
|
},
|
|
6293
|
-
/* @__PURE__ */
|
|
6246
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles47.categoryChipInner }, /* @__PURE__ */ React55__default.default.createElement(Icon, { name: cat.categoryIcon, size: ms(14), color: activeCategory === cat.name ? colors.primaryForeground : colors.foregroundSubtle }), /* @__PURE__ */ React55__default.default.createElement(
|
|
6294
6247
|
reactNative.Text,
|
|
6295
6248
|
{
|
|
6296
6249
|
style: [
|
|
6297
|
-
|
|
6250
|
+
styles47.categoryChipText,
|
|
6298
6251
|
{ color: activeCategory === cat.name ? colors.primaryForeground : colors.foreground }
|
|
6299
6252
|
],
|
|
6300
6253
|
allowFontScaling: true,
|
|
@@ -6303,7 +6256,7 @@ function IconPicker({
|
|
|
6303
6256
|
cat.labelEs
|
|
6304
6257
|
))
|
|
6305
6258
|
))
|
|
6306
|
-
), /* @__PURE__ */
|
|
6259
|
+
), /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles47.separator, { backgroundColor: colors.border }] }), cellSize > 0 ? rows.map((row, i) => /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { key: row[0] ?? `row-${i}`, style: [styles47.row, { marginBottom: gapPx }] }, row.map((name) => /* @__PURE__ */ React55__default.default.createElement(
|
|
6307
6260
|
IconCellMemo,
|
|
6308
6261
|
{
|
|
6309
6262
|
key: name,
|
|
@@ -6315,12 +6268,12 @@ function IconPicker({
|
|
|
6315
6268
|
sheetRef.current?.dismiss();
|
|
6316
6269
|
}
|
|
6317
6270
|
}
|
|
6318
|
-
)), Array.from({ length: numColumns - row.length }).map((_, j) => /* @__PURE__ */
|
|
6271
|
+
)), Array.from({ length: numColumns - row.length }).map((_, j) => /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { key: `spacer-${j}`, style: { width: cellSize, height: cellSize } })))) : null)
|
|
6319
6272
|
)
|
|
6320
6273
|
)
|
|
6321
6274
|
));
|
|
6322
6275
|
}
|
|
6323
|
-
var
|
|
6276
|
+
var styles47 = reactNative.StyleSheet.create({
|
|
6324
6277
|
triggerContainer: {
|
|
6325
6278
|
gap: vs(8)
|
|
6326
6279
|
},
|
|
@@ -6435,18 +6388,18 @@ function NumberStepperBase({
|
|
|
6435
6388
|
};
|
|
6436
6389
|
const { button: buttonSize, icon: iconSize, valueFontSize, valueLineHeight, valueMinWidth } = sizeConfig[size];
|
|
6437
6390
|
const displayValue = String(value);
|
|
6438
|
-
return /* @__PURE__ */
|
|
6391
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles48.container, style] }, /* @__PURE__ */ React55__default.default.createElement(
|
|
6439
6392
|
PressableButton,
|
|
6440
6393
|
{
|
|
6441
6394
|
style: [
|
|
6442
|
-
|
|
6395
|
+
styles48.button,
|
|
6443
6396
|
{
|
|
6444
6397
|
width: buttonSize,
|
|
6445
6398
|
height: buttonSize,
|
|
6446
6399
|
backgroundColor: colors.surface,
|
|
6447
6400
|
borderColor: colors.border
|
|
6448
6401
|
},
|
|
6449
|
-
!canDecrement &&
|
|
6402
|
+
!canDecrement && styles48.buttonDisabled
|
|
6450
6403
|
],
|
|
6451
6404
|
enabled: canDecrement,
|
|
6452
6405
|
onPress: handleDecrement,
|
|
@@ -6457,12 +6410,12 @@ function NumberStepperBase({
|
|
|
6457
6410
|
accessibilityHint,
|
|
6458
6411
|
accessibilityState: { disabled: !canDecrement }
|
|
6459
6412
|
},
|
|
6460
|
-
/* @__PURE__ */
|
|
6461
|
-
), /* @__PURE__ */
|
|
6413
|
+
/* @__PURE__ */ React55__default.default.createElement(Icon, { name: "minus", size: iconSize, color: canDecrement ? colors.foreground : colors.foregroundMuted })
|
|
6414
|
+
), /* @__PURE__ */ React55__default.default.createElement(
|
|
6462
6415
|
reactNative.Text,
|
|
6463
6416
|
{
|
|
6464
6417
|
style: [
|
|
6465
|
-
|
|
6418
|
+
styles48.value,
|
|
6466
6419
|
{
|
|
6467
6420
|
color: colors.foreground,
|
|
6468
6421
|
fontSize: valueFontSize,
|
|
@@ -6475,18 +6428,18 @@ function NumberStepperBase({
|
|
|
6475
6428
|
accessibilityRole: "text"
|
|
6476
6429
|
},
|
|
6477
6430
|
displayValue
|
|
6478
|
-
), /* @__PURE__ */
|
|
6431
|
+
), /* @__PURE__ */ React55__default.default.createElement(
|
|
6479
6432
|
PressableButton,
|
|
6480
6433
|
{
|
|
6481
6434
|
style: [
|
|
6482
|
-
|
|
6435
|
+
styles48.button,
|
|
6483
6436
|
{
|
|
6484
6437
|
width: buttonSize,
|
|
6485
6438
|
height: buttonSize,
|
|
6486
6439
|
backgroundColor: colors.surface,
|
|
6487
6440
|
borderColor: colors.border
|
|
6488
6441
|
},
|
|
6489
|
-
!canIncrement &&
|
|
6442
|
+
!canIncrement && styles48.buttonDisabled
|
|
6490
6443
|
],
|
|
6491
6444
|
enabled: canIncrement,
|
|
6492
6445
|
onPress: handleIncrement,
|
|
@@ -6497,11 +6450,11 @@ function NumberStepperBase({
|
|
|
6497
6450
|
accessibilityHint,
|
|
6498
6451
|
accessibilityState: { disabled: !canIncrement }
|
|
6499
6452
|
},
|
|
6500
|
-
/* @__PURE__ */
|
|
6453
|
+
/* @__PURE__ */ React55__default.default.createElement(Icon, { name: "plus", size: iconSize, color: canIncrement ? colors.foreground : colors.foregroundMuted })
|
|
6501
6454
|
));
|
|
6502
6455
|
}
|
|
6503
|
-
var NumberStepper =
|
|
6504
|
-
var
|
|
6456
|
+
var NumberStepper = React55__default.default.memo(NumberStepperBase);
|
|
6457
|
+
var styles48 = reactNative.StyleSheet.create({
|
|
6505
6458
|
container: {
|
|
6506
6459
|
flexDirection: "row",
|
|
6507
6460
|
alignItems: "center",
|
|
@@ -6536,8 +6489,8 @@ function StatsComponent({
|
|
|
6536
6489
|
accessibilityLabel
|
|
6537
6490
|
}) {
|
|
6538
6491
|
const { colors } = useTheme();
|
|
6539
|
-
const [containerWidth, setContainerWidth] =
|
|
6540
|
-
const handleLayout =
|
|
6492
|
+
const [containerWidth, setContainerWidth] = React55.useState(0);
|
|
6493
|
+
const handleLayout = React55.useCallback((e) => {
|
|
6541
6494
|
const w = e.nativeEvent.layout.width;
|
|
6542
6495
|
if (w > 0 && w !== containerWidth) {
|
|
6543
6496
|
setContainerWidth(w);
|
|
@@ -6594,12 +6547,12 @@ function StatsComponent({
|
|
|
6594
6547
|
}
|
|
6595
6548
|
}[variant];
|
|
6596
6549
|
const iconColorResolved = iconColor ?? colors.primary;
|
|
6597
|
-
const resolvedIcon = iconName ? /* @__PURE__ */
|
|
6598
|
-
const iconElement = resolvedIcon ? /* @__PURE__ */
|
|
6599
|
-
const valueElement = /* @__PURE__ */
|
|
6600
|
-
const cardContent = /* @__PURE__ */
|
|
6550
|
+
const resolvedIcon = iconName ? /* @__PURE__ */ React55__default.default.createElement(Icon, { name: iconName, size: sizeStyles2.iconSize, color: iconColorResolved }) : icon;
|
|
6551
|
+
const iconElement = resolvedIcon ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles49.iconWrapper }, resolvedIcon) : null;
|
|
6552
|
+
const valueElement = /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles49.value, { color: colors.foreground, fontFamily: sizeStyles2.valueFontFamily, fontSize: sizeStyles2.valueFontSize, lineHeight: sizeStyles2.valueLineHeight }], allowFontScaling: true }, value);
|
|
6553
|
+
const cardContent = /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles49.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: styles49.compactValue }, valueElement), /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles49.label, { color: colors.foregroundSubtle, fontSize: sizeStyles2.labelFontSize, lineHeight: sizeStyles2.labelLineHeight }], allowFontScaling: true }, label), description ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles49.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: styles49.valueRow }, iconElement, valueElement), /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles49.label, { color: colors.foregroundSubtle, fontSize: sizeStyles2.labelFontSize, lineHeight: sizeStyles2.labelLineHeight }], allowFontScaling: true }, label), description ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles49.description, { color: colors.foregroundMuted, fontSize: sizeStyles2.descriptionFontSize, lineHeight: sizeStyles2.descriptionLineHeight }], allowFontScaling: true }, description) : null));
|
|
6601
6554
|
if (onPress) {
|
|
6602
|
-
return /* @__PURE__ */
|
|
6555
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
6603
6556
|
PressableCard,
|
|
6604
6557
|
{
|
|
6605
6558
|
onPress: handlePress,
|
|
@@ -6615,18 +6568,18 @@ function StatsComponent({
|
|
|
6615
6568
|
return cardContent;
|
|
6616
6569
|
}
|
|
6617
6570
|
function StatsGroup({ children, gap = s(12), style }) {
|
|
6618
|
-
return /* @__PURE__ */
|
|
6619
|
-
if (!
|
|
6571
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles49.group, { gap }, style] }, React55__default.default.Children.map(children, (child) => {
|
|
6572
|
+
if (!React55__default.default.isValidElement(child)) return child;
|
|
6620
6573
|
const childStyle = child.props.style;
|
|
6621
6574
|
const mergedStyle = childStyle ? [childStyle, { alignSelf: "stretch" }] : [{ alignSelf: "stretch" }];
|
|
6622
|
-
return /* @__PURE__ */
|
|
6575
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles49.groupItem }, React55__default.default.cloneElement(
|
|
6623
6576
|
child,
|
|
6624
6577
|
{ style: mergedStyle }
|
|
6625
6578
|
));
|
|
6626
6579
|
}));
|
|
6627
6580
|
}
|
|
6628
|
-
var Stats = Object.assign(
|
|
6629
|
-
var
|
|
6581
|
+
var Stats = Object.assign(React55__default.default.memo(StatsComponent), { Group: StatsGroup });
|
|
6582
|
+
var styles49 = reactNative.StyleSheet.create({
|
|
6630
6583
|
card: {
|
|
6631
6584
|
borderRadius: RADIUS.md,
|
|
6632
6585
|
borderWidth: 1,
|
|
@@ -6676,6 +6629,197 @@ var styles50 = reactNative.StyleSheet.create({
|
|
|
6676
6629
|
flex: 1
|
|
6677
6630
|
}
|
|
6678
6631
|
});
|
|
6632
|
+
function Image7({ src, fallback, aspectRatio, borderRadius = 0, style, ...props }) {
|
|
6633
|
+
const { colors } = useTheme();
|
|
6634
|
+
const [failed, setFailed] = React55.useState(false);
|
|
6635
|
+
if (!src || failed) {
|
|
6636
|
+
return fallback ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [style, { overflow: "hidden" }] }, fallback) : /* @__PURE__ */ React55__default.default.createElement(
|
|
6637
|
+
reactNative.View,
|
|
6638
|
+
{
|
|
6639
|
+
style: [
|
|
6640
|
+
{ backgroundColor: colors.skeleton, overflow: "hidden" },
|
|
6641
|
+
borderRadius ? { borderRadius } : void 0,
|
|
6642
|
+
aspectRatio ? { aspectRatio } : void 0,
|
|
6643
|
+
style
|
|
6644
|
+
]
|
|
6645
|
+
}
|
|
6646
|
+
);
|
|
6647
|
+
}
|
|
6648
|
+
const imageStyle = {
|
|
6649
|
+
...aspectRatio ? { aspectRatio, width: "100%" } : {},
|
|
6650
|
+
...borderRadius ? { borderRadius } : {}
|
|
6651
|
+
};
|
|
6652
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
6653
|
+
expoImage.Image,
|
|
6654
|
+
{
|
|
6655
|
+
source: { uri: src },
|
|
6656
|
+
style: [imageStyle, style],
|
|
6657
|
+
onError: () => setFailed(true),
|
|
6658
|
+
...props
|
|
6659
|
+
}
|
|
6660
|
+
);
|
|
6661
|
+
}
|
|
6662
|
+
function ScreenContainer({
|
|
6663
|
+
children,
|
|
6664
|
+
maxWidth = BREAKPOINTS.wide,
|
|
6665
|
+
scroll = false,
|
|
6666
|
+
backgroundColor,
|
|
6667
|
+
paddingTop,
|
|
6668
|
+
paddingBottom,
|
|
6669
|
+
paddingHorizontal,
|
|
6670
|
+
keyboard = false,
|
|
6671
|
+
style: _style
|
|
6672
|
+
}) {
|
|
6673
|
+
const insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
6674
|
+
const { colors } = useTheme();
|
|
6675
|
+
const wrapperStyle = {
|
|
6676
|
+
flex: 1,
|
|
6677
|
+
backgroundColor: backgroundColor ?? colors.background,
|
|
6678
|
+
paddingTop: paddingTop ?? insets.top,
|
|
6679
|
+
paddingBottom: paddingBottom ?? insets.bottom,
|
|
6680
|
+
paddingHorizontal: paddingHorizontal ?? 0,
|
|
6681
|
+
..._style
|
|
6682
|
+
};
|
|
6683
|
+
const inner = /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles50.inner, { maxWidth: maxWidth || void 0 }] }, children);
|
|
6684
|
+
const content = scroll ? /* @__PURE__ */ React55__default.default.createElement(
|
|
6685
|
+
reactNative.ScrollView,
|
|
6686
|
+
{
|
|
6687
|
+
style: styles50.scroll,
|
|
6688
|
+
contentContainerStyle: styles50.scrollContent,
|
|
6689
|
+
keyboardShouldPersistTaps: "handled"
|
|
6690
|
+
},
|
|
6691
|
+
inner
|
|
6692
|
+
) : inner;
|
|
6693
|
+
if (keyboard) {
|
|
6694
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
6695
|
+
reactNative.KeyboardAvoidingView,
|
|
6696
|
+
{
|
|
6697
|
+
style: wrapperStyle,
|
|
6698
|
+
behavior: reactNative.Platform.OS === "ios" ? "padding" : void 0,
|
|
6699
|
+
keyboardVerticalOffset: reactNative.Platform.OS === "ios" ? 0 : 0
|
|
6700
|
+
},
|
|
6701
|
+
content
|
|
6702
|
+
);
|
|
6703
|
+
}
|
|
6704
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: wrapperStyle }, content);
|
|
6705
|
+
}
|
|
6706
|
+
var styles50 = reactNative.StyleSheet.create({
|
|
6707
|
+
scroll: {
|
|
6708
|
+
flex: 1
|
|
6709
|
+
},
|
|
6710
|
+
scrollContent: {
|
|
6711
|
+
flexGrow: 1
|
|
6712
|
+
},
|
|
6713
|
+
inner: {
|
|
6714
|
+
flex: 1,
|
|
6715
|
+
alignSelf: "center",
|
|
6716
|
+
width: "100%"
|
|
6717
|
+
}
|
|
6718
|
+
});
|
|
6719
|
+
function VirtualizedList({
|
|
6720
|
+
sections,
|
|
6721
|
+
renderItem,
|
|
6722
|
+
emptyTitle = "Sin contenido",
|
|
6723
|
+
emptyDescription,
|
|
6724
|
+
emptyComponent,
|
|
6725
|
+
refreshing = false,
|
|
6726
|
+
onRefresh,
|
|
6727
|
+
stickyHeaders = true,
|
|
6728
|
+
headerColor,
|
|
6729
|
+
style,
|
|
6730
|
+
...props
|
|
6731
|
+
}) {
|
|
6732
|
+
const { colors } = useTheme();
|
|
6733
|
+
const renderSectionHeader = React55.useCallback(
|
|
6734
|
+
({ section }) => {
|
|
6735
|
+
if (!section.title) return null;
|
|
6736
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles51.sectionHeader, { backgroundColor: colors.background }] }, /* @__PURE__ */ React55__default.default.createElement(
|
|
6737
|
+
reactNative.Text,
|
|
6738
|
+
{
|
|
6739
|
+
style: [styles51.sectionHeaderText, { color: headerColor ?? colors.foregroundMuted }],
|
|
6740
|
+
allowFontScaling: true
|
|
6741
|
+
},
|
|
6742
|
+
section.title
|
|
6743
|
+
));
|
|
6744
|
+
},
|
|
6745
|
+
[colors.background, colors.foregroundMuted, headerColor]
|
|
6746
|
+
);
|
|
6747
|
+
const keyExtractor = React55.useCallback(
|
|
6748
|
+
(_item, index) => String(index),
|
|
6749
|
+
[]
|
|
6750
|
+
);
|
|
6751
|
+
const flatSections = sections.filter((s2) => s2.data.length > 0);
|
|
6752
|
+
const hasData = flatSections.length > 0;
|
|
6753
|
+
if (!hasData) {
|
|
6754
|
+
if (emptyComponent) return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style }, emptyComponent);
|
|
6755
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles51.empty, style] }, /* @__PURE__ */ React55__default.default.createElement(
|
|
6756
|
+
reactNative.Text,
|
|
6757
|
+
{
|
|
6758
|
+
style: [styles51.emptyTitle, { color: colors.foregroundMuted }],
|
|
6759
|
+
allowFontScaling: true
|
|
6760
|
+
},
|
|
6761
|
+
emptyTitle
|
|
6762
|
+
), emptyDescription ? /* @__PURE__ */ React55__default.default.createElement(
|
|
6763
|
+
reactNative.Text,
|
|
6764
|
+
{
|
|
6765
|
+
style: [styles51.emptyDescription, { color: colors.foregroundMuted }],
|
|
6766
|
+
allowFontScaling: true
|
|
6767
|
+
},
|
|
6768
|
+
emptyDescription
|
|
6769
|
+
) : null);
|
|
6770
|
+
}
|
|
6771
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
6772
|
+
reactNative.SectionList,
|
|
6773
|
+
{
|
|
6774
|
+
sections: flatSections,
|
|
6775
|
+
renderItem,
|
|
6776
|
+
renderSectionHeader,
|
|
6777
|
+
keyExtractor,
|
|
6778
|
+
stickySectionHeadersEnabled: stickyHeaders,
|
|
6779
|
+
refreshControl: onRefresh ? /* @__PURE__ */ React55__default.default.createElement(
|
|
6780
|
+
reactNative.RefreshControl,
|
|
6781
|
+
{
|
|
6782
|
+
refreshing,
|
|
6783
|
+
onRefresh,
|
|
6784
|
+
tintColor: colors.primary
|
|
6785
|
+
}
|
|
6786
|
+
) : void 0,
|
|
6787
|
+
style,
|
|
6788
|
+
showsVerticalScrollIndicator: false,
|
|
6789
|
+
...props
|
|
6790
|
+
}
|
|
6791
|
+
);
|
|
6792
|
+
}
|
|
6793
|
+
var styles51 = reactNative.StyleSheet.create({
|
|
6794
|
+
sectionHeader: {
|
|
6795
|
+
paddingHorizontal: s(16),
|
|
6796
|
+
paddingTop: vs(16),
|
|
6797
|
+
paddingBottom: vs(6)
|
|
6798
|
+
},
|
|
6799
|
+
sectionHeaderText: {
|
|
6800
|
+
fontFamily: "Sohne-SemiBold",
|
|
6801
|
+
fontSize: 13,
|
|
6802
|
+
letterSpacing: 0.32,
|
|
6803
|
+
textTransform: "uppercase"
|
|
6804
|
+
},
|
|
6805
|
+
empty: {
|
|
6806
|
+
flex: 1,
|
|
6807
|
+
alignItems: "center",
|
|
6808
|
+
justifyContent: "center",
|
|
6809
|
+
paddingHorizontal: s(32),
|
|
6810
|
+
gap: vs(8)
|
|
6811
|
+
},
|
|
6812
|
+
emptyTitle: {
|
|
6813
|
+
fontFamily: "Sohne-Medium",
|
|
6814
|
+
fontSize: 16,
|
|
6815
|
+
textAlign: "center"
|
|
6816
|
+
},
|
|
6817
|
+
emptyDescription: {
|
|
6818
|
+
fontFamily: "Sohne-Regular",
|
|
6819
|
+
fontSize: 14,
|
|
6820
|
+
textAlign: "center"
|
|
6821
|
+
}
|
|
6822
|
+
});
|
|
6679
6823
|
|
|
6680
6824
|
// src/utils/typography.ts
|
|
6681
6825
|
function getResponsiveFontSize(text, maxSize, steps = [
|
|
@@ -6691,34 +6835,26 @@ function getResponsiveFontSize(text, maxSize, steps = [
|
|
|
6691
6835
|
return maxSize - 8;
|
|
6692
6836
|
}
|
|
6693
6837
|
function useConfirmDialog(options) {
|
|
6694
|
-
const [visible, setVisible] =
|
|
6695
|
-
const [loading, setLoading] =
|
|
6696
|
-
const
|
|
6697
|
-
const
|
|
6698
|
-
|
|
6699
|
-
React54.useEffect(() => {
|
|
6838
|
+
const [visible, setVisible] = React55.useState(false);
|
|
6839
|
+
const [loading, setLoading] = React55.useState(false);
|
|
6840
|
+
const onConfirmRef = React55.useRef(options.onConfirm);
|
|
6841
|
+
const onCancelRef = React55.useRef(options.onCancel);
|
|
6842
|
+
React55.useEffect(() => {
|
|
6700
6843
|
onConfirmRef.current = options.onConfirm;
|
|
6701
6844
|
onCancelRef.current = options.onCancel;
|
|
6702
6845
|
});
|
|
6703
|
-
|
|
6704
|
-
|
|
6705
|
-
mountedRef.current = false;
|
|
6706
|
-
};
|
|
6707
|
-
}, []);
|
|
6708
|
-
const open = React54.useCallback(() => setVisible(true), []);
|
|
6709
|
-
const handleConfirm = React54.useCallback(async () => {
|
|
6846
|
+
const open = React55.useCallback(() => setVisible(true), []);
|
|
6847
|
+
const handleConfirm = React55.useCallback(async () => {
|
|
6710
6848
|
setLoading(true);
|
|
6711
6849
|
try {
|
|
6712
6850
|
await onConfirmRef.current();
|
|
6713
6851
|
} catch {
|
|
6714
6852
|
} finally {
|
|
6715
|
-
|
|
6716
|
-
|
|
6717
|
-
setVisible(false);
|
|
6718
|
-
}
|
|
6853
|
+
setLoading(false);
|
|
6854
|
+
setVisible(false);
|
|
6719
6855
|
}
|
|
6720
6856
|
}, []);
|
|
6721
|
-
const handleCancel =
|
|
6857
|
+
const handleCancel = React55.useCallback(() => {
|
|
6722
6858
|
setVisible(false);
|
|
6723
6859
|
onCancelRef.current?.();
|
|
6724
6860
|
}, []);
|
|
@@ -6770,18 +6906,19 @@ exports.ICON_SIZES = ICON_SIZES;
|
|
|
6770
6906
|
exports.Icon = Icon;
|
|
6771
6907
|
exports.IconButton = IconButton;
|
|
6772
6908
|
exports.IconPicker = IconPicker;
|
|
6909
|
+
exports.Image = Image7;
|
|
6773
6910
|
exports.ImageUpload = ImageUpload;
|
|
6774
6911
|
exports.ImageViewer = ImageViewer;
|
|
6775
6912
|
exports.Input = Input;
|
|
6776
6913
|
exports.LabelValue = LabelValue;
|
|
6777
6914
|
exports.ListGroup = ListGroup;
|
|
6778
|
-
exports.ListGroupFooter =
|
|
6779
|
-
exports.ListGroupHeader =
|
|
6915
|
+
exports.ListGroupFooter = ItemGroupFooter;
|
|
6916
|
+
exports.ListGroupHeader = ItemGroupHeader;
|
|
6780
6917
|
exports.ListItem = ListItem;
|
|
6781
6918
|
exports.MediaCard = MediaCard;
|
|
6782
6919
|
exports.MenuGroup = MenuGroup;
|
|
6783
|
-
exports.MenuGroupFooter =
|
|
6784
|
-
exports.MenuGroupHeader =
|
|
6920
|
+
exports.MenuGroupFooter = ItemGroupFooter;
|
|
6921
|
+
exports.MenuGroupHeader = ItemGroupHeader;
|
|
6785
6922
|
exports.MenuItem = MenuItem;
|
|
6786
6923
|
exports.MonthPicker = MonthPicker;
|
|
6787
6924
|
exports.NumberStepper = NumberStepper;
|
|
@@ -6794,6 +6931,7 @@ exports.RadioGroup = RadioGroup;
|
|
|
6794
6931
|
exports.RetrayProvider = RetrayProvider;
|
|
6795
6932
|
exports.SHADOWS = SHADOWS;
|
|
6796
6933
|
exports.SPACING = SPACING;
|
|
6934
|
+
exports.ScreenContainer = ScreenContainer;
|
|
6797
6935
|
exports.Select = Select;
|
|
6798
6936
|
exports.SelectableCard = SelectableCard;
|
|
6799
6937
|
exports.SelectableCardGroup = SelectableCardGroup;
|
|
@@ -6818,6 +6956,7 @@ exports.Textarea = Textarea;
|
|
|
6818
6956
|
exports.ThemeProvider = ThemeProvider;
|
|
6819
6957
|
exports.ToastProvider = ToastProvider;
|
|
6820
6958
|
exports.Toggle = Toggle;
|
|
6959
|
+
exports.VirtualizedList = VirtualizedList;
|
|
6821
6960
|
exports.dateToMonthPickerValue = dateToMonthPickerValue;
|
|
6822
6961
|
exports.defaultDark = defaultDark;
|
|
6823
6962
|
exports.defaultLight = defaultLight;
|
|
@@ -6833,6 +6972,7 @@ exports.notificationSuccess = notificationSuccess;
|
|
|
6833
6972
|
exports.notificationWarning = notificationWarning;
|
|
6834
6973
|
exports.selectionAsync = selectionAsync;
|
|
6835
6974
|
exports.useConfirmDialog = useConfirmDialog;
|
|
6975
|
+
exports.useSheetModal = useSheetModal;
|
|
6836
6976
|
exports.useTheme = useTheme;
|
|
6837
6977
|
exports.useToast = useToast;
|
|
6838
6978
|
exports.withAlpha = withAlpha;
|