@sincpro/mobile-ui 3.0.0 → 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 +7 -2
- 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,90 +1,418 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { useTheme } from "../theme/index.js";
|
|
3
3
|
import { cn } from "../theme/tw.js";
|
|
4
4
|
import { Typography } from "../Typography/index.js";
|
|
5
5
|
import { useReducedMotion } from "../utils/useReducedMotion.js";
|
|
6
6
|
import { useEffect } from "react";
|
|
7
7
|
import { ActivityIndicator, View } from "react-native";
|
|
8
|
-
import Animated, { cancelAnimation, Easing, useAnimatedStyle, useSharedValue, withDelay, withRepeat, withSequence, withTiming
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
import Animated, { cancelAnimation, Easing, useAnimatedStyle, useSharedValue, withDelay, withRepeat, withSequence, withTiming } from "react-native-reanimated";
|
|
9
|
+
|
|
10
|
+
// ─── Dots ─────────────────────────────────────────────────────────────────────
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
12
|
+
function DotsLoader(t0) {
|
|
13
|
+
const $ = _c(25);
|
|
14
|
+
const {
|
|
15
|
+
color,
|
|
16
|
+
size,
|
|
17
|
+
animated
|
|
18
|
+
} = t0;
|
|
19
|
+
const dotSize = size === "large" ? 11 : 8;
|
|
20
|
+
const bounce = size === "large" ? 13 : 9;
|
|
21
|
+
const t1 = dotSize / 2;
|
|
22
|
+
let t2;
|
|
23
|
+
if ($[0] !== color || $[1] !== dotSize || $[2] !== t1) {
|
|
24
|
+
t2 = {
|
|
25
|
+
width: dotSize,
|
|
26
|
+
height: dotSize,
|
|
27
|
+
borderRadius: t1,
|
|
28
|
+
backgroundColor: color
|
|
29
|
+
};
|
|
30
|
+
$[0] = color;
|
|
31
|
+
$[1] = dotSize;
|
|
32
|
+
$[2] = t1;
|
|
33
|
+
$[3] = t2;
|
|
34
|
+
} else {
|
|
35
|
+
t2 = $[3];
|
|
36
|
+
}
|
|
37
|
+
const dot = t2;
|
|
38
|
+
const y1 = useSharedValue(0);
|
|
39
|
+
const y2 = useSharedValue(0);
|
|
40
|
+
const y3 = useSharedValue(0);
|
|
41
|
+
let t3;
|
|
42
|
+
let t4;
|
|
43
|
+
if ($[4] !== animated || $[5] !== bounce || $[6] !== y1 || $[7] !== y2 || $[8] !== y3) {
|
|
44
|
+
t3 = () => {
|
|
45
|
+
y1.value = 0;
|
|
46
|
+
y2.value = 0;
|
|
47
|
+
y3.value = 0;
|
|
48
|
+
if (!animated) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const seq = withRepeat(withSequence(withTiming(-bounce, {
|
|
52
|
+
duration: 280,
|
|
53
|
+
easing: Easing.out(Easing.quad)
|
|
54
|
+
}), withTiming(0, {
|
|
55
|
+
duration: 280,
|
|
56
|
+
easing: Easing.in(Easing.quad)
|
|
57
|
+
}), withTiming(0, {
|
|
58
|
+
duration: 200
|
|
59
|
+
})), -1, false);
|
|
60
|
+
y1.value = withDelay(0, seq);
|
|
61
|
+
y2.value = withDelay(160, seq);
|
|
62
|
+
y3.value = withDelay(320, seq);
|
|
63
|
+
return () => {
|
|
64
|
+
cancelAnimation(y1);
|
|
65
|
+
cancelAnimation(y2);
|
|
66
|
+
cancelAnimation(y3);
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
t4 = [animated, bounce, y1, y2, y3];
|
|
70
|
+
$[4] = animated;
|
|
71
|
+
$[5] = bounce;
|
|
72
|
+
$[6] = y1;
|
|
73
|
+
$[7] = y2;
|
|
74
|
+
$[8] = y3;
|
|
75
|
+
$[9] = t3;
|
|
76
|
+
$[10] = t4;
|
|
77
|
+
} else {
|
|
78
|
+
t3 = $[9];
|
|
79
|
+
t4 = $[10];
|
|
80
|
+
}
|
|
81
|
+
useEffect(t3, t4);
|
|
82
|
+
const s1 = useAnimatedStyle(() => ({
|
|
83
|
+
transform: [{
|
|
84
|
+
translateY: y1.value
|
|
85
|
+
}]
|
|
86
|
+
}));
|
|
87
|
+
const s2 = useAnimatedStyle(() => ({
|
|
88
|
+
transform: [{
|
|
89
|
+
translateY: y2.value
|
|
90
|
+
}]
|
|
91
|
+
}));
|
|
92
|
+
const s3 = useAnimatedStyle(() => ({
|
|
93
|
+
transform: [{
|
|
94
|
+
translateY: y3.value
|
|
95
|
+
}]
|
|
96
|
+
}));
|
|
97
|
+
let t5;
|
|
98
|
+
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
99
|
+
t5 = {
|
|
100
|
+
flexDirection: "row",
|
|
101
|
+
gap: 10,
|
|
102
|
+
alignItems: "center"
|
|
17
103
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
104
|
+
$[11] = t5;
|
|
105
|
+
} else {
|
|
106
|
+
t5 = $[11];
|
|
107
|
+
}
|
|
108
|
+
let t6;
|
|
109
|
+
if ($[12] !== dot || $[13] !== s1) {
|
|
110
|
+
t6 = _jsx(Animated.View, {
|
|
111
|
+
style: [dot, s1]
|
|
112
|
+
});
|
|
113
|
+
$[12] = dot;
|
|
114
|
+
$[13] = s1;
|
|
115
|
+
$[14] = t6;
|
|
116
|
+
} else {
|
|
117
|
+
t6 = $[14];
|
|
118
|
+
}
|
|
119
|
+
let t7;
|
|
120
|
+
if ($[15] !== dot || $[16] !== s2) {
|
|
121
|
+
t7 = _jsx(Animated.View, {
|
|
122
|
+
style: [dot, s2]
|
|
123
|
+
});
|
|
124
|
+
$[15] = dot;
|
|
125
|
+
$[16] = s2;
|
|
126
|
+
$[17] = t7;
|
|
127
|
+
} else {
|
|
128
|
+
t7 = $[17];
|
|
129
|
+
}
|
|
130
|
+
let t8;
|
|
131
|
+
if ($[18] !== dot || $[19] !== s3) {
|
|
132
|
+
t8 = _jsx(Animated.View, {
|
|
133
|
+
style: [dot, s3]
|
|
134
|
+
});
|
|
135
|
+
$[18] = dot;
|
|
136
|
+
$[19] = s3;
|
|
137
|
+
$[20] = t8;
|
|
138
|
+
} else {
|
|
139
|
+
t8 = $[20];
|
|
140
|
+
}
|
|
141
|
+
let t9;
|
|
142
|
+
if ($[21] !== t6 || $[22] !== t7 || $[23] !== t8) {
|
|
143
|
+
t9 = _jsxs(View, {
|
|
144
|
+
style: t5,
|
|
145
|
+
children: [t6, t7, t8]
|
|
146
|
+
});
|
|
147
|
+
$[21] = t6;
|
|
148
|
+
$[22] = t7;
|
|
149
|
+
$[23] = t8;
|
|
150
|
+
$[24] = t9;
|
|
151
|
+
} else {
|
|
152
|
+
t9 = $[24];
|
|
153
|
+
}
|
|
154
|
+
return t9;
|
|
41
155
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
156
|
+
|
|
157
|
+
// ─── Ripple ───────────────────────────────────────────────────────────────────
|
|
158
|
+
|
|
159
|
+
function RippleLoader(t0) {
|
|
160
|
+
const $ = _c(17);
|
|
161
|
+
const {
|
|
162
|
+
color,
|
|
163
|
+
size,
|
|
164
|
+
animated
|
|
165
|
+
} = t0;
|
|
166
|
+
const base = size === "large" ? 48 : 32;
|
|
167
|
+
const scale = useSharedValue(0.2);
|
|
168
|
+
const opacity = useSharedValue(0.85);
|
|
169
|
+
let t1;
|
|
170
|
+
let t2;
|
|
171
|
+
if ($[0] !== animated || $[1] !== opacity || $[2] !== scale) {
|
|
172
|
+
t1 = () => {
|
|
173
|
+
scale.value = animated ? 0.2 : 1;
|
|
174
|
+
opacity.value = 0.85;
|
|
175
|
+
if (!animated) {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
scale.value = withRepeat(withTiming(2.6, {
|
|
179
|
+
duration: 1400,
|
|
180
|
+
easing: Easing.out(Easing.quad)
|
|
181
|
+
}), -1, false);
|
|
182
|
+
opacity.value = withRepeat(withTiming(0, {
|
|
183
|
+
duration: 1400,
|
|
184
|
+
easing: Easing.in(Easing.quad)
|
|
185
|
+
}), -1, false);
|
|
186
|
+
return () => {
|
|
187
|
+
cancelAnimation(scale);
|
|
188
|
+
cancelAnimation(opacity);
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
t2 = [animated, scale, opacity];
|
|
192
|
+
$[0] = animated;
|
|
193
|
+
$[1] = opacity;
|
|
194
|
+
$[2] = scale;
|
|
195
|
+
$[3] = t1;
|
|
196
|
+
$[4] = t2;
|
|
197
|
+
} else {
|
|
198
|
+
t1 = $[3];
|
|
199
|
+
t2 = $[4];
|
|
200
|
+
}
|
|
201
|
+
useEffect(t1, t2);
|
|
202
|
+
const animStyle = useAnimatedStyle(() => ({
|
|
203
|
+
transform: [{
|
|
204
|
+
scale: scale.value
|
|
205
|
+
}],
|
|
206
|
+
opacity: opacity.value
|
|
207
|
+
}));
|
|
208
|
+
let t3;
|
|
209
|
+
if ($[5] !== base) {
|
|
210
|
+
t3 = {
|
|
211
|
+
width: base,
|
|
212
|
+
height: base,
|
|
213
|
+
alignItems: "center",
|
|
214
|
+
justifyContent: "center"
|
|
215
|
+
};
|
|
216
|
+
$[5] = base;
|
|
217
|
+
$[6] = t3;
|
|
218
|
+
} else {
|
|
219
|
+
t3 = $[6];
|
|
220
|
+
}
|
|
221
|
+
const t4 = base / 2;
|
|
222
|
+
let t5;
|
|
223
|
+
if ($[7] !== base || $[8] !== color || $[9] !== t4) {
|
|
224
|
+
t5 = {
|
|
225
|
+
width: base,
|
|
226
|
+
height: base,
|
|
227
|
+
borderRadius: t4,
|
|
228
|
+
borderWidth: 2.5,
|
|
229
|
+
borderColor: color,
|
|
230
|
+
position: "absolute"
|
|
231
|
+
};
|
|
232
|
+
$[7] = base;
|
|
233
|
+
$[8] = color;
|
|
234
|
+
$[9] = t4;
|
|
235
|
+
$[10] = t5;
|
|
236
|
+
} else {
|
|
237
|
+
t5 = $[10];
|
|
238
|
+
}
|
|
239
|
+
let t6;
|
|
240
|
+
if ($[11] !== animStyle || $[12] !== t5) {
|
|
241
|
+
t6 = _jsx(Animated.View, {
|
|
242
|
+
style: [t5, animStyle]
|
|
243
|
+
});
|
|
244
|
+
$[11] = animStyle;
|
|
245
|
+
$[12] = t5;
|
|
246
|
+
$[13] = t6;
|
|
247
|
+
} else {
|
|
248
|
+
t6 = $[13];
|
|
249
|
+
}
|
|
250
|
+
let t7;
|
|
251
|
+
if ($[14] !== t3 || $[15] !== t6) {
|
|
252
|
+
t7 = _jsx(View, {
|
|
253
|
+
style: t3,
|
|
254
|
+
children: t6
|
|
255
|
+
});
|
|
256
|
+
$[14] = t3;
|
|
257
|
+
$[15] = t6;
|
|
258
|
+
$[16] = t7;
|
|
259
|
+
} else {
|
|
260
|
+
t7 = $[16];
|
|
261
|
+
}
|
|
262
|
+
return t7;
|
|
73
263
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
264
|
+
|
|
265
|
+
// ─── Public API ───────────────────────────────────────────────────────────────
|
|
266
|
+
|
|
267
|
+
const Spinner = t0 => {
|
|
268
|
+
const $ = _c(30);
|
|
269
|
+
let className;
|
|
270
|
+
let color;
|
|
271
|
+
let props;
|
|
272
|
+
let style;
|
|
273
|
+
let t1;
|
|
274
|
+
let t2;
|
|
275
|
+
let t3;
|
|
276
|
+
let t4;
|
|
277
|
+
let text;
|
|
278
|
+
if ($[0] !== t0) {
|
|
279
|
+
({
|
|
280
|
+
variant: t1,
|
|
281
|
+
size: t2,
|
|
282
|
+
color,
|
|
283
|
+
text,
|
|
284
|
+
style,
|
|
285
|
+
className,
|
|
286
|
+
animated: t3,
|
|
287
|
+
accessibilityLabel: t4,
|
|
288
|
+
...props
|
|
289
|
+
} = t0);
|
|
290
|
+
$[0] = t0;
|
|
291
|
+
$[1] = className;
|
|
292
|
+
$[2] = color;
|
|
293
|
+
$[3] = props;
|
|
294
|
+
$[4] = style;
|
|
295
|
+
$[5] = t1;
|
|
296
|
+
$[6] = t2;
|
|
297
|
+
$[7] = t3;
|
|
298
|
+
$[8] = t4;
|
|
299
|
+
$[9] = text;
|
|
300
|
+
} else {
|
|
301
|
+
className = $[1];
|
|
302
|
+
color = $[2];
|
|
303
|
+
props = $[3];
|
|
304
|
+
style = $[4];
|
|
305
|
+
t1 = $[5];
|
|
306
|
+
t2 = $[6];
|
|
307
|
+
t3 = $[7];
|
|
308
|
+
t4 = $[8];
|
|
309
|
+
text = $[9];
|
|
310
|
+
}
|
|
311
|
+
const variant = t1 === undefined ? "spinner" : t1;
|
|
312
|
+
const size = t2 === undefined ? "large" : t2;
|
|
313
|
+
const animated = t3 === undefined ? true : t3;
|
|
314
|
+
const accessibilityLabel = t4 === undefined ? text ?? "Cargando" : t4;
|
|
315
|
+
const theme = useTheme();
|
|
316
|
+
const reducedMotion = useReducedMotion();
|
|
317
|
+
const shouldAnimate = animated && !reducedMotion;
|
|
318
|
+
const resolvedColor = color ?? theme.primary;
|
|
319
|
+
const staticSize = size === "large" ? 36 : 20;
|
|
320
|
+
let t5;
|
|
321
|
+
if ($[10] !== resolvedColor || $[11] !== shouldAnimate || $[12] !== size || $[13] !== staticSize || $[14] !== variant) {
|
|
322
|
+
t5 = variant === "dots" ? _jsx(DotsLoader, {
|
|
323
|
+
animated: shouldAnimate,
|
|
324
|
+
color: resolvedColor,
|
|
325
|
+
size: size
|
|
326
|
+
}) : variant === "ripple" ? _jsx(RippleLoader, {
|
|
327
|
+
animated: shouldAnimate,
|
|
328
|
+
color: resolvedColor,
|
|
329
|
+
size: size
|
|
330
|
+
}) : shouldAnimate ? _jsx(ActivityIndicator, {
|
|
331
|
+
color: resolvedColor,
|
|
332
|
+
size: size
|
|
333
|
+
}) : _jsx(View, {
|
|
334
|
+
style: {
|
|
335
|
+
width: staticSize,
|
|
336
|
+
height: staticSize,
|
|
337
|
+
borderRadius: staticSize / 2,
|
|
338
|
+
borderWidth: 2,
|
|
339
|
+
borderColor: resolvedColor,
|
|
340
|
+
borderTopColor: "transparent"
|
|
341
|
+
}
|
|
342
|
+
});
|
|
343
|
+
$[10] = resolvedColor;
|
|
344
|
+
$[11] = shouldAnimate;
|
|
345
|
+
$[12] = size;
|
|
346
|
+
$[13] = staticSize;
|
|
347
|
+
$[14] = variant;
|
|
348
|
+
$[15] = t5;
|
|
349
|
+
} else {
|
|
350
|
+
t5 = $[15];
|
|
351
|
+
}
|
|
352
|
+
const indicator = t5;
|
|
353
|
+
let t6;
|
|
354
|
+
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
355
|
+
t6 = {
|
|
356
|
+
busy: true
|
|
357
|
+
};
|
|
358
|
+
$[16] = t6;
|
|
359
|
+
} else {
|
|
360
|
+
t6 = $[16];
|
|
361
|
+
}
|
|
362
|
+
let t7;
|
|
363
|
+
if ($[17] !== className) {
|
|
364
|
+
t7 = cn("items-center justify-center", className);
|
|
365
|
+
$[17] = className;
|
|
366
|
+
$[18] = t7;
|
|
367
|
+
} else {
|
|
368
|
+
t7 = $[18];
|
|
369
|
+
}
|
|
370
|
+
let t8;
|
|
371
|
+
if ($[19] !== indicator) {
|
|
372
|
+
t8 = _jsx(View, {
|
|
373
|
+
accessibilityElementsHidden: true,
|
|
374
|
+
importantForAccessibility: "no-hide-descendants",
|
|
375
|
+
children: indicator
|
|
376
|
+
});
|
|
377
|
+
$[19] = indicator;
|
|
378
|
+
$[20] = t8;
|
|
379
|
+
} else {
|
|
380
|
+
t8 = $[20];
|
|
381
|
+
}
|
|
382
|
+
let t9;
|
|
383
|
+
if ($[21] !== text) {
|
|
384
|
+
t9 = text && _jsx(Typography.Text, {
|
|
385
|
+
className: "mt-2.5",
|
|
386
|
+
variant: "body",
|
|
387
|
+
children: text
|
|
388
|
+
});
|
|
389
|
+
$[21] = text;
|
|
390
|
+
$[22] = t9;
|
|
391
|
+
} else {
|
|
392
|
+
t9 = $[22];
|
|
393
|
+
}
|
|
394
|
+
let t10;
|
|
395
|
+
if ($[23] !== accessibilityLabel || $[24] !== props || $[25] !== style || $[26] !== t7 || $[27] !== t8 || $[28] !== t9) {
|
|
396
|
+
t10 = _jsxs(View, {
|
|
397
|
+
...props,
|
|
398
|
+
accessibilityLabel: accessibilityLabel,
|
|
399
|
+
accessibilityRole: "progressbar",
|
|
400
|
+
accessibilityState: t6,
|
|
401
|
+
accessible: true,
|
|
402
|
+
className: t7,
|
|
403
|
+
style: style,
|
|
404
|
+
children: [t8, t9]
|
|
405
|
+
});
|
|
406
|
+
$[23] = accessibilityLabel;
|
|
407
|
+
$[24] = props;
|
|
408
|
+
$[25] = style;
|
|
409
|
+
$[26] = t7;
|
|
410
|
+
$[27] = t8;
|
|
411
|
+
$[28] = t9;
|
|
412
|
+
$[29] = t10;
|
|
413
|
+
} else {
|
|
414
|
+
t10 = $[29];
|
|
415
|
+
}
|
|
416
|
+
return t10;
|
|
89
417
|
};
|
|
90
418
|
export default Spinner;
|