@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,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { CountBadge } from "../Display/count-badge.js";
|
|
2
3
|
import Icon from "../Display/Display.Icon.js";
|
|
3
4
|
import Pressable from "../primitives/Pressable.js";
|
|
4
5
|
import { relativeLuminance, useTheme } from "../theme/index.js";
|
|
@@ -6,118 +7,382 @@ import { cn } from "../theme/tw.js";
|
|
|
6
7
|
import { Typography } from "../Typography/index.js";
|
|
7
8
|
import { View } from "react-native";
|
|
8
9
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
10
|
+
|
|
9
11
|
/** Forced-dark chrome: prefer `bg.inverse` when it is actually dark, else `bg.card`. */
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "nativewind/jsx-runtime";
|
|
10
13
|
function resolveDarkSurface(theme) {
|
|
11
|
-
|
|
12
|
-
|
|
14
|
+
const candidate = theme.bg.inverse ?? theme.bg.card;
|
|
15
|
+
return relativeLuminance(candidate) < 0.25 ? candidate : theme.bg.card;
|
|
13
16
|
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Active-tab indicator style:
|
|
20
|
+
* - `none`: color only.
|
|
21
|
+
* - `pill`: filled round pill behind the icon.
|
|
22
|
+
* - `pill-text`: extended pill with icon + label inside (inactive = icon only).
|
|
23
|
+
* - `bar`: top accent bar over the active item (label below).
|
|
24
|
+
* - `glow`: glowing dot under the active icon (pairs with `tone="dark"`).
|
|
25
|
+
*/
|
|
26
|
+
|
|
14
27
|
/**
|
|
15
28
|
* The single bottom-navigation component. Extensible by props, not by forking:
|
|
16
29
|
* `shape` (bar/floating), `tone` (light/dark), `indicator` (none/pill/pill-text/bar/glow),
|
|
17
30
|
* `showLabels`, `centerAction` (FAB), `activeColor`. Replaces the legacy `TabNavigatorLayout`.
|
|
18
31
|
*/
|
|
19
|
-
function BottomNav(
|
|
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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
32
|
+
function BottomNav(t0) {
|
|
33
|
+
const $ = _c(55);
|
|
34
|
+
const {
|
|
35
|
+
items,
|
|
36
|
+
value,
|
|
37
|
+
onChange,
|
|
38
|
+
showLabels: t1,
|
|
39
|
+
centerAction,
|
|
40
|
+
safeArea: t2,
|
|
41
|
+
shape: t3,
|
|
42
|
+
tone: t4,
|
|
43
|
+
indicator: t5,
|
|
44
|
+
bordered: t6,
|
|
45
|
+
activeColor: t7,
|
|
46
|
+
className,
|
|
47
|
+
testID
|
|
48
|
+
} = t0;
|
|
49
|
+
const showLabels = t1 === undefined ? true : t1;
|
|
50
|
+
const safeArea = t2 === undefined ? true : t2;
|
|
51
|
+
const shape = t3 === undefined ? "bar" : t3;
|
|
52
|
+
const tone = t4 === undefined ? "light" : t4;
|
|
53
|
+
const indicator = t5 === undefined ? "none" : t5;
|
|
54
|
+
const bordered = t6 === undefined ? true : t6;
|
|
55
|
+
const activeColor = t7 === undefined ? "primary" : t7;
|
|
56
|
+
const insets = useSafeAreaInsets();
|
|
57
|
+
const theme = useTheme();
|
|
58
|
+
const dark = tone === "dark";
|
|
59
|
+
const rounded = shape === "floating" || dark;
|
|
60
|
+
const bottomPad = rounded ? 6 : safeArea ? insets.bottom : 0;
|
|
61
|
+
const activeTint = activeColor === "accent" ? theme.accent : theme.primary;
|
|
62
|
+
const onActive = activeColor === "accent" ? theme.text.onAccent : theme.text.onPrimary;
|
|
63
|
+
const brandText = theme.text.accent;
|
|
64
|
+
const inactiveColor = dark ? "rgba(255,255,255,0.55)" : theme.icon.secondary;
|
|
65
|
+
let t8;
|
|
66
|
+
if ($[0] !== dark || $[1] !== theme) {
|
|
67
|
+
t8 = dark ? resolveDarkSurface(theme) : theme.bg.card;
|
|
68
|
+
$[0] = dark;
|
|
69
|
+
$[1] = theme;
|
|
70
|
+
$[2] = t8;
|
|
71
|
+
} else {
|
|
72
|
+
t8 = $[2];
|
|
73
|
+
}
|
|
74
|
+
const surfaceColor = t8;
|
|
75
|
+
let t9;
|
|
76
|
+
if ($[3] !== bordered || $[4] !== bottomPad || $[5] !== rounded || $[6] !== surfaceColor || $[7] !== theme.border || $[8] !== theme.shadow) {
|
|
77
|
+
t9 = rounded ? {
|
|
78
|
+
borderRadius: 32,
|
|
79
|
+
paddingBottom: bottomPad,
|
|
80
|
+
paddingTop: 6,
|
|
81
|
+
paddingHorizontal: 6,
|
|
82
|
+
minHeight: 64,
|
|
83
|
+
backgroundColor: surfaceColor,
|
|
84
|
+
...theme.shadow.lg
|
|
85
|
+
} : {
|
|
86
|
+
paddingBottom: bottomPad,
|
|
87
|
+
minHeight: 56,
|
|
88
|
+
backgroundColor: surfaceColor,
|
|
89
|
+
...(bordered ? {
|
|
90
|
+
borderTopWidth: 1,
|
|
91
|
+
borderTopColor: theme.border.light
|
|
92
|
+
} : null)
|
|
93
|
+
};
|
|
94
|
+
$[3] = bordered;
|
|
95
|
+
$[4] = bottomPad;
|
|
96
|
+
$[5] = rounded;
|
|
97
|
+
$[6] = surfaceColor;
|
|
98
|
+
$[7] = theme.border;
|
|
99
|
+
$[8] = theme.shadow;
|
|
100
|
+
$[9] = t9;
|
|
101
|
+
} else {
|
|
102
|
+
t9 = $[9];
|
|
103
|
+
}
|
|
104
|
+
const containerStyle = t9;
|
|
105
|
+
let t10;
|
|
106
|
+
if ($[10] !== surfaceColor) {
|
|
107
|
+
t10 = (item, active, color) => {
|
|
108
|
+
const name = active ? item.activeIcon ?? item.icon : item.icon;
|
|
109
|
+
return _jsxs(View, {
|
|
110
|
+
children: [name ? _jsx(Icon, {
|
|
111
|
+
color: color,
|
|
112
|
+
name: name,
|
|
113
|
+
size: 24
|
|
114
|
+
}) : null, item.badge != null ? _jsx(CountBadge, {
|
|
115
|
+
anchor: {
|
|
116
|
+
top: -4,
|
|
117
|
+
right: -10
|
|
118
|
+
},
|
|
119
|
+
count: item.badge,
|
|
120
|
+
ringColor: surfaceColor
|
|
121
|
+
}) : null]
|
|
122
|
+
});
|
|
49
123
|
};
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
124
|
+
$[10] = surfaceColor;
|
|
125
|
+
$[11] = t10;
|
|
126
|
+
} else {
|
|
127
|
+
t10 = $[11];
|
|
128
|
+
}
|
|
129
|
+
const renderIconNode = t10;
|
|
130
|
+
let t11;
|
|
131
|
+
if ($[12] !== activeTint || $[13] !== brandText || $[14] !== dark || $[15] !== inactiveColor || $[16] !== indicator || $[17] !== onActive || $[18] !== onChange || $[19] !== renderIconNode || $[20] !== showLabels || $[21] !== theme.text.inverse || $[22] !== value) {
|
|
132
|
+
t11 = item_0 => {
|
|
133
|
+
const active_0 = item_0.key === value;
|
|
134
|
+
if (indicator === "pill-text") {
|
|
135
|
+
if (active_0) {
|
|
136
|
+
return _jsxs(Pressable, {
|
|
137
|
+
accessibilityLabel: item_0.label ?? item_0.key,
|
|
138
|
+
accessibilityRole: "tab",
|
|
139
|
+
accessibilityState: {
|
|
140
|
+
selected: true
|
|
141
|
+
},
|
|
142
|
+
className: "flex-row items-center px-4 py-2",
|
|
143
|
+
onPress: () => onChange(item_0.key),
|
|
144
|
+
style: {
|
|
145
|
+
borderRadius: 999,
|
|
146
|
+
backgroundColor: activeTint,
|
|
147
|
+
minHeight: 48,
|
|
148
|
+
minWidth: 48
|
|
149
|
+
},
|
|
150
|
+
children: [renderIconNode(item_0, true, onActive), item_0.label ? _jsx(Typography.Text, {
|
|
151
|
+
semibold: true,
|
|
152
|
+
style: {
|
|
153
|
+
color: onActive,
|
|
154
|
+
fontSize: 13,
|
|
155
|
+
marginLeft: 8,
|
|
156
|
+
flexShrink: 1
|
|
157
|
+
},
|
|
158
|
+
children: item_0.label
|
|
159
|
+
}) : null]
|
|
160
|
+
}, item_0.key);
|
|
161
|
+
}
|
|
162
|
+
return _jsx(Pressable, {
|
|
163
|
+
accessibilityLabel: item_0.label ?? item_0.key,
|
|
164
|
+
accessibilityRole: "tab",
|
|
165
|
+
className: "items-center justify-center px-3 py-2",
|
|
166
|
+
onPress: () => onChange(item_0.key),
|
|
167
|
+
style: {
|
|
168
|
+
minHeight: 48,
|
|
169
|
+
minWidth: 48
|
|
170
|
+
},
|
|
171
|
+
children: renderIconNode(item_0, false, inactiveColor)
|
|
172
|
+
}, item_0.key);
|
|
173
|
+
}
|
|
174
|
+
const inPill = indicator === "pill" && active_0;
|
|
175
|
+
let iconColor = inactiveColor;
|
|
176
|
+
if (inPill) {
|
|
177
|
+
iconColor = onActive;
|
|
178
|
+
} else {
|
|
179
|
+
if (active_0) {
|
|
180
|
+
iconColor = brandText;
|
|
63
181
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
labelColor = onActive;
|
|
74
|
-
else if (active && dark)
|
|
75
|
-
labelColor = theme.text.inverse;
|
|
76
|
-
else if (active)
|
|
182
|
+
}
|
|
183
|
+
let labelColor = inactiveColor;
|
|
184
|
+
if (active_0 && inPill) {
|
|
185
|
+
labelColor = onActive;
|
|
186
|
+
} else {
|
|
187
|
+
if (active_0 && dark) {
|
|
188
|
+
labelColor = theme.text.inverse;
|
|
189
|
+
} else {
|
|
190
|
+
if (active_0) {
|
|
77
191
|
labelColor = brandText;
|
|
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
|
-
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
return _jsxs(Pressable, {
|
|
196
|
+
accessibilityLabel: item_0.label ?? item_0.key,
|
|
197
|
+
accessibilityRole: "tab",
|
|
198
|
+
accessibilityState: {
|
|
199
|
+
selected: active_0
|
|
200
|
+
},
|
|
201
|
+
className: "flex-1 items-center justify-center py-1.5",
|
|
202
|
+
onPress: () => onChange(item_0.key),
|
|
203
|
+
style: {
|
|
204
|
+
minHeight: 48,
|
|
205
|
+
minWidth: 48
|
|
206
|
+
},
|
|
207
|
+
children: [indicator === "bar" && active_0 ? _jsx(View, {
|
|
208
|
+
style: {
|
|
209
|
+
position: "absolute",
|
|
210
|
+
top: 0,
|
|
211
|
+
width: 26,
|
|
212
|
+
height: 3,
|
|
213
|
+
borderRadius: 999,
|
|
214
|
+
backgroundColor: activeTint
|
|
215
|
+
}
|
|
216
|
+
}) : null, _jsx(View, {
|
|
217
|
+
className: inPill ? "px-5 py-1.5" : undefined,
|
|
218
|
+
style: inPill ? {
|
|
219
|
+
borderRadius: 999,
|
|
220
|
+
backgroundColor: activeTint
|
|
221
|
+
} : undefined,
|
|
222
|
+
children: renderIconNode(item_0, active_0, iconColor)
|
|
223
|
+
}), indicator === "glow" && active_0 ? _jsx(View, {
|
|
224
|
+
style: {
|
|
225
|
+
width: 5,
|
|
226
|
+
height: 5,
|
|
227
|
+
borderRadius: 999,
|
|
228
|
+
marginTop: 4,
|
|
103
229
|
backgroundColor: activeTint,
|
|
104
|
-
// Glow halo en el color de acento (iOS shadow + Android elevation).
|
|
105
230
|
shadowColor: activeTint,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
231
|
+
shadowOpacity: 0.9,
|
|
232
|
+
shadowRadius: 5,
|
|
233
|
+
elevation: 4
|
|
234
|
+
}
|
|
235
|
+
}) : null, showLabels && item_0.label && indicator !== "glow" ? _jsx(Typography.Text, {
|
|
236
|
+
semibold: active_0,
|
|
237
|
+
style: {
|
|
238
|
+
color: labelColor,
|
|
239
|
+
fontSize: 11,
|
|
240
|
+
marginTop: 3,
|
|
241
|
+
textAlign: "center"
|
|
242
|
+
},
|
|
243
|
+
children: item_0.label
|
|
244
|
+
}) : null]
|
|
245
|
+
}, item_0.key);
|
|
246
|
+
};
|
|
247
|
+
$[12] = activeTint;
|
|
248
|
+
$[13] = brandText;
|
|
249
|
+
$[14] = dark;
|
|
250
|
+
$[15] = inactiveColor;
|
|
251
|
+
$[16] = indicator;
|
|
252
|
+
$[17] = onActive;
|
|
253
|
+
$[18] = onChange;
|
|
254
|
+
$[19] = renderIconNode;
|
|
255
|
+
$[20] = showLabels;
|
|
256
|
+
$[21] = theme.text.inverse;
|
|
257
|
+
$[22] = value;
|
|
258
|
+
$[23] = t11;
|
|
259
|
+
} else {
|
|
260
|
+
t11 = $[23];
|
|
261
|
+
}
|
|
262
|
+
const renderItem = t11;
|
|
263
|
+
let t12;
|
|
264
|
+
if ($[24] !== activeTint || $[25] !== centerAction?.accessibilityLabel || $[26] !== centerAction?.icon || $[27] !== centerAction?.onPress || $[28] !== onActive) {
|
|
265
|
+
t12 = () => _jsx(Pressable, {
|
|
266
|
+
accessibilityLabel: centerAction?.accessibilityLabel ?? "Acci\xF3n",
|
|
267
|
+
accessibilityRole: "button",
|
|
268
|
+
className: "items-center justify-center",
|
|
269
|
+
onPress: centerAction?.onPress,
|
|
270
|
+
style: {
|
|
271
|
+
width: 52,
|
|
272
|
+
height: 52,
|
|
273
|
+
borderRadius: 18,
|
|
274
|
+
marginTop: -20,
|
|
275
|
+
marginHorizontal: 6,
|
|
276
|
+
backgroundColor: activeTint,
|
|
277
|
+
shadowColor: activeTint,
|
|
278
|
+
shadowOffset: {
|
|
279
|
+
width: 0,
|
|
280
|
+
height: 4
|
|
281
|
+
},
|
|
282
|
+
shadowOpacity: 0.55,
|
|
283
|
+
shadowRadius: 14,
|
|
284
|
+
elevation: 10
|
|
285
|
+
},
|
|
286
|
+
children: _jsx(Icon, {
|
|
287
|
+
color: onActive,
|
|
288
|
+
name: centerAction?.icon ?? "add",
|
|
289
|
+
size: 26
|
|
290
|
+
})
|
|
291
|
+
});
|
|
292
|
+
$[24] = activeTint;
|
|
293
|
+
$[25] = centerAction?.accessibilityLabel;
|
|
294
|
+
$[26] = centerAction?.icon;
|
|
295
|
+
$[27] = centerAction?.onPress;
|
|
296
|
+
$[28] = onActive;
|
|
297
|
+
$[29] = t12;
|
|
298
|
+
} else {
|
|
299
|
+
t12 = $[29];
|
|
300
|
+
}
|
|
301
|
+
const renderCenterFab = t12;
|
|
302
|
+
let content;
|
|
303
|
+
if (centerAction) {
|
|
304
|
+
const mid = Math.ceil(items.length / 2);
|
|
305
|
+
let t13;
|
|
306
|
+
if ($[30] !== items || $[31] !== mid || $[32] !== renderItem) {
|
|
307
|
+
t13 = items.slice(0, mid).map(renderItem);
|
|
308
|
+
$[30] = items;
|
|
309
|
+
$[31] = mid;
|
|
310
|
+
$[32] = renderItem;
|
|
311
|
+
$[33] = t13;
|
|
312
|
+
} else {
|
|
313
|
+
t13 = $[33];
|
|
314
|
+
}
|
|
315
|
+
let t14;
|
|
316
|
+
if ($[34] !== renderCenterFab) {
|
|
317
|
+
t14 = renderCenterFab();
|
|
318
|
+
$[34] = renderCenterFab;
|
|
319
|
+
$[35] = t14;
|
|
320
|
+
} else {
|
|
321
|
+
t14 = $[35];
|
|
322
|
+
}
|
|
323
|
+
let t15;
|
|
324
|
+
if ($[36] !== items || $[37] !== mid || $[38] !== renderItem) {
|
|
325
|
+
t15 = items.slice(mid).map(renderItem);
|
|
326
|
+
$[36] = items;
|
|
327
|
+
$[37] = mid;
|
|
328
|
+
$[38] = renderItem;
|
|
329
|
+
$[39] = t15;
|
|
330
|
+
} else {
|
|
331
|
+
t15 = $[39];
|
|
332
|
+
}
|
|
333
|
+
let t16;
|
|
334
|
+
if ($[40] !== t13 || $[41] !== t14 || $[42] !== t15) {
|
|
335
|
+
t16 = _jsxs(_Fragment, {
|
|
336
|
+
children: [t13, t14, t15]
|
|
337
|
+
});
|
|
338
|
+
$[40] = t13;
|
|
339
|
+
$[41] = t14;
|
|
340
|
+
$[42] = t15;
|
|
341
|
+
$[43] = t16;
|
|
342
|
+
} else {
|
|
343
|
+
t16 = $[43];
|
|
115
344
|
}
|
|
116
|
-
|
|
117
|
-
|
|
345
|
+
content = t16;
|
|
346
|
+
} else {
|
|
347
|
+
let t13;
|
|
348
|
+
if ($[44] !== items || $[45] !== renderItem) {
|
|
349
|
+
t13 = items.map(renderItem);
|
|
350
|
+
$[44] = items;
|
|
351
|
+
$[45] = renderItem;
|
|
352
|
+
$[46] = t13;
|
|
353
|
+
} else {
|
|
354
|
+
t13 = $[46];
|
|
118
355
|
}
|
|
119
|
-
|
|
120
|
-
|
|
356
|
+
content = t13;
|
|
357
|
+
}
|
|
358
|
+
const justify = indicator === "pill-text" ? "justify-around" : "";
|
|
359
|
+
let t13;
|
|
360
|
+
if ($[47] !== className || $[48] !== justify) {
|
|
361
|
+
t13 = cn("flex-row items-center", justify, className);
|
|
362
|
+
$[47] = className;
|
|
363
|
+
$[48] = justify;
|
|
364
|
+
$[49] = t13;
|
|
365
|
+
} else {
|
|
366
|
+
t13 = $[49];
|
|
367
|
+
}
|
|
368
|
+
let t14;
|
|
369
|
+
if ($[50] !== containerStyle || $[51] !== content || $[52] !== t13 || $[53] !== testID) {
|
|
370
|
+
t14 = _jsx(View, {
|
|
371
|
+
accessibilityRole: "tablist",
|
|
372
|
+
className: t13,
|
|
373
|
+
style: containerStyle,
|
|
374
|
+
testID: testID,
|
|
375
|
+
children: content
|
|
376
|
+
});
|
|
377
|
+
$[50] = containerStyle;
|
|
378
|
+
$[51] = content;
|
|
379
|
+
$[52] = t13;
|
|
380
|
+
$[53] = testID;
|
|
381
|
+
$[54] = t14;
|
|
382
|
+
} else {
|
|
383
|
+
t14 = $[54];
|
|
384
|
+
}
|
|
385
|
+
return t14;
|
|
121
386
|
}
|
|
122
387
|
export default BottomNav;
|
|
123
388
|
export { BottomNav };
|
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
import { type AppBarActionProps } from "./Navigation.AppBar.js";
|
|
2
|
-
import type
|
|
3
|
-
import {
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
import { type ScrollViewProps } from "react-native";
|
|
4
|
+
/** A scroll position read on the UI thread. Any Reanimated shared value fits. */
|
|
5
|
+
export interface ScrollOffset {
|
|
6
|
+
get(): number;
|
|
7
|
+
}
|
|
8
|
+
/** Connects a `CollapsingHeader` with the `CollapsingHeader.ScrollView` below it. */
|
|
9
|
+
declare function Root({ children }: {
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
/** The scroll that drives the header. Its offset is written on the UI thread, never in JS. */
|
|
13
|
+
declare function CollapsingScrollView(props: Omit<ScrollViewProps, "onScroll">): import("react").JSX.Element;
|
|
4
14
|
export interface CollapsingHeaderProps {
|
|
5
15
|
title: string;
|
|
6
16
|
subtitle?: string;
|
|
7
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Scroll position from your own Reanimated scroll (FlashList, a custom list).
|
|
19
|
+
* Inside `CollapsingHeader.Root` it comes from `CollapsingHeader.ScrollView`.
|
|
20
|
+
*/
|
|
21
|
+
scrollY?: ScrollOffset;
|
|
8
22
|
onBack?: () => void;
|
|
9
23
|
actions?: ReactNode;
|
|
10
24
|
/** Extra height of the collapsing large-title (px). Default 56, or 72 with subtitle. */
|
|
@@ -16,19 +30,20 @@ export interface CollapsingHeaderProps {
|
|
|
16
30
|
/**
|
|
17
31
|
* Header with a large-title that **collapses on scroll** (merge of iOS 26 large title +
|
|
18
32
|
* Material 3 large top app bar). The compact bar stays fixed and its title fades in while
|
|
19
|
-
* scrolling; the large-title fades out and slides up.
|
|
33
|
+
* scrolling; the large-title fades out and slides up.
|
|
20
34
|
*
|
|
21
|
-
*
|
|
22
|
-
* `height` (not supported by the native driver), use `useNativeDriver: false`:
|
|
35
|
+
* Every frame runs on the UI thread (Reanimated): scrolling never waits for JS.
|
|
23
36
|
* ```tsx
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* scrollEventThrottle={16}
|
|
29
|
-
* />
|
|
37
|
+
* <CollapsingHeader.Root>
|
|
38
|
+
* <CollapsingHeader title="Inicio" />
|
|
39
|
+
* <CollapsingHeader.ScrollView>{content}</CollapsingHeader.ScrollView>
|
|
40
|
+
* </CollapsingHeader.Root>
|
|
30
41
|
* ```
|
|
31
42
|
*/
|
|
32
43
|
declare function CollapsingHeader({ title, subtitle, scrollY, onBack, actions, largeHeight, safeArea, testID, }: CollapsingHeaderProps): import("react").JSX.Element;
|
|
44
|
+
declare const CollapsingHeaderWithParts: typeof CollapsingHeader & {
|
|
45
|
+
Root: typeof Root;
|
|
46
|
+
ScrollView: typeof CollapsingScrollView;
|
|
47
|
+
};
|
|
33
48
|
export type { AppBarActionProps };
|
|
34
|
-
export default
|
|
49
|
+
export default CollapsingHeaderWithParts;
|