related-ui-components 1.9.1 → 1.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,161 +1,153 @@
1
- "use strict";
1
+ // // App.tsx or any other screen component
2
+ // import React, { useState } from "react";
3
+ // import {
4
+ // SafeAreaView,
5
+ // StyleSheet,
6
+ // TextInput,
7
+ // View,
8
+ // Text,
9
+ // ScrollView,
10
+ // Button,
11
+ // } from "react-native";
12
+ // import Barcode, { BarcodeFormat } from "./components/Barcode/Barcode";
13
+
14
+ // export default function App() {
15
+ // const [barcodeValue, setBarcodeValue] = useState("123456789012");
16
+ // const [barcodeFormat, setBarcodeFormat] = useState<BarcodeFormat>(
17
+ // BarcodeFormat.EAN13,
18
+ // );
19
+ // const [errorMsg, setErrorMsg] = useState<string | null>(null);
20
+
21
+ // const handleBarcodeError = (error: Error) => {
22
+ // console.error("Custom Barcode Error:", error.message);
23
+ // setErrorMsg(`Barcode Error: ${error.message}`);
24
+ // };
25
+
26
+ // const cycleFormat = () => {
27
+ // const formats = Object.values(BarcodeFormat);
28
+ // const currentIndex = formats.indexOf(barcodeFormat);
29
+ // const nextIndex = (currentIndex + 1) % formats.length;
30
+ // setBarcodeFormat(formats[nextIndex]);
31
+ // // Adjust value for specific formats if needed
32
+ // if (formats[nextIndex] === BarcodeFormat.EAN13) setBarcodeValue("978020137962"); // Valid EAN13
33
+ // else if (formats[nextIndex] === BarcodeFormat.UPC) setBarcodeValue("012345678905"); // Valid UPC
34
+ // else if (formats[nextIndex] === BarcodeFormat.CODE39) setBarcodeValue("HELLO-WORLD");
35
+ // else setBarcodeValue("TEST12345");
36
+
37
+ // };
38
+
39
+ // return (
40
+ // <SafeAreaView style={styles.container}>
41
+ // <ScrollView contentContainerStyle={styles.scrollContent}>
42
+ // <Text style={styles.title}>Custom Barcode Generator</Text>
43
+
44
+ // <TextInput
45
+ // style={styles.input}
46
+ // placeholder="Enter barcode value"
47
+ // value={barcodeValue}
48
+ // onChangeText={setBarcodeValue}
49
+ // autoCapitalize="characters" // Good for some formats like CODE39
50
+ // />
2
51
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
8
- var _reactNative = require("react-native");
9
- var _index = require("./components/index.js");
10
- var _vectorIcons = require("@expo/vector-icons");
11
- var _index2 = require("./theme/index.js");
12
- var _reactNativeGestureHandler = require("react-native-gesture-handler");
13
- var _jsxRuntime = require("react/jsx-runtime");
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); }
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 && {}.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; }
16
- const MyScreen = () => {
17
- const [isFilterVisible, setIsFilterVisible] = (0, _react.useState)(false);
18
- const {
19
- theme
20
- } = (0, _index2.useTheme)();
21
- const handleApplyFilters = result => {
22
- console.log("Filters applied:", result);
23
- // Process filter results...
24
- };
25
- const rewardsData = [{
26
- icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
27
- name: "briefcase-outline",
28
- size: 30,
29
- color: theme.primary
30
- }),
31
- activeIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
32
- name: "briefcase-outline",
33
- size: 30,
34
- color: theme.onPrimary
35
- }),
36
- title: "Aqua Guardian",
37
- description: "Maintain water usage below the community average for a month.",
38
- isActive: false,
39
- status: "0/1",
40
- statusBackgroundColor: "#FFCDD2",
41
- statusTextColor: "#D32F2F"
42
- }, {
43
- icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
44
- name: "heart-outline",
45
- size: 30,
46
- color: theme.primary
47
- }),
48
- activeIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
49
- name: "heart-outline",
50
- size: 30,
51
- color: theme.onPrimary
52
- }),
53
- title: "Wellness Warrior",
54
- description: "Complete 30 days of healthy hydration tracking.",
55
- isActive: true,
56
- status: "15/30",
57
- statusBackgroundColor: "#C8E6C9",
58
- statusTextColor: "#388E3C"
59
- }, {
60
- icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
61
- name: "airplane-outline",
62
- size: 24,
63
- color: theme.helper
64
- }),
65
- activeIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
66
- name: "airplane-outline",
67
- size: 24,
68
- color: theme.primary
69
- }),
70
- title: "Eco Traveler",
71
- description: "Log 5 trips where you chose sustainable travel options.",
72
- isActive: false,
73
- status: "2/5",
74
- statusBackgroundColor: theme.disabled,
75
- statusTextColor: theme.text
76
- }, {
77
- icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
78
- name: "school-outline",
79
- size: 24,
80
- color: theme.helper
81
- }),
82
- activeIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
83
- name: "school-outline",
84
- size: 24,
85
- color: theme.primary
86
- }),
87
- title: "Knowledge Seeker",
88
- description: "Complete all water conservation learning modules.",
89
- isActive: false,
90
- status: "3/5",
91
- statusBackgroundColor: theme.disabled,
92
- statusTextColor: theme.text
93
- }, {
94
- icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
95
- name: "settings-outline",
96
- size: 24,
97
- color: theme.helper
98
- }),
99
- activeIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
100
- name: "settings-outline",
101
- size: 24,
102
- color: theme.primary
103
- }),
104
- title: "Smart Saver",
105
- description: "Set up and use all water-saving features in the app.",
106
- isActive: true,
107
- status: "4/4",
108
- statusBackgroundColor: theme.primary,
109
- statusTextColor: theme.background
110
- }];
111
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
112
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeGestureHandler.GestureHandlerRootView, {
113
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Popup, {
114
- visible: true,
115
- onClose: () => {},
116
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ScratchCard, {
117
- backgroundColor: "#8A2BE2",
118
- text: "Scratch to reveal your prize!",
119
- textFontColor: "#FFFFFF",
120
- textFontSize: 18,
121
- textFont: require("@/assets/fonts/SpaceMono-Regular.ttf"),
122
- width: 300,
123
- height: 150,
124
- gradient: {
125
- colors: ["#ff0000", "#00ff00", "#0000ff"],
126
- start: {
127
- x: 0,
128
- y: 0
129
- },
130
- end: {
131
- x: 300,
132
- y: 300
133
- }
134
- },
135
- onScratched: () => alert("Congratulations! You won a prize!"),
136
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_index.ScratchCardContent, {
137
- style: {
138
- backgroundColor: "#FFD700"
139
- },
140
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
141
- style: {
142
- fontSize: 24,
143
- fontWeight: "bold",
144
- color: "#000"
145
- },
146
- children: "50% OFF COUPON"
147
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
148
- style: {
149
- marginTop: 8,
150
- color: "#333"
151
- },
152
- children: "Use code: SCRATCH50"
153
- })]
154
- })
155
- })
156
- })
157
- })
158
- });
159
- };
160
- var _default = exports.default = MyScreen;
52
+ // <View style={styles.formatSelector}>
53
+ // <Text>Format: {barcodeFormat}</Text>
54
+ // <Button title="Cycle Format" onPress={cycleFormat} />
55
+ // </View>
56
+
57
+ // {errorMsg && <Text style={styles.errorTextDisplay}>{errorMsg}</Text>}
58
+
59
+ // <Text style={styles.label}>Default:</Text>
60
+ // <Barcode
61
+ // value={barcodeValue}
62
+ // format={barcodeFormat}
63
+ // onError={handleBarcodeError}
64
+ // />
65
+
66
+ // <Text style={styles.label}>Customized (CODE128):</Text>
67
+ // <Barcode
68
+ // value="CUSTOM-CODE-128"
69
+ // format={BarcodeFormat.CODE128}
70
+ // lineColor="blue"
71
+ // backgroundColor="#e0e0ff"
72
+ // height={80}
73
+ // width={1.5} // Bar width
74
+ // fontSize={16}
75
+ // textMargin={5}
76
+ // margin={20} // Margin around the SVG
77
+ // onError={handleBarcodeError}
78
+ // style={styles.customBarcodeStyle}
79
+ // />
80
+
81
+ // <Text style={styles.label}>No Text Value (EAN13):</Text>
82
+ // <Barcode
83
+ // value="590123412345" // Needs valid check digit for EAN13
84
+ // format={BarcodeFormat.EAN13}
85
+ // displayValue={false}
86
+ // onError={handleBarcodeError}
87
+ // />
88
+
89
+ // <Text style={styles.label}>Invalid Value Example (for EAN13):</Text>
90
+ // <Barcode
91
+ // value="INVALID" // This will likely cause an error for EAN13
92
+ // format={BarcodeFormat.EAN13}
93
+ // onError={handleBarcodeError}
94
+ // />
95
+ // <Text style={styles.label}>Empty Value:</Text>
96
+ // <Barcode
97
+ // value=""
98
+ // format={BarcodeFormat.CODE128}
99
+ // onError={handleBarcodeError}
100
+ // />
101
+ // </ScrollView>
102
+ // </SafeAreaView>
103
+ // );
104
+ // }
105
+
106
+ // const styles = StyleSheet.create({
107
+ // container: {
108
+ // flex: 1,
109
+ // backgroundColor: "#f0f0f0",
110
+ // },
111
+ // scrollContent: {
112
+ // alignItems: "center",
113
+ // padding: 20,
114
+ // },
115
+ // title: {
116
+ // fontSize: 24,
117
+ // fontWeight: "bold",
118
+ // marginBottom: 20,
119
+ // },
120
+ // input: {
121
+ // height: 40,
122
+ // borderColor: "gray",
123
+ // borderWidth: 1,
124
+ // paddingHorizontal: 10,
125
+ // marginBottom: 20,
126
+ // width: "90%",
127
+ // backgroundColor: "white",
128
+ // },
129
+ // label: {
130
+ // fontSize: 16,
131
+ // fontWeight: "600",
132
+ // marginTop: 20,
133
+ // marginBottom: 8,
134
+ // },
135
+ // customBarcodeStyle: {
136
+ // borderWidth: 1,
137
+ // borderColor: "purple",
138
+ // padding: 5, // Padding for the View container, not the barcode margin
139
+ // },
140
+ // formatSelector: {
141
+ // flexDirection: "row",
142
+ // alignItems: "center",
143
+ // justifyContent: "space-between",
144
+ // width: "90%",
145
+ // marginBottom: 15,
146
+ // },
147
+ // errorTextDisplay: {
148
+ // color: 'red',
149
+ // marginVertical: 10,
150
+ // }
151
+ // });
152
+ "use strict";
161
153
  //# sourceMappingURL=app.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_index","_vectorIcons","_index2","_reactNativeGestureHandler","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","MyScreen","isFilterVisible","setIsFilterVisible","useState","theme","useTheme","handleApplyFilters","result","console","log","rewardsData","icon","jsx","Ionicons","name","size","color","primary","activeIcon","onPrimary","title","description","isActive","status","statusBackgroundColor","statusTextColor","helper","disabled","text","background","Fragment","children","GestureHandlerRootView","Popup","visible","onClose","ScratchCard","backgroundColor","textFontColor","textFontSize","textFont","width","height","gradient","colors","start","x","y","end","onScratched","alert","jsxs","ScratchCardContent","style","Text","fontSize","fontWeight","marginTop","_default","exports"],"sourceRoot":"..\\..\\src","sources":["app.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AASA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;A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AAE,GAAG;cAAEC,CAAC,EAAE;YAAI;UACxB,CAAE;UACFE,WAAW,EAAEA,CAAA,KAAMC,KAAK,CAAC,mCAAmC,CAAE;UAAAnB,QAAA,eAE9D,IAAApD,WAAA,CAAAwE,IAAA,EAAC5E,MAAA,CAAA6E,kBAAkB;YAACC,KAAK,EAAE;cAAEhB,eAAe,EAAE;YAAU,CAAE;YAAAN,QAAA,gBACxD,IAAApD,WAAA,CAAAiC,GAAA,EAACtC,YAAA,CAAAgF,IAAI;cAACD,KAAK,EAAE;gBAAEE,QAAQ,EAAE,EAAE;gBAAEC,UAAU,EAAE,MAAM;gBAAExC,KAAK,EAAE;cAAO,CAAE;cAAAe,QAAA,EAAC;YAElE,CAAM,CAAC,eACP,IAAApD,WAAA,CAAAiC,GAAA,EAACtC,YAAA,CAAAgF,IAAI;cAACD,KAAK,EAAE;gBAAEI,SAAS,EAAE,CAAC;gBAAEzC,KAAK,EAAE;cAAO,CAAE;cAAAe,QAAA,EAAC;YAE9C,CAAM,CAAC;UAAA,CACW;QAAC,CACV;MAAC,CACP;IAAC,CACc;EAAC,CACzB,CAAC;AAEP,CAAC;AAAC,IAAA2B,QAAA,GAAAC,OAAA,CAAAzE,OAAA,GAEac,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"..\\..\\src","sources":["app.tsx"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA","ignoreList":[]}
