@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,50 +1,257 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import ExpoImage from "../Display/Display.ExpoImage.js";
|
|
3
3
|
import GradientSurface from "../Display/Display.GradientSurface.js";
|
|
4
4
|
import Pattern from "../Display/Display.Pattern.js";
|
|
5
5
|
import Loading from "./Feedback.Loading.js";
|
|
6
6
|
import Spinner from "./Feedback.Spinner.js";
|
|
7
7
|
import GradientContainer from "../layouts/GradientContainer.js";
|
|
8
|
-
import {
|
|
8
|
+
import { useTheme } from "../theme/index.js";
|
|
9
|
+
import { ON_DARK_SURFACE } from "../theme/on-dark-surface.js";
|
|
9
10
|
import { Typography } from "../Typography/index.js";
|
|
10
11
|
import { useEffect, useRef, useState } from "react";
|
|
11
12
|
import { View } from "react-native";
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
12
14
|
function renderLogo(logo) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
if (!logo) {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
return _jsx(ExpoImage, {
|
|
19
|
+
className: "w-[250px] h-[200px] mb-12",
|
|
20
|
+
contentFit: "contain",
|
|
21
|
+
source: logo
|
|
22
|
+
});
|
|
17
23
|
}
|
|
18
|
-
function HeroSplash(
|
|
19
|
-
|
|
24
|
+
function HeroSplash(t0) {
|
|
25
|
+
const $ = _c(21);
|
|
26
|
+
const {
|
|
27
|
+
logo,
|
|
28
|
+
message,
|
|
29
|
+
title,
|
|
30
|
+
subtitle
|
|
31
|
+
} = t0;
|
|
32
|
+
const theme = useTheme();
|
|
33
|
+
let t1;
|
|
34
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
35
|
+
t1 = {
|
|
36
|
+
flex: 1
|
|
37
|
+
};
|
|
38
|
+
$[0] = t1;
|
|
39
|
+
} else {
|
|
40
|
+
t1 = $[0];
|
|
41
|
+
}
|
|
42
|
+
let t2;
|
|
43
|
+
if ($[1] !== theme.primary) {
|
|
44
|
+
t2 = _jsx(Pattern, {
|
|
45
|
+
color: theme.primary,
|
|
46
|
+
kind: "dots",
|
|
47
|
+
opacity: 0.16,
|
|
48
|
+
size: 26
|
|
49
|
+
});
|
|
50
|
+
$[1] = theme.primary;
|
|
51
|
+
$[2] = t2;
|
|
52
|
+
} else {
|
|
53
|
+
t2 = $[2];
|
|
54
|
+
}
|
|
55
|
+
let t3;
|
|
56
|
+
if ($[3] !== logo || $[4] !== theme.primary) {
|
|
57
|
+
t3 = logo ? _jsx(ExpoImage, {
|
|
58
|
+
className: "w-28 h-28 mb-7",
|
|
59
|
+
contentFit: "contain",
|
|
60
|
+
source: logo,
|
|
61
|
+
style: {
|
|
62
|
+
shadowColor: theme.primary,
|
|
63
|
+
shadowOpacity: 0.7,
|
|
64
|
+
shadowRadius: 28
|
|
65
|
+
}
|
|
66
|
+
}) : null;
|
|
67
|
+
$[3] = logo;
|
|
68
|
+
$[4] = theme.primary;
|
|
69
|
+
$[5] = t3;
|
|
70
|
+
} else {
|
|
71
|
+
t3 = $[5];
|
|
72
|
+
}
|
|
73
|
+
let t4;
|
|
74
|
+
if ($[6] !== title) {
|
|
75
|
+
t4 = title ? _jsx(Typography.Text, {
|
|
76
|
+
bold: true,
|
|
77
|
+
style: {
|
|
78
|
+
color: ON_DARK_SURFACE.ink,
|
|
79
|
+
letterSpacing: 1
|
|
80
|
+
},
|
|
81
|
+
variant: "h2",
|
|
82
|
+
children: title
|
|
83
|
+
}) : null;
|
|
84
|
+
$[6] = title;
|
|
85
|
+
$[7] = t4;
|
|
86
|
+
} else {
|
|
87
|
+
t4 = $[7];
|
|
88
|
+
}
|
|
89
|
+
let t5;
|
|
90
|
+
if ($[8] !== subtitle) {
|
|
91
|
+
t5 = subtitle ? _jsx(Typography.Text, {
|
|
92
|
+
style: {
|
|
93
|
+
color: ON_DARK_SURFACE.muted,
|
|
94
|
+
fontSize: 13,
|
|
95
|
+
marginTop: 6
|
|
96
|
+
},
|
|
97
|
+
children: subtitle
|
|
98
|
+
}) : null;
|
|
99
|
+
$[8] = subtitle;
|
|
100
|
+
$[9] = t5;
|
|
101
|
+
} else {
|
|
102
|
+
t5 = $[9];
|
|
103
|
+
}
|
|
104
|
+
let t6;
|
|
105
|
+
if ($[10] !== message || $[11] !== theme.primary) {
|
|
106
|
+
t6 = _jsx(View, {
|
|
107
|
+
className: "mt-10",
|
|
108
|
+
children: _jsx(Spinner, {
|
|
109
|
+
accessibilityLabel: message,
|
|
110
|
+
color: theme.primary,
|
|
111
|
+
size: "small"
|
|
112
|
+
})
|
|
113
|
+
});
|
|
114
|
+
$[10] = message;
|
|
115
|
+
$[11] = theme.primary;
|
|
116
|
+
$[12] = t6;
|
|
117
|
+
} else {
|
|
118
|
+
t6 = $[12];
|
|
119
|
+
}
|
|
120
|
+
let t7;
|
|
121
|
+
if ($[13] !== t3 || $[14] !== t4 || $[15] !== t5 || $[16] !== t6) {
|
|
122
|
+
t7 = _jsxs(View, {
|
|
123
|
+
className: "items-center",
|
|
124
|
+
children: [t3, t4, t5, t6]
|
|
125
|
+
});
|
|
126
|
+
$[13] = t3;
|
|
127
|
+
$[14] = t4;
|
|
128
|
+
$[15] = t5;
|
|
129
|
+
$[16] = t6;
|
|
130
|
+
$[17] = t7;
|
|
131
|
+
} else {
|
|
132
|
+
t7 = $[17];
|
|
133
|
+
}
|
|
134
|
+
let t8;
|
|
135
|
+
if ($[18] !== t2 || $[19] !== t7) {
|
|
136
|
+
t8 = _jsxs(GradientSurface, {
|
|
137
|
+
className: "flex-1 items-center justify-center",
|
|
138
|
+
preset: "warm",
|
|
139
|
+
radius: "none",
|
|
140
|
+
style: t1,
|
|
141
|
+
testID: "hero-splash",
|
|
142
|
+
children: [t2, t7]
|
|
143
|
+
});
|
|
144
|
+
$[18] = t2;
|
|
145
|
+
$[19] = t7;
|
|
146
|
+
$[20] = t8;
|
|
147
|
+
} else {
|
|
148
|
+
t8 = $[20];
|
|
149
|
+
}
|
|
150
|
+
return t8;
|
|
20
151
|
}
|
|
21
|
-
function Splash(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
152
|
+
function Splash(t0) {
|
|
153
|
+
const $ = _c(16);
|
|
154
|
+
const {
|
|
155
|
+
isReady,
|
|
156
|
+
logo,
|
|
157
|
+
minDuration: t1,
|
|
158
|
+
message: t2,
|
|
159
|
+
variant: t3,
|
|
160
|
+
title,
|
|
161
|
+
subtitle,
|
|
162
|
+
children
|
|
163
|
+
} = t0;
|
|
164
|
+
const minDuration = t1 === undefined ? 800 : t1;
|
|
165
|
+
const message = t2 === undefined ? "Inicializando..." : t2;
|
|
166
|
+
const variant = t3 === undefined ? "default" : t3;
|
|
167
|
+
const [showContent, setShowContent] = useState(false);
|
|
168
|
+
const minDurationTimeoutRef = useRef(null);
|
|
169
|
+
let t4;
|
|
170
|
+
let t5;
|
|
171
|
+
if ($[0] !== isReady || $[1] !== minDuration) {
|
|
172
|
+
t4 = () => {
|
|
173
|
+
if (minDurationTimeoutRef.current) {
|
|
174
|
+
clearTimeout(minDurationTimeoutRef.current);
|
|
175
|
+
}
|
|
176
|
+
if (!isReady) {
|
|
177
|
+
setShowContent(false);
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
minDurationTimeoutRef.current = setTimeout(() => {
|
|
181
|
+
setShowContent(true);
|
|
182
|
+
}, minDuration);
|
|
183
|
+
return () => {
|
|
25
184
|
if (minDurationTimeoutRef.current) {
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
if (!isReady) {
|
|
29
|
-
// eslint-disable-next-line react-hooks/set-state-in-effect
|
|
30
|
-
setShowContent(false);
|
|
31
|
-
return;
|
|
185
|
+
clearTimeout(minDurationTimeoutRef.current);
|
|
32
186
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
t5 = [isReady, minDuration];
|
|
190
|
+
$[0] = isReady;
|
|
191
|
+
$[1] = minDuration;
|
|
192
|
+
$[2] = t4;
|
|
193
|
+
$[3] = t5;
|
|
194
|
+
} else {
|
|
195
|
+
t4 = $[2];
|
|
196
|
+
t5 = $[3];
|
|
197
|
+
}
|
|
198
|
+
useEffect(t4, t5);
|
|
199
|
+
if (!showContent) {
|
|
200
|
+
if (variant === "hero") {
|
|
201
|
+
let t6;
|
|
202
|
+
if ($[4] !== logo || $[5] !== message || $[6] !== subtitle || $[7] !== title) {
|
|
203
|
+
t6 = _jsx(HeroSplash, {
|
|
204
|
+
logo: logo,
|
|
205
|
+
message: message,
|
|
206
|
+
subtitle: subtitle,
|
|
207
|
+
title: title
|
|
208
|
+
});
|
|
209
|
+
$[4] = logo;
|
|
210
|
+
$[5] = message;
|
|
211
|
+
$[6] = subtitle;
|
|
212
|
+
$[7] = title;
|
|
213
|
+
$[8] = t6;
|
|
214
|
+
} else {
|
|
215
|
+
t6 = $[8];
|
|
216
|
+
}
|
|
217
|
+
return t6;
|
|
218
|
+
}
|
|
219
|
+
let t6;
|
|
220
|
+
if ($[9] !== logo) {
|
|
221
|
+
t6 = renderLogo(logo);
|
|
222
|
+
$[9] = logo;
|
|
223
|
+
$[10] = t6;
|
|
224
|
+
} else {
|
|
225
|
+
t6 = $[10];
|
|
226
|
+
}
|
|
227
|
+
let t7;
|
|
228
|
+
if ($[11] !== message) {
|
|
229
|
+
t7 = _jsx(Loading, {
|
|
230
|
+
message: message,
|
|
231
|
+
size: "large"
|
|
232
|
+
});
|
|
233
|
+
$[11] = message;
|
|
234
|
+
$[12] = t7;
|
|
235
|
+
} else {
|
|
236
|
+
t7 = $[12];
|
|
237
|
+
}
|
|
238
|
+
let t8;
|
|
239
|
+
if ($[13] !== t6 || $[14] !== t7) {
|
|
240
|
+
t8 = _jsx(GradientContainer, {
|
|
241
|
+
className: "flex-1",
|
|
242
|
+
children: _jsxs(View, {
|
|
243
|
+
className: "flex-1 justify-center items-center",
|
|
244
|
+
children: [t6, t7]
|
|
245
|
+
})
|
|
246
|
+
});
|
|
247
|
+
$[13] = t6;
|
|
248
|
+
$[14] = t7;
|
|
249
|
+
$[15] = t8;
|
|
250
|
+
} else {
|
|
251
|
+
t8 = $[15];
|
|
47
252
|
}
|
|
48
|
-
return
|
|
253
|
+
return t8;
|
|
254
|
+
}
|
|
255
|
+
return children;
|
|
49
256
|
}
|
|
50
257
|
export default Splash;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type EmptyStateProps } from "./Feedback.EmptyState.js";
|
|
2
|
+
import { type ErrorProps } from "./Feedback.Error.js";
|
|
3
|
+
import { type LoadingStateProps } from "./Feedback.Loading.js";
|
|
4
|
+
export type FeedbackStateProps = ({
|
|
5
|
+
kind: "loading";
|
|
6
|
+
} & LoadingStateProps) | ({
|
|
7
|
+
kind: "empty";
|
|
8
|
+
} & Partial<EmptyStateProps>) | ({
|
|
9
|
+
kind: "error";
|
|
10
|
+
} & ErrorProps);
|
|
11
|
+
/**
|
|
12
|
+
* One entry point for the three states a screen or template can be in.
|
|
13
|
+
* `empty` with a `title` is the configurable EmptyState; without one it keeps
|
|
14
|
+
* the original "no records" look that list and form templates already show.
|
|
15
|
+
*/
|
|
16
|
+
declare function State(props: FeedbackStateProps): import("react").JSX.Element;
|
|
17
|
+
export default State;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import Empty from "./Feedback.Empty.js";
|
|
3
|
+
import EmptyState from "./Feedback.EmptyState.js";
|
|
4
|
+
import ErrorState from "./Feedback.Error.js";
|
|
5
|
+
import Loading from "./Feedback.Loading.js";
|
|
6
|
+
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
7
|
+
/**
|
|
8
|
+
* One entry point for the three states a screen or template can be in.
|
|
9
|
+
* `empty` with a `title` is the configurable EmptyState; without one it keeps
|
|
10
|
+
* the original "no records" look that list and form templates already show.
|
|
11
|
+
*/
|
|
12
|
+
function State(props) {
|
|
13
|
+
const $ = _c(14);
|
|
14
|
+
switch (props.kind) {
|
|
15
|
+
case "loading":
|
|
16
|
+
{
|
|
17
|
+
let loading;
|
|
18
|
+
if ($[0] !== props) {
|
|
19
|
+
const {
|
|
20
|
+
kind: _kind_1,
|
|
21
|
+
...t0
|
|
22
|
+
} = props;
|
|
23
|
+
loading = t0;
|
|
24
|
+
$[0] = props;
|
|
25
|
+
$[1] = loading;
|
|
26
|
+
} else {
|
|
27
|
+
loading = $[1];
|
|
28
|
+
}
|
|
29
|
+
let t0;
|
|
30
|
+
if ($[2] !== loading) {
|
|
31
|
+
t0 = _jsx(Loading, {
|
|
32
|
+
...loading
|
|
33
|
+
});
|
|
34
|
+
$[2] = loading;
|
|
35
|
+
$[3] = t0;
|
|
36
|
+
} else {
|
|
37
|
+
t0 = $[3];
|
|
38
|
+
}
|
|
39
|
+
return t0;
|
|
40
|
+
}
|
|
41
|
+
case "error":
|
|
42
|
+
{
|
|
43
|
+
let error;
|
|
44
|
+
if ($[4] !== props) {
|
|
45
|
+
const {
|
|
46
|
+
kind: _kind_0,
|
|
47
|
+
...t0
|
|
48
|
+
} = props;
|
|
49
|
+
error = t0;
|
|
50
|
+
$[4] = props;
|
|
51
|
+
$[5] = error;
|
|
52
|
+
} else {
|
|
53
|
+
error = $[5];
|
|
54
|
+
}
|
|
55
|
+
let t0;
|
|
56
|
+
if ($[6] !== error) {
|
|
57
|
+
t0 = _jsx(ErrorState, {
|
|
58
|
+
...error
|
|
59
|
+
});
|
|
60
|
+
$[6] = error;
|
|
61
|
+
$[7] = t0;
|
|
62
|
+
} else {
|
|
63
|
+
t0 = $[7];
|
|
64
|
+
}
|
|
65
|
+
return t0;
|
|
66
|
+
}
|
|
67
|
+
case "empty":
|
|
68
|
+
{
|
|
69
|
+
let empty;
|
|
70
|
+
let title;
|
|
71
|
+
if ($[8] !== props) {
|
|
72
|
+
const {
|
|
73
|
+
kind: _kind,
|
|
74
|
+
title: t0,
|
|
75
|
+
...t1
|
|
76
|
+
} = props;
|
|
77
|
+
title = t0;
|
|
78
|
+
empty = t1;
|
|
79
|
+
$[8] = props;
|
|
80
|
+
$[9] = empty;
|
|
81
|
+
$[10] = title;
|
|
82
|
+
} else {
|
|
83
|
+
empty = $[9];
|
|
84
|
+
title = $[10];
|
|
85
|
+
}
|
|
86
|
+
let t0;
|
|
87
|
+
if ($[11] !== empty || $[12] !== title) {
|
|
88
|
+
t0 = title ? _jsx(EmptyState, {
|
|
89
|
+
...empty,
|
|
90
|
+
title: title
|
|
91
|
+
}) : _jsx(Empty, {
|
|
92
|
+
className: empty.className
|
|
93
|
+
});
|
|
94
|
+
$[11] = empty;
|
|
95
|
+
$[12] = title;
|
|
96
|
+
$[13] = t0;
|
|
97
|
+
} else {
|
|
98
|
+
t0 = $[13];
|
|
99
|
+
}
|
|
100
|
+
return t0;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
export default State;
|