@jamadd/react-native-template-ui 0.8.5 → 0.8.7
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/lib/module/components/button/AnimatedThemedPressable.js +13 -3
- package/lib/module/components/button/AnimatedThemedPressable.js.map +1 -1
- package/lib/module/components/button/ThemedButton.js +84 -23
- package/lib/module/components/button/ThemedButton.js.map +1 -1
- package/lib/module/components/button/ThemedIconButton.js +62 -16
- package/lib/module/components/button/ThemedIconButton.js.map +1 -1
- package/lib/module/components/button/ThemedIconTextButton.js +118 -29
- package/lib/module/components/button/ThemedIconTextButton.js.map +1 -1
- package/lib/module/components/button/ThemedPressable.js +13 -3
- package/lib/module/components/button/ThemedPressable.js.map +1 -1
- package/lib/module/components/icon/ThemedIcon.js +56 -15
- package/lib/module/components/icon/ThemedIcon.js.map +1 -1
- package/lib/module/components/list/List.js +131 -39
- package/lib/module/components/list/List.js.map +1 -1
- package/lib/module/components/loading/ThemedLoading.js +50 -13
- package/lib/module/components/loading/ThemedLoading.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheet.js +64 -19
- package/lib/module/components/overlay/actionSheet/ActionSheet.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheet.web.js +76 -0
- package/lib/module/components/overlay/actionSheet/ActionSheet.web.js.map +1 -0
- package/lib/module/components/overlay/actionSheet/ActionSheetContentGesture.js +19 -8
- package/lib/module/components/overlay/actionSheet/ActionSheetContentGesture.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetHeader.js +87 -31
- package/lib/module/components/overlay/actionSheet/ActionSheetHeader.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetHeader.web.js +113 -0
- package/lib/module/components/overlay/actionSheet/ActionSheetHeader.web.js.map +1 -0
- package/lib/module/components/overlay/actionSheet/ActionSheetListView.js +69 -28
- package/lib/module/components/overlay/actionSheet/ActionSheetListView.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetListViewContent.js +39 -14
- package/lib/module/components/overlay/actionSheet/ActionSheetListViewContent.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetOptionList.js +58 -25
- package/lib/module/components/overlay/actionSheet/ActionSheetOptionList.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetOptionListItem.js +45 -21
- package/lib/module/components/overlay/actionSheet/ActionSheetOptionListItem.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetOptions.js +75 -32
- package/lib/module/components/overlay/actionSheet/ActionSheetOptions.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetScrollView.js +72 -30
- package/lib/module/components/overlay/actionSheet/ActionSheetScrollView.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetScrollViewContent.js +45 -18
- package/lib/module/components/overlay/actionSheet/ActionSheetScrollViewContent.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetWrap.js +152 -36
- package/lib/module/components/overlay/actionSheet/ActionSheetWrap.js.map +1 -1
- package/lib/module/components/overlay/alert/Alert.js +142 -51
- package/lib/module/components/overlay/alert/Alert.js.map +1 -1
- package/lib/module/components/overlay/alert/AlertButton.js +62 -26
- package/lib/module/components/overlay/alert/AlertButton.js.map +1 -1
- package/lib/module/components/overlay/alert/AlertButtons.js +58 -23
- package/lib/module/components/overlay/alert/AlertButtons.js.map +1 -1
- package/lib/module/components/overlay/alert/AlertContent.js +76 -17
- package/lib/module/components/overlay/alert/AlertContent.js.map +1 -1
- package/lib/module/components/overlay/alert/AlertWrap.js +125 -43
- package/lib/module/components/overlay/alert/AlertWrap.js.map +1 -1
- package/lib/module/components/overlay/modal/ThemedLoadingModal.js +96 -21
- package/lib/module/components/overlay/modal/ThemedLoadingModal.js.map +1 -1
- package/lib/module/components/overlay/modal/ThemedModal.js +76 -23
- package/lib/module/components/overlay/modal/ThemedModal.js.map +1 -1
- package/lib/module/components/overlay/toast/ThemedToast.js +339 -90
- package/lib/module/components/overlay/toast/ThemedToast.js.map +1 -1
- package/lib/module/components/provider/GestureProvider.js +15 -3
- package/lib/module/components/provider/GestureProvider.js.map +1 -1
- package/lib/module/components/provider/InsetsProvider.js +15 -3
- package/lib/module/components/provider/InsetsProvider.js.map +1 -1
- package/lib/module/components/provider/ReactNativeTemplateProviders.js +23 -11
- package/lib/module/components/provider/ReactNativeTemplateProviders.js.map +1 -1
- package/lib/module/components/provider/ThemeProvider.js +15 -3
- package/lib/module/components/provider/ThemeProvider.js.map +1 -1
- package/lib/module/components/separator/ThemedSeparator.js +53 -14
- package/lib/module/components/separator/ThemedSeparator.js.map +1 -1
- package/lib/module/components/slider/Slider.js +625 -137
- package/lib/module/components/slider/Slider.js.map +1 -1
- package/lib/module/components/slider/ThemedSlider.js +178 -54
- package/lib/module/components/slider/ThemedSlider.js.map +1 -1
- package/lib/module/components/slider/ThemedSlider.web.js +206 -0
- package/lib/module/components/slider/ThemedSlider.web.js.map +1 -0
- package/lib/module/components/slider/ThemedSliderStepIndicator.js +40 -15
- package/lib/module/components/slider/ThemedSliderStepIndicator.js.map +1 -1
- package/lib/module/components/switch/ThemedSwitch.js +81 -21
- package/lib/module/components/switch/ThemedSwitch.js.map +1 -1
- package/lib/module/components/text/ThemedIconText.js +124 -35
- package/lib/module/components/text/ThemedIconText.js.map +1 -1
- package/lib/module/components/text/ThemedText.js +15 -3
- package/lib/module/components/text/ThemedText.js.map +1 -1
- package/lib/module/components/view/AnimatedThemedView.js +42 -11
- package/lib/module/components/view/AnimatedThemedView.js.map +1 -1
- package/lib/module/components/view/ThemedScreenWrap.js +144 -39
- package/lib/module/components/view/ThemedScreenWrap.js.map +1 -1
- package/lib/module/components/view/ThemedScreenWrap.web.js +111 -32
- package/lib/module/components/view/ThemedScreenWrap.web.js.map +1 -1
- package/lib/module/components/view/ThemedScrollView.js +126 -38
- package/lib/module/components/view/ThemedScrollView.js.map +1 -1
- package/lib/module/components/view/ThemedView.js +33 -10
- package/lib/module/components/view/ThemedView.js.map +1 -1
- package/lib/module/hooks/button.js +263 -84
- package/lib/module/hooks/button.js.map +1 -1
- package/lib/module/hooks/list.js +50 -10
- package/lib/module/hooks/list.js.map +1 -1
- package/lib/module/hooks/overlay.js +575 -187
- package/lib/module/hooks/overlay.js.map +1 -1
- package/lib/module/hooks/react.js +90 -27
- package/lib/module/hooks/react.js.map +1 -1
- package/lib/module/hooks/reanimated.js.map +1 -1
- package/lib/module/hooks/style.js +43 -18
- package/lib/module/hooks/style.js.map +1 -1
- package/lib/module/hooks/switch.js +182 -43
- package/lib/module/hooks/switch.js.map +1 -1
- package/lib/module/hooks/theme.js +17 -8
- package/lib/module/hooks/theme.js.map +1 -1
- package/lib/module/hooks/view.js +56 -14
- package/lib/module/hooks/view.js.map +1 -1
- package/lib/module/index.js +2 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/utils/reanimated/func.js +60 -10
- package/lib/module/utils/reanimated/func.js.map +1 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheet.web.d.ts +5 -0
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheet.web.d.ts.map +1 -0
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetContentGesture.d.ts +0 -2
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetContentGesture.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetHeader.d.ts +0 -2
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetHeader.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetHeader.web.d.ts +4 -0
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetHeader.web.d.ts.map +1 -0
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetListView.d.ts +0 -2
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetListView.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetListViewContent.d.ts +0 -2
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetListViewContent.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetOptionList.d.ts +0 -2
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetOptionList.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetOptionListItem.d.ts +0 -2
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetOptionListItem.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetOptions.d.ts +0 -2
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetOptions.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetScrollView.d.ts +0 -2
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetScrollView.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetScrollViewContent.d.ts +0 -2
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetScrollViewContent.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetWrap.d.ts +0 -2
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetWrap.d.ts.map +1 -1
- package/lib/typescript/src/components/slider/Slider.d.ts +3 -2
- package/lib/typescript/src/components/slider/Slider.d.ts.map +1 -1
- package/lib/typescript/src/components/slider/ThemedSlider.d.ts.map +1 -1
- package/lib/typescript/src/components/slider/ThemedSlider.web.d.ts +5 -0
- package/lib/typescript/src/components/slider/ThemedSlider.web.d.ts.map +1 -0
- package/lib/typescript/src/components/slider/ThemedSliderStepIndicator.d.ts +3 -2
- package/lib/typescript/src/components/slider/ThemedSliderStepIndicator.d.ts.map +1 -1
- package/lib/typescript/src/components/view/AnimatedView.d.ts +0 -2
- package/lib/typescript/src/components/view/AnimatedView.d.ts.map +1 -1
- package/lib/typescript/src/hooks/overlay.d.ts +0 -27
- package/lib/typescript/src/hooks/overlay.d.ts.map +1 -1
- package/lib/typescript/src/hooks/switch.d.ts +1 -20
- package/lib/typescript/src/hooks/switch.d.ts.map +1 -1
- package/lib/typescript/src/types/list.d.ts +1 -10
- package/lib/typescript/src/types/list.d.ts.map +1 -1
- package/lib/typescript/src/types/overlay.d.ts +1 -31
- package/lib/typescript/src/types/overlay.d.ts.map +1 -1
- package/lib/typescript/src/utils/overlay/const.d.ts +0 -33
- package/lib/typescript/src/utils/overlay/const.d.ts.map +1 -1
- package/lib/typescript/src/utils/reanimated/func.d.ts +1 -5
- package/lib/typescript/src/utils/reanimated/func.d.ts.map +1 -1
- package/lib/typescript/src/utils/switch/const.d.ts +1 -2
- package/lib/typescript/src/utils/switch/const.d.ts.map +1 -1
- package/package.json +14 -15
- package/src/components/button/AnimatedPressable.tsx +0 -7
- package/src/components/button/AnimatedThemedPressable.tsx +0 -12
- package/src/components/button/ThemedButton.tsx +0 -45
- package/src/components/button/ThemedIconButton.tsx +0 -33
- package/src/components/button/ThemedIconTextButton.tsx +0 -56
- package/src/components/button/ThemedPressable.tsx +0 -12
- package/src/components/icon/ThemedIcon.tsx +0 -31
- package/src/components/list/List.tsx +0 -55
- package/src/components/loading/ThemedLoading.tsx +0 -29
- package/src/components/overlay/actionSheet/ActionSheet.tsx +0 -31
- package/src/components/overlay/actionSheet/ActionSheetContentGesture.tsx +0 -15
- package/src/components/overlay/actionSheet/ActionSheetHeader.tsx +0 -72
- package/src/components/overlay/actionSheet/ActionSheetListView.tsx +0 -54
- package/src/components/overlay/actionSheet/ActionSheetListViewContent.tsx +0 -32
- package/src/components/overlay/actionSheet/ActionSheetOptionList.tsx +0 -51
- package/src/components/overlay/actionSheet/ActionSheetOptionListItem.tsx +0 -43
- package/src/components/overlay/actionSheet/ActionSheetOptions.tsx +0 -61
- package/src/components/overlay/actionSheet/ActionSheetScrollView.tsx +0 -57
- package/src/components/overlay/actionSheet/ActionSheetScrollViewContent.tsx +0 -38
- package/src/components/overlay/actionSheet/ActionSheetWrap.tsx +0 -75
- package/src/components/overlay/alert/Alert.tsx +0 -86
- package/src/components/overlay/alert/AlertButton.tsx +0 -41
- package/src/components/overlay/alert/AlertButtons.tsx +0 -32
- package/src/components/overlay/alert/AlertContent.tsx +0 -60
- package/src/components/overlay/alert/AlertWrap.tsx +0 -93
- package/src/components/overlay/modal/ThemedLoadingModal.tsx +0 -47
- package/src/components/overlay/modal/ThemedModal.tsx +0 -42
- package/src/components/overlay/toast/ThemedToast.tsx +0 -160
- package/src/components/provider/GestureProvider.tsx +0 -9
- package/src/components/provider/InsetsProvider.tsx +0 -11
- package/src/components/provider/ReactNativeTemplateProviders.tsx +0 -20
- package/src/components/provider/ThemeProvider.tsx +0 -8
- package/src/components/separator/ThemedSeparator.tsx +0 -24
- package/src/components/slider/Slider.tsx +0 -229
- package/src/components/slider/ThemedSlider.tsx +0 -103
- package/src/components/slider/ThemedSliderStepIndicator.tsx +0 -24
- package/src/components/switch/ThemedSwitch.tsx +0 -49
- package/src/components/text/Text.tsx +0 -7
- package/src/components/text/ThemedIconText.tsx +0 -58
- package/src/components/text/ThemedText.tsx +0 -7
- package/src/components/view/AnimatedThemedView.tsx +0 -18
- package/src/components/view/AnimatedView.tsx +0 -7
- package/src/components/view/Box.tsx +0 -7
- package/src/components/view/ThemedScreenWrap.tsx +0 -48
- package/src/components/view/ThemedScreenWrap.web.tsx +0 -41
- package/src/components/view/ThemedScrollView.tsx +0 -54
- package/src/components/view/ThemedView.tsx +0 -19
- package/src/hooks/button.ts +0 -152
- package/src/hooks/list.ts +0 -42
- package/src/hooks/overlay.ts +0 -471
- package/src/hooks/react.ts +0 -34
- package/src/hooks/reanimated.ts +0 -6
- package/src/hooks/separator.ts +0 -29
- package/src/hooks/style.ts +0 -79
- package/src/hooks/switch.ts +0 -119
- package/src/hooks/theme.ts +0 -65
- package/src/hooks/view.ts +0 -28
- package/src/index.ts +0 -59
- package/src/test/utils/const.ts +0 -9
- package/src/test/utils/func.ts +0 -55
- package/src/test/utils/testingLib.tsx +0 -17
- package/src/types/button.ts +0 -50
- package/src/types/global.d.ts +0 -5
- package/src/types/icon.ts +0 -21
- package/src/types/list.ts +0 -61
- package/src/types/loading.ts +0 -14
- package/src/types/overlay.ts +0 -216
- package/src/types/provider.ts +0 -6
- package/src/types/react.ts +0 -8
- package/src/types/reanimated.ts +0 -11
- package/src/types/separator.ts +0 -28
- package/src/types/slider.ts +0 -59
- package/src/types/style.ts +0 -26
- package/src/types/switch.ts +0 -31
- package/src/types/text.ts +0 -25
- package/src/types/theme.ts +0 -39
- package/src/types/view.ts +0 -58
- package/src/utils/button/const.ts +0 -10
- package/src/utils/overlay/const.ts +0 -77
- package/src/utils/overlay/func.ts +0 -107
- package/src/utils/reanimated/func.ts +0 -39
- package/src/utils/slider/const.ts +0 -23
- package/src/utils/style/const.ts +0 -4
- package/src/utils/style/func.ts +0 -37
- package/src/utils/switch/const.ts +0 -2
- package/src/utils/theme/const.ts +0 -189
- package/src/utils/theme/restyle.ts +0 -87
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { c as _c } from "react/compiler-runtime";
|
|
3
4
|
import { useLayoutEffect, useState } from 'react';
|
|
4
5
|
import { useAnimationSharedVal } from "../../../hooks/reanimated.js";
|
|
5
6
|
import { AlertContext, overlayDismissResultDefaultText, OverlayDismissResultType } from "../../../utils/overlay/const.js";
|
|
@@ -7,55 +8,127 @@ import AlertButtons from "./AlertButtons.js";
|
|
|
7
8
|
import AlertContent from "./AlertContent.js";
|
|
8
9
|
import AlertWrap from "./AlertWrap.js";
|
|
9
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
-
const Alert =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
11
|
+
const Alert = t0 => {
|
|
12
|
+
const $ = _c(36);
|
|
13
|
+
const {
|
|
14
|
+
customShowAnimation,
|
|
15
|
+
customHideAnimation,
|
|
16
|
+
wrapProps,
|
|
17
|
+
title,
|
|
18
|
+
titleTextProps,
|
|
19
|
+
description,
|
|
20
|
+
descriptionTextProps,
|
|
21
|
+
buttons,
|
|
22
|
+
buttonsWrapProps,
|
|
23
|
+
buttonProps,
|
|
24
|
+
onDismiss,
|
|
25
|
+
dismissable,
|
|
26
|
+
visible: t1
|
|
27
|
+
} = t0;
|
|
28
|
+
const visible = t1 === undefined ? true : t1;
|
|
25
29
|
const [alertVisible, setAlertVisible] = useState(visible);
|
|
26
30
|
const showSharedVal = useAnimationSharedVal();
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
resultType: OverlayDismissResultType.Alert,
|
|
33
|
-
title,
|
|
34
|
-
description,
|
|
35
|
-
text: overlayDismissResultDefaultText
|
|
31
|
+
let t2;
|
|
32
|
+
let t3;
|
|
33
|
+
if ($[0] !== visible) {
|
|
34
|
+
t2 = () => {
|
|
35
|
+
setAlertVisible(visible);
|
|
36
36
|
};
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
37
|
+
t3 = [visible];
|
|
38
|
+
$[0] = visible;
|
|
39
|
+
$[1] = t2;
|
|
40
|
+
$[2] = t3;
|
|
41
|
+
} else {
|
|
42
|
+
t2 = $[1];
|
|
43
|
+
t3 = $[2];
|
|
44
|
+
}
|
|
45
|
+
useLayoutEffect(t2, t3);
|
|
46
|
+
let t4;
|
|
47
|
+
if ($[3] !== description || $[4] !== onDismiss || $[5] !== title) {
|
|
48
|
+
t4 = result => {
|
|
49
|
+
const tempResult = {
|
|
50
|
+
resultType: OverlayDismissResultType.Alert,
|
|
51
|
+
title,
|
|
52
|
+
description,
|
|
53
|
+
text: overlayDismissResultDefaultText
|
|
54
|
+
};
|
|
55
|
+
onDismiss?.(result ? {
|
|
56
|
+
...tempResult,
|
|
57
|
+
...result
|
|
58
|
+
} : tempResult);
|
|
59
|
+
setAlertVisible(false);
|
|
60
|
+
};
|
|
61
|
+
$[3] = description;
|
|
62
|
+
$[4] = onDismiss;
|
|
63
|
+
$[5] = title;
|
|
64
|
+
$[6] = t4;
|
|
65
|
+
} else {
|
|
66
|
+
t4 = $[6];
|
|
67
|
+
}
|
|
68
|
+
const handleDismiss = t4;
|
|
69
|
+
let t5;
|
|
70
|
+
if ($[7] !== customHideAnimation || $[8] !== handleDismiss || $[9] !== showSharedVal) {
|
|
71
|
+
t5 = result_0 => {
|
|
46
72
|
if (customHideAnimation) {
|
|
47
73
|
customHideAnimation(showSharedVal, 0, () => {
|
|
48
|
-
handleDismiss(
|
|
74
|
+
handleDismiss(result_0);
|
|
49
75
|
});
|
|
50
76
|
} else {
|
|
51
77
|
showSharedVal.set(0);
|
|
52
|
-
handleDismiss(
|
|
78
|
+
handleDismiss(result_0);
|
|
53
79
|
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
80
|
+
};
|
|
81
|
+
$[7] = customHideAnimation;
|
|
82
|
+
$[8] = handleDismiss;
|
|
83
|
+
$[9] = showSharedVal;
|
|
84
|
+
$[10] = t5;
|
|
85
|
+
} else {
|
|
86
|
+
t5 = $[10];
|
|
87
|
+
}
|
|
88
|
+
let t6;
|
|
89
|
+
if ($[11] !== buttonProps || $[12] !== t5) {
|
|
90
|
+
t6 = {
|
|
91
|
+
buttonProps,
|
|
92
|
+
onDismiss: t5
|
|
93
|
+
};
|
|
94
|
+
$[11] = buttonProps;
|
|
95
|
+
$[12] = t5;
|
|
96
|
+
$[13] = t6;
|
|
97
|
+
} else {
|
|
98
|
+
t6 = $[13];
|
|
99
|
+
}
|
|
100
|
+
const alertContextVal = t6;
|
|
101
|
+
let t7;
|
|
102
|
+
if ($[14] !== description || $[15] !== descriptionTextProps || $[16] !== title || $[17] !== titleTextProps) {
|
|
103
|
+
t7 = /*#__PURE__*/_jsx(AlertContent, {
|
|
104
|
+
title: title,
|
|
105
|
+
titleTextProps: titleTextProps,
|
|
106
|
+
description: description,
|
|
107
|
+
descriptionTextProps: descriptionTextProps
|
|
108
|
+
});
|
|
109
|
+
$[14] = description;
|
|
110
|
+
$[15] = descriptionTextProps;
|
|
111
|
+
$[16] = title;
|
|
112
|
+
$[17] = titleTextProps;
|
|
113
|
+
$[18] = t7;
|
|
114
|
+
} else {
|
|
115
|
+
t7 = $[18];
|
|
116
|
+
}
|
|
117
|
+
let t8;
|
|
118
|
+
if ($[19] !== buttons || $[20] !== buttonsWrapProps) {
|
|
119
|
+
t8 = /*#__PURE__*/_jsx(AlertButtons, {
|
|
120
|
+
buttons: buttons,
|
|
121
|
+
buttonsWrapProps: buttonsWrapProps
|
|
122
|
+
});
|
|
123
|
+
$[19] = buttons;
|
|
124
|
+
$[20] = buttonsWrapProps;
|
|
125
|
+
$[21] = t8;
|
|
126
|
+
} else {
|
|
127
|
+
t8 = $[21];
|
|
128
|
+
}
|
|
129
|
+
let t9;
|
|
130
|
+
if ($[22] !== alertVisible || $[23] !== buttons || $[24] !== customShowAnimation || $[25] !== description || $[26] !== dismissable || $[27] !== showSharedVal || $[28] !== t7 || $[29] !== t8 || $[30] !== title || $[31] !== wrapProps) {
|
|
131
|
+
t9 = /*#__PURE__*/_jsxs(AlertWrap, {
|
|
59
132
|
customShowAnimation: customShowAnimation,
|
|
60
133
|
wrapProps: wrapProps,
|
|
61
134
|
title: title,
|
|
@@ -64,17 +137,35 @@ const Alert = ({
|
|
|
64
137
|
dismissable: dismissable,
|
|
65
138
|
visible: alertVisible,
|
|
66
139
|
showSharedVal: showSharedVal,
|
|
67
|
-
children: [
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
140
|
+
children: [t7, t8]
|
|
141
|
+
});
|
|
142
|
+
$[22] = alertVisible;
|
|
143
|
+
$[23] = buttons;
|
|
144
|
+
$[24] = customShowAnimation;
|
|
145
|
+
$[25] = description;
|
|
146
|
+
$[26] = dismissable;
|
|
147
|
+
$[27] = showSharedVal;
|
|
148
|
+
$[28] = t7;
|
|
149
|
+
$[29] = t8;
|
|
150
|
+
$[30] = title;
|
|
151
|
+
$[31] = wrapProps;
|
|
152
|
+
$[32] = t9;
|
|
153
|
+
} else {
|
|
154
|
+
t9 = $[32];
|
|
155
|
+
}
|
|
156
|
+
let t10;
|
|
157
|
+
if ($[33] !== alertContextVal || $[34] !== t9) {
|
|
158
|
+
t10 = /*#__PURE__*/_jsx(AlertContext.Provider, {
|
|
159
|
+
value: alertContextVal,
|
|
160
|
+
children: t9
|
|
161
|
+
});
|
|
162
|
+
$[33] = alertContextVal;
|
|
163
|
+
$[34] = t9;
|
|
164
|
+
$[35] = t10;
|
|
165
|
+
} else {
|
|
166
|
+
t10 = $[35];
|
|
167
|
+
}
|
|
168
|
+
return t10;
|
|
78
169
|
};
|
|
79
170
|
export default Alert;
|
|
80
171
|
//# sourceMappingURL=Alert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useLayoutEffect","useState","useAnimationSharedVal","AlertContext","overlayDismissResultDefaultText","OverlayDismissResultType","AlertButtons","AlertContent","AlertWrap","jsx","_jsx","jsxs","_jsxs","Alert","customShowAnimation","customHideAnimation","wrapProps","title","titleTextProps","description","descriptionTextProps","buttons","buttonsWrapProps","buttonProps","onDismiss","dismissable","visible","alertVisible","setAlertVisible","showSharedVal","
|
|
1
|
+
{"version":3,"names":["useLayoutEffect","useState","useAnimationSharedVal","AlertContext","overlayDismissResultDefaultText","OverlayDismissResultType","AlertButtons","AlertContent","AlertWrap","jsx","_jsx","jsxs","_jsxs","Alert","t0","$","_c","customShowAnimation","customHideAnimation","wrapProps","title","titleTextProps","description","descriptionTextProps","buttons","buttonsWrapProps","buttonProps","onDismiss","dismissable","visible","t1","undefined","alertVisible","setAlertVisible","showSharedVal","t2","t3","t4","result","tempResult","resultType","text","handleDismiss","t5","result_0","set","t6","alertContextVal","t7","t8","t9","children","t10","Provider"],"sourceRoot":"../../../../../src","sources":["components/overlay/alert/Alert.tsx"],"mappings":";;;AAAA,SAASA,eAAe,EAAEC,QAAQ,QAAiB,OAAO;AAC1D,SAASC,qBAAqB,QAAQ,8BAA2B;AAMjE,SACEC,YAAY,EACZC,+BAA+B,EAC/BC,wBAAwB,QACnB,iCAA8B;AACrC,OAAOC,YAAY,MAAM,mBAAgB;AACzC,OAAOC,YAAY,MAAM,mBAAgB;AACzC,OAAOC,SAAS,MAAM,gBAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEpC,MAAMC,KAAqB,GAAGC,EAAA;EAAA,MAAAC,CAAA,GAAAC,EAAA;EAAC;IAAAC,mBAAA;IAAAC,mBAAA;IAAAC,SAAA;IAAAC,KAAA;IAAAC,cAAA;IAAAC,WAAA;IAAAC,oBAAA;IAAAC,OAAA;IAAAC,gBAAA;IAAAC,WAAA;IAAAC,SAAA;IAAAC,WAAA;IAAAC,OAAA,EAAAC;EAAA,IAAAhB,EAc9B;EADC,MAAAe,OAAA,GAAAC,EAAc,KAAdC,SAAc,GAAd,IAAc,GAAdD,EAAc;EAEd,OAAAE,YAAA,EAAAC,eAAA,IAAwChC,QAAQ,CAAC4B,OAAO,CAAC;EACzD,MAAAK,aAAA,GAAsBhC,qBAAqB,CAAC,CAAC;EAAC,IAAAiC,EAAA;EAAA,IAAAC,EAAA;EAAA,IAAArB,CAAA,QAAAc,OAAA;IAC9BM,EAAA,GAAAA,CAAA;MACdF,eAAe,CAACJ,OAAO,CAAC;IAAA,CACzB;IAAEO,EAAA,IAACP,OAAO,CAAC;IAAAd,CAAA,MAAAc,OAAA;IAAAd,CAAA,MAAAoB,EAAA;IAAApB,CAAA,MAAAqB,EAAA;EAAA;IAAAD,EAAA,GAAApB,CAAA;IAAAqB,EAAA,GAAArB,CAAA;EAAA;EAF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ime";
|
|
3
4
|
import { AlertButtonType } from "../../../utils/overlay/const.js";
|
|
4
5
|
import { getAlertContext } from "../../../utils/overlay/func.js";
|
|
5
6
|
import { BorderSize } from "../../../utils/theme/const.js";
|
|
6
7
|
import ThemedButton from "../../button/ThemedButton.js";
|
|
7
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
const AlertButton =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
const AlertButton = t0 => {
|
|
10
|
+
const $ = _c(12);
|
|
11
|
+
const {
|
|
12
|
+
type: t1,
|
|
13
|
+
text,
|
|
14
|
+
onPress,
|
|
15
|
+
props
|
|
16
|
+
} = t0;
|
|
17
|
+
const type = t1 === undefined ? AlertButtonType.Primary : t1;
|
|
18
|
+
let t2;
|
|
19
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
20
|
+
t2 = getAlertContext();
|
|
21
|
+
$[0] = t2;
|
|
22
|
+
} else {
|
|
23
|
+
t2 = $[0];
|
|
24
|
+
}
|
|
14
25
|
const {
|
|
15
26
|
buttonProps,
|
|
16
27
|
onDismiss
|
|
17
|
-
} =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
28
|
+
} = t2;
|
|
29
|
+
let t3;
|
|
30
|
+
if ($[1] !== onPress || $[2] !== text || $[3] !== type) {
|
|
31
|
+
t3 = event => {
|
|
32
|
+
onPress?.(event);
|
|
33
|
+
onDismiss?.({
|
|
34
|
+
type,
|
|
35
|
+
text
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
$[1] = onPress;
|
|
39
|
+
$[2] = text;
|
|
40
|
+
$[3] = type;
|
|
41
|
+
$[4] = t3;
|
|
42
|
+
} else {
|
|
43
|
+
t3 = $[4];
|
|
44
|
+
}
|
|
45
|
+
const themedButtonOnPress = t3;
|
|
25
46
|
const isPrimary = type === AlertButtonType.Primary;
|
|
26
47
|
const isDestructive = type === AlertButtonType.Destructive;
|
|
27
|
-
const backgroundColor = isPrimary ?
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
48
|
+
const backgroundColor = isPrimary ? "themePri" : "background";
|
|
49
|
+
const t4 = type === AlertButtonType.Destructive ? "err" : backgroundColor;
|
|
50
|
+
const t5 = isDestructive ? "err" : isPrimary ? "background" : "themePri";
|
|
51
|
+
let t6;
|
|
52
|
+
if ($[5] !== backgroundColor || $[6] !== props || $[7] !== t4 || $[8] !== t5 || $[9] !== text || $[10] !== themedButtonOnPress) {
|
|
53
|
+
t6 = /*#__PURE__*/_jsx(ThemedButton, {
|
|
54
|
+
onPress: themedButtonOnPress,
|
|
55
|
+
flex: 1,
|
|
56
|
+
borderWidth: BorderSize.S,
|
|
57
|
+
borderColor: t4,
|
|
58
|
+
backgroundColor: backgroundColor,
|
|
59
|
+
text: text,
|
|
60
|
+
textColor: t5,
|
|
61
|
+
...buttonProps,
|
|
62
|
+
...props
|
|
63
|
+
});
|
|
64
|
+
$[5] = backgroundColor;
|
|
65
|
+
$[6] = props;
|
|
66
|
+
$[7] = t4;
|
|
67
|
+
$[8] = t5;
|
|
68
|
+
$[9] = text;
|
|
69
|
+
$[10] = themedButtonOnPress;
|
|
70
|
+
$[11] = t6;
|
|
71
|
+
} else {
|
|
72
|
+
t6 = $[11];
|
|
73
|
+
}
|
|
74
|
+
return t6;
|
|
39
75
|
};
|
|
40
76
|
export default AlertButton;
|
|
41
77
|
//# sourceMappingURL=AlertButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AlertButtonType","getAlertContext","BorderSize","ThemedButton","jsx","_jsx","AlertButton","type","
|
|
1
|
+
{"version":3,"names":["AlertButtonType","getAlertContext","BorderSize","ThemedButton","jsx","_jsx","AlertButton","t0","$","_c","type","t1","text","onPress","props","undefined","Primary","t2","Symbol","for","buttonProps","onDismiss","t3","event","themedButtonOnPress","isPrimary","isDestructive","Destructive","backgroundColor","t4","t5","t6","flex","borderWidth","S","borderColor","textColor"],"sourceRoot":"../../../../../src","sources":["components/overlay/alert/AlertButton.tsx"],"mappings":";;;AAGA,SAASA,eAAe,QAAQ,iCAA8B;AAC9D,SAASC,eAAe,QAAQ,gCAA6B;AAC7D,SAASC,UAAU,QAAQ,+BAA4B;AACvD,OAAOC,YAAY,MAAM,8BAA2B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAErD,MAAMC,WAAiC,GAAGC,EAAA;EAAA,MAAAC,CAAA,GAAAC,EAAA;EAAC;IAAAC,IAAA,EAAAC,EAAA;IAAAC,IAAA;IAAAC,OAAA;IAAAC;EAAA,IAAAP,EAK1C;EAJC,MAAAG,IAAA,GAAAC,EAA8B,KAA9BI,SAA8B,GAAvBf,eAAe,CAAAgB,OAAQ,GAA9BL,EAA8B;EAAA,IAAAM,EAAA;EAAA,IAAAT,CAAA,QAAAU,MAAA,CAAAC,GAAA;IAKKF,EAAA,GAAAhB,eAAe,CAAC,CAAC;IAAAO,CAAA,MAAAS,EAAA;EAAA;IAAAA,EAAA,GAAAT,CAAA;EAAA;EAApD;IAAAY,WAAA;IAAAC;EAAA,IAAmCJ,EAAiB;EAAC,IAAAK,EAAA;EAAA,IAAAd,CAAA,QAAAK,OAAA,IAAAL,CAAA,QAAAI,IAAA,IAAAJ,CAAA,QAAAE,IAAA;IACKY,EAAA,GAAAC,KAAA;MACxDV,OAAO,GAAGU,KAAK,CAAC;MAChBF,SAAS,GAAG;QAAAX,IAAA;QAAAE;MAAa,CAAC,CAAC;IAAA,CAC5B;IAAAJ,CAAA,MAAAK,OAAA;IAAAL,CAAA,MAAAI,IAAA;IAAAJ,CAAA,MAAAE,IAAA;IAAAF,CAAA,MAAAc,EAAA;EAAA;IAAAA,EAAA,GAAAd,CAAA;EAAA;EAHD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
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { c as _c } from "react/compiler-runtime";
|
|
3
4
|
import ThemedView from "../../view/ThemedView.js";
|
|
4
5
|
import AlertButton from "./AlertButton.js";
|
|
5
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
const AlertButtons =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
7
|
+
const AlertButtons = t0 => {
|
|
8
|
+
const $ = _c(7);
|
|
9
|
+
const {
|
|
10
|
+
buttons,
|
|
11
|
+
buttonsWrapProps
|
|
12
|
+
} = t0;
|
|
13
|
+
let t1;
|
|
14
|
+
if ($[0] !== buttons) {
|
|
15
|
+
t1 = buttons ?? [[{
|
|
16
|
+
text: "OK"
|
|
17
|
+
}]];
|
|
18
|
+
$[0] = buttons;
|
|
19
|
+
$[1] = t1;
|
|
20
|
+
} else {
|
|
21
|
+
t1 = $[1];
|
|
22
|
+
}
|
|
23
|
+
const alertButtons = t1;
|
|
24
|
+
let t2;
|
|
25
|
+
if ($[2] !== alertButtons) {
|
|
26
|
+
t2 = alertButtons.map(_temp2);
|
|
27
|
+
$[2] = alertButtons;
|
|
28
|
+
$[3] = t2;
|
|
29
|
+
} else {
|
|
30
|
+
t2 = $[3];
|
|
31
|
+
}
|
|
32
|
+
let t3;
|
|
33
|
+
if ($[4] !== buttonsWrapProps || $[5] !== t2) {
|
|
34
|
+
t3 = /*#__PURE__*/_jsx(ThemedView, {
|
|
35
|
+
marginTop: "m",
|
|
36
|
+
gap: "s",
|
|
37
|
+
...buttonsWrapProps,
|
|
38
|
+
children: t2
|
|
39
|
+
});
|
|
40
|
+
$[4] = buttonsWrapProps;
|
|
41
|
+
$[5] = t2;
|
|
42
|
+
$[6] = t3;
|
|
43
|
+
} else {
|
|
44
|
+
t3 = $[6];
|
|
45
|
+
}
|
|
46
|
+
return t3;
|
|
29
47
|
};
|
|
30
48
|
export default AlertButtons;
|
|
49
|
+
function _temp(t0, buttonIndex) {
|
|
50
|
+
const {
|
|
51
|
+
text,
|
|
52
|
+
...props
|
|
53
|
+
} = t0;
|
|
54
|
+
return /*#__PURE__*/_jsx(AlertButton, {
|
|
55
|
+
text: text,
|
|
56
|
+
...props
|
|
57
|
+
}, `button_${text}_${buttonIndex}`);
|
|
58
|
+
}
|
|
59
|
+
function _temp2(row, rowIndex) {
|
|
60
|
+
return /*#__PURE__*/_jsx(ThemedView, {
|
|
61
|
+
flexDirection: "row",
|
|
62
|
+
gap: "s",
|
|
63
|
+
children: row.map(_temp)
|
|
64
|
+
}, `row_${row[0]?.text}_${rowIndex}`);
|
|
65
|
+
}
|
|
31
66
|
//# sourceMappingURL=AlertButtons.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ThemedView","AlertButton","jsx","_jsx","AlertButtons","buttons","buttonsWrapProps","
|
|
1
|
+
{"version":3,"names":["ThemedView","AlertButton","jsx","_jsx","AlertButtons","t0","$","_c","buttons","buttonsWrapProps","t1","text","alertButtons","t2","map","_temp2","t3","marginTop","gap","children","_temp","buttonIndex","props","row","rowIndex","flexDirection"],"sourceRoot":"../../../../../src","sources":["components/overlay/alert/AlertButtons.tsx"],"mappings":";;;AAEA,OAAOA,UAAU,MAAM,0BAAuB;AAC9C,OAAOC,WAAW,MAAM,kBAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAExC,MAAMC,YAAmC,GAAGC,EAAA;EAAA,MAAAC,CAAA,GAAAC,EAAA;EAAC;IAAAC,OAAA;IAAAC;EAAA,IAAAJ,EAA6B;EAAA,IAAAK,EAAA;EAAA,IAAAJ,CAAA,QAAAE,OAAA;IAC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R;EAAC,GAVG,OAAOG,GAAG,GAAS,EAAAZ,IAAA,IAAIa,QAAQ,EAW1B,CAAC;AAAA","ignoreList":[]}
|
|
@@ -1,48 +1,107 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { c as _c } from "react/compiler-runtime";
|
|
3
4
|
import ThemedText from "../../text/ThemedText.js";
|
|
4
5
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
-
const AlertContent =
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
const AlertContent = t0 => {
|
|
7
|
+
const $ = _c(23);
|
|
8
|
+
const {
|
|
9
|
+
title,
|
|
10
|
+
titleTextProps: t1,
|
|
11
|
+
description,
|
|
12
|
+
descriptionTextProps: t2
|
|
13
|
+
} = t0;
|
|
14
|
+
let t3;
|
|
15
|
+
if ($[0] !== t1) {
|
|
16
|
+
t3 = t1 === undefined ? {} : t1;
|
|
17
|
+
$[0] = t1;
|
|
18
|
+
$[1] = t3;
|
|
19
|
+
} else {
|
|
20
|
+
t3 = $[1];
|
|
21
|
+
}
|
|
22
|
+
const {
|
|
8
23
|
textVariant: titleTextVariant,
|
|
9
24
|
textFontSize: titleTextFontSize,
|
|
10
25
|
textFontWeight: titleTextFontWeight,
|
|
11
26
|
textColor: titleTextColor,
|
|
12
27
|
textStyle: titleTextStyle,
|
|
13
28
|
textProps: titleTextProps
|
|
14
|
-
} =
|
|
15
|
-
|
|
16
|
-
|
|
29
|
+
} = t3;
|
|
30
|
+
let t4;
|
|
31
|
+
if ($[2] !== t2) {
|
|
32
|
+
t4 = t2 === undefined ? {} : t2;
|
|
33
|
+
$[2] = t2;
|
|
34
|
+
$[3] = t4;
|
|
35
|
+
} else {
|
|
36
|
+
t4 = $[3];
|
|
37
|
+
}
|
|
38
|
+
const {
|
|
17
39
|
textVariant: descriptionTextVariant,
|
|
18
40
|
textFontSize: descriptionTextFontSize,
|
|
19
41
|
textFontWeight: descriptionTextFontWeight,
|
|
20
42
|
textColor: descriptionTextColor,
|
|
21
43
|
textStyle: descriptionTextStyle,
|
|
22
44
|
textProps: descriptionTextProps
|
|
23
|
-
} =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
45
|
+
} = t4;
|
|
46
|
+
const t5 = titleTextFontWeight ?? "bold";
|
|
47
|
+
let t6;
|
|
48
|
+
if ($[4] !== t5 || $[5] !== title || $[6] !== titleTextColor || $[7] !== titleTextFontSize || $[8] !== titleTextProps || $[9] !== titleTextStyle || $[10] !== titleTextVariant) {
|
|
49
|
+
t6 = /*#__PURE__*/_jsx(ThemedText, {
|
|
50
|
+
textAlign: "center",
|
|
51
|
+
fontWeight: t5,
|
|
29
52
|
variant: titleTextVariant,
|
|
30
53
|
fontSize: titleTextFontSize,
|
|
31
54
|
color: titleTextColor,
|
|
32
55
|
style: titleTextStyle,
|
|
33
56
|
...titleTextProps,
|
|
34
57
|
children: title
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
|
|
58
|
+
});
|
|
59
|
+
$[4] = t5;
|
|
60
|
+
$[5] = title;
|
|
61
|
+
$[6] = titleTextColor;
|
|
62
|
+
$[7] = titleTextFontSize;
|
|
63
|
+
$[8] = titleTextProps;
|
|
64
|
+
$[9] = titleTextStyle;
|
|
65
|
+
$[10] = titleTextVariant;
|
|
66
|
+
$[11] = t6;
|
|
67
|
+
} else {
|
|
68
|
+
t6 = $[11];
|
|
69
|
+
}
|
|
70
|
+
let t7;
|
|
71
|
+
if ($[12] !== description || $[13] !== descriptionTextColor || $[14] !== descriptionTextFontSize || $[15] !== descriptionTextFontWeight || $[16] !== descriptionTextProps || $[17] !== descriptionTextStyle || $[18] !== descriptionTextVariant) {
|
|
72
|
+
t7 = !!description && /*#__PURE__*/_jsx(ThemedText, {
|
|
73
|
+
textAlign: "center",
|
|
74
|
+
variant: descriptionTextVariant ?? "textS",
|
|
38
75
|
fontSize: descriptionTextFontSize,
|
|
39
76
|
fontWeight: descriptionTextFontWeight,
|
|
40
77
|
color: descriptionTextColor,
|
|
41
78
|
style: descriptionTextStyle,
|
|
42
79
|
...descriptionTextProps,
|
|
43
80
|
children: description
|
|
44
|
-
})
|
|
45
|
-
|
|
81
|
+
});
|
|
82
|
+
$[12] = description;
|
|
83
|
+
$[13] = descriptionTextColor;
|
|
84
|
+
$[14] = descriptionTextFontSize;
|
|
85
|
+
$[15] = descriptionTextFontWeight;
|
|
86
|
+
$[16] = descriptionTextProps;
|
|
87
|
+
$[17] = descriptionTextStyle;
|
|
88
|
+
$[18] = descriptionTextVariant;
|
|
89
|
+
$[19] = t7;
|
|
90
|
+
} else {
|
|
91
|
+
t7 = $[19];
|
|
92
|
+
}
|
|
93
|
+
let t8;
|
|
94
|
+
if ($[20] !== t6 || $[21] !== t7) {
|
|
95
|
+
t8 = /*#__PURE__*/_jsxs(_Fragment, {
|
|
96
|
+
children: [t6, t7]
|
|
97
|
+
});
|
|
98
|
+
$[20] = t6;
|
|
99
|
+
$[21] = t7;
|
|
100
|
+
$[22] = t8;
|
|
101
|
+
} else {
|
|
102
|
+
t8 = $[22];
|
|
103
|
+
}
|
|
104
|
+
return t8;
|
|
46
105
|
};
|
|
47
106
|
export default AlertContent;
|
|
48
107
|
//# sourceMappingURL=AlertContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ThemedText","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","AlertContent","title","titleTextProps","textVariant","titleTextVariant","textFontSize","titleTextFontSize","textFontWeight","titleTextFontWeight","textColor","titleTextColor","textStyle","titleTextStyle","textProps","
|
|
1
|
+
{"version":3,"names":["ThemedText","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","AlertContent","t0","$","_c","title","titleTextProps","t1","description","descriptionTextProps","t2","t3","undefined","textVariant","titleTextVariant","textFontSize","titleTextFontSize","textFontWeight","titleTextFontWeight","textColor","titleTextColor","textStyle","titleTextStyle","textProps","t4","descriptionTextVariant","descriptionTextFontSize","descriptionTextFontWeight","descriptionTextColor","descriptionTextStyle","t5","t6","textAlign","fontWeight","children","t7","variant","t8"],"sourceRoot":"../../../../../src","sources":["components/overlay/alert/AlertContent.tsx"],"mappings":";;;AAEA,OAAOA,UAAU,MAAM,0BAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAE/C,MAAMC,YAKL,GAAGC,EAAA;EAAA,MAAAC,CAAA,GAAAC,EAAA;EAAC;IAAAC,KAAA;IAAAC,cAAA,EAAAC,EAAA;IAAAC,WAAA;IAAAC,oBAAA,EAAAC;EAAA,IAAAR,EAmBJ;EAAA,IAAAS,EAAA;EAAA,IAAAR,CAAA,QAAAI,EAAA;IAjBiBI,EAAA,GAAAJ,EAOV,KAPUK,SAOV,GAPU,CAOX,CAAC,GAPUL,EAOV;IAAAJ,CAAA,MAAAI,EAAA;IAAAJ,CAAA,MAAAQ,EAAA;EAAA;IAAAA,EAAA,GAAAR,CAAA;EAAA;EAPU;IAAAU,WAAA,EAAAC,gBAAA;IAAAC,YAAA,EAAAC,iBAAA;IAAAC,cAAA,EAAAC,mBAAA;IAAAC,SAAA,EAAAC,cAAA;IAAAC,SAAA,EAAAC,cAAA;IAAAC,SAAA,EAAAjB;EAAA,IAAAK,EAOV;EAAA,IAAAa,EAAA;EAAA,IAAArB,CAAA,QAAAO,EAAA;IAEgBc,EAAA,GAAAd,EAOhB,KAPgBE,SAOhB,GAPgB,CAOjB,CAAC,GAPgBF,EAOhB;IAAAP,CAAA,MAAAO,EAAA;IAAAP,CAAA,MAAAqB,EAAA;EAAA;IAAAA,EAAA,GAAArB,CAAA;EAAA;EAPgB;IAAAU,WAAA,EAAAY,sBAAA;IAAAV,YAAA,EAAAW,uBAAA;IAAAT,cAAA,EAAAU,yBAAA;IAAAR,SAAA,EAAAS,oBAAA;IAAAP,SAAA,EAAAQ,oBAAA;IAAAN,SAAA,EAAAd;EAA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