@@ -8,6 +8,7 @@ var _react = _interopRequireDefault(require("react"));
8
8
  var _reactNative = require("react-native");
9
9
  var _index = require("../Card/index.js");
10
10
  var _index2 = require("../../theme/index.js");
11
+ var _reactNativeGestureHandler = require("react-native-gesture-handler");
11
12
  var _jsxRuntime = require("react/jsx-runtime");
12
13
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
14
  /**
@@ -46,7 +47,7 @@ const Banner = ({
46
47
  if (!buttonText) {
47
48
  return null;
48
49
  }
49
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
50
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeGestureHandler.TouchableOpacity, {
50
51
  style: [styles.button, {
51
52
  borderColor: theme.primary
52
53
  }, buttonStyle],
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_index","_index2","_jsxRuntime","e","__esModule","default","Banner","backgroundImage","buttonText","onButtonPress","onBannerPress","containerStyle","backgroundImageStyle","contentContainerStyle","buttonStyle","buttonTextStyle","height","customButton","contentAlignment","icon","iconPosition","iconStyle","iconSpacing","theme","useTheme","handlePress","undefined","renderButton","jsx","TouchableOpacity","style","styles","button","borderColor","primary","onPress","accessibilityRole","accessibilityLabel","children","jsxs","View","buttonContent","flexDirection","iconContainer","marginRight","marginLeft","accessible","importantForAccessibility","Text","color","Card","source","resizeMode","imageStyle","CardFooter","justifyContent","footer","footerTop","footerCenter","footerBottom","StyleSheet","create","position","left","right","top","transform","translateY","bottom","backgroundColor","paddingHorizontal","paddingVertical","borderRadius","borderWidth","alignItems","fontSize","fontWeight","letterSpacing","_default","exports"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/Banner/Banner.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAWA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAAkD,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAuBlD;AACA;AACA;AACA,MAAMG,MAA6B,GAAGA,CAAC;EACrCC,eAAe;EACfC,UAAU,GAAG,QAAQ;EACrBC,aAAa;EACbC,aAAa;EACbC,cAAc;EACdC,oBAAoB;EACpBC,qBAAqB;EACrBC,WAAW;EACXC,eAAe;EACfC,MAAM,GAAG,GAAG;EACZC,YAAY;EACZC,gBAAgB,GAAG,QAAQ;EAE3B;EACAC,IAAI;EACJC,YAAY,GAAG,MAAM;EACrBC,SAAS;EACTC,WAAW,GAAG;AAChB,CAAC,KAAK;EACJ,MAAM;IAACC;EAAK,CAAC,GAAG,IAAAC,gBAAQ,EAAC,CAAC;EAC1B;EACA,MAAMC,WAAW,GAAGf,aAAa,GAAGA,aAAa,GAAGgB,SAAS;;EAE7D;EACA,MAAMC,YAAY,GAAGA,CAAA,KAAM;IACzB,IAAIV,YAAY,EAAE;MAChB,OAAOA,YAAY;IACrB;IAEA,IAAI,CAACT,UAAU,EAAE;MACf,OAAO,IAAI;IACb;IAEA,oBACE,IAAAN,WAAA,CAAA0B,GAAA,EAAC7B,YAAA,CAAA8B,gBAAgB;MACfC,KAAK,EAAE,CAACC,MAAM,CAACC,MAAM,EAAE;QAACC,WAAW,EAAEV,KAAK,CAAC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a,EAAE;EACjB;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA1E,OAAA,GAEYC,MAAM","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_index","_index2","_reactNativeGestureHandler","_jsxRuntime","e","__esModule","default","Banner","backgroundImage","buttonText","onButtonPress","onBannerPress","containerStyle","backgroundImageStyle","contentContainerStyle","buttonStyle","buttonTextStyle","height","customButton","contentAlignment","icon","iconPosition","iconStyle","iconSpacing","theme","useTheme","handlePress","undefined","renderButton","jsx","TouchableOpacity","style","styles","button","borderColor","primary","onPress","accessibilityRole","accessibilityLabel","children","jsxs","View","buttonContent","flexDirection","iconContainer","marginRight","marginLeft","accessible","importantForAccessibility","Text","color","Card","source","resizeMode","imageStyle","CardFooter","justifyContent","footer","footerTop","footerCenter","footerBottom","StyleSheet","create","position","left","right","top","transform","translateY","bottom","backgroundColor","paddingHorizontal","paddingVertical","borderRadius","borderWidth","alignItems","fontSize","fontWeight","letterSpacing","_default","exports"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/Banner/Banner.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAUA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,0BAAA,GAAAJ,OAAA;AAAgE,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAD,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAuBhE;AACA;AACA;AACA,MAAMG,MAA6B,GAAGA,CAAC;EACrCC,eAAe;EACfC,UAAU,GAAG,QAAQ;EACrBC,aAAa;EACbC,aAAa;EACbC,cAAc;EACdC,oBAAoB;EACpBC,qBAAqB;EACrBC,WAAW;EACXC,eAAe;EACfC,MAAM,GAAG,GAAG;EACZ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CAAC;IAAG,CAAC,CAAC,CAAE;EACpC,CAAC;EACDR,YAAY,EAAE;IACZS,MAAM,EAAE;EACV,CAAC;EACDpC,MAAM,EAAE;IACNqC,eAAe,EAAE,aAAa;IAC9BC,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE,CAAC;IAClBC,YAAY,EAAE,CAAC;IACfC,WAAW,EAAE,CAAC;IACdxC,WAAW,EAAE;EACf,CAAC;EACDQ,aAAa,EAAE;IACbC,aAAa,EAAE,KAAK;IACpBgC,UAAU,EAAE,QAAQ;IACpBnB,cAAc,EAAE;EAClB,CAAC;EACDZ,aAAa,EAAE;IACb+B,UAAU,EAAE,QAAQ;IACpBnB,cAAc,EAAE;EAClB,CAAC;EACD/C,UAAU,EAAE;IACVyC,KAAK,EAAE,SAAS;IAChB0B,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA1E,OAAA,GAEYC,MAAM","ignoreList":[]}
package/lib/module/app.js CHANGED
@@ -1,155 +1,153 @@
1
- "use strict";
1
+ // // App.tsx or any other screen component
2
+ // import React, { useState } from "react";
3
+ // import {
4
+ // SafeAreaView,
5
+ // StyleSheet,
6
+ // TextInput,
7
+ // View,
8
+ // Text,
9
+ // ScrollView,
10
+ // Button,
11
+ // } from "react-native";
12
+ // import Barcode, { BarcodeFormat } from "./components/Barcode/Barcode";
13
+
14
+ // export default function App() {
15
+ // const [barcodeValue, setBarcodeValue] = useState("123456789012");
16
+ // const [barcodeFormat, setBarcodeFormat] = useState<BarcodeFormat>(
17
+ // BarcodeFormat.EAN13,
18
+ // );
19
+ // const [errorMsg, setErrorMsg] = useState<string | null>(null);
20
+
21
+ // const handleBarcodeError = (error: Error) => {
22
+ // console.error("Custom Barcode Error:", error.message);
23
+ // setErrorMsg(`Barcode Error: ${error.message}`);
24
+ // };
25
+
26
+ // const cycleFormat = () => {
27
+ // const formats = Object.values(BarcodeFormat);
28
+ // const currentIndex = formats.indexOf(barcodeFormat);
29
+ // const nextIndex = (currentIndex + 1) % formats.length;
30
+ // setBarcodeFormat(formats[nextIndex]);
31
+ // // Adjust value for specific formats if needed
32
+ // if (formats[nextIndex] === BarcodeFormat.EAN13) setBarcodeValue("978020137962"); // Valid EAN13
33
+ // else if (formats[nextIndex] === BarcodeFormat.UPC) setBarcodeValue("012345678905"); // Valid UPC
34
+ // else if (formats[nextIndex] === BarcodeFormat.CODE39) setBarcodeValue("HELLO-WORLD");
35
+ // else setBarcodeValue("TEST12345");
36
+
37
+ // };
38
+
39
+ // return (
40
+ // <SafeAreaView style={styles.container}>
41
+ // <ScrollView contentContainerStyle={styles.scrollContent}>
42
+ // <Text style={styles.title}>Custom Barcode Generator</Text>
43
+
44
+ // <TextInput
45
+ // style={styles.input}
46
+ // placeholder="Enter barcode value"
47
+ // value={barcodeValue}
48
+ // onChangeText={setBarcodeValue}
49
+ // autoCapitalize="characters" // Good for some formats like CODE39
50
+ // />
2
51
 
3
- import React, { useState } from "react";
4
- import { Text } from "react-native";
5
- import { Popup, ScratchCard, ScratchCardContent } from "./components/index.js";
6
- import { Ionicons } from "@expo/vector-icons";
7
- import { useTheme } from "./theme/index.js";
8
- import { GestureHandlerRootView } from "react-native-gesture-handler";
9
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
10
- const MyScreen = () => {
11
- const [isFilterVisible, setIsFilterVisible] = useState(false);
12
- const {
13
- theme
14
- } = useTheme();
15
- const handleApplyFilters = result => {
16
- console.log("Filters applied:", result);
17
- // Process filter results...
18
- };
19
- const rewardsData = [{
20
- icon: /*#__PURE__*/_jsx(Ionicons, {
21
- name: "briefcase-outline",
22
- size: 30,
23
- color: theme.primary
24
- }),
25
- activeIcon: /*#__PURE__*/_jsx(Ionicons, {
26
- name: "briefcase-outline",
27
- size: 30,
28
- color: theme.onPrimary
29
- }),
30
- title: "Aqua Guardian",
31
- description: "Maintain water usage below the community average for a month.",
32
- isActive: false,
33
- status: "0/1",
34
- statusBackgroundColor: "#FFCDD2",
35
- statusTextColor: "#D32F2F"
36
- }, {
37
- icon: /*#__PURE__*/_jsx(Ionicons, {
38
- name: "heart-outline",
39
- size: 30,
40
- color: theme.primary
41
- }),
42
- activeIcon: /*#__PURE__*/_jsx(Ionicons, {
43
- name: "heart-outline",
44
- size: 30,
45
- color: theme.onPrimary
46
- }),
47
- title: "Wellness Warrior",
48
- description: "Complete 30 days of healthy hydration tracking.",
49
- isActive: true,
50
- status: "15/30",
51
- statusBackgroundColor: "#C8E6C9",
52
- statusTextColor: "#388E3C"
53
- }, {
54
- icon: /*#__PURE__*/_jsx(Ionicons, {
55
- name: "airplane-outline",
56
- size: 24,
57
- color: theme.helper
58
- }),
59
- activeIcon: /*#__PURE__*/_jsx(Ionicons, {
60
- name: "airplane-outline",
61
- size: 24,
62
- color: theme.primary
63
- }),
64
- title: "Eco Traveler",
65
- description: "Log 5 trips where you chose sustainable travel options.",
66
- isActive: false,
67
- status: "2/5",
68
- statusBackgroundColor: theme.disabled,
69
- statusTextColor: theme.text
70
- }, {
71
- icon: /*#__PURE__*/_jsx(Ionicons, {
72
- name: "school-outline",
73
- size: 24,
74
- color: theme.helper
75
- }),
76
- activeIcon: /*#__PURE__*/_jsx(Ionicons, {
77
- name: "school-outline",
78
- size: 24,
79
- color: theme.primary
80
- }),
81
- title: "Knowledge Seeker",
82
- description: "Complete all water conservation learning modules.",
83
- isActive: false,
84
- status: "3/5",
85
- statusBackgroundColor: theme.disabled,
86
- statusTextColor: theme.text
87
- }, {
88
- icon: /*#__PURE__*/_jsx(Ionicons, {
89
- name: "settings-outline",
90
- size: 24,
91
- color: theme.helper
92
- }),
93
- activeIcon: /*#__PURE__*/_jsx(Ionicons, {
94
- name: "settings-outline",
95
- size: 24,
96
- color: theme.primary
97
- }),
98
- title: "Smart Saver",
99
- description: "Set up and use all water-saving features in the app.",
100
- isActive: true,
101
- status: "4/4",
102
- statusBackgroundColor: theme.primary,
103
- statusTextColor: theme.background
104
- }];
105
- return /*#__PURE__*/_jsx(_Fragment, {
106
- children: /*#__PURE__*/_jsx(GestureHandlerRootView, {
107
- children: /*#__PURE__*/_jsx(Popup, {
108
- visible: true,
109
- onClose: () => {},
110
- children: /*#__PURE__*/_jsx(ScratchCard, {
111
- backgroundColor: "#8A2BE2",
112
- text: "Scratch to reveal your prize!",
113
- textFontColor: "#FFFFFF",
114
- textFontSize: 18,
115
- textFont: require("@/assets/fonts/SpaceMono-Regular.ttf"),
116
- width: 300,
117
- height: 150,
118
- gradient: {
119
- colors: ["#ff0000", "#00ff00", "#0000ff"],
120
- start: {
121
- x: 0,
122
- y: 0
123
- },
124
- end: {
125
- x: 300,
126
- y: 300
127
- }
128
- },
129
- onScratched: () => alert("Congratulations! You won a prize!"),
130
- children: /*#__PURE__*/_jsxs(ScratchCardContent, {
131
- style: {
132
- backgroundColor: "#FFD700"
133
- },
134
- children: [/*#__PURE__*/_jsx(Text, {
135
- style: {
136
- fontSize: 24,
137
- fontWeight: "bold",
138
- color: "#000"
139
- },
140
- children: "50% OFF COUPON"
141
- }), /*#__PURE__*/_jsx(Text, {
142
- style: {
143
- marginTop: 8,
144
- color: "#333"
145
- },
146
- children: "Use code: SCRATCH50"
147
- })]
148
- })
149
- })
150
- })
151
- })
152
- });
153
- };
154
- export default MyScreen;
52
+ // <View style={styles.formatSelector}>
53
+ // <Text>Format: {barcodeFormat}</Text>
54
+ // <Button title="Cycle Format" onPress={cycleFormat} />
55
+ // </View>
56
+
57
+ // {errorMsg && <Text style={styles.errorTextDisplay}>{errorMsg}</Text>}
58
+
59
+ // <Text style={styles.label}>Default:</Text>
60
+ // <Barcode
61
+ // value={barcodeValue}
62
+ // format={barcodeFormat}
63
+ // onError={handleBarcodeError}
64
+ // />
65
+
66
+ // <Text style={styles.label}>Customized (CODE128):</Text>
67
+ // <Barcode
68
+ // value="CUSTOM-CODE-128"
69
+ // format={BarcodeFormat.CODE128}
70
+ // lineColor="blue"
71
+ // backgroundColor="#e0e0ff"
72
+ // height={80}
73
+ // width={1.5} // Bar width
74
+ // fontSize={16}
75
+ // textMargin={5}
76
+ // margin={20} // Margin around the SVG
77
+ // onError={handleBarcodeError}
78
+ // style={styles.customBarcodeStyle}
79
+ // />
80
+
81
+ // <Text style={styles.label}>No Text Value (EAN13):</Text>
82
+ // <Barcode
83
+ // value="590123412345" // Needs valid check digit for EAN13
84
+ // format={BarcodeFormat.EAN13}
85
+ // displayValue={false}
86
+ // onError={handleBarcodeError}
87
+ // />
88
+
89
+ // <Text style={styles.label}>Invalid Value Example (for EAN13):</Text>
90
+ // <Barcode
91
+ // value="INVALID" // This will likely cause an error for EAN13
92
+ // format={BarcodeFormat.EAN13}
93
+ // onError={handleBarcodeError}
94
+ // />
95
+ // <Text style={styles.label}>Empty Value:</Text>
96
+ // <Barcode
97
+ // value=""
98
+ // format={BarcodeFormat.CODE128}
99
+ // onError={handleBarcodeError}
100
+ // />
101
+ // </ScrollView>
102
+ // </SafeAreaView>
103
+ // );
104
+ // }
105
+
106
+ // const styles = StyleSheet.create({
107
+ // container: {
108
+ // flex: 1,
109
+ // backgroundColor: "#f0f0f0",
110
+ // },
111
+ // scrollContent: {
112
+ // alignItems: "center",
113
+ // padding: 20,
114
+ // },
115
+ // title: {
116
+ // fontSize: 24,
117
+ // fontWeight: "bold",
118
+ // marginBottom: 20,
119
+ // },
120
+ // input: {
121
+ // height: 40,
122
+ // borderColor: "gray",
123
+ // borderWidth: 1,
124
+ // paddingHorizontal: 10,
125
+ // marginBottom: 20,
126
+ // width: "90%",
127
+ // backgroundColor: "white",
128
+ // },
129
+ // label: {
130
+ // fontSize: 16,
131
+ // fontWeight: "600",
132
+ // marginTop: 20,
133
+ // marginBottom: 8,
134
+ // },
135
+ // customBarcodeStyle: {
136
+ // borderWidth: 1,
137
+ // borderColor: "purple",
138
+ // padding: 5, // Padding for the View container, not the barcode margin
139
+ // },
140
+ // formatSelector: {
141
+ // flexDirection: "row",
142
+ // alignItems: "center",
143
+ // justifyContent: "space-between",
144
+ // width: "90%",
145
+ // marginBottom: 15,
146
+ // },
147
+ // errorTextDisplay: {
148
+ // color: 'red',
149
+ // marginVertical: 10,
150
+ // }
151
+ // });
152
+ "use strict";
155
153
  //# sourceMappingURL=app.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","useState","Text","Popup","ScratchCard","ScratchCardContent","Ionicons","useTheme","GestureHandlerRootView","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","MyScreen","isFilterVisible","setIsFilterVisible","theme","handleApplyFilters","result","console","log","rewardsData","icon","name","size","color","primary","activeIcon","onPrimary","title","description","isActive","status","statusBackgroundColor","statusTextColor","helper","disabled","text","background","children","visible","onClose","backgroundColor","textFontColor","textFontSize","textFont","require","width","height","gradient","colors","start","x","y","end","onScratched","alert","style","fontSize","fontWeight","marginTop"],"sourceRoot":"..\\..\\src","sources":["app.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAAuBC,IAAI,QAAQ,cAAc;AACjD,SAGEC,KAAK,EACLC,WAAW,EACXC,kBAAkB,QAEb,uBAAc;AAErB,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,QAAQ,QAAQ,kBAAS;AAElC,SAASC,sBAAsB,QAAQ,8BAA8B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAEtE,MAAMC,QAAQ,GAAGA,CAAA,KAAM;EACrB,MAAM,CAACC,eAAe,EAAEC,kBAAkB,CAAC,GAAGhB,QAAQ,CAAC,KAAK,CAAC;EAE7D,MAAM;IAAEiB;EAAM,CAAC,GAAGX,QAAQ,CAAC,CAAC;EAE5B,MAAMY,kBAAkB,GAAIC,MAAoB,IAAK;IACnDC,OAAO,CAACC,GAAG,CAAC,kBAAkB,EAAEF,MAAM,CAAC;IACvC;EACF,CAAC;EAED,MAA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ACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA","ignoreList":[]}
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
 
