@sonygrg/nepali-datepicker 1.0.7 → 1.0.11

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/README.md CHANGED
@@ -19,10 +19,18 @@ npm install react react-dom @mui/material @mui/x-date-pickers @emotion/react @em
19
19
  ## Usage
20
20
 
21
21
  ```tsx
22
- import { InputCalendar } from "@sonygrg/nepali-datepicker";
22
+ import { useState } from "react";
23
+ import { InputCalendar, type ParsedBSDate } from "@sonygrg/nepali-datepicker";
23
24
 
24
25
  function App() {
25
- return <InputCalendar />;
26
+ const [date, setDate] = useState<ParsedBSDate | null>(null);
27
+ return (
28
+ <InputCalendar
29
+ value={date}
30
+ onChange={(value) => setDate(value)}
31
+ className=""
32
+ />
33
+ );
26
34
  }
27
35
 
28
36
  export default App;
@@ -1 +1,8 @@
1
- export default function InputCalendar(): import("react").JSX.Element;
1
+ import { ParsedBSDate } from '../converter/bsDateParser';
2
+ type Props = {
3
+ value?: ParsedBSDate | null;
4
+ onChange?: (date: ParsedBSDate | null) => void;
5
+ className?: string;
6
+ };
7
+ export default function InputCalendar({ value, onChange, className }: Props): import("react").JSX.Element;
8
+ export {};
@@ -1,14 +1,7 @@
1
+ import { ParsedBSDate } from '../converter/bsDateParser';
1
2
  type Props = {
2
- onSelectDate: (date: {
3
- year: number;
4
- month: number;
5
- day: number;
6
- }) => void;
7
- selectDate: {
8
- year: number;
9
- month: number;
10
- day: number;
11
- } | null;
3
+ onSelectDate: (date: ParsedBSDate) => void;
4
+ selectDate: ParsedBSDate | null;
12
5
  };
13
6
  export default function NepaliCalendar({ onSelectDate, selectDate }: Props): import("react").JSX.Element;
14
7
  export {};
package/dist/index.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export { default as InputCalendar } from './components/InputCalendar';
2
+ export type { ParsedBSDate } from './converter/bsDateParser';
@@ -3,4 +3,4 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=(e,t)=>
3
3
  <%s {...props} />
4
4
  React keys must be passed directly to JSX without using spread:
5
5
  let props = %s;
6
- <%s key={someKey} {...props} />`,o,p,m,p),L[p+o]=!0)}if(p=null,i!==void 0&&(r(i),p=``+i),s(n)&&(r(n.key),p=``+n.key),`key`in n)for(var h in i={},n)h!==`key`&&(i[h]=n[h]);else i=n;return p&&c(i,typeof e==`function`?e.displayName||e.name||`Unknown`:e),u(e,p,i,a(),l,d)}function f(e){p(e)?e._store&&(e._store.validated=1):typeof e==`object`&&e&&e.$$typeof===E&&(e._payload.status===`fulfilled`?p(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function p(e){return typeof e==`object`&&!!e&&e.$$typeof===h}var m=require("react"),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),b=Symbol.for(`react.consumer`),x=Symbol.for(`react.context`),S=Symbol.for(`react.forward_ref`),C=Symbol.for(`react.suspense`),w=Symbol.for(`react.suspense_list`),T=Symbol.for(`react.memo`),E=Symbol.for(`react.lazy`),D=Symbol.for(`react.activity`),O=Symbol.for(`react.client.reference`),k=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A=Object.prototype.hasOwnProperty,j=Array.isArray,M=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(e){return e()}};var N,P={},F=m.react_stack_bottom_frame.bind(m,o)(),I=M(i(o)),L={};e.Fragment=_,e.jsx=function(e,t,n){var r=1e4>k.recentlyCreatedOwnerStacks++;return d(e,t,n,!1,r?Error(`react-stack-top-frame`):F,r?M(i(e)):I)},e.jsxs=function(e,t,n){var r=1e4>k.recentlyCreatedOwnerStacks++;return d(e,t,n,!0,r?Error(`react-stack-top-frame`):F,r?M(i(e)):I)}})()})),x=e(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=y():t.exports=b()}))(),S=[`Baisakh`,`Jestha`,`Asar`,`Shrawan`,`Bhadra`,`Aswin`,`Kartik`,`Mangsir`,`Poush`,`Magh`,`Falgun`,`Chaitra`];function C({onSelectDate:e,selectDate:n}){let[o,s]=(0,r.useState)(()=>n?.year??2083),[c,l]=(0,r.useState)(()=>n?.month??1);(0,r.useEffect)(()=>{if(!n)return;let e=setTimeout(()=>{s(n.year),l(n.month)},0);return()=>clearTimeout(e)},[n]);let u=Object.keys(i).map(Number),d=i[String(o)]?.[S[c-1]]??30,p=f(o,c),m=()=>{c===1?(l(12),s(e=>e-1)):l(e=>e-1)},g=()=>{c===12?(l(1),s(e=>e+1)):l(e=>e+1)},_=o===2e3&&c===1,v=o===2090&&c===12,y=[...Array(p).fill(null),...Array.from({length:d},(e,t)=>t+1)];return(0,x.jsxs)(t.Card,{sx:{p:`20px`,display:`flex`,flexDirection:`column`,gap:`10px`},children:[(0,x.jsxs)(t.Box,{sx:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:`4px`,mb:`8px`},children:[(0,x.jsx)(t.IconButton,{onClick:m,disabled:_,children:`‹`}),(0,x.jsx)(t.Select,{value:o,onChange:e=>{s(Number(e.target.value))},size:`small`,MenuProps:{slotProps:{paper:{sx:{maxHeight:250}}}},sx:{minWidth:90},children:u.map(e=>(0,x.jsx)(t.MenuItem,{value:e,children:h(e)},e))}),(0,x.jsx)(t.Select,{value:c,onChange:e=>l(Number(e.target.value)),MenuProps:{slotProps:{paper:{sx:{maxHeight:250}}}},sx:{minWidth:90},size:`small`,children:a.month.long.map((e,n)=>(0,x.jsx)(t.MenuItem,{value:n+1,children:e},e))}),(0,x.jsx)(t.IconButton,{onClick:g,disabled:v,children:`›`})]}),(0,x.jsxs)(t.Box,{sx:{display:`grid`,gridTemplateColumns:`repeat(7, 1fr)`,textAlign:`center`,gap:2},children:[a.day.short.map(e=>(0,x.jsx)(t.Box,{children:(0,x.jsx)(t.Typography,{variant:`caption`,sx:{fontSize:`14px`},children:e})},e)),y.map((r,i)=>{let a=n&&n.day===r&&n.month===c&&n.year===o;return(0,x.jsx)(t.Box,{children:r&&(0,x.jsx)(t.Box,{onClick:()=>{e({year:o,month:c,day:r})},sx:{cursor:`pointer`,bgcolor:a?`primary.main`:`transparent`,color:a?`#fff`:`text.primary`,borderRadius:`50%`,height:`32px`,width:`32px`,display:`flex`,justifyContent:`center`,alignItems:`center`},children:h(r)})},i)})]})]})}var w=[`Baisakh`,`Jestha`,`Asar`,`Shrawan`,`Bhadra`,`Aswin`,`Kartik`,`Mangsir`,`Poush`,`Magh`,`Falgun`,`Chaitra`];function T(e){let t=_(e).split(`/`);if(t.length!==3||t[0].length!==4)return null;let n=parseInt(t[0],10),r=parseInt(t[1],10),a=parseInt(t[2],10);if(isNaN(n)||isNaN(r)||isNaN(a))return null;let o=i[String(n)]?.[w[r-1]];return!o||r<1||r>12||a<1||a>o?null:{year:n,month:r,day:a}}function E(){let[e,i]=(0,r.useState)(null),[a,o]=(0,r.useState)(null),[s,c]=(0,r.useState)(``),l=(0,r.useRef)(null),u=(0,r.useRef)(null),d=(0,r.useRef)(null),f=()=>{let e=T(s);e?(o(e),console.log(`Selected Date:`,g(e))):s&&o(null),c(``)};return(0,r.useLayoutEffect)(()=>{u.current&&d.current!==null&&u.current.setSelectionRange(d.current,d.current)},[s]),(0,x.jsx)(`div`,{children:(0,x.jsxs)(t.Box,{sx:{m:`0px`},children:[(0,x.jsx)(t.Box,{ref:l,children:(0,x.jsx)(t.TextField,{label:a?``:`मिति छान्‍नुहोस् `,size:`small`,sx:{" .MuiInputBase-input":{height:`20px`}},value:s?v(s):a?g(a):``,placeholder:` YYYY/MM/DD`,onChange:e=>{let t=e.target,n=t.selectionStart??0,r=_(t.value);r=r.split(``).filter(e=>e>=`0`&&e<=`9`||e===`/`).join(``);let i=r.length;(r.length===4&&!r.includes(`/`)||r.length===7&&r.split(`/`).length===2)&&(r+=`/`),r.length>i&&n===i&&(n+=1),d.current=n,c(r.slice(0,10))},onFocus:()=>{if(a&&!s){let e=a.year;c(`${e}/${String(a.month).padStart(2,`0`)}/${String(a.day).padStart(2,`0`)}`)}},onBlur:f,onKeyDown:e=>{e.key===`Enter`&&f()},slotProps:{input:{inputRef:u,sx:{pl:`8px`,fontSize:`18px`},endAdornment:(0,x.jsx)(t.InputAdornment,{position:`end`,children:(0,x.jsx)(t.IconButton,{onClick:()=>i(l.current),children:(0,x.jsx)(n.CalendarIcon,{})})})}}})}),(0,x.jsx)(t.Popover,{open:!!e,anchorEl:e,onClose:()=>i(null),anchorOrigin:{vertical:`bottom`,horizontal:`left`},children:(0,x.jsx)(C,{selectDate:a,onSelectDate:e=>{o(e),c(``),i(null),console.log(`Selected Date:`,g(e))}})})]})})}exports.InputCalendar=E;
6
+ <%s key={someKey} {...props} />`,o,p,m,p),L[p+o]=!0)}if(p=null,i!==void 0&&(r(i),p=``+i),s(n)&&(r(n.key),p=``+n.key),`key`in n)for(var h in i={},n)h!==`key`&&(i[h]=n[h]);else i=n;return p&&c(i,typeof e==`function`?e.displayName||e.name||`Unknown`:e),u(e,p,i,a(),l,d)}function f(e){p(e)?e._store&&(e._store.validated=1):typeof e==`object`&&e&&e.$$typeof===E&&(e._payload.status===`fulfilled`?p(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function p(e){return typeof e==`object`&&!!e&&e.$$typeof===h}var m=require("react"),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),b=Symbol.for(`react.consumer`),x=Symbol.for(`react.context`),S=Symbol.for(`react.forward_ref`),C=Symbol.for(`react.suspense`),w=Symbol.for(`react.suspense_list`),T=Symbol.for(`react.memo`),E=Symbol.for(`react.lazy`),D=Symbol.for(`react.activity`),O=Symbol.for(`react.client.reference`),k=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A=Object.prototype.hasOwnProperty,j=Array.isArray,M=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(e){return e()}};var N,P={},F=m.react_stack_bottom_frame.bind(m,o)(),I=M(i(o)),L={};e.Fragment=_,e.jsx=function(e,t,n){var r=1e4>k.recentlyCreatedOwnerStacks++;return d(e,t,n,!1,r?Error(`react-stack-top-frame`):F,r?M(i(e)):I)},e.jsxs=function(e,t,n){var r=1e4>k.recentlyCreatedOwnerStacks++;return d(e,t,n,!0,r?Error(`react-stack-top-frame`):F,r?M(i(e)):I)}})()})),x=e(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=y():t.exports=b()}))(),S=[`Baisakh`,`Jestha`,`Asar`,`Shrawan`,`Bhadra`,`Aswin`,`Kartik`,`Mangsir`,`Poush`,`Magh`,`Falgun`,`Chaitra`];function C({onSelectDate:e,selectDate:n}){let[o,s]=(0,r.useState)(()=>n?.year??2083),[c,l]=(0,r.useState)(()=>n?.month??1);(0,r.useEffect)(()=>{if(!n)return;let e=setTimeout(()=>{s(n.year),l(n.month)},0);return()=>clearTimeout(e)},[n]);let u=Object.keys(i).map(Number),d=i[String(o)]?.[S[c-1]]??30,p=f(o,c),m=()=>{c===1?(l(12),s(e=>e-1)):l(e=>e-1)},g=()=>{c===12?(l(1),s(e=>e+1)):l(e=>e+1)},_=o===2e3&&c===1,v=o===2090&&c===12,y=[...Array(p).fill(null),...Array.from({length:d},(e,t)=>t+1)];return(0,x.jsxs)(t.Card,{sx:{p:`20px`,display:`flex`,flexDirection:`column`,gap:`10px`},children:[(0,x.jsxs)(t.Box,{sx:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:`4px`,mb:`8px`},children:[(0,x.jsx)(t.IconButton,{onClick:m,disabled:_,children:`‹`}),(0,x.jsx)(t.Select,{value:o,onChange:e=>{s(Number(e.target.value))},size:`small`,MenuProps:{slotProps:{paper:{sx:{maxHeight:250}}}},sx:{minWidth:90},children:u.map(e=>(0,x.jsx)(t.MenuItem,{value:e,children:h(e)},e))}),(0,x.jsx)(t.Select,{value:c,onChange:e=>l(Number(e.target.value)),MenuProps:{slotProps:{paper:{sx:{maxHeight:250}}}},sx:{minWidth:90},size:`small`,children:a.month.long.map((e,n)=>(0,x.jsx)(t.MenuItem,{value:n+1,children:e},e))}),(0,x.jsx)(t.IconButton,{onClick:g,disabled:v,children:`›`})]}),(0,x.jsxs)(t.Box,{sx:{display:`grid`,gridTemplateColumns:`repeat(7, 1fr)`,textAlign:`center`,gap:2},children:[a.day.short.map(e=>(0,x.jsx)(t.Box,{children:(0,x.jsx)(t.Typography,{variant:`caption`,sx:{fontSize:`14px`},children:e})},e)),y.map((r,i)=>{let a=n&&n.day===r&&n.month===c&&n.year===o;return(0,x.jsx)(t.Box,{children:r&&(0,x.jsx)(t.Box,{onClick:()=>{e({year:o,month:c,day:r})},sx:{cursor:`pointer`,bgcolor:a?`primary.main`:`transparent`,color:a?`#fff`:`text.primary`,borderRadius:`50%`,height:`32px`,width:`32px`,display:`flex`,justifyContent:`center`,alignItems:`center`},children:h(r)})},i)})]})]})}var w=[`Baisakh`,`Jestha`,`Asar`,`Shrawan`,`Bhadra`,`Aswin`,`Kartik`,`Mangsir`,`Poush`,`Magh`,`Falgun`,`Chaitra`];function T(e){let t=_(e).split(`/`);if(t.length!==3||t[0].length!==4)return null;let n=parseInt(t[0],10),r=parseInt(t[1],10),a=parseInt(t[2],10);if(isNaN(n)||isNaN(r)||isNaN(a))return null;let o=i[String(n)]?.[w[r-1]];return!o||r<1||r>12||a<1||a>o?null:{year:n,month:r,day:a}}function E({value:e,onChange:i,className:a}){let[o,s]=(0,r.useState)(null),[c,l]=(0,r.useState)(``),[u,d]=(0,r.useState)(null),f=e===void 0?u:e,p=(0,r.useRef)(null),m=(0,r.useRef)(null),h=(0,r.useRef)(null),y=e=>{d(e),i?.(e)},b=()=>{let e=T(c);e?(y(e),console.log(`Selected Date:`,g(e))):c&&y(null),l(``)};return(0,r.useLayoutEffect)(()=>{m.current&&h.current!==null&&m.current.setSelectionRange(h.current,h.current)},[c]),(0,x.jsx)(`div`,{className:a,children:(0,x.jsxs)(t.Box,{sx:{m:`0px`},children:[(0,x.jsx)(t.Box,{ref:p,children:(0,x.jsx)(t.TextField,{label:f?``:`मिति छान्‍नुहोस् `,size:`small`,sx:{" .MuiInputBase-input":{height:`20px`}},value:c?v(c):f?g(f):``,placeholder:` YYYY/MM/DD`,onChange:e=>{let t=e.target,n=t.selectionStart??0,r=_(t.value);r=r.split(``).filter(e=>e>=`0`&&e<=`9`||e===`/`).join(``);let i=r.length;(r.length===4&&!r.includes(`/`)||r.length===7&&r.split(`/`).length===2)&&(r+=`/`),r.length>i&&n===i&&(n+=1),h.current=n,l(r.slice(0,10))},onFocus:()=>{if(f&&!c){let e=f.year;l(`${e}/${String(f.month).padStart(2,`0`)}/${String(f.day).padStart(2,`0`)}`)}},onBlur:b,onKeyDown:e=>{e.key===`Enter`&&b()},slotProps:{input:{inputRef:m,sx:{pl:`8px`,fontSize:`18px`},endAdornment:(0,x.jsx)(t.InputAdornment,{position:`end`,children:(0,x.jsx)(t.IconButton,{onClick:()=>s(p.current),children:(0,x.jsx)(n.CalendarIcon,{})})})}}})}),(0,x.jsx)(t.Popover,{open:!!o,anchorEl:o,onClose:()=>s(null),anchorOrigin:{vertical:`bottom`,horizontal:`left`},children:(0,x.jsx)(C,{selectDate:f,onSelectDate:e=>{y(e),l(``),s(null),console.log(`Selected Date:`,g(e))}})})]})})}exports.InputCalendar=E;
@@ -1745,70 +1745,75 @@ function R(e) {
1745
1745
  }
