@kiosinc/commons-rn 0.1.32 → 0.1.34
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/commonjs/components/Alert.js +7 -4
- package/lib/commonjs/components/Alert.js.map +1 -1
- package/lib/commonjs/components/ContentLoaderList.js +49 -0
- package/lib/commonjs/components/ContentLoaderList.js.map +1 -0
- package/lib/commonjs/components/LineLoader.js +25 -41
- package/lib/commonjs/components/LineLoader.js.map +1 -1
- package/lib/commonjs/components/SelectionDialog.js +8 -3
- package/lib/commonjs/components/SelectionDialog.js.map +1 -1
- package/lib/commonjs/components/index.js +7 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/module/components/Alert.js +7 -4
- package/lib/module/components/Alert.js.map +1 -1
- package/lib/module/components/ContentLoaderList.js +39 -0
- package/lib/module/components/ContentLoaderList.js.map +1 -0
- package/lib/module/components/LineLoader.js +24 -41
- package/lib/module/components/LineLoader.js.map +1 -1
- package/lib/module/components/SelectionDialog.js +8 -3
- package/lib/module/components/SelectionDialog.js.map +1 -1
- package/lib/module/components/index.js +1 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/typescript/src/components/Alert.d.ts +2 -1
- package/lib/typescript/src/components/Alert.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentLoaderList.d.ts +11 -0
- package/lib/typescript/src/components/ContentLoaderList.d.ts.map +1 -0
- package/lib/typescript/src/components/LineLoader.d.ts +4 -5
- package/lib/typescript/src/components/LineLoader.d.ts.map +1 -1
- package/lib/typescript/src/components/SelectionDialog.d.ts.map +1 -1
- package/lib/typescript/src/components/index.d.ts +1 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/components/Alert.tsx +16 -2
- package/src/components/ContentLoaderList.tsx +50 -0
- package/src/components/LineLoader.tsx +24 -56
- package/src/components/SelectionDialog.tsx +20 -10
- package/src/components/index.ts +1 -0
|
@@ -18,7 +18,8 @@ const useAlertHook = () => {
|
|
|
18
18
|
title = '',
|
|
19
19
|
description = '',
|
|
20
20
|
isDismissable = true,
|
|
21
|
-
buttons = []
|
|
21
|
+
buttons = [],
|
|
22
|
+
renderDescription
|
|
22
23
|
} = params;
|
|
23
24
|
const show = (0, _react.useCallback)(parameters => {
|
|
24
25
|
setParams(parameters);
|
|
@@ -34,7 +35,8 @@ const useAlertHook = () => {
|
|
|
34
35
|
title,
|
|
35
36
|
description,
|
|
36
37
|
isDismissable,
|
|
37
|
-
buttons
|
|
38
|
+
buttons,
|
|
39
|
+
renderDescription
|
|
38
40
|
};
|
|
39
41
|
};
|
|
40
42
|
let rootLevelRef = null;
|
|
@@ -46,7 +48,8 @@ const Alert = () => {
|
|
|
46
48
|
buttons,
|
|
47
49
|
isDismissable,
|
|
48
50
|
title,
|
|
49
|
-
description
|
|
51
|
+
description,
|
|
52
|
+
renderDescription
|
|
50
53
|
} = useAlertHook();
|
|
51
54
|
const theme = (0, _reactNativePaper.useTheme)();
|
|
52
55
|
const {
|
|
@@ -82,7 +85,7 @@ const Alert = () => {
|
|
|
82
85
|
variant: "titleMedium"
|
|
83
86
|
}, title)), Boolean(description) && /*#__PURE__*/_react.default.createElement(_reactNativePaper.Dialog.Content, null, /*#__PURE__*/_react.default.createElement(_reactNativePaper.Text, {
|
|
84
87
|
variant: "bodyMedium"
|
|
85
|
-
}, description)), /*#__PURE__*/_react.default.createElement(_reactNativePaper.Dialog.Actions, null, button3 && /*#__PURE__*/_react.default.createElement(_Button.Button, {
|
|
88
|
+
}, description)), renderDescription && /*#__PURE__*/_react.default.createElement(_reactNativePaper.Dialog.Content, null, renderDescription()), /*#__PURE__*/_react.default.createElement(_reactNativePaper.Dialog.Actions, null, button3 && /*#__PURE__*/_react.default.createElement(_Button.Button, {
|
|
86
89
|
mx: "8",
|
|
87
90
|
mode: button3?.mode || 'text',
|
|
88
91
|
onPress: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNativePaper","_Button","_reactNative","_reactI18next","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","useAlertHook","isVisible","setIsVisible","useState","params","setParams","title","description","isDismissable","buttons","show","useCallback","parameters","hide","rootLevelRef","Alert","theme","useTheme","useTranslation","button1","label","onPress","mode","button2","button3","ref","React","useRef","useImperativeHandle","useEffect","current","createElement","Dialog","style","Platform","isPad","styles","iPad","backgroundColor","colors","background","dismissable","dismissableBackButton","onDismiss","visible","Boolean","Content","Text","variant","Actions","Button","mx","ml","exports","displayName","StyleSheet","create","zIndex","width","alignSelf"],"sourceRoot":"../../../src","sources":["components/Alert.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAH,OAAA;AAEA,IAAAI,aAAA,GAAAJ,OAAA;AAA+C,SAAAK,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAP,wBAAAO,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAjB,CAAA,EAAAc,CAAA,SAAAI,CAAA,GAAAR,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAI,CAAA,KAAAA,CAAA,CAAAX,GAAA,IAAAW,CAAA,CAAAC,GAAA,IAAAR,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAI,CAAA,IAAAV,CAAA,CAAAM,CAAA,IAAAd,CAAA,CAAAc,CAAA,YAAAN,CAAA,CAAAH,OAAA,GAAAL,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAgB,GAAA,CAAAnB,CAAA,EAAAQ,CAAA,GAAAA,CAAA;
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNativePaper","_Button","_reactNative","_reactI18next","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","useAlertHook","isVisible","setIsVisible","useState","params","setParams","title","description","isDismissable","buttons","renderDescription","show","useCallback","parameters","hide","rootLevelRef","Alert","theme","useTheme","useTranslation","button1","label","onPress","mode","button2","button3","ref","React","useRef","useImperativeHandle","useEffect","current","createElement","Dialog","style","Platform","isPad","styles","iPad","backgroundColor","colors","background","dismissable","dismissableBackButton","onDismiss","visible","Boolean","Content","Text","variant","Actions","Button","mx","ml","exports","displayName","StyleSheet","create","zIndex","width","alignSelf"],"sourceRoot":"../../../src","sources":["components/Alert.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAH,OAAA;AAEA,IAAAI,aAAA,GAAAJ,OAAA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CAAC;AAC5B,CAAC;AAED,MAAMiC,MAAM,GAAGmB,uBAAU,CAACC,MAAM,CAAC;EAC/BnB,IAAI,EAAE;IAAEoB,MAAM,EAAE,GAAG;IAAEC,KAAK,EAAE,KAAK;IAAEC,SAAS,EAAE;EAAS;AACzD,CAAC,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ContentLoaderList = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNativePaper = require("react-native-paper");
|
|
9
|
+
var _native = _interopRequireWildcard(require("react-content-loader/native"));
|
|
10
|
+
var _reactNative = require("react-native");
|
|
11
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
12
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
const ContentLoaderList = ({
|
|
15
|
+
count = 10,
|
|
16
|
+
radius = 18,
|
|
17
|
+
height,
|
|
18
|
+
backgroundColor,
|
|
19
|
+
foregroundColor
|
|
20
|
+
}) => {
|
|
21
|
+
const theme = (0, _reactNativePaper.useTheme)();
|
|
22
|
+
return new Array(count).fill(0).map((_, index) => {
|
|
23
|
+
return /*#__PURE__*/_react.default.createElement(_native.default, {
|
|
24
|
+
key: index,
|
|
25
|
+
speed: 1
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
,
|
|
28
|
+
width: "100%",
|
|
29
|
+
height: height,
|
|
30
|
+
backgroundColor: backgroundColor ?? theme.colors.background,
|
|
31
|
+
foregroundColor: foregroundColor ?? theme.colors.surfaceVariant,
|
|
32
|
+
style: styles.loader
|
|
33
|
+
}, /*#__PURE__*/_react.default.createElement(_native.Rect, {
|
|
34
|
+
x: "0",
|
|
35
|
+
y: "0",
|
|
36
|
+
rx: radius,
|
|
37
|
+
ry: radius,
|
|
38
|
+
width: "100%",
|
|
39
|
+
height: height
|
|
40
|
+
}));
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
exports.ContentLoaderList = ContentLoaderList;
|
|
44
|
+
const styles = _reactNative.StyleSheet.create({
|
|
45
|
+
loader: {
|
|
46
|
+
marginVertical: 8
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
//# sourceMappingURL=ContentLoaderList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNativePaper","_native","_interopRequireWildcard","_reactNative","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","obj","ContentLoaderList","count","radius","height","backgroundColor","foregroundColor","theme","useTheme","Array","fill","map","_","index","createElement","key","speed","width","colors","background","surfaceVariant","style","styles","loader","Rect","x","y","rx","ry","exports","StyleSheet","create","marginVertical"],"sourceRoot":"../../../src","sources":["components/ContentLoaderList.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAA0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GAAGA,CAAC;EAChCC,KAAK,GAAG,EAAE;EACVC,MAAM,GAAG,EAAE;EACXC,MAAM;EACNC,eAAe;EACfC;AACsB,CAAC,KAAK;EAC5B,MAAMC,KAAK,GAAG,IAAAC,0BAAQ,EAAC,CAAC;EACxB,OAAO,IAAIC,KAAK,CAACP,KAAK,CAAC,CAACQ,IAAI,CAAC,CAAC,CAAC,CAACC,GAAG,CAAC,CAACC,CAAC,EAAEC,KAAK,KAAK;IAChD,oBACEzC,MAAA,CAAAa,OAAA,CAAA6B,aAAA,CAACtC,OAAA,CAAAS,OAAa;MACZ8B,GAAG,EAAEF,KAAM;MACXG,KAAK,EAAE;MACP;MAAA;MACAC,KAAK,EAAC,MAAM;MACZb,MAAM,EAAEA,MAAO;MACfC,eAAe,EAAEA,eAAe,IAAIE,KAAK,CAACW,MAAM,CAACC,UAAW;MAC5Db,eAAe,EAAEA,eAAe,IAAIC,KAAK,CAACW,MAAM,CAACE,cAAe;MAChEC,KAAK,EAAEC,MAAM,CAACC;IAAO,gBAErBnD,MAAA,CAAAa,OAAA,CAAA6B,aAAA,CAACtC,OAAA,CAAAgD,IAAI;MACHC,CAAC,EAAC,GAAG;MACLC,CAAC,EAAC,GAAG;MACLC,EAAE,EAAExB,MAAO;MACXyB,EAAE,EAAEzB,MAAO;MACXc,KAAK,EAAC,MAAM;MACZb,MAAM,EAAEA;IAAO,CAChB,CACY,CAAC;EAEpB,CAAC,CAAC;AACJ,CAAC;AAACyB,OAAA,CAAA5B,iBAAA,GAAAA,iBAAA;AAEF,MAAMqB,MAAM,GAAGQ,uBAAU,CAACC,MAAM,CAAC;EAC/BR,MAAM,EAAE;IAAES,cAAc,EAAE;EAAE;AAC9B,CAAC,CAAC"}
|
|
@@ -4,58 +4,42 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.LineLoader = void 0;
|
|
7
|
-
var _react =
|
|
8
|
-
var
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _native = _interopRequireWildcard(require("react-content-loader/native"));
|
|
9
9
|
var _reactNativePaper = require("react-native-paper");
|
|
10
|
-
var
|
|
10
|
+
var _reactNative = require("react-native");
|
|
11
11
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
12
12
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
14
|
const LineLoader = ({
|
|
15
|
+
isLoading,
|
|
14
16
|
backgroundColor,
|
|
15
|
-
foregroundColor
|
|
16
|
-
height = 4,
|
|
17
|
-
progress = 0
|
|
17
|
+
foregroundColor
|
|
18
18
|
}) => {
|
|
19
19
|
const theme = (0, _reactNativePaper.useTheme)();
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
height
|
|
38
|
-
}]
|
|
39
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
40
|
-
style: [styles.background, {
|
|
41
|
-
backgroundColor: backgroundColor ?? theme.colors.onSurfaceDisabled
|
|
42
|
-
}]
|
|
43
|
-
}), /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.View, {
|
|
44
|
-
style: [styles.line, lineStyle]
|
|
20
|
+
return /*#__PURE__*/_react.default.createElement(_native.default
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
, {
|
|
23
|
+
style: styles.loader,
|
|
24
|
+
animate: isLoading,
|
|
25
|
+
backgroundColor: backgroundColor ?? theme.colors.background,
|
|
26
|
+
foregroundColor: foregroundColor ?? theme.colors.primary,
|
|
27
|
+
height: 3,
|
|
28
|
+
interval: 0,
|
|
29
|
+
key: isLoading + '',
|
|
30
|
+
speed: 1,
|
|
31
|
+
width: "100%"
|
|
32
|
+
}, /*#__PURE__*/_react.default.createElement(_native.Rect, {
|
|
33
|
+
height: 3,
|
|
34
|
+
width: "100%",
|
|
35
|
+
x: 0,
|
|
36
|
+
y: 0
|
|
45
37
|
}));
|
|
46
38
|
};
|
|
47
39
|
exports.LineLoader = LineLoader;
|
|
48
40
|
const styles = _reactNative.StyleSheet.create({
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
},
|
|
52
|
-
background: {
|
|
53
|
-
flex: 1
|
|
54
|
-
},
|
|
55
|
-
line: {
|
|
56
|
-
position: 'absolute',
|
|
57
|
-
top: 0,
|
|
58
|
-
left: 0
|
|
41
|
+
loader: {
|
|
42
|
+
paddingVertical: 6
|
|
59
43
|
}
|
|
60
44
|
});
|
|
61
45
|
//# sourceMappingURL=LineLoader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_native","_interopRequireWildcard","_reactNativePaper","_reactNative","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","obj","LineLoader","isLoading","backgroundColor","foregroundColor","theme","useTheme","createElement","style","styles","loader","animate","colors","background","primary","height","interval","key","speed","width","Rect","x","y","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actI18next = require("react-i18next");
|
|
13
|
+
var _Card = require("./Card");
|
|
13
14
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
14
15
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
16
|
const useSelectionDialogHook = () => {
|
|
@@ -91,9 +92,13 @@ const SelectionDialog = () => {
|
|
|
91
92
|
}, title)), Boolean(description) && /*#__PURE__*/_react.default.createElement(_reactNativePaper.Dialog.Content, null, /*#__PURE__*/_react.default.createElement(_Text.Text, {
|
|
92
93
|
variant: "bodyMedium"
|
|
93
94
|
}, description)), /*#__PURE__*/_react.default.createElement(_reactNativePaper.Dialog.Content, null, selectionOptions.map((option, index) => {
|
|
94
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
95
|
-
pt: "8",
|
|
95
|
+
return /*#__PURE__*/_react.default.createElement(_Card.Card, {
|
|
96
96
|
key: index,
|
|
97
|
+
mode: "contained",
|
|
98
|
+
bg: 'transparent',
|
|
99
|
+
onPress: () => setSelectedOptionIndex(index)
|
|
100
|
+
}, /*#__PURE__*/_react.default.createElement(_View.View, {
|
|
101
|
+
pt: "8",
|
|
97
102
|
flexDirection: "row",
|
|
98
103
|
maxWidth: '80%'
|
|
99
104
|
}, /*#__PURE__*/_react.default.createElement(_reactNativePaper.RadioButton.Android, {
|
|
@@ -103,7 +108,7 @@ const SelectionDialog = () => {
|
|
|
103
108
|
}), /*#__PURE__*/_react.default.createElement(_Text.Text, {
|
|
104
109
|
pt: '6',
|
|
105
110
|
variant: "bodyMedium"
|
|
106
|
-
}, option));
|
|
111
|
+
}, option)));
|
|
107
112
|
})), /*#__PURE__*/_react.default.createElement(_reactNativePaper.Dialog.Actions, null, button3 && /*#__PURE__*/_react.default.createElement(_Button.Button, {
|
|
108
113
|
disabled: selectedOptionIndex === -1,
|
|
109
114
|
mx: "8",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNativePaper","_Button","_View","_Text","_reactI18next","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","useSelectionDialogHook","isVisible","setIsVisible","useState","params","setParams","title","description","isDismissable","buttons","selectionOptions","show","useCallback","parameters","hide","rootLevelRef","SelectionDialog","theme","useTheme","useTranslation","selectedOptionIndex","setSelectedOptionIndex","useEffect","button1","label","onPress","mode","button2","button3","ref","React","useRef","useImperativeHandle","current","createElement","Dialog","style","backgroundColor","colors","background","dismissable","dismissableBackButton","onDismiss","visible","Boolean","Content","Text","variant","map","option","index","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNativePaper","_Button","_View","_Text","_reactI18next","_Card","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","useSelectionDialogHook","isVisible","setIsVisible","useState","params","setParams","title","description","isDismissable","buttons","selectionOptions","show","useCallback","parameters","hide","rootLevelRef","SelectionDialog","theme","useTheme","useTranslation","selectedOptionIndex","setSelectedOptionIndex","useEffect","button1","label","onPress","mode","button2","button3","ref","React","useRef","useImperativeHandle","current","createElement","Dialog","style","backgroundColor","colors","background","dismissable","dismissableBackButton","onDismiss","visible","Boolean","Content","Text","variant","map","option","index","Card","key","bg","View","pt","flexDirection","maxWidth","RadioButton","Android","value","status","Actions","Button","disabled","mx","ml","exports","displayName"],"sourceRoot":"../../../src","sources":["components/SelectionDialog.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AAA8B,SAAAO,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAT,wBAAAS,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAjB,CAAA,EAAAc,CAAA,SAAAI,CAAA,GAAAR,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAI,CAAA,KAAAA,CAAA,CAAAX,GAAA,IAAAW,CAAA,CAAAC,GAAA,IAAAR,MAAA,CAAAC,cAAA,CAA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,CAEI,CACV,CAAC;AAEb,CAAC;AAAC2C,OAAA,CAAAnD,eAAA,GAAAA,eAAA;AAEFA,eAAe,CAACoD,WAAW,GAAG,iBAAiB;;AAE/C;AACApD,eAAe,CAACL,IAAI,GAAIP,MAA6B,IAAK;EACxDW,YAAY,EAAEJ,IAAI,CAACP,MAAM,CAAC;AAC5B,CAAC"}
|
|
@@ -33,6 +33,12 @@ Object.defineProperty(exports, "Card", {
|
|
|
33
33
|
return _Card.Card;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
+
Object.defineProperty(exports, "ContentLoaderList", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _ContentLoaderList.ContentLoaderList;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
36
42
|
Object.defineProperty(exports, "Divider", {
|
|
37
43
|
enumerable: true,
|
|
38
44
|
get: function () {
|
|
@@ -183,6 +189,7 @@ var _IconButton = require("./IconButton");
|
|
|
183
189
|
var _Image = require("./Image");
|
|
184
190
|
var _KeyboardAvoidingView = require("./KeyboardAvoidingView");
|
|
185
191
|
var _LineLoader = require("./LineLoader");
|
|
192
|
+
var _ContentLoaderList = require("./ContentLoaderList");
|
|
186
193
|
var _LinkButton = require("./LinkButton");
|
|
187
194
|
var _OtpInputs = require("./OtpInputs");
|
|
188
195
|
var _ParentView = require("./ParentView");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_Alert","require","_Badge","_BottomSheet","_Button","_Card","_Divider","_FAB","_Header","_IconButton","_Image","_KeyboardAvoidingView","_LineLoader","_LinkButton","_OtpInputs","_ParentView","_Searchbar","_SelectionDialog","_Snackbar","_Surface","_Switch","_Text","_TextInput","_ToggleButton","_TouchableRipple","_Video","_View","_RefreshControl","_PhoneInput"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_Alert","require","_Badge","_BottomSheet","_Button","_Card","_Divider","_FAB","_Header","_IconButton","_Image","_KeyboardAvoidingView","_LineLoader","_ContentLoaderList","_LinkButton","_OtpInputs","_ParentView","_Searchbar","_SelectionDialog","_Snackbar","_Surface","_Switch","_Text","_TextInput","_ToggleButton","_TouchableRipple","_Video","_View","_RefreshControl","_PhoneInput"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,IAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AACA,IAAAS,MAAA,GAAAT,OAAA;AACA,IAAAU,qBAAA,GAAAV,OAAA;AACA,IAAAW,WAAA,GAAAX,OAAA;AACA,IAAAY,kBAAA,GAAAZ,OAAA;AACA,IAAAa,WAAA,GAAAb,OAAA;AACA,IAAAc,UAAA,GAAAd,OAAA;AACA,IAAAe,WAAA,GAAAf,OAAA;AACA,IAAAgB,UAAA,GAAAhB,OAAA;AACA,IAAAiB,gBAAA,GAAAjB,OAAA;AACA,IAAAkB,SAAA,GAAAlB,OAAA;AACA,IAAAmB,QAAA,GAAAnB,OAAA;AACA,IAAAoB,OAAA,GAAApB,OAAA;AACA,IAAAqB,KAAA,GAAArB,OAAA;AACA,IAAAsB,UAAA,GAAAtB,OAAA;AACA,IAAAuB,aAAA,GAAAvB,OAAA;AACA,IAAAwB,gBAAA,GAAAxB,OAAA;AACA,IAAAyB,MAAA,GAAAzB,OAAA;AACA,IAAA0B,KAAA,GAAA1B,OAAA;AACA,IAAA2B,eAAA,GAAA3B,OAAA;AACA,IAAA4B,WAAA,GAAA5B,OAAA"}
|
|
@@ -11,7 +11,8 @@ const useAlertHook = () => {
|
|
|
11
11
|
title = '',
|
|
12
12
|
description = '',
|
|
13
13
|
isDismissable = true,
|
|
14
|
-
buttons = []
|
|
14
|
+
buttons = [],
|
|
15
|
+
renderDescription
|
|
15
16
|
} = params;
|
|
16
17
|
const show = useCallback(parameters => {
|
|
17
18
|
setParams(parameters);
|
|
@@ -27,7 +28,8 @@ const useAlertHook = () => {
|
|
|
27
28
|
title,
|
|
28
29
|
description,
|
|
29
30
|
isDismissable,
|
|
30
|
-
buttons
|
|
31
|
+
buttons,
|
|
32
|
+
renderDescription
|
|
31
33
|
};
|
|
32
34
|
};
|
|
33
35
|
let rootLevelRef = null;
|
|
@@ -39,7 +41,8 @@ export const Alert = () => {
|
|
|
39
41
|
buttons,
|
|
40
42
|
isDismissable,
|
|
41
43
|
title,
|
|
42
|
-
description
|
|
44
|
+
description,
|
|
45
|
+
renderDescription
|
|
43
46
|
} = useAlertHook();
|
|
44
47
|
const theme = useTheme();
|
|
45
48
|
const {
|
|
@@ -75,7 +78,7 @@ export const Alert = () => {
|
|
|
75
78
|
variant: "titleMedium"
|
|
76
79
|
}, title)), Boolean(description) && /*#__PURE__*/React.createElement(Dialog.Content, null, /*#__PURE__*/React.createElement(Text, {
|
|
77
80
|
variant: "bodyMedium"
|
|
78
|
-
}, description)), /*#__PURE__*/React.createElement(Dialog.Actions, null, button3 && /*#__PURE__*/React.createElement(Button, {
|
|
81
|
+
}, description)), renderDescription && /*#__PURE__*/React.createElement(Dialog.Content, null, renderDescription()), /*#__PURE__*/React.createElement(Dialog.Actions, null, button3 && /*#__PURE__*/React.createElement(Button, {
|
|
79
82
|
mx: "8",
|
|
80
83
|
mode: button3?.mode || 'text',
|
|
81
84
|
onPress: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","useCallback","Dialog","Text","useTheme","Button","Platform","StyleSheet","useTranslation","useAlertHook","isVisible","setIsVisible","params","setParams","title","description","isDismissable","buttons","show","parameters","hide","rootLevelRef","Alert","theme","t","button1","label","onPress","mode","button2","button3","ref","useRef","useImperativeHandle","useEffect","current","createElement","style","isPad","styles","iPad","backgroundColor","colors","background","dismissable","dismissableBackButton","onDismiss","visible","Boolean","Content","variant","Actions","mx","ml","displayName","create","zIndex","width","alignSelf"],"sourceRoot":"../../../src","sources":["components/Alert.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,WAAW,QAAQ,OAAO;AACpD,SAASC,MAAM,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,oBAAoB;AAC3D,SAASC,MAAM,QAAQ,UAAU;AAEjC,SAASC,QAAQ,QAAQ,cAAc;AACvC,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,cAAc,QAAQ,eAAe;
|
|
1
|
+
{"version":3,"names":["React","useState","useCallback","Dialog","Text","useTheme","Button","Platform","StyleSheet","useTranslation","useAlertHook","isVisible","setIsVisible","params","setParams","title","description","isDismissable","buttons","renderDescription","show","parameters","hide","rootLevelRef","Alert","theme","t","button1","label","onPress","mode","button2","button3","ref","useRef","useImperativeHandle","useEffect","current","createElement","style","isPad","styles","iPad","backgroundColor","colors","background","dismissable","dismissableBackButton","onDismiss","visible","Boolean","Content","variant","Actions","mx","ml","displayName","create","zIndex","width","alignSelf"],"sourceRoot":"../../../src","sources":["components/Alert.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,WAAW,QAAQ,OAAO;AACpD,SAASC,MAAM,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,oBAAoB;AAC3D,SAASC,MAAM,QAAQ,UAAU;AAEjC,SAASC,QAAQ,QAAQ,cAAc;AACvC,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,cAAc,QAAQ,eA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,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useTheme } from 'react-native-paper';
|
|
3
|
+
import ContentLoader, { Rect } from 'react-content-loader/native';
|
|
4
|
+
import { StyleSheet } from 'react-native';
|
|
5
|
+
export const ContentLoaderList = ({
|
|
6
|
+
count = 10,
|
|
7
|
+
radius = 18,
|
|
8
|
+
height,
|
|
9
|
+
backgroundColor,
|
|
10
|
+
foregroundColor
|
|
11
|
+
}) => {
|
|
12
|
+
const theme = useTheme();
|
|
13
|
+
return new Array(count).fill(0).map((_, index) => {
|
|
14
|
+
return /*#__PURE__*/React.createElement(ContentLoader, {
|
|
15
|
+
key: index,
|
|
16
|
+
speed: 1
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
,
|
|
19
|
+
width: "100%",
|
|
20
|
+
height: height,
|
|
21
|
+
backgroundColor: backgroundColor ?? theme.colors.background,
|
|
22
|
+
foregroundColor: foregroundColor ?? theme.colors.surfaceVariant,
|
|
23
|
+
style: styles.loader
|
|
24
|
+
}, /*#__PURE__*/React.createElement(Rect, {
|
|
25
|
+
x: "0",
|
|
26
|
+
y: "0",
|
|
27
|
+
rx: radius,
|
|
28
|
+
ry: radius,
|
|
29
|
+
width: "100%",
|
|
30
|
+
height: height
|
|
31
|
+
}));
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
const styles = StyleSheet.create({
|
|
35
|
+
loader: {
|
|
36
|
+
marginVertical: 8
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=ContentLoaderList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useTheme","ContentLoader","Rect","StyleSheet","ContentLoaderList","count","radius","height","backgroundColor","foregroundColor","theme","Array","fill","map","_","index","createElement","key","speed","width","colors","background","surfaceVariant","style","styles","loader","x","y","rx","ry","create","marginVertical"],"sourceRoot":"../../../src","sources":["components/ContentLoaderList.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,OAAOC,aAAa,IAAIC,IAAI,QAAQ,6BAA6B;AACjE,SAASC,UAAU,QAAQ,cAAc;AAUzC,OAAO,MAAMC,iBAAiB,GAAGA,CAAC;EAChCC,KAAK,GAAG,EAAE;EACVC,MAAM,GAAG,EAAE;EACXC,MAAM;EACNC,eAAe;EACfC;AACsB,CAAC,KAAK;EAC5B,MAAMC,KAAK,GAAGV,QAAQ,CAAC,CAAC;EACxB,OAAO,IAAIW,KAAK,CAACN,KAAK,CAAC,CAACO,IAAI,CAAC,CAAC,CAAC,CAACC,GAAG,CAAC,CAACC,CAAC,EAAEC,KAAK,KAAK;IAChD,oBACEhB,KAAA,CAAAiB,aAAA,CAACf,aAAa;MACZgB,GAAG,EAAEF,KAAM;MACXG,KAAK,EAAE;MACP;MAAA;MACAC,KAAK,EAAC,MAAM;MACZZ,MAAM,EAAEA,MAAO;MACfC,eAAe,EAAEA,eAAe,IAAIE,KAAK,CAACU,MAAM,CAACC,UAAW;MAC5DZ,eAAe,EAAEA,eAAe,IAAIC,KAAK,CAACU,MAAM,CAACE,cAAe;MAChEC,KAAK,EAAEC,MAAM,CAACC;IAAO,gBAErB1B,KAAA,CAAAiB,aAAA,CAACd,IAAI;MACHwB,CAAC,EAAC,GAAG;MACLC,CAAC,EAAC,GAAG;MACLC,EAAE,EAAEtB,MAAO;MACXuB,EAAE,EAAEvB,MAAO;MACXa,KAAK,EAAC,MAAM;MACZZ,MAAM,EAAEA;IAAO,CAChB,CACY,CAAC;EAEpB,CAAC,CAAC;AACJ,CAAC;AAED,MAAMiB,MAAM,GAAGrB,UAAU,CAAC2B,MAAM,CAAC;EAC/BL,MAAM,EAAE;IAAEM,cAAc,EAAE;EAAE;AAC9B,CAAC,CAAC"}
|
|
@@ -1,52 +1,35 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ContentLoader, { Rect } from 'react-content-loader/native';
|
|
3
3
|
import { useTheme } from 'react-native-paper';
|
|
4
|
-
import
|
|
4
|
+
import { StyleSheet } from 'react-native';
|
|
5
5
|
export const LineLoader = ({
|
|
6
|
+
isLoading,
|
|
6
7
|
backgroundColor,
|
|
7
|
-
foregroundColor
|
|
8
|
-
height = 4,
|
|
9
|
-
progress = 0
|
|
8
|
+
foregroundColor
|
|
10
9
|
}) => {
|
|
11
10
|
const theme = useTheme();
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
height
|
|
30
|
-
}]
|
|
31
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
32
|
-
style: [styles.background, {
|
|
33
|
-
backgroundColor: backgroundColor ?? theme.colors.onSurfaceDisabled
|
|
34
|
-
}]
|
|
35
|
-
}), /*#__PURE__*/React.createElement(Animated.View, {
|
|
36
|
-
style: [styles.line, lineStyle]
|
|
11
|
+
return /*#__PURE__*/React.createElement(ContentLoader
|
|
12
|
+
// @ts-ignore
|
|
13
|
+
, {
|
|
14
|
+
style: styles.loader,
|
|
15
|
+
animate: isLoading,
|
|
16
|
+
backgroundColor: backgroundColor ?? theme.colors.background,
|
|
17
|
+
foregroundColor: foregroundColor ?? theme.colors.primary,
|
|
18
|
+
height: 3,
|
|
19
|
+
interval: 0,
|
|
20
|
+
key: isLoading + '',
|
|
21
|
+
speed: 1,
|
|
22
|
+
width: "100%"
|
|
23
|
+
}, /*#__PURE__*/React.createElement(Rect, {
|
|
24
|
+
height: 3,
|
|
25
|
+
width: "100%",
|
|
26
|
+
x: 0,
|
|
27
|
+
y: 0
|
|
37
28
|
}));
|
|
38
29
|
};
|
|
39
30
|
const styles = StyleSheet.create({
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
},
|
|
43
|
-
background: {
|
|
44
|
-
flex: 1
|
|
45
|
-
},
|
|
46
|
-
line: {
|
|
47
|
-
position: 'absolute',
|
|
48
|
-
top: 0,
|
|
49
|
-
left: 0
|
|
31
|
+
loader: {
|
|
32
|
+
paddingVertical: 6
|
|
50
33
|
}
|
|
51
34
|
});
|
|
52
35
|
//# sourceMappingURL=LineLoader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","
|
|
1
|
+
{"version":3,"names":["React","ContentLoader","Rect","useTheme","StyleSheet","LineLoader","isLoading","backgroundColor","foregroundColor","theme","createElement","style","styles","loader","animate","colors","background","primary","height","interval","key","speed","width","x","y","create","paddingVertical"],"sourceRoot":"../../../src","sources":["components/LineLoader.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,aAAa,IAAIC,IAAI,QAAQ,6BAA6B;AAEjE,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,UAAU,QAAQ,cAAc;AAOzC,OAAO,MAAMC,UAAU,GAAGA,CAAC;EACzBC,SAAS;EACTC,eAAe;EACfC;AACe,CAAC,KAAK;EACrB,MAAMC,KAAK,GAAGN,QAAQ,CAAC,CAAC;EACxB,oBACEH,KAAA,CAAAU,aAAA,CAACT;EACC;EAAA;IACAU,KAAK,EAAEC,MAAM,CAACC,MAAO;IACrBC,OAAO,EAAER,SAAU;IACnBC,eAAe,EAAEA,eAAe,IAAIE,KAAK,CAACM,MAAM,CAACC,UAAW;IAC5DR,eAAe,EAAEA,eAAe,IAAIC,KAAK,CAACM,MAAM,CAACE,OAAQ;IACzDC,MAAM,EAAE,CAAE;IACVC,QAAQ,EAAE,CAAE;IACZC,GAAG,EAAEd,SAAS,GAAG,EAAG;IACpBe,KAAK,EAAE,CAAE;IACTC,KAAK,EAAC;EAAM,gBAEZtB,KAAA,CAAAU,aAAA,CAACR,IAAI;IAACgB,MAAM,EAAE,CAAE;IAACI,KAAK,EAAC,MAAM;IAACC,CAAC,EAAE,CAAE;IAACC,CAAC,EAAE;EAAE,CAAE,CAC9B,CAAC;AAEpB,CAAC;AAED,MAAMZ,MAAM,GAAGR,UAAU,CAACqB,MAAM,CAAC;EAC/BZ,MAAM,EAAE;IAAEa,eAAe,EAAE;EAAE;AAC/B,CAAC,CAAC"}
|
|
@@ -4,6 +4,7 @@ import { Button } from './Button';
|
|
|
4
4
|
import { View } from './View';
|
|
5
5
|
import { Text } from './Text';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
|
+
import { Card } from './Card';
|
|
7
8
|
const useSelectionDialogHook = () => {
|
|
8
9
|
const [isVisible, setIsVisible] = useState(false);
|
|
9
10
|
const [params, setParams] = useState({});
|
|
@@ -83,9 +84,13 @@ export const SelectionDialog = () => {
|
|
|
83
84
|
}, title)), Boolean(description) && /*#__PURE__*/React.createElement(Dialog.Content, null, /*#__PURE__*/React.createElement(Text, {
|
|
84
85
|
variant: "bodyMedium"
|
|
85
86
|
}, description)), /*#__PURE__*/React.createElement(Dialog.Content, null, selectionOptions.map((option, index) => {
|
|
86
|
-
return /*#__PURE__*/React.createElement(
|
|
87
|
-
pt: "8",
|
|
87
|
+
return /*#__PURE__*/React.createElement(Card, {
|
|
88
88
|
key: index,
|
|
89
|
+
mode: "contained",
|
|
90
|
+
bg: 'transparent',
|
|
91
|
+
onPress: () => setSelectedOptionIndex(index)
|
|
92
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
93
|
+
pt: "8",
|
|
89
94
|
flexDirection: "row",
|
|
90
95
|
maxWidth: '80%'
|
|
91
96
|
}, /*#__PURE__*/React.createElement(RadioButton.Android, {
|
|
@@ -95,7 +100,7 @@ export const SelectionDialog = () => {
|
|
|
95
100
|
}), /*#__PURE__*/React.createElement(Text, {
|
|
96
101
|
pt: '6',
|
|
97
102
|
variant: "bodyMedium"
|
|
98
|
-
}, option));
|
|
103
|
+
}, option)));
|
|
99
104
|
})), /*#__PURE__*/React.createElement(Dialog.Actions, null, button3 && /*#__PURE__*/React.createElement(Button, {
|
|
100
105
|
disabled: selectedOptionIndex === -1,
|
|
101
106
|
mx: "8",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","useCallback","useEffect","Dialog","RadioButton","useTheme","Button","View","Text","useTranslation","useSelectionDialogHook","isVisible","setIsVisible","params","setParams","title","description","isDismissable","buttons","selectionOptions","show","parameters","hide","rootLevelRef","SelectionDialog","theme","t","selectedOptionIndex","setSelectedOptionIndex","button1","label","onPress","mode","button2","button3","ref","useRef","useImperativeHandle","current","createElement","style","backgroundColor","colors","background","dismissable","dismissableBackButton","onDismiss","visible","Boolean","Content","variant","map","option","index","
|
|
1
|
+
{"version":3,"names":["React","useState","useCallback","useEffect","Dialog","RadioButton","useTheme","Button","View","Text","useTranslation","Card","useSelectionDialogHook","isVisible","setIsVisible","params","setParams","title","description","isDismissable","buttons","selectionOptions","show","parameters","hide","rootLevelRef","SelectionDialog","theme","t","selectedOptionIndex","setSelectedOptionIndex","button1","label","onPress","mode","button2","button3","ref","useRef","useImperativeHandle","current","createElement","style","backgroundColor","colors","background","dismissable","dismissableBackButton","onDismiss","visible","Boolean","Content","variant","map","option","index","key","bg","pt","flexDirection","maxWidth","Android","value","status","Actions","disabled","mx","ml","displayName"],"sourceRoot":"../../../src","sources":["components/SelectionDialog.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,WAAW,EAAEC,SAAS,QAAQ,OAAO;AAC/D,SAASC,MAAM,EAAEC,WAAW,EAAEC,QAAQ,QAAQ,oBAAoB;AAClE,SAASC,MAAM,QAAQ,UAAU;AACjC,SAASC,IAAI,QAAQ,QAAQ;AAC7B,SAASC,IAAI,QAAQ,QAAQ;AAC7B,SAASC,cAAc,QAAQ,eAAe;AAC9C,SAASC,IAAI,QAAQ,QAAQ;AAoB7B,MAAMC,sBAAsB,GAAGA,CAAA,KAAM;EACnC,MAAM,CAACC,SAAS,EAAEC,YAAY,CAAC,GAAG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,EAAED,IAAI,IAAI,MAAO;IAC9BD,OAAO,EAAEA,CAAA,KAAM;MACbT,IAAI,CAAC,CAAC;MACNW,OAAO,EAAEF,OAAO,GAAGJ,mBAAmB,CAAC;IACzC;EAAE,GAEDM,OAAO,EAAEH,KACJ,CACT,EACAD,OAAO,iBACN/B,KAAA,CAAAyC,aAAA,CAAClC,MAAM;IACL0D,QAAQ,EAAEpC,mBAAmB,KAAK,CAAC,CAAE;IACrCsC,EAAE,EAAC,GAAG;IACNjC,IAAI,EAAEH,OAAO,EAAEG,IAAI,IAAI,MAAO;IAC9BD,OAAO,EAAEA,CAAA,KAAM;MACbT,IAAI,CAAC,CAAC;MACNO,OAAO,EAAEE,OAAO,GAAGJ,mBAAmB,CAAC;IACzC;EAAE,GAEDE,OAAO,CAACC,KACH,CAEI,CACV,CAAC;AAEb,CAAC;AAEDN,eAAe,CAAC0C,WAAW,GAAG,iBAAiB;;AAE/C;AACA1C,eAAe,CAACJ,IAAI,GAAIP,MAA6B,IAAK;EACxDU,YAAY,EAAEH,IAAI,CAACP,MAAM,CAAC;AAC5B,CAAC"}
|
|
@@ -10,6 +10,7 @@ export { IconButton } from './IconButton';
|
|
|
10
10
|
export { Image } from './Image';
|
|
11
11
|
export { KeyboardAvoidingView } from './KeyboardAvoidingView';
|
|
12
12
|
export { LineLoader } from './LineLoader';
|
|
13
|
+
export { ContentLoaderList } from './ContentLoaderList';
|
|
13
14
|
export { LinkButton } from './LinkButton';
|
|
14
15
|
export { OtpInputs } from './OtpInputs';
|
|
15
16
|
export { ParentView } from './ParentView';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Alert","Badge","BottomSheet","Button","Card","Divider","FAB","Header","IconButton","Image","KeyboardAvoidingView","LineLoader","LinkButton","OtpInputs","ParentView","Searchbar","SelectionDialog","Snackbar","Surface","Switch","Text","TextInput","ToggleButton","TouchableRipple","Video","View","RefreshControl","PhoneInput"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":"AAAA,SAASA,KAAK,QAAQ,SAAS;AAC/B,SAASC,KAAK,QAAQ,SAAS;AAC/B,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,MAAM,QAAQ,UAAU;AACjC,SAASC,IAAI,QAAQ,QAAQ;AAC7B,SAASC,OAAO,QAAQ,WAAW;AACnC,SAASC,GAAG,QAAQ,OAAO;AAC3B,SAASC,MAAM,QAAQ,UAAU;AACjC,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,KAAK,QAAQ,SAAS;AAC/B,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,SAAS,QAAQ,aAAa;AACvC,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,SAAS,QAAQ,aAAa;AACvC,SAASC,eAAe,QAAQ,mBAAmB;AACnD,SAASC,QAAQ,QAAQ,YAAY;AACrC,SAASC,OAAO,QAAQ,WAAW;AACnC,SAASC,MAAM,QAAQ,UAAU;AACjC,SAASC,IAAI,QAAQ,QAAQ;AAC7B,SAASC,SAAS,QAAQ,aAAa;AACvC,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,eAAe,QAAQ,mBAAmB;AACnD,SAASC,KAAK,QAAQ,SAAS;AAC/B,SAASC,IAAI,QAAQ,QAAQ;AAC7B,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SAASC,UAAU,QAAuB,cAAc"}
|
|
1
|
+
{"version":3,"names":["Alert","Badge","BottomSheet","Button","Card","Divider","FAB","Header","IconButton","Image","KeyboardAvoidingView","LineLoader","ContentLoaderList","LinkButton","OtpInputs","ParentView","Searchbar","SelectionDialog","Snackbar","Surface","Switch","Text","TextInput","ToggleButton","TouchableRipple","Video","View","RefreshControl","PhoneInput"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":"AAAA,SAASA,KAAK,QAAQ,SAAS;AAC/B,SAASC,KAAK,QAAQ,SAAS;AAC/B,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,MAAM,QAAQ,UAAU;AACjC,SAASC,IAAI,QAAQ,QAAQ;AAC7B,SAASC,OAAO,QAAQ,WAAW;AACnC,SAASC,GAAG,QAAQ,OAAO;AAC3B,SAASC,MAAM,QAAQ,UAAU;AACjC,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,KAAK,QAAQ,SAAS;AAC/B,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,SAAS,QAAQ,aAAa;AACvC,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,SAAS,QAAQ,aAAa;AACvC,SAASC,eAAe,QAAQ,mBAAmB;AACnD,SAASC,QAAQ,QAAQ,YAAY;AACrC,SAASC,OAAO,QAAQ,WAAW;AACnC,SAASC,MAAM,QAAQ,UAAU;AACjC,SAASC,IAAI,QAAQ,QAAQ;AAC7B,SAASC,SAAS,QAAQ,aAAa;AACvC,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,eAAe,QAAQ,mBAAmB;AACnD,SAASC,KAAK,QAAQ,SAAS;AAC/B,SAASC,IAAI,QAAQ,QAAQ;AAC7B,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SAASC,UAAU,QAAuB,cAAc"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
interface ButtonProps {
|
|
3
3
|
label: string;
|
|
4
4
|
onPress?: () => void;
|
|
@@ -9,6 +9,7 @@ interface AlertParams {
|
|
|
9
9
|
description?: string;
|
|
10
10
|
isDismissable?: boolean;
|
|
11
11
|
buttons?: ButtonProps[];
|
|
12
|
+
renderDescription?: () => React.ReactNode;
|
|
12
13
|
}
|
|
13
14
|
export declare const Alert: {
|
|
14
15
|
(): JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../../src/components/Alert.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../../src/components/Alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAQrD,UAAU,WAAW;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,WAAW,GAAG,UAAU,GAAG,iBAAiB,CAAC;CAC3E;AAED,UAAU,WAAW;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,KAAK,CAAC,SAAS,CAAC;CAC3C;AAwCD,eAAO,MAAM,KAAK;;;iBAoHI,WAAW;CALhC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type ContentLoaderListProps = {
|
|
3
|
+
count?: number;
|
|
4
|
+
radius?: number;
|
|
5
|
+
height: number | string;
|
|
6
|
+
backgroundColor?: string;
|
|
7
|
+
foregroundColor?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const ContentLoaderList: ({ count, radius, height, backgroundColor, foregroundColor, }: ContentLoaderListProps) => JSX.Element[];
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=ContentLoaderList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentLoaderList.d.ts","sourceRoot":"","sources":["../../../../src/components/ContentLoaderList.tsx"],"names":[],"mappings":";AAMA,KAAK,sBAAsB,GAAG;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,iBAAiB,iEAM3B,sBAAsB,kBAyBxB,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
type
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type LineLoaderProps = {
|
|
3
|
+
isLoading: boolean;
|
|
3
4
|
backgroundColor?: string;
|
|
4
5
|
foregroundColor?: string;
|
|
5
|
-
height?: number;
|
|
6
|
-
progress: number;
|
|
7
6
|
};
|
|
8
|
-
export declare const LineLoader:
|
|
7
|
+
export declare const LineLoader: ({ isLoading, backgroundColor, foregroundColor, }: LineLoaderProps) => JSX.Element;
|
|
9
8
|
export {};
|
|
10
9
|
//# sourceMappingURL=LineLoader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LineLoader.d.ts","sourceRoot":"","sources":["../../../../src/components/LineLoader.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LineLoader.d.ts","sourceRoot":"","sources":["../../../../src/components/LineLoader.tsx"],"names":[],"mappings":";AAMA,KAAK,eAAe,GAAG;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AACF,eAAO,MAAM,UAAU,qDAIpB,eAAe,gBAkBjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectionDialog.d.ts","sourceRoot":"","sources":["../../../../src/components/SelectionDialog.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"SelectionDialog.d.ts","sourceRoot":"","sources":["../../../../src/components/SelectionDialog.tsx"],"names":[],"mappings":";AAQA,UAAU,WAAW;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,IAAI,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,WAAW,GAAG,UAAU,GAAG,iBAAiB,CAAC;CAC3E;AAED,UAAU,qBAAqB;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,gBAAgB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAClC;AAwCD,eAAO,MAAM,eAAe;;;iBAgJI,qBAAqB;CALpD,CAAC"}
|
|
@@ -10,6 +10,7 @@ export { IconButton } from './IconButton';
|
|
|
10
10
|
export { Image } from './Image';
|
|
11
11
|
export { KeyboardAvoidingView } from './KeyboardAvoidingView';
|
|
12
12
|
export { LineLoader } from './LineLoader';
|
|
13
|
+
export { ContentLoaderList } from './ContentLoaderList';
|
|
13
14
|
export { LinkButton } from './LinkButton';
|
|
14
15
|
export { OtpInputs } from './OtpInputs';
|
|
15
16
|
export { ParentView } from './ParentView';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,U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,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiosinc/commons-rn",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.34",
|
|
4
4
|
"description": "Common Code",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -185,6 +185,7 @@
|
|
|
185
185
|
"axios": "^1.4.0",
|
|
186
186
|
"color": "^4.2.3",
|
|
187
187
|
"i18next": "^23.7.6",
|
|
188
|
+
"react-content-loader": "^6.2.1",
|
|
188
189
|
"react-hook-form": "^7.48.2",
|
|
189
190
|
"react-i18next": "^13.5.0",
|
|
190
191
|
"react-native-config": "^1.5.1",
|
package/src/components/Alert.tsx
CHANGED
|
@@ -17,6 +17,7 @@ interface AlertParams {
|
|
|
17
17
|
description?: string;
|
|
18
18
|
isDismissable?: boolean;
|
|
19
19
|
buttons?: ButtonProps[];
|
|
20
|
+
renderDescription?: () => React.ReactNode;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
interface AlertHandle {
|
|
@@ -31,6 +32,7 @@ const useAlertHook = () => {
|
|
|
31
32
|
description = '',
|
|
32
33
|
isDismissable = true,
|
|
33
34
|
buttons = [],
|
|
35
|
+
renderDescription,
|
|
34
36
|
} = params;
|
|
35
37
|
|
|
36
38
|
const show = useCallback((parameters: AlertParams) => {
|
|
@@ -50,14 +52,23 @@ const useAlertHook = () => {
|
|
|
50
52
|
description,
|
|
51
53
|
isDismissable,
|
|
52
54
|
buttons,
|
|
55
|
+
renderDescription,
|
|
53
56
|
};
|
|
54
57
|
};
|
|
55
58
|
|
|
56
59
|
let rootLevelRef: AlertHandle | null = null;
|
|
57
60
|
|
|
58
61
|
export const Alert = () => {
|
|
59
|
-
const {
|
|
60
|
-
|
|
62
|
+
const {
|
|
63
|
+
isVisible,
|
|
64
|
+
show,
|
|
65
|
+
hide,
|
|
66
|
+
buttons,
|
|
67
|
+
isDismissable,
|
|
68
|
+
title,
|
|
69
|
+
description,
|
|
70
|
+
renderDescription,
|
|
71
|
+
} = useAlertHook();
|
|
61
72
|
const theme = useTheme();
|
|
62
73
|
const { t } = useTranslation();
|
|
63
74
|
|
|
@@ -115,6 +126,9 @@ export const Alert = () => {
|
|
|
115
126
|
<Text variant="bodyMedium">{description}</Text>
|
|
116
127
|
</Dialog.Content>
|
|
117
128
|
)}
|
|
129
|
+
{renderDescription && (
|
|
130
|
+
<Dialog.Content>{renderDescription()}</Dialog.Content>
|
|
131
|
+
)}
|
|
118
132
|
<Dialog.Actions>
|
|
119
133
|
{button3 && (
|
|
120
134
|
<Button
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { useTheme } from 'react-native-paper';
|
|
4
|
+
import ContentLoader, { Rect } from 'react-content-loader/native';
|
|
5
|
+
import { StyleSheet } from 'react-native';
|
|
6
|
+
|
|
7
|
+
type ContentLoaderListProps = {
|
|
8
|
+
count?: number;
|
|
9
|
+
radius?: number;
|
|
10
|
+
height: number | string;
|
|
11
|
+
backgroundColor?: string;
|
|
12
|
+
foregroundColor?: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const ContentLoaderList = ({
|
|
16
|
+
count = 10,
|
|
17
|
+
radius = 18,
|
|
18
|
+
height,
|
|
19
|
+
backgroundColor,
|
|
20
|
+
foregroundColor,
|
|
21
|
+
}: ContentLoaderListProps) => {
|
|
22
|
+
const theme = useTheme();
|
|
23
|
+
return new Array(count).fill(0).map((_, index) => {
|
|
24
|
+
return (
|
|
25
|
+
<ContentLoader
|
|
26
|
+
key={index}
|
|
27
|
+
speed={1}
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
width="100%"
|
|
30
|
+
height={height}
|
|
31
|
+
backgroundColor={backgroundColor ?? theme.colors.background}
|
|
32
|
+
foregroundColor={foregroundColor ?? theme.colors.surfaceVariant}
|
|
33
|
+
style={styles.loader}
|
|
34
|
+
>
|
|
35
|
+
<Rect
|
|
36
|
+
x="0"
|
|
37
|
+
y="0"
|
|
38
|
+
rx={radius}
|
|
39
|
+
ry={radius}
|
|
40
|
+
width="100%"
|
|
41
|
+
height={height}
|
|
42
|
+
/>
|
|
43
|
+
</ContentLoader>
|
|
44
|
+
);
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const styles = StyleSheet.create({
|
|
49
|
+
loader: { marginVertical: 8 },
|
|
50
|
+
});
|
|
@@ -1,70 +1,38 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ContentLoader, { Rect } from 'react-content-loader/native';
|
|
3
|
+
|
|
3
4
|
import { useTheme } from 'react-native-paper';
|
|
4
|
-
import
|
|
5
|
-
useSharedValue,
|
|
6
|
-
useAnimatedStyle,
|
|
7
|
-
withTiming,
|
|
8
|
-
Easing,
|
|
9
|
-
} from 'react-native-reanimated';
|
|
5
|
+
import { StyleSheet } from 'react-native';
|
|
10
6
|
|
|
11
|
-
type
|
|
7
|
+
type LineLoaderProps = {
|
|
8
|
+
isLoading: boolean;
|
|
12
9
|
backgroundColor?: string;
|
|
13
10
|
foregroundColor?: string;
|
|
14
|
-
height?: number;
|
|
15
|
-
progress: number;
|
|
16
11
|
};
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
export const LineLoader = ({
|
|
13
|
+
isLoading,
|
|
19
14
|
backgroundColor,
|
|
20
15
|
foregroundColor,
|
|
21
|
-
|
|
22
|
-
progress = 0,
|
|
23
|
-
}) => {
|
|
16
|
+
}: LineLoaderProps) => {
|
|
24
17
|
const theme = useTheme();
|
|
25
|
-
const animatedProgress = useSharedValue(0);
|
|
26
|
-
|
|
27
|
-
useEffect(() => {
|
|
28
|
-
animatedProgress.value = withTiming(progress, {
|
|
29
|
-
duration: 500,
|
|
30
|
-
easing: Easing.linear,
|
|
31
|
-
});
|
|
32
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
33
|
-
}, [progress]);
|
|
34
|
-
|
|
35
|
-
const lineStyle = useAnimatedStyle(() => {
|
|
36
|
-
return {
|
|
37
|
-
width: `${animatedProgress.value * 100}%`,
|
|
38
|
-
backgroundColor: foregroundColor ?? theme.colors.primary,
|
|
39
|
-
height,
|
|
40
|
-
};
|
|
41
|
-
});
|
|
42
|
-
|
|
43
18
|
return (
|
|
44
|
-
<
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
19
|
+
<ContentLoader
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
style={styles.loader}
|
|
22
|
+
animate={isLoading}
|
|
23
|
+
backgroundColor={backgroundColor ?? theme.colors.background}
|
|
24
|
+
foregroundColor={foregroundColor ?? theme.colors.primary}
|
|
25
|
+
height={3}
|
|
26
|
+
interval={0}
|
|
27
|
+
key={isLoading + ''}
|
|
28
|
+
speed={1}
|
|
29
|
+
width="100%"
|
|
30
|
+
>
|
|
31
|
+
<Rect height={3} width="100%" x={0} y={0} />
|
|
32
|
+
</ContentLoader>
|
|
55
33
|
);
|
|
56
34
|
};
|
|
57
35
|
|
|
58
36
|
const styles = StyleSheet.create({
|
|
59
|
-
|
|
60
|
-
overflow: 'hidden',
|
|
61
|
-
},
|
|
62
|
-
background: {
|
|
63
|
-
flex: 1,
|
|
64
|
-
},
|
|
65
|
-
line: {
|
|
66
|
-
position: 'absolute',
|
|
67
|
-
top: 0,
|
|
68
|
-
left: 0,
|
|
69
|
-
},
|
|
37
|
+
loader: { paddingVertical: 6 },
|
|
70
38
|
});
|
|
@@ -4,6 +4,7 @@ import { Button } from './Button';
|
|
|
4
4
|
import { View } from './View';
|
|
5
5
|
import { Text } from './Text';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
|
+
import { Card } from './Card';
|
|
7
8
|
|
|
8
9
|
interface ButtonProps {
|
|
9
10
|
label: string;
|
|
@@ -132,16 +133,25 @@ export const SelectionDialog = () => {
|
|
|
132
133
|
<Dialog.Content>
|
|
133
134
|
{selectionOptions.map((option: string, index) => {
|
|
134
135
|
return (
|
|
135
|
-
<
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
<
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
136
|
+
<Card
|
|
137
|
+
key={index}
|
|
138
|
+
mode="contained"
|
|
139
|
+
bg={'transparent'}
|
|
140
|
+
onPress={() => setSelectedOptionIndex(index)}
|
|
141
|
+
>
|
|
142
|
+
<View pt="8" flexDirection="row" maxWidth={'80%'}>
|
|
143
|
+
<RadioButton.Android
|
|
144
|
+
value=""
|
|
145
|
+
status={
|
|
146
|
+
selectedOptionIndex === index ? 'checked' : 'unchecked'
|
|
147
|
+
}
|
|
148
|
+
onPress={() => setSelectedOptionIndex(index)}
|
|
149
|
+
/>
|
|
150
|
+
<Text pt={'6'} variant="bodyMedium">
|
|
151
|
+
{option}
|
|
152
|
+
</Text>
|
|
153
|
+
</View>
|
|
154
|
+
</Card>
|
|
145
155
|
);
|
|
146
156
|
})}
|
|
147
157
|
</Dialog.Content>
|
package/src/components/index.ts
CHANGED
|
@@ -10,6 +10,7 @@ export { IconButton } from './IconButton';
|
|
|
10
10
|
export { Image } from './Image';
|
|
11
11
|
export { KeyboardAvoidingView } from './KeyboardAvoidingView';
|
|
12
12
|
export { LineLoader } from './LineLoader';
|
|
13
|
+
export { ContentLoaderList } from './ContentLoaderList';
|
|
13
14
|
export { LinkButton } from './LinkButton';
|
|
14
15
|
export { OtpInputs } from './OtpInputs';
|
|
15
16
|
export { ParentView } from './ParentView';
|