@swan-io/shared-business 7.3.0 → 7.3.2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swan-io/shared-business",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.2",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=18.0.0",
|
|
6
6
|
"yarn": "^1.22.0"
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@placekit/client-js": "^2.3.0",
|
|
34
34
|
"@swan-io/boxed": "^2.1.1",
|
|
35
35
|
"@swan-io/request": "^1.0.2",
|
|
36
|
-
"@swan-io/use-form": "^2.0.0
|
|
36
|
+
"@swan-io/use-form": "^2.0.0",
|
|
37
37
|
"dayjs": "^1.11.10",
|
|
38
38
|
"iban": "^0.0.14",
|
|
39
39
|
"react": "^18.2.0",
|
|
@@ -8,11 +8,12 @@ import { Portal } from "@swan-io/lake/src/components/Portal";
|
|
|
8
8
|
import { Pressable } from "@swan-io/lake/src/components/Pressable";
|
|
9
9
|
import { ResponsiveContainer } from "@swan-io/lake/src/components/ResponsiveContainer";
|
|
10
10
|
import { Space } from "@swan-io/lake/src/components/Space";
|
|
11
|
+
import { Suspendable } from "@swan-io/lake/src/components/Suspendable";
|
|
11
12
|
import { TransitionView } from "@swan-io/lake/src/components/TransitionView";
|
|
12
13
|
import { commonStyles } from "@swan-io/lake/src/constants/commonStyles";
|
|
13
14
|
import { backgroundColor, breakpoints, colors, negativeSpacings, shadows, spacings, } from "@swan-io/lake/src/constants/design";
|
|
14
15
|
import { useBodyClassName } from "@swan-io/lake/src/hooks/useBodyClassName";
|
|
15
|
-
import {
|
|
16
|
+
import { useEffect, useState } from "react";
|
|
16
17
|
import { ScrollView, StyleSheet, View } from "react-native";
|
|
17
18
|
import { t } from "../utils/i18n";
|
|
18
19
|
const BACKGROUND_COLOR = "rgba(0, 0, 0, 0.6)";
|
|
@@ -134,5 +135,5 @@ export const LakeModal = ({ visible, icon, title, color = "current", children, m
|
|
|
134
135
|
if (rootElement == null) {
|
|
135
136
|
return null;
|
|
136
137
|
}
|
|
137
|
-
return (_jsx(Portal, { container: rootElement, children: _jsxs(View, { "aria-modal": true, style: [styles.container, !visible && styles.inert], children: [_jsx(TransitionView, { style: styles.fill, enter: styles.overlayEnter, leave: styles.overlayLeave, children: visible ? _jsx(View, { style: styles.overlay }) : null }), _jsx(
|
|
138
|
+
return (_jsx(Portal, { container: rootElement, children: _jsxs(View, { "aria-modal": true, style: [styles.container, !visible && styles.inert], children: [_jsx(TransitionView, { style: styles.fill, enter: styles.overlayEnter, leave: styles.overlayLeave, children: visible ? _jsx(View, { style: styles.overlay }) : null }), _jsx(Suspendable, { fallback: _jsx(LoadingView, { color: backgroundColor.accented, delay: 0 }), children: _jsx(TransitionView, { style: styles.fill, enter: styles.modalEnter, leave: styles.modalLeave, children: visible ? (_jsx(ResponsiveContainer, { style: styles.root, breakpoint: breakpoints.tiny, children: ({ large, small }) => (_jsx(FocusTrap, { autoFocus: true, focusLock: true, returnFocus: true, onEscapeKey: onPressClose, style: styles.trap, children: _jsxs(ScrollView, { style: styles.modalContainer, contentContainerStyle: large ? styles.modalContentContainer : styles.modalContentContainerSmall, children: [onPressClose != null ? (_jsx(Pressable, { onPress: onPressClose, style: styles.pressableOverlay })) : null, _jsxs(View, { role: "dialog", style: [large ? styles.modal : styles.modalSmall, { maxWidth }], children: [_jsxs(View, { style: styles.modalHeader, children: [_jsxs(View, { style: styles.modalIconTitle, children: [icon != null ? (_jsx(Icon, { name: icon, size: large ? 40 : 32, color: colors[color][500] })) : null, icon != null && title != null ? _jsx(Space, { height: 12 }) : null, title != null ? (_jsxs(_Fragment, { children: [_jsx(LakeHeading, { level: 2, variant: "h3", children: title }), _jsx(Space, { height: 12 })] })) : null] }), onPressClose != null ? (_jsx(LakeButton, { style: styles.closeButton, mode: "tertiary", onPress: onPressClose, icon: "lake-close", ariaLabel: t("common.close") })) : null] }), typeof children == "function" ? children({ large, small }) : children] })] }) })) })) : null }) })] }) }));
|
|
138
139
|
};
|