1746
1746
  //#endregion
1747
1747
  //#region src/components/InputCalendar.tsx
1748
- function z() {
1749
- let [t, i] = m(null), [o, c] = m(null), [u, d] = m(""), h = p(null), g = p(null), _ = p(null), v = () => {
1750
- let e = R(u);
1751
- e ? (c(e), console.log("Selected Date:", O(e))) : u && c(null), d("");
1748
+ function z({ value: t, onChange: i, className: o }) {
1749
+ let [c, u] = m(null), [d, h] = m(""), [g, _] = m(null), v = t === void 0 ? g : t, y = p(null), b = p(null), x = p(null), S = (e) => {
1750
+ _(e), i?.(e);
1751
+ }, C = () => {
1752
+ let e = R(d);
1753
+ e ? (S(e), console.log("Selected Date:", O(e))) : d && S(null), h("");
1752
1754
  };
1753
1755
  return f(() => {
1754
- g.current && _.current !== null && g.current.setSelectionRange(_.current, _.current);
1755
- }, [u]), /* @__PURE__ */ (0, P.jsx)("div", { children: /* @__PURE__ */ (0, P.jsxs)(e, {
1756
- sx: { m: "0px" },
1757
- children: [/* @__PURE__ */ (0, P.jsx)(e, {
1758
- ref: h,
1759
- children: /* @__PURE__ */ (0, P.jsx)(s, {
1760
- label: o ? "" : "मिति छान्‍नुहोस् ",
1761
- size: "small",
1762
- sx: { " .MuiInputBase-input": { height: "20px" } },
1763
- value: u ? A(u) : o ? O(o) : "",
1764
- placeholder: " YYYY/MM/DD",
1765
- onChange: (e) => {
1766
- let t = e.target, n = t.selectionStart ?? 0, r = k(t.value);
1767
- r = r.split("").filter((e) => e >= "0" && e <= "9" || e === "/").join("");
1768
- let i = r.length;
1769
- (r.length === 4 && !r.includes("/") || r.length === 7 && r.split("/").length === 2) && (r += "/"), r.length > i && n === i && (n += 1), _.current = n, d(r.slice(0, 10));
1770
- },
1771
- onFocus: () => {
1772
- if (o && !u) {
1773
- let e = o.year;
1774
- d(`${e}/${String(o.month).padStart(2, "0")}/${String(o.day).padStart(2, "0")}`);
1775
- }
1776
- },
1777
- onBlur: v,
1778
- onKeyDown: (e) => {
1779
- e.key === "Enter" && v();
1780
- },
1781
- slotProps: { input: {
1782
- inputRef: g,
1783
- sx: {
1784
- pl: "8px",
1785
- fontSize: "18px"
1756
+ b.current && x.current !== null && b.current.setSelectionRange(x.current, x.current);
1757
+ }, [d]), /* @__PURE__ */ (0, P.jsx)("div", {
1758
+ className: o,
1759
+ children: /* @__PURE__ */ (0, P.jsxs)(e, {
1760
+ sx: { m: "0px" },
1761
+ children: [/* @__PURE__ */ (0, P.jsx)(e, {
1762
+ ref: y,
1763
+ children: /* @__PURE__ */ (0, P.jsx)(s, {
1764
+ label: v ? "" : "मिति छान्‍नुहोस् ",
1765
+ size: "small",
1766
+ sx: { " .MuiInputBase-input": { height: "20px" } },
1767
+ value: d ? A(d) : v ? O(v) : "",
1768
+ placeholder: " YYYY/MM/DD",
1769
+ onChange: (e) => {
1770
+ let t = e.target, n = t.selectionStart ?? 0, r = k(t.value);
1771
+ r = r.split("").filter((e) => e >= "0" && e <= "9" || e === "/").join("");
1772
+ let i = r.length;
1773
+ (r.length === 4 && !r.includes("/") || r.length === 7 && r.split("/").length === 2) && (r += "/"), r.length > i && n === i && (n += 1), x.current = n, h(r.slice(0, 10));
1774
+ },
1775
+ onFocus: () => {
1776
+ if (v && !d) {
1777
+ let e = v.year;
1778
+ h(`${e}/${String(v.month).padStart(2, "0")}/${String(v.day).padStart(2, "0")}`);
1779
+ }
1780
+ },
1781
+ onBlur: C,
1782
+ onKeyDown: (e) => {
1783
+ e.key === "Enter" && C();
1786
1784
  },
1787
- endAdornment: /* @__PURE__ */ (0, P.jsx)(r, {
1788
- position: "end",
1789
- children: /* @__PURE__ */ (0, P.jsx)(n, {
1790
- onClick: () => i(h.current),
1791
- children: /* @__PURE__ */ (0, P.jsx)(l, {})
1785
+ slotProps: { input: {
1786
+ inputRef: b,
1787
+ sx: {
1788
+ pl: "8px",
1789
+ fontSize: "18px"
1790
+ },
1791
+ endAdornment: /* @__PURE__ */ (0, P.jsx)(r, {
1792
+ position: "end",
1793
+ children: /* @__PURE__ */ (0, P.jsx)(n, {
1794
+ onClick: () => u(y.current),
1795
+ children: /* @__PURE__ */ (0, P.jsx)(l, {})
1796
+ })
1792
1797
  })
1793
- })
1794
- } }
1795
- })
1796
- }), /* @__PURE__ */ (0, P.jsx)(a, {
1797
- open: !!t,
1798
- anchorEl: t,
1799
- onClose: () => i(null),
1800
- anchorOrigin: {
1801
- vertical: "bottom",
1802
- horizontal: "left"
1803
- },
1804
- children: /* @__PURE__ */ (0, P.jsx)(I, {
1805
- selectDate: o,
1806
- onSelectDate: (e) => {
1807
- c(e), d(""), i(null), console.log("Selected Date:", O(e));
1808
- }
1809
- })
1810
- })]
1811
- }) });
1798
+ } }
1799
+ })
1800
+ }), /* @__PURE__ */ (0, P.jsx)(a, {
1801
+ open: !!c,
1802
+ anchorEl: c,
1803
+ onClose: () => u(null),
1804
+ anchorOrigin: {
1805
+ vertical: "bottom",
1806
+ horizontal: "left"
1807
+ },
1808
+ children: /* @__PURE__ */ (0, P.jsx)(I, {
1809
+ selectDate: v,
1810
+ onSelectDate: (e) => {
1811
+ S(e), h(""), u(null), console.log("Selected Date:", O(e));
1812
+ }
1813
+ })
1814
+ })]
1815
+ })
1816
+ });
1812
1817
  }
1813
1818
  //#endregion
1814
1819
  export { z as InputCalendar };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sonygrg/nepali-datepicker",
3
3
  "private": false,
4
- "version": "1.0.7",
4
+ "version": "1.0.11",
5
5
  "type": "module",
6
6
  "main": "./dist/nepali-datepicker.cjs.js",
7
7
  "module": "./dist/nepali-datepicker.es.js",