koylu-vampir-design 1.0.39 → 1.0.41
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/Alerts/AlertProvider.d.ts +2 -2
- package/dist/Alerts/AlertProvider.d.ts.map +1 -1
- package/dist/Alerts/AlertProvider.js +1 -1
- package/dist/Alerts/AlertQuestionContent.d.ts.map +1 -1
- package/dist/Alerts/AlertQuestionContent.js +18 -12
- package/dist/Views/LoadingProvider.d.ts +12 -0
- package/dist/Views/LoadingProvider.d.ts.map +1 -0
- package/dist/Views/LoadingProvider.js +25 -0
- package/dist/Views/index.d.ts +4 -3
- package/dist/Views/index.d.ts.map +1 -1
- package/dist/Views/index.js +9 -7
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { ReactElement } from "react";
|
|
2
2
|
declare type AlertOptionsType = {
|
|
3
3
|
title?: string;
|
|
4
4
|
onAccept?: (any: any) => void;
|
|
@@ -9,7 +9,7 @@ declare type AlertOptionsType = {
|
|
|
9
9
|
acceptType?: string;
|
|
10
10
|
cancelText?: string;
|
|
11
11
|
cancelType?: string;
|
|
12
|
-
description?: string;
|
|
12
|
+
description?: string | ReactElement;
|
|
13
13
|
};
|
|
14
14
|
declare type AlertProp = {
|
|
15
15
|
showAlert: (message?: any, options?: AlertOptionsType) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertProvider.d.ts","sourceRoot":"","sources":["../../src/Alerts/AlertProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AlertProvider.d.ts","sourceRoot":"","sources":["../../src/Alerts/AlertProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAO5C,aAAK,gBAAgB,GAAG;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC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object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.AlertProvider = exports.useAlert = exports.AlertContext = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const react_native_1 = require("react-native");
|
|
9
|
+
const Utils_1 = require("../Utils");
|
|
9
10
|
const AlertContent_1 = require("./AlertContent");
|
|
10
11
|
const AlertQuestionContent_1 = require("./AlertQuestionContent");
|
|
11
12
|
const AlertSelectContent_1 = require("./AlertSelectContent");
|
|
12
|
-
const Utils_1 = require("../Utils");
|
|
13
13
|
const MODAL_PRESENTATION_STYLE = "pageSheet";
|
|
14
14
|
exports.AlertContext = react_1.default.createContext({
|
|
15
15
|
showAlert: () => { },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertQuestionContent.d.ts","sourceRoot":"","sources":["../../src/Alerts/AlertQuestionContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,
|
|
1
|
+
{"version":3,"file":"AlertQuestionContent.d.ts","sourceRoot":"","sources":["../../src/Alerts/AlertQuestionContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAIL,SAAS,EAIV,MAAM,cAAc,CAAC;AAOtB,aAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,GAAG,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA6DhD,CAAC"}
|
|
@@ -22,12 +22,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
22
22
|
exports.AlertQuestionContent = void 0;
|
|
23
23
|
const react_1 = __importStar(require("react"));
|
|
24
24
|
const react_native_1 = require("react-native");
|
|
25
|
+
const react_native_safe_area_context_1 = require("react-native-safe-area-context");
|
|
25
26
|
const __1 = require("../");
|
|
26
27
|
const Themes_1 = require("../Themes");
|
|
27
|
-
const react_native_safe_area_context_1 = require("react-native-safe-area-context");
|
|
28
28
|
const AlertButtons_1 = require("./AlertButtons");
|
|
29
29
|
const AlertTitle_1 = require("./AlertTitle");
|
|
30
|
-
const AlertQuestionContent = ({ style, background, options, children }) => {
|
|
30
|
+
const AlertQuestionContent = ({ style, background, options, children, }) => {
|
|
31
31
|
const { baseBackgroundColor, dimBackgroundColorTransparent, baseTextColor } = Themes_1.useColors();
|
|
32
32
|
const [input, setInput] = react_1.useState(options.currentValue || "");
|
|
33
33
|
const insets = react_native_safe_area_context_1.useSafeAreaInsets();
|
|
@@ -36,12 +36,18 @@ const AlertQuestionContent = ({ style, background, options, children }) => {
|
|
|
36
36
|
react_1.default.createElement(react_native_1.View, { style: [styles.base, style] },
|
|
37
37
|
react_1.default.createElement(react_native_1.View, { style: [
|
|
38
38
|
styles.background,
|
|
39
|
-
{ backgroundColor: color, paddingBottom: insets.bottom + 10 }
|
|
39
|
+
{ backgroundColor: color, paddingBottom: insets.bottom + 10 },
|
|
40
40
|
] },
|
|
41
41
|
react_1.default.createElement(react_native_1.View, { style: styles.message },
|
|
42
42
|
typeof children === "string" && (react_1.default.createElement(__1.Typography, { style: styles.messageText, size: children.length < 100 ? 16 : 14 }, children)),
|
|
43
|
-
react_1.default.createElement(react_native_1.TextInput, { autoCorrect: false, autoCapitalize: "none", style: [
|
|
44
|
-
|
|
43
|
+
react_1.default.createElement(react_native_1.TextInput, { autoCorrect: false, autoCapitalize: "none", style: [
|
|
44
|
+
styles.input,
|
|
45
|
+
{
|
|
46
|
+
backgroundColor: dimBackgroundColorTransparent,
|
|
47
|
+
color: baseTextColor,
|
|
48
|
+
},
|
|
49
|
+
], value: input, onChangeText: setInput }),
|
|
50
|
+
typeof options.description === "string" ? (react_1.default.createElement(__1.Typography, { style: styles.messageText }, options.description)) : (options.description)),
|
|
45
51
|
react_1.default.createElement(AlertButtons_1.AlertButtons, { options: options, payload: input })),
|
|
46
52
|
!!options.title && react_1.default.createElement(AlertTitle_1.AlertTitle, { options: options }))));
|
|
47
53
|
};
|
|
@@ -50,26 +56,26 @@ const { height } = react_native_1.Dimensions.get("window");
|
|
|
50
56
|
const isMiniDevice = height < 600;
|
|
51
57
|
const styles = react_native_1.StyleSheet.create({
|
|
52
58
|
base: {
|
|
53
|
-
marginTop: "auto"
|
|
59
|
+
marginTop: "auto",
|
|
54
60
|
},
|
|
55
61
|
keyboardView: {
|
|
56
|
-
flex: 1
|
|
62
|
+
flex: 1,
|
|
57
63
|
},
|
|
58
64
|
background: {
|
|
59
65
|
position: "relative",
|
|
60
66
|
padding: 32,
|
|
61
67
|
borderTopLeftRadius: 32,
|
|
62
|
-
borderTopRightRadius: 32
|
|
68
|
+
borderTopRightRadius: 32,
|
|
63
69
|
},
|
|
64
70
|
message: {
|
|
65
71
|
width: "100%",
|
|
66
72
|
padding: 0,
|
|
67
73
|
paddingVertical: 20,
|
|
68
74
|
minHeight: 100,
|
|
69
|
-
marginBottom: 20
|
|
75
|
+
marginBottom: 20,
|
|
70
76
|
},
|
|
71
77
|
messageText: {
|
|
72
|
-
width: "100%"
|
|
78
|
+
width: "100%",
|
|
73
79
|
},
|
|
74
80
|
input: {
|
|
75
81
|
minWidth: "100%",
|
|
@@ -80,6 +86,6 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
80
86
|
borderRadius: 8,
|
|
81
87
|
paddingHorizontal: 16,
|
|
82
88
|
marginTop: 15,
|
|
83
|
-
marginBottom: 15
|
|
84
|
-
}
|
|
89
|
+
marginBottom: 15,
|
|
90
|
+
},
|
|
85
91
|
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare type InitialStateType = {
|
|
3
|
+
isLoading: boolean | null;
|
|
4
|
+
setLoading?: (value: boolean) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare const LoadingContext: React.Context<InitialStateType>;
|
|
7
|
+
export declare const useLoadingState: () => InitialStateType;
|
|
8
|
+
export declare const LoadingProvider: ({ children }: {
|
|
9
|
+
children: any;
|
|
10
|
+
}) => JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=LoadingProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingProvider.d.ts","sourceRoot":"","sources":["../../src/Views/LoadingProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,aAAK,gBAAgB,GAAG;IACtB,SAAS,EAAE,OAAO,GAAG,IAAI,CAAC;IAC1B,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACvC,CAAC;AAOF,eAAO,MAAM,cAAc,iCAC0B,CAAC;AAEtD,eAAO,MAAM,eAAe,wBAE3B,CAAC;AAEF,eAAO,MAAM,eAAe;;iBAY3B,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.LoadingProvider = exports.useLoadingState = exports.LoadingContext = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const LoadingView_1 = require("./LoadingView");
|
|
9
|
+
const InitialState = {
|
|
10
|
+
isLoading: null,
|
|
11
|
+
setLoading: () => { },
|
|
12
|
+
};
|
|
13
|
+
exports.LoadingContext = react_1.default.createContext(InitialState);
|
|
14
|
+
const useLoadingState = () => {
|
|
15
|
+
return react_1.default.useContext(exports.LoadingContext);
|
|
16
|
+
};
|
|
17
|
+
exports.useLoadingState = useLoadingState;
|
|
18
|
+
const LoadingProvider = ({ children }) => {
|
|
19
|
+
const [state, setState] = react_1.default.useState(InitialState);
|
|
20
|
+
const setLoading = (isLoading) => setState({ isLoading });
|
|
21
|
+
return (react_1.default.createElement(exports.LoadingContext.Provider, { value: Object.assign(Object.assign({}, state), { setLoading }) },
|
|
22
|
+
children,
|
|
23
|
+
typeof state.isLoading === "boolean" && (react_1.default.createElement(LoadingView_1.LoadingView, { visible: state.isLoading }))));
|
|
24
|
+
};
|
|
25
|
+
exports.LoadingProvider = LoadingProvider;
|
package/dist/Views/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export { TouchableView } from "./TouchableView";
|
|
2
1
|
export { FadeInView } from "./FadeInView";
|
|
3
|
-
export {
|
|
2
|
+
export { LoadingProvider } from "./LoadingProvider";
|
|
4
3
|
export { LoadingView } from "./LoadingView";
|
|
5
|
-
export {
|
|
4
|
+
export { MaskedGradientView } from "./MaskedGradientView";
|
|
6
5
|
export { SquircleView } from "./SquircleView";
|
|
6
|
+
export { ToastView } from "./ToastView";
|
|
7
|
+
export { TouchableView } from "./TouchableView";
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Views/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Views/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/Views/index.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
var TouchableView_1 = require("./TouchableView");
|
|
5
|
-
Object.defineProperty(exports, "TouchableView", { enumerable: true, get: function () { return TouchableView_1.TouchableView; } });
|
|
3
|
+
exports.TouchableView = exports.ToastView = exports.SquircleView = exports.MaskedGradientView = exports.LoadingView = exports.LoadingProvider = exports.FadeInView = void 0;
|
|
6
4
|
var FadeInView_1 = require("./FadeInView");
|
|
7
5
|
Object.defineProperty(exports, "FadeInView", { enumerable: true, get: function () { return FadeInView_1.FadeInView; } });
|
|
8
|
-
var
|
|
9
|
-
Object.defineProperty(exports, "
|
|
6
|
+
var LoadingProvider_1 = require("./LoadingProvider");
|
|
7
|
+
Object.defineProperty(exports, "LoadingProvider", { enumerable: true, get: function () { return LoadingProvider_1.LoadingProvider; } });
|
|
10
8
|
var LoadingView_1 = require("./LoadingView");
|
|
11
9
|
Object.defineProperty(exports, "LoadingView", { enumerable: true, get: function () { return LoadingView_1.LoadingView; } });
|
|
12
|
-
var
|
|
13
|
-
Object.defineProperty(exports, "
|
|
10
|
+
var MaskedGradientView_1 = require("./MaskedGradientView");
|
|
11
|
+
Object.defineProperty(exports, "MaskedGradientView", { enumerable: true, get: function () { return MaskedGradientView_1.MaskedGradientView; } });
|
|
14
12
|
var SquircleView_1 = require("./SquircleView");
|
|
15
13
|
Object.defineProperty(exports, "SquircleView", { enumerable: true, get: function () { return SquircleView_1.SquircleView; } });
|
|
14
|
+
var ToastView_1 = require("./ToastView");
|
|
15
|
+
Object.defineProperty(exports, "ToastView", { enumerable: true, get: function () { return ToastView_1.ToastView; } });
|
|
16
|
+
var TouchableView_1 = require("./TouchableView");
|
|
17
|
+
Object.defineProperty(exports, "TouchableView", { enumerable: true, get: function () { return TouchableView_1.TouchableView; } });
|