@sincpro/mobile-ui 3.0.1 → 3.2.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 +437 -62
- package/dist/Dialog/Dialog.Sheet.d.ts +7 -3
- package/dist/Dialog/Dialog.Sheet.js +267 -15
- package/dist/Dialog/OverlayHost.d.ts +24 -0
- package/dist/Dialog/OverlayHost.js +230 -0
- package/dist/Dialog/SheetSurface.d.ts +43 -0
- package/dist/Dialog/SheetSurface.js +495 -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 +148 -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 +15 -11
- package/dist/Display/icon-map.js +344 -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 +507 -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 +497 -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 +223 -0
- package/dist/Form/Form.MonetaryInput.js +164 -17
- package/dist/Form/Form.PickerField.d.ts +31 -0
- package/dist/Form/Form.PickerField.js +539 -0
- package/dist/Form/Form.PinInput.js +150 -15
- package/dist/Form/Form.QuantitySelector.js +229 -25
- package/dist/Form/Form.RadioButton.d.ts +1 -0
- package/dist/Form/Form.RadioButton.js +26 -29
- package/dist/Form/Form.Select.d.ts +2 -1
- package/dist/Form/Form.Select.js +388 -60
- package/dist/Form/Form.Slider.js +133 -10
- package/dist/Form/Form.Switch.js +99 -4
- package/dist/Form/choice-row.d.ts +15 -0
- package/dist/Form/choice-row.js +236 -0
- 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.d.ts +2 -0
- package/dist/theme/active.js +33 -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.d.ts +4 -0
- package/dist/theme/useTheme.js +7 -3
- package/dist/theme/useThemeVars.d.ts +9 -0
- package/dist/theme/useThemeVars.js +23 -0
- package/dist/theme/validate.js +175 -166
- package/dist/tokens/index.js +1 -1
- package/dist/tokens/motion.js +30 -13
- package/dist/utils/async.d.ts +14 -0
- package/dist/utils/async.js +22 -0
- package/dist/utils/criteria.js +66 -85
- package/dist/utils/date.d.ts +8 -2
- package/dist/utils/date.js +63 -50
- package/dist/utils/image.js +8 -8
- package/dist/utils/intl.d.ts +1 -0
- package/dist/utils/intl.js +13 -0
- package/dist/utils/keys.js +3 -5
- package/dist/utils/monetary.d.ts +1 -0
- package/dist/utils/monetary.js +28 -24
- package/dist/utils/progress.js +2 -3
- package/dist/utils/quantity.js +25 -26
- package/dist/utils/reorder.js +11 -20
- package/dist/utils/search.d.ts +4 -0
- package/dist/utils/search.js +12 -0
- package/dist/utils/serializer.js +38 -38
- package/dist/utils/useReducedMotion.js +32 -30
- package/dist/views/AppSplashView.js +117 -3
- package/dist/views/AuthFormView.d.ts +4 -5
- package/dist/views/AuthFormView.js +119 -11
- package/dist/views/FormViewV2.context.js +75 -23
- package/dist/views/FormViewV2.d.ts +4 -5
- package/dist/views/FormViewV2.js +658 -92
- package/dist/views/ListViewV2.context.js +91 -47
- package/dist/views/ListViewV2.d.ts +84 -43
- package/dist/views/ListViewV2.js +1350 -200
- package/dist/views/Wizard/Wizard.context.js +248 -84
- package/dist/views/Wizard/Wizard.js +260 -67
- package/dist/views/types/IListView.js +34 -31
- package/dist/widgets/CollectionOptions.js +557 -138
- package/dist/widgets/FilterBar.js +159 -7
- package/dist/widgets/FilterBuilder.js +375 -102
- package/dist/widgets/JSONViewer.js +275 -129
- package/dist/widgets/PromoBanner.js +336 -42
- package/dist/widgets/PromoModal.d.ts +2 -2
- package/dist/widgets/PromoModal.js +389 -62
- package/dist/widgets/QueryChoice.js +150 -8
- package/dist/widgets/QuickActions.js +120 -31
- package/dist/widgets/ReorderableList.js +399 -128
- package/dist/widgets/TimeZoneSelectorModal.js +458 -51
- package/dist/widgets/index.js +3 -3
- package/package.json +6 -1
- package/tailwind.preset.js +7 -5
- package/dist/Form/Form.InputField.d.ts +0 -10
- package/dist/Form/Form.InputField.js +0 -38
- package/dist/Form/Form.KeyboardToolbar.d.ts +0 -22
- package/dist/Form/Form.KeyboardToolbar.js +0 -66
- package/dist/Form/Form.PasswordInput.d.ts +0 -9
- package/dist/Form/Form.PasswordInput.js +0 -17
- package/dist/Form/Form.TextInput.d.ts +0 -8
- package/dist/Form/Form.TextInput.js +0 -8
- package/dist/primitives/BaseButton.d.ts +0 -150
- package/dist/primitives/BaseButton.js +0 -229
- package/dist/utils/useSheetTranslation.d.ts +0 -5
- package/dist/utils/useSheetTranslation.js +0 -23
package/dist/utils/serializer.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
export function safeJsonStringify(obj, pretty = false) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return JSON.stringify(obj, (key, value) => {
|
|
5
|
-
if (key.startsWith("_")) {
|
|
6
|
-
return undefined;
|
|
7
|
-
}
|
|
8
|
-
if (value instanceof Map) {
|
|
9
|
-
return Object.fromEntries(value);
|
|
10
|
-
}
|
|
11
|
-
if (value instanceof Set) {
|
|
12
|
-
return Array.from(value);
|
|
13
|
-
}
|
|
14
|
-
if (typeof value === "object" && value !== null) {
|
|
15
|
-
if (seen.has(value)) {
|
|
16
|
-
return "[Circular]";
|
|
17
|
-
}
|
|
18
|
-
seen.add(value);
|
|
19
|
-
}
|
|
20
|
-
return value;
|
|
21
|
-
}, 2);
|
|
22
|
-
}
|
|
2
|
+
const seen = new WeakSet();
|
|
3
|
+
if (pretty) {
|
|
23
4
|
return JSON.stringify(obj, (key, value) => {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
seen.add(value);
|
|
5
|
+
if (key.startsWith("_")) {
|
|
6
|
+
return undefined;
|
|
7
|
+
}
|
|
8
|
+
if (value instanceof Map) {
|
|
9
|
+
return Object.fromEntries(value);
|
|
10
|
+
}
|
|
11
|
+
if (value instanceof Set) {
|
|
12
|
+
return Array.from(value);
|
|
13
|
+
}
|
|
14
|
+
if (typeof value === "object" && value !== null) {
|
|
15
|
+
if (seen.has(value)) {
|
|
16
|
+
return "[Circular]";
|
|
38
17
|
}
|
|
39
|
-
|
|
40
|
-
|
|
18
|
+
seen.add(value);
|
|
19
|
+
}
|
|
20
|
+
return value;
|
|
21
|
+
}, 2);
|
|
22
|
+
}
|
|
23
|
+
return JSON.stringify(obj, (key, value) => {
|
|
24
|
+
if (key.startsWith("_")) {
|
|
25
|
+
return undefined;
|
|
26
|
+
}
|
|
27
|
+
if (value instanceof Map) {
|
|
28
|
+
return Object.fromEntries(value);
|
|
29
|
+
}
|
|
30
|
+
if (value instanceof Set) {
|
|
31
|
+
return Array.from(value);
|
|
32
|
+
}
|
|
33
|
+
if (typeof value === "object" && value !== null) {
|
|
34
|
+
if (seen.has(value)) {
|
|
35
|
+
return "[Circular]";
|
|
36
|
+
}
|
|
37
|
+
seen.add(value);
|
|
38
|
+
}
|
|
39
|
+
return value;
|
|
40
|
+
});
|
|
41
41
|
}
|
|
42
42
|
export function safeJsonParse(json) {
|
|
43
|
-
|
|
43
|
+
return JSON.parse(json);
|
|
44
44
|
}
|
|
@@ -5,39 +5,41 @@ let reducedMotion = true;
|
|
|
5
5
|
let generation = 0;
|
|
6
6
|
let subscription;
|
|
7
7
|
function publish(enabled) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
for (const listener of [...listeners])
|
|
12
|
-
listener();
|
|
8
|
+
if (reducedMotion === enabled) return;
|
|
9
|
+
reducedMotion = enabled;
|
|
10
|
+
for (const listener of [...listeners]) listener();
|
|
13
11
|
}
|
|
14
12
|
function subscribe(listener) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
13
|
+
listeners.add(listener);
|
|
14
|
+
if (listeners.size === 1) {
|
|
15
|
+
const request = ++generation;
|
|
16
|
+
let receivedChange = false;
|
|
17
|
+
subscription = AccessibilityInfo.addEventListener("reduceMotionChanged", enabled => {
|
|
18
|
+
receivedChange = true;
|
|
19
|
+
publish(enabled);
|
|
20
|
+
});
|
|
21
|
+
AccessibilityInfo.isReduceMotionEnabled().then(enabled => {
|
|
22
|
+
if (request === generation && !receivedChange) publish(enabled);
|
|
23
|
+
}, error => {
|
|
24
|
+
if (request === generation) console.warn("[useReducedMotion] Could not read accessibility preference", error);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return () => {
|
|
28
|
+
listeners.delete(listener);
|
|
29
|
+
if (listeners.size === 0) {
|
|
30
|
+
generation += 1;
|
|
31
|
+
subscription?.remove();
|
|
32
|
+
subscription = undefined;
|
|
33
|
+
reducedMotion = true;
|
|
30
34
|
}
|
|
31
|
-
|
|
32
|
-
listeners.delete(listener);
|
|
33
|
-
if (listeners.size === 0) {
|
|
34
|
-
generation += 1;
|
|
35
|
-
subscription?.remove();
|
|
36
|
-
subscription = undefined;
|
|
37
|
-
reducedMotion = true;
|
|
38
|
-
}
|
|
39
|
-
};
|
|
35
|
+
};
|
|
40
36
|
}
|
|
41
37
|
export function useReducedMotion() {
|
|
42
|
-
|
|
38
|
+
return useSyncExternalStore(subscribe, _temp, _temp2);
|
|
39
|
+
}
|
|
40
|
+
function _temp2() {
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
function _temp() {
|
|
44
|
+
return reducedMotion;
|
|
43
45
|
}
|
|
@@ -1,10 +1,124 @@
|
|
|
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 Spinner from "../Feedback/Feedback.Spinner.js";
|
|
6
|
+
import { ON_DARK_SURFACE } from "../theme/on-dark-surface.js";
|
|
6
7
|
import { View } from "react-native";
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
9
|
+
export function AppSplashView(t0) {
|
|
10
|
+
const $ = _c(21);
|
|
11
|
+
const {
|
|
12
|
+
background,
|
|
13
|
+
logo,
|
|
14
|
+
loadingVariant: t1,
|
|
15
|
+
loader,
|
|
16
|
+
style
|
|
17
|
+
} = t0;
|
|
18
|
+
const loadingVariant = t1 === undefined ? "dots" : t1;
|
|
19
|
+
const t2 = background?.colors;
|
|
20
|
+
const t3 = background?.end;
|
|
21
|
+
const t4 = background?.surface ?? "night-green";
|
|
22
|
+
const t5 = background?.start;
|
|
23
|
+
let t6;
|
|
24
|
+
if ($[0] !== style) {
|
|
25
|
+
t6 = {
|
|
26
|
+
flex: 1,
|
|
27
|
+
...style
|
|
28
|
+
};
|
|
29
|
+
$[0] = style;
|
|
30
|
+
$[1] = t6;
|
|
31
|
+
} else {
|
|
32
|
+
t6 = $[1];
|
|
33
|
+
}
|
|
34
|
+
let t7;
|
|
35
|
+
if ($[2] !== background) {
|
|
36
|
+
t7 = background?.pattern ? _jsx(Pattern, {
|
|
37
|
+
color: background.patternColor ?? ON_DARK_SURFACE.ink,
|
|
38
|
+
kind: background.pattern,
|
|
39
|
+
opacity: background.patternOpacity ?? 0.18
|
|
40
|
+
}) : null;
|
|
41
|
+
$[2] = background;
|
|
42
|
+
$[3] = t7;
|
|
43
|
+
} else {
|
|
44
|
+
t7 = $[3];
|
|
45
|
+
}
|
|
46
|
+
let t8;
|
|
47
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
48
|
+
t8 = {
|
|
49
|
+
flex: 1,
|
|
50
|
+
alignItems: "center",
|
|
51
|
+
justifyContent: "center"
|
|
52
|
+
};
|
|
53
|
+
$[4] = t8;
|
|
54
|
+
} else {
|
|
55
|
+
t8 = $[4];
|
|
56
|
+
}
|
|
57
|
+
let t9;
|
|
58
|
+
if ($[5] !== logo) {
|
|
59
|
+
t9 = logo ? _jsx(ExpoImage, {
|
|
60
|
+
contentFit: "contain",
|
|
61
|
+
source: logo,
|
|
62
|
+
style: {
|
|
63
|
+
width: 140,
|
|
64
|
+
height: 140,
|
|
65
|
+
marginBottom: 40
|
|
66
|
+
}
|
|
67
|
+
}) : null;
|
|
68
|
+
$[5] = logo;
|
|
69
|
+
$[6] = t9;
|
|
70
|
+
} else {
|
|
71
|
+
t9 = $[6];
|
|
72
|
+
}
|
|
73
|
+
let t10;
|
|
74
|
+
if ($[7] !== loader || $[8] !== loadingVariant) {
|
|
75
|
+
t10 = loader ?? _jsx(Spinner, {
|
|
76
|
+
color: ON_DARK_SURFACE.ink,
|
|
77
|
+
size: "large",
|
|
78
|
+
variant: loadingVariant
|
|
79
|
+
});
|
|
80
|
+
$[7] = loader;
|
|
81
|
+
$[8] = loadingVariant;
|
|
82
|
+
$[9] = t10;
|
|
83
|
+
} else {
|
|
84
|
+
t10 = $[9];
|
|
85
|
+
}
|
|
86
|
+
let t11;
|
|
87
|
+
if ($[10] !== t10 || $[11] !== t9) {
|
|
88
|
+
t11 = _jsxs(View, {
|
|
89
|
+
style: t8,
|
|
90
|
+
children: [t9, t10]
|
|
91
|
+
});
|
|
92
|
+
$[10] = t10;
|
|
93
|
+
$[11] = t9;
|
|
94
|
+
$[12] = t11;
|
|
95
|
+
} else {
|
|
96
|
+
t11 = $[12];
|
|
97
|
+
}
|
|
98
|
+
let t12;
|
|
99
|
+
if ($[13] !== t11 || $[14] !== t2 || $[15] !== t3 || $[16] !== t4 || $[17] !== t5 || $[18] !== t6 || $[19] !== t7) {
|
|
100
|
+
t12 = _jsxs(GradientSurface, {
|
|
101
|
+
className: "flex-1",
|
|
102
|
+
colors: t2,
|
|
103
|
+
end: t3,
|
|
104
|
+
padding: "none",
|
|
105
|
+
preset: t4,
|
|
106
|
+
radius: "none",
|
|
107
|
+
start: t5,
|
|
108
|
+
style: t6,
|
|
109
|
+
children: [t7, t11]
|
|
110
|
+
});
|
|
111
|
+
$[13] = t11;
|
|
112
|
+
$[14] = t2;
|
|
113
|
+
$[15] = t3;
|
|
114
|
+
$[16] = t4;
|
|
115
|
+
$[17] = t5;
|
|
116
|
+
$[18] = t6;
|
|
117
|
+
$[19] = t7;
|
|
118
|
+
$[20] = t12;
|
|
119
|
+
} else {
|
|
120
|
+
t12 = $[20];
|
|
121
|
+
}
|
|
122
|
+
return t12;
|
|
9
123
|
}
|
|
10
124
|
export default AppSplashView;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { KeyboardFormProps } from "../Form/Form.KeyboardForm.js";
|
|
2
|
+
import type { SafeAreaEdge } from "../layouts/edges.js";
|
|
2
3
|
import type { AppBarBackground } from "../Navigation/Navigation.AppBar.js";
|
|
3
4
|
import type { ImageSource } from "../utils/image.js";
|
|
4
5
|
import { ReactNode } from "react";
|
|
5
|
-
import type { Edge } from "react-native-safe-area-context";
|
|
6
6
|
interface AuthFormProps {
|
|
7
7
|
title?: string;
|
|
8
8
|
description?: string;
|
|
@@ -10,9 +10,8 @@ interface AuthFormProps {
|
|
|
10
10
|
onBack?: () => void;
|
|
11
11
|
FormNode: ReactNode;
|
|
12
12
|
background?: AppBarBackground;
|
|
13
|
-
edges?:
|
|
14
|
-
|
|
15
|
-
keyboardFormProps?: Omit<KeyboardFormProps, "children" | "toolbar">;
|
|
13
|
+
edges?: SafeAreaEdge[];
|
|
14
|
+
keyboardFormProps?: Omit<KeyboardFormProps, "children">;
|
|
16
15
|
}
|
|
17
|
-
declare function AuthFormView({ title, description, logoSource, onBack, FormNode, background, edges,
|
|
16
|
+
declare function AuthFormView({ title, description, logoSource, onBack, FormNode, background, edges, keyboardFormProps, }: AuthFormProps): import("react").JSX.Element;
|
|
18
17
|
export default AuthFormView;
|
|
@@ -1,21 +1,129 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { Display } from "../Display/index.js";
|
|
3
3
|
import AuthContainer from "../layouts/AuthContainer.js";
|
|
4
4
|
import { Typography } from "../Typography/index.js";
|
|
5
5
|
import { View } from "react-native";
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
6
7
|
const Logo = Display.Logo;
|
|
7
8
|
const Text = Typography.Text;
|
|
8
|
-
function AuthFormView(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
function AuthFormView(t0) {
|
|
10
|
+
const $ = _c(23);
|
|
11
|
+
const {
|
|
12
|
+
title,
|
|
13
|
+
description,
|
|
14
|
+
logoSource,
|
|
15
|
+
onBack,
|
|
16
|
+
FormNode,
|
|
17
|
+
background,
|
|
18
|
+
edges,
|
|
19
|
+
keyboardFormProps
|
|
20
|
+
} = t0;
|
|
21
|
+
let t1;
|
|
22
|
+
if ($[0] !== title) {
|
|
23
|
+
t1 = () => {
|
|
24
|
+
if (!title) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
return _jsx(Text, {
|
|
28
|
+
bold: true,
|
|
29
|
+
variant: "h3",
|
|
30
|
+
children: title
|
|
31
|
+
});
|
|
13
32
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
33
|
+
$[0] = title;
|
|
34
|
+
$[1] = t1;
|
|
35
|
+
} else {
|
|
36
|
+
t1 = $[1];
|
|
37
|
+
}
|
|
38
|
+
const renderTitle = t1;
|
|
39
|
+
let t2;
|
|
40
|
+
if ($[2] !== description) {
|
|
41
|
+
t2 = () => {
|
|
42
|
+
if (!description) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
return _jsx(Text, {
|
|
46
|
+
className: "mt-1 text-text-secondary",
|
|
47
|
+
variant: "body",
|
|
48
|
+
children: description
|
|
49
|
+
});
|
|
18
50
|
};
|
|
19
|
-
|
|
51
|
+
$[2] = description;
|
|
52
|
+
$[3] = t2;
|
|
53
|
+
} else {
|
|
54
|
+
t2 = $[3];
|
|
55
|
+
}
|
|
56
|
+
const renderDescription = t2;
|
|
57
|
+
let t3;
|
|
58
|
+
if ($[4] !== logoSource) {
|
|
59
|
+
t3 = _jsx(Logo, {
|
|
60
|
+
size: "large",
|
|
61
|
+
source: logoSource
|
|
62
|
+
});
|
|
63
|
+
$[4] = logoSource;
|
|
64
|
+
$[5] = t3;
|
|
65
|
+
} else {
|
|
66
|
+
t3 = $[5];
|
|
67
|
+
}
|
|
68
|
+
let t4;
|
|
69
|
+
if ($[6] !== renderTitle) {
|
|
70
|
+
t4 = renderTitle();
|
|
71
|
+
$[6] = renderTitle;
|
|
72
|
+
$[7] = t4;
|
|
73
|
+
} else {
|
|
74
|
+
t4 = $[7];
|
|
75
|
+
}
|
|
76
|
+
let t5;
|
|
77
|
+
if ($[8] !== renderDescription) {
|
|
78
|
+
t5 = renderDescription();
|
|
79
|
+
$[8] = renderDescription;
|
|
80
|
+
$[9] = t5;
|
|
81
|
+
} else {
|
|
82
|
+
t5 = $[9];
|
|
83
|
+
}
|
|
84
|
+
let t6;
|
|
85
|
+
if ($[10] !== t4 || $[11] !== t5) {
|
|
86
|
+
t6 = _jsxs(View, {
|
|
87
|
+
className: "mb-6",
|
|
88
|
+
children: [t4, t5]
|
|
89
|
+
});
|
|
90
|
+
$[10] = t4;
|
|
91
|
+
$[11] = t5;
|
|
92
|
+
$[12] = t6;
|
|
93
|
+
} else {
|
|
94
|
+
t6 = $[12];
|
|
95
|
+
}
|
|
96
|
+
let t7;
|
|
97
|
+
if ($[13] !== FormNode || $[14] !== t6) {
|
|
98
|
+
t7 = _jsxs(View, {
|
|
99
|
+
children: [t6, FormNode]
|
|
100
|
+
});
|
|
101
|
+
$[13] = FormNode;
|
|
102
|
+
$[14] = t6;
|
|
103
|
+
$[15] = t7;
|
|
104
|
+
} else {
|
|
105
|
+
t7 = $[15];
|
|
106
|
+
}
|
|
107
|
+
let t8;
|
|
108
|
+
if ($[16] !== background || $[17] !== edges || $[18] !== keyboardFormProps || $[19] !== onBack || $[20] !== t3 || $[21] !== t7) {
|
|
109
|
+
t8 = _jsx(AuthContainer, {
|
|
110
|
+
background: background,
|
|
111
|
+
edges: edges,
|
|
112
|
+
header: t3,
|
|
113
|
+
keyboardFormProps: keyboardFormProps,
|
|
114
|
+
onBackPress: onBack,
|
|
115
|
+
children: t7
|
|
116
|
+
});
|
|
117
|
+
$[16] = background;
|
|
118
|
+
$[17] = edges;
|
|
119
|
+
$[18] = keyboardFormProps;
|
|
120
|
+
$[19] = onBack;
|
|
121
|
+
$[20] = t3;
|
|
122
|
+
$[21] = t7;
|
|
123
|
+
$[22] = t8;
|
|
124
|
+
} else {
|
|
125
|
+
t8 = $[22];
|
|
126
|
+
}
|
|
127
|
+
return t8;
|
|
20
128
|
}
|
|
21
129
|
export default AuthFormView;
|
|
@@ -1,28 +1,80 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { createContext, useContext, useMemo, useState } from "react";
|
|
1
3
|
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
|
-
import { createContext, useContext, useState } from "react";
|
|
3
4
|
const Context = createContext(null);
|
|
4
|
-
export function FormViewProvider(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
5
|
+
export function FormViewProvider(t0) {
|
|
6
|
+
const $ = _c(16);
|
|
7
|
+
const {
|
|
8
|
+
name,
|
|
9
|
+
description,
|
|
10
|
+
item,
|
|
11
|
+
isLoading: t1,
|
|
12
|
+
isEmpty: t2,
|
|
13
|
+
hasError: t3,
|
|
14
|
+
errorMessage,
|
|
15
|
+
readonly: t4,
|
|
16
|
+
onRefresh,
|
|
17
|
+
onRetry,
|
|
18
|
+
onBack,
|
|
19
|
+
children
|
|
20
|
+
} = t0;
|
|
21
|
+
const isLoading = t1 === undefined ? false : t1;
|
|
22
|
+
const isEmpty = t2 === undefined ? false : t2;
|
|
23
|
+
const hasError = t3 === undefined ? false : t3;
|
|
24
|
+
const readonly = t4 === undefined ? false : t4;
|
|
25
|
+
const [showRefreshing, setShowRefreshing] = useState(false);
|
|
26
|
+
let t5;
|
|
27
|
+
if ($[0] !== description || $[1] !== errorMessage || $[2] !== hasError || $[3] !== isEmpty || $[4] !== isLoading || $[5] !== item || $[6] !== name || $[7] !== onBack || $[8] !== onRefresh || $[9] !== onRetry || $[10] !== readonly || $[11] !== showRefreshing) {
|
|
28
|
+
t5 = {
|
|
29
|
+
name,
|
|
30
|
+
description,
|
|
31
|
+
item,
|
|
32
|
+
isLoading,
|
|
33
|
+
isEmpty,
|
|
34
|
+
hasError,
|
|
35
|
+
errorMessage,
|
|
36
|
+
readonly,
|
|
37
|
+
showRefreshing,
|
|
38
|
+
setShowRefreshing,
|
|
39
|
+
onRefresh,
|
|
40
|
+
onRetry,
|
|
41
|
+
onBack
|
|
42
|
+
};
|
|
43
|
+
$[0] = description;
|
|
44
|
+
$[1] = errorMessage;
|
|
45
|
+
$[2] = hasError;
|
|
46
|
+
$[3] = isEmpty;
|
|
47
|
+
$[4] = isLoading;
|
|
48
|
+
$[5] = item;
|
|
49
|
+
$[6] = name;
|
|
50
|
+
$[7] = onBack;
|
|
51
|
+
$[8] = onRefresh;
|
|
52
|
+
$[9] = onRetry;
|
|
53
|
+
$[10] = readonly;
|
|
54
|
+
$[11] = showRefreshing;
|
|
55
|
+
$[12] = t5;
|
|
56
|
+
} else {
|
|
57
|
+
t5 = $[12];
|
|
58
|
+
}
|
|
59
|
+
const value = t5;
|
|
60
|
+
let t6;
|
|
61
|
+
if ($[13] !== children || $[14] !== value) {
|
|
62
|
+
t6 = _jsx(Context.Provider, {
|
|
63
|
+
value: value,
|
|
64
|
+
children: children
|
|
65
|
+
});
|
|
66
|
+
$[13] = children;
|
|
67
|
+
$[14] = value;
|
|
68
|
+
$[15] = t6;
|
|
69
|
+
} else {
|
|
70
|
+
t6 = $[15];
|
|
71
|
+
}
|
|
72
|
+
return t6;
|
|
21
73
|
}
|
|
22
74
|
export function useFormView() {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
75
|
+
const context = useContext(Context);
|
|
76
|
+
if (!context) {
|
|
77
|
+
throw new Error("useFormView must be used within FormViewV2");
|
|
78
|
+
}
|
|
79
|
+
return context;
|
|
28
80
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type KeyboardFormProps } from "../Form/Form.KeyboardForm.js";
|
|
2
|
+
import type { SafeAreaEdge } from "../layouts/edges.js";
|
|
2
3
|
import type { AppBarBackground } from "../Navigation/Navigation.AppBar.js";
|
|
3
4
|
import { type SegmentedControlProps } from "../Navigation/Navigation.SegmentedControl.js";
|
|
4
5
|
import React, { ReactNode } from "react";
|
|
5
|
-
import type { Edge } from "react-native-safe-area-context";
|
|
6
6
|
interface FormViewProps<T> {
|
|
7
7
|
name: string;
|
|
8
8
|
description?: string;
|
|
@@ -17,7 +17,7 @@ interface FormViewProps<T> {
|
|
|
17
17
|
onRetry?: () => void;
|
|
18
18
|
onBack?: () => void;
|
|
19
19
|
withContainer?: boolean;
|
|
20
|
-
edges?:
|
|
20
|
+
edges?: SafeAreaEdge[];
|
|
21
21
|
children: ReactNode;
|
|
22
22
|
}
|
|
23
23
|
export declare function refreshFormData(onRefresh: (() => Promise<void>) | undefined, onRefreshError: ((error: unknown) => void) | undefined, setShowRefreshing: (value: boolean) => void): Promise<void>;
|
|
@@ -57,10 +57,9 @@ declare function HeaderActionsBar({ children }: {
|
|
|
57
57
|
* Use as a child of `<FormViewV2.Header>` — it lands in the AppBar subheader slot.
|
|
58
58
|
*/
|
|
59
59
|
declare function HeaderSegmented<T extends string>(props: SegmentedControlProps<T>): React.JSX.Element;
|
|
60
|
-
declare function Content({ withMargin,
|
|
60
|
+
declare function Content({ withMargin, keyboardFormProps, children, }: {
|
|
61
61
|
withMargin?: boolean;
|
|
62
|
-
|
|
63
|
-
keyboardFormProps?: Omit<KeyboardFormProps, "children" | "toolbar">;
|
|
62
|
+
keyboardFormProps?: Omit<KeyboardFormProps, "children" | "stickyFooterHeight">;
|
|
64
63
|
children: ReactNode;
|
|
65
64
|
}): React.JSX.Element;
|
|
66
65
|
/** Layout wrapper for a set of Group cards. Content already handles isEmpty/loading states. */
|