@sincpro/mobile-ui 3.0.1 → 3.1.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/dist/Actions/Actions.Button.d.ts +6 -6
- package/dist/Actions/Actions.Button.js +650 -180
- package/dist/Actions/Actions.Dock.d.ts +1 -1
- package/dist/Actions/Actions.Dock.js +297 -18
- package/dist/Actions/Actions.FAB.js +100 -12
- package/dist/Actions/Actions.FilterButton.d.ts +17 -0
- package/dist/Actions/Actions.FilterButton.js +263 -33
- package/dist/Actions/Actions.IconButton.d.ts +1 -0
- package/dist/Actions/Actions.IconButton.js +196 -33
- package/dist/Actions/index.js +13 -13
- package/dist/Dialog/Confirmation.context.js +82 -16
- package/dist/Dialog/Dialog.ActionSheet.js +200 -41
- package/dist/Dialog/Dialog.Confirmation.js +168 -31
- package/dist/Dialog/Dialog.EditValue.js +449 -61
- package/dist/Dialog/Dialog.Sheet.d.ts +7 -3
- package/dist/Dialog/Dialog.Sheet.js +231 -15
- package/dist/Dialog/OverlayHost.d.ts +23 -0
- package/dist/Dialog/OverlayHost.js +196 -0
- package/dist/Dialog/SheetSurface.d.ts +24 -0
- package/dist/Dialog/SheetSurface.js +441 -0
- package/dist/Dialog/dialog-actions.d.ts +17 -0
- package/dist/Dialog/dialog-actions.js +59 -0
- package/dist/Dialog/index.d.ts +4 -1
- package/dist/Dialog/index.js +8 -7
- package/dist/Dialog/overlay.store.d.ts +24 -0
- package/dist/Dialog/overlay.store.js +59 -0
- package/dist/Dialog/requestConfirmation.js +20 -10
- package/dist/Display/Display.Accordion.js +185 -13
- package/dist/Display/Display.AmountSummary.js +206 -15
- package/dist/Display/Display.Avatar.js +93 -31
- package/dist/Display/Display.AvatarGroup.js +132 -17
- package/dist/Display/Display.Badge.d.ts +18 -2
- package/dist/Display/Display.Badge.js +117 -49
- package/dist/Display/Display.Card.js +163 -26
- package/dist/Display/Display.Carousel.js +459 -105
- package/dist/Display/Display.Chip.d.ts +4 -1
- package/dist/Display/Display.Chip.js +165 -31
- package/dist/Display/Display.CircleButton.d.ts +1 -0
- package/dist/Display/Display.CircleButton.js +86 -27
- package/dist/Display/Display.CopyableText.js +289 -66
- package/dist/Display/Display.CountRecords.js +60 -3
- package/dist/Display/Display.DataTable.js +123 -13
- package/dist/Display/Display.Date.js +243 -33
- package/dist/Display/Display.Divider.d.ts +10 -10
- package/dist/Display/Display.Divider.js +67 -20
- package/dist/Display/Display.ExpoImage.js +97 -8
- package/dist/Display/Display.GradientSurface.d.ts +9 -4
- package/dist/Display/Display.GradientSurface.js +196 -46
- package/dist/Display/Display.Icon.js +129 -15
- package/dist/Display/Display.IconBadge.js +95 -25
- package/dist/Display/Display.Image.d.ts +7 -1
- package/dist/Display/Display.Image.js +344 -39
- package/dist/Display/Display.KeyValue.js +90 -5
- package/dist/Display/Display.ListGroup.js +181 -9
- package/dist/Display/Display.ListItem.js +324 -28
- package/dist/Display/Display.Logo.js +84 -29
- package/dist/Display/Display.MediaCard.js +125 -4
- package/dist/Display/Display.MediaEmbed.d.ts +0 -5
- package/dist/Display/Display.MediaEmbed.js +170 -26
- package/dist/Display/Display.MenuButton.d.ts +2 -2
- package/dist/Display/Display.MenuButton.js +380 -94
- package/dist/Display/Display.MenuCard.js +122 -18
- package/dist/Display/Display.MenuGrid.js +43 -3
- package/dist/Display/Display.Monetary.js +90 -5
- package/dist/Display/Display.Pattern.js +306 -47
- package/dist/Display/Display.PriceTag.js +117 -14
- package/dist/Display/Display.ProductCard.js +154 -4
- package/dist/Display/Display.Rating.js +92 -11
- package/dist/Display/Display.SearchHistory.js +132 -6
- package/dist/Display/Display.SectionHeader.d.ts +5 -1
- package/dist/Display/Display.SectionHeader.js +125 -12
- package/dist/Display/Display.Stat.js +62 -3
- package/dist/Display/Display.StatCard.js +131 -7
- package/dist/Display/Display.StatusBadge.d.ts +29 -0
- package/dist/Display/Display.StatusBadge.js +68 -0
- package/dist/Display/Display.StatusDot.js +93 -18
- package/dist/Display/Display.Story.js +285 -35
- package/dist/Display/Display.StoryTray.js +354 -34
- package/dist/Display/Display.StoryViewer.js +571 -72
- package/dist/Display/Display.SwipeableRow.js +141 -20
- package/dist/Display/Display.Tag.d.ts +4 -1
- package/dist/Display/Display.Tag.js +66 -4
- package/dist/Display/Display.Timeline.js +102 -13
- package/dist/Display/Display.Tooltip.js +122 -26
- package/dist/Display/chevron.d.ts +6 -0
- package/dist/Display/chevron.js +32 -0
- package/dist/Display/count-badge.d.ts +21 -0
- package/dist/Display/count-badge.js +124 -0
- package/dist/Display/group-title.d.ts +10 -0
- package/dist/Display/group-title.js +53 -0
- package/dist/Display/icon-font.d.ts +3 -0
- package/dist/Display/icon-font.ios.d.ts +3 -0
- package/dist/Display/icon-font.ios.js +4 -0
- package/dist/Display/icon-font.js +7 -0
- package/dist/Display/icon-glyphs.d.ts +2 -0
- package/dist/Display/icon-glyphs.js +87 -0
- package/dist/Display/icon-map.d.ts +5 -1
- package/dist/Display/icon-map.js +340 -84
- package/dist/Display/icon-registry.d.ts +21 -0
- package/dist/Display/icon-registry.js +21 -0
- package/dist/Display/index.d.ts +6 -1
- package/dist/Display/index.js +53 -48
- package/dist/Display/pill.d.ts +16 -0
- package/dist/Display/pill.js +47 -0
- package/dist/Feedback/ErrorBoundary.js +35 -23
- package/dist/Feedback/Feedback.Banner.js +202 -24
- package/dist/Feedback/Feedback.DomainSplashScreen.js +246 -70
- package/dist/Feedback/Feedback.Empty.js +54 -3
- package/dist/Feedback/Feedback.EmptyState.js +114 -5
- package/dist/Feedback/Feedback.Error.d.ts +1 -1
- package/dist/Feedback/Feedback.Error.js +130 -5
- package/dist/Feedback/Feedback.Loading.d.ts +1 -1
- package/dist/Feedback/Feedback.Loading.js +70 -3
- package/dist/Feedback/Feedback.PermissionCard.js +161 -5
- package/dist/Feedback/Feedback.Progress.js +199 -41
- package/dist/Feedback/Feedback.ProgressCircle.js +184 -12
- package/dist/Feedback/Feedback.Skeleton.js +149 -36
- package/dist/Feedback/Feedback.Spinner.js +407 -79
- package/dist/Feedback/Feedback.Splash.js +240 -33
- package/dist/Feedback/Feedback.State.d.ts +17 -0
- package/dist/Feedback/Feedback.State.js +104 -0
- package/dist/Feedback/Toast.context.js +883 -167
- package/dist/Feedback/index.d.ts +3 -0
- package/dist/Feedback/index.js +15 -13
- package/dist/Form/Form.Checkbox.js +212 -22
- package/dist/Form/Form.ControlledCheckbox.d.ts +1 -1
- package/dist/Form/Form.ControlledCheckbox.js +46 -4
- package/dist/Form/Form.ControlledDropdown.d.ts +1 -1
- package/dist/Form/Form.ControlledDropdown.js +62 -4
- package/dist/Form/Form.ControlledInput.d.ts +4 -3
- package/dist/Form/Form.ControlledInput.js +72 -4
- package/dist/Form/Form.ControlledMonetaryInput.d.ts +6 -3
- package/dist/Form/Form.ControlledMonetaryInput.js +50 -4
- package/dist/Form/Form.ControlledRadioButton.d.ts +2 -2
- package/dist/Form/Form.ControlledRadioButton.js +45 -4
- package/dist/Form/Form.DatePicker.js +505 -107
- package/dist/Form/Form.Dropdown.js +303 -52
- package/dist/Form/Form.ErrorSummary.js +236 -44
- package/dist/Form/Form.Field.d.ts +24 -0
- package/dist/Form/Form.Field.js +55 -0
- package/dist/Form/Form.FractionalQuantityInput.js +508 -96
- package/dist/Form/Form.Input.d.ts +17 -3
- package/dist/Form/Form.Input.js +478 -29
- package/dist/Form/Form.KeyboardForm.d.ts +22 -8
- package/dist/Form/Form.KeyboardForm.js +83 -8
- package/dist/Form/Form.KeyboardToolbarHost.d.ts +14 -0
- package/dist/Form/Form.KeyboardToolbarHost.js +182 -0
- package/dist/Form/Form.MonetaryInput.js +164 -17
- package/dist/Form/Form.PickerField.d.ts +31 -0
- package/dist/Form/Form.PickerField.js +562 -0
- package/dist/Form/Form.PinInput.js +150 -15
- package/dist/Form/Form.QuantitySelector.js +229 -25
- package/dist/Form/Form.RadioButton.js +132 -24
- package/dist/Form/Form.Select.js +487 -56
- package/dist/Form/Form.Slider.js +133 -10
- package/dist/Form/Form.Switch.js +99 -4
- package/dist/Form/index.d.ts +11 -6
- package/dist/Form/index.js +26 -27
- package/dist/Form/input-text.d.ts +7 -0
- package/dist/Form/input-text.js +18 -0
- package/dist/Navigation/Navigation.AppBar.d.ts +3 -4
- package/dist/Navigation/Navigation.AppBar.js +535 -99
- package/dist/Navigation/Navigation.BottomNav.js +363 -98
- package/dist/Navigation/Navigation.CollapsingHeader.d.ts +28 -13
- package/dist/Navigation/Navigation.CollapsingHeader.js +369 -36
- package/dist/Navigation/Navigation.FloatingBar.js +71 -11
- package/dist/Navigation/Navigation.Menu.js +309 -95
- package/dist/Navigation/Navigation.MenuSection.js +80 -11
- package/dist/Navigation/Navigation.RowItem.d.ts +4 -2
- package/dist/Navigation/Navigation.RowItem.js +93 -8
- package/dist/Navigation/Navigation.Search.js +241 -27
- package/dist/Navigation/Navigation.SearchBar.d.ts +7 -1
- package/dist/Navigation/Navigation.SearchBar.js +218 -29
- package/dist/Navigation/Navigation.SearchSuggestions.js +77 -3
- package/dist/Navigation/Navigation.SegmentedControl.js +152 -14
- package/dist/Navigation/Navigation.Steps.js +105 -11
- package/dist/Navigation/Navigation.Tabs.js +449 -41
- package/dist/Navigation/index.d.ts +9 -4
- package/dist/Navigation/index.js +13 -13
- package/dist/Typography/Typography.Heading.js +33 -3
- package/dist/Typography/Typography.SelectableText.js +95 -7
- package/dist/Typography/Typography.Text.d.ts +4 -2
- package/dist/Typography/Typography.Text.js +217 -7
- package/dist/Typography/index.js +3 -3
- package/dist/branding.js +29 -13
- package/dist/icons/AddItemIcon.js +76 -2
- package/dist/icons/ArrangeCircle.js +82 -2
- package/dist/icons/ArrowDownIcon.js +63 -3
- package/dist/icons/ArrowUpIcon.js +63 -3
- package/dist/icons/BoxIcon.js +64 -2
- package/dist/icons/BoxTimeIcon.js +63 -2
- package/dist/icons/CalendarIcon.js +145 -2
- package/dist/icons/CardIcon.js +80 -2
- package/dist/icons/CashierIcon.js +39 -2
- package/dist/icons/CreditIcon.js +76 -3
- package/dist/icons/DuoIcon.js +75 -2
- package/dist/icons/HomeIcon.js +39 -2
- package/dist/icons/HomeIconOutlined.js +53 -2
- package/dist/icons/LogoIcon.js +87 -2
- package/dist/icons/MoneyReceiveIcon.js +86 -2
- package/dist/icons/PinIcon.js +39 -2
- package/dist/icons/ProfileIcon.js +47 -2
- package/dist/icons/SettingsIcon.js +114 -2
- package/dist/icons/SinpeIcon.js +60 -2
- package/dist/icons/ToggleOffIcon.js +53 -2
- package/dist/icons/WalletMoneyIcon.js +81 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +8 -2
- package/dist/layouts/AuthContainer.d.ts +4 -5
- package/dist/layouts/AuthContainer.js +231 -7
- package/dist/layouts/BottomInset.js +4 -1
- package/dist/layouts/Container.d.ts +2 -2
- package/dist/layouts/Container.js +45 -3
- package/dist/layouts/GradientContainer.js +37 -5
- package/dist/layouts/PlainLayout.js +19 -3
- package/dist/layouts/ScrollContainer.d.ts +14 -9
- package/dist/layouts/ScrollContainer.js +125 -4
- package/dist/layouts/edges.d.ts +2 -0
- package/dist/layouts/edges.js +1 -0
- package/dist/primitives/AspectRatio.js +75 -3
- package/dist/primitives/Box.js +45 -3
- package/dist/primitives/Pressable.js +95 -5
- package/dist/primitives/Row.js +84 -13
- package/dist/primitives/Spacer.js +42 -5
- package/dist/primitives/Stack.js +66 -7
- package/dist/primitives/index.js +1 -1
- package/dist/theme/active.js +20 -18
- package/dist/theme/build.js +118 -87
- package/dist/theme/color.js +87 -87
- package/dist/theme/components/ThemedActivityIndicator.d.ts +2 -15
- package/dist/theme/components/ThemedActivityIndicator.js +35 -3
- package/dist/theme/components/index.js +1 -0
- package/dist/theme/contrast.js +32 -33
- package/dist/theme/css-vars.js +71 -75
- package/dist/theme/dark.js +116 -97
- package/dist/theme/default.js +116 -97
- package/dist/theme/define.js +16 -12
- package/dist/theme/index.d.ts +1 -0
- package/dist/theme/index.js +7 -6
- package/dist/theme/on-dark-surface.d.ts +12 -0
- package/dist/theme/on-dark-surface.js +13 -0
- package/dist/theme/theme.js +1 -0
- package/dist/theme/tw.js +3 -1
- package/dist/theme/types.js +0 -18
- package/dist/theme/typography.d.ts +1 -1
- package/dist/theme/typography.js +337 -303
- package/dist/theme/useTheme.js +12 -3
- package/dist/theme/useThemeVars.d.ts +9 -0
- package/dist/theme/useThemeVars.js +23 -0
- package/dist/theme/validate.js +175 -166
- package/dist/tokens/index.js +1 -1
- package/dist/tokens/motion.js +30 -13
- package/dist/utils/async.d.ts +14 -0
- package/dist/utils/async.js +22 -0
- package/dist/utils/criteria.js +66 -85
- package/dist/utils/date.d.ts +8 -2
- package/dist/utils/date.js +63 -50
- package/dist/utils/image.js +8 -8
- package/dist/utils/intl.d.ts +1 -0
- package/dist/utils/intl.js +13 -0
- package/dist/utils/keys.js +3 -5
- package/dist/utils/monetary.d.ts +1 -0
- package/dist/utils/monetary.js +28 -24
- package/dist/utils/progress.js +2 -3
- package/dist/utils/quantity.js +25 -26
- package/dist/utils/reorder.js +11 -20
- package/dist/utils/search.d.ts +4 -0
- package/dist/utils/search.js +12 -0
- package/dist/utils/serializer.js +38 -38
- package/dist/utils/useReducedMotion.js +32 -30
- package/dist/views/AppSplashView.js +117 -3
- package/dist/views/AuthFormView.d.ts +4 -5
- package/dist/views/AuthFormView.js +119 -11
- package/dist/views/FormViewV2.context.js +75 -23
- package/dist/views/FormViewV2.d.ts +4 -5
- package/dist/views/FormViewV2.js +658 -92
- package/dist/views/ListViewV2.context.js +91 -47
- package/dist/views/ListViewV2.d.ts +84 -43
- package/dist/views/ListViewV2.js +1350 -200
- package/dist/views/Wizard/Wizard.context.js +248 -84
- package/dist/views/Wizard/Wizard.js +260 -67
- package/dist/views/types/IListView.js +34 -31
- package/dist/widgets/CollectionOptions.js +557 -138
- package/dist/widgets/FilterBar.js +159 -7
- package/dist/widgets/FilterBuilder.js +375 -102
- package/dist/widgets/JSONViewer.js +275 -129
- package/dist/widgets/PromoBanner.js +336 -42
- package/dist/widgets/PromoModal.d.ts +2 -2
- package/dist/widgets/PromoModal.js +389 -62
- package/dist/widgets/QueryChoice.js +150 -8
- package/dist/widgets/QuickActions.js +120 -31
- package/dist/widgets/ReorderableList.js +399 -128
- package/dist/widgets/TimeZoneSelectorModal.js +458 -51
- package/dist/widgets/index.js +3 -3
- package/package.json +6 -1
- package/tailwind.preset.js +7 -5
- package/dist/Form/Form.InputField.d.ts +0 -10
- package/dist/Form/Form.InputField.js +0 -38
- package/dist/Form/Form.KeyboardToolbar.d.ts +0 -22
- package/dist/Form/Form.KeyboardToolbar.js +0 -66
- package/dist/Form/Form.PasswordInput.d.ts +0 -9
- package/dist/Form/Form.PasswordInput.js +0 -17
- package/dist/Form/Form.TextInput.d.ts +0 -8
- package/dist/Form/Form.TextInput.js +0 -8
- package/dist/primitives/BaseButton.d.ts +0 -150
- package/dist/primitives/BaseButton.js +0 -229
- package/dist/utils/useSheetTranslation.d.ts +0 -5
- package/dist/utils/useSheetTranslation.js +0 -23
|
@@ -1,107 +1,321 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { MenuView } from "@expo/ui/community/menu";
|
|
3
3
|
import Icon from "../Display/Display.Icon.js";
|
|
4
4
|
import { ICON_MAP } from "../Display/icon-map.js";
|
|
5
5
|
import { relativeLuminance, useTheme } from "../theme/index.js";
|
|
6
6
|
import { unstable_getMaterialSymbolSourceAsync } from "expo-symbols";
|
|
7
7
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
8
|
-
import { ActivityIndicator, Alert, Platform, View
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
8
|
+
import { ActivityIndicator, Alert, Platform, View } from "react-native";
|
|
9
|
+
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
10
|
+
const iconSources = new Map();
|
|
11
|
+
|
|
12
|
+
/** One native rasterization per icon and color for the whole app. */
|
|
13
|
+
function menuIconSource(icon, color) {
|
|
14
|
+
const key = `${icon}:${color}`;
|
|
15
|
+
let source = iconSources.get(key);
|
|
16
|
+
if (!source) {
|
|
17
|
+
source = unstable_getMaterialSymbolSourceAsync(ICON_MAP[icon].md, 24, color).catch(cause => {
|
|
18
|
+
iconSources.delete(key);
|
|
19
|
+
throw cause;
|
|
20
|
+
});
|
|
21
|
+
iconSources.set(key, source);
|
|
22
|
+
}
|
|
23
|
+
return source;
|
|
24
|
+
}
|
|
25
|
+
function Menu(t0) {
|
|
26
|
+
const $ = _c(52);
|
|
27
|
+
const {
|
|
28
|
+
items,
|
|
29
|
+
trigger,
|
|
30
|
+
title,
|
|
31
|
+
disabled: t1,
|
|
32
|
+
accessibilityLabel: t2,
|
|
33
|
+
style,
|
|
34
|
+
testID
|
|
35
|
+
} = t0;
|
|
36
|
+
const disabled = t1 === undefined ? false : t1;
|
|
37
|
+
const accessibilityLabel = t2 === undefined ? "M\xE1s opciones" : t2;
|
|
38
|
+
const theme = useTheme();
|
|
39
|
+
const running = useRef(false);
|
|
40
|
+
const [pending, setPending] = useState(false);
|
|
41
|
+
let t3;
|
|
42
|
+
if ($[0] !== disabled || $[1] !== items || $[2] !== pending) {
|
|
43
|
+
t3 = disabled || pending || !items.some(_temp);
|
|
44
|
+
$[0] = disabled;
|
|
45
|
+
$[1] = items;
|
|
46
|
+
$[2] = pending;
|
|
47
|
+
$[3] = t3;
|
|
48
|
+
} else {
|
|
49
|
+
t3 = $[3];
|
|
50
|
+
}
|
|
51
|
+
const blocked = t3;
|
|
52
|
+
const [sources, setSources] = useState(_temp2);
|
|
53
|
+
let t4;
|
|
54
|
+
if ($[4] !== items || $[5] !== theme.danger || $[6] !== theme.icon.secondary) {
|
|
55
|
+
let t5;
|
|
56
|
+
if ($[8] !== theme.danger || $[9] !== theme.icon.secondary) {
|
|
57
|
+
t5 = entry_0 => "separator" in entry_0 || !entry_0.icon ? [] : [{
|
|
58
|
+
icon: entry_0.icon,
|
|
59
|
+
color: entry_0.destructive ? theme.danger : theme.icon.secondary
|
|
60
|
+
}];
|
|
61
|
+
$[8] = theme.danger;
|
|
62
|
+
$[9] = theme.icon.secondary;
|
|
63
|
+
$[10] = t5;
|
|
64
|
+
} else {
|
|
65
|
+
t5 = $[10];
|
|
66
|
+
}
|
|
67
|
+
t4 = items.flatMap(t5);
|
|
68
|
+
$[4] = items;
|
|
69
|
+
$[5] = theme.danger;
|
|
70
|
+
$[6] = theme.icon.secondary;
|
|
71
|
+
$[7] = t4;
|
|
72
|
+
} else {
|
|
73
|
+
t4 = $[7];
|
|
74
|
+
}
|
|
75
|
+
const requests = t4;
|
|
76
|
+
let t5;
|
|
77
|
+
let t6;
|
|
78
|
+
if ($[11] !== requests) {
|
|
79
|
+
t5 = () => {
|
|
80
|
+
if (Platform.OS !== "android" || !requests.length) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
let active = true;
|
|
84
|
+
Promise.all(requests.map(_temp3)).then(results => {
|
|
85
|
+
if (!active) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
const next = new Map();
|
|
89
|
+
for (const {
|
|
90
|
+
key,
|
|
91
|
+
source
|
|
92
|
+
} of results) {
|
|
93
|
+
if (source) {
|
|
94
|
+
next.set(key, source);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
setSources(next);
|
|
98
|
+
}, _temp4);
|
|
99
|
+
return () => {
|
|
100
|
+
active = false;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
t6 = [requests];
|
|
104
|
+
$[11] = requests;
|
|
105
|
+
$[12] = t5;
|
|
106
|
+
$[13] = t6;
|
|
107
|
+
} else {
|
|
108
|
+
t5 = $[12];
|
|
109
|
+
t6 = $[13];
|
|
110
|
+
}
|
|
111
|
+
useEffect(t5, t6);
|
|
112
|
+
let t7;
|
|
113
|
+
if ($[14] !== blocked || $[15] !== items || $[16] !== sources || $[17] !== theme.danger || $[18] !== theme.icon.secondary || $[19] !== theme.text) {
|
|
46
114
|
const groups = [[]];
|
|
47
|
-
items.forEach((
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
115
|
+
items.forEach((entry_1, index) => {
|
|
116
|
+
if ("separator" in entry_1) {
|
|
117
|
+
if (groups[groups.length - 1].length) {
|
|
118
|
+
groups.push([]);
|
|
119
|
+
}
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
const color_0 = entry_1.disabled ? theme.text.disabled : entry_1.destructive ? theme.danger : theme.text.primary;
|
|
123
|
+
const imageColor = entry_1.destructive ? theme.danger : theme.icon.secondary;
|
|
124
|
+
groups[groups.length - 1].push({
|
|
125
|
+
id: String(index),
|
|
126
|
+
title: entry_1.label,
|
|
127
|
+
titleColor: color_0,
|
|
128
|
+
image: entry_1.icon ? Platform.OS === "ios" ? ICON_MAP[entry_1.icon].sf : sources.get(`${entry_1.icon}:${imageColor}`) : undefined,
|
|
129
|
+
imageColor,
|
|
130
|
+
attributes: {
|
|
131
|
+
disabled: blocked || entry_1.disabled,
|
|
132
|
+
destructive: entry_1.destructive
|
|
52
133
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
const sections = groups.filter(_temp5);
|
|
137
|
+
t7 = sections.length > 1 ? sections.map(_temp6) : sections[0] ?? [];
|
|
138
|
+
$[14] = blocked;
|
|
139
|
+
$[15] = items;
|
|
140
|
+
$[16] = sources;
|
|
141
|
+
$[17] = theme.danger;
|
|
142
|
+
$[18] = theme.icon.secondary;
|
|
143
|
+
$[19] = theme.text;
|
|
144
|
+
$[20] = t7;
|
|
145
|
+
} else {
|
|
146
|
+
t7 = $[20];
|
|
147
|
+
}
|
|
148
|
+
const actions = t7;
|
|
149
|
+
const t8 = blocked ? "none" : "auto";
|
|
150
|
+
const t9 = relativeLuminance(theme.bg.card) < 0.179 ? "dark" : "light";
|
|
151
|
+
let t10;
|
|
152
|
+
if ($[21] !== blocked || $[22] !== items) {
|
|
153
|
+
t10 = t11 => {
|
|
154
|
+
const {
|
|
155
|
+
nativeEvent
|
|
156
|
+
} = t11;
|
|
157
|
+
const entry_2 = items.find((_, index_1) => String(index_1) === nativeEvent.event);
|
|
158
|
+
if (!entry_2 || "separator" in entry_2 || blocked || entry_2.disabled || running.current) {
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
running.current = true;
|
|
162
|
+
setPending(true);
|
|
163
|
+
Promise.resolve().then(() => entry_2.onPress()).catch(_temp7).finally(() => {
|
|
164
|
+
running.current = false;
|
|
165
|
+
setPending(false);
|
|
166
|
+
});
|
|
167
|
+
};
|
|
168
|
+
$[21] = blocked;
|
|
169
|
+
$[22] = items;
|
|
170
|
+
$[23] = t10;
|
|
171
|
+
} else {
|
|
172
|
+
t10 = $[23];
|
|
173
|
+
}
|
|
174
|
+
let t11;
|
|
175
|
+
if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
|
|
176
|
+
t11 = {
|
|
177
|
+
minWidth: 48,
|
|
178
|
+
minHeight: 48
|
|
179
|
+
};
|
|
180
|
+
$[24] = t11;
|
|
181
|
+
} else {
|
|
182
|
+
t11 = $[24];
|
|
183
|
+
}
|
|
184
|
+
const t12 = testID ? `${testID}-native-menu` : undefined;
|
|
185
|
+
let t13;
|
|
186
|
+
if ($[25] !== blocked || $[26] !== pending) {
|
|
187
|
+
t13 = {
|
|
188
|
+
disabled: blocked,
|
|
189
|
+
busy: pending
|
|
190
|
+
};
|
|
191
|
+
$[25] = blocked;
|
|
192
|
+
$[26] = pending;
|
|
193
|
+
$[27] = t13;
|
|
194
|
+
} else {
|
|
195
|
+
t13 = $[27];
|
|
196
|
+
}
|
|
197
|
+
const t14 = blocked ? 0.5 : 1;
|
|
198
|
+
let t15;
|
|
199
|
+
if ($[28] !== t14) {
|
|
200
|
+
t15 = {
|
|
201
|
+
minWidth: 48,
|
|
202
|
+
minHeight: 48,
|
|
203
|
+
alignItems: "center",
|
|
204
|
+
justifyContent: "center",
|
|
205
|
+
opacity: t14
|
|
206
|
+
};
|
|
207
|
+
$[28] = t14;
|
|
208
|
+
$[29] = t15;
|
|
209
|
+
} else {
|
|
210
|
+
t15 = $[29];
|
|
211
|
+
}
|
|
212
|
+
let t16;
|
|
213
|
+
if ($[30] !== pending || $[31] !== theme.icon.secondary || $[32] !== theme.primary || $[33] !== trigger) {
|
|
214
|
+
t16 = pending ? _jsx(ActivityIndicator, {
|
|
215
|
+
color: theme.primary
|
|
216
|
+
}) : trigger ?? _jsx(Icon, {
|
|
217
|
+
color: theme.icon.secondary,
|
|
218
|
+
name: "more-vertical",
|
|
219
|
+
size: 22
|
|
220
|
+
});
|
|
221
|
+
$[30] = pending;
|
|
222
|
+
$[31] = theme.icon.secondary;
|
|
223
|
+
$[32] = theme.primary;
|
|
224
|
+
$[33] = trigger;
|
|
225
|
+
$[34] = t16;
|
|
226
|
+
} else {
|
|
227
|
+
t16 = $[34];
|
|
228
|
+
}
|
|
229
|
+
let t17;
|
|
230
|
+
if ($[35] !== accessibilityLabel || $[36] !== t13 || $[37] !== t15 || $[38] !== t16) {
|
|
231
|
+
t17 = _jsx(View, {
|
|
232
|
+
accessibilityLabel: accessibilityLabel,
|
|
233
|
+
accessibilityRole: "button",
|
|
234
|
+
accessibilityState: t13,
|
|
235
|
+
accessible: true,
|
|
236
|
+
pointerEvents: "none",
|
|
237
|
+
style: t15,
|
|
238
|
+
children: t16
|
|
71
239
|
});
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
240
|
+
$[35] = accessibilityLabel;
|
|
241
|
+
$[36] = t13;
|
|
242
|
+
$[37] = t15;
|
|
243
|
+
$[38] = t16;
|
|
244
|
+
$[39] = t17;
|
|
245
|
+
} else {
|
|
246
|
+
t17 = $[39];
|
|
247
|
+
}
|
|
248
|
+
let t18;
|
|
249
|
+
if ($[40] !== actions || $[41] !== t10 || $[42] !== t12 || $[43] !== t17 || $[44] !== t9 || $[45] !== title) {
|
|
250
|
+
t18 = _jsx(MenuView, {
|
|
251
|
+
actions: actions,
|
|
252
|
+
colorScheme: t9,
|
|
253
|
+
onPressAction: t10,
|
|
254
|
+
style: t11,
|
|
255
|
+
testID: t12,
|
|
256
|
+
title: title,
|
|
257
|
+
children: t17
|
|
258
|
+
});
|
|
259
|
+
$[40] = actions;
|
|
260
|
+
$[41] = t10;
|
|
261
|
+
$[42] = t12;
|
|
262
|
+
$[43] = t17;
|
|
263
|
+
$[44] = t9;
|
|
264
|
+
$[45] = title;
|
|
265
|
+
$[46] = t18;
|
|
266
|
+
} else {
|
|
267
|
+
t18 = $[46];
|
|
268
|
+
}
|
|
269
|
+
let t19;
|
|
270
|
+
if ($[47] !== style || $[48] !== t18 || $[49] !== t8 || $[50] !== testID) {
|
|
271
|
+
t19 = _jsx(View, {
|
|
272
|
+
pointerEvents: t8,
|
|
273
|
+
style: style,
|
|
274
|
+
testID: testID,
|
|
275
|
+
children: t18
|
|
276
|
+
});
|
|
277
|
+
$[47] = style;
|
|
278
|
+
$[48] = t18;
|
|
279
|
+
$[49] = t8;
|
|
280
|
+
$[50] = testID;
|
|
281
|
+
$[51] = t19;
|
|
282
|
+
} else {
|
|
283
|
+
t19 = $[51];
|
|
284
|
+
}
|
|
285
|
+
return t19;
|
|
286
|
+
}
|
|
287
|
+
function _temp7(cause_0) {
|
|
288
|
+
Alert.alert("No se pudo completar la acci\xF3n", cause_0 instanceof Error && cause_0.message.trim() ? cause_0.message : "Vuelve a intentarlo.");
|
|
289
|
+
}
|
|
290
|
+
function _temp6(subactions, index_0) {
|
|
291
|
+
return {
|
|
292
|
+
id: `section-${index_0}`,
|
|
293
|
+
title: "",
|
|
294
|
+
displayInline: true,
|
|
295
|
+
subactions
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
function _temp5(group) {
|
|
299
|
+
return group.length > 0;
|
|
300
|
+
}
|
|
301
|
+
function _temp4(cause) {
|
|
302
|
+
console.error("[Navigation.Menu] Could not render native icons", cause);
|
|
303
|
+
}
|
|
304
|
+
async function _temp3(t0) {
|
|
305
|
+
const {
|
|
306
|
+
icon,
|
|
307
|
+
color
|
|
308
|
+
} = t0;
|
|
309
|
+
return {
|
|
310
|
+
key: `${icon}:${color}`,
|
|
311
|
+
source: await menuIconSource(icon, color)
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
function _temp2() {
|
|
315
|
+
return new Map();
|
|
316
|
+
}
|
|
317
|
+
function _temp(entry) {
|
|
318
|
+
return !("separator" in entry);
|
|
105
319
|
}
|
|
106
320
|
export default Menu;
|
|
107
321
|
export { Menu };
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import Card from "../Display/Display.Card.js";
|
|
3
|
+
import { GroupTitle } from "../Display/group-title.js";
|
|
2
4
|
import { useTheme } from "../theme/index.js";
|
|
3
5
|
import { Typography } from "../Typography/index.js";
|
|
4
6
|
import { View } from "react-native";
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
5
8
|
/**
|
|
6
9
|
* Titled card that groups `Display.MenuButton` rows into a visual section.
|
|
7
10
|
* Mirrors iOS grouped-table-view style: title above, card surface, optional footer note.
|
|
@@ -12,14 +15,80 @@ import { View } from "react-native";
|
|
|
12
15
|
* <Display.MenuButton label="Ajustes" icon={SettingsIcon} onPress={...} showDivider={false} />
|
|
13
16
|
* </MenuSection>
|
|
14
17
|
*/
|
|
15
|
-
export function MenuSection(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
export function MenuSection(t0) {
|
|
19
|
+
const $ = _c(12);
|
|
20
|
+
const {
|
|
21
|
+
title,
|
|
22
|
+
footer,
|
|
23
|
+
children
|
|
24
|
+
} = t0;
|
|
25
|
+
const theme = useTheme();
|
|
26
|
+
let t1;
|
|
27
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
28
|
+
t1 = {
|
|
29
|
+
marginHorizontal: 16,
|
|
30
|
+
marginBottom: 20
|
|
31
|
+
};
|
|
32
|
+
$[0] = t1;
|
|
33
|
+
} else {
|
|
34
|
+
t1 = $[0];
|
|
35
|
+
}
|
|
36
|
+
let t2;
|
|
37
|
+
if ($[1] !== title) {
|
|
38
|
+
t2 = title ? _jsx(GroupTitle, {
|
|
39
|
+
style: {
|
|
40
|
+
marginBottom: 6,
|
|
41
|
+
paddingHorizontal: 4
|
|
42
|
+
},
|
|
43
|
+
children: title
|
|
44
|
+
}) : null;
|
|
45
|
+
$[1] = title;
|
|
46
|
+
$[2] = t2;
|
|
47
|
+
} else {
|
|
48
|
+
t2 = $[2];
|
|
49
|
+
}
|
|
50
|
+
let t3;
|
|
51
|
+
if ($[3] !== children) {
|
|
52
|
+
t3 = _jsx(Card, {
|
|
53
|
+
className: "overflow-hidden",
|
|
54
|
+
elevation: "sm",
|
|
55
|
+
padding: "none",
|
|
56
|
+
children: children
|
|
57
|
+
});
|
|
58
|
+
$[3] = children;
|
|
59
|
+
$[4] = t3;
|
|
60
|
+
} else {
|
|
61
|
+
t3 = $[4];
|
|
62
|
+
}
|
|
63
|
+
let t4;
|
|
64
|
+
if ($[5] !== footer || $[6] !== theme) {
|
|
65
|
+
t4 = footer ? _jsx(Typography.Text, {
|
|
66
|
+
style: {
|
|
67
|
+
color: theme.text.tertiary,
|
|
68
|
+
marginTop: 6,
|
|
69
|
+
paddingHorizontal: 4
|
|
70
|
+
},
|
|
71
|
+
variant: "caption",
|
|
72
|
+
children: footer
|
|
73
|
+
}) : null;
|
|
74
|
+
$[5] = footer;
|
|
75
|
+
$[6] = theme;
|
|
76
|
+
$[7] = t4;
|
|
77
|
+
} else {
|
|
78
|
+
t4 = $[7];
|
|
79
|
+
}
|
|
80
|
+
let t5;
|
|
81
|
+
if ($[8] !== t2 || $[9] !== t3 || $[10] !== t4) {
|
|
82
|
+
t5 = _jsxs(View, {
|
|
83
|
+
style: t1,
|
|
84
|
+
children: [t2, t3, t4]
|
|
85
|
+
});
|
|
86
|
+
$[8] = t2;
|
|
87
|
+
$[9] = t3;
|
|
88
|
+
$[10] = t4;
|
|
89
|
+
$[11] = t5;
|
|
90
|
+
} else {
|
|
91
|
+
t5 = $[11];
|
|
92
|
+
}
|
|
93
|
+
return t5;
|
|
25
94
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { IRowItemProps } from "../views/types/IListView.js";
|
|
2
|
-
|
|
2
|
+
/** The default row of `ListViewV2.Content`: the same row as `ListViewV2.Content.Row`. */
|
|
3
|
+
declare function RowItem({ item, className, onPress: onPressProp, readonly: readonlyProp, }: IRowItemProps<any> & {
|
|
3
4
|
className?: string;
|
|
4
5
|
}): import("react").JSX.Element;
|
|
5
|
-
|
|
6
|
+
declare const _default: import("react").MemoExoticComponent<typeof RowItem>;
|
|
7
|
+
export default _default;
|
|
@@ -1,11 +1,96 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import Pressable from "../primitives/Pressable.js";
|
|
2
3
|
import { cn } from "../theme/tw.js";
|
|
3
4
|
import { Typography } from "../Typography/index.js";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
import { memo } from "react";
|
|
6
|
+
import { View } from "react-native";
|
|
7
|
+
|
|
8
|
+
/** The default row of `ListViewV2.Content`: the same row as `ListViewV2.Content.Row`. */
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
10
|
+
function RowItem(t0) {
|
|
11
|
+
const $ = _c(15);
|
|
12
|
+
const {
|
|
13
|
+
item,
|
|
14
|
+
className,
|
|
15
|
+
onPress: onPressProp,
|
|
16
|
+
readonly: readonlyProp
|
|
17
|
+
} = t0;
|
|
18
|
+
const onPress = onPressProp === undefined ? item.onPress : onPressProp;
|
|
19
|
+
const readonly = readonlyProp === undefined ? item.readonly : readonlyProp;
|
|
20
|
+
let t1;
|
|
21
|
+
if ($[0] !== className) {
|
|
22
|
+
t1 = cn("flex-row items-center py-3 px-4 bg-bg-card border-b border-border-default", className);
|
|
23
|
+
$[0] = className;
|
|
24
|
+
$[1] = t1;
|
|
25
|
+
} else {
|
|
26
|
+
t1 = $[1];
|
|
27
|
+
}
|
|
28
|
+
let t2;
|
|
29
|
+
if ($[2] !== item.rowTitle) {
|
|
30
|
+
t2 = _jsx(Typography.Text, {
|
|
31
|
+
numberOfLines: 1,
|
|
32
|
+
semibold: true,
|
|
33
|
+
variant: "body",
|
|
34
|
+
children: item.rowTitle
|
|
35
|
+
});
|
|
36
|
+
$[2] = item.rowTitle;
|
|
37
|
+
$[3] = t2;
|
|
38
|
+
} else {
|
|
39
|
+
t2 = $[3];
|
|
40
|
+
}
|
|
41
|
+
let t3;
|
|
42
|
+
if ($[4] !== item.rowSubtitle) {
|
|
43
|
+
t3 = item.rowSubtitle ? _jsx(Typography.Text, {
|
|
44
|
+
className: "text-text-secondary",
|
|
45
|
+
variant: "bodySmall",
|
|
46
|
+
children: item.rowSubtitle
|
|
47
|
+
}) : null;
|
|
48
|
+
$[4] = item.rowSubtitle;
|
|
49
|
+
$[5] = t3;
|
|
50
|
+
} else {
|
|
51
|
+
t3 = $[5];
|
|
52
|
+
}
|
|
53
|
+
let t4;
|
|
54
|
+
if ($[6] !== t2 || $[7] !== t3) {
|
|
55
|
+
t4 = _jsxs(View, {
|
|
56
|
+
className: "flex-1 gap-0.5",
|
|
57
|
+
children: [t2, t3]
|
|
58
|
+
});
|
|
59
|
+
$[6] = t2;
|
|
60
|
+
$[7] = t3;
|
|
61
|
+
$[8] = t4;
|
|
62
|
+
} else {
|
|
63
|
+
t4 = $[8];
|
|
64
|
+
}
|
|
65
|
+
let t5;
|
|
66
|
+
if ($[9] !== t1 || $[10] !== t4) {
|
|
67
|
+
t5 = _jsx(View, {
|
|
68
|
+
className: t1,
|
|
69
|
+
children: t4
|
|
70
|
+
});
|
|
71
|
+
$[9] = t1;
|
|
72
|
+
$[10] = t4;
|
|
73
|
+
$[11] = t5;
|
|
74
|
+
} else {
|
|
75
|
+
t5 = $[11];
|
|
76
|
+
}
|
|
77
|
+
const content = t5;
|
|
78
|
+
if (readonly) {
|
|
79
|
+
return content;
|
|
80
|
+
}
|
|
81
|
+
let t6;
|
|
82
|
+
if ($[12] !== content || $[13] !== onPress) {
|
|
83
|
+
t6 = _jsx(Pressable, {
|
|
84
|
+
hitSlop: 0,
|
|
85
|
+
onPress: onPress,
|
|
86
|
+
children: content
|
|
87
|
+
});
|
|
88
|
+
$[12] = content;
|
|
89
|
+
$[13] = onPress;
|
|
90
|
+
$[14] = t6;
|
|
91
|
+
} else {
|
|
92
|
+
t6 = $[14];
|
|
93
|
+
}
|
|
94
|
+
return t6;
|
|
10
95
|
}
|
|
11
|
-
export default RowItem;
|
|
96
|
+
export default memo(RowItem);
|