infinite-scroll-calendar 0.0.2 → 0.0.4
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/dist/index.cjs +8 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +630 -670
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/ui/parts/day/index.d.ts +1 -1
- package/dist/ui/parts/expandable-zone/index.d.ts +1 -1
- package/dist/ui/parts/month/index.d.ts +1 -1
- package/dist/ui/parts/week/index.d.ts +1 -1
- package/dist/ui/parts/weekday-header/index.d.ts +1 -1
- package/package.json +13 -3
- package/dist/ui/parts/utils.d.ts +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,31 +1,15 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Me;function br(){if(Me)return z;Me=1;var t=M,n=Symbol.for("react.element"),l=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,o=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function r(h,d,g){var b,v={},w=null,j=null;g!==void 0&&(w=""+g),d.key!==void 0&&(w=""+d.key),d.ref!==void 0&&(j=d.ref);for(b in d)c.call(d,b)&&!i.hasOwnProperty(b)&&(v[b]=d[b]);if(h&&h.defaultProps)for(b in d=h.defaultProps,d)v[b]===void 0&&(v[b]=d[b]);return{$$typeof:n,type:h,key:w,ref:j,props:v,_owner:o.current}}return z.Fragment=l,z.jsx=r,z.jsxs=r,z}var ee={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.development.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Ve;function hr(){return Ve||(Ve=1,process.env.NODE_ENV!=="production"&&function(){var t=M,n=Symbol.for("react.element"),l=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),r=Symbol.for("react.provider"),h=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),j=Symbol.for("react.offscreen"),C=Symbol.iterator,S="@@iterator";function V(e){if(e===null||typeof e!="object")return null;var a=C&&e[C]||e[S];return typeof a=="function"?a:null}var O=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(e){{for(var a=arguments.length,s=new Array(a>1?a-1:0),u=1;u<a;u++)s[u-1]=arguments[u];re("error",e,s)}}function re(e,a,s){{var u=O.ReactDebugCurrentFrame,_=u.getStackAddendum();_!==""&&(a+="%s",s=s.concat([_]));var R=s.map(function(p){return String(p)});R.unshift("Warning: "+a),Function.prototype.apply.call(console[e],console,R)}}var ae=!1,ne=!1,m=!1,W=!1,L=!1,Y;Y=Symbol.for("react.module.reference");function U(e){return!!(typeof e=="string"||typeof e=="function"||e===c||e===i||L||e===o||e===g||e===b||W||e===j||ae||ne||m||typeof e=="object"&&e!==null&&(e.$$typeof===w||e.$$typeof===v||e.$$typeof===r||e.$$typeof===h||e.$$typeof===d||e.$$typeof===Y||e.getModuleId!==void 0))}function I(e,a,s){var u=e.displayName;if(u)return u;var _=a.displayName||a.name||"";return _!==""?s+"("+_+")":s}function J(e){return e.displayName||"Context"}function D(e){if(e==null)return null;if(typeof e.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case c:return"Fragment";case l:return"Portal";case i:return"Profiler";case o:return"StrictMode";case g:return"Suspense";case b:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case h:var a=e;return J(a)+".Consumer";case r:var s=e;return J(s._context)+".Provider";case d:return I(e,e.render,"ForwardRef");case v:var u=e.displayName||null;return u!==null?u:D(e.type)||"Memo";case w:{var _=e,R=_._payload,p=_._init;try{return D(p(R))}catch{return null}}}return null}var A=Object.assign,$=0,H,G,Z,X,Re,me,Ee;function xe(){}xe.__reactDisabledLog=!0;function Ue(){{if($===0){H=console.log,G=console.info,Z=console.warn,X=console.error,Re=console.group,me=console.groupCollapsed,Ee=console.groupEnd;var e={configurable:!0,enumerable:!0,value:xe,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}$++}}function qe(){{if($--,$===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},e,{value:H}),info:A({},e,{value:G}),warn:A({},e,{value:Z}),error:A({},e,{value:X}),group:A({},e,{value:Re}),groupCollapsed:A({},e,{value:me}),groupEnd:A({},e,{value:Ee})})}$<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ie=O.ReactCurrentDispatcher,ue;function te(e,a,s){{if(ue===void 0)try{throw Error()}catch(_){var u=_.stack.trim().match(/\n( *(at )?)/);ue=u&&u[1]||""}return`
|
|
18
|
-
`+ue+e}}var de=!1,se;{var Ke=typeof WeakMap=="function"?WeakMap:Map;se=new Ke}function we(e,a){if(!e||de)return"";{var s=se.get(e);if(s!==void 0)return s}var u;de=!0;var _=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var R;R=ie.current,ie.current=null,Ue();try{if(a){var p=function(){throw Error()};if(Object.defineProperty(p.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(p,[])}catch(T){u=T}Reflect.construct(e,[],p)}else{try{p.call()}catch(T){u=T}e.call(p.prototype)}}else{try{throw Error()}catch(T){u=T}e()}}catch(T){if(T&&u&&typeof T.stack=="string"){for(var f=T.stack.split(`
|
|
19
|
-
`),N=u.stack.split(`
|
|
20
|
-
`),x=f.length-1,k=N.length-1;x>=1&&k>=0&&f[x]!==N[k];)k--;for(;x>=1&&k>=0;x--,k--)if(f[x]!==N[k]){if(x!==1||k!==1)do if(x--,k--,k<0||f[x]!==N[k]){var P=`
|
|
21
|
-
`+f[x].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),typeof e=="function"&&se.set(e,P),P}while(x>=1&&k>=0);break}}}finally{de=!1,ie.current=R,qe(),Error.prepareStackTrace=_}var B=e?e.displayName||e.name:"",q=B?te(B):"";return typeof e=="function"&&se.set(e,q),q}function Be(e,a,s){return we(e,!1)}function Je(e){var a=e.prototype;return!!(a&&a.isReactComponent)}function oe(e,a,s){if(e==null)return"";if(typeof e=="function")return we(e,Je(e));if(typeof e=="string")return te(e);switch(e){case g:return te("Suspense");case b:return te("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case d:return Be(e.render);case v:return oe(e.type,a,s);case w:{var u=e,_=u._payload,R=u._init;try{return oe(R(_),a,s)}catch{}}}return""}var Q=Object.prototype.hasOwnProperty,ke={},je=O.ReactDebugCurrentFrame;function le(e){if(e){var a=e._owner,s=oe(e.type,e._source,a?a.type:null);je.setExtraStackFrame(s)}else je.setExtraStackFrame(null)}function He(e,a,s,u,_){{var R=Function.call.bind(Q);for(var p in e)if(R(e,p)){var f=void 0;try{if(typeof e[p]!="function"){var N=Error((u||"React class")+": "+s+" type `"+p+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[p]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw N.name="Invariant Violation",N}f=e[p](a,p,u,s,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(x){f=x}f&&!(f instanceof Error)&&(le(_),E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",u||"React class",s,p,typeof f),le(null)),f instanceof Error&&!(f.message in ke)&&(ke[f.message]=!0,le(_),E("Failed %s type: %s",s,f.message),le(null))}}}var Ge=Array.isArray;function fe(e){return Ge(e)}function Ze(e){{var a=typeof Symbol=="function"&&Symbol.toStringTag,s=a&&e[Symbol.toStringTag]||e.constructor.name||"Object";return s}}function Xe(e){try{return Ne(e),!1}catch{return!0}}function Ne(e){return""+e}function Se(e){if(Xe(e))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ze(e)),Ne(e)}var Te=O.ReactCurrentOwner,Qe={key:!0,ref:!0,__self:!0,__source:!0},Ce,Oe;function ze(e){if(Q.call(e,"ref")){var a=Object.getOwnPropertyDescriptor(e,"ref").get;if(a&&a.isReactWarning)return!1}return e.ref!==void 0}function er(e){if(Q.call(e,"key")){var a=Object.getOwnPropertyDescriptor(e,"key").get;if(a&&a.isReactWarning)return!1}return e.key!==void 0}function rr(e,a){typeof e.ref=="string"&&Te.current}function ar(e,a){{var s=function(){Ce||(Ce=!0,E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",a))};s.isReactWarning=!0,Object.defineProperty(e,"key",{get:s,configurable:!0})}}function nr(e,a){{var s=function(){Oe||(Oe=!0,E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",a))};s.isReactWarning=!0,Object.defineProperty(e,"ref",{get:s,configurable:!0})}}var tr=function(e,a,s,u,_,R,p){var f={$$typeof:n,type:e,key:a,ref:s,props:p,_owner:R};return f._store={},Object.defineProperty(f._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(f,"_self",{configurable:!1,enumerable:!1,writable:!1,value:u}),Object.defineProperty(f,"_source",{configurable:!1,enumerable:!1,writable:!1,value:_}),Object.freeze&&(Object.freeze(f.props),Object.freeze(f)),f};function sr(e,a,s,u,_){{var R,p={},f=null,N=null;s!==void 0&&(Se(s),f=""+s),er(a)&&(Se(a.key),f=""+a.key),ze(a)&&(N=a.ref,rr(a,_));for(R in a)Q.call(a,R)&&!Qe.hasOwnProperty(R)&&(p[R]=a[R]);if(e&&e.defaultProps){var x=e.defaultProps;for(R in x)p[R]===void 0&&(p[R]=x[R])}if(f||N){var k=typeof e=="function"?e.displayName||e.name||"Unknown":e;f&&ar(p,k),N&&nr(p,k)}return tr(e,f,N,_,u,Te.current,p)}}var ve=O.ReactCurrentOwner,Pe=O.ReactDebugCurrentFrame;function K(e){if(e){var a=e._owner,s=oe(e.type,e._source,a?a.type:null);Pe.setExtraStackFrame(s)}else Pe.setExtraStackFrame(null)}var pe;pe=!1;function ye(e){return typeof e=="object"&&e!==null&&e.$$typeof===n}function De(){{if(ve.current){var e=D(ve.current.type);if(e)return`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react"),Fe=require("date-fns");var q={exports:{}},V={};var Ce;function hr(){if(Ce)return V;Ce=1;var o=O,s=Symbol.for("react.element"),l=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,n=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function a(d,v,g){var R,h={},_=null,T=null;g!==void 0&&(_=""+g),v.key!==void 0&&(_=""+v.key),v.ref!==void 0&&(T=v.ref);for(R in v)c.call(v,R)&&!u.hasOwnProperty(R)&&(h[R]=v[R]);if(d&&d.defaultProps)for(R in v=d.defaultProps,v)h[R]===void 0&&(h[R]=v[R]);return{$$typeof:s,type:d,key:_,ref:T,props:h,_owner:n.current}}return V.Fragment=l,V.jsx=a,V.jsxs=a,V}var $={};var Ne;function _r(){return Ne||(Ne=1,process.env.NODE_ENV!=="production"&&(function(){var o=O,s=Symbol.for("react.element"),l=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),d=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),T=Symbol.for("react.offscreen"),C=Symbol.iterator,P="@@iterator";function Ae(e){if(e===null||typeof e!="object")return null;var r=C&&e[C]||e[P];return typeof r=="function"?r:null}var L=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function k(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),i=1;i<r;i++)t[i-1]=arguments[i];Ie("error",e,t)}}function Ie(e,r,t){{var i=L.ReactDebugCurrentFrame,y=i.getStackAddendum();y!==""&&(r+="%s",t=t.concat([y]));var b=t.map(function(m){return String(m)});b.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,b)}}var We=!1,Me=!1,Ve=!1,$e=!1,Ye=!1,ne;ne=Symbol.for("react.module.reference");function Be(e){return!!(typeof e=="string"||typeof e=="function"||e===c||e===u||Ye||e===n||e===g||e===R||$e||e===T||We||Me||Ve||typeof e=="object"&&e!==null&&(e.$$typeof===_||e.$$typeof===h||e.$$typeof===a||e.$$typeof===d||e.$$typeof===v||e.$$typeof===ne||e.getModuleId!==void 0))}function Ue(e,r,t){var i=e.displayName;if(i)return i;var y=r.displayName||r.name||"";return y!==""?t+"("+y+")":t}function oe(e){return e.displayName||"Context"}function N(e){if(e==null)return null;if(typeof e.tag=="number"&&k("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case c:return"Fragment";case l:return"Portal";case u:return"Profiler";case n:return"StrictMode";case g:return"Suspense";case R:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case d:var r=e;return oe(r)+".Consumer";case a:var t=e;return oe(t._context)+".Provider";case v:return Ue(e,e.render,"ForwardRef");case h:var i=e.displayName||null;return i!==null?i:N(e.type)||"Memo";case _:{var y=e,b=y._payload,m=y._init;try{return N(m(b))}catch{return null}}}return null}var D=Object.assign,W=0,se,ie,le,ce,ue,de,fe;function ve(){}ve.__reactDisabledLog=!0;function Ke(){{if(W===0){se=console.log,ie=console.info,le=console.warn,ce=console.error,ue=console.group,de=console.groupCollapsed,fe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ve,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}W++}}function qe(){{if(W--,W===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:D({},e,{value:se}),info:D({},e,{value:ie}),warn:D({},e,{value:le}),error:D({},e,{value:ce}),group:D({},e,{value:ue}),groupCollapsed:D({},e,{value:de}),groupEnd:D({},e,{value:fe})})}W<0&&k("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var J=L.ReactCurrentDispatcher,H;function Y(e,r,t){{if(H===void 0)try{throw Error()}catch(y){var i=y.stack.trim().match(/\n( *(at )?)/);H=i&&i[1]||""}return`
|
|
2
|
+
`+H+e}}var G=!1,B;{var Je=typeof WeakMap=="function"?WeakMap:Map;B=new Je}function me(e,r){if(!e||G)return"";{var t=B.get(e);if(t!==void 0)return t}var i;G=!0;var y=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var b;b=J.current,J.current=null,Ke();try{if(r){var m=function(){throw Error()};if(Object.defineProperty(m.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(m,[])}catch(j){i=j}Reflect.construct(e,[],m)}else{try{m.call()}catch(j){i=j}e.call(m.prototype)}}else{try{throw Error()}catch(j){i=j}e()}}catch(j){if(j&&i&&typeof j.stack=="string"){for(var f=j.stack.split(`
|
|
3
|
+
`),w=i.stack.split(`
|
|
4
|
+
`),E=f.length-1,x=w.length-1;E>=1&&x>=0&&f[E]!==w[x];)x--;for(;E>=1&&x>=0;E--,x--)if(f[E]!==w[x]){if(E!==1||x!==1)do if(E--,x--,x<0||f[E]!==w[x]){var S=`
|
|
5
|
+
`+f[E].replace(" at new "," at ");return e.displayName&&S.includes("<anonymous>")&&(S=S.replace("<anonymous>",e.displayName)),typeof e=="function"&&B.set(e,S),S}while(E>=1&&x>=0);break}}}finally{G=!1,J.current=b,qe(),Error.prepareStackTrace=y}var I=e?e.displayName||e.name:"",F=I?Y(I):"";return typeof e=="function"&&B.set(e,F),F}function He(e,r,t){return me(e,!1)}function Ge(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function U(e,r,t){if(e==null)return"";if(typeof e=="function")return me(e,Ge(e));if(typeof e=="string")return Y(e);switch(e){case g:return Y("Suspense");case R:return Y("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case v:return He(e.render);case h:return U(e.type,r,t);case _:{var i=e,y=i._payload,b=i._init;try{return U(b(y),r,t)}catch{}}}return""}var M=Object.prototype.hasOwnProperty,pe={},ye=L.ReactDebugCurrentFrame;function K(e){if(e){var r=e._owner,t=U(e.type,e._source,r?r.type:null);ye.setExtraStackFrame(t)}else ye.setExtraStackFrame(null)}function Xe(e,r,t,i,y){{var b=Function.call.bind(M);for(var m in e)if(b(e,m)){var f=void 0;try{if(typeof e[m]!="function"){var w=Error((i||"React class")+": "+t+" type `"+m+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[m]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw w.name="Invariant Violation",w}f=e[m](r,m,i,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(E){f=E}f&&!(f instanceof Error)&&(K(y),k("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",i||"React class",t,m,typeof f),K(null)),f instanceof Error&&!(f.message in pe)&&(pe[f.message]=!0,K(y),k("Failed %s type: %s",t,f.message),K(null))}}}var Ze=Array.isArray;function X(e){return Ze(e)}function ze(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Qe(e){try{return be(e),!1}catch{return!0}}function be(e){return""+e}function he(e){if(Qe(e))return k("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ze(e)),be(e)}var _e=L.ReactCurrentOwner,er={key:!0,ref:!0,__self:!0,__source:!0},ge,Re;function rr(e){if(M.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function tr(e){if(M.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function ar(e,r){typeof e.ref=="string"&&_e.current}function nr(e,r){{var t=function(){ge||(ge=!0,k("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function or(e,r){{var t=function(){Re||(Re=!0,k("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var sr=function(e,r,t,i,y,b,m){var f={$$typeof:s,type:e,key:r,ref:t,props:m,_owner:b};return f._store={},Object.defineProperty(f._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(f,"_self",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.defineProperty(f,"_source",{configurable:!1,enumerable:!1,writable:!1,value:y}),Object.freeze&&(Object.freeze(f.props),Object.freeze(f)),f};function ir(e,r,t,i,y){{var b,m={},f=null,w=null;t!==void 0&&(he(t),f=""+t),tr(r)&&(he(r.key),f=""+r.key),rr(r)&&(w=r.ref,ar(r,y));for(b in r)M.call(r,b)&&!er.hasOwnProperty(b)&&(m[b]=r[b]);if(e&&e.defaultProps){var E=e.defaultProps;for(b in E)m[b]===void 0&&(m[b]=E[b])}if(f||w){var x=typeof e=="function"?e.displayName||e.name||"Unknown":e;f&&nr(m,x),w&&or(m,x)}return sr(e,f,w,y,i,_e.current,m)}}var Z=L.ReactCurrentOwner,Ee=L.ReactDebugCurrentFrame;function A(e){if(e){var r=e._owner,t=U(e.type,e._source,r?r.type:null);Ee.setExtraStackFrame(t)}else Ee.setExtraStackFrame(null)}var z;z=!1;function Q(e){return typeof e=="object"&&e!==null&&e.$$typeof===s}function xe(){{if(Z.current){var e=N(Z.current.type);if(e)return`
|
|
22
6
|
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function
|
|
7
|
+
Check the render method of \``+e+"`."}return""}}function lr(e){return""}var ke={};function cr(e){{var r=xe();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
24
8
|
|
|
25
|
-
Check the top-level render call using <`+
|
|
9
|
+
Check the top-level render call using <`+t+">.")}return r}}function we(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=cr(r);if(ke[t])return;ke[t]=!0;var i="";e&&e._owner&&e._owner!==Z.current&&(i=" It was passed a child from "+N(e._owner.type)+"."),A(e),k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,i),A(null)}}function je(e,r){{if(typeof e!="object")return;if(X(e))for(var t=0;t<e.length;t++){var i=e[t];Q(i)&&we(i,r)}else if(Q(e))e._store&&(e._store.validated=!0);else if(e){var y=Ae(e);if(typeof y=="function"&&y!==e.entries)for(var b=y.call(e),m;!(m=b.next()).done;)Q(m.value)&&we(m.value,r)}}}function ur(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===v||r.$$typeof===h))t=r.propTypes;else return;if(t){var i=N(r);Xe(t,e.props,"prop",i,e)}else if(r.PropTypes!==void 0&&!z){z=!0;var y=N(r);k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",y||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&k("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function dr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var i=r[t];if(i!=="children"&&i!=="key"){A(e),k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",i),A(null);break}}e.ref!==null&&(A(e),k("Invalid attribute `ref` supplied to `React.Fragment`."),A(null))}}var Se={};function Te(e,r,t,i,y,b){{var m=Be(e);if(!m){var f="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(f+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var w=lr();w?f+=w:f+=xe();var E;e===null?E="null":X(e)?E="array":e!==void 0&&e.$$typeof===s?(E="<"+(N(e.type)||"Unknown")+" />",f=" Did you accidentally export a JSX literal instead of a component?"):E=typeof e,k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",E,f)}var x=ir(e,r,t,y,b);if(x==null)return x;if(m){var S=r.children;if(S!==void 0)if(i)if(X(S)){for(var I=0;I<S.length;I++)je(S[I],e);Object.freeze&&Object.freeze(S)}else k("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else je(S,e)}if(M.call(r,"key")){var F=N(e),j=Object.keys(r).filter(function(br){return br!=="key"}),ee=j.length>0?"{key: someKey, "+j.join(": ..., ")+": ...}":"{key: someKey}";if(!Se[F+ee]){var yr=j.length>0?"{"+j.join(": ..., ")+": ...}":"{}";k(`A props object containing a "key" prop is being spread into JSX:
|
|
26
10
|
let props = %s;
|
|
27
11
|
<%s {...props} />
|
|
28
12
|
React keys must be passed directly to JSX without using spread:
|
|
29
13
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,
|
|
14
|
+
<%s key={someKey} {...props} />`,ee,F,yr,F),Se[F+ee]=!0}}return e===c?dr(x):ur(x),x}}function fr(e,r,t){return Te(e,r,t,!0)}function vr(e,r,t){return Te(e,r,t,!1)}var mr=vr,pr=fr;$.Fragment=c,$.jsx=mr,$.jsxs=pr})()),$}var Oe;function gr(){return Oe||(Oe=1,process.env.NODE_ENV==="production"?q.exports=hr():q.exports=_r()),q.exports}var p=gr();function Rr(o){return!o||!o.hasContent?!1:o.hasUncompletedTodo?"primary":"secondary"}function te(o){const{key:s,value:l,selectionEnabled:c=!0,metadata:n,outside:u=!1,date:a}=o,d=c&&l.key===s,v=!!a&&Fe.isToday(a);return{indicator:u?!1:Rr(n?.[s]),selected:d,today:v}}function Er(o,s){if(s.kind==="month")return{beforeRows:[],activeRows:o,afterRows:[]};const l=o.findIndex(c=>c.some(n=>n.value===s.key));return l<0?{beforeRows:[],activeRows:o,afterRows:[]}:{beforeRows:o.slice(0,l),activeRows:[o[l]],afterRows:o.slice(l+1)}}function xr(o){return typeof o.month=="number"?Fe.format(new Date(o.year,o.month-1,1),"LLLL"):o.weekKey??o.id}function kr(o,s,l=!0,c){return o.items.map(n=>{if(n.kind==="marker"){const d=te({key:n.meta?.weekKey??n.id,value:s,selectionEnabled:l,metadata:c});return{kind:"week",key:n.id,label:n.meta?.weekNumber??0,value:n.meta?.weekKey??n.id,weekNumber:n.meta?.weekNumber??0,selected:d.selected,indicator:d.indicator}}const u=n,a=te({key:u.dayKey,value:s,selectionEnabled:l,metadata:c,outside:!u.inMonth,date:u.date});return{kind:"day",key:u.dayKey,label:u.date.getDate(),value:u.dayKey,date:u.date,today:a.today,selected:a.selected,outside:!u.inMonth,indicator:a.indicator}})}function wr(o){const{data:s,value:l,selectionEnabled:c=!0,metadata:n,expanded:u}=o;return{expanded:u,sections:s.map(a=>{const d=a.rows.map(h=>kr(h,l,c,n)),v=Er(d,l),g=a.monthKey??a.id,R=te({key:g,value:l,selectionEnabled:c,metadata:n}).indicator;return{key:a.id,monthLabel:xr(a),monthValue:g,year:a.year,month:a.month,selected:l.kind==="month"&&l.key===g,indicator:R,...v}})}}function jr(o){const{value:s,defaultValue:l,onValueChange:c,expanded:n,defaultExpanded:u=!1,onExpandedChange:a}=o,[d,v]=O.useState(l??{kind:"month",key:""}),[g,R]=O.useState(u),h=s??d,_=n??g,T=O.useCallback(P=>{s===void 0&&v(P),c?.(P)},[s,c]),C=O.useCallback(P=>{n===void 0&&R(P),a?.(P)},[n,a]);return O.useMemo(()=>({value:h,setValue:T,expanded:_,setExpanded:C}),[_,C,T,h])}const Sr="_root_19cwz_1",Pe="_toggle_19cwz_7",Tr="_root_1axuh_1",Cr="_section_1axuh_7",Nr="_row_1axuh_11",Or="_root_1cwda_1",Pr="_inner_1cwda_12";function De(o){const{expanded:s,className:l,children:c}=o;return p.jsx("div",{className:[Or,l].filter(Boolean).join(" "),"data-expanded":s,"aria-hidden":!s,children:p.jsx("div",{className:Pr,children:c})})}const Dr="_root_1n4q2_1",Fr="_indicator_1n4q2_21";function Lr(o){const{label:s,className:l,selected:c,today:n,outside:u,indicator:a,onSelect:d}=o;return p.jsxs("button",{type:"button",className:[Dr,l].filter(Boolean).join(" "),"data-selected":c,"data-today":n,"data-outside":u,onClick:d,children:[s,a&&p.jsx("span",{className:Fr,"data-indicator":a})]})}const Ar="_root_ycn9u_1",Ir="_indicator_ycn9u_14";function Wr(o){const{label:s,className:l,selected:c,indicator:n,onSelect:u}=o;return p.jsxs("button",{type:"button",className:[Ar,l].filter(Boolean).join(" "),"data-selected":c,onClick:u,children:[s,n&&p.jsx("span",{className:Ir,"data-indicator":n})]})}const Mr="_root_1sc26_1",Vr="_indicator_1sc26_13";function $r(o){const{label:s,className:l,selected:c,indicator:n,onSelect:u}=o;return p.jsxs("button",{type:"button",className:[Mr,l].filter(Boolean).join(" "),"data-selected":c,onClick:u,children:[s,n&&p.jsx("span",{className:Vr,"data-indicator":n})]})}const Yr="_root_1npxx_1",Br="_root_12rog_1";function Ur({label:o,className:s}){return p.jsx("span",{className:[Br,s].filter(Boolean).join(" "),children:o})}const Kr=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function qr(o){const{labels:s=Kr,className:l,dayNameClassName:c}=o;return p.jsxs("div",{className:[Yr,l].filter(Boolean).join(" "),children:[p.jsx("span",{}),s.map((n,u)=>p.jsx(Ur,{label:n,className:c},`weekday-${u}`))]})}const Jr=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function ae(...o){return o.filter(Boolean).join(" ")||void 0}function Hr(o,s,l,c){if(o.kind==="week"){const d=o,v=s?.formatters?.weekLabel?.(d)??`W${d.label}`,g=s?.slots?.week;return g?p.jsx(g,{item:d,label:v,className:s?.classNames?.week,onSelect:()=>c?.(d.value)},d.key):p.jsx($r,{label:v,className:s?.classNames?.week,selected:d.selected,indicator:d.indicator,onSelect:()=>c?.(d.value)},d.key)}const n=o,u=s?.formatters?.dayLabel?.(n)??n.label,a=s?.slots?.day;return a?p.jsx(a,{item:n,label:u,className:s?.classNames?.day,onSelect:()=>l?.(n.value)},n.key):p.jsx(Lr,{label:u,className:s?.classNames?.day,selected:n.selected,today:n.today,outside:n.outside,indicator:n.indicator,onSelect:()=>l?.(n.value)},n.key)}function re(o,s,l,c){return o.map((n,u)=>p.jsx("div",{className:ae(Nr,s?.classNames?.row),children:n.map(a=>Hr(a,s,l,c))},`row-${u}`))}function Gr(o){const{sections:s,expanded:l,onDaySelect:c,onWeekSelect:n,onMonthSelect:u,customization:a}=o,d=a?.weekdayLabels?.length?a.weekdayLabels:Jr,v=a?.slots?.weekdayHeader,g=a?.slots?.dayName,R=a?.slots?.month,h=a?.classNames?.dayName;return p.jsx("div",{className:ae(Tr,a?.classNames?.grid),children:s.map(_=>p.jsxs("section",{className:ae(Cr,a?.classNames?.section),children:[R?p.jsx(R,{section:_,label:a?.formatters?.monthLabel?.(_)??_.monthLabel,className:a?.classNames?.month,onSelect:()=>u?.(_.monthValue)}):p.jsx(Wr,{label:a?.formatters?.monthLabel?.(_)??_.monthLabel,className:a?.classNames?.month,selected:_.selected,indicator:_.indicator,onSelect:()=>u?.(_.monthValue)}),v?p.jsx(v,{labels:d.map((T,C)=>g?p.jsx(g,{index:C,label:T,className:h},`weekday-${C}`):T),className:a?.classNames?.weekdayHeader,dayNameClassName:h}):p.jsx(qr,{labels:d,className:a?.classNames?.weekdayHeader,dayNameClassName:h}),p.jsx(De,{expanded:l,className:a?.classNames?.expandableZone,children:re(_.beforeRows,a,c,n)}),re(_.activeRows,a,c,n),p.jsx(De,{expanded:l,className:a?.classNames?.expandableZone,children:re(_.afterRows,a,c,n)})]},_.key))})}function Xr(o){const{model:s,onDaySelect:l,onWeekSelect:c,onMonthSelect:n,onExpandedChange:u,customization:a}=o,d=a?.slots?.toggle,v=a?.formatters?.toggleLabel?.(!!s.expanded)??(s.expanded?"Collapse":"Expand");return p.jsxs("div",{className:[Sr,a?.classNames?.root].filter(Boolean).join(" "),children:[p.jsx(Gr,{sections:s.sections,expanded:!!s.expanded,onDaySelect:l,onWeekSelect:c,onMonthSelect:n,customization:a}),u&&(d?p.jsx(d,{expanded:!!s.expanded,label:v,className:[Pe,a?.classNames?.toggle].filter(Boolean).join(" "),onToggle:()=>u(!s.expanded)}):p.jsx("button",{type:"button",className:[Pe,a?.classNames?.toggle].filter(Boolean).join(" "),onClick:()=>u(!s.expanded),children:v}))]})}function Le(o){return p.jsx(Xr,{...o})}function Zr(o){const s=jr(o),{customization:l,data:c,metadata:n,selectionEnabled:u=!0}=o,{expanded:a,setExpanded:d,setValue:v,value:g}=s,R=O.useMemo(()=>wr({data:c,value:g,selectionEnabled:u,metadata:n,expanded:a}),[l,c,a,n,u,g]);return p.jsx(Le,{model:R,onDaySelect:h=>v({kind:"day",key:h}),onWeekSelect:h=>v({kind:"week",key:h}),onMonthSelect:h=>v({kind:"month",key:h}),onExpandedChange:d,customization:l})}exports.Calendar=Zr;exports.CalendarPure=Le;
|
|
31
15
|
//# sourceMappingURL=index.cjs.map
|