@retray-dev/ui-kit 13.0.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 +26 -9
- package/README.md +11 -12
- package/{COMPONENTS.md → SKILL.md} +515 -815
- package/dist/Accordion.d.mts +8 -6
- package/dist/Accordion.d.ts +8 -6
- package/dist/Accordion.js +40 -40
- package/dist/Accordion.mjs +4 -5
- 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 -5
- package/dist/AppHeader.d.mts +8 -5
- package/dist/AppHeader.d.ts +8 -5
- package/dist/AppHeader.js +44 -31
- package/dist/AppHeader.mjs +6 -7
- package/dist/Avatar.d.mts +4 -4
- package/dist/Avatar.d.ts +4 -4
- package/dist/Avatar.mjs +2 -3
- 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 -4
- 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 -6
- package/dist/ButtonGroup.d.mts +3 -3
- package/dist/ButtonGroup.d.ts +3 -3
- package/dist/ButtonGroup.mjs +0 -1
- 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 -5
- 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 -6
- package/dist/Checkbox.d.mts +3 -2
- package/dist/Checkbox.d.ts +3 -2
- package/dist/Checkbox.js +26 -15
- package/dist/Checkbox.mjs +3 -4
- 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 -6
- package/dist/ConfirmDialog.d.mts +3 -2
- package/dist/ConfirmDialog.d.ts +3 -2
- package/dist/ConfirmDialog.js +67 -49
- package/dist/ConfirmDialog.mjs +7 -7
- package/dist/CurrencyDisplay.d.mts +3 -3
- package/dist/CurrencyDisplay.d.ts +3 -3
- package/dist/CurrencyDisplay.mjs +2 -3
- 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 -5
- 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 -4
- 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 -7
- 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 -6
- package/dist/Form.d.mts +9 -9
- package/dist/Form.d.ts +9 -9
- package/dist/Form.mjs +2 -3
- 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 -3
- 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 -5
- 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 -7
- 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 -4
- package/dist/ImageUpload.d.ts +2 -4
- package/dist/ImageUpload.js +50 -40
- package/dist/ImageUpload.mjs +5 -6
- 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 -7
- 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 -4
- 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 -4
- package/dist/ListItem.d.mts +7 -6
- package/dist/ListItem.d.ts +7 -6
- package/dist/ListItem.js +33 -28
- package/dist/ListItem.mjs +5 -6
- 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 -6
- package/dist/MenuItem.d.mts +6 -5
- package/dist/MenuItem.d.ts +6 -5
- package/dist/MenuItem.js +33 -28
- package/dist/MenuItem.mjs +5 -6
- 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 -4
- package/dist/NumberStepper.d.mts +4 -3
- package/dist/NumberStepper.d.ts +4 -3
- package/dist/NumberStepper.js +34 -28
- package/dist/NumberStepper.mjs +5 -6
- 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 -5
- 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 -3
- 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 -8
- package/dist/Progress.d.mts +2 -2
- package/dist/Progress.d.ts +2 -2
- package/dist/Progress.mjs +2 -3
- 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 -4
- 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 -4
- 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 +3 -2
- package/dist/Select.d.ts +3 -2
- package/dist/Select.js +41 -46
- package/dist/Select.mjs +3 -4
- 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 -6
- package/dist/SelectableGrid.d.mts +5 -4
- package/dist/SelectableGrid.d.ts +5 -4
- package/dist/SelectableGrid.js +80 -45
- package/dist/SelectableGrid.mjs +5 -6
- 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 -3
- package/dist/Sheet.d.mts +11 -11
- package/dist/Sheet.d.ts +11 -11
- package/dist/Sheet.js +62 -34
- package/dist/Sheet.mjs +4 -4
- 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 -6
- package/dist/Skeleton.d.mts +5 -5
- package/dist/Skeleton.d.ts +5 -5
- package/dist/Skeleton.mjs +3 -4
- package/dist/Slider.d.mts +3 -2
- package/dist/Slider.d.ts +3 -2
- package/dist/Slider.js +25 -14
- package/dist/Slider.mjs +3 -4
- package/dist/Spinner.d.mts +2 -2
- package/dist/Spinner.d.ts +2 -2
- package/dist/Spinner.mjs +2 -3
- 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 -6
- package/dist/Switch.d.mts +3 -2
- package/dist/Switch.d.ts +3 -2
- package/dist/Switch.js +25 -15
- package/dist/Switch.mjs +3 -4
- 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 -5
- 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 -4
- 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 -4
- 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 -4
- package/dist/Toast.d.mts +15 -13
- package/dist/Toast.d.ts +15 -13
- package/dist/Toast.mjs +2 -3
- 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 -5
- 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-6CR4S6W2.mjs → chunk-2J5OZOMX.mjs} +19 -8
- 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-UOKFSFNJ.mjs → chunk-4PF4LKNT.mjs} +4 -2
- package/dist/{chunk-5MYNAAFE.mjs → chunk-5J7VKFSZ.mjs} +4 -4
- package/dist/{chunk-BTUW5LSG.mjs → chunk-5TNQ573V.mjs} +4 -3
- package/dist/{chunk-6QLBHUEG.mjs → chunk-6T2DVIQT.mjs} +7 -5
- package/dist/{chunk-L3YKPTJQ.mjs → chunk-7CE6PDCQ.mjs} +2 -2
- package/dist/{chunk-Y6YS33GM.mjs → chunk-AHFEAY6M.mjs} +4 -4
- package/dist/{chunk-4ZO5PTKF.mjs → chunk-AZRATPNP.mjs} +5 -3
- package/dist/{chunk-V2ZB2XNS.mjs → chunk-BGXOEFDM.mjs} +9 -22
- package/dist/{chunk-KC5QDYGZ.mjs → chunk-BMAAAJWN.mjs} +2 -2
- package/dist/{chunk-IJCMPVW5.mjs → chunk-BQMJQMWY.mjs} +2 -2
- package/dist/{chunk-E4EQSCKR.mjs → chunk-BTPCY4C7.mjs} +7 -5
- package/dist/chunk-BVJAYPAD.mjs +55 -0
- package/dist/{chunk-RA6SAAFE.mjs → chunk-BWLVX2SQ.mjs} +4 -4
- package/dist/{chunk-EROPDCB5.mjs → chunk-CCEM3HIJ.mjs} +30 -25
- 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-TETMEKZE.mjs → chunk-NQYS6RPX.mjs} +8 -5
- 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-URIH43IJ.mjs → chunk-RLPPRIJ7.mjs} +20 -34
- package/dist/{chunk-XCIG6HT2.mjs → chunk-S433IOQE.mjs} +2 -2
- package/dist/{chunk-IGU223UM.mjs → chunk-SWUZKVYO.mjs} +1 -1
- package/dist/{chunk-MP7GLMIR.mjs → chunk-T4KMKHTI.mjs} +55 -23
- package/dist/{chunk-2QOHHBJC.mjs → chunk-UBTP4NPP.mjs} +5 -21
- 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-CBIZLRYH.mjs → chunk-Y5TPAKOS.mjs} +14 -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/fonts.mjs +0 -2
- package/dist/{index-CY34hxPN.d.ts → index-CinAt5Uo.d.mts} +3 -3
- package/dist/{index-CY34hxPN.d.mts → index-CinAt5Uo.d.ts} +3 -3
- package/dist/index.d.mts +69 -19
- package/dist/index.d.ts +69 -19
- package/dist/index.js +1023 -839
- package/dist/index.mjs +76 -70
- package/package.json +15 -12
- package/src/components/Accordion/Accordion.tsx +12 -18
- package/src/components/AppHeader/AppHeader.tsx +33 -10
- package/src/components/Checkbox/Checkbox.tsx +3 -0
- package/src/components/ConfirmDialog/ConfirmDialog.tsx +7 -21
- 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 +34 -26
- 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/ListItem/ListItem.tsx +3 -0
- package/src/components/MenuGroup/index.tsx +20 -0
- package/src/components/MenuItem/MenuItem.tsx +3 -0
- package/src/components/NumberStepper/NumberStepper.tsx +4 -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 +25 -30
- package/src/components/SelectableGrid/SelectableGrid.tsx +51 -20
- package/src/components/Separator/Separator.tsx +35 -2
- package/src/components/Sheet/Sheet.tsx +3 -21
- package/src/components/Sheet/index.ts +2 -2
- package/src/components/Slider/Slider.tsx +3 -0
- package/src/components/Switch/Switch.tsx +3 -1
- package/src/components/Tabs/Tabs.tsx +9 -9
- package/src/components/Tabs/index.ts +1 -1
- package/src/components/Text/Text.tsx +7 -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 -5
- 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 -5
- package/dist/chunk-ARONDO7M.mjs +0 -40
- package/dist/chunk-EW2FIDSM.mjs +0 -29
- package/dist/chunk-S2VGME7X.mjs +0 -82
- package/dist/chunk-Y6FXYEAI.mjs +0 -8
- 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);
|
|
@@ -35,12 +55,7 @@ var Ionicons__default = /*#__PURE__*/_interopDefault(Ionicons);
|
|
|
35
55
|
var Animated6__default = /*#__PURE__*/_interopDefault(Animated6);
|
|
36
56
|
var RNSlider__default = /*#__PURE__*/_interopDefault(RNSlider);
|
|
37
57
|
|
|
38
|
-
|
|
39
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
40
|
-
}) : x)(function(x) {
|
|
41
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
42
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
43
|
-
});
|
|
58
|
+
// src/theme/ThemeProvider.tsx
|
|
44
59
|
|
|
45
60
|
// src/theme/colorUtils.ts
|
|
46
61
|
function hexToRgb(hex) {
|
|
@@ -66,23 +81,6 @@ function componentToHex(c) {
|
|
|
66
81
|
function rgbToHex(r, g, b) {
|
|
67
82
|
return `#${componentToHex(r)}${componentToHex(g)}${componentToHex(b)}`;
|
|
68
83
|
}
|
|
69
|
-
function withAlphaOnWhite(hex, alpha) {
|
|
70
|
-
const rgb = hexToRgb(hex);
|
|
71
|
-
if (!rgb) return hex;
|
|
72
|
-
const r = rgb.r * alpha + 255 * (1 - alpha);
|
|
73
|
-
const g = rgb.g * alpha + 255 * (1 - alpha);
|
|
74
|
-
const b = rgb.b * alpha + 255 * (1 - alpha);
|
|
75
|
-
return rgbToHex(r, g, b);
|
|
76
|
-
}
|
|
77
|
-
function withAlphaOnDark(hex, alpha, bgHex = "#0f0f0f") {
|
|
78
|
-
const rgb = hexToRgb(hex);
|
|
79
|
-
const bg = hexToRgb(bgHex);
|
|
80
|
-
if (!rgb || !bg) return hex;
|
|
81
|
-
const r = rgb.r * alpha + bg.r * (1 - alpha);
|
|
82
|
-
const g = rgb.g * alpha + bg.g * (1 - alpha);
|
|
83
|
-
const b = rgb.b * alpha + bg.b * (1 - alpha);
|
|
84
|
-
return rgbToHex(r, g, b);
|
|
85
|
-
}
|
|
86
84
|
function mixWithBackground(fgHex, bgHex, opacity) {
|
|
87
85
|
const fg = hexToRgb(fgHex);
|
|
88
86
|
const bg = hexToRgb(bgHex);
|
|
@@ -92,13 +90,11 @@ function mixWithBackground(fgHex, bgHex, opacity) {
|
|
|
92
90
|
const b = fg.b * opacity + bg.b * (1 - opacity);
|
|
93
91
|
return rgbToHex(r, g, b);
|
|
94
92
|
}
|
|
95
|
-
function
|
|
96
|
-
return
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
if (!rgb) return hex;
|
|
101
|
-
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
|
+
};
|
|
102
98
|
}
|
|
103
99
|
var defaultLight = {
|
|
104
100
|
background: "#ffffff",
|
|
@@ -141,17 +137,16 @@ var defaultDark = {
|
|
|
141
137
|
function deriveColors(t, scheme) {
|
|
142
138
|
const dark = scheme === "dark";
|
|
143
139
|
const bg = t.background;
|
|
140
|
+
const WHITE = "#ffffff";
|
|
141
|
+
const BLACK = "#000000";
|
|
144
142
|
const foregroundSubtle = mixWithBackground(t.foreground, bg, 0.7);
|
|
145
143
|
const foregroundMuted = mixWithBackground(t.foreground, bg, 0.62);
|
|
146
|
-
const surface = dark ?
|
|
147
|
-
const surfaceStrong = dark ?
|
|
148
|
-
const skeleton = dark ?
|
|
149
|
-
const destructiveTint
|
|
150
|
-
const
|
|
151
|
-
const
|
|
152
|
-
const successBorder = dark ? withAlphaOnDark(t.success, 0.45, bg) : withAlphaOnWhite(t.success, 0.3);
|
|
153
|
-
const warningTint = dark ? withAlphaOnDark(t.warning, 0.15, bg) : withAlphaOnWhite(t.warning, 0.08);
|
|
154
|
-
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);
|
|
155
150
|
return {
|
|
156
151
|
...t,
|
|
157
152
|
foregroundSubtle,
|
|
@@ -170,64 +165,53 @@ function deriveColors(t, scheme) {
|
|
|
170
165
|
accentForegroundResolved: t.accentForeground ?? t.primaryForeground,
|
|
171
166
|
ring: t.accent ?? t.primary,
|
|
172
167
|
input: t.border,
|
|
173
|
-
separator: dark ?
|
|
168
|
+
separator: dark ? mixWithBackground(t.border, WHITE, 0.78) : mixWithBackground(t.border, BLACK, 0.84)
|
|
174
169
|
};
|
|
175
170
|
}
|
|
176
171
|
|
|
177
172
|
// src/theme/ThemeProvider.tsx
|
|
178
|
-
var ThemeContext =
|
|
173
|
+
var ThemeContext = React55.createContext(void 0);
|
|
179
174
|
function ThemeProvider({ children, theme, colorScheme = "system" }) {
|
|
180
175
|
const systemScheme = reactNative.useColorScheme() ?? "light";
|
|
181
176
|
const resolvedScheme = colorScheme === "system" ? systemScheme : colorScheme;
|
|
182
|
-
const colors =
|
|
177
|
+
const colors = React55.useMemo(() => {
|
|
183
178
|
const base = resolvedScheme === "dark" ? defaultDark : defaultLight;
|
|
184
179
|
const override = resolvedScheme === "dark" ? theme?.dark : theme?.light;
|
|
185
180
|
const merged = override ? { ...base, ...override } : base;
|
|
186
181
|
return deriveColors(merged, resolvedScheme);
|
|
187
182
|
}, [resolvedScheme, theme]);
|
|
188
|
-
return /* @__PURE__ */
|
|
183
|
+
return /* @__PURE__ */ React55__default.default.createElement(ThemeContext.Provider, { value: { colors, colorScheme: resolvedScheme } }, children);
|
|
189
184
|
}
|
|
190
185
|
function useTheme() {
|
|
191
|
-
const context =
|
|
186
|
+
const context = React55.useContext(ThemeContext);
|
|
192
187
|
if (!context) {
|
|
193
188
|
throw new Error("useTheme must be used within a ThemeProvider");
|
|
194
189
|
}
|
|
195
190
|
return context;
|
|
196
191
|
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
async function getHaptics() {
|
|
200
|
-
if (reactNative.Platform.OS === "web") return null;
|
|
201
|
-
if (!_loaded) {
|
|
202
|
-
_loaded = true;
|
|
203
|
-
try {
|
|
204
|
-
_haptics = await import('expo-haptics');
|
|
205
|
-
} catch {
|
|
206
|
-
_haptics = null;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
return _haptics;
|
|
192
|
+
function maybeHaptics() {
|
|
193
|
+
return reactNative.Platform.OS === "web" ? null : Haptics__namespace;
|
|
210
194
|
}
|
|
211
195
|
function selectionAsync() {
|
|
212
|
-
|
|
196
|
+
maybeHaptics()?.selectionAsync();
|
|
213
197
|
}
|
|
214
198
|
function impactLight() {
|
|
215
|
-
|
|
199
|
+
maybeHaptics()?.impactAsync(Haptics__namespace.ImpactFeedbackStyle.Light);
|
|
216
200
|
}
|
|
217
201
|
function impactMedium() {
|
|
218
|
-
|
|
202
|
+
maybeHaptics()?.impactAsync(Haptics__namespace.ImpactFeedbackStyle.Medium);
|
|
219
203
|
}
|
|
220
204
|
function impactHeavy() {
|
|
221
|
-
|
|
205
|
+
maybeHaptics()?.impactAsync(Haptics__namespace.ImpactFeedbackStyle.Heavy);
|
|
222
206
|
}
|
|
223
207
|
function notificationSuccess() {
|
|
224
|
-
|
|
208
|
+
maybeHaptics()?.notificationAsync(Haptics__namespace.NotificationFeedbackType.Success);
|
|
225
209
|
}
|
|
226
210
|
function notificationError() {
|
|
227
|
-
|
|
211
|
+
maybeHaptics()?.notificationAsync(Haptics__namespace.NotificationFeedbackType.Error);
|
|
228
212
|
}
|
|
229
213
|
function notificationWarning() {
|
|
230
|
-
|
|
214
|
+
maybeHaptics()?.notificationAsync(Haptics__namespace.NotificationFeedbackType.Warning);
|
|
231
215
|
}
|
|
232
216
|
var isWeb = reactNative.Platform.OS === "web";
|
|
233
217
|
var s = isWeb ? (n) => n : reactNativeSizeMatters.scale;
|
|
@@ -242,26 +226,20 @@ var ALL_FAMILIES = [
|
|
|
242
226
|
{ name: "MaterialIcons", component: MaterialIcons__default.default },
|
|
243
227
|
{ name: "Ionicons", component: Ionicons__default.default }
|
|
244
228
|
];
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
try {
|
|
251
|
-
entry.glyphMap = entry.component.glyphMap;
|
|
252
|
-
} catch {
|
|
253
|
-
entry.glyphMap = {};
|
|
254
|
-
}
|
|
229
|
+
function getGlyphMap(component) {
|
|
230
|
+
try {
|
|
231
|
+
return component.glyphMap ?? {};
|
|
232
|
+
} catch {
|
|
233
|
+
return {};
|
|
255
234
|
}
|
|
256
235
|
}
|
|
257
236
|
function Icon({ name, size, color, family }) {
|
|
258
|
-
ensureGlyphCache();
|
|
259
237
|
const entry = family ? ALL_FAMILIES.find((f) => f.name === family) : ALL_FAMILIES.find((f) => {
|
|
260
|
-
const glyphMap = f.
|
|
261
|
-
return
|
|
238
|
+
const glyphMap = getGlyphMap(f.component);
|
|
239
|
+
return name in glyphMap;
|
|
262
240
|
});
|
|
263
241
|
if (!entry) return null;
|
|
264
|
-
return
|
|
242
|
+
return React55__default.default.createElement(entry.component, { name, size, color });
|
|
265
243
|
}
|
|
266
244
|
|
|
267
245
|
// src/tokens.ts
|
|
@@ -309,17 +287,17 @@ var SHADOWS = {
|
|
|
309
287
|
},
|
|
310
288
|
lg: {
|
|
311
289
|
shadowColor: "#000",
|
|
312
|
-
shadowOffset: { width: 0, height:
|
|
313
|
-
shadowOpacity: 0.
|
|
314
|
-
shadowRadius:
|
|
315
|
-
elevation:
|
|
290
|
+
shadowOffset: { width: 0, height: 4 },
|
|
291
|
+
shadowOpacity: 0.12,
|
|
292
|
+
shadowRadius: 12,
|
|
293
|
+
elevation: 8
|
|
316
294
|
},
|
|
317
295
|
xl: {
|
|
318
296
|
shadowColor: "#000",
|
|
319
|
-
shadowOffset: { width: 0, height:
|
|
320
|
-
shadowOpacity: 0.
|
|
297
|
+
shadowOffset: { width: 0, height: 8 },
|
|
298
|
+
shadowOpacity: 0.18,
|
|
321
299
|
shadowRadius: 24,
|
|
322
|
-
elevation:
|
|
300
|
+
elevation: 16
|
|
323
301
|
}
|
|
324
302
|
};
|
|
325
303
|
var BREAKPOINTS = {
|
|
@@ -451,6 +429,20 @@ var TYPOGRAPHY = {
|
|
|
451
429
|
fontWeight: "500",
|
|
452
430
|
lineHeight: 18,
|
|
453
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
|
|
454
446
|
}
|
|
455
447
|
};
|
|
456
448
|
var makePressable = (scale2) => pressto.createAnimatedPressable((progress) => {
|
|
@@ -537,12 +529,12 @@ function ButtonBase({
|
|
|
537
529
|
destructive: colors.destructiveForeground
|
|
538
530
|
}[variant];
|
|
539
531
|
const textColor = iconColor ?? labelColor;
|
|
540
|
-
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;
|
|
541
533
|
const spinnerColor = isDisabled ? colors.foregroundMuted : variant === "destructive" ? colors.destructiveForeground : variant === "primary" ? colors.primaryForeground : colors.accentResolved;
|
|
542
534
|
const styleArray = Array.isArray(style) ? style : style ? [style] : [];
|
|
543
535
|
const flatStyle = reactNative.StyleSheet.flatten(styleArray);
|
|
544
536
|
const { flex, ...restStyle } = flatStyle || {};
|
|
545
|
-
return /* @__PURE__ */
|
|
537
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [fullWidth && styles.fullWidth, flex !== void 0 && { flex }] }, /* @__PURE__ */ React55__default.default.createElement(
|
|
546
538
|
PressableButton,
|
|
547
539
|
{
|
|
548
540
|
enabled: !isDisabled,
|
|
@@ -555,7 +547,7 @@ function ButtonBase({
|
|
|
555
547
|
accessibilityHint,
|
|
556
548
|
accessibilityState: { disabled: isDisabled, busy: loading }
|
|
557
549
|
},
|
|
558
|
-
/* @__PURE__ */
|
|
550
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
559
551
|
reactNativeEase.EaseView,
|
|
560
552
|
{
|
|
561
553
|
style: [
|
|
@@ -568,7 +560,7 @@ function ButtonBase({
|
|
|
568
560
|
animate: { backgroundColor: animateBgColor, borderColor: animateBorderColor },
|
|
569
561
|
transition: COLOR_TRANSITION
|
|
570
562
|
},
|
|
571
|
-
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(
|
|
572
564
|
reactNative.Text,
|
|
573
565
|
{
|
|
574
566
|
style: [styles.label, { color: labelColor }, labelSizeStyles[size], styles.labelLoading],
|
|
@@ -576,7 +568,7 @@ function ButtonBase({
|
|
|
576
568
|
numberOfLines: 1
|
|
577
569
|
},
|
|
578
570
|
label
|
|
579
|
-
)) : /* @__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(
|
|
580
572
|
reactNative.Text,
|
|
581
573
|
{
|
|
582
574
|
style: [styles.label, { color: labelColor }, labelSizeStyles[size], effectiveIcon ? styles.labelWithIcon : void 0],
|
|
@@ -584,11 +576,11 @@ function ButtonBase({
|
|
|
584
576
|
numberOfLines: 1
|
|
585
577
|
},
|
|
586
578
|
label
|
|
587
|
-
), effectiveIcon && iconPosition === "right" && /* @__PURE__ */
|
|
579
|
+
), effectiveIcon && iconPosition === "right" && /* @__PURE__ */ React55__default.default.createElement(React55__default.default.Fragment, null, effectiveIcon))
|
|
588
580
|
)
|
|
589
581
|
));
|
|
590
582
|
}
|
|
591
|
-
var Button =
|
|
583
|
+
var Button = React55__default.default.memo(ButtonBase);
|
|
592
584
|
var styles = reactNative.StyleSheet.create({
|
|
593
585
|
base: {
|
|
594
586
|
borderRadius: RADIUS.md,
|
|
@@ -611,7 +603,7 @@ var styles = reactNative.StyleSheet.create({
|
|
|
611
603
|
}
|
|
612
604
|
});
|
|
613
605
|
function ButtonGroup({ children, gap = 12, vertical = false, style }) {
|
|
614
|
-
return /* @__PURE__ */
|
|
606
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
615
607
|
reactNative.View,
|
|
616
608
|
{
|
|
617
609
|
style: [
|
|
@@ -621,8 +613,8 @@ function ButtonGroup({ children, gap = 12, vertical = false, style }) {
|
|
|
621
613
|
style
|
|
622
614
|
]
|
|
623
615
|
},
|
|
624
|
-
|
|
625
|
-
if (!
|
|
616
|
+
React55__default.default.Children.map(children, (child) => {
|
|
617
|
+
if (!React55__default.default.isValidElement(child)) return child;
|
|
626
618
|
const childProps = child.props;
|
|
627
619
|
const extraProps = {
|
|
628
620
|
style: [child.props.style, { flex: 1 }]
|
|
@@ -630,7 +622,7 @@ function ButtonGroup({ children, gap = 12, vertical = false, style }) {
|
|
|
630
622
|
if (!vertical && "label" in childProps && childProps["size"] === void 0) {
|
|
631
623
|
extraProps["size"] = "sm";
|
|
632
624
|
}
|
|
633
|
-
return
|
|
625
|
+
return React55__default.default.cloneElement(child, extraProps);
|
|
634
626
|
})
|
|
635
627
|
);
|
|
636
628
|
}
|
|
@@ -687,11 +679,11 @@ function IconButtonBase({
|
|
|
687
679
|
}[variant];
|
|
688
680
|
const spinnerColor = variant === "destructive" ? colors.destructiveForeground : variant === "primary" ? colors.primaryForeground : colors.foreground;
|
|
689
681
|
const { container: containerSize, icon: iconSize } = sizeMap[size];
|
|
690
|
-
const resolvedIcon = iconName ? /* @__PURE__ */
|
|
682
|
+
const resolvedIcon = iconName ? /* @__PURE__ */ React55__default.default.createElement(Icon, { name: iconName, size: iconSize, color: iconColor ?? defaultIconColor }) : icon;
|
|
691
683
|
const showBadge = badge !== void 0 && badge !== false && badge !== 0;
|
|
692
684
|
const badgeCount = typeof badge === "number" ? Math.min(badge, 99) : null;
|
|
693
685
|
const showCount = typeof badge === "number" && badge > 0;
|
|
694
|
-
return /* @__PURE__ */
|
|
686
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles3.wrapper }, /* @__PURE__ */ React55__default.default.createElement(
|
|
695
687
|
PressableButton,
|
|
696
688
|
{
|
|
697
689
|
style: [
|
|
@@ -711,14 +703,14 @@ function IconButtonBase({
|
|
|
711
703
|
accessibilityHint,
|
|
712
704
|
accessibilityState: { disabled: isDisabled, busy: loading }
|
|
713
705
|
},
|
|
714
|
-
loading ? /* @__PURE__ */
|
|
715
|
-
), 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: [
|
|
716
708
|
styles3.badge,
|
|
717
709
|
{ backgroundColor: colors.primary },
|
|
718
710
|
showCount ? styles3.badgeCount : styles3.badgeDot
|
|
719
|
-
] }, showCount && /* @__PURE__ */
|
|
711
|
+
] }, showCount && /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles3.badgeText, { color: colors.primaryForeground }] }, badgeCount)));
|
|
720
712
|
}
|
|
721
|
-
var IconButton =
|
|
713
|
+
var IconButton = React55__default.default.memo(IconButtonBase);
|
|
722
714
|
var styles3 = reactNative.StyleSheet.create({
|
|
723
715
|
wrapper: {
|
|
724
716
|
alignSelf: "flex-start"
|
|
@@ -771,7 +763,9 @@ var variantStyles = {
|
|
|
771
763
|
"micro-label": { ...TYPOGRAPHY["micro-label"], fontSize: ms(TYPOGRAPHY["micro-label"].fontSize), lineHeight: mvs(TYPOGRAPHY["micro-label"].lineHeight) },
|
|
772
764
|
"uppercase-tag": { ...TYPOGRAPHY["uppercase-tag"], fontSize: ms(TYPOGRAPHY["uppercase-tag"].fontSize), lineHeight: mvs(TYPOGRAPHY["uppercase-tag"].lineHeight) },
|
|
773
765
|
"button-lg": { ...TYPOGRAPHY["button-lg"], fontSize: ms(TYPOGRAPHY["button-lg"].fontSize), lineHeight: mvs(TYPOGRAPHY["button-lg"].lineHeight) },
|
|
774
|
-
"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) }
|
|
775
769
|
};
|
|
776
770
|
var defaultColorVariant = {
|
|
777
771
|
"display-hero": "foreground",
|
|
@@ -790,7 +784,9 @@ var defaultColorVariant = {
|
|
|
790
784
|
"micro-label": "foreground",
|
|
791
785
|
"uppercase-tag": "foregroundMuted",
|
|
792
786
|
"button-lg": "foreground",
|
|
793
|
-
"button-sm": "foreground"
|
|
787
|
+
"button-sm": "foreground",
|
|
788
|
+
"code-sm": "foreground",
|
|
789
|
+
"code-md": "foreground"
|
|
794
790
|
};
|
|
795
791
|
var fontWarned = false;
|
|
796
792
|
function warnIfFontsMissing() {
|
|
@@ -805,7 +801,7 @@ function TextBase({ variant = "body-md", color, style, uppercase, children, ...p
|
|
|
805
801
|
const { colors } = useTheme();
|
|
806
802
|
const colorKey = defaultColorVariant[variant] ?? "foreground";
|
|
807
803
|
const resolvedColor = color ?? colors[colorKey];
|
|
808
|
-
return /* @__PURE__ */
|
|
804
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
809
805
|
reactNative.Text,
|
|
810
806
|
{
|
|
811
807
|
style: [variantStyles[variant], { color: resolvedColor }, uppercase && { textTransform: "uppercase" }, style],
|
|
@@ -815,19 +811,19 @@ function TextBase({ variant = "body-md", color, style, uppercase, children, ...p
|
|
|
815
811
|
children
|
|
816
812
|
);
|
|
817
813
|
}
|
|
818
|
-
var Text3 =
|
|
814
|
+
var Text3 = React55__default.default.memo(TextBase);
|
|
819
815
|
var webInputResetStyle = reactNative.Platform.OS === "web" ? { outlineStyle: "none", outlineWidth: 0, outlineColor: "transparent", boxShadow: "none" } : {};
|
|
820
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 }) {
|
|
821
817
|
const { colors } = useTheme();
|
|
822
|
-
const [focused, setFocused] =
|
|
823
|
-
const [showPassword, setShowPassword] =
|
|
818
|
+
const [focused, setFocused] = React55.useState(false);
|
|
819
|
+
const [showPassword, setShowPassword] = React55.useState(false);
|
|
824
820
|
const isDisabled = disabled || editable === false;
|
|
825
821
|
const isPassword = type === "password";
|
|
826
822
|
const effectiveSecure = isPassword ? !showPassword : secureTextEntry;
|
|
827
823
|
const effectiveAutoCapitalize = isPassword ? "none" : autoCapitalize;
|
|
828
824
|
const effectiveAutoCorrect = isPassword ? false : autoCorrect;
|
|
829
|
-
const effectivePrefix = prefixIcon ? /* @__PURE__ */
|
|
830
|
-
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(
|
|
831
827
|
reactNative.TouchableOpacity,
|
|
832
828
|
{
|
|
833
829
|
onPress: () => setShowPassword(!showPassword),
|
|
@@ -836,10 +832,10 @@ function Input({ label, error, hint, disabled, prefix, suffix, prefixStyle, suff
|
|
|
836
832
|
accessibilityRole: "button",
|
|
837
833
|
accessibilityLabel: showPassword ? "Ocultar contrase\xF1a" : "Mostrar contrase\xF1a"
|
|
838
834
|
},
|
|
839
|
-
/* @__PURE__ */
|
|
840
|
-
) : 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;
|
|
841
837
|
const borderColor = error ? colors.destructive : focused ? colors.primary : colors.border;
|
|
842
|
-
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(
|
|
843
839
|
reactNativeEase.EaseView,
|
|
844
840
|
{
|
|
845
841
|
style: [
|
|
@@ -851,8 +847,8 @@ function Input({ label, error, hint, disabled, prefix, suffix, prefixStyle, suff
|
|
|
851
847
|
animate: { borderColor },
|
|
852
848
|
transition: COLOR_TRANSITION
|
|
853
849
|
},
|
|
854
|
-
effectivePrefix ? typeof effectivePrefix === "string" ? /* @__PURE__ */
|
|
855
|
-
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(
|
|
856
852
|
bottomSheet.BottomSheetTextInput,
|
|
857
853
|
{
|
|
858
854
|
style: [
|
|
@@ -878,7 +874,7 @@ function Input({ label, error, hint, disabled, prefix, suffix, prefixStyle, suff
|
|
|
878
874
|
autoCorrect: effectiveAutoCorrect,
|
|
879
875
|
...props
|
|
880
876
|
}
|
|
881
|
-
) : /* @__PURE__ */
|
|
877
|
+
) : /* @__PURE__ */ React55__default.default.createElement(
|
|
882
878
|
reactNative.TextInput,
|
|
883
879
|
{
|
|
884
880
|
style: [
|
|
@@ -905,8 +901,8 @@ function Input({ label, error, hint, disabled, prefix, suffix, prefixStyle, suff
|
|
|
905
901
|
...props
|
|
906
902
|
}
|
|
907
903
|
),
|
|
908
|
-
effectiveSuffix ? typeof effectiveSuffix === "string" ? /* @__PURE__ */
|
|
909
|
-
), 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(
|
|
910
906
|
reactNative.Text,
|
|
911
907
|
{
|
|
912
908
|
style: [styles4.helperText, { color: colors.destructive }],
|
|
@@ -914,7 +910,7 @@ function Input({ label, error, hint, disabled, prefix, suffix, prefixStyle, suff
|
|
|
914
910
|
accessibilityLiveRegion: "polite"
|
|
915
911
|
},
|
|
916
912
|
error
|
|
917
|
-
) : 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);
|
|
918
914
|
}
|
|
919
915
|
var styles4 = reactNative.StyleSheet.create({
|
|
920
916
|
container: {
|
|
@@ -1013,10 +1009,10 @@ function BadgeBase({ label, children, variant = "default", size = "md", icon, ic
|
|
|
1013
1009
|
destructiveOutline: colors.destructive,
|
|
1014
1010
|
warningOutline: colors.warning
|
|
1015
1011
|
}[variant];
|
|
1016
|
-
const effectiveIcon = iconName ? /* @__PURE__ */
|
|
1012
|
+
const effectiveIcon = iconName ? /* @__PURE__ */ React55__default.default.createElement(Icon, { name: iconName, size: sizeIconSize[size], color: iconColor ?? textColor }) : icon;
|
|
1017
1013
|
const content = children ?? label;
|
|
1018
1014
|
const a11yLabel = typeof content === "string" ? content : label;
|
|
1019
|
-
return /* @__PURE__ */
|
|
1015
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
1020
1016
|
reactNative.View,
|
|
1021
1017
|
{
|
|
1022
1018
|
style: [styles5.container, containerStyle, sizePadding[size], { gap: sizeIconGap[size] }, style],
|
|
@@ -1024,10 +1020,10 @@ function BadgeBase({ label, children, variant = "default", size = "md", icon, ic
|
|
|
1024
1020
|
accessibilityLabel: a11yLabel
|
|
1025
1021
|
},
|
|
1026
1022
|
effectiveIcon,
|
|
1027
|
-
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
|
|
1028
1024
|
);
|
|
1029
1025
|
}
|
|
1030
|
-
var Badge =
|
|
1026
|
+
var Badge = React55__default.default.memo(BadgeBase);
|
|
1031
1027
|
var styles5 = reactNative.StyleSheet.create({
|
|
1032
1028
|
container: {
|
|
1033
1029
|
borderRadius: 9999,
|
|
@@ -1072,9 +1068,9 @@ function Card({ children, variant = "elevated", onPress, style, accessibilityLab
|
|
|
1072
1068
|
elevation: 0
|
|
1073
1069
|
}
|
|
1074
1070
|
}[variant];
|
|
1075
|
-
const cardContent = /* @__PURE__ */
|
|
1071
|
+
const cardContent = /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles6.card, variantStyle, style] }, children);
|
|
1076
1072
|
if (onPress) {
|
|
1077
|
-
return /* @__PURE__ */
|
|
1073
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
1078
1074
|
PressableCard,
|
|
1079
1075
|
{
|
|
1080
1076
|
onPress: handlePress,
|
|
@@ -1091,21 +1087,21 @@ function Card({ children, variant = "elevated", onPress, style, accessibilityLab
|
|
|
1091
1087
|
return cardContent;
|
|
1092
1088
|
}
|
|
1093
1089
|
function CardHeader({ children, style }) {
|
|
1094
|
-
return /* @__PURE__ */
|
|
1090
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles6.header, style] }, children);
|
|
1095
1091
|
}
|
|
1096
1092
|
function CardTitle({ children, style }) {
|
|
1097
1093
|
const { colors } = useTheme();
|
|
1098
|
-
return /* @__PURE__ */
|
|
1094
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles6.title, { color: colors.foreground }, style], allowFontScaling: true }, children);
|
|
1099
1095
|
}
|
|
1100
1096
|
function CardDescription({ children, style }) {
|
|
1101
1097
|
const { colors } = useTheme();
|
|
1102
|
-
return /* @__PURE__ */
|
|
1098
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles6.description, { color: colors.foregroundSubtle }, style], allowFontScaling: true }, children);
|
|
1103
1099
|
}
|
|
1104
1100
|
function CardContent({ children, style }) {
|
|
1105
|
-
return /* @__PURE__ */
|
|
1101
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles6.content, style] }, children);
|
|
1106
1102
|
}
|
|
1107
1103
|
function CardFooter({ children, style }) {
|
|
1108
|
-
return /* @__PURE__ */
|
|
1104
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles6.footer, style] }, children);
|
|
1109
1105
|
}
|
|
1110
1106
|
var styles6 = reactNative.StyleSheet.create({
|
|
1111
1107
|
card: {
|
|
@@ -1141,9 +1137,19 @@ var styles6 = reactNative.StyleSheet.create({
|
|
|
1141
1137
|
alignItems: "center"
|
|
1142
1138
|
}
|
|
1143
1139
|
});
|
|
1144
|
-
function Separator({ orientation = "horizontal", style }) {
|
|
1140
|
+
function Separator({ orientation = "horizontal", label, style }) {
|
|
1145
1141
|
const { colors } = useTheme();
|
|
1146
|
-
|
|
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(
|
|
1147
1153
|
reactNative.View,
|
|
1148
1154
|
{
|
|
1149
1155
|
style: [
|
|
@@ -1162,6 +1168,21 @@ var styles7 = reactNative.StyleSheet.create({
|
|
|
1162
1168
|
vertical: {
|
|
1163
1169
|
width: 1,
|
|
1164
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"
|
|
1165
1186
|
}
|
|
1166
1187
|
});
|
|
1167
1188
|
var sizeMap2 = {
|
|
@@ -1178,7 +1199,7 @@ function Spinner({ size = "md", color, label, ...props }) {
|
|
|
1178
1199
|
const { colors } = useTheme();
|
|
1179
1200
|
const a11yLabel = label || "Cargando";
|
|
1180
1201
|
if (label) {
|
|
1181
|
-
return /* @__PURE__ */
|
|
1202
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
1182
1203
|
reactNative.View,
|
|
1183
1204
|
{
|
|
1184
1205
|
style: styles8.wrapper,
|
|
@@ -1186,8 +1207,8 @@ function Spinner({ size = "md", color, label, ...props }) {
|
|
|
1186
1207
|
accessibilityLabel: a11yLabel,
|
|
1187
1208
|
accessibilityState: { busy: true }
|
|
1188
1209
|
},
|
|
1189
|
-
/* @__PURE__ */
|
|
1190
|
-
/* @__PURE__ */
|
|
1210
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.ActivityIndicator, { size: sizeMap2[size], color: color ?? colors.primary, ...props }),
|
|
1211
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
1191
1212
|
reactNative.Text,
|
|
1192
1213
|
{
|
|
1193
1214
|
style: [styles8.label, { color: colors.foregroundMuted, fontSize: labelFontSize[size] }],
|
|
@@ -1197,7 +1218,7 @@ function Spinner({ size = "md", color, label, ...props }) {
|
|
|
1197
1218
|
)
|
|
1198
1219
|
);
|
|
1199
1220
|
}
|
|
1200
|
-
return /* @__PURE__ */
|
|
1221
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
1201
1222
|
reactNative.ActivityIndicator,
|
|
1202
1223
|
{
|
|
1203
1224
|
size: sizeMap2[size],
|
|
@@ -1230,9 +1251,9 @@ function Skeleton({
|
|
|
1230
1251
|
}) {
|
|
1231
1252
|
const { colors, colorScheme } = useTheme();
|
|
1232
1253
|
const shimmer = Animated6.useSharedValue(0);
|
|
1233
|
-
const [containerWidth, setContainerWidth] =
|
|
1254
|
+
const [containerWidth, setContainerWidth] = React55.useState(300);
|
|
1234
1255
|
const shimmerHighlight = colorScheme === "dark" ? "rgba(255,255,255,0.08)" : "rgba(0,0,0,0.07)";
|
|
1235
|
-
|
|
1256
|
+
React55.useEffect(() => {
|
|
1236
1257
|
shimmer.value = Animated6.withRepeat(
|
|
1237
1258
|
Animated6.withTiming(1, { duration: TIMINGS.shimmer.duration, easing: Animated6.Easing.linear }),
|
|
1238
1259
|
-1,
|
|
@@ -1245,7 +1266,7 @@ function Skeleton({
|
|
|
1245
1266
|
const resolvedWidth = preset === "circle" ? s(diameter) : preset === "text" ? "60%" : width;
|
|
1246
1267
|
const resolvedHeight = preset === "circle" ? s(diameter) : preset === "text" ? 14 : height;
|
|
1247
1268
|
const resolvedRadius = preset === "circle" ? 9999 : preset === "text" ? 4 : borderRadius;
|
|
1248
|
-
return /* @__PURE__ */
|
|
1269
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
1249
1270
|
reactNative.View,
|
|
1250
1271
|
{
|
|
1251
1272
|
style: [
|
|
@@ -1258,7 +1279,7 @@ function Skeleton({
|
|
|
1258
1279
|
accessibilityLabel: "Cargando",
|
|
1259
1280
|
accessibilityState: { busy: true }
|
|
1260
1281
|
},
|
|
1261
|
-
/* @__PURE__ */
|
|
1282
|
+
/* @__PURE__ */ React55__default.default.createElement(Animated6__default.default.View, { style: [reactNative.StyleSheet.absoluteFill, shimmerStyle] }, /* @__PURE__ */ React55__default.default.createElement(
|
|
1262
1283
|
expoLinearGradient.LinearGradient,
|
|
1263
1284
|
{
|
|
1264
1285
|
colors: ["transparent", shimmerHighlight, "transparent"],
|
|
@@ -1278,10 +1299,10 @@ var aspectRatioMap = {
|
|
|
1278
1299
|
};
|
|
1279
1300
|
function MediaCardSkeleton({ aspectRatio = "4:3", showSubtitle = true, style }) {
|
|
1280
1301
|
const ratio = aspectRatioMap[aspectRatio];
|
|
1281
|
-
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));
|
|
1282
1303
|
}
|
|
1283
1304
|
function ListItemSkeleton({ showAvatar = true, showSubtitle = true, style }) {
|
|
1284
|
-
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));
|
|
1285
1306
|
}
|
|
1286
1307
|
function ListSkeleton({
|
|
1287
1308
|
count = 6,
|
|
@@ -1292,10 +1313,10 @@ function ListSkeleton({
|
|
|
1292
1313
|
style
|
|
1293
1314
|
}) {
|
|
1294
1315
|
if (columns <= 1) {
|
|
1295
|
-
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 })));
|
|
1296
1317
|
}
|
|
1297
1318
|
const widthPct = `${100 / columns}%`;
|
|
1298
|
-
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 }))));
|
|
1299
1320
|
}
|
|
1300
1321
|
Skeleton.MediaCard = MediaCardSkeleton;
|
|
1301
1322
|
Skeleton.ListItem = ListItemSkeleton;
|
|
@@ -1358,7 +1379,7 @@ function getInitials(fallback, fallbackText) {
|
|
|
1358
1379
|
}
|
|
1359
1380
|
function AvatarBase({ src, fallback, fallbackText, size = "md", status, style }) {
|
|
1360
1381
|
const { colors } = useTheme();
|
|
1361
|
-
const [imageError, setImageError] =
|
|
1382
|
+
const [imageError, setImageError] = React55.useState(false);
|
|
1362
1383
|
const dimension = typeof size === "number" ? size : sizeMap3[size];
|
|
1363
1384
|
const fontSize = typeof size === "number" ? size * 0.38 : fontSizeMap[size];
|
|
1364
1385
|
const showFallback = !src || imageError;
|
|
@@ -1377,21 +1398,21 @@ function AvatarBase({ src, fallback, fallbackText, size = "md", status, style })
|
|
|
1377
1398
|
overflow: "hidden"
|
|
1378
1399
|
};
|
|
1379
1400
|
const a11yLabel = fallbackText || fallback || "Avatar";
|
|
1380
|
-
return /* @__PURE__ */
|
|
1401
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
1381
1402
|
reactNative.View,
|
|
1382
1403
|
{
|
|
1383
1404
|
style: [styles10.wrapper, style],
|
|
1384
1405
|
accessibilityRole: "image",
|
|
1385
1406
|
accessibilityLabel: a11yLabel
|
|
1386
1407
|
},
|
|
1387
|
-
/* @__PURE__ */
|
|
1408
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles10.base, containerStyle] }, !showFallback ? /* @__PURE__ */ React55__default.default.createElement(
|
|
1388
1409
|
expoImage.Image,
|
|
1389
1410
|
{
|
|
1390
1411
|
source: { uri: src },
|
|
1391
1412
|
style: { width: dimension, height: dimension },
|
|
1392
1413
|
onError: () => setImageError(true)
|
|
1393
1414
|
}
|
|
1394
|
-
) : /* @__PURE__ */
|
|
1415
|
+
) : /* @__PURE__ */ React55__default.default.createElement(
|
|
1395
1416
|
reactNative.Text,
|
|
1396
1417
|
{
|
|
1397
1418
|
style: [styles10.fallback, { color: colors.foregroundMuted, fontSize }],
|
|
@@ -1399,7 +1420,7 @@ function AvatarBase({ src, fallback, fallbackText, size = "md", status, style })
|
|
|
1399
1420
|
},
|
|
1400
1421
|
getInitials(fallback, fallbackText)
|
|
1401
1422
|
)),
|
|
1402
|
-
status && /* @__PURE__ */
|
|
1423
|
+
status && /* @__PURE__ */ React55__default.default.createElement(
|
|
1403
1424
|
reactNative.View,
|
|
1404
1425
|
{
|
|
1405
1426
|
style: [
|
|
@@ -1417,7 +1438,7 @@ function AvatarBase({ src, fallback, fallbackText, size = "md", status, style })
|
|
|
1417
1438
|
)
|
|
1418
1439
|
);
|
|
1419
1440
|
}
|
|
1420
|
-
var Avatar =
|
|
1441
|
+
var Avatar = React55__default.default.memo(AvatarBase);
|
|
1421
1442
|
function AvatarGroup({
|
|
1422
1443
|
users,
|
|
1423
1444
|
max = 3,
|
|
@@ -1430,7 +1451,7 @@ function AvatarGroup({
|
|
|
1430
1451
|
const visible = users.slice(0, max);
|
|
1431
1452
|
const overflowCount = users.length - max;
|
|
1432
1453
|
const dimension = sizeMap3[size];
|
|
1433
|
-
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(
|
|
1434
1455
|
reactNative.View,
|
|
1435
1456
|
{
|
|
1436
1457
|
key: `${user.name}-${i}`,
|
|
@@ -1440,7 +1461,7 @@ function AvatarGroup({
|
|
|
1440
1461
|
{ zIndex: visible.length - i }
|
|
1441
1462
|
]
|
|
1442
1463
|
},
|
|
1443
|
-
/* @__PURE__ */
|
|
1464
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
1444
1465
|
Avatar,
|
|
1445
1466
|
{
|
|
1446
1467
|
src: user.src,
|
|
@@ -1448,7 +1469,7 @@ function AvatarGroup({
|
|
|
1448
1469
|
size
|
|
1449
1470
|
}
|
|
1450
1471
|
)
|
|
1451
|
-
)), overflowCount > 0 ? /* @__PURE__ */
|
|
1472
|
+
)), overflowCount > 0 ? /* @__PURE__ */ React55__default.default.createElement(
|
|
1452
1473
|
reactNative.TouchableOpacity,
|
|
1453
1474
|
{
|
|
1454
1475
|
style: [
|
|
@@ -1467,7 +1488,7 @@ function AvatarGroup({
|
|
|
1467
1488
|
accessibilityRole: "button",
|
|
1468
1489
|
accessibilityLabel: `${overflowCount} avatares m\xE1s`
|
|
1469
1490
|
},
|
|
1470
|
-
/* @__PURE__ */
|
|
1491
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
1471
1492
|
reactNative.Text,
|
|
1472
1493
|
{
|
|
1473
1494
|
style: [styles10.overflowText, { color: colors.foregroundMuted }],
|
|
@@ -1517,15 +1538,15 @@ function AlertBanner({ title, description, variant = "default", icon, iconName,
|
|
|
1517
1538
|
const accentColor = variant === "destructive" ? colors.destructive : variant === "success" ? colors.success : variant === "warning" ? colors.warning : colors.foreground;
|
|
1518
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;
|
|
1519
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;
|
|
1520
|
-
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 }) : (
|
|
1521
1542
|
// AUDIT FIX: default variant previously used colors.primary (near-black)
|
|
1522
1543
|
// as the info icon tint — ambiguous and heavy. accentResolved gives it
|
|
1523
1544
|
// a meaningful chromatic signal when an accent is defined.
|
|
1524
|
-
/* @__PURE__ */
|
|
1545
|
+
/* @__PURE__ */ React55__default.default.createElement(vectorIcons.Entypo, { name: "info-with-circle", size: ms(16), color: accentColor })
|
|
1525
1546
|
);
|
|
1526
|
-
const effectiveIcon = iconName ? /* @__PURE__ */
|
|
1547
|
+
const effectiveIcon = iconName ? /* @__PURE__ */ React55__default.default.createElement(Icon, { name: iconName, size: ms(16), color: iconColor ?? accentColor }) : icon ?? defaultIcon;
|
|
1527
1548
|
const a11yLabel = description ? `${title}. ${description}` : title;
|
|
1528
|
-
return /* @__PURE__ */
|
|
1549
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
1529
1550
|
reactNative.View,
|
|
1530
1551
|
{
|
|
1531
1552
|
style: [
|
|
@@ -1536,9 +1557,9 @@ function AlertBanner({ title, description, variant = "default", icon, iconName,
|
|
|
1536
1557
|
accessibilityRole: "alert",
|
|
1537
1558
|
accessibilityLabel: a11yLabel
|
|
1538
1559
|
},
|
|
1539
|
-
/* @__PURE__ */
|
|
1540
|
-
/* @__PURE__ */
|
|
1541
|
-
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(
|
|
1542
1563
|
reactNative.TouchableOpacity,
|
|
1543
1564
|
{
|
|
1544
1565
|
onPress: onDismiss,
|
|
@@ -1548,7 +1569,7 @@ function AlertBanner({ title, description, variant = "default", icon, iconName,
|
|
|
1548
1569
|
accessibilityRole: "button",
|
|
1549
1570
|
accessibilityLabel: "Descartar"
|
|
1550
1571
|
},
|
|
1551
|
-
/* @__PURE__ */
|
|
1572
|
+
/* @__PURE__ */ React55__default.default.createElement(vectorIcons.Feather, { name: "x", size: ms(16), color: colors.foregroundMuted })
|
|
1552
1573
|
) : null
|
|
1553
1574
|
);
|
|
1554
1575
|
}
|
|
@@ -1585,9 +1606,9 @@ var styles11 = reactNative.StyleSheet.create({
|
|
|
1585
1606
|
function Progress({ value = 0, max = 100, variant = "default", style, accessibilityLabel }) {
|
|
1586
1607
|
const { colors } = useTheme();
|
|
1587
1608
|
const percent = Math.min(Math.max(value / max * 100, 0), 100);
|
|
1588
|
-
const [trackWidth, setTrackWidth] =
|
|
1609
|
+
const [trackWidth, setTrackWidth] = React55.useState(0);
|
|
1589
1610
|
const animatedWidth = Animated6.useSharedValue(0);
|
|
1590
|
-
|
|
1611
|
+
React55.useEffect(() => {
|
|
1591
1612
|
if (trackWidth === 0) return;
|
|
1592
1613
|
animatedWidth.value = Animated6.withSpring(percent / 100 * trackWidth, SPRINGS.glide);
|
|
1593
1614
|
}, [percent, trackWidth, animatedWidth]);
|
|
@@ -1595,7 +1616,7 @@ function Progress({ value = 0, max = 100, variant = "default", style, accessibil
|
|
|
1595
1616
|
width: animatedWidth.value
|
|
1596
1617
|
}));
|
|
1597
1618
|
const indicatorColor = variant === "success" ? colors.success : variant === "warning" ? colors.warning : variant === "destructive" ? colors.destructive : colors.primary;
|
|
1598
|
-
return /* @__PURE__ */
|
|
1619
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
1599
1620
|
reactNative.View,
|
|
1600
1621
|
{
|
|
1601
1622
|
style: [styles12.track, { backgroundColor: colors.surface }, style],
|
|
@@ -1604,7 +1625,7 @@ function Progress({ value = 0, max = 100, variant = "default", style, accessibil
|
|
|
1604
1625
|
accessibilityLabel,
|
|
1605
1626
|
accessibilityValue: { min: 0, max: 100, now: Math.round(percent) }
|
|
1606
1627
|
},
|
|
1607
|
-
/* @__PURE__ */
|
|
1628
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
1608
1629
|
Animated6__default.default.View,
|
|
1609
1630
|
{
|
|
1610
1631
|
style: [styles12.indicator, { backgroundColor: indicatorColor }, indicatorAnimatedStyle]
|
|
@@ -1627,8 +1648,8 @@ var styles12 = reactNative.StyleSheet.create({
|
|
|
1627
1648
|
function EmptyState({ icon, iconName, iconColor, title, description, action, actionLabel, onAction, size = "default", style }) {
|
|
1628
1649
|
const { colors } = useTheme();
|
|
1629
1650
|
const isCompact = size === "compact";
|
|
1630
|
-
const effectiveIcon = iconName ? /* @__PURE__ */
|
|
1631
|
-
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(
|
|
1632
1653
|
reactNative.View,
|
|
1633
1654
|
{
|
|
1634
1655
|
style: [
|
|
@@ -1638,7 +1659,7 @@ function EmptyState({ icon, iconName, iconColor, title, description, action, act
|
|
|
1638
1659
|
style
|
|
1639
1660
|
]
|
|
1640
1661
|
},
|
|
1641
|
-
effectiveIcon ? /* @__PURE__ */
|
|
1662
|
+
effectiveIcon ? /* @__PURE__ */ React55__default.default.createElement(
|
|
1642
1663
|
reactNative.View,
|
|
1643
1664
|
{
|
|
1644
1665
|
style: [
|
|
@@ -1649,15 +1670,15 @@ function EmptyState({ icon, iconName, iconColor, title, description, action, act
|
|
|
1649
1670
|
},
|
|
1650
1671
|
effectiveIcon
|
|
1651
1672
|
) : null,
|
|
1652
|
-
/* @__PURE__ */
|
|
1673
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles13.textWrapper }, /* @__PURE__ */ React55__default.default.createElement(
|
|
1653
1674
|
reactNative.Text,
|
|
1654
1675
|
{
|
|
1655
1676
|
style: [styles13.title, isCompact && styles13.titleCompact, { color: colors.foreground }],
|
|
1656
1677
|
allowFontScaling: true
|
|
1657
1678
|
},
|
|
1658
1679
|
title
|
|
1659
|
-
), description && !isCompact ? /* @__PURE__ */
|
|
1660
|
-
!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)
|
|
1661
1682
|
);
|
|
1662
1683
|
}
|
|
1663
1684
|
var styles13 = reactNative.StyleSheet.create({
|
|
@@ -1731,10 +1752,10 @@ function Textarea({
|
|
|
1731
1752
|
...props
|
|
1732
1753
|
}) {
|
|
1733
1754
|
const { colors } = useTheme();
|
|
1734
|
-
const [focused, setFocused] =
|
|
1735
|
-
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;
|
|
1736
1757
|
const borderColor = error ? colors.destructive : focused ? colors.primary : colors.border;
|
|
1737
|
-
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(
|
|
1738
1759
|
reactNativeEase.EaseView,
|
|
1739
1760
|
{
|
|
1740
1761
|
style: [styles14.borderOverlay, { borderWidth: error ? 2 : 1 }],
|
|
@@ -1742,7 +1763,7 @@ function Textarea({
|
|
|
1742
1763
|
transition: COLOR_TRANSITION,
|
|
1743
1764
|
pointerEvents: "none"
|
|
1744
1765
|
}
|
|
1745
|
-
), resolvedPrefixIcon ? /* @__PURE__ */
|
|
1766
|
+
), resolvedPrefixIcon ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles14.prefixIcon }, resolvedPrefixIcon) : null, /* @__PURE__ */ React55__default.default.createElement(
|
|
1746
1767
|
reactNative.TextInput,
|
|
1747
1768
|
{
|
|
1748
1769
|
multiline: true,
|
|
@@ -1773,7 +1794,7 @@ function Textarea({
|
|
|
1773
1794
|
accessibilityState: { disabled: !!disabled },
|
|
1774
1795
|
...props
|
|
1775
1796
|
}
|
|
1776
|
-
)), error ? /* @__PURE__ */
|
|
1797
|
+
)), error ? /* @__PURE__ */ React55__default.default.createElement(
|
|
1777
1798
|
reactNative.Text,
|
|
1778
1799
|
{
|
|
1779
1800
|
style: [styles14.helperText, { color: colors.destructive }],
|
|
@@ -1781,7 +1802,7 @@ function Textarea({
|
|
|
1781
1802
|
accessibilityLiveRegion: "polite"
|
|
1782
1803
|
},
|
|
1783
1804
|
error
|
|
1784
|
-
) : 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);
|
|
1785
1806
|
}
|
|
1786
1807
|
var styles14 = reactNative.StyleSheet.create({
|
|
1787
1808
|
container: {
|
|
@@ -1828,7 +1849,8 @@ function Checkbox({
|
|
|
1828
1849
|
label,
|
|
1829
1850
|
disabled,
|
|
1830
1851
|
style,
|
|
1831
|
-
accessibilityLabel
|
|
1852
|
+
accessibilityLabel,
|
|
1853
|
+
accessibilityHint
|
|
1832
1854
|
}) {
|
|
1833
1855
|
const { colors } = useTheme();
|
|
1834
1856
|
const handlePress = () => {
|
|
@@ -1839,7 +1861,7 @@ function Checkbox({
|
|
|
1839
1861
|
// AUDIT FIX: opacity was applied only to the box, leaving the label at full
|
|
1840
1862
|
// opacity when disabled — a contradictory visual signal. Now the entire row
|
|
1841
1863
|
// dims uniformly so label and control communicate the same disabled state.
|
|
1842
|
-
/* @__PURE__ */
|
|
1864
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
1843
1865
|
PressableButton,
|
|
1844
1866
|
{
|
|
1845
1867
|
style: [styles15.row, disabled && styles15.rowDisabled, style],
|
|
@@ -1849,9 +1871,10 @@ function Checkbox({
|
|
|
1849
1871
|
touchSoundDisabled: true,
|
|
1850
1872
|
accessibilityRole: "checkbox",
|
|
1851
1873
|
accessibilityLabel: accessibilityLabel ?? label,
|
|
1874
|
+
accessibilityHint,
|
|
1852
1875
|
accessibilityState: { checked, disabled: !!disabled }
|
|
1853
1876
|
},
|
|
1854
|
-
/* @__PURE__ */
|
|
1877
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
1855
1878
|
reactNativeEase.EaseView,
|
|
1856
1879
|
{
|
|
1857
1880
|
style: styles15.box,
|
|
@@ -1861,9 +1884,9 @@ function Checkbox({
|
|
|
1861
1884
|
},
|
|
1862
1885
|
transition: COLOR_TRANSITION
|
|
1863
1886
|
},
|
|
1864
|
-
/* @__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 }] }))
|
|
1865
1888
|
),
|
|
1866
|
-
label ? /* @__PURE__ */
|
|
1889
|
+
label ? /* @__PURE__ */ React55__default.default.createElement(
|
|
1867
1890
|
reactNative.Text,
|
|
1868
1891
|
{
|
|
1869
1892
|
style: [styles15.label, { color: colors.foreground }],
|
|
@@ -1912,10 +1935,10 @@ var THUMB_OFFSET = s(3);
|
|
|
1912
1935
|
var THUMB_TRAVEL = TRACK_WIDTH - THUMB_SIZE - THUMB_OFFSET * 2;
|
|
1913
1936
|
var ICON_SIZE = s(13);
|
|
1914
1937
|
var DISABLED_OPACITY = 0.45;
|
|
1915
|
-
function Switch({ checked = false, onCheckedChange, disabled, style, accessibilityLabel }) {
|
|
1938
|
+
function Switch({ checked = false, onCheckedChange, disabled, style, accessibilityLabel, accessibilityHint }) {
|
|
1916
1939
|
const { colors } = useTheme();
|
|
1917
1940
|
const isDisabled = !!disabled;
|
|
1918
|
-
return /* @__PURE__ */
|
|
1941
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [{ alignSelf: "flex-start" }, style] }, /* @__PURE__ */ React55__default.default.createElement(
|
|
1919
1942
|
PressableButton,
|
|
1920
1943
|
{
|
|
1921
1944
|
onPress: () => {
|
|
@@ -1927,17 +1950,18 @@ function Switch({ checked = false, onCheckedChange, disabled, style, accessibili
|
|
|
1927
1950
|
touchSoundDisabled: true,
|
|
1928
1951
|
accessibilityRole: "switch",
|
|
1929
1952
|
accessibilityLabel,
|
|
1953
|
+
accessibilityHint,
|
|
1930
1954
|
accessibilityState: { checked, disabled: isDisabled },
|
|
1931
1955
|
style: styles16.touchable
|
|
1932
1956
|
},
|
|
1933
|
-
/* @__PURE__ */
|
|
1957
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles16.trackContainer }, /* @__PURE__ */ React55__default.default.createElement(
|
|
1934
1958
|
reactNativeEase.EaseView,
|
|
1935
1959
|
{
|
|
1936
1960
|
style: [styles16.track, isDisabled && styles16.disabledTrack],
|
|
1937
1961
|
animate: { backgroundColor: checked ? colors.primary : colors.surfaceStrong },
|
|
1938
1962
|
transition: COLOR_TRANSITION
|
|
1939
1963
|
}
|
|
1940
|
-
), /* @__PURE__ */
|
|
1964
|
+
), /* @__PURE__ */ React55__default.default.createElement(
|
|
1941
1965
|
reactNativeEase.EaseView,
|
|
1942
1966
|
{
|
|
1943
1967
|
style: [styles16.trackBorder, { borderWidth: 1.5 }],
|
|
@@ -1945,30 +1969,30 @@ function Switch({ checked = false, onCheckedChange, disabled, style, accessibili
|
|
|
1945
1969
|
animate: { borderColor: checked ? "transparent" : colors.border },
|
|
1946
1970
|
transition: COLOR_TRANSITION
|
|
1947
1971
|
}
|
|
1948
|
-
), /* @__PURE__ */
|
|
1972
|
+
), /* @__PURE__ */ React55__default.default.createElement(
|
|
1949
1973
|
reactNativeEase.EaseView,
|
|
1950
1974
|
{
|
|
1951
1975
|
style: [styles16.thumb, { backgroundColor: colors.primaryForeground }],
|
|
1952
1976
|
animate: { translateX: checked ? THUMB_TRAVEL : 0 },
|
|
1953
1977
|
transition: SPRING_ELASTIC
|
|
1954
1978
|
},
|
|
1955
|
-
/* @__PURE__ */
|
|
1979
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
1956
1980
|
reactNativeEase.EaseView,
|
|
1957
1981
|
{
|
|
1958
1982
|
style: styles16.iconWrapper,
|
|
1959
1983
|
animate: { opacity: checked ? isDisabled ? DISABLED_OPACITY : 1 : 0 },
|
|
1960
1984
|
transition: OPACITY_TRANSITION
|
|
1961
1985
|
},
|
|
1962
|
-
/* @__PURE__ */
|
|
1986
|
+
/* @__PURE__ */ React55__default.default.createElement(vectorIcons.Feather, { name: "check", size: ICON_SIZE, color: colors.primary })
|
|
1963
1987
|
),
|
|
1964
|
-
/* @__PURE__ */
|
|
1988
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
1965
1989
|
reactNativeEase.EaseView,
|
|
1966
1990
|
{
|
|
1967
1991
|
style: styles16.iconWrapper,
|
|
1968
1992
|
animate: { opacity: checked ? 0 : isDisabled ? DISABLED_OPACITY : 1 },
|
|
1969
1993
|
transition: OPACITY_TRANSITION
|
|
1970
1994
|
},
|
|
1971
|
-
/* @__PURE__ */
|
|
1995
|
+
/* @__PURE__ */ React55__default.default.createElement(vectorIcons.Feather, { name: "x", size: ICON_SIZE, color: colors.foregroundMuted })
|
|
1972
1996
|
)
|
|
1973
1997
|
))
|
|
1974
1998
|
));
|
|
@@ -2023,15 +2047,15 @@ function ToggleIcon({ pressed, iconName, activeIconName, icon, activeIcon, iconC
|
|
|
2023
2047
|
return prop;
|
|
2024
2048
|
};
|
|
2025
2049
|
if (pressed) {
|
|
2026
|
-
if (activeIconName) return /* @__PURE__ */
|
|
2050
|
+
if (activeIconName) return /* @__PURE__ */ React55__default.default.createElement(Icon, { name: activeIconName, size: iconSize, color: activeIconColor ?? primaryColor });
|
|
2027
2051
|
const active = renderProp(activeIcon);
|
|
2028
|
-
if (active) return /* @__PURE__ */
|
|
2029
|
-
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 });
|
|
2030
2054
|
}
|
|
2031
|
-
if (iconName) return /* @__PURE__ */
|
|
2055
|
+
if (iconName) return /* @__PURE__ */ React55__default.default.createElement(Icon, { name: iconName, size: iconSize, color: iconColor ?? mutedColor });
|
|
2032
2056
|
const custom = renderProp(icon);
|
|
2033
|
-
if (custom) return /* @__PURE__ */
|
|
2034
|
-
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 });
|
|
2035
2059
|
}
|
|
2036
2060
|
var sizeStyles = {
|
|
2037
2061
|
sm: { paddingHorizontal: s(12), paddingVertical: vs(8), minWidth: s(40), minHeight: vs(40) },
|
|
@@ -2062,7 +2086,7 @@ function Toggle({
|
|
|
2062
2086
|
selectionAsync();
|
|
2063
2087
|
onPressedChange?.(!pressed);
|
|
2064
2088
|
};
|
|
2065
|
-
return /* @__PURE__ */
|
|
2089
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [disabled && styles17.disabled, style] }, /* @__PURE__ */ React55__default.default.createElement(
|
|
2066
2090
|
PressableButton,
|
|
2067
2091
|
{
|
|
2068
2092
|
onPress: handlePress,
|
|
@@ -2074,7 +2098,7 @@ function Toggle({
|
|
|
2074
2098
|
accessibilityLabel: accessibilityLabel ?? label,
|
|
2075
2099
|
accessibilityState: { selected: pressed, disabled: !!disabled }
|
|
2076
2100
|
},
|
|
2077
|
-
/* @__PURE__ */
|
|
2101
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
2078
2102
|
reactNativeEase.EaseView,
|
|
2079
2103
|
{
|
|
2080
2104
|
style: [styles17.base, sizeStyles[size], { borderWidth: 2 }],
|
|
@@ -2084,7 +2108,7 @@ function Toggle({
|
|
|
2084
2108
|
},
|
|
2085
2109
|
transition: COLOR_TRANSITION
|
|
2086
2110
|
},
|
|
2087
|
-
/* @__PURE__ */
|
|
2111
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles17.inner }, /* @__PURE__ */ React55__default.default.createElement(
|
|
2088
2112
|
ToggleIcon,
|
|
2089
2113
|
{
|
|
2090
2114
|
pressed,
|
|
@@ -2098,7 +2122,7 @@ function Toggle({
|
|
|
2098
2122
|
primaryColor: colors.primary,
|
|
2099
2123
|
mutedColor: colors.foregroundMuted
|
|
2100
2124
|
}
|
|
2101
|
-
), label ? /* @__PURE__ */
|
|
2125
|
+
), label ? /* @__PURE__ */ React55__default.default.createElement(
|
|
2102
2126
|
reactNative.Text,
|
|
2103
2127
|
{
|
|
2104
2128
|
style: [styles17.label, { color: pressed ? colors.primary : colors.foreground }],
|
|
@@ -2133,7 +2157,7 @@ function RadioItem({
|
|
|
2133
2157
|
onSelect
|
|
2134
2158
|
}) {
|
|
2135
2159
|
const { colors } = useTheme();
|
|
2136
|
-
return /* @__PURE__ */
|
|
2160
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
2137
2161
|
PressableButton,
|
|
2138
2162
|
{
|
|
2139
2163
|
style: [styles18.row, option.disabled && styles18.rowDisabled],
|
|
@@ -2150,14 +2174,14 @@ function RadioItem({
|
|
|
2150
2174
|
accessibilityLabel: option.label,
|
|
2151
2175
|
accessibilityState: { checked: selected, disabled: !!option.disabled }
|
|
2152
2176
|
},
|
|
2153
|
-
/* @__PURE__ */
|
|
2177
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
2154
2178
|
reactNativeEase.EaseView,
|
|
2155
2179
|
{
|
|
2156
2180
|
style: styles18.radio,
|
|
2157
2181
|
animate: { borderColor: selected ? colors.primary : colors.border },
|
|
2158
2182
|
transition: COLOR_TRANSITION
|
|
2159
2183
|
},
|
|
2160
|
-
/* @__PURE__ */
|
|
2184
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
2161
2185
|
reactNativeEase.EaseView,
|
|
2162
2186
|
{
|
|
2163
2187
|
style: [styles18.dot, { backgroundColor: colors.primary }],
|
|
@@ -2166,7 +2190,7 @@ function RadioItem({
|
|
|
2166
2190
|
}
|
|
2167
2191
|
)
|
|
2168
2192
|
),
|
|
2169
|
-
/* @__PURE__ */
|
|
2193
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
2170
2194
|
reactNative.Text,
|
|
2171
2195
|
{
|
|
2172
2196
|
style: [styles18.label, { color: colors.foreground }],
|
|
@@ -2184,14 +2208,14 @@ function RadioGroup({
|
|
|
2184
2208
|
style,
|
|
2185
2209
|
accessibilityLabel
|
|
2186
2210
|
}) {
|
|
2187
|
-
return /* @__PURE__ */
|
|
2211
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
2188
2212
|
reactNative.View,
|
|
2189
2213
|
{
|
|
2190
2214
|
style: [styles18.container, orientation === "horizontal" && styles18.horizontal, style],
|
|
2191
2215
|
accessibilityRole: "radiogroup",
|
|
2192
2216
|
accessibilityLabel
|
|
2193
2217
|
},
|
|
2194
|
-
options.map((option) => /* @__PURE__ */
|
|
2218
|
+
options.map((option) => /* @__PURE__ */ React55__default.default.createElement(
|
|
2195
2219
|
RadioItem,
|
|
2196
2220
|
{
|
|
2197
2221
|
key: option.value,
|
|
@@ -2246,7 +2270,7 @@ function TabTrigger({
|
|
|
2246
2270
|
}) {
|
|
2247
2271
|
const { colors } = useTheme();
|
|
2248
2272
|
const isUnderline = variant === "underline";
|
|
2249
|
-
return /* @__PURE__ */
|
|
2273
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { onLayout, style: styles19.triggerWrap }, /* @__PURE__ */ React55__default.default.createElement(
|
|
2250
2274
|
PressableTab,
|
|
2251
2275
|
{
|
|
2252
2276
|
style: [
|
|
@@ -2261,7 +2285,7 @@ function TabTrigger({
|
|
|
2261
2285
|
accessibilityState: { selected: isActive },
|
|
2262
2286
|
accessibilityLabel: tab.label
|
|
2263
2287
|
},
|
|
2264
|
-
/* @__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(
|
|
2265
2289
|
reactNative.Text,
|
|
2266
2290
|
{
|
|
2267
2291
|
style: [
|
|
@@ -2279,14 +2303,14 @@ function TabTrigger({
|
|
|
2279
2303
|
));
|
|
2280
2304
|
}
|
|
2281
2305
|
function Tabs({ tabs, variant = "pill", value, onValueChange, children, style }) {
|
|
2282
|
-
const [internal, setInternal] =
|
|
2306
|
+
const [internal, setInternal] = React55.useState(tabs[0]?.value ?? "");
|
|
2283
2307
|
const { colors } = useTheme();
|
|
2284
2308
|
const active = value ?? internal;
|
|
2285
|
-
const tabLayouts =
|
|
2309
|
+
const tabLayouts = React55.useRef({});
|
|
2286
2310
|
const pillX = Animated6.useSharedValue(0);
|
|
2287
2311
|
const pillWidth = Animated6.useSharedValue(0);
|
|
2288
|
-
const initialised =
|
|
2289
|
-
const animatePill =
|
|
2312
|
+
const initialised = React55.useRef(false);
|
|
2313
|
+
const animatePill = React55.useCallback((tabValue, animate) => {
|
|
2290
2314
|
const layout = tabLayouts.current[tabValue];
|
|
2291
2315
|
if (!layout) return;
|
|
2292
2316
|
if (animate) {
|
|
@@ -2297,7 +2321,7 @@ function Tabs({ tabs, variant = "pill", value, onValueChange, children, style })
|
|
|
2297
2321
|
pillWidth.value = layout.width;
|
|
2298
2322
|
}
|
|
2299
2323
|
}, [pillX, pillWidth]);
|
|
2300
|
-
|
|
2324
|
+
React55.useEffect(() => {
|
|
2301
2325
|
if (initialised.current) animatePill(active, true);
|
|
2302
2326
|
}, [active, animatePill]);
|
|
2303
2327
|
const handlePress = (v) => {
|
|
@@ -2309,7 +2333,7 @@ function Tabs({ tabs, variant = "pill", value, onValueChange, children, style })
|
|
|
2309
2333
|
transform: [{ translateX: pillX.value }],
|
|
2310
2334
|
width: pillWidth.value
|
|
2311
2335
|
}));
|
|
2312
|
-
return /* @__PURE__ */
|
|
2336
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style }, /* @__PURE__ */ React55__default.default.createElement(
|
|
2313
2337
|
reactNative.View,
|
|
2314
2338
|
{
|
|
2315
2339
|
style: [
|
|
@@ -2317,7 +2341,7 @@ function Tabs({ tabs, variant = "pill", value, onValueChange, children, style })
|
|
|
2317
2341
|
],
|
|
2318
2342
|
accessibilityRole: "tablist"
|
|
2319
2343
|
},
|
|
2320
|
-
variant === "pill" && /* @__PURE__ */
|
|
2344
|
+
variant === "pill" && /* @__PURE__ */ React55__default.default.createElement(
|
|
2321
2345
|
Animated6__default.default.View,
|
|
2322
2346
|
{
|
|
2323
2347
|
style: [
|
|
@@ -2339,7 +2363,7 @@ function Tabs({ tabs, variant = "pill", value, onValueChange, children, style })
|
|
|
2339
2363
|
]
|
|
2340
2364
|
}
|
|
2341
2365
|
),
|
|
2342
|
-
tabs.map((tab) => /* @__PURE__ */
|
|
2366
|
+
tabs.map((tab) => /* @__PURE__ */ React55__default.default.createElement(
|
|
2343
2367
|
TabTrigger,
|
|
2344
2368
|
{
|
|
2345
2369
|
key: tab.value,
|
|
@@ -2361,7 +2385,7 @@ function Tabs({ tabs, variant = "pill", value, onValueChange, children, style })
|
|
|
2361
2385
|
}
|
|
2362
2386
|
function TabsContent({ value, activeValue, children, style }) {
|
|
2363
2387
|
if (value !== activeValue) return null;
|
|
2364
|
-
return /* @__PURE__ */
|
|
2388
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style, accessibilityRole: "none" }, children);
|
|
2365
2389
|
}
|
|
2366
2390
|
var styles19 = reactNative.StyleSheet.create({
|
|
2367
2391
|
list: {
|
|
@@ -2419,32 +2443,28 @@ function AccordionItemComponent({
|
|
|
2419
2443
|
onToggle
|
|
2420
2444
|
}) {
|
|
2421
2445
|
const { colors } = useTheme();
|
|
2422
|
-
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;
|
|
2423
2447
|
const isExpanded = Animated6.useSharedValue(isOpen);
|
|
2424
2448
|
const height = Animated6.useSharedValue(0);
|
|
2425
|
-
|
|
2449
|
+
React55__default.default.useEffect(() => {
|
|
2426
2450
|
isExpanded.value = isOpen;
|
|
2427
2451
|
}, [isOpen, isExpanded]);
|
|
2428
|
-
const
|
|
2429
|
-
|
|
2430
|
-
duration: isExpanded.value ? TIMINGS.expand.duration : TIMINGS.collapse.duration,
|
|
2431
|
-
easing: isExpanded.value ? Animated6.Easing.bezier(0.23, 1, 0.32, 1) : Animated6.Easing.in(Animated6.Easing.ease)
|
|
2432
|
-
})
|
|
2433
|
-
);
|
|
2434
|
-
const derivedRotation = Animated6.useDerivedValue(
|
|
2435
|
-
() => Animated6.withTiming(isExpanded.value ? 1 : 0, {
|
|
2452
|
+
const bodyStyle = Animated6.useAnimatedStyle(() => ({
|
|
2453
|
+
height: Animated6.withTiming(height.value * Number(isExpanded.value), {
|
|
2436
2454
|
duration: isExpanded.value ? TIMINGS.expand.duration : TIMINGS.collapse.duration,
|
|
2437
2455
|
easing: isExpanded.value ? Animated6.Easing.bezier(0.23, 1, 0.32, 1) : Animated6.Easing.in(Animated6.Easing.ease)
|
|
2438
|
-
})
|
|
2439
|
-
);
|
|
2440
|
-
const bodyStyle = Animated6.useAnimatedStyle(() => ({
|
|
2441
|
-
height: derivedHeight.value,
|
|
2456
|
+
}),
|
|
2442
2457
|
overflow: "hidden"
|
|
2443
2458
|
}));
|
|
2444
2459
|
const rotationStyle = Animated6.useAnimatedStyle(() => ({
|
|
2445
|
-
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
|
+
}]
|
|
2446
2466
|
}));
|
|
2447
|
-
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(
|
|
2448
2468
|
PressableRow,
|
|
2449
2469
|
{
|
|
2450
2470
|
onPress: () => {
|
|
@@ -2456,10 +2476,11 @@ function AccordionItemComponent({
|
|
|
2456
2476
|
accessibilityRole: "button",
|
|
2457
2477
|
accessibilityState: { expanded: isOpen },
|
|
2458
2478
|
accessibilityLabel: typeof item.trigger === "string" ? item.trigger : void 0,
|
|
2479
|
+
accessibilityHint: item.accessibilityHint,
|
|
2459
2480
|
style: styles20.trigger
|
|
2460
2481
|
},
|
|
2461
|
-
/* @__PURE__ */
|
|
2462
|
-
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(
|
|
2463
2484
|
reactNative.View,
|
|
2464
2485
|
{
|
|
2465
2486
|
style: styles20.triggerActions,
|
|
@@ -2467,8 +2488,8 @@ function AccordionItemComponent({
|
|
|
2467
2488
|
},
|
|
2468
2489
|
item.triggerActions
|
|
2469
2490
|
) : null,
|
|
2470
|
-
/* @__PURE__ */
|
|
2471
|
-
), /* @__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(
|
|
2472
2493
|
reactNative.View,
|
|
2473
2494
|
{
|
|
2474
2495
|
style: styles20.content,
|
|
@@ -2476,11 +2497,11 @@ function AccordionItemComponent({
|
|
|
2476
2497
|
height.value = e.nativeEvent.layout.height;
|
|
2477
2498
|
}
|
|
2478
2499
|
},
|
|
2479
|
-
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
|
|
2480
2501
|
)));
|
|
2481
2502
|
}
|
|
2482
2503
|
function Accordion({ items, type = "single", defaultValue, style }) {
|
|
2483
|
-
const [openValues, setOpenValues] =
|
|
2504
|
+
const [openValues, setOpenValues] = React55.useState(() => {
|
|
2484
2505
|
if (!defaultValue) return [];
|
|
2485
2506
|
return Array.isArray(defaultValue) ? defaultValue : [defaultValue];
|
|
2486
2507
|
});
|
|
@@ -2493,7 +2514,7 @@ function Accordion({ items, type = "single", defaultValue, style }) {
|
|
|
2493
2514
|
);
|
|
2494
2515
|
}
|
|
2495
2516
|
};
|
|
2496
|
-
return /* @__PURE__ */
|
|
2517
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles20.list, style] }, items.map((item) => /* @__PURE__ */ React55__default.default.createElement(
|
|
2497
2518
|
AccordionItemComponent,
|
|
2498
2519
|
{
|
|
2499
2520
|
key: item.value,
|
|
@@ -2567,11 +2588,12 @@ function Slider({
|
|
|
2567
2588
|
showValue = false,
|
|
2568
2589
|
formatValue: formatValue2 = (v) => v.toFixed(2),
|
|
2569
2590
|
accessibilityLabel,
|
|
2591
|
+
accessibilityHint,
|
|
2570
2592
|
disabled,
|
|
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,12 +2601,13 @@ 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],
|
|
2586
2608
|
accessibilityRole: "adjustable",
|
|
2587
2609
|
accessibilityLabel: accessibilityLabel ?? label,
|
|
2610
|
+
accessibilityHint,
|
|
2588
2611
|
accessibilityValue: {
|
|
2589
2612
|
min: minimumValue,
|
|
2590
2613
|
max: maximumValue,
|
|
@@ -2592,8 +2615,8 @@ function Slider({
|
|
|
2592
2615
|
text: formatValue2(value)
|
|
2593
2616
|
}
|
|
2594
2617
|
},
|
|
2595
|
-
label || showValue ? /* @__PURE__ */
|
|
2596
|
-
/* @__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(
|
|
2597
2620
|
RNSlider__default.default,
|
|
2598
2621
|
{
|
|
2599
2622
|
value,
|
|
@@ -2637,15 +2660,47 @@ var styles21 = reactNative.StyleSheet.create({
|
|
|
2637
2660
|
opacity: 0.45
|
|
2638
2661
|
}
|
|
2639
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
|
|
2640
2695
|
function SheetHeader({ children, style }) {
|
|
2641
|
-
return /* @__PURE__ */
|
|
2696
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles22.header, style] }, children);
|
|
2642
2697
|
}
|
|
2643
2698
|
function SheetContent({ children, style }) {
|
|
2644
|
-
return /* @__PURE__ */
|
|
2699
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles22.sheetContent, style] }, children);
|
|
2645
2700
|
}
|
|
2646
2701
|
function SheetFooter({ children, style }) {
|
|
2647
2702
|
const { colors } = useTheme();
|
|
2648
|
-
return /* @__PURE__ */
|
|
2703
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles22.sheetFooter, { backgroundColor: colors.card, borderTopColor: colors.border }, style] }, children);
|
|
2649
2704
|
}
|
|
2650
2705
|
function Sheet({
|
|
2651
2706
|
open,
|
|
@@ -2667,26 +2722,10 @@ function Sheet({
|
|
|
2667
2722
|
}) {
|
|
2668
2723
|
const { colors } = useTheme();
|
|
2669
2724
|
const insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
2670
|
-
const ref =
|
|
2671
|
-
const
|
|
2672
|
-
const
|
|
2673
|
-
|
|
2674
|
-
const handleDismiss = React54.useCallback(() => {
|
|
2675
|
-
isPresentedRef.current = false;
|
|
2676
|
-
onClose?.();
|
|
2677
|
-
}, [onClose]);
|
|
2678
|
-
React54.useEffect(() => {
|
|
2679
|
-
if (open && !isPresentedRef.current) {
|
|
2680
|
-
impactMedium();
|
|
2681
|
-
ref.current?.present();
|
|
2682
|
-
wasOpened.current = true;
|
|
2683
|
-
isPresentedRef.current = true;
|
|
2684
|
-
} else if (!open && wasOpened.current && isPresentedRef.current) {
|
|
2685
|
-
ref.current?.dismiss();
|
|
2686
|
-
}
|
|
2687
|
-
}, [open]);
|
|
2688
|
-
const renderBackdrop = React54.useCallback(
|
|
2689
|
-
(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(
|
|
2690
2729
|
bottomSheet.BottomSheetBackdrop,
|
|
2691
2730
|
{
|
|
2692
2731
|
...props,
|
|
@@ -2697,15 +2736,15 @@ function Sheet({
|
|
|
2697
2736
|
),
|
|
2698
2737
|
[]
|
|
2699
2738
|
);
|
|
2700
|
-
const childArray =
|
|
2701
|
-
const customHeader = childArray.find((child) =>
|
|
2702
|
-
const customContent = childArray.find((child) =>
|
|
2703
|
-
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);
|
|
2704
2743
|
const filteredChildren = customHeader || customContent || customFooter ? childArray.filter(
|
|
2705
|
-
(child) => !
|
|
2744
|
+
(child) => !React55__default.default.isValidElement(child) || child.type !== SheetHeader && child.type !== SheetContent && child.type !== SheetFooter
|
|
2706
2745
|
) : children;
|
|
2707
2746
|
const showHeader = !!(title || subtitle || showCloseButton) && !customHeader;
|
|
2708
|
-
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(
|
|
2709
2748
|
reactNative.TouchableOpacity,
|
|
2710
2749
|
{
|
|
2711
2750
|
onPress: onClose,
|
|
@@ -2716,19 +2755,19 @@ function Sheet({
|
|
|
2716
2755
|
accessibilityLabel: "Cerrar",
|
|
2717
2756
|
hitSlop: { top: 12, bottom: 12, left: 12, right: 12 }
|
|
2718
2757
|
},
|
|
2719
|
-
/* @__PURE__ */
|
|
2720
|
-
) : 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;
|
|
2721
2760
|
const contentNode = customContent ? customContent : filteredChildren;
|
|
2722
2761
|
const effectiveFooter = customFooter ? customFooter : footer;
|
|
2723
|
-
const renderFooter =
|
|
2762
|
+
const renderFooter = React55.useCallback(
|
|
2724
2763
|
(props) => {
|
|
2725
2764
|
if (!effectiveFooter) return null;
|
|
2726
|
-
return /* @__PURE__ */
|
|
2765
|
+
return /* @__PURE__ */ React55__default.default.createElement(bottomSheet.BottomSheetFooter, { ...props }, effectiveFooter);
|
|
2727
2766
|
},
|
|
2728
2767
|
[effectiveFooter]
|
|
2729
2768
|
);
|
|
2730
2769
|
const useDynamicSizing = !snapPoints;
|
|
2731
|
-
return /* @__PURE__ */
|
|
2770
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
2732
2771
|
bottomSheet.BottomSheetModal,
|
|
2733
2772
|
{
|
|
2734
2773
|
ref,
|
|
@@ -2748,7 +2787,7 @@ function Sheet({
|
|
|
2748
2787
|
android_keyboardInputMode,
|
|
2749
2788
|
enableBlurKeyboardOnGesture
|
|
2750
2789
|
},
|
|
2751
|
-
scrollable ? /* @__PURE__ */
|
|
2790
|
+
scrollable ? /* @__PURE__ */ React55__default.default.createElement(
|
|
2752
2791
|
bottomSheet.BottomSheetScrollView,
|
|
2753
2792
|
{
|
|
2754
2793
|
contentContainerStyle: [styles22.scrollContent, style],
|
|
@@ -2759,7 +2798,7 @@ function Sheet({
|
|
|
2759
2798
|
},
|
|
2760
2799
|
headerNode,
|
|
2761
2800
|
contentNode
|
|
2762
|
-
) : /* @__PURE__ */
|
|
2801
|
+
) : /* @__PURE__ */ React55__default.default.createElement(bottomSheet.BottomSheetView, { style: [styles22.content, contentStyle, style] }, headerNode, contentNode)
|
|
2763
2802
|
);
|
|
2764
2803
|
}
|
|
2765
2804
|
Sheet.Header = SheetHeader;
|
|
@@ -2832,13 +2871,26 @@ function Select({
|
|
|
2832
2871
|
error,
|
|
2833
2872
|
disabled,
|
|
2834
2873
|
style,
|
|
2835
|
-
accessibilityLabel
|
|
2874
|
+
accessibilityLabel,
|
|
2875
|
+
accessibilityHint
|
|
2836
2876
|
}) {
|
|
2837
2877
|
const { colors } = useTheme();
|
|
2838
|
-
const [pickerVisible, setPickerVisible] =
|
|
2839
|
-
const [pendingValue, setPendingValue] =
|
|
2840
|
-
const pickerRef =
|
|
2878
|
+
const [pickerVisible, setPickerVisible] = React55.useState(false);
|
|
2879
|
+
const [pendingValue, setPendingValue] = React55.useState(value);
|
|
2880
|
+
const pickerRef = React55.useRef(null);
|
|
2841
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
|
+
}
|
|
2842
2894
|
const handleOpen = () => {
|
|
2843
2895
|
if (disabled) return;
|
|
2844
2896
|
selectionAsync();
|
|
@@ -2859,7 +2911,7 @@ function Select({
|
|
|
2859
2911
|
}
|
|
2860
2912
|
setPickerVisible(false);
|
|
2861
2913
|
};
|
|
2862
|
-
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(
|
|
2863
2915
|
PressableButton,
|
|
2864
2916
|
{
|
|
2865
2917
|
style: [
|
|
@@ -2876,10 +2928,11 @@ function Select({
|
|
|
2876
2928
|
touchSoundDisabled: true,
|
|
2877
2929
|
accessibilityRole: "combobox",
|
|
2878
2930
|
accessibilityLabel: accessibilityLabel ?? label,
|
|
2931
|
+
accessibilityHint,
|
|
2879
2932
|
accessibilityValue: { text: selected?.label ?? placeholder },
|
|
2880
2933
|
accessibilityState: { disabled: !!disabled, expanded: pickerVisible }
|
|
2881
2934
|
},
|
|
2882
|
-
/* @__PURE__ */
|
|
2935
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
2883
2936
|
reactNative.Text,
|
|
2884
2937
|
{
|
|
2885
2938
|
style: [
|
|
@@ -2891,8 +2944,8 @@ function Select({
|
|
|
2891
2944
|
},
|
|
2892
2945
|
selected?.label ?? placeholder
|
|
2893
2946
|
),
|
|
2894
|
-
/* @__PURE__ */
|
|
2895
|
-
) : 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(
|
|
2896
2949
|
reactNative.Modal,
|
|
2897
2950
|
{
|
|
2898
2951
|
visible: pickerVisible,
|
|
@@ -2900,27 +2953,17 @@ function Select({
|
|
|
2900
2953
|
animationType: "slide",
|
|
2901
2954
|
onRequestClose: handleDismiss
|
|
2902
2955
|
},
|
|
2903
|
-
/* @__PURE__ */
|
|
2904
|
-
/* @__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(
|
|
2905
2958
|
picker.Picker,
|
|
2906
2959
|
{
|
|
2907
2960
|
selectedValue: pendingValue ?? "",
|
|
2908
2961
|
onValueChange: (val) => setPendingValue(val),
|
|
2909
2962
|
itemStyle: { color: colors.foreground }
|
|
2910
2963
|
},
|
|
2911
|
-
!value
|
|
2912
|
-
options.map((o) => /* @__PURE__ */ React54__default.default.createElement(
|
|
2913
|
-
picker.Picker.Item,
|
|
2914
|
-
{
|
|
2915
|
-
key: o.value,
|
|
2916
|
-
label: o.label,
|
|
2917
|
-
value: o.value,
|
|
2918
|
-
enabled: !o.disabled,
|
|
2919
|
-
color: o.disabled ? colors.foregroundMuted : colors.foreground
|
|
2920
|
-
}
|
|
2921
|
-
))
|
|
2964
|
+
renderPickerItems(!value, colors.foreground, colors.foregroundMuted)
|
|
2922
2965
|
))
|
|
2923
|
-
) : null, isAndroid ? /* @__PURE__ */
|
|
2966
|
+
) : null, isAndroid ? /* @__PURE__ */ React55__default.default.createElement(
|
|
2924
2967
|
picker.Picker,
|
|
2925
2968
|
{
|
|
2926
2969
|
ref: pickerRef,
|
|
@@ -2936,17 +2979,8 @@ function Select({
|
|
|
2936
2979
|
prompt: label,
|
|
2937
2980
|
style: styles23.androidHiddenPicker
|
|
2938
2981
|
},
|
|
2939
|
-
!value
|
|
2940
|
-
|
|
2941
|
-
picker.Picker.Item,
|
|
2942
|
-
{
|
|
2943
|
-
key: o.value,
|
|
2944
|
-
label: o.label,
|
|
2945
|
-
value: o.value,
|
|
2946
|
-
enabled: !o.disabled
|
|
2947
|
-
}
|
|
2948
|
-
))
|
|
2949
|
-
) : null, isWeb2 ? /* @__PURE__ */ React54__default.default.createElement(
|
|
2982
|
+
renderPickerItems(!value)
|
|
2983
|
+
) : null, isWeb2 ? /* @__PURE__ */ React55__default.default.createElement(
|
|
2950
2984
|
picker.Picker,
|
|
2951
2985
|
{
|
|
2952
2986
|
selectedValue: value ?? "",
|
|
@@ -2966,17 +3000,8 @@ function Select({
|
|
|
2966
3000
|
}
|
|
2967
3001
|
]
|
|
2968
3002
|
},
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
picker.Picker.Item,
|
|
2972
|
-
{
|
|
2973
|
-
key: o.value,
|
|
2974
|
-
label: o.label,
|
|
2975
|
-
value: o.value,
|
|
2976
|
-
enabled: !o.disabled
|
|
2977
|
-
}
|
|
2978
|
-
))
|
|
2979
|
-
) : 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);
|
|
2980
3005
|
}
|
|
2981
3006
|
var styles23 = reactNative.StyleSheet.create({
|
|
2982
3007
|
container: {
|
|
@@ -3054,7 +3079,7 @@ function useToast() {
|
|
|
3054
3079
|
function ToastProvider({ children }) {
|
|
3055
3080
|
const { colorScheme } = useTheme();
|
|
3056
3081
|
const insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
3057
|
-
return /* @__PURE__ */
|
|
3082
|
+
return /* @__PURE__ */ React55__default.default.createElement(React55__default.default.Fragment, null, children, /* @__PURE__ */ React55__default.default.createElement(
|
|
3058
3083
|
sonnerNative.Toaster,
|
|
3059
3084
|
{
|
|
3060
3085
|
theme: colorScheme,
|
|
@@ -3123,7 +3148,7 @@ function CurrencyInput({
|
|
|
3123
3148
|
fontSize: isLarge ? ms(32) : ms(17)
|
|
3124
3149
|
};
|
|
3125
3150
|
const displayValue = value && prefix && value.startsWith(prefix) ? value.slice(prefix.length) : value;
|
|
3126
|
-
return /* @__PURE__ */
|
|
3151
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
3127
3152
|
Input,
|
|
3128
3153
|
{
|
|
3129
3154
|
...props,
|
|
@@ -3174,7 +3199,7 @@ function CurrencyDisplayBase({ value, prefix = "$", showDecimals = false, textCo
|
|
|
3174
3199
|
const baseFontSize = variant ? variantFontSize[variant] : ms(56);
|
|
3175
3200
|
const fontSize = maxFontSize ?? baseFontSize;
|
|
3176
3201
|
const letterSpacing = variant ? variantLetterSpacing[variant] : -2;
|
|
3177
|
-
return /* @__PURE__ */
|
|
3202
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles24.container, style] }, /* @__PURE__ */ React55__default.default.createElement(
|
|
3178
3203
|
reactNative.Text,
|
|
3179
3204
|
{
|
|
3180
3205
|
style: [styles24.amount, { color: textColor ?? colors.foreground, fontSize, letterSpacing }],
|
|
@@ -3186,7 +3211,7 @@ function CurrencyDisplayBase({ value, prefix = "$", showDecimals = false, textCo
|
|
|
3186
3211
|
formatted
|
|
3187
3212
|
));
|
|
3188
3213
|
}
|
|
3189
|
-
var CurrencyDisplay =
|
|
3214
|
+
var CurrencyDisplay = React55__default.default.memo(CurrencyDisplayBase);
|
|
3190
3215
|
var styles24 = reactNative.StyleSheet.create({
|
|
3191
3216
|
container: {
|
|
3192
3217
|
alignSelf: "flex-start"
|
|
@@ -3219,14 +3244,15 @@ function ListItemBase({
|
|
|
3219
3244
|
subtitleStyle,
|
|
3220
3245
|
subtitleNumberOfLines = 2,
|
|
3221
3246
|
captionStyle,
|
|
3222
|
-
accessibilityLabel
|
|
3247
|
+
accessibilityLabel,
|
|
3248
|
+
accessibilityHint
|
|
3223
3249
|
}) {
|
|
3224
3250
|
const { colors } = useTheme();
|
|
3225
3251
|
const handlePress = () => {
|
|
3226
3252
|
selectionAsync();
|
|
3227
3253
|
onPress?.();
|
|
3228
3254
|
};
|
|
3229
|
-
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;
|
|
3230
3256
|
const hasRightContent = !!(rightIcon || rightActions && rightActions.length > 0 || rightRender !== void 0 || showChevron);
|
|
3231
3257
|
const cardStyle = variant === "card" ? {
|
|
3232
3258
|
backgroundColor: colors.card,
|
|
@@ -3240,7 +3266,7 @@ function ListItemBase({
|
|
|
3240
3266
|
elevation: 2
|
|
3241
3267
|
} : {};
|
|
3242
3268
|
const a11yLabel = accessibilityLabel ?? [title, subtitle, caption].filter(Boolean).join(". ");
|
|
3243
|
-
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(
|
|
3244
3270
|
reactNative.Text,
|
|
3245
3271
|
{
|
|
3246
3272
|
style: [styles25.title, { color: colors.foreground }, titleStyle],
|
|
@@ -3248,7 +3274,7 @@ function ListItemBase({
|
|
|
3248
3274
|
allowFontScaling: true
|
|
3249
3275
|
},
|
|
3250
3276
|
title
|
|
3251
|
-
), subtitle ? /* @__PURE__ */
|
|
3277
|
+
), subtitle ? /* @__PURE__ */ React55__default.default.createElement(
|
|
3252
3278
|
reactNative.Text,
|
|
3253
3279
|
{
|
|
3254
3280
|
style: [styles25.subtitle, { color: colors.foregroundMuted }, subtitleStyle],
|
|
@@ -3256,7 +3282,7 @@ function ListItemBase({
|
|
|
3256
3282
|
allowFontScaling: true
|
|
3257
3283
|
},
|
|
3258
3284
|
subtitle
|
|
3259
|
-
) : null, caption ? /* @__PURE__ */
|
|
3285
|
+
) : null, caption ? /* @__PURE__ */ React55__default.default.createElement(
|
|
3260
3286
|
reactNative.Text,
|
|
3261
3287
|
{
|
|
3262
3288
|
style: [styles25.caption, { color: colors.foregroundMuted }, captionStyle],
|
|
@@ -3264,16 +3290,16 @@ function ListItemBase({
|
|
|
3264
3290
|
allowFontScaling: true
|
|
3265
3291
|
},
|
|
3266
3292
|
caption
|
|
3267
|
-
) : 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(
|
|
3268
3294
|
reactNative.Text,
|
|
3269
3295
|
{
|
|
3270
3296
|
style: [styles25.rightText, { color: colors.foregroundMuted }],
|
|
3271
3297
|
allowFontScaling: true
|
|
3272
3298
|
},
|
|
3273
3299
|
rightRender
|
|
3274
|
-
) : 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);
|
|
3275
3301
|
if (onPress) {
|
|
3276
|
-
return /* @__PURE__ */
|
|
3302
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: disabled && styles25.disabled }, /* @__PURE__ */ React55__default.default.createElement(
|
|
3277
3303
|
PressableRow,
|
|
3278
3304
|
{
|
|
3279
3305
|
style: [styles25.container, cardStyle, style],
|
|
@@ -3284,14 +3310,15 @@ function ListItemBase({
|
|
|
3284
3310
|
activateOnHover: true,
|
|
3285
3311
|
accessibilityRole: "button",
|
|
3286
3312
|
accessibilityLabel: a11yLabel,
|
|
3313
|
+
accessibilityHint,
|
|
3287
3314
|
accessibilityState: { disabled: !!disabled }
|
|
3288
3315
|
},
|
|
3289
3316
|
content
|
|
3290
|
-
), showSeparator ? /* @__PURE__ */
|
|
3317
|
+
), showSeparator ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles25.separator, { backgroundColor: colors.separator }] }) : null);
|
|
3291
3318
|
}
|
|
3292
|
-
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);
|
|
3293
3320
|
}
|
|
3294
|
-
var ListItem =
|
|
3321
|
+
var ListItem = React55__default.default.memo(ListItemBase);
|
|
3295
3322
|
var styles25 = reactNative.StyleSheet.create({
|
|
3296
3323
|
container: {
|
|
3297
3324
|
flexDirection: "row",
|
|
@@ -3356,19 +3383,19 @@ var styles25 = reactNative.StyleSheet.create({
|
|
|
3356
3383
|
opacity: 0.45
|
|
3357
3384
|
}
|
|
3358
3385
|
});
|
|
3359
|
-
function
|
|
3386
|
+
function ItemGroup({ children, variant = "plain", childPropKey, style }) {
|
|
3360
3387
|
const { colors } = useTheme();
|
|
3361
|
-
const processedChildren =
|
|
3362
|
-
if (!
|
|
3363
|
-
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) {
|
|
3364
3391
|
return child;
|
|
3365
3392
|
}
|
|
3366
3393
|
const childProps = child.props;
|
|
3367
|
-
const
|
|
3368
|
-
if (!
|
|
3369
|
-
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;
|
|
3370
3397
|
if (childProps["showSeparator"] === void 0 && !isLast) {
|
|
3371
|
-
return
|
|
3398
|
+
return React55__default.default.cloneElement(child, {
|
|
3372
3399
|
showSeparator: true
|
|
3373
3400
|
});
|
|
3374
3401
|
}
|
|
@@ -3386,24 +3413,22 @@ function ListGroup({ children, variant = "plain", style }) {
|
|
|
3386
3413
|
elevation: 2,
|
|
3387
3414
|
paddingVertical: vs(4)
|
|
3388
3415
|
} : {};
|
|
3389
|
-
return /* @__PURE__ */
|
|
3416
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles26.container, cardStyle, style] }, processedChildren);
|
|
3390
3417
|
}
|
|
3391
|
-
function
|
|
3418
|
+
function ItemGroupHeader({ children, style }) {
|
|
3392
3419
|
const { colors } = useTheme();
|
|
3393
3420
|
if (typeof children === "string") {
|
|
3394
|
-
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));
|
|
3395
3422
|
}
|
|
3396
|
-
return /* @__PURE__ */
|
|
3423
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles26.header, { borderBottomColor: colors.separator }, style] }, children);
|
|
3397
3424
|
}
|
|
3398
|
-
function
|
|
3425
|
+
function ItemGroupFooter({ children, style }) {
|
|
3399
3426
|
const { colors } = useTheme();
|
|
3400
3427
|
if (typeof children === "string") {
|
|
3401
|
-
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));
|
|
3402
3429
|
}
|
|
3403
|
-
return /* @__PURE__ */
|
|
3430
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles26.footer, style] }, children);
|
|
3404
3431
|
}
|
|
3405
|
-
ListGroup.Header = ListGroupHeader;
|
|
3406
|
-
ListGroup.Footer = ListGroupFooter;
|
|
3407
3432
|
var styles26 = reactNative.StyleSheet.create({
|
|
3408
3433
|
container: {
|
|
3409
3434
|
overflow: "hidden"
|
|
@@ -3430,6 +3455,13 @@ var styles26 = reactNative.StyleSheet.create({
|
|
|
3430
3455
|
fontSize: 12
|
|
3431
3456
|
}
|
|
3432
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;
|
|
3433
3465
|
function MenuItemBase({
|
|
3434
3466
|
label,
|
|
3435
3467
|
subtitle,
|
|
@@ -3444,14 +3476,15 @@ function MenuItemBase({
|
|
|
3444
3476
|
showSeparator = false,
|
|
3445
3477
|
style,
|
|
3446
3478
|
labelStyle,
|
|
3447
|
-
accessibilityLabel
|
|
3479
|
+
accessibilityLabel,
|
|
3480
|
+
accessibilityHint
|
|
3448
3481
|
}) {
|
|
3449
3482
|
const { colors } = useTheme();
|
|
3450
3483
|
const handlePress = () => {
|
|
3451
3484
|
selectionAsync();
|
|
3452
3485
|
onPress();
|
|
3453
3486
|
};
|
|
3454
|
-
const resolvedIcon = iconName ? /* @__PURE__ */
|
|
3487
|
+
const resolvedIcon = iconName ? /* @__PURE__ */ React55__default.default.createElement(Icon, { name: iconName, size: 22, color: iconColor ?? colors.foreground }) : icon;
|
|
3455
3488
|
const cardStyle = variant === "card" ? {
|
|
3456
3489
|
backgroundColor: colors.card,
|
|
3457
3490
|
borderRadius: RADIUS.md,
|
|
@@ -3464,7 +3497,7 @@ function MenuItemBase({
|
|
|
3464
3497
|
elevation: 2
|
|
3465
3498
|
} : {};
|
|
3466
3499
|
const a11yLabel = accessibilityLabel ?? (subtitle ? `${label}. ${subtitle}` : label);
|
|
3467
|
-
return /* @__PURE__ */
|
|
3500
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: disabled && styles27.disabled }, /* @__PURE__ */ React55__default.default.createElement(
|
|
3468
3501
|
PressableRow,
|
|
3469
3502
|
{
|
|
3470
3503
|
style: [styles27.container, cardStyle, style],
|
|
@@ -3475,10 +3508,11 @@ function MenuItemBase({
|
|
|
3475
3508
|
activateOnHover: true,
|
|
3476
3509
|
accessibilityRole: "button",
|
|
3477
3510
|
accessibilityLabel: a11yLabel,
|
|
3511
|
+
accessibilityHint,
|
|
3478
3512
|
accessibilityState: { disabled }
|
|
3479
3513
|
},
|
|
3480
|
-
resolvedIcon ? /* @__PURE__ */
|
|
3481
|
-
/* @__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(
|
|
3482
3516
|
reactNative.Text,
|
|
3483
3517
|
{
|
|
3484
3518
|
style: [styles27.label, { color: colors.foreground }, labelStyle],
|
|
@@ -3486,7 +3520,7 @@ function MenuItemBase({
|
|
|
3486
3520
|
allowFontScaling: true
|
|
3487
3521
|
},
|
|
3488
3522
|
label
|
|
3489
|
-
), subtitle ? /* @__PURE__ */
|
|
3523
|
+
), subtitle ? /* @__PURE__ */ React55__default.default.createElement(
|
|
3490
3524
|
reactNative.Text,
|
|
3491
3525
|
{
|
|
3492
3526
|
style: [styles27.subtitle, { color: colors.foregroundMuted }],
|
|
@@ -3495,7 +3529,7 @@ function MenuItemBase({
|
|
|
3495
3529
|
},
|
|
3496
3530
|
subtitle
|
|
3497
3531
|
) : null),
|
|
3498
|
-
rightRender !== void 0 ? /* @__PURE__ */
|
|
3532
|
+
rightRender !== void 0 ? /* @__PURE__ */ React55__default.default.createElement(
|
|
3499
3533
|
reactNative.View,
|
|
3500
3534
|
{
|
|
3501
3535
|
style: styles27.rightContainer,
|
|
@@ -3504,10 +3538,10 @@ function MenuItemBase({
|
|
|
3504
3538
|
}
|
|
3505
3539
|
},
|
|
3506
3540
|
rightRender
|
|
3507
|
-
) : showChevron ? /* @__PURE__ */
|
|
3508
|
-
), 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);
|
|
3509
3543
|
}
|
|
3510
|
-
var MenuItem =
|
|
3544
|
+
var MenuItem = React55__default.default.memo(MenuItemBase);
|
|
3511
3545
|
var styles27 = reactNative.StyleSheet.create({
|
|
3512
3546
|
container: {
|
|
3513
3547
|
flexDirection: "row",
|
|
@@ -3549,88 +3583,19 @@ var styles27 = reactNative.StyleSheet.create({
|
|
|
3549
3583
|
opacity: 0.45
|
|
3550
3584
|
}
|
|
3551
3585
|
});
|
|
3552
|
-
function MenuGroup(
|
|
3553
|
-
|
|
3554
|
-
const processedChildren = React54__default.default.Children.map(children, (child, index) => {
|
|
3555
|
-
if (!React54__default.default.isValidElement(child)) return child;
|
|
3556
|
-
if (child.type === MenuGroupHeader || child.type === MenuGroupFooter) {
|
|
3557
|
-
return child;
|
|
3558
|
-
}
|
|
3559
|
-
const childProps = child.props;
|
|
3560
|
-
const isMenuItem = "onPress" in childProps;
|
|
3561
|
-
if (!isMenuItem) return child;
|
|
3562
|
-
const isLast = index === React54__default.default.Children.count(children) - 1;
|
|
3563
|
-
if (childProps["showSeparator"] === void 0 && !isLast) {
|
|
3564
|
-
return React54__default.default.cloneElement(child, {
|
|
3565
|
-
showSeparator: true
|
|
3566
|
-
});
|
|
3567
|
-
}
|
|
3568
|
-
return child;
|
|
3569
|
-
});
|
|
3570
|
-
const cardStyle = variant === "card" ? {
|
|
3571
|
-
backgroundColor: colors.card,
|
|
3572
|
-
borderRadius: RADIUS.md,
|
|
3573
|
-
borderWidth: 1,
|
|
3574
|
-
borderColor: colors.border,
|
|
3575
|
-
shadowColor: "#000",
|
|
3576
|
-
shadowOffset: { width: 0, height: 2 },
|
|
3577
|
-
shadowOpacity: 0.06,
|
|
3578
|
-
shadowRadius: 6,
|
|
3579
|
-
elevation: 2,
|
|
3580
|
-
paddingVertical: vs(4)
|
|
3581
|
-
} : {};
|
|
3582
|
-
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 });
|
|
3583
3588
|
}
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
if (typeof children === "string") {
|
|
3587
|
-
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));
|
|
3588
|
-
}
|
|
3589
|
-
return /* @__PURE__ */ React54__default.default.createElement(reactNative.View, { style: [styles28.header, { borderBottomColor: colors.separator }, style] }, children);
|
|
3590
|
-
}
|
|
3591
|
-
function MenuGroupFooter({ children, style }) {
|
|
3592
|
-
const { colors } = useTheme();
|
|
3593
|
-
if (typeof children === "string") {
|
|
3594
|
-
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));
|
|
3595
|
-
}
|
|
3596
|
-
return /* @__PURE__ */ React54__default.default.createElement(reactNative.View, { style: [styles28.footer, style] }, children);
|
|
3597
|
-
}
|
|
3598
|
-
MenuGroup.Header = MenuGroupHeader;
|
|
3599
|
-
MenuGroup.Footer = MenuGroupFooter;
|
|
3600
|
-
var styles28 = reactNative.StyleSheet.create({
|
|
3601
|
-
container: {
|
|
3602
|
-
overflow: "hidden"
|
|
3603
|
-
},
|
|
3604
|
-
header: {
|
|
3605
|
-
paddingHorizontal: s(16),
|
|
3606
|
-
paddingTop: vs(12),
|
|
3607
|
-
paddingBottom: vs(8),
|
|
3608
|
-
borderBottomWidth: reactNative.StyleSheet.hairlineWidth
|
|
3609
|
-
},
|
|
3610
|
-
headerText: {
|
|
3611
|
-
fontFamily: "Sohne-SemiBold",
|
|
3612
|
-
fontSize: 13,
|
|
3613
|
-
letterSpacing: 0.32,
|
|
3614
|
-
textTransform: "uppercase"
|
|
3615
|
-
},
|
|
3616
|
-
footer: {
|
|
3617
|
-
paddingHorizontal: s(16),
|
|
3618
|
-
paddingTop: vs(8),
|
|
3619
|
-
paddingBottom: vs(12)
|
|
3620
|
-
},
|
|
3621
|
-
footerText: {
|
|
3622
|
-
fontFamily: "Sohne-Regular",
|
|
3623
|
-
fontSize: 12
|
|
3624
|
-
}
|
|
3625
|
-
});
|
|
3589
|
+
MenuGroup.Header = ItemGroupHeader;
|
|
3590
|
+
MenuGroup.Footer = ItemGroupFooter;
|
|
3626
3591
|
function ChipBase({ label, selected = false, onPress, icon, iconName, style, accessibilityLabel }) {
|
|
3627
3592
|
const { colors } = useTheme();
|
|
3628
3593
|
const handlePress = () => {
|
|
3629
3594
|
selectionAsync();
|
|
3630
3595
|
onPress?.();
|
|
3631
3596
|
};
|
|
3632
|
-
const resolvedIcon = iconName ? /* @__PURE__ */
|
|
3633
|
-
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(
|
|
3634
3599
|
PressableChip,
|
|
3635
3600
|
{
|
|
3636
3601
|
onPress: handlePress,
|
|
@@ -3640,21 +3605,21 @@ function ChipBase({ label, selected = false, onPress, icon, iconName, style, acc
|
|
|
3640
3605
|
accessibilityLabel: accessibilityLabel ?? label,
|
|
3641
3606
|
accessibilityState: { selected }
|
|
3642
3607
|
},
|
|
3643
|
-
/* @__PURE__ */
|
|
3608
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
3644
3609
|
reactNativeEase.EaseView,
|
|
3645
3610
|
{
|
|
3646
|
-
style:
|
|
3611
|
+
style: styles28.chip,
|
|
3647
3612
|
animate: {
|
|
3648
3613
|
backgroundColor: selected ? colors.primary : colors.surface,
|
|
3649
3614
|
borderColor: selected ? colors.primary : colors.border
|
|
3650
3615
|
},
|
|
3651
3616
|
transition: COLOR_TRANSITION
|
|
3652
3617
|
},
|
|
3653
|
-
resolvedIcon ? /* @__PURE__ */
|
|
3654
|
-
/* @__PURE__ */
|
|
3618
|
+
resolvedIcon ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles28.chipIcon }, resolvedIcon) : null,
|
|
3619
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
3655
3620
|
reactNative.Text,
|
|
3656
3621
|
{
|
|
3657
|
-
style: [
|
|
3622
|
+
style: [styles28.label, { color: selected ? colors.primaryForeground : colors.foreground }],
|
|
3658
3623
|
allowFontScaling: true
|
|
3659
3624
|
},
|
|
3660
3625
|
label
|
|
@@ -3662,7 +3627,7 @@ function ChipBase({ label, selected = false, onPress, icon, iconName, style, acc
|
|
|
3662
3627
|
)
|
|
3663
3628
|
));
|
|
3664
3629
|
}
|
|
3665
|
-
var Chip =
|
|
3630
|
+
var Chip = React55__default.default.memo(ChipBase);
|
|
3666
3631
|
function ChipGroup({ options, value, onValueChange, multiSelect = false, style }) {
|
|
3667
3632
|
const handlePress = (optionValue) => {
|
|
3668
3633
|
if (!multiSelect) {
|
|
@@ -3678,7 +3643,7 @@ function ChipGroup({ options, value, onValueChange, multiSelect = false, style }
|
|
|
3678
3643
|
if (Array.isArray(value)) return value.includes(optionValue);
|
|
3679
3644
|
return optionValue === value;
|
|
3680
3645
|
};
|
|
3681
|
-
return /* @__PURE__ */
|
|
3646
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles28.group, style] }, options.map((opt) => /* @__PURE__ */ React55__default.default.createElement(
|
|
3682
3647
|
Chip,
|
|
3683
3648
|
{
|
|
3684
3649
|
key: opt.value,
|
|
@@ -3686,12 +3651,12 @@ function ChipGroup({ options, value, onValueChange, multiSelect = false, style }
|
|
|
3686
3651
|
selected: isSelected2(opt.value),
|
|
3687
3652
|
onPress: opt.disabled ? void 0 : () => handlePress(opt.value),
|
|
3688
3653
|
iconName: opt.iconName,
|
|
3689
|
-
style: opt.disabled ?
|
|
3654
|
+
style: opt.disabled ? styles28.chipDisabled : void 0,
|
|
3690
3655
|
accessibilityLabel: opt.disabled ? `${opt.label}, no disponible` : opt.label
|
|
3691
3656
|
}
|
|
3692
3657
|
)));
|
|
3693
3658
|
}
|
|
3694
|
-
var
|
|
3659
|
+
var styles28 = reactNative.StyleSheet.create({
|
|
3695
3660
|
wrapper: {},
|
|
3696
3661
|
chip: {
|
|
3697
3662
|
borderRadius: RADIUS.full,
|
|
@@ -3734,30 +3699,15 @@ function ConfirmDialog({
|
|
|
3734
3699
|
loading = false,
|
|
3735
3700
|
showCloseButton = false,
|
|
3736
3701
|
onConfirm,
|
|
3737
|
-
onCancel
|
|
3702
|
+
onCancel,
|
|
3703
|
+
accessibilityHint
|
|
3738
3704
|
}) {
|
|
3739
3705
|
const { colors } = useTheme();
|
|
3740
3706
|
const insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
3741
|
-
const ref =
|
|
3742
|
-
const
|
|
3743
|
-
const
|
|
3744
|
-
|
|
3745
|
-
const handleDismiss = React54.useCallback(() => {
|
|
3746
|
-
isPresentedRef.current = false;
|
|
3747
|
-
onCancel();
|
|
3748
|
-
}, [onCancel]);
|
|
3749
|
-
React54.useEffect(() => {
|
|
3750
|
-
if (visible && !isPresentedRef.current) {
|
|
3751
|
-
impactMedium();
|
|
3752
|
-
ref.current?.present();
|
|
3753
|
-
wasOpened.current = true;
|
|
3754
|
-
isPresentedRef.current = true;
|
|
3755
|
-
} else if (!visible && wasOpened.current && isPresentedRef.current) {
|
|
3756
|
-
ref.current?.dismiss();
|
|
3757
|
-
}
|
|
3758
|
-
}, [visible]);
|
|
3759
|
-
const renderBackdrop = React54.useCallback(
|
|
3760
|
-
(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(
|
|
3761
3711
|
bottomSheet.BottomSheetBackdrop,
|
|
3762
3712
|
{
|
|
3763
3713
|
...props,
|
|
@@ -3768,7 +3718,7 @@ function ConfirmDialog({
|
|
|
3768
3718
|
),
|
|
3769
3719
|
[]
|
|
3770
3720
|
);
|
|
3771
|
-
return /* @__PURE__ */
|
|
3721
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
3772
3722
|
bottomSheet.BottomSheetModal,
|
|
3773
3723
|
{
|
|
3774
3724
|
ref,
|
|
@@ -3776,24 +3726,24 @@ function ConfirmDialog({
|
|
|
3776
3726
|
onDismiss: handleDismiss,
|
|
3777
3727
|
enableDynamicSizing: true,
|
|
3778
3728
|
backdropComponent: renderBackdrop,
|
|
3779
|
-
backgroundStyle: { ...
|
|
3780
|
-
handleIndicatorStyle: { ...
|
|
3729
|
+
backgroundStyle: { ...styles29.background, backgroundColor: colors.card },
|
|
3730
|
+
handleIndicatorStyle: { ...styles29.handle, backgroundColor: colors.border },
|
|
3781
3731
|
enablePanDownToClose: true,
|
|
3782
3732
|
topInset: insets.top
|
|
3783
3733
|
},
|
|
3784
|
-
/* @__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(
|
|
3785
3735
|
reactNative.TouchableOpacity,
|
|
3786
3736
|
{
|
|
3787
3737
|
onPress: onCancel,
|
|
3788
|
-
style:
|
|
3738
|
+
style: styles29.closeButton,
|
|
3789
3739
|
activeOpacity: 0.6,
|
|
3790
3740
|
touchSoundDisabled: true,
|
|
3791
3741
|
accessibilityRole: "button",
|
|
3792
3742
|
accessibilityLabel: "Cerrar",
|
|
3793
3743
|
hitSlop: { top: 12, bottom: 12, left: 12, right: 12 }
|
|
3794
3744
|
},
|
|
3795
|
-
/* @__PURE__ */
|
|
3796
|
-
) : 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(
|
|
3797
3747
|
Button,
|
|
3798
3748
|
{
|
|
3799
3749
|
label: confirmLabel,
|
|
@@ -3805,7 +3755,8 @@ function ConfirmDialog({
|
|
|
3805
3755
|
notificationSuccess();
|
|
3806
3756
|
onConfirm();
|
|
3807
3757
|
},
|
|
3808
|
-
|
|
3758
|
+
accessibilityHint,
|
|
3759
|
+
icon: /* @__PURE__ */ React55__default.default.createElement(
|
|
3809
3760
|
vectorIcons.Feather,
|
|
3810
3761
|
{
|
|
3811
3762
|
name: confirmVariant === "destructive" ? "trash-2" : "check",
|
|
@@ -3814,7 +3765,7 @@ function ConfirmDialog({
|
|
|
3814
3765
|
}
|
|
3815
3766
|
)
|
|
3816
3767
|
}
|
|
3817
|
-
), /* @__PURE__ */
|
|
3768
|
+
), /* @__PURE__ */ React55__default.default.createElement(
|
|
3818
3769
|
Button,
|
|
3819
3770
|
{
|
|
3820
3771
|
label: cancelLabel,
|
|
@@ -3824,12 +3775,12 @@ function ConfirmDialog({
|
|
|
3824
3775
|
selectionAsync();
|
|
3825
3776
|
onCancel();
|
|
3826
3777
|
},
|
|
3827
|
-
icon: /* @__PURE__ */
|
|
3778
|
+
icon: /* @__PURE__ */ React55__default.default.createElement(vectorIcons.Feather, { name: "x", size: 15, color: colors.foreground })
|
|
3828
3779
|
}
|
|
3829
3780
|
)))
|
|
3830
3781
|
);
|
|
3831
3782
|
}
|
|
3832
|
-
var
|
|
3783
|
+
var styles29 = reactNative.StyleSheet.create({
|
|
3833
3784
|
background: {
|
|
3834
3785
|
borderTopLeftRadius: ms(16),
|
|
3835
3786
|
borderTopRightRadius: ms(16)
|
|
@@ -3874,11 +3825,11 @@ var styles30 = reactNative.StyleSheet.create({
|
|
|
3874
3825
|
});
|
|
3875
3826
|
function LabelValueBase({ label, value, iconName, iconColor, style }) {
|
|
3876
3827
|
const { colors } = useTheme();
|
|
3877
|
-
const resolvedIcon = iconName ? /* @__PURE__ */
|
|
3878
|
-
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);
|
|
3879
3830
|
}
|
|
3880
|
-
var LabelValue =
|
|
3881
|
-
var
|
|
3831
|
+
var LabelValue = React55__default.default.memo(LabelValueBase);
|
|
3832
|
+
var styles30 = reactNative.StyleSheet.create({
|
|
3882
3833
|
container: {
|
|
3883
3834
|
flexDirection: "row",
|
|
3884
3835
|
justifyContent: "space-between",
|
|
@@ -3942,10 +3893,10 @@ function MonthPicker({ value, onChange, minValue, maxValue, locale = "en", forma
|
|
|
3942
3893
|
selectionAsync();
|
|
3943
3894
|
onChange(fromIndex(index + 1));
|
|
3944
3895
|
};
|
|
3945
|
-
return /* @__PURE__ */
|
|
3896
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles31.container, style], accessibilityRole: "adjustable", accessibilityLabel: getLabel() }, /* @__PURE__ */ React55__default.default.createElement(
|
|
3946
3897
|
reactNative.TouchableOpacity,
|
|
3947
3898
|
{
|
|
3948
|
-
style: [
|
|
3899
|
+
style: [styles31.arrow, prevDisabled && styles31.arrowDisabled],
|
|
3949
3900
|
onPress: handlePrev,
|
|
3950
3901
|
disabled: prevDisabled,
|
|
3951
3902
|
activeOpacity: 0.6,
|
|
@@ -3955,19 +3906,19 @@ function MonthPicker({ value, onChange, minValue, maxValue, locale = "en", forma
|
|
|
3955
3906
|
accessibilityState: { disabled: prevDisabled },
|
|
3956
3907
|
hitSlop: { top: 8, bottom: 8, left: 8, right: 8 }
|
|
3957
3908
|
},
|
|
3958
|
-
/* @__PURE__ */
|
|
3959
|
-
), /* @__PURE__ */
|
|
3909
|
+
/* @__PURE__ */ React55__default.default.createElement(vectorIcons.Entypo, { name: "chevron-left", size: 22, color: colors.foreground })
|
|
3910
|
+
), /* @__PURE__ */ React55__default.default.createElement(
|
|
3960
3911
|
reactNative.Text,
|
|
3961
3912
|
{
|
|
3962
|
-
style: [
|
|
3913
|
+
style: [styles31.label, { color: colors.foreground }],
|
|
3963
3914
|
allowFontScaling: true,
|
|
3964
3915
|
accessibilityLiveRegion: "polite"
|
|
3965
3916
|
},
|
|
3966
3917
|
getLabel()
|
|
3967
|
-
), /* @__PURE__ */
|
|
3918
|
+
), /* @__PURE__ */ React55__default.default.createElement(
|
|
3968
3919
|
reactNative.TouchableOpacity,
|
|
3969
3920
|
{
|
|
3970
|
-
style: [
|
|
3921
|
+
style: [styles31.arrow, nextDisabled && styles31.arrowDisabled],
|
|
3971
3922
|
onPress: handleNext,
|
|
3972
3923
|
disabled: nextDisabled,
|
|
3973
3924
|
activeOpacity: 0.6,
|
|
@@ -3977,10 +3928,10 @@ function MonthPicker({ value, onChange, minValue, maxValue, locale = "en", forma
|
|
|
3977
3928
|
accessibilityState: { disabled: nextDisabled },
|
|
3978
3929
|
hitSlop: { top: 8, bottom: 8, left: 8, right: 8 }
|
|
3979
3930
|
},
|
|
3980
|
-
/* @__PURE__ */
|
|
3931
|
+
/* @__PURE__ */ React55__default.default.createElement(vectorIcons.Entypo, { name: "chevron-right", size: 22, color: colors.foreground })
|
|
3981
3932
|
));
|
|
3982
3933
|
}
|
|
3983
|
-
var
|
|
3934
|
+
var styles31 = reactNative.StyleSheet.create({
|
|
3984
3935
|
container: {
|
|
3985
3936
|
flexDirection: "row",
|
|
3986
3937
|
alignItems: "center",
|
|
@@ -4003,6 +3954,39 @@ var styles32 = reactNative.StyleSheet.create({
|
|
|
4003
3954
|
minWidth: s(160)
|
|
4004
3955
|
}
|
|
4005
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
|
+
}
|
|
4006
3990
|
var aspectRatioMap2 = {
|
|
4007
3991
|
"1:1": 1,
|
|
4008
3992
|
"4:3": 3 / 4,
|
|
@@ -4034,19 +4018,19 @@ function MediaCardBase({
|
|
|
4034
4018
|
onPress();
|
|
4035
4019
|
};
|
|
4036
4020
|
const ratio = aspectRatioMap2[aspectRatio];
|
|
4037
|
-
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 });
|
|
4038
4022
|
const a11yLabel = accessibilityLabel ?? [title, subtitle].filter(Boolean).join(". ");
|
|
4039
|
-
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(
|
|
4040
4024
|
expoImage.Image,
|
|
4041
4025
|
{
|
|
4042
4026
|
source: imageSource,
|
|
4043
|
-
style:
|
|
4027
|
+
style: styles32.image,
|
|
4044
4028
|
contentFit: "cover"
|
|
4045
4029
|
}
|
|
4046
|
-
) : /* @__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(
|
|
4047
4031
|
reactNative.TouchableOpacity,
|
|
4048
4032
|
{
|
|
4049
|
-
style: [
|
|
4033
|
+
style: [styles32.actionButton, { backgroundColor: "rgba(0,0,0,0.24)" }],
|
|
4050
4034
|
onPress: (e) => {
|
|
4051
4035
|
e?.stopPropagation?.();
|
|
4052
4036
|
impactLight();
|
|
@@ -4059,9 +4043,9 @@ function MediaCardBase({
|
|
|
4059
4043
|
accessibilityState: { selected: actionActive }
|
|
4060
4044
|
},
|
|
4061
4045
|
resolvedActionIcon
|
|
4062
|
-
)), (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));
|
|
4063
4047
|
if (onPress) {
|
|
4064
|
-
return /* @__PURE__ */
|
|
4048
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
4065
4049
|
PressableCard,
|
|
4066
4050
|
{
|
|
4067
4051
|
onPress: handlePress,
|
|
@@ -4078,8 +4062,8 @@ function MediaCardBase({
|
|
|
4078
4062
|
}
|
|
4079
4063
|
return cardContent;
|
|
4080
4064
|
}
|
|
4081
|
-
var MediaCard =
|
|
4082
|
-
var
|
|
4065
|
+
var MediaCard = React55__default.default.memo(MediaCardBase);
|
|
4066
|
+
var styles32 = reactNative.StyleSheet.create({
|
|
4083
4067
|
card: {
|
|
4084
4068
|
borderRadius: RADIUS.md,
|
|
4085
4069
|
overflow: "hidden",
|
|
@@ -4133,15 +4117,15 @@ var styles33 = reactNative.StyleSheet.create({
|
|
|
4133
4117
|
lineHeight: mvs(16)
|
|
4134
4118
|
}
|
|
4135
4119
|
});
|
|
4136
|
-
var CategoryChip =
|
|
4120
|
+
var CategoryChip = React55__default.default.memo(function CategoryChip2({
|
|
4137
4121
|
item,
|
|
4138
4122
|
selected,
|
|
4139
4123
|
onSelect
|
|
4140
4124
|
}) {
|
|
4141
4125
|
const { colors } = useTheme();
|
|
4142
4126
|
const iconColor = selected ? colors.primaryForeground : colors.foregroundSubtle;
|
|
4143
|
-
const resolvedIcon = typeof item.icon === "string" ? /* @__PURE__ */
|
|
4144
|
-
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(
|
|
4145
4129
|
PressableChip,
|
|
4146
4130
|
{
|
|
4147
4131
|
onPress: () => onSelect(item.value),
|
|
@@ -4153,26 +4137,26 @@ var CategoryChip = React54__default.default.memo(function CategoryChip2({
|
|
|
4153
4137
|
accessibilityLabel: item.label,
|
|
4154
4138
|
accessibilityState: { selected }
|
|
4155
4139
|
},
|
|
4156
|
-
/* @__PURE__ */
|
|
4140
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
4157
4141
|
reactNativeEase.EaseView,
|
|
4158
4142
|
{
|
|
4159
|
-
style:
|
|
4143
|
+
style: styles33.chip,
|
|
4160
4144
|
animate: {
|
|
4161
4145
|
backgroundColor: selected ? colors.primary : colors.surface,
|
|
4162
4146
|
borderColor: selected ? colors.primary : colors.border
|
|
4163
4147
|
},
|
|
4164
4148
|
transition: COLOR_TRANSITION
|
|
4165
4149
|
},
|
|
4166
|
-
resolvedIcon && /* @__PURE__ */
|
|
4167
|
-
/* @__PURE__ */
|
|
4150
|
+
resolvedIcon && /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles33.chipIcon }, resolvedIcon),
|
|
4151
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
4168
4152
|
reactNative.Text,
|
|
4169
4153
|
{
|
|
4170
|
-
style: [
|
|
4154
|
+
style: [styles33.chipLabel, { color: selected ? colors.primaryForeground : colors.foregroundSubtle }],
|
|
4171
4155
|
allowFontScaling: true
|
|
4172
4156
|
},
|
|
4173
4157
|
item.label
|
|
4174
4158
|
),
|
|
4175
|
-
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)))
|
|
4176
4160
|
)
|
|
4177
4161
|
);
|
|
4178
4162
|
});
|
|
@@ -4186,7 +4170,7 @@ function CategoryStrip({
|
|
|
4186
4170
|
accessibilityLabel
|
|
4187
4171
|
}) {
|
|
4188
4172
|
const selected = Array.isArray(value) ? value : value ? [value] : [];
|
|
4189
|
-
const handlePress =
|
|
4173
|
+
const handlePress = React55.useCallback(
|
|
4190
4174
|
(v) => {
|
|
4191
4175
|
selectionAsync();
|
|
4192
4176
|
if (multiSelect) {
|
|
@@ -4199,17 +4183,17 @@ function CategoryStrip({
|
|
|
4199
4183
|
},
|
|
4200
4184
|
[multiSelect, value, onValueChange]
|
|
4201
4185
|
);
|
|
4202
|
-
return /* @__PURE__ */
|
|
4186
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
4203
4187
|
reactNative.ScrollView,
|
|
4204
4188
|
{
|
|
4205
4189
|
horizontal: true,
|
|
4206
4190
|
showsHorizontalScrollIndicator: false,
|
|
4207
|
-
contentContainerStyle: [
|
|
4208
|
-
style:
|
|
4191
|
+
contentContainerStyle: [styles33.container, style],
|
|
4192
|
+
style: styles33.scroll,
|
|
4209
4193
|
accessibilityRole: multiSelect ? void 0 : "radiogroup",
|
|
4210
4194
|
accessibilityLabel
|
|
4211
4195
|
},
|
|
4212
|
-
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(
|
|
4213
4197
|
CategoryChip,
|
|
4214
4198
|
{
|
|
4215
4199
|
item: cat,
|
|
@@ -4219,7 +4203,7 @@ function CategoryStrip({
|
|
|
4219
4203
|
)))
|
|
4220
4204
|
);
|
|
4221
4205
|
}
|
|
4222
|
-
var
|
|
4206
|
+
var styles33 = reactNative.StyleSheet.create({
|
|
4223
4207
|
scroll: {
|
|
4224
4208
|
flexGrow: 0
|
|
4225
4209
|
},
|
|
@@ -4260,39 +4244,6 @@ var styles34 = reactNative.StyleSheet.create({
|
|
|
4260
4244
|
lineHeight: 14
|
|
4261
4245
|
}
|
|
4262
4246
|
});
|
|
4263
|
-
function Pressable({
|
|
4264
|
-
children,
|
|
4265
|
-
onPress,
|
|
4266
|
-
pressScale: _pressScale = PRESS_SCALE.card,
|
|
4267
|
-
haptics = true,
|
|
4268
|
-
style,
|
|
4269
|
-
disabled,
|
|
4270
|
-
hoverScale: _hoverScale = 1.02,
|
|
4271
|
-
accessibilityRole,
|
|
4272
|
-
accessibilityState,
|
|
4273
|
-
accessibilityLabel
|
|
4274
|
-
}) {
|
|
4275
|
-
const handlePress = () => {
|
|
4276
|
-
if (disabled || !onPress) return;
|
|
4277
|
-
if (haptics) impactLight();
|
|
4278
|
-
onPress();
|
|
4279
|
-
};
|
|
4280
|
-
return /* @__PURE__ */ React54__default.default.createElement(
|
|
4281
|
-
PressableCard,
|
|
4282
|
-
{
|
|
4283
|
-
style,
|
|
4284
|
-
onPress: handlePress,
|
|
4285
|
-
enabled: !disabled,
|
|
4286
|
-
rippleColor: "transparent",
|
|
4287
|
-
touchSoundDisabled: true,
|
|
4288
|
-
activateOnHover: true,
|
|
4289
|
-
accessibilityRole: accessibilityRole ?? "button",
|
|
4290
|
-
accessibilityState: accessibilityState ?? { disabled: !!disabled },
|
|
4291
|
-
accessibilityLabel
|
|
4292
|
-
},
|
|
4293
|
-
children
|
|
4294
|
-
);
|
|
4295
|
-
}
|
|
4296
4247
|
var weightMap = {
|
|
4297
4248
|
normal: "Sohne-Regular",
|
|
4298
4249
|
medium: "Sohne-Medium",
|
|
@@ -4315,8 +4266,8 @@ function DetailRowBase({
|
|
|
4315
4266
|
valueStyle
|
|
4316
4267
|
}) {
|
|
4317
4268
|
const { colors } = useTheme();
|
|
4318
|
-
const resolvedLeftIcon = leftIconName ? /* @__PURE__ */
|
|
4319
|
-
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;
|
|
4320
4271
|
const separatorStyle = separator === "none" ? null : {
|
|
4321
4272
|
flex: 1,
|
|
4322
4273
|
height: 1,
|
|
@@ -4325,24 +4276,24 @@ function DetailRowBase({
|
|
|
4325
4276
|
borderColor: "rgba(128,128,128,0.3)",
|
|
4326
4277
|
marginHorizontal: s(4)
|
|
4327
4278
|
};
|
|
4328
|
-
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(
|
|
4329
4280
|
reactNative.Text,
|
|
4330
4281
|
{
|
|
4331
|
-
style: [
|
|
4282
|
+
style: [styles34.labelText, { color: colors.foregroundMuted, fontFamily: weightMap[labelWeight] }, labelStyle],
|
|
4332
4283
|
allowFontScaling: true
|
|
4333
4284
|
},
|
|
4334
4285
|
label
|
|
4335
|
-
) : 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(
|
|
4336
4287
|
reactNative.Text,
|
|
4337
4288
|
{
|
|
4338
|
-
style: [
|
|
4289
|
+
style: [styles34.valueText, { color: valueColor ?? colors.foreground }, valueStyle],
|
|
4339
4290
|
allowFontScaling: true
|
|
4340
4291
|
},
|
|
4341
4292
|
value
|
|
4342
|
-
) : value, resolvedRightIcon ? /* @__PURE__ */
|
|
4293
|
+
) : value, resolvedRightIcon ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles34.icon }, resolvedRightIcon) : null));
|
|
4343
4294
|
}
|
|
4344
|
-
var DetailRow =
|
|
4345
|
-
var
|
|
4295
|
+
var DetailRow = React55__default.default.memo(DetailRowBase);
|
|
4296
|
+
var styles34 = reactNative.StyleSheet.create({
|
|
4346
4297
|
row: {
|
|
4347
4298
|
flexDirection: "row",
|
|
4348
4299
|
alignItems: "center",
|
|
@@ -4378,7 +4329,7 @@ var styles35 = reactNative.StyleSheet.create({
|
|
|
4378
4329
|
}
|
|
4379
4330
|
});
|
|
4380
4331
|
function Form({ children, style }) {
|
|
4381
|
-
return /* @__PURE__ */
|
|
4332
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles35.form, style] }, children);
|
|
4382
4333
|
}
|
|
4383
4334
|
function FormField({
|
|
4384
4335
|
children,
|
|
@@ -4390,19 +4341,19 @@ function FormField({
|
|
|
4390
4341
|
errorStyle
|
|
4391
4342
|
}) {
|
|
4392
4343
|
const { colors } = useTheme();
|
|
4393
|
-
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);
|
|
4394
4345
|
}
|
|
4395
4346
|
function FormSection({ children, title, description, style }) {
|
|
4396
4347
|
const { colors } = useTheme();
|
|
4397
|
-
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);
|
|
4398
4349
|
}
|
|
4399
4350
|
function FormFooter({ children, style }) {
|
|
4400
|
-
return /* @__PURE__ */
|
|
4351
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles35.footer, style] }, children);
|
|
4401
4352
|
}
|
|
4402
4353
|
Form.Field = FormField;
|
|
4403
4354
|
Form.Section = FormSection;
|
|
4404
4355
|
Form.Footer = FormFooter;
|
|
4405
|
-
var
|
|
4356
|
+
var styles35 = reactNative.StyleSheet.create({
|
|
4406
4357
|
form: {
|
|
4407
4358
|
gap: vs(16)
|
|
4408
4359
|
},
|
|
@@ -4442,9 +4393,9 @@ var styles36 = reactNative.StyleSheet.create({
|
|
|
4442
4393
|
}
|
|
4443
4394
|
});
|
|
4444
4395
|
function RetrayProvider({ children, theme, colorScheme = "system" }) {
|
|
4445
|
-
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)))));
|
|
4446
4397
|
}
|
|
4447
|
-
var
|
|
4398
|
+
var styles36 = reactNative.StyleSheet.create({
|
|
4448
4399
|
root: { flex: 1 }
|
|
4449
4400
|
});
|
|
4450
4401
|
function DefaultErrorFallback({
|
|
@@ -4454,10 +4405,10 @@ function DefaultErrorFallback({
|
|
|
4454
4405
|
message
|
|
4455
4406
|
}) {
|
|
4456
4407
|
const { colors } = useTheme();
|
|
4457
|
-
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(
|
|
4458
4409
|
reactNative.TouchableOpacity,
|
|
4459
4410
|
{
|
|
4460
|
-
style: [
|
|
4411
|
+
style: [styles37.button, { backgroundColor: colors.primary }],
|
|
4461
4412
|
onPress: () => {
|
|
4462
4413
|
impactLight();
|
|
4463
4414
|
reset();
|
|
@@ -4467,10 +4418,10 @@ function DefaultErrorFallback({
|
|
|
4467
4418
|
accessibilityRole: "button",
|
|
4468
4419
|
accessibilityLabel: "Intentar de nuevo"
|
|
4469
4420
|
},
|
|
4470
|
-
/* @__PURE__ */
|
|
4421
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles37.buttonLabel, { color: colors.primaryForeground }], allowFontScaling: true }, "Intentar de nuevo")
|
|
4471
4422
|
));
|
|
4472
4423
|
}
|
|
4473
|
-
var ErrorBoundary = class extends
|
|
4424
|
+
var ErrorBoundary = class extends React55__default.default.Component {
|
|
4474
4425
|
constructor() {
|
|
4475
4426
|
super(...arguments);
|
|
4476
4427
|
this.state = { error: null };
|
|
@@ -4488,18 +4439,19 @@ var ErrorBoundary = class extends React54__default.default.Component {
|
|
|
4488
4439
|
const { error } = this.state;
|
|
4489
4440
|
if (error) {
|
|
4490
4441
|
const { fallback, title, message } = this.props;
|
|
4442
|
+
const componentStack = error.stack ?? "";
|
|
4491
4443
|
if (typeof fallback === "function") {
|
|
4492
|
-
return fallback({ error, reset: this.reset });
|
|
4444
|
+
return fallback({ error, componentStack, reset: this.reset });
|
|
4493
4445
|
}
|
|
4494
4446
|
if (fallback !== void 0) {
|
|
4495
4447
|
return fallback;
|
|
4496
4448
|
}
|
|
4497
|
-
return /* @__PURE__ */
|
|
4449
|
+
return /* @__PURE__ */ React55__default.default.createElement(DefaultErrorFallback, { error, componentStack, reset: this.reset, title, message });
|
|
4498
4450
|
}
|
|
4499
4451
|
return this.props.children;
|
|
4500
4452
|
}
|
|
4501
4453
|
};
|
|
4502
|
-
var
|
|
4454
|
+
var styles37 = reactNative.StyleSheet.create({
|
|
4503
4455
|
container: {
|
|
4504
4456
|
flex: 1,
|
|
4505
4457
|
alignItems: "center",
|
|
@@ -4543,20 +4495,20 @@ var styles38 = reactNative.StyleSheet.create({
|
|
|
4543
4495
|
});
|
|
4544
4496
|
function Dot({ active, size, activeColor, inactiveColor, onPress, index, total }) {
|
|
4545
4497
|
const progress = Animated6.useSharedValue(active ? 1 : 0);
|
|
4546
|
-
|
|
4498
|
+
React55.useEffect(() => {
|
|
4547
4499
|
progress.value = Animated6.withSpring(active ? 1 : 0, SPRINGS.glide);
|
|
4548
4500
|
}, [active, progress]);
|
|
4549
4501
|
const animatedStyle = Animated6.useAnimatedStyle(() => ({
|
|
4550
4502
|
width: size + progress.value * size,
|
|
4551
4503
|
backgroundColor: Animated6.interpolateColor(progress.value, [0, 1], [inactiveColor, activeColor])
|
|
4552
4504
|
}));
|
|
4553
|
-
const dot = /* @__PURE__ */
|
|
4505
|
+
const dot = /* @__PURE__ */ React55__default.default.createElement(Animated6__default.default.View, { style: [{ height: size, borderRadius: size / 2 }, animatedStyle] });
|
|
4554
4506
|
if (!onPress) return dot;
|
|
4555
4507
|
const handlePress = () => {
|
|
4556
4508
|
selectionAsync();
|
|
4557
4509
|
onPress();
|
|
4558
4510
|
};
|
|
4559
|
-
return /* @__PURE__ */
|
|
4511
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
4560
4512
|
PressableButton,
|
|
4561
4513
|
{
|
|
4562
4514
|
onPress: handlePress,
|
|
@@ -4565,7 +4517,7 @@ function Dot({ active, size, activeColor, inactiveColor, onPress, index, total }
|
|
|
4565
4517
|
accessibilityRole: "button",
|
|
4566
4518
|
accessibilityLabel: `P\xE1gina ${index + 1} de ${total}${active ? ", p\xE1gina actual" : ""}`,
|
|
4567
4519
|
hitSlop: { top: 10, bottom: 10, left: 18, right: 18 },
|
|
4568
|
-
style:
|
|
4520
|
+
style: styles38.dotTouchable
|
|
4569
4521
|
},
|
|
4570
4522
|
dot
|
|
4571
4523
|
);
|
|
@@ -4606,14 +4558,14 @@ function PagerDots({
|
|
|
4606
4558
|
onDotPress(activeIndex + 1);
|
|
4607
4559
|
}
|
|
4608
4560
|
};
|
|
4609
|
-
return /* @__PURE__ */
|
|
4561
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
4610
4562
|
reactNative.View,
|
|
4611
4563
|
{
|
|
4612
|
-
style: [
|
|
4564
|
+
style: [styles38.container, { gap: s(spacing) }, style],
|
|
4613
4565
|
accessibilityRole: "adjustable",
|
|
4614
4566
|
accessibilityLabel: `P\xE1gina ${activeIndex + 1} de ${count}`
|
|
4615
4567
|
},
|
|
4616
|
-
hasControls && /* @__PURE__ */
|
|
4568
|
+
hasControls && /* @__PURE__ */ React55__default.default.createElement(
|
|
4617
4569
|
PressableButton,
|
|
4618
4570
|
{
|
|
4619
4571
|
onPress: handlePrevious,
|
|
@@ -4623,11 +4575,11 @@ function PagerDots({
|
|
|
4623
4575
|
accessibilityRole: "button",
|
|
4624
4576
|
accessibilityLabel: "P\xE1gina anterior",
|
|
4625
4577
|
hitSlop: { top: 10, bottom: 10, left: 10, right: 10 },
|
|
4626
|
-
style: [
|
|
4578
|
+
style: [styles38.controlBtn, !canGoPrev && styles38.controlBtnDisabled]
|
|
4627
4579
|
},
|
|
4628
|
-
/* @__PURE__ */
|
|
4580
|
+
/* @__PURE__ */ React55__default.default.createElement(Icon, { name: "chevron-left", size: s(18), color: canGoPrev ? colors.foreground : colors.foregroundMuted })
|
|
4629
4581
|
),
|
|
4630
|
-
/* @__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(
|
|
4631
4583
|
Dot,
|
|
4632
4584
|
{
|
|
4633
4585
|
key: i,
|
|
@@ -4640,7 +4592,7 @@ function PagerDots({
|
|
|
4640
4592
|
onPress: onDotPress ? () => onDotPress(i) : void 0
|
|
4641
4593
|
}
|
|
4642
4594
|
))),
|
|
4643
|
-
hasControls && /* @__PURE__ */
|
|
4595
|
+
hasControls && /* @__PURE__ */ React55__default.default.createElement(
|
|
4644
4596
|
PressableButton,
|
|
4645
4597
|
{
|
|
4646
4598
|
onPress: handleNext,
|
|
@@ -4650,13 +4602,13 @@ function PagerDots({
|
|
|
4650
4602
|
accessibilityRole: "button",
|
|
4651
4603
|
accessibilityLabel: "P\xE1gina siguiente",
|
|
4652
4604
|
hitSlop: { top: 10, bottom: 10, left: 10, right: 10 },
|
|
4653
|
-
style: [
|
|
4605
|
+
style: [styles38.controlBtn, !canGoNext && styles38.controlBtnDisabled]
|
|
4654
4606
|
},
|
|
4655
|
-
/* @__PURE__ */
|
|
4607
|
+
/* @__PURE__ */ React55__default.default.createElement(Icon, { name: "chevron-right", size: s(18), color: canGoNext ? colors.foreground : colors.foregroundMuted })
|
|
4656
4608
|
)
|
|
4657
4609
|
);
|
|
4658
4610
|
}
|
|
4659
|
-
var
|
|
4611
|
+
var styles38 = reactNative.StyleSheet.create({
|
|
4660
4612
|
container: {
|
|
4661
4613
|
flexDirection: "row",
|
|
4662
4614
|
alignItems: "center",
|
|
@@ -4686,6 +4638,7 @@ function AppHeader({
|
|
|
4686
4638
|
subtitle,
|
|
4687
4639
|
onBack,
|
|
4688
4640
|
backIconName = "chevron-left",
|
|
4641
|
+
iconName,
|
|
4689
4642
|
left,
|
|
4690
4643
|
right,
|
|
4691
4644
|
titleAlign = "auto",
|
|
@@ -4699,7 +4652,7 @@ function AppHeader({
|
|
|
4699
4652
|
const { width } = reactNative.useWindowDimensions();
|
|
4700
4653
|
const isWide = width >= BREAKPOINTS.wide;
|
|
4701
4654
|
const centered = titleAlign === "center" || titleAlign === "auto" && isWide;
|
|
4702
|
-
const leftNode = left ?? (onBack ? /* @__PURE__ */
|
|
4655
|
+
const leftNode = left ?? /* @__PURE__ */ React55__default.default.createElement(React55__default.default.Fragment, null, onBack ? /* @__PURE__ */ React55__default.default.createElement(
|
|
4703
4656
|
IconButton,
|
|
4704
4657
|
{
|
|
4705
4658
|
iconName: backIconName,
|
|
@@ -4708,30 +4661,30 @@ function AppHeader({
|
|
|
4708
4661
|
onPress: onBack,
|
|
4709
4662
|
accessibilityLabel: "Atr\xE1s"
|
|
4710
4663
|
}
|
|
4711
|
-
) : null);
|
|
4712
|
-
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(
|
|
4713
4666
|
reactNative.Text,
|
|
4714
4667
|
{
|
|
4715
|
-
style: [
|
|
4668
|
+
style: [styles39.title, { color: colors.foreground }, centered && styles39.textCentered],
|
|
4716
4669
|
numberOfLines: 1,
|
|
4717
4670
|
allowFontScaling: true,
|
|
4718
4671
|
accessibilityRole: "header"
|
|
4719
4672
|
},
|
|
4720
4673
|
title
|
|
4721
|
-
) : null, subtitle ? /* @__PURE__ */
|
|
4674
|
+
) : null, subtitle ? /* @__PURE__ */ React55__default.default.createElement(
|
|
4722
4675
|
reactNative.Text,
|
|
4723
4676
|
{
|
|
4724
|
-
style: [
|
|
4677
|
+
style: [styles39.subtitle, { color: colors.foregroundMuted }, centered && styles39.textCentered],
|
|
4725
4678
|
numberOfLines: 1,
|
|
4726
4679
|
allowFontScaling: true
|
|
4727
4680
|
},
|
|
4728
4681
|
subtitle
|
|
4729
4682
|
) : null);
|
|
4730
|
-
return /* @__PURE__ */
|
|
4683
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
4731
4684
|
reactNative.View,
|
|
4732
4685
|
{
|
|
4733
4686
|
style: [
|
|
4734
|
-
|
|
4687
|
+
styles39.container,
|
|
4735
4688
|
{
|
|
4736
4689
|
backgroundColor: backgroundColor ?? colors.background,
|
|
4737
4690
|
paddingTop: withSafeArea ? insets.top : 0,
|
|
@@ -4741,10 +4694,10 @@ function AppHeader({
|
|
|
4741
4694
|
style
|
|
4742
4695
|
]
|
|
4743
4696
|
},
|
|
4744
|
-
/* @__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)))
|
|
4745
4698
|
);
|
|
4746
4699
|
}
|
|
4747
|
-
var
|
|
4700
|
+
var styles39 = reactNative.StyleSheet.create({
|
|
4748
4701
|
container: {
|
|
4749
4702
|
width: "100%"
|
|
4750
4703
|
},
|
|
@@ -4758,10 +4711,13 @@ var styles40 = reactNative.StyleSheet.create({
|
|
|
4758
4711
|
minWidth: s(44),
|
|
4759
4712
|
flexDirection: "row",
|
|
4760
4713
|
alignItems: "center",
|
|
4761
|
-
justifyContent: "flex-start"
|
|
4714
|
+
justifyContent: "flex-start",
|
|
4715
|
+
paddingLeft: s(8),
|
|
4716
|
+
gap: s(4)
|
|
4762
4717
|
},
|
|
4763
4718
|
sideRight: {
|
|
4764
|
-
justifyContent: "flex-end"
|
|
4719
|
+
justifyContent: "flex-end",
|
|
4720
|
+
paddingRight: s(8)
|
|
4765
4721
|
},
|
|
4766
4722
|
titleBlock: {
|
|
4767
4723
|
flex: 1,
|
|
@@ -4782,6 +4738,12 @@ var styles40 = reactNative.StyleSheet.create({
|
|
|
4782
4738
|
fontSize: ms(13),
|
|
4783
4739
|
lineHeight: mvs(16)
|
|
4784
4740
|
},
|
|
4741
|
+
iconSlot: {
|
|
4742
|
+
width: s(44),
|
|
4743
|
+
height: s(44),
|
|
4744
|
+
alignItems: "center",
|
|
4745
|
+
justifyContent: "center"
|
|
4746
|
+
},
|
|
4785
4747
|
textCentered: {
|
|
4786
4748
|
textAlign: "center"
|
|
4787
4749
|
}
|
|
@@ -4792,9 +4754,11 @@ function isSelected(value, candidate) {
|
|
|
4792
4754
|
}
|
|
4793
4755
|
function Cell({ item, selected, width, onPress }) {
|
|
4794
4756
|
const { colors } = useTheme();
|
|
4757
|
+
const hasImage = !!item.imageUrl;
|
|
4795
4758
|
const iconColor = selected ? colors.primary : colors.foregroundSubtle;
|
|
4796
|
-
const iconNode = item.icon ?? (item.iconName ? /* @__PURE__ */
|
|
4797
|
-
|
|
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(
|
|
4798
4762
|
PressableChip,
|
|
4799
4763
|
{
|
|
4800
4764
|
onPress,
|
|
@@ -4804,27 +4768,44 @@ function Cell({ item, selected, width, onPress }) {
|
|
|
4804
4768
|
activateOnHover: true,
|
|
4805
4769
|
accessibilityRole: "button",
|
|
4806
4770
|
accessibilityState: { selected, disabled: item.disabled },
|
|
4807
|
-
accessibilityLabel: item.label ?? String(item.value)
|
|
4808
|
-
style: [
|
|
4809
|
-
{ width },
|
|
4810
|
-
styles41.cell,
|
|
4811
|
-
{
|
|
4812
|
-
backgroundColor: selected ? colors.primary + "14" : colors.surface,
|
|
4813
|
-
borderColor: selected ? colors.primary : "transparent"
|
|
4814
|
-
},
|
|
4815
|
-
item.disabled && styles41.cellDisabled
|
|
4816
|
-
]
|
|
4771
|
+
accessibilityLabel: item.label ?? String(item.value)
|
|
4817
4772
|
},
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
reactNative.Text,
|
|
4773
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
4774
|
+
reactNative.View,
|
|
4821
4775
|
{
|
|
4822
|
-
style: [
|
|
4823
|
-
|
|
4824
|
-
|
|
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
|
+
]
|
|
4825
4785
|
},
|
|
4826
|
-
|
|
4827
|
-
|
|
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
|
+
)
|
|
4828
4809
|
);
|
|
4829
4810
|
}
|
|
4830
4811
|
function SelectableGrid({
|
|
@@ -4837,7 +4818,7 @@ function SelectableGrid({
|
|
|
4837
4818
|
orientation = "grid",
|
|
4838
4819
|
style
|
|
4839
4820
|
}) {
|
|
4840
|
-
const [containerWidth, setContainerWidth] =
|
|
4821
|
+
const [containerWidth, setContainerWidth] = React55.useState(0);
|
|
4841
4822
|
const gapPx = s(gap);
|
|
4842
4823
|
const cellWidth = containerWidth > 0 ? (containerWidth - gapPx * (numColumns - 1)) / numColumns - 0.5 : 0;
|
|
4843
4824
|
const horizCellWidth = s(72);
|
|
@@ -4847,15 +4828,15 @@ function SelectableGrid({
|
|
|
4847
4828
|
onChange(item.value);
|
|
4848
4829
|
};
|
|
4849
4830
|
if (orientation === "horizontal") {
|
|
4850
|
-
return /* @__PURE__ */
|
|
4831
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
4851
4832
|
reactNative.ScrollView,
|
|
4852
4833
|
{
|
|
4853
4834
|
horizontal: true,
|
|
4854
4835
|
showsHorizontalScrollIndicator: false,
|
|
4855
|
-
contentContainerStyle: [
|
|
4836
|
+
contentContainerStyle: [styles40.horizontal, { gap: gapPx }, style],
|
|
4856
4837
|
accessibilityRole: multiple ? void 0 : "radiogroup"
|
|
4857
4838
|
},
|
|
4858
|
-
items.map((item) => /* @__PURE__ */
|
|
4839
|
+
items.map((item) => /* @__PURE__ */ React55__default.default.createElement(
|
|
4859
4840
|
Cell,
|
|
4860
4841
|
{
|
|
4861
4842
|
key: String(item.value),
|
|
@@ -4867,14 +4848,14 @@ function SelectableGrid({
|
|
|
4867
4848
|
))
|
|
4868
4849
|
);
|
|
4869
4850
|
}
|
|
4870
|
-
return /* @__PURE__ */
|
|
4851
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
4871
4852
|
reactNative.View,
|
|
4872
4853
|
{
|
|
4873
|
-
style: [
|
|
4854
|
+
style: [styles40.grid, { gap: gapPx }, style],
|
|
4874
4855
|
onLayout: (e) => setContainerWidth(e.nativeEvent.layout.width),
|
|
4875
4856
|
accessibilityRole: multiple ? void 0 : "radiogroup"
|
|
4876
4857
|
},
|
|
4877
|
-
cellWidth > 0 ? items.map((item) => /* @__PURE__ */
|
|
4858
|
+
cellWidth > 0 ? items.map((item) => /* @__PURE__ */ React55__default.default.createElement(
|
|
4878
4859
|
Cell,
|
|
4879
4860
|
{
|
|
4880
4861
|
key: String(item.value),
|
|
@@ -4886,7 +4867,7 @@ function SelectableGrid({
|
|
|
4886
4867
|
)) : null
|
|
4887
4868
|
);
|
|
4888
4869
|
}
|
|
4889
|
-
var
|
|
4870
|
+
var styles40 = reactNative.StyleSheet.create({
|
|
4890
4871
|
grid: {
|
|
4891
4872
|
flexDirection: "row",
|
|
4892
4873
|
flexWrap: "wrap"
|
|
@@ -4904,6 +4885,13 @@ var styles41 = reactNative.StyleSheet.create({
|
|
|
4904
4885
|
paddingHorizontal: s(8),
|
|
4905
4886
|
paddingVertical: vs(10)
|
|
4906
4887
|
},
|
|
4888
|
+
cellImage: {
|
|
4889
|
+
padding: 0,
|
|
4890
|
+
gap: 0,
|
|
4891
|
+
overflow: "hidden",
|
|
4892
|
+
alignItems: "stretch",
|
|
4893
|
+
justifyContent: "flex-start"
|
|
4894
|
+
},
|
|
4907
4895
|
cellDisabled: {
|
|
4908
4896
|
opacity: 0.4
|
|
4909
4897
|
},
|
|
@@ -4912,9 +4900,14 @@ var styles41 = reactNative.StyleSheet.create({
|
|
|
4912
4900
|
fontSize: ms(11),
|
|
4913
4901
|
lineHeight: mvs(14),
|
|
4914
4902
|
textAlign: "center"
|
|
4903
|
+
},
|
|
4904
|
+
labelImage: {
|
|
4905
|
+
paddingHorizontal: s(6),
|
|
4906
|
+
paddingBottom: vs(6),
|
|
4907
|
+
paddingTop: vs(3)
|
|
4915
4908
|
}
|
|
4916
4909
|
});
|
|
4917
|
-
var SelectableCardContext =
|
|
4910
|
+
var SelectableCardContext = React55.createContext(null);
|
|
4918
4911
|
function SelectableCardGroup({
|
|
4919
4912
|
type,
|
|
4920
4913
|
value,
|
|
@@ -4924,7 +4917,7 @@ function SelectableCardGroup({
|
|
|
4924
4917
|
style,
|
|
4925
4918
|
children
|
|
4926
4919
|
}) {
|
|
4927
|
-
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));
|
|
4928
4921
|
}
|
|
4929
4922
|
function SelectableCard({
|
|
4930
4923
|
value,
|
|
@@ -4935,7 +4928,7 @@ function SelectableCard({
|
|
|
4935
4928
|
disabled = false,
|
|
4936
4929
|
style
|
|
4937
4930
|
}) {
|
|
4938
|
-
const ctx =
|
|
4931
|
+
const ctx = React55.useContext(SelectableCardContext);
|
|
4939
4932
|
if (!ctx) {
|
|
4940
4933
|
throw new Error("SelectableCard must be used inside <SelectableCard.Group>");
|
|
4941
4934
|
}
|
|
@@ -4998,9 +4991,9 @@ function SelectableCard({
|
|
|
4998
4991
|
}
|
|
4999
4992
|
return base;
|
|
5000
4993
|
})();
|
|
5001
|
-
const resolvedIcon = iconName ? /* @__PURE__ */
|
|
5002
|
-
const resolvedIconElement = resolvedIcon ? /* @__PURE__ */
|
|
5003
|
-
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(
|
|
5004
4997
|
reactNative.Pressable,
|
|
5005
4998
|
{
|
|
5006
4999
|
onPress: handlePress,
|
|
@@ -5009,20 +5002,20 @@ function SelectableCard({
|
|
|
5009
5002
|
accessibilityLabel: `${title}${description ? `, ${description}` : ""}`,
|
|
5010
5003
|
accessibilityState: { selected: isSelected2, disabled },
|
|
5011
5004
|
style: [
|
|
5012
|
-
|
|
5005
|
+
styles41.card,
|
|
5013
5006
|
variantStyle,
|
|
5014
|
-
isSelected2 && !disabled &&
|
|
5007
|
+
isSelected2 && !disabled && styles41.cardSelected,
|
|
5015
5008
|
style
|
|
5016
5009
|
]
|
|
5017
5010
|
},
|
|
5018
|
-
/* @__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(
|
|
5019
5012
|
reactNativeEase.EaseView,
|
|
5020
5013
|
{
|
|
5021
|
-
style:
|
|
5014
|
+
style: styles41.radioCircle,
|
|
5022
5015
|
animate: { borderColor: !disabled && isSelected2 ? colors.primary : colors.border },
|
|
5023
5016
|
transition: COLOR_TRANSITION
|
|
5024
5017
|
},
|
|
5025
|
-
/* @__PURE__ */
|
|
5018
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
5026
5019
|
reactNativeEase.EaseView,
|
|
5027
5020
|
{
|
|
5028
5021
|
animate: {
|
|
@@ -5031,38 +5024,38 @@ function SelectableCard({
|
|
|
5031
5024
|
},
|
|
5032
5025
|
transition: SPRING_ELASTIC
|
|
5033
5026
|
},
|
|
5034
|
-
/* @__PURE__ */
|
|
5027
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles41.radioDot, { backgroundColor: colors.primary }] })
|
|
5035
5028
|
)
|
|
5036
|
-
) : /* @__PURE__ */
|
|
5029
|
+
) : /* @__PURE__ */ React55__default.default.createElement(
|
|
5037
5030
|
reactNativeEase.EaseView,
|
|
5038
5031
|
{
|
|
5039
|
-
style:
|
|
5032
|
+
style: styles41.checkboxBox,
|
|
5040
5033
|
animate: {
|
|
5041
5034
|
borderColor: !disabled && isSelected2 ? colors.primary : colors.border,
|
|
5042
5035
|
backgroundColor: !disabled && isSelected2 ? colors.primary : "transparent"
|
|
5043
5036
|
},
|
|
5044
5037
|
transition: COLOR_TRANSITION
|
|
5045
5038
|
},
|
|
5046
|
-
/* @__PURE__ */
|
|
5039
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
5047
5040
|
reactNativeEase.EaseView,
|
|
5048
5041
|
{
|
|
5049
5042
|
animate: { opacity: !disabled && isSelected2 ? 1 : 0 },
|
|
5050
5043
|
transition: OPACITY_TRANSITION
|
|
5051
5044
|
},
|
|
5052
|
-
/* @__PURE__ */
|
|
5045
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles41.checkmark, { borderColor: colors.primaryForeground }] })
|
|
5053
5046
|
)
|
|
5054
|
-
)), resolvedIconElement, /* @__PURE__ */
|
|
5047
|
+
)), resolvedIconElement, /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles41.textArea }, /* @__PURE__ */ React55__default.default.createElement(
|
|
5055
5048
|
reactNative.Text,
|
|
5056
5049
|
{
|
|
5057
|
-
style: [
|
|
5050
|
+
style: [styles41.title, { color: disabled ? colors.foregroundMuted : colors.foreground }],
|
|
5058
5051
|
allowFontScaling: true,
|
|
5059
5052
|
numberOfLines: 2
|
|
5060
5053
|
},
|
|
5061
5054
|
title
|
|
5062
|
-
), description ? /* @__PURE__ */
|
|
5055
|
+
), description ? /* @__PURE__ */ React55__default.default.createElement(
|
|
5063
5056
|
reactNative.Text,
|
|
5064
5057
|
{
|
|
5065
|
-
style: [
|
|
5058
|
+
style: [styles41.description, { color: disabled ? colors.foregroundMuted : colors.foregroundSubtle }],
|
|
5066
5059
|
allowFontScaling: true,
|
|
5067
5060
|
numberOfLines: 4
|
|
5068
5061
|
},
|
|
@@ -5070,7 +5063,7 @@ function SelectableCard({
|
|
|
5070
5063
|
) : null))
|
|
5071
5064
|
);
|
|
5072
5065
|
}
|
|
5073
|
-
var
|
|
5066
|
+
var styles41 = reactNative.StyleSheet.create({
|
|
5074
5067
|
group: {
|
|
5075
5068
|
width: "100%"
|
|
5076
5069
|
},
|
|
@@ -5152,11 +5145,11 @@ function PricingCard({
|
|
|
5152
5145
|
style
|
|
5153
5146
|
}) {
|
|
5154
5147
|
const { colors } = useTheme();
|
|
5155
|
-
return /* @__PURE__ */
|
|
5148
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
5156
5149
|
reactNative.View,
|
|
5157
5150
|
{
|
|
5158
5151
|
style: [
|
|
5159
|
-
|
|
5152
|
+
styles42.card,
|
|
5160
5153
|
{
|
|
5161
5154
|
backgroundColor: colors.card,
|
|
5162
5155
|
borderColor: highlighted ? colors.primary : colors.border,
|
|
@@ -5167,42 +5160,42 @@ function PricingCard({
|
|
|
5167
5160
|
],
|
|
5168
5161
|
accessibilityRole: "summary"
|
|
5169
5162
|
},
|
|
5170
|
-
/* @__PURE__ */
|
|
5171
|
-
/* @__PURE__ */
|
|
5172
|
-
description ? /* @__PURE__ */
|
|
5173
|
-
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(
|
|
5174
5167
|
Icon,
|
|
5175
5168
|
{
|
|
5176
5169
|
name: f.included ? "check" : "minus",
|
|
5177
5170
|
size: ms(16),
|
|
5178
5171
|
color: f.included ? colors.success : colors.foregroundMuted
|
|
5179
5172
|
}
|
|
5180
|
-
), /* @__PURE__ */
|
|
5173
|
+
), /* @__PURE__ */ React55__default.default.createElement(
|
|
5181
5174
|
reactNative.Text,
|
|
5182
5175
|
{
|
|
5183
5176
|
style: [
|
|
5184
|
-
|
|
5177
|
+
styles42.featureLabel,
|
|
5185
5178
|
{ color: f.included ? colors.foreground : colors.foregroundMuted },
|
|
5186
|
-
!f.included &&
|
|
5179
|
+
!f.included && styles42.featureExcluded
|
|
5187
5180
|
],
|
|
5188
5181
|
allowFontScaling: true
|
|
5189
5182
|
},
|
|
5190
5183
|
f.label
|
|
5191
5184
|
)))) : null,
|
|
5192
|
-
ctaLabel ? /* @__PURE__ */
|
|
5185
|
+
ctaLabel ? /* @__PURE__ */ React55__default.default.createElement(
|
|
5193
5186
|
Button,
|
|
5194
5187
|
{
|
|
5195
5188
|
label: ctaLabel,
|
|
5196
5189
|
variant: highlighted ? "primary" : "secondary",
|
|
5197
5190
|
fullWidth: true,
|
|
5198
5191
|
onPress: onCtaPress,
|
|
5199
|
-
style:
|
|
5192
|
+
style: styles42.cta
|
|
5200
5193
|
}
|
|
5201
5194
|
) : null,
|
|
5202
|
-
footnote ? /* @__PURE__ */
|
|
5195
|
+
footnote ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles42.footnote, { color: colors.foregroundMuted }], allowFontScaling: true }, footnote) : null
|
|
5203
5196
|
);
|
|
5204
5197
|
}
|
|
5205
|
-
var
|
|
5198
|
+
var styles42 = reactNative.StyleSheet.create({
|
|
5206
5199
|
card: {
|
|
5207
5200
|
borderRadius: RADIUS.md,
|
|
5208
5201
|
padding: s(16),
|
|
@@ -5281,11 +5274,11 @@ function TabBar({
|
|
|
5281
5274
|
const insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
5282
5275
|
const resolvedActive = activeColor ?? colors.primary;
|
|
5283
5276
|
const resolvedInactive = inactiveColor ?? colors.foregroundMuted;
|
|
5284
|
-
return /* @__PURE__ */
|
|
5277
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
5285
5278
|
reactNative.View,
|
|
5286
5279
|
{
|
|
5287
5280
|
style: [
|
|
5288
|
-
|
|
5281
|
+
styles43.container,
|
|
5289
5282
|
{
|
|
5290
5283
|
backgroundColor: colors.card,
|
|
5291
5284
|
borderTopColor: colors.border,
|
|
@@ -5298,10 +5291,10 @@ function TabBar({
|
|
|
5298
5291
|
items.map((item) => {
|
|
5299
5292
|
const active = item.key === activeKey;
|
|
5300
5293
|
const tint = active ? resolvedActive : resolvedInactive;
|
|
5301
|
-
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);
|
|
5302
5295
|
const showBadge = item.badge !== void 0 && item.badge !== false;
|
|
5303
5296
|
const badgeCount = typeof item.badge === "number" ? item.badge : void 0;
|
|
5304
|
-
return /* @__PURE__ */
|
|
5297
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
5305
5298
|
PressableTab,
|
|
5306
5299
|
{
|
|
5307
5300
|
key: item.key,
|
|
@@ -5314,25 +5307,25 @@ function TabBar({
|
|
|
5314
5307
|
accessibilityRole: "tab",
|
|
5315
5308
|
accessibilityState: { selected: active },
|
|
5316
5309
|
accessibilityLabel: item.label ?? item.key,
|
|
5317
|
-
style:
|
|
5310
|
+
style: styles43.tab
|
|
5318
5311
|
},
|
|
5319
|
-
/* @__PURE__ */
|
|
5312
|
+
/* @__PURE__ */ React55__default.default.createElement(reactNative.View, null, iconNode, showBadge ? /* @__PURE__ */ React55__default.default.createElement(
|
|
5320
5313
|
reactNative.View,
|
|
5321
5314
|
{
|
|
5322
5315
|
style: [
|
|
5323
|
-
|
|
5316
|
+
styles43.badge,
|
|
5324
5317
|
{ backgroundColor: colors.destructive, borderColor: colors.card },
|
|
5325
|
-
badgeCount === void 0 &&
|
|
5318
|
+
badgeCount === void 0 && styles43.badgeDot
|
|
5326
5319
|
]
|
|
5327
5320
|
},
|
|
5328
|
-
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
|
|
5329
5322
|
) : null),
|
|
5330
|
-
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
|
|
5331
5324
|
);
|
|
5332
5325
|
})
|
|
5333
5326
|
);
|
|
5334
5327
|
}
|
|
5335
|
-
var
|
|
5328
|
+
var styles43 = reactNative.StyleSheet.create({
|
|
5336
5329
|
container: {
|
|
5337
5330
|
flexDirection: "row",
|
|
5338
5331
|
borderTopWidth: reactNative.StyleSheet.hairlineWidth
|
|
@@ -5386,7 +5379,7 @@ function ZoomableImage({ source, width, height, onZoomChange }) {
|
|
|
5386
5379
|
const translateY = Animated6.useSharedValue(0);
|
|
5387
5380
|
const savedX = Animated6.useSharedValue(0);
|
|
5388
5381
|
const savedY = Animated6.useSharedValue(0);
|
|
5389
|
-
const reportZoom =
|
|
5382
|
+
const reportZoom = React55.useCallback((zoomed) => onZoomChange(zoomed), [onZoomChange]);
|
|
5390
5383
|
const reset = () => {
|
|
5391
5384
|
"worklet";
|
|
5392
5385
|
scale2.value = Animated6.withTiming(1);
|
|
@@ -5432,17 +5425,17 @@ function ZoomableImage({ source, width, height, onZoomChange }) {
|
|
|
5432
5425
|
{ scale: scale2.value }
|
|
5433
5426
|
]
|
|
5434
5427
|
}));
|
|
5435
|
-
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" }))));
|
|
5436
5429
|
}
|
|
5437
5430
|
function ImageViewer({ images, visible, onClose, initialIndex = 0 }) {
|
|
5438
5431
|
const window = reactNative.useWindowDimensions();
|
|
5439
5432
|
const width = window.width > 0 ? window.width : reactNative.Dimensions.get("window").width;
|
|
5440
5433
|
const height = window.height > 0 ? window.height : reactNative.Dimensions.get("window").height;
|
|
5441
5434
|
const insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
5442
|
-
const [index, setIndex] =
|
|
5443
|
-
const [pagingEnabled, setPagingEnabled] =
|
|
5444
|
-
const scrollRef =
|
|
5445
|
-
|
|
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(() => {
|
|
5446
5439
|
if (!visible) return;
|
|
5447
5440
|
const handle = requestAnimationFrame(() => {
|
|
5448
5441
|
setIndex(initialIndex);
|
|
@@ -5453,7 +5446,7 @@ function ImageViewer({ images, visible, onClose, initialIndex = 0 }) {
|
|
|
5453
5446
|
}, [visible, initialIndex, width]);
|
|
5454
5447
|
const dragY = Animated6.useSharedValue(0);
|
|
5455
5448
|
const DISMISS_THRESHOLD = height * 0.18;
|
|
5456
|
-
const closeViewer =
|
|
5449
|
+
const closeViewer = React55.useCallback(() => onClose(), [onClose]);
|
|
5457
5450
|
const swipeDown = reactNativeGestureHandler.Gesture.Pan().enabled(pagingEnabled).activeOffsetY(12).failOffsetX([-16, 16]).onUpdate((e) => {
|
|
5458
5451
|
dragY.value = Math.max(0, e.translationY);
|
|
5459
5452
|
}).onEnd((e) => {
|
|
@@ -5463,7 +5456,7 @@ function ImageViewer({ images, visible, onClose, initialIndex = 0 }) {
|
|
|
5463
5456
|
dragY.value = Animated6.withTiming(0);
|
|
5464
5457
|
}
|
|
5465
5458
|
});
|
|
5466
|
-
|
|
5459
|
+
React55__default.default.useEffect(() => {
|
|
5467
5460
|
if (visible) dragY.value = 0;
|
|
5468
5461
|
}, [visible, dragY]);
|
|
5469
5462
|
const dismissStyle = Animated6.useAnimatedStyle(() => ({
|
|
@@ -5480,7 +5473,7 @@ function ImageViewer({ images, visible, onClose, initialIndex = 0 }) {
|
|
|
5480
5473
|
scrollRef.current?.scrollTo({ x: page * width, animated: true });
|
|
5481
5474
|
setIndex(page);
|
|
5482
5475
|
};
|
|
5483
|
-
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(
|
|
5484
5477
|
reactNative.ScrollView,
|
|
5485
5478
|
{
|
|
5486
5479
|
ref: scrollRef,
|
|
@@ -5491,7 +5484,7 @@ function ImageViewer({ images, visible, onClose, initialIndex = 0 }) {
|
|
|
5491
5484
|
onMomentumScrollEnd: onMomentumEnd,
|
|
5492
5485
|
bounces: false
|
|
5493
5486
|
},
|
|
5494
|
-
images.map((source, i) => /* @__PURE__ */
|
|
5487
|
+
images.map((source, i) => /* @__PURE__ */ React55__default.default.createElement(
|
|
5495
5488
|
ZoomableImage,
|
|
5496
5489
|
{
|
|
5497
5490
|
key: i,
|
|
@@ -5501,7 +5494,7 @@ function ImageViewer({ images, visible, onClose, initialIndex = 0 }) {
|
|
|
5501
5494
|
onZoomChange: (zoomed) => setPagingEnabled(!zoomed)
|
|
5502
5495
|
}
|
|
5503
5496
|
))
|
|
5504
|
-
))), /* @__PURE__ */
|
|
5497
|
+
))), /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles44.closeButtonWrapper, { top: insets.top + vs(8) }] }, /* @__PURE__ */ React55__default.default.createElement(
|
|
5505
5498
|
IconButton,
|
|
5506
5499
|
{
|
|
5507
5500
|
iconName: "x",
|
|
@@ -5512,7 +5505,7 @@ function ImageViewer({ images, visible, onClose, initialIndex = 0 }) {
|
|
|
5512
5505
|
onPress: onClose,
|
|
5513
5506
|
accessibilityLabel: "Cerrar"
|
|
5514
5507
|
}
|
|
5515
|
-
)), 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(
|
|
5516
5509
|
PagerDots,
|
|
5517
5510
|
{
|
|
5518
5511
|
count: images.length,
|
|
@@ -5523,7 +5516,7 @@ function ImageViewer({ images, visible, onClose, initialIndex = 0 }) {
|
|
|
5523
5516
|
}
|
|
5524
5517
|
)) : null)));
|
|
5525
5518
|
}
|
|
5526
|
-
var
|
|
5519
|
+
var styles44 = reactNative.StyleSheet.create({
|
|
5527
5520
|
root: {
|
|
5528
5521
|
flex: 1
|
|
5529
5522
|
},
|
|
@@ -5561,8 +5554,8 @@ function SheetSelectChip({
|
|
|
5561
5554
|
onPress();
|
|
5562
5555
|
};
|
|
5563
5556
|
const iconColor = selected ? colors.primaryForeground : colors.foreground;
|
|
5564
|
-
const resolvedIcon = option.iconName ? /* @__PURE__ */
|
|
5565
|
-
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(
|
|
5566
5559
|
PressableChip,
|
|
5567
5560
|
{
|
|
5568
5561
|
onPress: option.disabled ? void 0 : handlePress,
|
|
@@ -5572,21 +5565,21 @@ function SheetSelectChip({
|
|
|
5572
5565
|
accessibilityLabel: option.disabled ? `${option.label}, no disponible` : option.label,
|
|
5573
5566
|
accessibilityState: { selected, disabled: option.disabled }
|
|
5574
5567
|
},
|
|
5575
|
-
/* @__PURE__ */
|
|
5568
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
5576
5569
|
reactNativeEase.EaseView,
|
|
5577
5570
|
{
|
|
5578
|
-
style: [
|
|
5571
|
+
style: [styles45.chip, option.disabled && styles45.chipDisabled],
|
|
5579
5572
|
animate: {
|
|
5580
5573
|
backgroundColor: selected ? colors.primary : colors.surface,
|
|
5581
5574
|
borderColor: selected ? colors.primary : colors.border
|
|
5582
5575
|
},
|
|
5583
5576
|
transition: COLOR_TRANSITION
|
|
5584
5577
|
},
|
|
5585
|
-
resolvedIcon ? /* @__PURE__ */
|
|
5586
|
-
/* @__PURE__ */
|
|
5578
|
+
resolvedIcon ? /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles45.chipIcon }, resolvedIcon) : null,
|
|
5579
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
5587
5580
|
reactNative.Text,
|
|
5588
5581
|
{
|
|
5589
|
-
style: [
|
|
5582
|
+
style: [styles45.chipLabel, { color: selected ? colors.primaryForeground : colors.foreground }],
|
|
5590
5583
|
allowFontScaling: true
|
|
5591
5584
|
},
|
|
5592
5585
|
option.label
|
|
@@ -5620,7 +5613,7 @@ function SheetSelect({
|
|
|
5620
5613
|
const newArray = alreadySelected ? currentArray.filter((v) => v !== optionValue) : [...currentArray, optionValue];
|
|
5621
5614
|
onValueChange?.(newArray);
|
|
5622
5615
|
};
|
|
5623
|
-
const chips = options.map((opt) => /* @__PURE__ */
|
|
5616
|
+
const chips = options.map((opt) => /* @__PURE__ */ React55__default.default.createElement(
|
|
5624
5617
|
SheetSelectChip,
|
|
5625
5618
|
{
|
|
5626
5619
|
key: opt.value,
|
|
@@ -5629,17 +5622,17 @@ function SheetSelect({
|
|
|
5629
5622
|
onPress: () => handlePress(opt.value)
|
|
5630
5623
|
}
|
|
5631
5624
|
));
|
|
5632
|
-
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(
|
|
5633
5626
|
reactNative.ScrollView,
|
|
5634
5627
|
{
|
|
5635
5628
|
horizontal: true,
|
|
5636
5629
|
showsHorizontalScrollIndicator: false,
|
|
5637
|
-
contentContainerStyle:
|
|
5630
|
+
contentContainerStyle: styles45.scrollContent
|
|
5638
5631
|
},
|
|
5639
5632
|
chips
|
|
5640
|
-
), error ? /* @__PURE__ */
|
|
5633
|
+
), error ? /* @__PURE__ */ React55__default.default.createElement(reactNative.Text, { style: [styles45.error, { color: colors.destructive }], allowFontScaling: true, accessibilityLiveRegion: "polite" }, error) : null);
|
|
5641
5634
|
}
|
|
5642
|
-
var
|
|
5635
|
+
var styles45 = reactNative.StyleSheet.create({
|
|
5643
5636
|
container: {
|
|
5644
5637
|
gap: vs(8)
|
|
5645
5638
|
},
|
|
@@ -5694,33 +5687,39 @@ function ImageUpload({
|
|
|
5694
5687
|
height = 200,
|
|
5695
5688
|
borderRadius = RADIUS.lg,
|
|
5696
5689
|
resizeMode = "cover",
|
|
5697
|
-
allowsEditing = true,
|
|
5698
5690
|
disabled = false,
|
|
5699
5691
|
style,
|
|
5700
5692
|
accessibilityLabel,
|
|
5701
5693
|
onPickerStarting
|
|
5702
5694
|
}) {
|
|
5703
5695
|
const { colors } = useTheme();
|
|
5704
|
-
const [imageLoaded, setImageLoaded] =
|
|
5696
|
+
const [imageLoaded, setImageLoaded] = React55.useState(false);
|
|
5697
|
+
const [isPicking, setIsPicking] = React55.useState(false);
|
|
5705
5698
|
const handlePress = async () => {
|
|
5706
|
-
if (disabled || loading) return;
|
|
5699
|
+
if (disabled || loading || isPicking) return;
|
|
5707
5700
|
impactLight();
|
|
5708
5701
|
onPickerStarting?.();
|
|
5709
|
-
|
|
5702
|
+
setIsPicking(true);
|
|
5710
5703
|
try {
|
|
5711
|
-
|
|
5704
|
+
const { launchImageLibrary } = await import('react-native-image-picker');
|
|
5705
|
+
const result = await new Promise((resolve) => {
|
|
5706
|
+
launchImageLibrary(
|
|
5707
|
+
{
|
|
5708
|
+
mediaType: "photo",
|
|
5709
|
+
quality: 0.8,
|
|
5710
|
+
selectionLimit: 1,
|
|
5711
|
+
includeBase64: false
|
|
5712
|
+
},
|
|
5713
|
+
resolve
|
|
5714
|
+
);
|
|
5715
|
+
});
|
|
5716
|
+
if (!result.didCancel && !result.errorCode && result.assets?.[0]?.uri) {
|
|
5717
|
+
setImageLoaded(false);
|
|
5718
|
+
onChange?.(result.assets[0].uri);
|
|
5719
|
+
}
|
|
5712
5720
|
} catch {
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
}
|
|
5716
|
-
const result = await picker.launchImageLibraryAsync({
|
|
5717
|
-
mediaTypes: ["images"],
|
|
5718
|
-
allowsEditing,
|
|
5719
|
-
quality: 0.8
|
|
5720
|
-
});
|
|
5721
|
-
if (!result.canceled && result.assets?.[0]) {
|
|
5722
|
-
setImageLoaded(false);
|
|
5723
|
-
onChange?.(result.assets[0].uri);
|
|
5721
|
+
} finally {
|
|
5722
|
+
setIsPicking(false);
|
|
5724
5723
|
}
|
|
5725
5724
|
};
|
|
5726
5725
|
const containerStyle = {
|
|
@@ -5733,7 +5732,7 @@ function ImageUpload({
|
|
|
5733
5732
|
backgroundColor: value && imageLoaded ? "transparent" : colors.surface,
|
|
5734
5733
|
overflow: "hidden"
|
|
5735
5734
|
};
|
|
5736
|
-
return /* @__PURE__ */
|
|
5735
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
5737
5736
|
PressableCard,
|
|
5738
5737
|
{
|
|
5739
5738
|
onPress: handlePress,
|
|
@@ -5745,7 +5744,7 @@ function ImageUpload({
|
|
|
5745
5744
|
accessibilityState: { disabled: disabled || loading },
|
|
5746
5745
|
style: [containerStyle, style]
|
|
5747
5746
|
},
|
|
5748
|
-
value ? /* @__PURE__ */
|
|
5747
|
+
value ? /* @__PURE__ */ React55__default.default.createElement(
|
|
5749
5748
|
expoImage.Image,
|
|
5750
5749
|
{
|
|
5751
5750
|
source: { uri: value },
|
|
@@ -5754,20 +5753,20 @@ function ImageUpload({
|
|
|
5754
5753
|
onLoad: () => setImageLoaded(true),
|
|
5755
5754
|
onError: () => setImageLoaded(true)
|
|
5756
5755
|
}
|
|
5757
|
-
) : /* @__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(
|
|
5758
5757
|
reactNative.Text,
|
|
5759
5758
|
{
|
|
5760
|
-
style: [
|
|
5759
|
+
style: [styles46.placeholderText, { color: colors.foregroundMuted }],
|
|
5761
5760
|
numberOfLines: 1,
|
|
5762
5761
|
allowFontScaling: true
|
|
5763
5762
|
},
|
|
5764
5763
|
placeholder
|
|
5765
5764
|
) : null),
|
|
5766
|
-
loading ? /* @__PURE__ */
|
|
5767
|
-
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
|
|
5768
5767
|
);
|
|
5769
5768
|
}
|
|
5770
|
-
var
|
|
5769
|
+
var styles46 = reactNative.StyleSheet.create({
|
|
5771
5770
|
placeholder: {
|
|
5772
5771
|
flex: 1,
|
|
5773
5772
|
alignItems: "center",
|
|
@@ -5786,12 +5785,12 @@ var styles47 = reactNative.StyleSheet.create({
|
|
|
5786
5785
|
},
|
|
5787
5786
|
editBadge: {
|
|
5788
5787
|
position: "absolute",
|
|
5789
|
-
bottom: vs(
|
|
5790
|
-
right: s(
|
|
5788
|
+
bottom: vs(14),
|
|
5789
|
+
right: s(14)
|
|
5791
5790
|
},
|
|
5792
5791
|
editBadgeInner: {
|
|
5793
|
-
width: s(
|
|
5794
|
-
height: s(
|
|
5792
|
+
width: s(24),
|
|
5793
|
+
height: s(24),
|
|
5795
5794
|
borderRadius: 999,
|
|
5796
5795
|
alignItems: "center",
|
|
5797
5796
|
justifyContent: "center"
|
|
@@ -6025,29 +6024,21 @@ var CATEGORIES = [
|
|
|
6025
6024
|
]
|
|
6026
6025
|
}
|
|
6027
6026
|
];
|
|
6028
|
-
var _allIcons = null;
|
|
6029
|
-
var _categorized = null;
|
|
6030
6027
|
function getAllCuratedIcons() {
|
|
6031
|
-
|
|
6032
|
-
|
|
6033
|
-
|
|
6034
|
-
for (const
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
|
|
6038
|
-
result.push(name);
|
|
6039
|
-
}
|
|
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);
|
|
6040
6035
|
}
|
|
6041
6036
|
}
|
|
6042
|
-
_allIcons = result;
|
|
6043
6037
|
}
|
|
6044
|
-
return
|
|
6038
|
+
return result;
|
|
6045
6039
|
}
|
|
6046
6040
|
function getCuratedCategories() {
|
|
6047
|
-
|
|
6048
|
-
_categorized = CATEGORIES.map((cat) => ({ ...cat, icons: [...cat.icons] }));
|
|
6049
|
-
}
|
|
6050
|
-
return _categorized;
|
|
6041
|
+
return CATEGORIES.map((cat) => ({ ...cat, icons: [...cat.icons] }));
|
|
6051
6042
|
}
|
|
6052
6043
|
|
|
6053
6044
|
// src/components/IconPicker/IconPicker.tsx
|
|
@@ -6063,7 +6054,7 @@ function IconCell({ name, selected, size, onPress }) {
|
|
|
6063
6054
|
};
|
|
6064
6055
|
const iconColor = selected ? colors.primaryForeground : colors.foreground;
|
|
6065
6056
|
const bg = selected ? colors.primary : "transparent";
|
|
6066
|
-
return /* @__PURE__ */
|
|
6057
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
6067
6058
|
reactNative.TouchableOpacity,
|
|
6068
6059
|
{
|
|
6069
6060
|
onPress: handlePress,
|
|
@@ -6072,12 +6063,12 @@ function IconCell({ name, selected, size, onPress }) {
|
|
|
6072
6063
|
accessibilityRole: "button",
|
|
6073
6064
|
accessibilityState: { selected },
|
|
6074
6065
|
accessibilityLabel: name,
|
|
6075
|
-
style: [
|
|
6066
|
+
style: [styles47.cell, { width: size, height: size, backgroundColor: bg }]
|
|
6076
6067
|
},
|
|
6077
|
-
/* @__PURE__ */
|
|
6068
|
+
/* @__PURE__ */ React55__default.default.createElement(Icon, { name, size: ms(20), color: iconColor })
|
|
6078
6069
|
);
|
|
6079
6070
|
}
|
|
6080
|
-
var IconCellMemo =
|
|
6071
|
+
var IconCellMemo = React55__default.default.memo(IconCell);
|
|
6081
6072
|
function IconPicker({
|
|
6082
6073
|
value,
|
|
6083
6074
|
onChange,
|
|
@@ -6091,13 +6082,13 @@ function IconPicker({
|
|
|
6091
6082
|
}) {
|
|
6092
6083
|
const { colors } = useTheme();
|
|
6093
6084
|
const insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
6094
|
-
const sheetRef =
|
|
6095
|
-
const catScrollRef =
|
|
6096
|
-
const [activeCategory, setActiveCategory] =
|
|
6097
|
-
const [containerWidth, setContainerWidth] =
|
|
6098
|
-
const [ready, setReady] =
|
|
6099
|
-
const sheetName =
|
|
6100
|
-
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(() => {
|
|
6101
6092
|
const allIcons = getAllCuratedIcons();
|
|
6102
6093
|
if (activeCategory) {
|
|
6103
6094
|
return getCuratedCategories().find((c) => c.name === activeCategory)?.icons ?? allIcons;
|
|
@@ -6106,36 +6097,36 @@ function IconPicker({
|
|
|
6106
6097
|
}, [activeCategory]);
|
|
6107
6098
|
const gapPx = s(gap);
|
|
6108
6099
|
const cellSize = containerWidth > 0 ? Math.floor((containerWidth - gapPx * (numColumns - 1)) / numColumns) : 0;
|
|
6109
|
-
const rows =
|
|
6100
|
+
const rows = React55.useMemo(() => {
|
|
6110
6101
|
const result = [];
|
|
6111
6102
|
for (let i = 0; i < activeIcons.length; i += numColumns) {
|
|
6112
6103
|
result.push(activeIcons.slice(i, i + numColumns));
|
|
6113
6104
|
}
|
|
6114
6105
|
return result;
|
|
6115
6106
|
}, [activeIcons, numColumns]);
|
|
6116
|
-
const handleDismiss =
|
|
6107
|
+
const handleDismiss = React55.useCallback(() => {
|
|
6117
6108
|
setActiveCategory(null);
|
|
6118
6109
|
setReady(false);
|
|
6119
6110
|
}, []);
|
|
6120
|
-
const handleSelect =
|
|
6111
|
+
const handleSelect = React55.useCallback(
|
|
6121
6112
|
(iconName) => {
|
|
6122
6113
|
onChange(iconName);
|
|
6123
6114
|
},
|
|
6124
6115
|
[onChange]
|
|
6125
6116
|
);
|
|
6126
|
-
const handleOpen =
|
|
6117
|
+
const handleOpen = React55.useCallback(() => {
|
|
6127
6118
|
if (disabled) return;
|
|
6128
6119
|
impactMedium();
|
|
6129
6120
|
setActiveCategory(null);
|
|
6130
6121
|
setReady(false);
|
|
6131
6122
|
sheetRef.current?.present();
|
|
6132
6123
|
}, [disabled]);
|
|
6133
|
-
const renderBackdrop =
|
|
6134
|
-
(props) => /* @__PURE__ */
|
|
6124
|
+
const renderBackdrop = React55.useCallback(
|
|
6125
|
+
(props) => /* @__PURE__ */ React55__default.default.createElement(bottomSheet.BottomSheetBackdrop, { ...props, disappearsOnIndex: -1, appearsOnIndex: 0, pressBehavior: "close" }),
|
|
6135
6126
|
[]
|
|
6136
6127
|
);
|
|
6137
|
-
const selectedIcon = value ? /* @__PURE__ */
|
|
6138
|
-
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(
|
|
6139
6130
|
reactNative.TouchableOpacity,
|
|
6140
6131
|
{
|
|
6141
6132
|
onPress: handleOpen,
|
|
@@ -6146,26 +6137,26 @@ function IconPicker({
|
|
|
6146
6137
|
accessibilityLabel: label ?? "Seleccionar icono",
|
|
6147
6138
|
accessibilityState: { disabled },
|
|
6148
6139
|
style: [
|
|
6149
|
-
|
|
6140
|
+
styles47.trigger,
|
|
6150
6141
|
{
|
|
6151
6142
|
backgroundColor: disabled ? colors.surface : colors.background,
|
|
6152
6143
|
width: TRIGGER_SIZE,
|
|
6153
6144
|
height: TRIGGER_SIZE,
|
|
6154
6145
|
borderColor: error ? colors.destructive : value ? colors.primary : colors.border
|
|
6155
6146
|
},
|
|
6156
|
-
disabled &&
|
|
6147
|
+
disabled && styles47.triggerDisabled
|
|
6157
6148
|
]
|
|
6158
6149
|
},
|
|
6159
|
-
selectedIcon ?? /* @__PURE__ */
|
|
6160
|
-
), 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(
|
|
6161
6152
|
reactNative.Text,
|
|
6162
6153
|
{
|
|
6163
|
-
style: [
|
|
6154
|
+
style: [styles47.helperText, { color: colors.destructive }],
|
|
6164
6155
|
allowFontScaling: true,
|
|
6165
6156
|
accessibilityLiveRegion: "polite"
|
|
6166
6157
|
},
|
|
6167
6158
|
error
|
|
6168
|
-
) : 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(
|
|
6169
6160
|
bottomSheet.BottomSheetModal,
|
|
6170
6161
|
{
|
|
6171
6162
|
ref: sheetRef,
|
|
@@ -6174,37 +6165,37 @@ function IconPicker({
|
|
|
6174
6165
|
enableDynamicSizing: true,
|
|
6175
6166
|
maxDynamicContentSize: SCREEN_HEIGHT * 0.7,
|
|
6176
6167
|
backdropComponent: renderBackdrop,
|
|
6177
|
-
backgroundStyle: { ...
|
|
6178
|
-
handleIndicatorStyle: { ...
|
|
6168
|
+
backgroundStyle: { ...styles47.sheetBackground, backgroundColor: colors.card },
|
|
6169
|
+
handleIndicatorStyle: { ...styles47.handle, backgroundColor: colors.border },
|
|
6179
6170
|
enablePanDownToClose: true,
|
|
6180
6171
|
topInset: insets.top,
|
|
6181
6172
|
android_keyboardInputMode: "adjustPan"
|
|
6182
6173
|
},
|
|
6183
|
-
/* @__PURE__ */
|
|
6174
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
6184
6175
|
bottomSheet.BottomSheetScrollView,
|
|
6185
6176
|
{
|
|
6186
|
-
contentContainerStyle:
|
|
6177
|
+
contentContainerStyle: styles47.sheetContent,
|
|
6187
6178
|
showsVerticalScrollIndicator: true
|
|
6188
6179
|
},
|
|
6189
|
-
/* @__PURE__ */
|
|
6180
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
6190
6181
|
reactNative.View,
|
|
6191
6182
|
{
|
|
6192
|
-
style:
|
|
6183
|
+
style: styles47.gridContainer,
|
|
6193
6184
|
onLayout: (e) => {
|
|
6194
6185
|
setContainerWidth(e.nativeEvent.layout.width);
|
|
6195
6186
|
setReady(true);
|
|
6196
6187
|
}
|
|
6197
6188
|
},
|
|
6198
|
-
!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(
|
|
6199
6190
|
reactNativeGestureHandler.ScrollView,
|
|
6200
6191
|
{
|
|
6201
6192
|
ref: catScrollRef,
|
|
6202
6193
|
horizontal: true,
|
|
6203
6194
|
showsHorizontalScrollIndicator: false,
|
|
6204
|
-
contentContainerStyle:
|
|
6205
|
-
style:
|
|
6195
|
+
contentContainerStyle: styles47.categoryStrip,
|
|
6196
|
+
style: styles47.categoryScroll
|
|
6206
6197
|
},
|
|
6207
|
-
/* @__PURE__ */
|
|
6198
|
+
/* @__PURE__ */ React55__default.default.createElement(
|
|
6208
6199
|
reactNative.TouchableOpacity,
|
|
6209
6200
|
{
|
|
6210
6201
|
onPress: () => setActiveCategory(null),
|
|
@@ -6214,18 +6205,18 @@ function IconPicker({
|
|
|
6214
6205
|
accessibilityLabel: "Todas",
|
|
6215
6206
|
accessibilityState: { selected: activeCategory === null },
|
|
6216
6207
|
style: [
|
|
6217
|
-
|
|
6208
|
+
styles47.categoryChip,
|
|
6218
6209
|
{
|
|
6219
6210
|
backgroundColor: activeCategory === null ? colors.primary : colors.surface,
|
|
6220
6211
|
borderColor: activeCategory === null ? colors.primary : colors.border
|
|
6221
6212
|
}
|
|
6222
6213
|
]
|
|
6223
6214
|
},
|
|
6224
|
-
/* @__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(
|
|
6225
6216
|
reactNative.Text,
|
|
6226
6217
|
{
|
|
6227
6218
|
style: [
|
|
6228
|
-
|
|
6219
|
+
styles47.categoryChipText,
|
|
6229
6220
|
{ color: activeCategory === null ? colors.primaryForeground : colors.foreground }
|
|
6230
6221
|
],
|
|
6231
6222
|
allowFontScaling: true,
|
|
@@ -6234,7 +6225,7 @@ function IconPicker({
|
|
|
6234
6225
|
"Todas"
|
|
6235
6226
|
))
|
|
6236
6227
|
),
|
|
6237
|
-
getCuratedCategories().map((cat) => /* @__PURE__ */
|
|
6228
|
+
getCuratedCategories().map((cat) => /* @__PURE__ */ React55__default.default.createElement(
|
|
6238
6229
|
reactNative.TouchableOpacity,
|
|
6239
6230
|
{
|
|
6240
6231
|
key: cat.name,
|
|
@@ -6245,18 +6236,18 @@ function IconPicker({
|
|
|
6245
6236
|
accessibilityLabel: cat.labelEs,
|
|
6246
6237
|
accessibilityState: { selected: activeCategory === cat.name },
|
|
6247
6238
|
style: [
|
|
6248
|
-
|
|
6239
|
+
styles47.categoryChip,
|
|
6249
6240
|
{
|
|
6250
6241
|
backgroundColor: activeCategory === cat.name ? colors.primary : colors.surface,
|
|
6251
6242
|
borderColor: activeCategory === cat.name ? colors.primary : colors.border
|
|
6252
6243
|
}
|
|
6253
6244
|
]
|
|
6254
6245
|
},
|
|
6255
|
-
/* @__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(
|
|
6256
6247
|
reactNative.Text,
|
|
6257
6248
|
{
|
|
6258
6249
|
style: [
|
|
6259
|
-
|
|
6250
|
+
styles47.categoryChipText,
|
|
6260
6251
|
{ color: activeCategory === cat.name ? colors.primaryForeground : colors.foreground }
|
|
6261
6252
|
],
|
|
6262
6253
|
allowFontScaling: true,
|
|
@@ -6265,7 +6256,7 @@ function IconPicker({
|
|
|
6265
6256
|
cat.labelEs
|
|
6266
6257
|
))
|
|
6267
6258
|
))
|
|
6268
|
-
), /* @__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(
|
|
6269
6260
|
IconCellMemo,
|
|
6270
6261
|
{
|
|
6271
6262
|
key: name,
|
|
@@ -6277,12 +6268,12 @@ function IconPicker({
|
|
|
6277
6268
|
sheetRef.current?.dismiss();
|
|
6278
6269
|
}
|
|
6279
6270
|
}
|
|
6280
|
-
)), 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)
|
|
6281
6272
|
)
|
|
6282
6273
|
)
|
|
6283
6274
|
));
|
|
6284
6275
|
}
|
|
6285
|
-
var
|
|
6276
|
+
var styles47 = reactNative.StyleSheet.create({
|
|
6286
6277
|
triggerContainer: {
|
|
6287
6278
|
gap: vs(8)
|
|
6288
6279
|
},
|
|
@@ -6379,7 +6370,8 @@ function NumberStepperBase({
|
|
|
6379
6370
|
size = "md",
|
|
6380
6371
|
disabled = false,
|
|
6381
6372
|
style,
|
|
6382
|
-
accessibilityLabel
|
|
6373
|
+
accessibilityLabel,
|
|
6374
|
+
accessibilityHint
|
|
6383
6375
|
}) {
|
|
6384
6376
|
const { colors } = useTheme();
|
|
6385
6377
|
const canDecrement = value > min && !disabled;
|
|
@@ -6396,18 +6388,18 @@ function NumberStepperBase({
|
|
|
6396
6388
|
};
|
|
6397
6389
|
const { button: buttonSize, icon: iconSize, valueFontSize, valueLineHeight, valueMinWidth } = sizeConfig[size];
|
|
6398
6390
|
const displayValue = String(value);
|
|
6399
|
-
return /* @__PURE__ */
|
|
6391
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: [styles48.container, style] }, /* @__PURE__ */ React55__default.default.createElement(
|
|
6400
6392
|
PressableButton,
|
|
6401
6393
|
{
|
|
6402
6394
|
style: [
|
|
6403
|
-
|
|
6395
|
+
styles48.button,
|
|
6404
6396
|
{
|
|
6405
6397
|
width: buttonSize,
|
|
6406
6398
|
height: buttonSize,
|
|
6407
6399
|
backgroundColor: colors.surface,
|
|
6408
6400
|
borderColor: colors.border
|
|
6409
6401
|
},
|
|
6410
|
-
!canDecrement &&
|
|
6402
|
+
!canDecrement && styles48.buttonDisabled
|
|
6411
6403
|
],
|
|
6412
6404
|
enabled: canDecrement,
|
|
6413
6405
|
onPress: handleDecrement,
|
|
@@ -6415,14 +6407,15 @@ function NumberStepperBase({
|
|
|
6415
6407
|
touchSoundDisabled: true,
|
|
6416
6408
|
accessibilityRole: "button",
|
|
6417
6409
|
accessibilityLabel: `Disminuir, valor actual ${displayValue}`,
|
|
6410
|
+
accessibilityHint,
|
|
6418
6411
|
accessibilityState: { disabled: !canDecrement }
|
|
6419
6412
|
},
|
|
6420
|
-
/* @__PURE__ */
|
|
6421
|
-
), /* @__PURE__ */
|
|
6413
|
+
/* @__PURE__ */ React55__default.default.createElement(Icon, { name: "minus", size: iconSize, color: canDecrement ? colors.foreground : colors.foregroundMuted })
|
|
6414
|
+
), /* @__PURE__ */ React55__default.default.createElement(
|
|
6422
6415
|
reactNative.Text,
|
|
6423
6416
|
{
|
|
6424
6417
|
style: [
|
|
6425
|
-
|
|
6418
|
+
styles48.value,
|
|
6426
6419
|
{
|
|
6427
6420
|
color: colors.foreground,
|
|
6428
6421
|
fontSize: valueFontSize,
|
|
@@ -6435,18 +6428,18 @@ function NumberStepperBase({
|
|
|
6435
6428
|
accessibilityRole: "text"
|
|
6436
6429
|
},
|
|
6437
6430
|
displayValue
|
|
6438
|
-
), /* @__PURE__ */
|
|
6431
|
+
), /* @__PURE__ */ React55__default.default.createElement(
|
|
6439
6432
|
PressableButton,
|
|
6440
6433
|
{
|
|
6441
6434
|
style: [
|
|
6442
|
-
|
|
6435
|
+
styles48.button,
|
|
6443
6436
|
{
|
|
6444
6437
|
width: buttonSize,
|
|
6445
6438
|
height: buttonSize,
|
|
6446
6439
|
backgroundColor: colors.surface,
|
|
6447
6440
|
borderColor: colors.border
|
|
6448
6441
|
},
|
|
6449
|
-
!canIncrement &&
|
|
6442
|
+
!canIncrement && styles48.buttonDisabled
|
|
6450
6443
|
],
|
|
6451
6444
|
enabled: canIncrement,
|
|
6452
6445
|
onPress: handleIncrement,
|
|
@@ -6454,13 +6447,14 @@ function NumberStepperBase({
|
|
|
6454
6447
|
touchSoundDisabled: true,
|
|
6455
6448
|
accessibilityRole: "button",
|
|
6456
6449
|
accessibilityLabel: `Aumentar, valor actual ${displayValue}`,
|
|
6450
|
+
accessibilityHint,
|
|
6457
6451
|
accessibilityState: { disabled: !canIncrement }
|
|
6458
6452
|
},
|
|
6459
|
-
/* @__PURE__ */
|
|
6453
|
+
/* @__PURE__ */ React55__default.default.createElement(Icon, { name: "plus", size: iconSize, color: canIncrement ? colors.foreground : colors.foregroundMuted })
|
|
6460
6454
|
));
|
|
6461
6455
|
}
|
|
6462
|
-
var NumberStepper =
|
|
6463
|
-
var
|
|
6456
|
+
var NumberStepper = React55__default.default.memo(NumberStepperBase);
|
|
6457
|
+
var styles48 = reactNative.StyleSheet.create({
|
|
6464
6458
|
container: {
|
|
6465
6459
|
flexDirection: "row",
|
|
6466
6460
|
alignItems: "center",
|
|
@@ -6495,8 +6489,8 @@ function StatsComponent({
|
|
|
6495
6489
|
accessibilityLabel
|
|
6496
6490
|
}) {
|
|
6497
6491
|
const { colors } = useTheme();
|
|
6498
|
-
const [containerWidth, setContainerWidth] =
|
|
6499
|
-
const handleLayout =
|
|
6492
|
+
const [containerWidth, setContainerWidth] = React55.useState(0);
|
|
6493
|
+
const handleLayout = React55.useCallback((e) => {
|
|
6500
6494
|
const w = e.nativeEvent.layout.width;
|
|
6501
6495
|
if (w > 0 && w !== containerWidth) {
|
|
6502
6496
|
setContainerWidth(w);
|
|
@@ -6553,12 +6547,12 @@ function StatsComponent({
|
|
|
6553
6547
|
}
|
|
6554
6548
|
}[variant];
|
|
6555
6549
|
const iconColorResolved = iconColor ?? colors.primary;
|
|
6556
|
-
const resolvedIcon = iconName ? /* @__PURE__ */
|
|
6557
|
-
const iconElement = resolvedIcon ? /* @__PURE__ */
|
|
6558
|
-
const valueElement = /* @__PURE__ */
|
|
6559
|
-
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));
|
|
6560
6554
|
if (onPress) {
|
|
6561
|
-
return /* @__PURE__ */
|
|
6555
|
+
return /* @__PURE__ */ React55__default.default.createElement(
|
|
6562
6556
|
PressableCard,
|
|
6563
6557
|
{
|
|
6564
6558
|
onPress: handlePress,
|
|
@@ -6574,18 +6568,18 @@ function StatsComponent({
|
|
|
6574
6568
|
return cardContent;
|
|
6575
6569
|
}
|
|
6576
6570
|
function StatsGroup({ children, gap = s(12), style }) {
|
|
6577
|
-
return /* @__PURE__ */
|
|
6578
|
-
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;
|
|
6579
6573
|
const childStyle = child.props.style;
|
|
6580
6574
|
const mergedStyle = childStyle ? [childStyle, { alignSelf: "stretch" }] : [{ alignSelf: "stretch" }];
|
|
6581
|
-
return /* @__PURE__ */
|
|
6575
|
+
return /* @__PURE__ */ React55__default.default.createElement(reactNative.View, { style: styles49.groupItem }, React55__default.default.cloneElement(
|
|
6582
6576
|
child,
|
|
6583
6577
|
{ style: mergedStyle }
|
|
6584
6578
|
));
|
|
6585
6579
|
}));
|
|
6586
6580
|
}
|
|
6587
|
-
var Stats = Object.assign(
|
|
6588
|
-
var
|
|
6581
|
+
var Stats = Object.assign(React55__default.default.memo(StatsComponent), { Group: StatsGroup });
|
|
6582
|
+
var styles49 = reactNative.StyleSheet.create({
|
|
6589
6583
|
card: {
|
|
6590
6584
|
borderRadius: RADIUS.md,
|
|
6591
6585
|
borderWidth: 1,
|
|
@@ -6635,6 +6629,197 @@ var styles50 = reactNative.StyleSheet.create({
|
|
|
6635
6629
|
flex: 1
|
|
6636
6630
|
}
|
|
6637
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
|
+
});
|
|
6638
6823
|
|
|
6639
6824
|
// src/utils/typography.ts
|
|
6640
6825
|
function getResponsiveFontSize(text, maxSize, steps = [
|
|
@@ -6650,34 +6835,26 @@ function getResponsiveFontSize(text, maxSize, steps = [
|
|
|
6650
6835
|
return maxSize - 8;
|
|
6651
6836
|
}
|
|
6652
6837
|
function useConfirmDialog(options) {
|
|
6653
|
-
const [visible, setVisible] =
|
|
6654
|
-
const [loading, setLoading] =
|
|
6655
|
-
const
|
|
6656
|
-
const
|
|
6657
|
-
|
|
6658
|
-
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(() => {
|
|
6659
6843
|
onConfirmRef.current = options.onConfirm;
|
|
6660
6844
|
onCancelRef.current = options.onCancel;
|
|
6661
6845
|
});
|
|
6662
|
-
|
|
6663
|
-
|
|
6664
|
-
mountedRef.current = false;
|
|
6665
|
-
};
|
|
6666
|
-
}, []);
|
|
6667
|
-
const open = React54.useCallback(() => setVisible(true), []);
|
|
6668
|
-
const handleConfirm = React54.useCallback(async () => {
|
|
6846
|
+
const open = React55.useCallback(() => setVisible(true), []);
|
|
6847
|
+
const handleConfirm = React55.useCallback(async () => {
|
|
6669
6848
|
setLoading(true);
|
|
6670
6849
|
try {
|
|
6671
6850
|
await onConfirmRef.current();
|
|
6672
6851
|
} catch {
|
|
6673
6852
|
} finally {
|
|
6674
|
-
|
|
6675
|
-
|
|
6676
|
-
setVisible(false);
|
|
6677
|
-
}
|
|
6853
|
+
setLoading(false);
|
|
6854
|
+
setVisible(false);
|
|
6678
6855
|
}
|
|
6679
6856
|
}, []);
|
|
6680
|
-
const handleCancel =
|
|
6857
|
+
const handleCancel = React55.useCallback(() => {
|
|
6681
6858
|
setVisible(false);
|
|
6682
6859
|
onCancelRef.current?.();
|
|
6683
6860
|
}, []);
|
|
@@ -6729,18 +6906,19 @@ exports.ICON_SIZES = ICON_SIZES;
|
|
|
6729
6906
|
exports.Icon = Icon;
|
|
6730
6907
|
exports.IconButton = IconButton;
|
|
6731
6908
|
exports.IconPicker = IconPicker;
|
|
6909
|
+
exports.Image = Image7;
|
|
6732
6910
|
exports.ImageUpload = ImageUpload;
|
|
6733
6911
|
exports.ImageViewer = ImageViewer;
|
|
6734
6912
|
exports.Input = Input;
|
|
6735
6913
|
exports.LabelValue = LabelValue;
|
|
6736
6914
|
exports.ListGroup = ListGroup;
|
|
6737
|
-
exports.ListGroupFooter =
|
|
6738
|
-
exports.ListGroupHeader =
|
|
6915
|
+
exports.ListGroupFooter = ItemGroupFooter;
|
|
6916
|
+
exports.ListGroupHeader = ItemGroupHeader;
|
|
6739
6917
|
exports.ListItem = ListItem;
|
|
6740
6918
|
exports.MediaCard = MediaCard;
|
|
6741
6919
|
exports.MenuGroup = MenuGroup;
|
|
6742
|
-
exports.MenuGroupFooter =
|
|
6743
|
-
exports.MenuGroupHeader =
|
|
6920
|
+
exports.MenuGroupFooter = ItemGroupFooter;
|
|
6921
|
+
exports.MenuGroupHeader = ItemGroupHeader;
|
|
6744
6922
|
exports.MenuItem = MenuItem;
|
|
6745
6923
|
exports.MonthPicker = MonthPicker;
|
|
6746
6924
|
exports.NumberStepper = NumberStepper;
|
|
@@ -6753,12 +6931,16 @@ exports.RadioGroup = RadioGroup;
|
|
|
6753
6931
|
exports.RetrayProvider = RetrayProvider;
|
|
6754
6932
|
exports.SHADOWS = SHADOWS;
|
|
6755
6933
|
exports.SPACING = SPACING;
|
|
6934
|
+
exports.ScreenContainer = ScreenContainer;
|
|
6756
6935
|
exports.Select = Select;
|
|
6757
6936
|
exports.SelectableCard = SelectableCard;
|
|
6758
6937
|
exports.SelectableCardGroup = SelectableCardGroup;
|
|
6759
6938
|
exports.SelectableGrid = SelectableGrid;
|
|
6760
6939
|
exports.Separator = Separator;
|
|
6761
6940
|
exports.Sheet = Sheet;
|
|
6941
|
+
exports.SheetContent = SheetContent;
|
|
6942
|
+
exports.SheetFooter = SheetFooter;
|
|
6943
|
+
exports.SheetHeader = SheetHeader;
|
|
6762
6944
|
exports.SheetSelect = SheetSelect;
|
|
6763
6945
|
exports.Skeleton = Skeleton;
|
|
6764
6946
|
exports.Slider = Slider;
|
|
@@ -6774,6 +6956,7 @@ exports.Textarea = Textarea;
|
|
|
6774
6956
|
exports.ThemeProvider = ThemeProvider;
|
|
6775
6957
|
exports.ToastProvider = ToastProvider;
|
|
6776
6958
|
exports.Toggle = Toggle;
|
|
6959
|
+
exports.VirtualizedList = VirtualizedList;
|
|
6777
6960
|
exports.dateToMonthPickerValue = dateToMonthPickerValue;
|
|
6778
6961
|
exports.defaultDark = defaultDark;
|
|
6779
6962
|
exports.defaultLight = defaultLight;
|
|
@@ -6789,6 +6972,7 @@ exports.notificationSuccess = notificationSuccess;
|
|
|
6789
6972
|
exports.notificationWarning = notificationWarning;
|
|
6790
6973
|
exports.selectionAsync = selectionAsync;
|
|
6791
6974
|
exports.useConfirmDialog = useConfirmDialog;
|
|
6975
|
+
exports.useSheetModal = useSheetModal;
|
|
6792
6976
|
exports.useTheme = useTheme;
|
|
6793
6977
|
exports.useToast = useToast;
|
|
6794
6978
|
exports.withAlpha = withAlpha;
|