3
3
  import React from "react";
4
- import { StyleSheet, Text, TouchableOpacity, View } from "react-native";
4
+ import { StyleSheet, Text, View } from "react-native";
5
5
  import { Card, CardFooter } from "../Card/index.js";
6
6
  import { useTheme } from "../../theme/index.js";
7
+ import { TouchableOpacity } from "react-native-gesture-handler";
7
8
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
9
  /**
9
10
  * A customizable banner component with background image and action button
@@ -1 +1 @@
1
- {"version":3,"names":["React","StyleSheet","Text","TouchableOpacity","View","Card","CardFooter","useTheme","jsx","_jsx","jsxs","_jsxs","Banner","backgroundImage","buttonText","onButtonPress","onBannerPress","containerStyle","backgroundImageStyle","contentContainerStyle","buttonStyle","buttonTextStyle","height","customButton","contentAlignment","icon","iconPosition","iconStyle","iconSpacing","theme","handlePress","undefined","renderButton","style","styles","button","borderColor","primary","onPress","accessibilityRole","accessibilityLabel","children","buttonContent","flexDirection","iconContainer","marginRight","marginLeft","accessible","importantForAccessibility","color","source","resizeMode","imageStyle","justifyContent","footer","footerTop","footerCenter","footerBottom","create","position","left","right","top","transform","translateY","bottom","backgroundColor","paddingHorizontal","paddingVertical","borderRadius","borderWidth","alignItems","fontSize","fontWeight","letterSpacing"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/Banner/Banner.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,UAAU,EACVC,IAAI,EACJC,gBAAgB,EAKhBC,IAAI,QAEC,cAAc;AACrB,SAASC,IAAI,EAAEC,UAAU,QAAQ,kBAAS;AAC1C,SAASC,QAAQ,QAAmB,sBAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAuBlD;AACA;AACA;AACA,MAAMC,MAA6B,GAAGA,CAAC;EACrCC,eAAe;EACfC,UAAU,GAAG,QAAQ;EACrBC,aAAa;EACbC,aAAa;EACbC,cAAc;EACdC,oBAAoB;EACpBC,qBAAqB;EACrBC,WAAW;EACXC,eAAe;EACfC,MAAM,GAAG,GAAG;EACZC,YAAY;EACZC,gBAAgB,GAAG,QAAQ;EAE3B;EACAC,IAAI;EACJC,YAAY,GAAG,MAAM;EACrBC,SAAS;EACTC,WAAW,GAAG;AAChB,CAAC,KAAK;EACJ,MAAM;IAACC;EAAK,CAAC,GAAGtB,QAAQ,CAAC,CAAC;EAC1B;EACA,MAAMuB,WAAW,GAAGd,aAAa,GAAGA,aAAa,GAAGe,SAAS;;EAE7D;EACA,MAAMC,YAAY,GAAGA,CAAA,KAAM;IACzB,IAAIT,YAAY,EAAE;MAChB,OAAOA,YAAY;IACrB;IAEA,IAAI,CAACT,UAAU,EAAE;MACf,OAAO,IAAI;IACb;IAEA,oBACEL,IAAA,CAACN,gBAAgB;MACf8B,KAAK,EAAE,CAACC,MAAM,CAACC,MAAM,EAAE;QAACC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EACb9B,gBAAgB,KAAK,KAAK,GAAGU,MAAM,CAACqB,SAAS,GAC7C/B,gBAAgB,KAAK,QAAQ,GAAGU,MAAM,CAACsB,YAAY,GACnDtB,MAAM,CAACuB,YAAY,EACnBtC,qBAAqB,CACrB;MAAAsB,QAAA,EAEDT,YAAY,CAAC;IAAC,CACL;EAAC,CACT,CAAC;AAEX,CAAC;AAED,MAAME,MAAM,GAAGjC,UAAU,CAACyD,MAAM,CAAC;EAC/BJ,MAAM,EAAE;IACNK,QAAQ,EAAE,UAAU;IACpBC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE;EACT,CAAC;EACDN,SAAS,EAAE;IACTO,GAAG,EAAE;EACP,CAAC;EACDN,YAAY,EAAE;IACZM,GAAG,EAAE,KAAK;IACVC,SAAS,EAAE,CAAC;MAAEC,UAAU,EAAE,CAAC;IAAG,CAAC,CAAC,CAAE;EACpC,CAAC;EACDP,YAAY,EAAE;IACZQ,MAAM,EAAE;EACV,CAAC;EACD9B,MAAM,EAAE;IACN+B,eAAe,EAAE,aAAa;IAC9BC,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE,CAAC;IAClBC,YAAY,EAAE,CAAC;IACfC,WAAW,EAAE,CAAC;IACdlC,WAAW,EAAE;EACf,CAAC;EACDM,aAAa,EAAE;IACbC,aAAa,EAAE,KAAK;IACpB4B,UAAU,EAAE,QAAQ;IACpBlB,cAAc,EAAE;EAClB,CAAC;EACDT,aAAa,EAAE;IACb2B,UAAU,EAAE,QAAQ;IACpBlB,cAAc,EAAE;EAClB,CAAC;EACDvC,UAAU,EAAE;IACVmC,KAAK,EAAE,SAAS;IAChBuB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC;AAEF,eAAe9D,MAAM","ignoreList":[]}
1
+ {"version":3,"names":["React","StyleSheet","Text","View","Card","CardFooter","useTheme","TouchableOpacity","jsx","_jsx","jsxs","_jsxs","Banner","backgroundImage","buttonText","onButtonPress","onBannerPress","containerStyle","backgroundImageStyle","contentContainerStyle","buttonStyle","buttonTextStyle","height","customButton","contentAlignment","icon","iconPosition","iconStyle","iconSpacing","theme","handlePress","undefined","renderButton","style","styles","button","borderColor","primary","onPress","accessibilityRole","accessibilityLabel","children","buttonContent","flexDirection","iconContainer","marginRight","marginLeft","accessible","importantForAccessibility","color","source","resizeMode","imageStyle","justifyContent","footer","footerTop","footerCenter","footerBottom","create","position","left","right","top","transform","translateY","bottom","backgroundColor","paddingHorizontal","paddingVertical","borderRadius","borderWidth","alignItems","fontSize","fontWeight","letterSpacing"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/Banner/Banner.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,UAAU,EACVC,IAAI,EAKJC,IAAI,QAEC,cAAc;AACrB,SAASC,IAAI,EAAEC,UAAU,QAAQ,kBAAS;AAC1C,SAASC,QAAQ,QAAmB,sBAAa;AACjD,SAASC,gBAAgB,QAAQ,8BAA8B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAuBhE;AACA;AACA;AACA,MAAMC,MAA6B,GAAGA,CAAC;EACrCC,eAAe;EACfC,UAAU,GAAG,QAAQ;EACrBC,aAAa;EACbC,aAAa;EACbC,cAAc;EACdC,oBAAoB;EACpBC,qBAAqB;EACrBC,WAAW;EACXC,eAAe;EACfC,MAAM,GAAG,GAAG;EACZC,YAAY;EACZC,gBAAgB,GAAG,QAAQ;EAE3B;EACAC,IAAI;EACJC,YAAY,GAAG,MAAM;EACrBC,SAAS;EACTC,WAAW,GAAG;AAChB,CAAC,KAAK;EACJ,MAAM;IAACC;EAAK,CAAC,GAAGvB,QAAQ,CAAC,CAAC;EAC1B;EACA,MAAMwB,WAAW,GAAGd,aAAa,GAAGA,aAAa,GAAGe,SAAS;;EAE7D;EACA,MAAMC,YAAY,GAAGA,CAAA,KAAM;IACzB,IAAIT,YAAY,E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;IACjBC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC;AAEF,eAAe9D,MAAM","ignoreList":[]}
@@ -1,4 +1 @@
1
- import React from "react";
2
- declare const MyScreen: () => React.JSX.Element;
3
- export default MyScreen;
4
1
  //# sourceMappingURL=app.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/app.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAgBxC,QAAA,MAAM,QAAQ,yBA4Gb,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/app.tsx"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../../../src/components/Banner/Banner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAIL,SAAS,EACT,SAAS,EACT,mBAAmB,EACnB,cAAc,EAEd,UAAU,EACX,MAAM,cAAc,CAAC;AAItB,MAAM,WAAW,WAAW;IAC1B,eAAe,EAAE,mBAAmB,CAAC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,oBAAoB,CAAC,EAAE,UAAU,CAAC;IAClC,qBAAqB,CAAC,EAAE,SAAS,CAAC;IAClC,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,gBAAgB,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAG/C,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CA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,CAAC;AA2CF,eAAe,MAAM,CAAC"}
@@ -1,4 +1 @@
1
- import React from "react";
2
- declare const MyScreen: () => React.JSX.Element;
3
- export default MyScreen;
4
1
  //# sourceMappingURL=app.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/app.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAgBxC,QAAA,MAAM,QAAQ,yBA4Gb,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/app.tsx"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../../../src/components/Banner/Banner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAIL,SAAS,EACT,SAAS,EACT,mBAAmB,EACnB,cAAc,EAEd,UAAU,EACX,MAAM,cAAc,CAAC;AAItB,MAAM,WAAW,WAAW;IAC1B,eAAe,EAAE,mBAAmB,CAAC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,oBAAoB,CAAC,EAAE,UAAU,CAAC;IAClC,qBAAqB,CAAC,EAAE,SAAS,CAAC;IAClC,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,gBAAgB,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAG/C,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA0FjC,CAAC;AA2CF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../../../src/components/Banner/Banner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAGL,SAAS,EACT,SAAS,EACT,mBAAmB,EACnB,cAAc,EAEd,UAAU,EACX,MAAM,cAAc,CAAC;AAKtB,MAAM,WAAW,WAAW;IAC1B,eAAe,EAAE,mBAAmB,CAAC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,oBAAoB,CAAC,EAAE,UAAU,CAAC;IAClC,qBAAqB,CAAC,EAAE,SAAS,CAAC;IAClC,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,gBAAgB,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAG/C,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA0FjC,CAAC;AA2CF,eAAe,MAAM,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "related-ui-components",
3
3
  "main": "./src/index.ts",
4
- "version": "1.9.1",
4
+ "version": "1.9.2",
5
5
  "scripts": {
6
6
  "start": "expo start",
7
7
  "reset-project": "node ./scripts/reset-project.js",
@@ -29,7 +29,9 @@
29
29
  "@shopify/react-native-skia": "1.5.0",
30
30
  "date-fns": "^4.1.0",
31
31
  "expo": "~52.0.46",
32
+ "expo-barcode-generator": "^4.0.0",
32
33
  "expo-checkbox": "^4.0.1",
34
+ "expo-clipboard": "~7.0.1",
33
35
  "expo-constants": "~17.0.7",
34
36
  "expo-font": "~13.0.4",
35
37
  "expo-linear-gradient": "~14.0.2",
@@ -48,8 +50,7 @@
48
50
  "react-native-screens": "~4.4.0",
49
51
  "react-native-svg": "15.8.0",
50
52
  "react-native-web": "~0.19.13",
51
- "react-native-webview": "13.12.5",
52
- "expo-clipboard": "~7.0.1"
53
+ "react-native-webview": "13.12.5"
53
54
  },
54
55
  "devDependencies": {
55
56
  "@babel/core": "^7.25.2",
@@ -58,8 +59,10 @@
58
59
  "@react-native-community/datetimepicker": "8.2.0",
59
60
  "@react-native-community/slider": "4.5.5",
60
61
  "@types/jest": "^29.5.12",
62
+ "@types/jsbarcode": "^3.11.4",
61
63
  "@types/react": "~18.3.12",
62
64
  "@types/react-test-renderer": "^18.3.0",
65
+ "@types/xmldom": "^0.1.34",
63
66
  "babel-loader": "^8.4.1",
64
67
  "jest": "^29.2.1",
65
68
  "jest-expo": "~52.0.4",
package/src/app.tsx CHANGED
@@ -1,127 +1,151 @@
1
- import React, { useState } from "react";
2
- import { View, Button, Text } from "react-native";
3
- import {
4
- FilterResult,
5
- Filters,
6
- Popup,
7
- ScratchCard,
8
- ScratchCardContent,
9
- UnlockRewards,
10
- } from "./components";
11
- import BRANDS from "./constants/BRANDS";
12
- import { Ionicons } from "@expo/vector-icons";
13
- import { useTheme } from "./theme";
14
- import RedeemedVoucherSheet from "./components/RedeemedVoucher/RedeemedVoucherSheet";
15
- import { GestureHandlerRootView } from "react-native-gesture-handler";
1
+ // // App.tsx or any other screen component
2
+ // import React, { useState } from "react";
3
+ // import {
4
+ // SafeAreaView,
5
+ // StyleSheet,
6
+ // TextInput,
7
+ // View,
8
+ // Text,
9
+ // ScrollView,
10
+ // Button,
11
+ // } from "react-native";
12
+ // import Barcode, { BarcodeFormat } from "./components/Barcode/Barcode";
16
13
 
17
- const MyScreen = () => {
18
- const [isFilterVisible, setIsFilterVisible] = useState(false);
14
+ // export default function App() {
15
+ // const [barcodeValue, setBarcodeValue] = useState("123456789012");
16
+ // const [barcodeFormat, setBarcodeFormat] = useState<BarcodeFormat>(
17
+ // BarcodeFormat.EAN13,
18
+ // );
19
+ // const [errorMsg, setErrorMsg] = useState<string | null>(null);
19
20
 
20
- const { theme } = useTheme();
21
+ // const handleBarcodeError = (error: Error) => {
22
+ // console.error("Custom Barcode Error:", error.message);
23
+ // setErrorMsg(`Barcode Error: ${error.message}`);
24
+ // };
21
25
 
22
- const handleApplyFilters = (result: FilterResult) => {
23
- console.log("Filters applied:", result);
24
- // Process filter results...
25
- };
26
+ // const cycleFormat = () => {
27
+ // const formats = Object.values(BarcodeFormat);
28
+ // const currentIndex = formats.indexOf(barcodeFormat);
29
+ // const nextIndex = (currentIndex + 1) % formats.length;
30
+ // setBarcodeFormat(formats[nextIndex]);
31
+ // // Adjust value for specific formats if needed
32
+ // if (formats[nextIndex] === BarcodeFormat.EAN13) setBarcodeValue("978020137962"); // Valid EAN13
33
+ // else if (formats[nextIndex] === BarcodeFormat.UPC) setBarcodeValue("012345678905"); // Valid UPC
34
+ // else if (formats[nextIndex] === BarcodeFormat.CODE39) setBarcodeValue("HELLO-WORLD");
35
+ // else setBarcodeValue("TEST12345");
26
36
 
27
- const rewardsData = [
28
- {
29
- icon: (
30
- <Ionicons name="briefcase-outline" size={30} color={theme.primary} />
31
- ),
32
- activeIcon: (
33
- <Ionicons name="briefcase-outline" size={30} color={theme.onPrimary} />
34
- ),
35
- title: "Aqua Guardian",
36
- description:
37
- "Maintain water usage below the community average for a month.",
38
- isActive: false,
39
- status: "0/1",
40
- statusBackgroundColor: "#FFCDD2",
41
- statusTextColor: "#D32F2F",
42
- },
43
- {
44
- icon: <Ionicons name="heart-outline" size={30} color={theme.primary} />,
45
- activeIcon: (
46
- <Ionicons name="heart-outline" size={30} color={theme.onPrimary} />
47
- ),
48
- title: "Wellness Warrior",
49
- description: "Complete 30 days of healthy hydration tracking.",
50
- isActive: true,
51
- status: "15/30",
52
- statusBackgroundColor: "#C8E6C9",
53
- statusTextColor: "#388E3C",
54
- },
55
- {
56
- icon: <Ionicons name="airplane-outline" size={24} color={theme.helper} />,
57
- activeIcon: (
58
- <Ionicons name="airplane-outline" size={24} color={theme.primary} />
59
- ),
60
- title: "Eco Traveler",
61
- description: "Log 5 trips where you chose sustainable travel options.",
62
- isActive: false,
63
- status: "2/5",
64
- statusBackgroundColor: theme.disabled,
65
- statusTextColor: theme.text,
66
- },
67
- {
68
- icon: <Ionicons name="school-outline" size={24} color={theme.helper} />,
69
- activeIcon: (
70
- <Ionicons name="school-outline" size={24} color={theme.primary} />
71
- ),
72
- title: "Knowledge Seeker",
73
- description: "Complete all water conservation learning modules.",
74
- isActive: false,
75
- status: "3/5",
76
- statusBackgroundColor: theme.disabled,
77
- statusTextColor: theme.text,
78
- },
79
- {
80
- icon: <Ionicons name="settings-outline" size={24} color={theme.helper} />,
81
- activeIcon: (
82
- <Ionicons name="settings-outline" size={24} color={theme.primary} />
83
- ),
84
- title: "Smart Saver",
85
- description: "Set up and use all water-saving features in the app.",
86
- isActive: true,
87
- status: "4/4",
88
- statusBackgroundColor: theme.primary,
89
- statusTextColor: theme.background,
90
- },
91
- ];
37
+ // };
92
38
 
93
- return (
94
- <>
95
- <GestureHandlerRootView>
96
- <Popup visible={true} onClose={()=>{}}>
97
- <ScratchCard
98
- backgroundColor="#8A2BE2"
99
- text="Scratch to reveal your prize!"
100
- textFontColor="#FFFFFF"
101
- textFontSize={18}
102
- textFont={require("@/assets/fonts/SpaceMono-Regular.ttf")}
103
- width={300}
104
- height={150}
105
- gradient={{
106
- colors: ["#ff0000", "#00ff00", "#0000ff"],
107
- start: { x: 0, y: 0 },
108
- end: { x: 300, y: 300 },
109
- }}
110
- onScratched={() => alert("Congratulations! You won a prize!")}
111
- >
112
- <ScratchCardContent style={{ backgroundColor: "#FFD700" }}>
113
- <Text style={{ fontSize: 24, fontWeight: "bold", color: "#000" }}>
114
- 50% OFF COUPON
115
- </Text>
116
- <Text style={{ marginTop: 8, color: "#333" }}>
117
- Use code: SCRATCH50
118
- </Text>
119
- </ScratchCardContent>
120
- </ScratchCard>
121
- </Popup>
122
- </GestureHandlerRootView>
123
- </>
124
- );
125
- };
39
+ // return (
40
+ // <SafeAreaView style={styles.container}>
41
+ // <ScrollView contentContainerStyle={styles.scrollContent}>
42
+ // <Text style={styles.title}>Custom Barcode Generator</Text>
126
43
 
127
- export default MyScreen;
44
+ // <TextInput
45
+ // style={styles.input}
46
+ // placeholder="Enter barcode value"
47
+ // value={barcodeValue}
48
+ // onChangeText={setBarcodeValue}
49
+ // autoCapitalize="characters" // Good for some formats like CODE39
50
+ // />
51
+
52
+ // <View style={styles.formatSelector}>
53
+ // <Text>Format: {barcodeFormat}</Text>
54
+ // <Button title="Cycle Format" onPress={cycleFormat} />
55
+ // </View>
56
+
57
+ // {errorMsg && <Text style={styles.errorTextDisplay}>{errorMsg}</Text>}
58
+
59
+ // <Text style={styles.label}>Default:</Text>
60
+ // <Barcode
61
+ // value={barcodeValue}
62
+ // format={barcodeFormat}
63
+ // onError={handleBarcodeError}
64
+ // />
65
+
66
+ // <Text style={styles.label}>Customized (CODE128):</Text>
67
+ // <Barcode
68
+ // value="CUSTOM-CODE-128"
69
+ // format={BarcodeFormat.CODE128}
70
+ // lineColor="blue"
71
+ // backgroundColor="#e0e0ff"
72
+ // height={80}
73
+ // width={1.5} // Bar width
74
+ // fontSize={16}
75
+ // textMargin={5}
76
+ // margin={20} // Margin around the SVG
77
+ // onError={handleBarcodeError}
78
+ // style={styles.customBarcodeStyle}
79
+ // />
80
+
81
+ // <Text style={styles.label}>No Text Value (EAN13):</Text>
82
+ // <Barcode
83
+ // value="590123412345" // Needs valid check digit for EAN13
84
+ // format={BarcodeFormat.EAN13}
85
+ // displayValue={false}
86
+ // onError={handleBarcodeError}
87
+ // />
88
+
89
+ // <Text style={styles.label}>Invalid Value Example (for EAN13):</Text>
90
+ // <Barcode
91
+ // value="INVALID" // This will likely cause an error for EAN13
92
+ // format={BarcodeFormat.EAN13}
93
+ // onError={handleBarcodeError}
94
+ // />
95
+ // <Text style={styles.label}>Empty Value:</Text>
96
+ // <Barcode
97
+ // value=""
98
+ // format={BarcodeFormat.CODE128}
99
+ // onError={handleBarcodeError}
100
+ // />
101
+ // </ScrollView>
102
+ // </SafeAreaView>
103
+ // );
104
+ // }
105
+
106
+ // const styles = StyleSheet.create({
107
+ // container: {
108
+ // flex: 1,
109
+ // backgroundColor: "#f0f0f0",
110
+ // },
111
+ // scrollContent: {
112
+ // alignItems: "center",
113
+ // padding: 20,
114
+ // },
115
+ // title: {
116
+ // fontSize: 24,
117
+ // fontWeight: "bold",
118
+ // marginBottom: 20,
119
+ // },
120
+ // input: {
121
+ // height: 40,
122
+ // borderColor: "gray",
123
+ // borderWidth: 1,
124
+ // paddingHorizontal: 10,
125
+ // marginBottom: 20,
126
+ // width: "90%",
127
+ // backgroundColor: "white",
128
+ // },
129
+ // label: {
130
+ // fontSize: 16,
131
+ // fontWeight: "600",
132
+ // marginTop: 20,
133
+ // marginBottom: 8,
134
+ // },
135
+ // customBarcodeStyle: {
136
+ // borderWidth: 1,
137
+ // borderColor: "purple",
138
+ // padding: 5, // Padding for the View container, not the barcode margin
139
+ // },
140
+ // formatSelector: {
141
+ // flexDirection: "row",
142
+ // alignItems: "center",
143
+ // justifyContent: "space-between",
144
+ // width: "90%",
145
+ // marginBottom: 15,
146
+ // },
147
+ // errorTextDisplay: {
148
+ // color: 'red',
149
+ // marginVertical: 10,
150
+ // }
151
+ // });
@@ -2,7 +2,6 @@ import React from "react";
2
2
  import {
3
3
  StyleSheet,
4
4
  Text,
5
- TouchableOpacity,
6
5
  ViewStyle,
7
6
  TextStyle,
8
7
  ImageSourcePropType,
@@ -12,6 +11,7 @@ import {
12
11
  } from "react-native";
13
12
  import { Card, CardFooter } from "../Card";
14
13
  import { useTheme, ThemeType } from "../../theme";
14
+ import { TouchableOpacity } from "react-native-gesture-handler";
15
15
 
16
16
  export interface BannerProps {
17
17
  backgroundImage: ImageSourcePropType;