@kiosinc/commons-rn 0.1.32 → 0.1.33
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/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/index.js +7 -0
- package/lib/commonjs/components/index.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/index.js +1 -0
- package/lib/module/components/index.js.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/index.d.ts +1 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/components/ContentLoaderList.tsx +50 -0
- package/src/components/LineLoader.tsx +24 -56
- package/src/components/index.ts +1 -0
|
@@ -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;AAA0C,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,SAAAH,wBAAAG,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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,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","exports","StyleSheet","create","paddingVertical"],"sourceRoot":"../../../src","sources":["components/LineLoader.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,uBAAA,CAAAF,OAAA;AAEA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAA0C,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,SAAAJ,wBAAAI,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,C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M,EAAE,CAAE;IACVC,QAAQ,EAAE,CAAE;IACZC,GAAG,EAAEf,SAAS,GAAG,EAAG;IACpBgB,KAAK,EAAE,CAAE;IACTC,KAAK,EAAC;EAAM,gBAEZ/C,MAAA,CAAAa,OAAA,CAAAsB,aAAA,CAAChC,OAAA,CAAA6C,IAAI;IAACL,MAAM,EAAE,CAAE;IAACI,KAAK,EAAC,MAAM;IAACE,CAAC,EAAE,CAAE;IAACC,CAAC,EAAE;EAAE,CAAE,CAC9B,CAAC;AAEpB,CAAC;AAACC,OAAA,CAAAtB,UAAA,GAAAA,UAAA;AAEF,MAAMQ,MAAM,GAAGe,uBAAU,CAACC,MAAM,CAAC;EAC/Bf,MAAM,EAAE;IAAEgB,eAAe,EAAE;EAAE;AAC/B,CAAC,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"}
|
|
@@ -0,0 +1,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"}
|
|
@@ -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"}
|
|
@@ -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"}
|
|
@@ -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,UAAU,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,EA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AAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,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.33",
|
|
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",
|
|
@@ -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
|
});
|
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';
|