@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,48 +1,381 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import AppBar from "./Navigation.AppBar.js";
|
|
3
3
|
import { useTheme } from "../theme/index.js";
|
|
4
4
|
import { Typography } from "../Typography/index.js";
|
|
5
|
-
import {
|
|
5
|
+
import { createContext, use } from "react";
|
|
6
|
+
import { View } from "react-native";
|
|
7
|
+
import Animated, { Extrapolation, interpolate, useAnimatedScrollHandler, useAnimatedStyle, useSharedValue } from "react-native-reanimated";
|
|
6
8
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
9
|
+
|
|
10
|
+
/** A scroll position read on the UI thread. Any Reanimated shared value fits. */
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
12
|
+
const CollapsingContext = createContext(null);
|
|
13
|
+
|
|
14
|
+
/** Connects a `CollapsingHeader` with the `CollapsingHeader.ScrollView` below it. */
|
|
15
|
+
function Root(t0) {
|
|
16
|
+
const $ = _c(6);
|
|
17
|
+
const {
|
|
18
|
+
children
|
|
19
|
+
} = t0;
|
|
20
|
+
const offset = useSharedValue(0);
|
|
21
|
+
let t1;
|
|
22
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
23
|
+
t1 = {
|
|
24
|
+
flex: 1
|
|
25
|
+
};
|
|
26
|
+
$[0] = t1;
|
|
27
|
+
} else {
|
|
28
|
+
t1 = $[0];
|
|
29
|
+
}
|
|
30
|
+
let t2;
|
|
31
|
+
if ($[1] !== children) {
|
|
32
|
+
t2 = _jsx(View, {
|
|
33
|
+
style: t1,
|
|
34
|
+
children: children
|
|
35
|
+
});
|
|
36
|
+
$[1] = children;
|
|
37
|
+
$[2] = t2;
|
|
38
|
+
} else {
|
|
39
|
+
t2 = $[2];
|
|
40
|
+
}
|
|
41
|
+
let t3;
|
|
42
|
+
if ($[3] !== offset || $[4] !== t2) {
|
|
43
|
+
t3 = _jsx(CollapsingContext, {
|
|
44
|
+
value: offset,
|
|
45
|
+
children: t2
|
|
46
|
+
});
|
|
47
|
+
$[3] = offset;
|
|
48
|
+
$[4] = t2;
|
|
49
|
+
$[5] = t3;
|
|
50
|
+
} else {
|
|
51
|
+
t3 = $[5];
|
|
52
|
+
}
|
|
53
|
+
return t3;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** The scroll that drives the header. Its offset is written on the UI thread, never in JS. */
|
|
57
|
+
function CollapsingScrollView(props) {
|
|
58
|
+
const $ = _c(3);
|
|
59
|
+
const offset = use(CollapsingContext);
|
|
60
|
+
if (!offset) {
|
|
61
|
+
throw new Error("CollapsingHeader.ScrollView must be inside CollapsingHeader.Root");
|
|
62
|
+
}
|
|
63
|
+
const onScroll = useAnimatedScrollHandler({
|
|
64
|
+
onScroll: event => {
|
|
65
|
+
offset.set(event.contentOffset.y);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
let t0;
|
|
69
|
+
if ($[0] !== onScroll || $[1] !== props) {
|
|
70
|
+
t0 = _jsx(Animated.ScrollView, {
|
|
71
|
+
scrollEventThrottle: 16,
|
|
72
|
+
...props,
|
|
73
|
+
onScroll: onScroll
|
|
74
|
+
});
|
|
75
|
+
$[0] = onScroll;
|
|
76
|
+
$[1] = props;
|
|
77
|
+
$[2] = t0;
|
|
78
|
+
} else {
|
|
79
|
+
t0 = $[2];
|
|
80
|
+
}
|
|
81
|
+
return t0;
|
|
82
|
+
}
|
|
7
83
|
/**
|
|
8
84
|
* Header with a large-title that **collapses on scroll** (merge of iOS 26 large title +
|
|
9
85
|
* Material 3 large top app bar). The compact bar stays fixed and its title fades in while
|
|
10
|
-
* scrolling; the large-title fades out and slides up.
|
|
86
|
+
* scrolling; the large-title fades out and slides up.
|
|
11
87
|
*
|
|
12
|
-
*
|
|
13
|
-
* `height` (not supported by the native driver), use `useNativeDriver: false`:
|
|
88
|
+
* Every frame runs on the UI thread (Reanimated): scrolling never waits for JS.
|
|
14
89
|
* ```tsx
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* scrollEventThrottle={16}
|
|
20
|
-
* />
|
|
90
|
+
* <CollapsingHeader.Root>
|
|
91
|
+
* <CollapsingHeader title="Inicio" />
|
|
92
|
+
* <CollapsingHeader.ScrollView>{content}</CollapsingHeader.ScrollView>
|
|
93
|
+
* </CollapsingHeader.Root>
|
|
21
94
|
* ```
|
|
22
95
|
*/
|
|
23
|
-
function CollapsingHeader(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
return
|
|
96
|
+
function CollapsingHeader(t0) {
|
|
97
|
+
const $ = _c(49);
|
|
98
|
+
const {
|
|
99
|
+
title,
|
|
100
|
+
subtitle,
|
|
101
|
+
scrollY,
|
|
102
|
+
onBack,
|
|
103
|
+
actions,
|
|
104
|
+
largeHeight: t1,
|
|
105
|
+
safeArea: t2,
|
|
106
|
+
testID
|
|
107
|
+
} = t0;
|
|
108
|
+
const largeHeight = t1 === undefined ? subtitle ? 72 : 56 : t1;
|
|
109
|
+
const safeArea = t2 === undefined ? true : t2;
|
|
110
|
+
const theme = useTheme();
|
|
111
|
+
const insets = useSafeAreaInsets();
|
|
112
|
+
const rootOffset = use(CollapsingContext);
|
|
113
|
+
const offset = scrollY ?? rootOffset;
|
|
114
|
+
if (!offset) {
|
|
115
|
+
throw new Error("CollapsingHeader needs CollapsingHeader.Root or scrollY");
|
|
116
|
+
}
|
|
117
|
+
const largeStyle = useAnimatedStyle(() => {
|
|
118
|
+
const y = offset.get();
|
|
119
|
+
return {
|
|
120
|
+
opacity: interpolate(y, [0, largeHeight * 0.6], [1, 0], Extrapolation.CLAMP),
|
|
121
|
+
transform: [{
|
|
122
|
+
translateY: interpolate(y, [0, largeHeight], [0, -largeHeight / 2], Extrapolation.CLAMP)
|
|
123
|
+
}]
|
|
124
|
+
};
|
|
125
|
+
});
|
|
126
|
+
const largeContainerStyle = useAnimatedStyle(() => ({
|
|
127
|
+
height: interpolate(offset.get(), [0, largeHeight], [largeHeight, 0], Extrapolation.CLAMP)
|
|
128
|
+
}));
|
|
129
|
+
const compactTitleStyle = useAnimatedStyle(() => ({
|
|
130
|
+
opacity: interpolate(offset.get(), [largeHeight * 0.6, largeHeight], [0, 1], Extrapolation.CLAMP)
|
|
131
|
+
}));
|
|
132
|
+
let t3;
|
|
133
|
+
if ($[0] !== theme.bg.card) {
|
|
134
|
+
t3 = {
|
|
135
|
+
backgroundColor: theme.bg.card
|
|
136
|
+
};
|
|
137
|
+
$[0] = theme.bg.card;
|
|
138
|
+
$[1] = t3;
|
|
139
|
+
} else {
|
|
140
|
+
t3 = $[1];
|
|
141
|
+
}
|
|
142
|
+
const t4 = safeArea ? insets.top : 0;
|
|
143
|
+
let t5;
|
|
144
|
+
if ($[2] !== t4) {
|
|
145
|
+
t5 = {
|
|
146
|
+
paddingTop: t4
|
|
147
|
+
};
|
|
148
|
+
$[2] = t4;
|
|
149
|
+
$[3] = t5;
|
|
150
|
+
} else {
|
|
151
|
+
t5 = $[3];
|
|
152
|
+
}
|
|
153
|
+
let t6;
|
|
154
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
155
|
+
t6 = {
|
|
156
|
+
minWidth: 38
|
|
157
|
+
};
|
|
158
|
+
$[4] = t6;
|
|
159
|
+
} else {
|
|
160
|
+
t6 = $[4];
|
|
161
|
+
}
|
|
162
|
+
let t7;
|
|
163
|
+
if ($[5] !== onBack) {
|
|
164
|
+
t7 = onBack ? _jsx(AppBar.Action, {
|
|
165
|
+
accessibilityLabel: "Volver",
|
|
166
|
+
icon: "back",
|
|
167
|
+
onPress: onBack
|
|
168
|
+
}) : null;
|
|
169
|
+
$[5] = onBack;
|
|
170
|
+
$[6] = t7;
|
|
171
|
+
} else {
|
|
172
|
+
t7 = $[6];
|
|
173
|
+
}
|
|
174
|
+
let t8;
|
|
175
|
+
if ($[7] !== t7) {
|
|
176
|
+
t8 = _jsx(View, {
|
|
177
|
+
style: t6,
|
|
178
|
+
children: t7
|
|
179
|
+
});
|
|
180
|
+
$[7] = t7;
|
|
181
|
+
$[8] = t8;
|
|
182
|
+
} else {
|
|
183
|
+
t8 = $[8];
|
|
184
|
+
}
|
|
185
|
+
let t9;
|
|
186
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
187
|
+
t9 = {
|
|
188
|
+
flex: 1
|
|
189
|
+
};
|
|
190
|
+
$[9] = t9;
|
|
191
|
+
} else {
|
|
192
|
+
t9 = $[9];
|
|
193
|
+
}
|
|
194
|
+
let t10;
|
|
195
|
+
if ($[10] !== compactTitleStyle) {
|
|
196
|
+
t10 = [t9, compactTitleStyle];
|
|
197
|
+
$[10] = compactTitleStyle;
|
|
198
|
+
$[11] = t10;
|
|
199
|
+
} else {
|
|
200
|
+
t10 = $[11];
|
|
201
|
+
}
|
|
202
|
+
let t11;
|
|
203
|
+
if ($[12] !== title) {
|
|
204
|
+
t11 = _jsx(Typography.Text, {
|
|
205
|
+
className: "text-text-primary",
|
|
206
|
+
numberOfLines: 1,
|
|
207
|
+
semibold: true,
|
|
208
|
+
variant: "subtitle",
|
|
209
|
+
children: title
|
|
210
|
+
});
|
|
211
|
+
$[12] = title;
|
|
212
|
+
$[13] = t11;
|
|
213
|
+
} else {
|
|
214
|
+
t11 = $[13];
|
|
215
|
+
}
|
|
216
|
+
let t12;
|
|
217
|
+
if ($[14] !== t10 || $[15] !== t11) {
|
|
218
|
+
t12 = _jsx(Animated.View, {
|
|
219
|
+
style: t10,
|
|
220
|
+
children: t11
|
|
221
|
+
});
|
|
222
|
+
$[14] = t10;
|
|
223
|
+
$[15] = t11;
|
|
224
|
+
$[16] = t12;
|
|
225
|
+
} else {
|
|
226
|
+
t12 = $[16];
|
|
227
|
+
}
|
|
228
|
+
let t13;
|
|
229
|
+
if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
|
|
230
|
+
t13 = {
|
|
231
|
+
minWidth: 38
|
|
232
|
+
};
|
|
233
|
+
$[17] = t13;
|
|
234
|
+
} else {
|
|
235
|
+
t13 = $[17];
|
|
236
|
+
}
|
|
237
|
+
let t14;
|
|
238
|
+
if ($[18] !== actions) {
|
|
239
|
+
t14 = _jsx(View, {
|
|
240
|
+
className: "flex-row items-center justify-end gap-2",
|
|
241
|
+
style: t13,
|
|
242
|
+
children: actions
|
|
243
|
+
});
|
|
244
|
+
$[18] = actions;
|
|
245
|
+
$[19] = t14;
|
|
246
|
+
} else {
|
|
247
|
+
t14 = $[19];
|
|
248
|
+
}
|
|
249
|
+
let t15;
|
|
250
|
+
if ($[20] !== t12 || $[21] !== t14 || $[22] !== t8) {
|
|
251
|
+
t15 = _jsxs(View, {
|
|
252
|
+
className: "flex-row items-center px-3 gap-2 min-h-[52px]",
|
|
253
|
+
children: [t8, t12, t14]
|
|
254
|
+
});
|
|
255
|
+
$[20] = t12;
|
|
256
|
+
$[21] = t14;
|
|
257
|
+
$[22] = t8;
|
|
258
|
+
$[23] = t15;
|
|
259
|
+
} else {
|
|
260
|
+
t15 = $[23];
|
|
261
|
+
}
|
|
262
|
+
let t16;
|
|
263
|
+
if ($[24] !== t15 || $[25] !== t5) {
|
|
264
|
+
t16 = _jsx(View, {
|
|
265
|
+
style: t5,
|
|
266
|
+
children: t15
|
|
267
|
+
});
|
|
268
|
+
$[24] = t15;
|
|
269
|
+
$[25] = t5;
|
|
270
|
+
$[26] = t16;
|
|
271
|
+
} else {
|
|
272
|
+
t16 = $[26];
|
|
273
|
+
}
|
|
274
|
+
let t17;
|
|
275
|
+
if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
|
|
276
|
+
t17 = {
|
|
277
|
+
overflow: "hidden"
|
|
278
|
+
};
|
|
279
|
+
$[27] = t17;
|
|
280
|
+
} else {
|
|
281
|
+
t17 = $[27];
|
|
282
|
+
}
|
|
283
|
+
let t18;
|
|
284
|
+
if ($[28] !== largeContainerStyle) {
|
|
285
|
+
t18 = [t17, largeContainerStyle];
|
|
286
|
+
$[28] = largeContainerStyle;
|
|
287
|
+
$[29] = t18;
|
|
288
|
+
} else {
|
|
289
|
+
t18 = $[29];
|
|
290
|
+
}
|
|
291
|
+
let t19;
|
|
292
|
+
if ($[30] !== title) {
|
|
293
|
+
t19 = _jsx(Typography.Text, {
|
|
294
|
+
className: "text-text-primary",
|
|
295
|
+
variant: "h2",
|
|
296
|
+
children: title
|
|
297
|
+
});
|
|
298
|
+
$[30] = title;
|
|
299
|
+
$[31] = t19;
|
|
300
|
+
} else {
|
|
301
|
+
t19 = $[31];
|
|
302
|
+
}
|
|
303
|
+
let t20;
|
|
304
|
+
if ($[32] !== subtitle) {
|
|
305
|
+
t20 = subtitle ? _jsx(Typography.Text, {
|
|
306
|
+
className: "text-text-secondary",
|
|
307
|
+
variant: "bodySmall",
|
|
308
|
+
children: subtitle
|
|
309
|
+
}) : null;
|
|
310
|
+
$[32] = subtitle;
|
|
311
|
+
$[33] = t20;
|
|
312
|
+
} else {
|
|
313
|
+
t20 = $[33];
|
|
314
|
+
}
|
|
315
|
+
let t21;
|
|
316
|
+
if ($[34] !== t19 || $[35] !== t20) {
|
|
317
|
+
t21 = _jsxs(View, {
|
|
318
|
+
className: "px-4 pb-2",
|
|
319
|
+
children: [t19, t20]
|
|
320
|
+
});
|
|
321
|
+
$[34] = t19;
|
|
322
|
+
$[35] = t20;
|
|
323
|
+
$[36] = t21;
|
|
324
|
+
} else {
|
|
325
|
+
t21 = $[36];
|
|
326
|
+
}
|
|
327
|
+
let t22;
|
|
328
|
+
if ($[37] !== largeStyle || $[38] !== t21) {
|
|
329
|
+
t22 = _jsx(Animated.View, {
|
|
330
|
+
style: largeStyle,
|
|
331
|
+
children: t21
|
|
332
|
+
});
|
|
333
|
+
$[37] = largeStyle;
|
|
334
|
+
$[38] = t21;
|
|
335
|
+
$[39] = t22;
|
|
336
|
+
} else {
|
|
337
|
+
t22 = $[39];
|
|
338
|
+
}
|
|
339
|
+
let t23;
|
|
340
|
+
if ($[40] !== t18 || $[41] !== t22) {
|
|
341
|
+
t23 = _jsx(Animated.View, {
|
|
342
|
+
style: t18,
|
|
343
|
+
children: t22
|
|
344
|
+
});
|
|
345
|
+
$[40] = t18;
|
|
346
|
+
$[41] = t22;
|
|
347
|
+
$[42] = t23;
|
|
348
|
+
} else {
|
|
349
|
+
t23 = $[42];
|
|
350
|
+
}
|
|
351
|
+
let t24;
|
|
352
|
+
if ($[43] === Symbol.for("react.memo_cache_sentinel")) {
|
|
353
|
+
t24 = _jsx(View, {
|
|
354
|
+
className: "border-b border-border-light"
|
|
355
|
+
});
|
|
356
|
+
$[43] = t24;
|
|
357
|
+
} else {
|
|
358
|
+
t24 = $[43];
|
|
359
|
+
}
|
|
360
|
+
let t25;
|
|
361
|
+
if ($[44] !== t16 || $[45] !== t23 || $[46] !== t3 || $[47] !== testID) {
|
|
362
|
+
t25 = _jsxs(View, {
|
|
363
|
+
style: t3,
|
|
364
|
+
testID: testID,
|
|
365
|
+
children: [t16, t23, t24]
|
|
366
|
+
});
|
|
367
|
+
$[44] = t16;
|
|
368
|
+
$[45] = t23;
|
|
369
|
+
$[46] = t3;
|
|
370
|
+
$[47] = testID;
|
|
371
|
+
$[48] = t25;
|
|
372
|
+
} else {
|
|
373
|
+
t25 = $[48];
|
|
374
|
+
}
|
|
375
|
+
return t25;
|
|
47
376
|
}
|
|
48
|
-
|
|
377
|
+
const CollapsingHeaderWithParts = Object.assign(CollapsingHeader, {
|
|
378
|
+
Root,
|
|
379
|
+
ScrollView: CollapsingScrollView
|
|
380
|
+
});
|
|
381
|
+
export default CollapsingHeaderWithParts;
|
|
@@ -1,21 +1,81 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { useTheme } from "../theme/index.js";
|
|
3
3
|
import { cn } from "../theme/tw.js";
|
|
4
4
|
import { View } from "react-native";
|
|
5
5
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
6
|
+
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
6
7
|
/**
|
|
7
8
|
* **Rounded floating container** for nav/action bars that float above the content
|
|
8
9
|
* (Snapchat/TikTok/McDonald's 2026 style). Shadowed pill, safe-area aware.
|
|
9
10
|
* Presentational: drop a `BottomNav`, actions, or anything inside.
|
|
10
11
|
*/
|
|
11
|
-
function FloatingBar(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
function FloatingBar(t0) {
|
|
13
|
+
const $ = _c(14);
|
|
14
|
+
const {
|
|
15
|
+
children,
|
|
16
|
+
position: t1,
|
|
17
|
+
inset: t2,
|
|
18
|
+
className,
|
|
19
|
+
testID
|
|
20
|
+
} = t0;
|
|
21
|
+
const position = t1 === undefined ? "bottom" : t1;
|
|
22
|
+
const inset = t2 === undefined ? 16 : t2;
|
|
23
|
+
const theme = useTheme();
|
|
24
|
+
const insets = useSafeAreaInsets();
|
|
25
|
+
const safe = position === "bottom" ? insets.bottom : insets.top;
|
|
26
|
+
const t3 = safe + inset;
|
|
27
|
+
let t4;
|
|
28
|
+
if ($[0] !== inset || $[1] !== position || $[2] !== t3) {
|
|
29
|
+
t4 = {
|
|
30
|
+
position: "absolute",
|
|
31
|
+
left: inset,
|
|
32
|
+
right: inset,
|
|
33
|
+
[position]: t3
|
|
34
|
+
};
|
|
35
|
+
$[0] = inset;
|
|
36
|
+
$[1] = position;
|
|
37
|
+
$[2] = t3;
|
|
38
|
+
$[3] = t4;
|
|
39
|
+
} else {
|
|
40
|
+
t4 = $[3];
|
|
41
|
+
}
|
|
42
|
+
let t5;
|
|
43
|
+
if ($[4] !== className) {
|
|
44
|
+
t5 = cn("rounded-full bg-bg-card px-2 py-1.5 border border-border-light", className);
|
|
45
|
+
$[4] = className;
|
|
46
|
+
$[5] = t5;
|
|
47
|
+
} else {
|
|
48
|
+
t5 = $[5];
|
|
49
|
+
}
|
|
50
|
+
let t6;
|
|
51
|
+
if ($[6] !== children || $[7] !== t5 || $[8] !== theme.shadow.lg) {
|
|
52
|
+
t6 = _jsx(View, {
|
|
53
|
+
className: t5,
|
|
54
|
+
style: theme.shadow.lg,
|
|
55
|
+
children: children
|
|
56
|
+
});
|
|
57
|
+
$[6] = children;
|
|
58
|
+
$[7] = t5;
|
|
59
|
+
$[8] = theme.shadow.lg;
|
|
60
|
+
$[9] = t6;
|
|
61
|
+
} else {
|
|
62
|
+
t6 = $[9];
|
|
63
|
+
}
|
|
64
|
+
let t7;
|
|
65
|
+
if ($[10] !== t4 || $[11] !== t6 || $[12] !== testID) {
|
|
66
|
+
t7 = _jsx(View, {
|
|
67
|
+
pointerEvents: "box-none",
|
|
68
|
+
style: t4,
|
|
69
|
+
testID: testID,
|
|
70
|
+
children: t6
|
|
71
|
+
});
|
|
72
|
+
$[10] = t4;
|
|
73
|
+
$[11] = t6;
|
|
74
|
+
$[12] = testID;
|
|
75
|
+
$[13] = t7;
|
|
76
|
+
} else {
|
|
77
|
+
t7 = $[13];
|
|
78
|
+
}
|
|
79
|
+
return t7;
|
|
20
80
|
}
|
|
21
81
|
export default FloatingBar;
|