react-native-nepali-picker 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
 
3
- import { View, StyleSheet } from 'react-native';
4
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
+ import { View, StyleSheet } from 'react-native';
5
5
  const Triangle = ({
6
6
  width = 10,
7
7
  height = 20,
8
8
  color = 'black'
9
9
  }) => {
10
- return /*#__PURE__*/_jsx(View, {
10
+ return _jsx(View, {
11
11
  style: [styles.triangle, {
12
12
  borderLeftWidth: width / 2,
13
13
  borderRightWidth: width / 2,
@@ -30,4 +30,4 @@ const styles = StyleSheet.create({
30
30
  }
31
31
  });
32
32
  export default Triangle;
33
- //# sourceMappingURL=Triangle.js.map
33
+ //# sourceMappingURL=Triangle.js.mapiangle.js.map
@@ -1 +1,2 @@
1
1
  {"version":3,"names":["View","StyleSheet","jsx","_jsx","Triangle","width","height","color","style","styles","triangle","borderLeftWidth","borderRightWidth","borderBottomWidth","borderBottomColor","create","transform","rotate","backgroundColor","borderStyle","borderLeftColor","borderRightColor"],"sourceRoot":"../../../src","sources":["assets/Triangle.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEhD,MAAMC,QAAQ,GAAGA,CAAC;EAAEC,KAAK,GAAG,EAAE;EAAEC,MAAM,GAAG,EAAE;EAAEC,KAAK,GAAG;AAAQ,CAAC,KAAK;EACjE,oBACEJ,IAAA,CAACH,IAAI;IACHQ,KAAK,EAAE,CACLC,MAAM,CAACC,QAAQ,EACf;MACEC,eAAe,EAAEN,KAAK,GAAG,CAAC;MAC1BO,gBAAgB,EAAEP,KAAK,GAAG,CAAC;MAC3BQ,iBAAiB,EAAEP,MAAM;MACzBQ,iBAAiB,EAAEP;IACrB,CAAC;EACD,CACH,CAAC;AAEN,CAAC;AAED,MAAME,MAAM,GAAGR,UAAU,CAACc,MAAM,CAAC;EAC/BL,QAAQ,EAAE;IACRL,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTU,SAAS,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAS,CAAC,CAAC;IACjCC,eAAe,EAAE,aAAa;IAC9BC,WAAW,EAAE,OAAO;IACpBC,eAAe,EAAE,aAAa;IAC9BC,gBAAgB,EAAE;EACpB;AACF,CAAC,CAAC;AAEF,eAAejB,QAAQ","ignoreList":[]}
2
+ "ignoreList":[]}
@@ -1 +1,2 @@
1
1
  {"version":3,"names":["View","StyleSheet","jsx","_jsx","jsxs","_jsxs","PencilIcon","height","width","style","styles","container","children","borderTopStartRadius","borderTopEndRadius","borderWidth","top","left","borderLeftWidth","borderRightWidth","borderBottomWidth","borderStyle","backgroundColor","borderLeftColor","borderRightColor","borderBottomColor","borderTopWidth","create","transform","rotate","alignItems","marginHorizontal","justifyContent"],"sourceRoot":"../../../src","sources":["assets/cIcon.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEhD,MAAMC,UAAU,GAAGA,CAAC;EAAEC,MAAM,GAAG,EAAE;EAAEC,KAAK,GAAG;AAAG,CAAC,KAAK;EAClD,oBACEH,KAAA,CAACL,IAAI;IAACS,KAAK,EAAE;MAAE,GAAGC,MAAM,CAACC,SAAS;MAAEJ,MAAM,EAAEA,MAAM;MAAEC,KAAK,EAAEA;IAAM,CAAE;IAAAI,QAAA,gBAEjET,IAAA,CAACH,IAAI;MACHS,KAAK,EAAE;QACLF,MAAM,EAAE,KAAK;QACbC,KAAK,EAAE,MAAM;QACbK,oBAAoB,EAAE,CAAC;QACvBC,kBAAkB,EAAE,CAAC;QACrBC,WAAW,EAAE;MACf,CAAE;MAAAH,QAAA,eAEFT,IAAA,CAACH,IAAI;QACHS,KAAK,EAAE;UACLO,GAAG,EAAE,KAAK;UACVR,KAAK,EAAE,MAAM;UACbO,WAAW,EAAE;QACf;MAAE,CACH;IAAC,CACE,CAAC,eAGPZ,IAAA,CAACH,IAAI;MACHS,KAAK,EAAE;QACLF,MAAM,EAAE,KAAK;QACbC,KAAK,EAAE,MAAM;QACbO,WAAW,EAAE;MACf,CAAE;MAAAH,QAAA,eAEFT,IAAA,CAACH,IAAI;QACHS,KAAK,EAAE;UACLQ,IAAI,EAAE,KAAK;UACXV,MAAM,EAAE,MAAM;UACdC,KAAK,EAAE,CAAC;UACRO,WAAW,EAAE;QACf;MAAE,CACH;IAAC,CACE,CAAC,eAKPZ,IAAA,CAACH,IAAI;MACHS,KAAK,EAAE;QACLD,KAAK,EAAE,CAAC;QACRD,MAAM,EAAE,CAAC;QACTW,eAAe,EAAE,CAAC;QAClBC,gBAAgB,EAAE,CAAC;QACnBC,iBAAiB,EAAE,CAAC;QACpBC,WAAW,EAAE,OAAO;QACpBC,eAAe,EAAE,aAAa;QAC9BC,eAAe,EAAE,aAAa;QAC9BC,gBAAgB,EAAE,aAAa;QAC/BC,iBAAiB,EAAE,aAAa;QAChCC,cAAc,EAAE;MAClB;IAAE,CACH,CAAC;EAAA,CACE,CAAC;AAEX,CAAC;AAED,MAAMhB,MAAM,GAAGT,UAAU,CAAC0B,MAAM,CAAC;EAC/BhB,SAAS,EAAE;IACTiB,SAAS,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAQ,CAAC,CAAC;IAChCC,UAAU,EAAE,QAAQ;IACpBC,gBAAgB,EAAE,MAAM;IACxBC,cAAc,EAAE;EAClB;AACF,CAAC,CAAC;AAEF,eAAe1B,UAAU","ignoreList":[]}
2
+ CpB;AACJ,CAAC,CAAC;AACF,eAAe1B,UAAU","ignoreList":[]}
@@ -32,14 +32,12 @@ const AdToBs = UserDate => {
32
32
  console.log('The minimum possible date you can enter is 2024-04-13 i.e 2081-01-01');
33
33
  return 'The minimum possible date you can enter is 2024-04-13 i.e 2081-01-01';
34
34
  }
35
-
36
35
  // number of days from that reference date
37
36
  const DateDifference = FindDateDifference(ReferenceDate, UserTimeDate);
38
37
  let nepaliYear = 2000;
39
38
  let nepaliMonth = 1;
40
39
  let nepaliDay = 1;
41
40
  //difference can calculate upto previous day so add 1 to get current day(Today)
42
-
43
41
  let DD = DateDifference + 1;
44
42
  outerLoop: for (let year = 2000; year < 2100; year++) {
45
43
  for (let month = 1; month <= 12; month++) {
@@ -117,4 +115,4 @@ const BsToAd = userDate => {
117
115
  }
118
116
  };
119
117
  export { AdToBs, BsToAd, formatDate, FindDateDifference, NepaliToday };
120
- //# sourceMappingURL=functions.js.map
118
+ //# sourceMappingURL=functions.js.map.map
@@ -1 +1 @@
1
- {"version":3,"names":["bs","formatDate","date","year","getFullYear","month","String","getMonth","padStart","day","getDate","validateDate","dateArray","split","userYear","userMonth","_","map","Number","length","FindDateDifference","date1","date2","diffInMs","diffInDays","AdToBs","UserDate","ReferenceDate","Date","getTime","UserTimeDate","console","log","DateDifference","nepaliYear","nepaliMonth","nepaliDay","DD","outerLoop","NepaliToday","TodayDate","now","BsToAd","userDate","dateDifference","Error","userDay","referenceDate","futureDate","setDate","toISOString","error"],"sourceRoot":"../../../src","sources":["calendar/functions.ts"],"mappings":";;AAAA,SAASA,EAAE,QAAQ,aAAU;AAG7B,MAAMC,UAAU,GAAIC,IAAU,IAAK;EACjC,MAAMC,IAAI,GAAGD,IAAI,CAACE,WAAW,CAAC,CAAC;EAC/B,MAAMC,KAAK,GAAGC,MAAM,CAACJ,IAAI,CAACK,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;EAC5D,MAAMC,GAAG,GAAGH,MAAM,CAACJ,IAAI,CAACQ,OAAO,CAAC,CAAC,CAAC,CAACF,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;EACnD,OAAO,GAAGL,IAAI,IAAIE,KAAK,IAAII,GAAG,EAAE;AA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IA,SAAS,GAAG,EAAE,EAAE;MACnC,MAAM,IAAI8B,KAAK,CAAC,wBAAwB,CAAC;IAC3C;IACA;IACA;IACA;IACA,KAAK,IAAI1C,IAAI,GAAG,IAAI,EAAEA,IAAI,GAAGW,QAAQ,EAAEX,IAAI,EAAE,EAAE;MAC7C,KAAK,IAAIE,KAAK,GAAG,CAAC,EAAEA,KAAK,IAAI,EAAE,EAAEA,KAAK,EAAE,EAAE;QACxCuC,cAAc,IAAI5C,EAAE,CAACG,IAAI,CAAC,CAACE,KAAK,CAAC;MACnC;IACF;IAEA,KAAK,IAAIA,KAAK,GAAG,CAAC,EAAEA,KAAK,GAAGU,SAAS,EAAEV,KAAK,EAAE,EAAE;MAC9CuC,cAAc,IAAI5C,EAAE,CAACc,QAAQ,CAAC,CAACT,KAAK,CAAC;IACvC;IAEAuC,cAAc,IAAIE,OAAO,GAAG,CAAC;IAE7B,MAAMC,aAAa,GAAG,IAAInB,IAAI,CAAC,YAAY,CAAC;IAC5C,MAAMoB,UAAU,GAAG,IAAIpB,IAAI,CAACmB,aAAa,CAAC;IAC1CC,UAAU,CAACC,OAAO,CAACF,aAAa,CAACrC,OAAO,CAAC,CAAC,GAAGkC,cAAc,CAAC;IAE5D,OAAOI,UAAU,CAACE,WAAW,CAAC,CAAC,CAACrC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;EAC/C,CAAC,CAAC,OAAOsC,KAAK,EAAE;IACd,OAAO,6BAA6B;EACtC;AACF,CAAC;AAED,SAAS1B,MAAM,EAAEiB,MAAM,EAAEzC,UAAU,EAAEmB,kBAAkB,EAAEmB,WAAW","ignoreList":[]}
1
+ {"version":3,"names":["bs","formatDate","date","year","getFullYear","month","String","getMonth","padStart","day","getDate","validateDate","dateArray","split","userYear","userMonth","_","map","Number","length","FindDateDifference","date1","date2","diffInMs","diffInDays","AdToBs","UserDate","ReferenceDate","Date","getTime","UserTimeDate","console","log","DateDifference","nepaliYear","nepaliMonth","nepaliDay","DD","outerLoop","NepaliToday","TodayDate","now","BsToAd","userDate","dateDifference","Error","userDay","referenceDate","futureDate","setDate","toISOString","error"],"sourceRoot":"../../../src","sources":["calendar/functions.ts"],"mappings":";;AAAA,SAASA,EAAE,QAAQ,aAAU;AAG7B,MAAMC,UAAU,GAAIC,IAAU,IAAK;EACjC,MAAMC,IAAI,GAAGD,IAAI,CAACE,WAAW,CAAC,CAAC;EAC/B,MAAMC,KAAK,GAAGC,MAAM,CAACJ,IAAI,CAACK,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;EAC5D,MAAMC,GAAG,GAAGH,MAAM,CAACJ,IAAI,CAACQ,OAAO,CAAC,CAAC,CAAC,CAACF,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;EACnD,OAAO,GAAGL,IAAI,IAAIE,KAAK,IAAII,GAAG,EAAE;AAClC,CAAC;AAED,OAAO,MAAME,YAAY,GAAIT,IAAY,IAAuB;EAC9D,MAAMU,SAAS,GAAGV,IAAI,CAACW,KAAK,CAAC,GAAG,CAAC;EACjC,MAAM,CAACC,QAAQ,EAAEC,SAAS,EAAEC,CAAC,CAAC,GAAGJ,SAAS,CAACK,GAAG,CAACC,MAAM,CAAC;EACtD,IAAIN,SAAS,CAACO,MAAM,KAAK,CAAC,EAAE;IAC1B,OAAO,qBAAqB;EAC9B,CAAC,MAAM,IAAIL,QAAQ,GAAG,IAAI,IAAIA,QAAQ,IAAI,IAAI,EAAE;IAC9C,OAAO,4BAA4B;EACrC,CAAC,MAAM,IAAIC,SAAS,GAAG,CAAC,IAAIA,SAAS,GAAG,EAAE,EAAE;IAC1C,OAAO,wBAAwB;EACjC,CAAC,MAAM;IACL,OAAO,IAAI;EACb;AACF,CAAC;AAED,MAAMK,kBAAkB,GAAGA,CAACC,KAAa,EAAEC,KAAa,KAAK;EAC3D,MAAMC,QAAQ,GAAGD,KAAK,GAAGD,KAAK;EAC9B,MAAMG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,CAACmB,aAAa,CAAC;IAC1CC,UAAU,CAACC,OAAO,CAACF,aAAa,CAACrC,OAAO,CAAC,CAAC,GAAGkC,cAAc,CAAC;IAE5D,OAAOI,UAAU,CAACE,WAAW,CAAC,CAAC,CAACrC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;EAC/C,CAAC,CAAC,OAAOsC,KAAK,EAAE;IACd,OAAO,6BAA6B;EACtC;AACF,CAAC;AAED,SAAS1B,MAAM,EAAEiB,MAAM,EAAEzC,UAAU,EAAEmB,kBAAkB,EAAEmB,WAAW","ignoreList":[]}
@@ -1 +1,2 @@
1
1
  {"version":3,"names":[],"sourceRoot":"../../src","sources":["types.ts"],"mappings":"","ignoreList":[]}
2
+ ":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../../../../src/calendar/functions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,QAAA,MAAM,UAAU,SAAU,IAAI,WAK7B,CAAC;AAEF,eAAO,MAAM,YAAY,SAAU,MAAM,KAAG,MAAM,GAAG,OAYpD,CAAC;AAEF,QAAA,MAAM,kBAAkB,UAAW,MAAM,SAAS,MAAM,WAIvD,CAAC;AAEF,QAAA,MAAM,MAAM,aAAc,UAAU,KAAG,UAoCtC,CAAC;AAEF,QAAA,MAAM,WAAW,QAAO,UAgCvB,CAAC;AAEF,QAAA,MAAM,MAAM,aAAc,UAAU,KAAG,UAqCtC,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,kBAAkB,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../../../../src/calendar/functions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,QAAA,MAAM,UAAU,SAAU,IAAI,WAK7B,CAAC;AAEF,eAAO,MAAM,YAAY,SAAU,MAAM,KAAG,MAAM,GAAG,OAYpD,CAAC;AAEF,QAAA,MAAM,kBAAkB,UAAW,MAAM,SAAS,MAAM,WAIvD,CAAC;AAEF,QAAA,MAAM,MAAM,aAAc,UAAU,KAAG,UAoCtC,CAAC;AAEF,QAAA,MAAM,WAAW,QAAO,UAgCvB,CAAC;AAEF,QAAA,MAAM,MAAM,aAAc,UAAU,KAAG,UAuCtC,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,kBAAkB,EAAE,WAAW,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../../../../src/calendar/functions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,QAAA,MAAM,UAAU,SAAU,IAAI,WAK7B,CAAC;AAEF,eAAO,MAAM,YAAY,SAAU,MAAM,KAAG,MAAM,GAAG,OAYpD,CAAC;AAEF,QAAA,MAAM,kBAAkB,UAAW,MAAM,SAAS,MAAM,WAIvD,CAAC;AAEF,QAAA,MAAM,MAAM,aAAc,UAAU,KAAG,UAoCtC,CAAC;AAEF,QAAA,MAAM,WAAW,QAAO,UAgCvB,CAAC;AAEF,QAAA,MAAM,MAAM,aAAc,UAAU,KAAG,UAqCtC,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,kBAAkB,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../../../../src/calendar/functions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,QAAA,MAAM,UAAU,SAAU,IAAI,WAK7B,CAAC;AAEF,eAAO,MAAM,YAAY,SAAU,MAAM,KAAG,MAAM,GAAG,OAYpD,CAAC;AAEF,QAAA,MAAM,kBAAkB,UAAW,MAAM,SAAS,MAAM,WAIvD,CAAC;AAEF,QAAA,MAAM,MAAM,aAAc,UAAU,KAAG,UAoCtC,CAAC;AAEF,QAAA,MAAM,WAAW,QAAO,UAgCvB,CAAC;AAEF,QAAA,MAAM,MAAM,aAAc,UAAU,KAAG,UAuCtC,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,kBAAkB,EAAE,WAAW,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "react-native-nepali-picker",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "Minimalist and modern Nepali-date picker with customization.🌟",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",
7
7
  "module": "./lib/module/index.js",
8
+ "types":"./lib/typescript/module/src/index.d.ts",
8
9
  "exports": {
9
10
  ".": {
10
11
  "import": {
@@ -0,0 +1,283 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useState } from 'react';
3
+ import { View, Text, Modal, Pressable, StyleSheet, TouchableOpacity, ScrollView, } from 'react-native';
4
+ import { bs, daysInEnglish, daysInNepali, getNepaliNumber, monthsInEnglish, monthsInNepali, } from './calendar/config';
5
+ import { calcFirstDay, isToday } from './calendar/settings';
6
+ import { NepaliToday, validateDate } from './calendar/functions';
7
+ import { ChevronIcon } from './assets/Icons';
8
+ import DateSyncLogo from './assets/DateSync';
9
+ import Triangle from './assets/Triangle';
10
+ const CalendarPicker = ({ visible, onClose, theme = 'light', onDateSelect, language = 'np', initialDate = NepaliToday(), brandColor = '#2081b9', titleTextStyle = {
11
+ fontSize: 20,
12
+ fontWeight: 'bold',
13
+ }, weekTextStyle = {
14
+ fontSize: 15,
15
+ fontWeight: 'bold',
16
+ }, dayTextStyle = {
17
+ fontSize: 15,
18
+ fontWeight: '600',
19
+ }, }) => {
20
+ const value = validateDate(initialDate);
21
+ console.log('the initial date is ', initialDate);
22
+ const [TodayNepaliDate, setTodayNepaliDate] = useState(initialDate);
23
+ const cYear = parseInt(TodayNepaliDate.split('-')[0], 10);
24
+ const cMonth = parseInt(TodayNepaliDate.split('-')[1], 10);
25
+ const cDay = parseInt(TodayNepaliDate.split('-')[2], 10);
26
+ const [firstDayOfMonth, setFirstDayOfMonth] = useState(0);
27
+ const [month, setMonth] = useState(cMonth);
28
+ const [year, setYear] = useState(cYear);
29
+ const [calendarDate, setCalendarDate] = useState([]);
30
+ const [yearModal, setYearModal] = useState(false);
31
+ const syncToday = () => {
32
+ setMonth(cMonth);
33
+ setYear(cYear);
34
+ };
35
+ const handleDateClick = (day) => {
36
+ const date = `${year}-${month.toString().padStart(2, '0')}-${day.toString().padStart(2, '0')}`;
37
+ setTodayNepaliDate(date);
38
+ onDateSelect(date);
39
+ onClose();
40
+ };
41
+ useEffect(() => {
42
+ setTodayNepaliDate(initialDate);
43
+ }, [initialDate]);
44
+ //Handle Next Month Click
45
+ const handleNextClick = () => {
46
+ if (month === 12) {
47
+ if (year < 2099) {
48
+ setYear((prev) => prev + 1);
49
+ setMonth(1);
50
+ }
51
+ }
52
+ else {
53
+ setMonth((prev) => prev + 1);
54
+ }
55
+ };
56
+ //Handle Previous Month Click
57
+ const handlePreviousClick = () => {
58
+ if (month === 1) {
59
+ if (year > 2000) {
60
+ setYear((prev) => prev - 1);
61
+ setMonth(12);
62
+ }
63
+ }
64
+ else {
65
+ setMonth((prev) => prev - 1);
66
+ }
67
+ };
68
+ const openYearView = () => {
69
+ setYearModal(true);
70
+ };
71
+ const closeYearView = () => {
72
+ setYearModal(false);
73
+ };
74
+ useEffect(() => {
75
+ // calculate First Day Of Month (FDOM) and Days In Month(DIM)
76
+ const FDOM = calcFirstDay(year, month);
77
+ const DIM = bs[year][month];
78
+ setFirstDayOfMonth(FDOM);
79
+ // array which contain 42 cells and it only fill the date with number if the date is present otherwise it fill cells with null.
80
+ const calendarCells = Array.from({ length: 42 }, (_, index) => {
81
+ const dayNumber = index - FDOM + 1;
82
+ if (dayNumber > 0 && dayNumber <= DIM) {
83
+ return dayNumber;
84
+ }
85
+ else {
86
+ return null;
87
+ }
88
+ });
89
+ setCalendarDate(calendarCells);
90
+ }, [year, month, initialDate]);
91
+ const handleYearClick = (y) => {
92
+ setYear(y);
93
+ closeYearView();
94
+ };
95
+ const dark = theme === 'dark';
96
+ const weekDays = language === 'en' ? daysInEnglish : daysInNepali;
97
+ if (value !== true) {
98
+ return (_jsx(Modal, { visible: visible, onRequestClose: onClose, transparent: true, children: _jsx(Pressable, { style: styles.outerPressable, onPress: onClose, children: _jsx(Pressable, { onPress: () => { }, style: styles.innerPressable, children: _jsxs(View, { style: {
99
+ ...styles.innerView,
100
+ minHeight: '40%',
101
+ minWidth: '90%',
102
+ justifyContent: 'center',
103
+ alignItems: 'center',
104
+ backgroundColor: dark ? '#383838' : '#ffffff',
105
+ }, children: [_jsx(Text, { style: {
106
+ color: dark ? 'white' : 'black',
107
+ fontWeight: '600',
108
+ paddingHorizontal: 10,
109
+ paddingVertical: 10,
110
+ }, children: "Unsupported date range on initialDate" }), _jsx(Text, { style: {
111
+ color: dark ? 'white' : 'black',
112
+ paddingHorizontal: 10,
113
+ }, children: value })] }) }) }) }));
114
+ }
115
+ return (_jsxs(Modal, { visible: visible, onRequestClose: onClose, transparent: true, children: [_jsx(Pressable, { style: styles.outerPressable, onPress: onClose, children: _jsx(Pressable, { onPress: () => { }, style: styles.innerPressable, children: _jsxs(View, { style: {
116
+ ...styles.innerView,
117
+ backgroundColor: dark ? '#383838' : '#ffffff',
118
+ }, children: [_jsx(Text, { style: {
119
+ color: dark ? 'white' : 'black',
120
+ paddingHorizontal: 10,
121
+ }, children: language === 'np' ? 'आजको मिति ' : "Today's Date" }), _jsxs(View, { style: {
122
+ display: 'flex',
123
+ flexDirection: 'row',
124
+ justifyContent: 'space-between',
125
+ paddingHorizontal: 10,
126
+ marginBottom: 20,
127
+ alignItems: 'center',
128
+ }, children: [_jsx(View, { children: _jsx(TouchableOpacity, { onPress: syncToday, children: language == 'np' ? (_jsxs(Text, { style: {
129
+ ...titleTextStyle,
130
+ color: dark ? '#fff' : '#000',
131
+ }, children: [getNepaliNumber(cYear), " ", monthsInNepali[cMonth - 1], ' ', " ", getNepaliNumber(cDay)] })) : (_jsxs(Text, { style: {
132
+ ...titleTextStyle,
133
+ color: dark ? '#fff' : '#000',
134
+ }, children: [cYear, " ", monthsInEnglish[cMonth - 1], ' ', " ", cDay] })) }) }), _jsx(TouchableOpacity, { onPress: syncToday, children: _jsx(DateSyncLogo, { day: cDay, color: dark ? '#ffff' : '#000' }) })] }), _jsxs(View, { style: styles.ButtonContainer, children: [_jsx(TouchableOpacity, { style: styles.CButton, onPress: handlePreviousClick, children: _jsx(ChevronIcon, { direction: "right", color: dark ? 'white' : 'black' }) }), _jsxs(TouchableOpacity, { style: { flexDirection: 'row', alignItems: 'center' }, onPress: openYearView, children: [_jsx(Text, { style: {
135
+ ...titleTextStyle,
136
+ marginRight: 6,
137
+ color: dark ? 'white' : 'black',
138
+ }, children: language === 'np'
139
+ ? monthsInNepali[month - 1]
140
+ : monthsInEnglish[month - 1] }), _jsx(Text, { style: {
141
+ ...titleTextStyle,
142
+ marginRight: 10,
143
+ color: dark ? 'white' : 'black',
144
+ }, children: language === 'np' ? getNepaliNumber(year) : year }), _jsx(Triangle, { height: 10, width: 13, color: dark ? 'white' : 'black' })] }), _jsx(TouchableOpacity, { style: styles.CButton, onPress: handleNextClick, children: _jsx(ChevronIcon, { direction: "left", color: dark ? 'white' : 'black' }) })] }), _jsxs(View, { style: styles.outerDateConainer, children: [_jsx(View, { style: styles.weekContainer, children: weekDays.map((item, index) => {
145
+ return (_jsx(View, { style: styles.WeekItem, children: _jsx(Text, { style: {
146
+ ...weekTextStyle,
147
+ color: dark ? 'white' : 'black',
148
+ }, children: item }) }, index));
149
+ }) }), _jsx(View, { style: styles.datesContainer, children: calendarDate.map((dayItem, index) => {
150
+ return (_jsx(TouchableOpacity, { style: styles.dateItem, onPress:
151
+ //execute on day item press, Only execute when dayItem is not null
152
+ dayItem ? () => handleDateClick(dayItem) : () => { }, children: dayItem ? (_jsx(View, { style: {
153
+ paddingHorizontal: 6,
154
+ paddingVertical: 3,
155
+ borderRadius: 999,
156
+ //check if the date is today or not and apply conditional styling.
157
+ backgroundColor: isToday(TodayNepaliDate, index, year, month, firstDayOfMonth)
158
+ ? brandColor
159
+ : dark
160
+ ? '#383838'
161
+ : '#fff',
162
+ }, children: _jsx(Text, { style: {
163
+ ...dayTextStyle,
164
+ color: isToday(TodayNepaliDate, index, year, month, firstDayOfMonth)
165
+ ? '#fff'
166
+ : dark
167
+ ? 'white'
168
+ : 'black',
169
+ }, children: language === 'np'
170
+ ? getNepaliNumber(dayItem)
171
+ : dayItem }) })) : null }, index));
172
+ }) })] })] }) }) }), _jsx(Modal, { visible: yearModal, onRequestClose: closeYearView, transparent: true, children: _jsx(Pressable, { style: styles.outerPressable, onPress: () => closeYearView(), children: _jsx(Pressable, { style: styles.YearInnerPressable, onPress: () => { }, children: _jsx(View, { style: {
173
+ ...styles.InnerYearView,
174
+ backgroundColor: dark ? '#383838' : '#f2f2f2',
175
+ }, children: _jsx(ScrollView, { showsVerticalScrollIndicator: false, contentContainerStyle: {
176
+ display: 'flex',
177
+ paddingVertical: 10,
178
+ flexDirection: 'row',
179
+ justifyContent: 'center',
180
+ flexWrap: 'wrap',
181
+ }, children: Array(100)
182
+ .fill(0)
183
+ .map((_, index) => {
184
+ return (_jsx(TouchableOpacity, { onPress: () => handleYearClick(index + 2000), style: {
185
+ paddingHorizontal: 20,
186
+ paddingVertical: 6,
187
+ marginHorizontal: 4,
188
+ marginVertical: 4,
189
+ borderColor: dark ? 'white' : 'black',
190
+ borderRadius: 20,
191
+ backgroundColor: index + 2000 === year ? brandColor : '',
192
+ borderWidth: 0.4,
193
+ }, children: _jsx(Text, { style: {
194
+ fontWeight: '500',
195
+ color: index + 2000 === year
196
+ ? 'white'
197
+ : dark
198
+ ? 'white'
199
+ : 'black',
200
+ }, children: language === 'np'
201
+ ? getNepaliNumber(index + 2000)
202
+ : index + 2000 }) }, index));
203
+ }) }) }) }) }) })] }));
204
+ };
205
+ const styles = StyleSheet.create({
206
+ outerPressable: {
207
+ height: '100%',
208
+ justifyContent: 'center',
209
+ width: '100%',
210
+ alignItems: 'center',
211
+ backgroundColor: 'rgba(0,0,0,0.54)',
212
+ },
213
+ innerPressable: {
214
+ minHeight: '20%',
215
+ maxWidth: 500,
216
+ marginHorizontal: 30,
217
+ },
218
+ innerView: {
219
+ borderRadius: 20,
220
+ backgroundColor: '#f2f2f2',
221
+ padding: 10,
222
+ },
223
+ weekContainer: {
224
+ flexDirection: 'row',
225
+ width: '100%',
226
+ },
227
+ WeekItem: {
228
+ width: '14.28%',
229
+ alignItems: 'center',
230
+ paddingVertical: 18,
231
+ },
232
+ //WeekText: {
233
+ // fontWeight: 'bold',
234
+ // fontSize: 14,
235
+ // color: 'black',
236
+ //},
237
+ datesContainer: {
238
+ flexDirection: 'row',
239
+ flexWrap: 'wrap',
240
+ },
241
+ dateItem: {
242
+ overflow: 'hidden',
243
+ width: '14.28%',
244
+ justifyContent: 'center',
245
+ alignItems: 'center',
246
+ paddingVertical: 10,
247
+ },
248
+ //DayText: {
249
+ // fontSize: 14,
250
+ // fontWeight: '600',
251
+ //},
252
+ CButton: {
253
+ paddingHorizontal: 20,
254
+ paddingVertical: 10,
255
+ },
256
+ ButtonContainer: {
257
+ alignItems: 'center',
258
+ flexDirection: 'row',
259
+ marginBottom: 10,
260
+ justifyContent: 'space-between',
261
+ },
262
+ outerDateConainer: {
263
+ paddingHorizontal: 3,
264
+ },
265
+ //TitleText: {
266
+ // fontSize: 20,
267
+ // fontWeight: 'bold',
268
+ //},
269
+ // for year view modal
270
+ YearInnerPressable: {
271
+ justifyContent: 'center',
272
+ maxWidth: 500,
273
+ maxHeight: '70%',
274
+ marginHorizontal: 30,
275
+ },
276
+ InnerYearView: {
277
+ borderRadius: 20,
278
+ backgroundColor: '#f2f2f2',
279
+ minHeight: 50,
280
+ maxHeight: '100%',
281
+ },
282
+ });
283
+ export default CalendarPicker;
@@ -0,0 +1,66 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { View, Text, StyleSheet } from 'react-native';
3
+ const DateSyncLogo = ({ size = 28, color = '#003a05', day = 0 }) => {
4
+ const scale = size / 24;
5
+ // Format the date as DD
6
+ return (_jsxs(View, { style: [styles.container, { width: size, height: size }], children: [_jsx(View, { style: [styles.calendarBase, { borderColor: color }], children: _jsx(Text, { style: [styles.dateText, { color: color, fontSize: 9 * scale }], children: day }) }), _jsx(View, { style: [styles.calendarTop, { borderColor: color, top: 2 * scale }] })] }));
7
+ };
8
+ const styles = StyleSheet.create({
9
+ container: {
10
+ aspectRatio: 1,
11
+ position: 'relative',
12
+ },
13
+ calendarBase: {
14
+ position: 'absolute',
15
+ left: '12.5%',
16
+ top: '12.5%',
17
+ width: '75%',
18
+ height: '75%',
19
+ borderWidth: 2,
20
+ borderRadius: 3,
21
+ justifyContent: 'center',
22
+ alignItems: 'center',
23
+ },
24
+ dateText: {
25
+ fontWeight: '800',
26
+ },
27
+ calendarTop: {
28
+ position: 'absolute',
29
+ left: '12.5%',
30
+ width: '75%',
31
+ height: '20%',
32
+ borderTopWidth: 4,
33
+ borderLeftWidth: 2,
34
+ borderRightWidth: 2,
35
+ borderTopLeftRadius: 10,
36
+ borderTopRightRadius: 0,
37
+ },
38
+ syncCircle: {
39
+ position: 'absolute',
40
+ width: '50%',
41
+ height: '50%',
42
+ borderWidth: 2,
43
+ borderRadius: 100,
44
+ justifyContent: 'center',
45
+ alignItems: 'center',
46
+ },
47
+ syncArrow: {
48
+ position: 'absolute',
49
+ width: '40%',
50
+ height: '40%',
51
+ borderWidth: 2,
52
+ borderTopWidth: 0,
53
+ borderRightWidth: 0,
54
+ transform: [{ rotate: '45deg' }],
55
+ },
56
+ syncArrowLeft: {
57
+ left: '15%',
58
+ top: '10%',
59
+ },
60
+ syncArrowRight: {
61
+ right: '15%',
62
+ bottom: '10%',
63
+ transform: [{ rotate: '225deg' }],
64
+ },
65
+ });
66
+ export default DateSyncLogo;
@@ -0,0 +1,109 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { View, StyleSheet } from 'react-native';
3
+ const ChevronIcon = ({ direction = 'right', size = 15, color = '#000' }) => {
4
+ const isLeft = direction === 'left';
5
+ return (_jsxs(View, { style: [styles.container, { width: size, height: size }], children: [_jsx(View, { style: [
6
+ styles.line,
7
+ isLeft ? styles.leftTop : styles.rightTop,
8
+ { backgroundColor: color },
9
+ ] }), _jsx(View, { style: [
10
+ styles.line,
11
+ isLeft ? styles.leftBottom : styles.rightBottom,
12
+ { backgroundColor: color },
13
+ ] })] }));
14
+ };
15
+ const EditPencilIcon = ({ size = 24, color = '#000' }) => {
16
+ return (_jsxs(View, { style: [styles.container, { width: size, height: size }], children: [_jsx(View, { style: [styles.pencilBody, { backgroundColor: color }] }), _jsx(View, { style: [styles.pencilTip, { borderBottomColor: color }] }), _jsx(View, { style: [styles.pencilEraser, { backgroundColor: '#FFA07A' }] })] }));
17
+ };
18
+ const Triangle = ({ width = 10, height = 20, color = 'white' }) => {
19
+ return (_jsx(View, { style: [
20
+ styles.triangle,
21
+ {
22
+ borderLeftWidth: width / 2,
23
+ borderRightWidth: width / 2,
24
+ borderBottomWidth: height,
25
+ borderBottomColor: color,
26
+ },
27
+ ] }));
28
+ };
29
+ const ChevronDown = ({ size = 10, color = '#000' }) => {
30
+ return (_jsxs(View, { style: [
31
+ styles.container,
32
+ { width: size, height: size, transform: [{ rotate: '-90deg' }] },
33
+ ], children: [_jsx(View, { style: [styles.line, styles.rightTop, { backgroundColor: color }] }), _jsx(View, { style: [styles.line, styles.rightBottom, { backgroundColor: color }] })] }));
34
+ };
35
+ const styles = StyleSheet.create({
36
+ container: {
37
+ justifyContent: 'center',
38
+ alignItems: 'center',
39
+ },
40
+ line: {
41
+ position: 'absolute',
42
+ width: '90%',
43
+ height: 2,
44
+ },
45
+ leftTop: {
46
+ top: '15%',
47
+ left: '20%',
48
+ transform: [{ rotate: '45deg' }],
49
+ },
50
+ leftBottom: {
51
+ bottom: '15%',
52
+ left: '20%',
53
+ transform: [{ rotate: '-45deg' }],
54
+ },
55
+ rightTop: {
56
+ top: '15%',
57
+ right: '20%',
58
+ transform: [{ rotate: '-45deg' }],
59
+ },
60
+ rightBottom: {
61
+ bottom: '15%',
62
+ right: '20%',
63
+ transform: [{ rotate: '45deg' }],
64
+ },
65
+ triangle: {
66
+ width: 0,
67
+ height: 0,
68
+ backgroundColor: 'transparent',
69
+ borderStyle: 'solid',
70
+ borderLeftWidth: 6,
71
+ borderRightWidth: 6,
72
+ borderBottomWidth: 0,
73
+ borderLeftColor: 'transparent',
74
+ borderRightColor: 'transparent',
75
+ borderTopWidth: 8,
76
+ },
77
+ pencilBody: {
78
+ width: '60%',
79
+ height: '75%',
80
+ position: 'absolute',
81
+ bottom: '12.5%',
82
+ left: '20%',
83
+ transform: [{ skewX: '5deg' }],
84
+ },
85
+ pencilTip: {
86
+ width: 0,
87
+ height: 0,
88
+ backgroundColor: 'transparent',
89
+ borderStyle: 'solid',
90
+ borderLeftWidth: 7,
91
+ borderRightWidth: 7,
92
+ borderTopWidth: 0,
93
+ borderLeftColor: 'transparent',
94
+ borderRightColor: 'transparent',
95
+ borderBottomWidth: 10,
96
+ position: 'absolute',
97
+ bottom: '12.5%',
98
+ left: '20%',
99
+ },
100
+ pencilEraser: {
101
+ width: '60%',
102
+ height: '10%',
103
+ position: 'absolute',
104
+ top: '12.5%',
105
+ left: '20%',
106
+ transform: [{ skewX: '5deg' }],
107
+ },
108
+ });
109
+ export { ChevronIcon, ChevronDown, EditPencilIcon, Triangle };
@@ -0,0 +1,25 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { View, StyleSheet } from 'react-native';
3
+ const Triangle = ({ width = 10, height = 20, color = 'black' }) => {
4
+ return (_jsx(View, { style: [
5
+ styles.triangle,
6
+ {
7
+ borderLeftWidth: width / 2,
8
+ borderRightWidth: width / 2,
9
+ borderBottomWidth: height,
10
+ borderBottomColor: color,
11
+ },
12
+ ] }));
13
+ };
14
+ const styles = StyleSheet.create({
15
+ triangle: {
16
+ width: 0,
17
+ height: 0,
18
+ transform: [{ rotate: '180deg' }],
19
+ backgroundColor: 'transparent',
20
+ borderStyle: 'solid',
21
+ borderLeftColor: 'transparent',
22
+ borderRightColor: 'transparent',
23
+ },
24
+ });
25
+ export default Triangle;
@@ -0,0 +1,45 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { View, StyleSheet } from 'react-native';
3
+ const PencilIcon = ({ height = 20, width = 10 }) => {
4
+ return (_jsxs(View, { style: { ...styles.container, height: height, width: width }, children: [_jsx(View, { style: {
5
+ height: '40%',
6
+ width: '100%',
7
+ borderTopStartRadius: 3,
8
+ borderTopEndRadius: 3,
9
+ borderWidth: 0.7,
10
+ }, children: _jsx(View, { style: {
11
+ top: '50%',
12
+ width: '100%',
13
+ borderWidth: 0.7,
14
+ } }) }), _jsx(View, { style: {
15
+ height: '90%',
16
+ width: '100%',
17
+ borderWidth: 0.7,
18
+ }, children: _jsx(View, { style: {
19
+ left: '50%',
20
+ height: '100%',
21
+ width: 0,
22
+ borderWidth: 0.2,
23
+ } }) }), _jsx(View, { style: {
24
+ width: 0,
25
+ height: 0,
26
+ borderLeftWidth: 4,
27
+ borderRightWidth: 4,
28
+ borderBottomWidth: 0,
29
+ borderStyle: 'solid',
30
+ backgroundColor: 'transparent',
31
+ borderLeftColor: 'transparent',
32
+ borderRightColor: 'transparent',
33
+ borderBottomColor: 'transparent',
34
+ borderTopWidth: 8,
35
+ } })] }));
36
+ };
37
+ const styles = StyleSheet.create({
38
+ container: {
39
+ transform: [{ rotate: '45deg' }],
40
+ alignItems: 'center',
41
+ marginHorizontal: 'auto',
42
+ justifyContent: 'center',
43
+ },
44
+ });
45
+ export default PencilIcon;