@ieee-ui/ui 0.0.19 → 0.0.20
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/ieee-ui.cjs.js +9 -9
- package/dist/ieee-ui.es.js +149 -148
- package/dist/src/ieee-ui/Button.d.ts +2 -1
- package/dist/src/ieee-ui/Button.d.ts.map +1 -1
- package/dist/ui.css +1 -1
- package/package.json +1 -1
package/dist/ieee-ui.cjs.js
CHANGED
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Ge;function dr(){return Ge||(Ge=1,process.env.NODE_ENV!=="production"&&(function(){function e(l){if(l==null)return null;if(typeof l=="function")return l.$$typeof===$?null:l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case
|
|
17
|
+
*/var Ge;function dr(){return Ge||(Ge=1,process.env.NODE_ENV!=="production"&&(function(){function e(l){if(l==null)return null;if(typeof l=="function")return l.$$typeof===$?null:l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case v:return"Fragment";case U:return"Profiler";case O:return"StrictMode";case F:return"Suspense";case H:return"SuspenseList";case K:return"Activity"}if(typeof l=="object")switch(typeof l.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),l.$$typeof){case N:return"Portal";case J:return l.displayName||"Context";case Z:return(l._context.displayName||"Context")+".Consumer";case Y:var c=l.render;return l=l.displayName,l||(l=c.displayName||c.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case y:return c=l.displayName||null,c!==null?c:e(l.type)||"Memo";case T:c=l._payload,l=l._init;try{return e(l(c))}catch{}}return null}function t(l){return""+l}function o(l){try{t(l);var c=!1}catch{c=!0}if(c){c=console;var u=c.error,M=typeof Symbol=="function"&&Symbol.toStringTag&&l[Symbol.toStringTag]||l.constructor.name||"Object";return u.call(c,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",M),t(l)}}function n(l){if(l===v)return"<>";if(typeof l=="object"&&l!==null&&l.$$typeof===T)return"<...>";try{var c=e(l);return c?"<"+c+">":"<...>"}catch{return"<...>"}}function s(){var l=X.A;return l===null?null:l.getOwner()}function i(){return Error("react-stack-top-frame")}function a(l){if(b.call(l,"key")){var c=Object.getOwnPropertyDescriptor(l,"key").get;if(c&&c.isReactWarning)return!1}return l.key!==void 0}function A(l,c){function u(){P||(P=!0,console.error("%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://react.dev/link/special-props)",c))}u.isReactWarning=!0,Object.defineProperty(l,"key",{get:u,configurable:!0})}function d(){var l=e(this.type);return W[l]||(W[l]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),l=this.props.ref,l!==void 0?l:null}function w(l,c,u,M,L,q){var j=u.ref;return l={$$typeof:G,type:l,key:c,props:u,_owner:M},(j!==void 0?j:null)!==null?Object.defineProperty(l,"ref",{enumerable:!1,get:d}):Object.defineProperty(l,"ref",{enumerable:!1,value:null}),l._store={},Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(l,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(l,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:L}),Object.defineProperty(l,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:q}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l}function k(l,c,u,M,L,q){var j=c.children;if(j!==void 0)if(M)if(Q(j)){for(M=0;M<j.length;M++)D(j[M]);Object.freeze&&Object.freeze(j)}else console.error("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 D(j);if(b.call(c,"key")){j=e(l);var g=Object.keys(c).filter(function(I){return I!=="key"});M=0<g.length?"{key: someKey, "+g.join(": ..., ")+": ...}":"{key: someKey}",te[j+M]||(g=0<g.length?"{"+g.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,M,j,g,j),te[j+M]=!0)}if(j=null,u!==void 0&&(o(u),j=""+u),a(c)&&(o(c.key),j=""+c.key),"key"in c){u={};for(var B in c)B!=="key"&&(u[B]=c[B])}else u=c;return j&&A(u,typeof l=="function"?l.displayName||l.name||"Unknown":l),w(l,j,u,s(),L,q)}function D(l){
|
|
23
|
-
${
|
|
24
|
-
${
|
|
25
|
-
${
|
|
22
|
+
<%s key={someKey} {...props} />`,M,j,g,j),te[j+M]=!0)}if(j=null,u!==void 0&&(o(u),j=""+u),a(c)&&(o(c.key),j=""+c.key),"key"in c){u={};for(var B in c)B!=="key"&&(u[B]=c[B])}else u=c;return j&&A(u,typeof l=="function"?l.displayName||l.name||"Unknown":l),w(l,j,u,s(),L,q)}function D(l){x(l)?l._store&&(l._store.validated=1):typeof l=="object"&&l!==null&&l.$$typeof===T&&(l._payload.status==="fulfilled"?x(l._payload.value)&&l._payload.value._store&&(l._payload.value._store.validated=1):l._store&&(l._store.validated=1))}function x(l){return typeof l=="object"&&l!==null&&l.$$typeof===G}var E=f,G=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),U=Symbol.for("react.profiler"),Z=Symbol.for("react.consumer"),J=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),K=Symbol.for("react.activity"),$=Symbol.for("react.client.reference"),X=E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,b=Object.prototype.hasOwnProperty,Q=Array.isArray,S=console.createTask?console.createTask:function(){return null};E={react_stack_bottom_frame:function(l){return l()}};var P,W={},h=E.react_stack_bottom_frame.bind(E,i)(),re=S(n(i)),te={};de.Fragment=v,de.jsx=function(l,c,u){var M=1e4>X.recentlyCreatedOwnerStacks++;return k(l,c,u,!1,M?Error("react-stack-top-frame"):h,M?S(n(l)):re)},de.jsxs=function(l,c,u){var M=1e4>X.recentlyCreatedOwnerStacks++;return k(l,c,u,!0,M?Error("react-stack-top-frame"):h,M?S(n(l)):re)}})()),de}var Ne;function gr(){return Ne||(Ne=1,process.env.NODE_ENV==="production"?me.exports=cr():me.exports=dr()),me.exports}var r=gr();const Ae=({buttonText:e,buttonIcon:t,onClick:o,type:n="primary",disabled:s,loading:i,width:a="auto",htmlType:A="button",className:d="",darkMode:w,children:k,...D})=>{const x=w??!1,E="inline-flex items-center justify-center gap-2 rounded-full font-semibold transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none",G={primary:"bg-primary text-primary-foreground hover:bg-primary/90 focus:ring-primary shadow-md hover:shadow-lg",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/90 focus:ring-secondary shadow-md hover:shadow-lg",tertiary:x?"bg-gray-800 text-gray-100 hover:bg-gray-700 focus:ring-gray-700 shadow-sm":"bg-accent text-accent-foreground hover:bg-accent/90 focus:ring-accent shadow-sm",danger:"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus:ring-destructive shadow-sm",ghost:x?"bg-transparent text-gray-100 hover:bg-white/10 focus:ring-gray-700":"bg-transparent text-primary hover:bg-primary/10 focus:ring-primary",basic:x?"bg-gray-800 text-gray-100 border border-gray-700 hover:bg-gray-700 focus:ring-gray-700":"bg-surface text-foreground border border-border hover:bg-muted focus:ring-border"},N={auto:"px-4 py-2",small:"w-24 px-3 py-1.5 text-sm",medium:"w-32 px-4 py-2 text-base",large:"w-48 px-6 py-3 text-lg",xl:"w-64 px-8 py-4 text-xl",full:"w-full py-3 text-base",fit:"w-fit px-4 py-2"};return r.jsx("button",{type:A,onClick:o,disabled:s||i,className:`
|
|
23
|
+
${E}
|
|
24
|
+
${G[n]}
|
|
25
|
+
${N[a]}
|
|
26
26
|
${d}
|
|
27
|
-
`,...
|
|
27
|
+
`,...D,children:i?r.jsxs("svg",{className:"animate-spin h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[r.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),r.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):r.jsxs(r.Fragment,{children:[t&&r.jsx("span",{className:"flex-shrink-0",children:t}),e&&r.jsx("span",{children:e}),!e&&k]})})},V={ENABLE_DARK_MODE:!1},Re=f.forwardRef(({label:e,className:t="",darkMode:o,...n},s)=>{const i=o??V.ENABLE_DARK_MODE;return r.jsxs("label",{className:"inline-flex items-center gap-2.5 cursor-pointer group select-none",children:[r.jsx("input",{type:"checkbox",className:"peer sr-only",ref:s,...n}),r.jsx("div",{className:`
|
|
28
28
|
w-5 h-5 border-2 rounded
|
|
29
29
|
peer-focus-visible:ring-2 peer-focus-visible:ring-offset-2
|
|
30
30
|
peer-disabled:opacity-50 peer-disabled:cursor-not-allowed
|
|
@@ -32,7 +32,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
32
32
|
flex items-center justify-center
|
|
33
33
|
${i?"border-gray-500 peer-checked:bg-blue-600 peer-checked:border-blue-600 peer-focus-visible:ring-blue-500/50":"border-gray-400 peer-checked:bg-blue-600 peer-checked:border-blue-600 peer-focus-visible:ring-blue-500/30"}
|
|
34
34
|
${t}
|
|
35
|
-
`,children:r.jsx("svg",{className:"w-3.5 h-3.5 text-white opacity-0 peer-checked:opacity-100 transition-opacity duration-150 scale-90",fill:"none",stroke:"currentColor",strokeWidth:"3",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}),e&&r.jsx("span",{className:`text-sm font-medium peer-disabled:opacity-50 ${i?"text-gray-200":"text-gray-700"}`,children:e})]})});Re.displayName="CheckBox";const Ar=(e,t)=>{const o=new Array(e.length+t.length);for(let n=0;n<e.length;n++)o[n]=e[n];for(let n=0;n<t.length;n++)o[e.length+n]=t[n];return o},ur=(e,t)=>({classGroupId:e,validator:t}),Se=(e=new Map,t=null,o)=>({nextPart:e,validators:t,classGroupId:o}),fe="-",ve=[],mr="arbitrary..",pr=e=>{const t=fr(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return wr(a);const A=a.split(fe),d=A[0]===""&&A.length>1?1:0;return Oe(A,d,t)},getConflictingClassGroupIds:(a,A)=>{if(A){const d=n[a],w=o[a];return d?w?Ar(w,d):d:w||ve}return o[a]||ve}}},Oe=(e,t,o)=>{if(e.length-t===0)return o.classGroupId;const s=e[t],i=o.nextPart.get(s);if(i){const w=Oe(e,t+1,i);if(w)return w}const a=o.validators;if(a===null)return;const A=t===0?e.join(fe):e.slice(t).join(fe),d=a.length;for(let w=0;w<d;w++){const k=a[w];if(k.validator(A))return k.classGroupId}},wr=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),o=t.indexOf(":"),n=t.slice(0,o);return n?mr+n:void 0})(),fr=e=>{const{theme:t,classGroups:o}=e;return br(o,t)},br=(e,t)=>{const o=Se();for(const n in e){const s=e[n];Be(s,o,n,t)}return o},Be=(e,t,o,n)=>{const s=e.length;for(let i=0;i<s;i++){const a=e[i];hr(a,t,o,n)}},hr=(e,t,o,n)=>{if(typeof e=="string"){xr(e,t,o);return}if(typeof e=="function"){yr(e,t,o,n);return}kr(e,t,o,n)},xr=(e,t,o)=>{const n=e===""?t:Je(t,e);n.classGroupId=o},yr=(e,t,o,n)=>{if(Dr(e)){Be(e(n),t,o,n);return}t.validators===null&&(t.validators=[]),t.validators.push(ur(o,e))},kr=(e,t,o,n)=>{const s=Object.entries(e),i=s.length;for(let a=0;a<i;a++){const[A,d]=s[a];Be(d,Je(t,A),o,n)}},Je=(e,t)=>{let o=e;const n=t.split(fe),s=n.length;for(let i=0;i<s;i++){const a=n[i];let A=o.nextPart.get(a);A||(A=Se(),o.nextPart.set(a,A)),o=A}return o},Dr=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Mr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=Object.create(null),n=Object.create(null);const s=(i,a)=>{o[i]=a,t++,t>e&&(t=0,n=o,o=Object.create(null))};return{get(i){let a=o[i];if(a!==void 0)return a;if((a=n[i])!==void 0)return s(i,a),a},set(i,a){i in o?o[i]=a:s(i,a)}}},Me="!",Ee=":",Br=[],Ye=(e,t,o,n,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:o,maybePostfixModifierPosition:n,isExternal:s}),jr=e=>{const{prefix:t,experimentalParseClassName:o}=e;let n=s=>{const i=[];let a=0,A=0,d=0,w;const k=s.length;for(let E=0;E<k;E++){const N=s[E];if(a===0&&A===0){if(N===Ee){i.push(s.slice(d,E)),d=E+1;continue}if(N==="/"){w=E;continue}}N==="["?a++:N==="]"?a--:N==="("?A++:N===")"&&A--}const D=i.length===0?s:s.slice(d);let y=D,v=!1;D.endsWith(Me)?(y=D.slice(0,-1),v=!0):D.startsWith(Me)&&(y=D.slice(1),v=!0);const G=w&&w>d?w-d:void 0;return Ye(i,v,y,G)};if(t){const s=t+Ee,i=n;n=a=>a.startsWith(s)?i(a.slice(s.length)):Ye(Br,!1,a,void 0,!0)}if(o){const s=n;n=i=>o({className:i,parseClassName:s})}return n},Cr=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((o,n)=>{t.set(o,1e6+n)}),o=>{const n=[];let s=[];for(let i=0;i<o.length;i++){const a=o[i],A=a[0]==="[",d=t.has(a);A||d?(s.length>0&&(s.sort(),n.push(...s),s=[]),n.push(a)):s.push(a)}return s.length>0&&(s.sort(),n.push(...s)),n}},Gr=e=>({cache:Mr(e.cacheSize),parseClassName:jr(e),sortModifiers:Cr(e),...pr(e)}),Nr=/\s+/,vr=(e,t)=>{const{parseClassName:o,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:i}=t,a=[],A=e.trim().split(Nr);let d="";for(let w=A.length-1;w>=0;w-=1){const k=A[w],{isExternal:D,modifiers:y,hasImportantModifier:v,baseClassName:G,maybePostfixModifierPosition:E}=o(k);if(D){d=k+(d.length>0?" "+d:d);continue}let N=!!E,O=n(N?G.substring(0,E):G);if(!O){if(!N){d=k+(d.length>0?" "+d:d);continue}if(O=n(G),!O){d=k+(d.length>0?" "+d:d);continue}N=!1}const U=y.length===0?"":y.length===1?y[0]:i(y).join(":"),Z=v?U+Me:U,J=Z+O;if(a.indexOf(J)>-1)continue;a.push(J);const Y=s(O,N);for(let F=0;F<Y.length;++F){const H=Y[F];a.push(Z+H)}d=k+(d.length>0?" "+d:d)}return d},Er=(...e)=>{let t=0,o,n,s="";for(;t<e.length;)(o=e[t++])&&(n=Fe(o))&&(s&&(s+=" "),s+=n);return s},Fe=e=>{if(typeof e=="string")return e;let t,o="";for(let n=0;n<e.length;n++)e[n]&&(t=Fe(e[n]))&&(o&&(o+=" "),o+=t);return o},Yr=(e,...t)=>{let o,n,s,i;const a=d=>{const w=t.reduce((k,D)=>D(k),e());return o=Gr(w),n=o.cache.get,s=o.cache.set,i=A,A(d)},A=d=>{const w=n(d);if(w)return w;const k=vr(d,o);return s(d,k),k};return i=a,(...d)=>i(Er(...d))},Ir=[],z=e=>{const t=o=>o[e]||Ir;return t.isThemeGetter=!0,t},He=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Te=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Lr=/^\d+\/\d+$/,Qr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Pr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Rr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Sr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Or=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,se=e=>Lr.test(e),C=e=>!!e&&!Number.isNaN(Number(e)),ne=e=>!!e&&Number.isInteger(Number(e)),ke=e=>e.endsWith("%")&&C(e.slice(0,-1)),oe=e=>Qr.test(e),Jr=()=>!0,Fr=e=>Pr.test(e)&&!Rr.test(e),ze=()=>!1,Hr=e=>Sr.test(e),Tr=e=>Or.test(e),zr=e=>!m(e)&&!p(e),Ur=e=>ie(e,Xe,ze),m=e=>He.test(e),ae=e=>ie(e,We,Fr),De=e=>ie(e,Vr,C),Ie=e=>ie(e,Ue,ze),Zr=e=>ie(e,Ze,Tr),pe=e=>ie(e,Ke,Hr),p=e=>Te.test(e),ge=e=>le(e,We),Xr=e=>le(e,qr),Le=e=>le(e,Ue),Wr=e=>le(e,Xe),Kr=e=>le(e,Ze),we=e=>le(e,Ke,!0),ie=(e,t,o)=>{const n=He.exec(e);return n?n[1]?t(n[1]):o(n[2]):!1},le=(e,t,o=!1)=>{const n=Te.exec(e);return n?n[1]?t(n[1]):o:!1},Ue=e=>e==="position"||e==="percentage",Ze=e=>e==="image"||e==="url",Xe=e=>e==="length"||e==="size"||e==="bg-size",We=e=>e==="length",Vr=e=>e==="number",qr=e=>e==="family-name",Ke=e=>e==="shadow",_r=()=>{const e=z("color"),t=z("font"),o=z("text"),n=z("font-weight"),s=z("tracking"),i=z("leading"),a=z("breakpoint"),A=z("container"),d=z("spacing"),w=z("radius"),k=z("shadow"),D=z("inset-shadow"),y=z("text-shadow"),v=z("drop-shadow"),G=z("blur"),E=z("perspective"),N=z("aspect"),O=z("ease"),U=z("animate"),Z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],J=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],Y=()=>[...J(),p,m],F=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto","contain","none"],x=()=>[p,m,d],T=()=>[se,"full","auto",...x()],K=()=>[ne,"none","subgrid",p,m],$=()=>["auto",{span:["full",ne,p,m]},ne,p,m],X=()=>[ne,"auto",p,m],b=()=>["auto","min","max","fr",p,m],Q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],S=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...x()],W=()=>[se,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],h=()=>[e,p,m],re=()=>[...J(),Le,Ie,{position:[p,m]}],te=()=>["no-repeat",{repeat:["","x","y","space","round"]}],l=()=>["auto","cover","contain",Wr,Ur,{size:[p,m]}],c=()=>[ke,ge,ae],u=()=>["","none","full",w,p,m],M=()=>["",C,ge,ae],L=()=>["solid","dashed","dotted","double"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],j=()=>[C,ke,Le,Ie],g=()=>["","none",G,p,m],B=()=>["none",C,p,m],I=()=>["none",C,p,m],_=()=>[C,p,m],R=()=>[se,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[oe],breakpoint:[oe],color:[Jr],container:[oe],"drop-shadow":[oe],ease:["in","out","in-out"],font:[zr],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[oe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[oe],shadow:[oe],spacing:["px",C],text:[oe],"text-shadow":[oe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",se,m,p,N]}],container:["container"],columns:[{columns:[C,m,p,A]}],"break-after":[{"break-after":Z()}],"break-before":[{"break-before":Z()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:Y()}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[ne,"auto",p,m]}],basis:[{basis:[se,"full","auto",A,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[C,se,"auto","initial","none",m]}],grow:[{grow:["",C,p,m]}],shrink:[{shrink:["",C,p,m]}],order:[{order:[ne,"first","last","none",p,m]}],"grid-cols":[{"grid-cols":K()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":K()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":b()}],"auto-rows":[{"auto-rows":b()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:[...Q(),"normal"]}],"justify-items":[{"justify-items":[...S(),"normal"]}],"justify-self":[{"justify-self":["auto",...S()]}],"align-content":[{content:["normal",...Q()]}],"align-items":[{items:[...S(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...S(),{baseline:["","last"]}]}],"place-content":[{"place-content":Q()}],"place-items":[{"place-items":[...S(),"baseline"]}],"place-self":[{"place-self":["auto",...S()]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[A,"screen",...W()]}],"min-w":[{"min-w":[A,"screen","none",...W()]}],"max-w":[{"max-w":[A,"screen","none","prose",{screen:[a]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",o,ge,ae]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,p,De]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ke,m]}],"font-family":[{font:[Xr,m,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,p,m]}],"line-clamp":[{"line-clamp":[C,"none",p,De]}],leading:[{leading:[i,...x()]}],"list-image":[{"list-image":["none",p,m]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",p,m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:h()}],"text-color":[{text:h()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:[C,"from-font","auto",p,ae]}],"text-decoration-color":[{decoration:h()}],"underline-offset":[{"underline-offset":[C,"auto",p,m]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",p,m]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",p,m]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:re()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:l()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ne,p,m],radial:["",p,m],conic:[ne,p,m]},Kr,Zr]}],"bg-color":[{bg:h()}],"gradient-from-pos":[{from:c()}],"gradient-via-pos":[{via:c()}],"gradient-to-pos":[{to:c()}],"gradient-from":[{from:h()}],"gradient-via":[{via:h()}],"gradient-to":[{to:h()}],rounded:[{rounded:u()}],"rounded-s":[{"rounded-s":u()}],"rounded-e":[{"rounded-e":u()}],"rounded-t":[{"rounded-t":u()}],"rounded-r":[{"rounded-r":u()}],"rounded-b":[{"rounded-b":u()}],"rounded-l":[{"rounded-l":u()}],"rounded-ss":[{"rounded-ss":u()}],"rounded-se":[{"rounded-se":u()}],"rounded-ee":[{"rounded-ee":u()}],"rounded-es":[{"rounded-es":u()}],"rounded-tl":[{"rounded-tl":u()}],"rounded-tr":[{"rounded-tr":u()}],"rounded-br":[{"rounded-br":u()}],"rounded-bl":[{"rounded-bl":u()}],"border-w":[{border:M()}],"border-w-x":[{"border-x":M()}],"border-w-y":[{"border-y":M()}],"border-w-s":[{"border-s":M()}],"border-w-e":[{"border-e":M()}],"border-w-t":[{"border-t":M()}],"border-w-r":[{"border-r":M()}],"border-w-b":[{"border-b":M()}],"border-w-l":[{"border-l":M()}],"divide-x":[{"divide-x":M()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":M()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...L(),"hidden","none"]}],"divide-style":[{divide:[...L(),"hidden","none"]}],"border-color":[{border:h()}],"border-color-x":[{"border-x":h()}],"border-color-y":[{"border-y":h()}],"border-color-s":[{"border-s":h()}],"border-color-e":[{"border-e":h()}],"border-color-t":[{"border-t":h()}],"border-color-r":[{"border-r":h()}],"border-color-b":[{"border-b":h()}],"border-color-l":[{"border-l":h()}],"divide-color":[{divide:h()}],"outline-style":[{outline:[...L(),"none","hidden"]}],"outline-offset":[{"outline-offset":[C,p,m]}],"outline-w":[{outline:["",C,ge,ae]}],"outline-color":[{outline:h()}],shadow:[{shadow:["","none",k,we,pe]}],"shadow-color":[{shadow:h()}],"inset-shadow":[{"inset-shadow":["none",D,we,pe]}],"inset-shadow-color":[{"inset-shadow":h()}],"ring-w":[{ring:M()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:h()}],"ring-offset-w":[{"ring-offset":[C,ae]}],"ring-offset-color":[{"ring-offset":h()}],"inset-ring-w":[{"inset-ring":M()}],"inset-ring-color":[{"inset-ring":h()}],"text-shadow":[{"text-shadow":["none",y,we,pe]}],"text-shadow-color":[{"text-shadow":h()}],opacity:[{opacity:[C,p,m]}],"mix-blend":[{"mix-blend":[...q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":q()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[C]}],"mask-image-linear-from-pos":[{"mask-linear-from":j()}],"mask-image-linear-to-pos":[{"mask-linear-to":j()}],"mask-image-linear-from-color":[{"mask-linear-from":h()}],"mask-image-linear-to-color":[{"mask-linear-to":h()}],"mask-image-t-from-pos":[{"mask-t-from":j()}],"mask-image-t-to-pos":[{"mask-t-to":j()}],"mask-image-t-from-color":[{"mask-t-from":h()}],"mask-image-t-to-color":[{"mask-t-to":h()}],"mask-image-r-from-pos":[{"mask-r-from":j()}],"mask-image-r-to-pos":[{"mask-r-to":j()}],"mask-image-r-from-color":[{"mask-r-from":h()}],"mask-image-r-to-color":[{"mask-r-to":h()}],"mask-image-b-from-pos":[{"mask-b-from":j()}],"mask-image-b-to-pos":[{"mask-b-to":j()}],"mask-image-b-from-color":[{"mask-b-from":h()}],"mask-image-b-to-color":[{"mask-b-to":h()}],"mask-image-l-from-pos":[{"mask-l-from":j()}],"mask-image-l-to-pos":[{"mask-l-to":j()}],"mask-image-l-from-color":[{"mask-l-from":h()}],"mask-image-l-to-color":[{"mask-l-to":h()}],"mask-image-x-from-pos":[{"mask-x-from":j()}],"mask-image-x-to-pos":[{"mask-x-to":j()}],"mask-image-x-from-color":[{"mask-x-from":h()}],"mask-image-x-to-color":[{"mask-x-to":h()}],"mask-image-y-from-pos":[{"mask-y-from":j()}],"mask-image-y-to-pos":[{"mask-y-to":j()}],"mask-image-y-from-color":[{"mask-y-from":h()}],"mask-image-y-to-color":[{"mask-y-to":h()}],"mask-image-radial":[{"mask-radial":[p,m]}],"mask-image-radial-from-pos":[{"mask-radial-from":j()}],"mask-image-radial-to-pos":[{"mask-radial-to":j()}],"mask-image-radial-from-color":[{"mask-radial-from":h()}],"mask-image-radial-to-color":[{"mask-radial-to":h()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":J()}],"mask-image-conic-pos":[{"mask-conic":[C]}],"mask-image-conic-from-pos":[{"mask-conic-from":j()}],"mask-image-conic-to-pos":[{"mask-conic-to":j()}],"mask-image-conic-from-color":[{"mask-conic-from":h()}],"mask-image-conic-to-color":[{"mask-conic-to":h()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:l()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",p,m]}],filter:[{filter:["","none",p,m]}],blur:[{blur:g()}],brightness:[{brightness:[C,p,m]}],contrast:[{contrast:[C,p,m]}],"drop-shadow":[{"drop-shadow":["","none",v,we,pe]}],"drop-shadow-color":[{"drop-shadow":h()}],grayscale:[{grayscale:["",C,p,m]}],"hue-rotate":[{"hue-rotate":[C,p,m]}],invert:[{invert:["",C,p,m]}],saturate:[{saturate:[C,p,m]}],sepia:[{sepia:["",C,p,m]}],"backdrop-filter":[{"backdrop-filter":["","none",p,m]}],"backdrop-blur":[{"backdrop-blur":g()}],"backdrop-brightness":[{"backdrop-brightness":[C,p,m]}],"backdrop-contrast":[{"backdrop-contrast":[C,p,m]}],"backdrop-grayscale":[{"backdrop-grayscale":["",C,p,m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[C,p,m]}],"backdrop-invert":[{"backdrop-invert":["",C,p,m]}],"backdrop-opacity":[{"backdrop-opacity":[C,p,m]}],"backdrop-saturate":[{"backdrop-saturate":[C,p,m]}],"backdrop-sepia":[{"backdrop-sepia":["",C,p,m]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",p,m]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[C,"initial",p,m]}],ease:[{ease:["linear","initial",O,p,m]}],delay:[{delay:[C,p,m]}],animate:[{animate:["none",U,p,m]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,p,m]}],"perspective-origin":[{"perspective-origin":Y()}],rotate:[{rotate:B()}],"rotate-x":[{"rotate-x":B()}],"rotate-y":[{"rotate-y":B()}],"rotate-z":[{"rotate-z":B()}],scale:[{scale:I()}],"scale-x":[{"scale-x":I()}],"scale-y":[{"scale-y":I()}],"scale-z":[{"scale-z":I()}],"scale-3d":["scale-3d"],skew:[{skew:_()}],"skew-x":[{"skew-x":_()}],"skew-y":[{"skew-y":_()}],transform:[{transform:[p,m,"","none","gpu","cpu"]}],"transform-origin":[{origin:Y()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:R()}],"translate-x":[{"translate-x":R()}],"translate-y":[{"translate-y":R()}],"translate-z":[{"translate-z":R()}],"translate-none":["translate-none"],accent:[{accent:h()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:h()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",p,m]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",p,m]}],fill:[{fill:["none",...h()]}],"stroke-w":[{stroke:[C,ge,ae,De]}],stroke:[{stroke:["none",...h()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Ve=Yr(_r);function $r({label:e,labelClassName:t,id:o,value:n,onChange:s,error:i,disabled:a=!1,minDate:A,maxDate:d,darkMode:w}){const[k,D]=f.useState(!1),[y,v]=f.useState(new Date().getMonth()),[G,E]=f.useState(new Date().getFullYear()),[N,O]=f.useState({top:0,left:0,width:0}),U=f.useRef(null),Z=f.useRef(null),J=f.useRef(null),Y=w??V.ENABLE_DARK_MODE,F=["January","February","March","April","May","June","July","August","September","October","November","December"],H=Array.from({length:111},(c,u)=>new Date().getFullYear()-100+u),x=f.useCallback(()=>{if(Z.current){const c=Z.current.getBoundingClientRect(),u=window.innerHeight-c.bottom,M=380,L=u<M&&c.top>M?c.top-M+window.scrollY:c.bottom+window.scrollY+8;O({top:L,left:c.left+window.scrollX,width:Math.max(c.width,300)})}},[]);f.useEffect(()=>{if(k){if(n){const c=new Date(n);v(c.getMonth()),E(c.getFullYear())}x()}},[k,n,x]),f.useEffect(()=>{if(!k)return;const c=()=>x();return window.addEventListener("scroll",c,!0),window.addEventListener("resize",c),()=>{window.removeEventListener("scroll",c,!0),window.removeEventListener("resize",c)}},[k,x]),f.useEffect(()=>{const c=u=>{U.current&&!U.current.contains(u.target)&&J.current&&!J.current.contains(u.target)&&D(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[]);const T=c=>c?new Date(c):null,K=c=>{const u=c.getFullYear(),M=String(c.getMonth()+1).padStart(2,"0"),L=String(c.getDate()).padStart(2,"0");return`${u}-${M}-${L}`},$=()=>n||"Select a date",X=c=>{const u=new Date(G,y,c);A&&u<new Date(A)||d&&u>new Date(d)||(s(K(u)),D(!1))},b=(c,u)=>new Date(u,c+1,0).getDate(),Q=(c,u)=>new Date(u,c,1).getDay(),S=c=>{const u=new Date(G,y,c);return!!(A&&u<new Date(A)||d&&u>new Date(d))},P=c=>{if(!n)return!1;const u=T(n);return u?u.getDate()===c&&u.getMonth()===y&&u.getFullYear()===G:!1},W=c=>{const u=new Date;return u.getDate()===c&&u.getMonth()===y&&u.getFullYear()===G},h=()=>{y===0?(v(11),E(G-1)):v(y-1)},re=()=>{y===11?(v(0),E(G+1)):v(y+1)},te=()=>{const c=b(y,G),u=Q(y,G),M=[];for(let L=0;L<u;L++)M.push(r.jsx("div",{className:"calendar-day empty"},`empty-${L}`));for(let L=1;L<=c;L++){const q=S(L),j=P(L),g=W(L);M.push(r.jsx("button",{type:"button",onClick:()=>!q&&X(L),disabled:q,className:`calendar-day ${j?"selected":""} ${g?"today":""} ${q?"disabled":""}`,children:L},L))}return M},l=k&&r.jsx("div",{className:Y?"dark":"",children:r.jsxs("div",{ref:J,className:"datepicker-dropdown-portal",style:{position:"absolute",top:N.top,left:N.left,width:N.width,zIndex:99999},children:[r.jsxs("div",{className:"datepicker-header",children:[r.jsx("button",{type:"button",onClick:h,className:"nav-button",children:r.jsx("svg",{className:"w-4 h-4 sm:w-5 sm:h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 19l-7-7 7-7"})})}),r.jsxs("div",{className:"selects-container",children:[r.jsx("select",{value:y,onChange:c=>v(Number(c.target.value)),className:"month-select",children:F.map((c,u)=>r.jsx("option",{value:u,children:c},c))}),r.jsx("select",{value:G,onChange:c=>E(Number(c.target.value)),className:"year-select",children:H.map(c=>r.jsx("option",{value:c,children:c},c))})]}),r.jsx("button",{type:"button",onClick:re,className:"nav-button",children:r.jsx("svg",{className:"w-4 h-4 sm:w-5 sm:h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 5l7 7-7 7"})})})]}),r.jsx("div",{className:"day-names",children:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map(c=>r.jsx("div",{className:"day-name",children:c},c))}),r.jsx("div",{className:"calendar-grid",children:te()}),r.jsx("button",{type:"button",onClick:()=>{const c=new Date;v(c.getMonth()),E(c.getFullYear()),X(c.getDate())},className:"today-button",children:"Today"})]})});return r.jsxs("div",{className:"flex flex-col w-full datepicker-wrapper",ref:U,children:[e&&r.jsx("label",{className:Ve(`text-label ${Y?"text-gray-200":""} text-[12px] sm:text-[13px] md:text-[14px] lg:text-[15px] xl:text-[16px] mb-1 sm:mb-2 font-semibold`,t||""),children:e}),r.jsxs("div",{className:"relative",children:[r.jsx("button",{ref:Z,id:o,type:"button",onClick:()=>!a&&D(!k),disabled:a,className:`w-full border-gray-400 rounded-full px-3 sm:px-4 md:px-5 py-1.5 sm:py-2 border outline-none text-left text-xs sm:text-sm ${i?Y?"border-red-700 focus:border-red-600":"border-red-300 focus:border-red-500 focus:ring-red-500/30":Y?"focus:border-primary border-gray-700":"focus:border-primary"} ${a?Y?"bg-gray-700 cursor-not-allowed opacity-60":"bg-gray-100 cursor-not-allowed opacity-60":Y?"bg-gray-900 cursor-pointer text-white":"bg-white cursor-pointer"} transition-all duration-300 ease-in-out pr-8 sm:pr-10`,children:$()}),r.jsx("div",{className:"absolute right-2 sm:right-3 top-1/2 transform -translate-y-1/2 pointer-events-none",children:r.jsx("svg",{className:`w-4 h-4 sm:w-5 sm:h-5 ${a?Y?"text-gray-600":"text-gray-400":Y?"text-blue-400":"text-secondary"}`,"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:r.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 10h16m-8-3V4M7 7V4m10 3V4M5 20h14a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1Zm3-7h.01v.01H8V13Zm4 0h.01v.01H12V13Zm4 0h.01v.01H16V13Zm-8 4h.01v.01H8V17Zm4 0h.01v.01H12V17Zm4 0h.01v.01H16V17Z"})})}),k&&xe.createPortal(l,document.body)]}),i&&r.jsx("span",{className:"text-red-500 dark:text-red-400 text-xs sm:text-sm font-medium mt-1",children:i}),r.jsx("style",{children:`
|
|
35
|
+
`,children:r.jsx("svg",{className:"w-3.5 h-3.5 text-white opacity-0 peer-checked:opacity-100 transition-opacity duration-150 scale-90",fill:"none",stroke:"currentColor",strokeWidth:"3",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}),e&&r.jsx("span",{className:`text-sm font-medium peer-disabled:opacity-50 ${i?"text-gray-200":"text-gray-700"}`,children:e})]})});Re.displayName="CheckBox";const Ar=(e,t)=>{const o=new Array(e.length+t.length);for(let n=0;n<e.length;n++)o[n]=e[n];for(let n=0;n<t.length;n++)o[e.length+n]=t[n];return o},ur=(e,t)=>({classGroupId:e,validator:t}),Se=(e=new Map,t=null,o)=>({nextPart:e,validators:t,classGroupId:o}),fe="-",ve=[],mr="arbitrary..",pr=e=>{const t=fr(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return wr(a);const A=a.split(fe),d=A[0]===""&&A.length>1?1:0;return Oe(A,d,t)},getConflictingClassGroupIds:(a,A)=>{if(A){const d=n[a],w=o[a];return d?w?Ar(w,d):d:w||ve}return o[a]||ve}}},Oe=(e,t,o)=>{if(e.length-t===0)return o.classGroupId;const s=e[t],i=o.nextPart.get(s);if(i){const w=Oe(e,t+1,i);if(w)return w}const a=o.validators;if(a===null)return;const A=t===0?e.join(fe):e.slice(t).join(fe),d=a.length;for(let w=0;w<d;w++){const k=a[w];if(k.validator(A))return k.classGroupId}},wr=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),o=t.indexOf(":"),n=t.slice(0,o);return n?mr+n:void 0})(),fr=e=>{const{theme:t,classGroups:o}=e;return br(o,t)},br=(e,t)=>{const o=Se();for(const n in e){const s=e[n];Be(s,o,n,t)}return o},Be=(e,t,o,n)=>{const s=e.length;for(let i=0;i<s;i++){const a=e[i];hr(a,t,o,n)}},hr=(e,t,o,n)=>{if(typeof e=="string"){xr(e,t,o);return}if(typeof e=="function"){yr(e,t,o,n);return}kr(e,t,o,n)},xr=(e,t,o)=>{const n=e===""?t:Je(t,e);n.classGroupId=o},yr=(e,t,o,n)=>{if(Dr(e)){Be(e(n),t,o,n);return}t.validators===null&&(t.validators=[]),t.validators.push(ur(o,e))},kr=(e,t,o,n)=>{const s=Object.entries(e),i=s.length;for(let a=0;a<i;a++){const[A,d]=s[a];Be(d,Je(t,A),o,n)}},Je=(e,t)=>{let o=e;const n=t.split(fe),s=n.length;for(let i=0;i<s;i++){const a=n[i];let A=o.nextPart.get(a);A||(A=Se(),o.nextPart.set(a,A)),o=A}return o},Dr=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Mr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=Object.create(null),n=Object.create(null);const s=(i,a)=>{o[i]=a,t++,t>e&&(t=0,n=o,o=Object.create(null))};return{get(i){let a=o[i];if(a!==void 0)return a;if((a=n[i])!==void 0)return s(i,a),a},set(i,a){i in o?o[i]=a:s(i,a)}}},Me="!",Ee=":",Br=[],Ye=(e,t,o,n,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:o,maybePostfixModifierPosition:n,isExternal:s}),jr=e=>{const{prefix:t,experimentalParseClassName:o}=e;let n=s=>{const i=[];let a=0,A=0,d=0,w;const k=s.length;for(let N=0;N<k;N++){const v=s[N];if(a===0&&A===0){if(v===Ee){i.push(s.slice(d,N)),d=N+1;continue}if(v==="/"){w=N;continue}}v==="["?a++:v==="]"?a--:v==="("?A++:v===")"&&A--}const D=i.length===0?s:s.slice(d);let x=D,E=!1;D.endsWith(Me)?(x=D.slice(0,-1),E=!0):D.startsWith(Me)&&(x=D.slice(1),E=!0);const G=w&&w>d?w-d:void 0;return Ye(i,E,x,G)};if(t){const s=t+Ee,i=n;n=a=>a.startsWith(s)?i(a.slice(s.length)):Ye(Br,!1,a,void 0,!0)}if(o){const s=n;n=i=>o({className:i,parseClassName:s})}return n},Cr=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((o,n)=>{t.set(o,1e6+n)}),o=>{const n=[];let s=[];for(let i=0;i<o.length;i++){const a=o[i],A=a[0]==="[",d=t.has(a);A||d?(s.length>0&&(s.sort(),n.push(...s),s=[]),n.push(a)):s.push(a)}return s.length>0&&(s.sort(),n.push(...s)),n}},Gr=e=>({cache:Mr(e.cacheSize),parseClassName:jr(e),sortModifiers:Cr(e),...pr(e)}),Nr=/\s+/,vr=(e,t)=>{const{parseClassName:o,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:i}=t,a=[],A=e.trim().split(Nr);let d="";for(let w=A.length-1;w>=0;w-=1){const k=A[w],{isExternal:D,modifiers:x,hasImportantModifier:E,baseClassName:G,maybePostfixModifierPosition:N}=o(k);if(D){d=k+(d.length>0?" "+d:d);continue}let v=!!N,O=n(v?G.substring(0,N):G);if(!O){if(!v){d=k+(d.length>0?" "+d:d);continue}if(O=n(G),!O){d=k+(d.length>0?" "+d:d);continue}v=!1}const U=x.length===0?"":x.length===1?x[0]:i(x).join(":"),Z=E?U+Me:U,J=Z+O;if(a.indexOf(J)>-1)continue;a.push(J);const Y=s(O,v);for(let F=0;F<Y.length;++F){const H=Y[F];a.push(Z+H)}d=k+(d.length>0?" "+d:d)}return d},Er=(...e)=>{let t=0,o,n,s="";for(;t<e.length;)(o=e[t++])&&(n=Fe(o))&&(s&&(s+=" "),s+=n);return s},Fe=e=>{if(typeof e=="string")return e;let t,o="";for(let n=0;n<e.length;n++)e[n]&&(t=Fe(e[n]))&&(o&&(o+=" "),o+=t);return o},Yr=(e,...t)=>{let o,n,s,i;const a=d=>{const w=t.reduce((k,D)=>D(k),e());return o=Gr(w),n=o.cache.get,s=o.cache.set,i=A,A(d)},A=d=>{const w=n(d);if(w)return w;const k=vr(d,o);return s(d,k),k};return i=a,(...d)=>i(Er(...d))},Ir=[],z=e=>{const t=o=>o[e]||Ir;return t.isThemeGetter=!0,t},He=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Te=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Lr=/^\d+\/\d+$/,Qr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Pr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Rr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Sr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Or=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,se=e=>Lr.test(e),C=e=>!!e&&!Number.isNaN(Number(e)),ne=e=>!!e&&Number.isInteger(Number(e)),ke=e=>e.endsWith("%")&&C(e.slice(0,-1)),oe=e=>Qr.test(e),Jr=()=>!0,Fr=e=>Pr.test(e)&&!Rr.test(e),ze=()=>!1,Hr=e=>Sr.test(e),Tr=e=>Or.test(e),zr=e=>!m(e)&&!p(e),Ur=e=>ie(e,Xe,ze),m=e=>He.test(e),ae=e=>ie(e,We,Fr),De=e=>ie(e,Vr,C),Ie=e=>ie(e,Ue,ze),Zr=e=>ie(e,Ze,Tr),pe=e=>ie(e,Ke,Hr),p=e=>Te.test(e),ge=e=>le(e,We),Xr=e=>le(e,qr),Le=e=>le(e,Ue),Wr=e=>le(e,Xe),Kr=e=>le(e,Ze),we=e=>le(e,Ke,!0),ie=(e,t,o)=>{const n=He.exec(e);return n?n[1]?t(n[1]):o(n[2]):!1},le=(e,t,o=!1)=>{const n=Te.exec(e);return n?n[1]?t(n[1]):o:!1},Ue=e=>e==="position"||e==="percentage",Ze=e=>e==="image"||e==="url",Xe=e=>e==="length"||e==="size"||e==="bg-size",We=e=>e==="length",Vr=e=>e==="number",qr=e=>e==="family-name",Ke=e=>e==="shadow",_r=()=>{const e=z("color"),t=z("font"),o=z("text"),n=z("font-weight"),s=z("tracking"),i=z("leading"),a=z("breakpoint"),A=z("container"),d=z("spacing"),w=z("radius"),k=z("shadow"),D=z("inset-shadow"),x=z("text-shadow"),E=z("drop-shadow"),G=z("blur"),N=z("perspective"),v=z("aspect"),O=z("ease"),U=z("animate"),Z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],J=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],Y=()=>[...J(),p,m],F=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto","contain","none"],y=()=>[p,m,d],T=()=>[se,"full","auto",...y()],K=()=>[ne,"none","subgrid",p,m],$=()=>["auto",{span:["full",ne,p,m]},ne,p,m],X=()=>[ne,"auto",p,m],b=()=>["auto","min","max","fr",p,m],Q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],S=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...y()],W=()=>[se,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...y()],h=()=>[e,p,m],re=()=>[...J(),Le,Ie,{position:[p,m]}],te=()=>["no-repeat",{repeat:["","x","y","space","round"]}],l=()=>["auto","cover","contain",Wr,Ur,{size:[p,m]}],c=()=>[ke,ge,ae],u=()=>["","none","full",w,p,m],M=()=>["",C,ge,ae],L=()=>["solid","dashed","dotted","double"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],j=()=>[C,ke,Le,Ie],g=()=>["","none",G,p,m],B=()=>["none",C,p,m],I=()=>["none",C,p,m],_=()=>[C,p,m],R=()=>[se,"full",...y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[oe],breakpoint:[oe],color:[Jr],container:[oe],"drop-shadow":[oe],ease:["in","out","in-out"],font:[zr],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[oe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[oe],shadow:[oe],spacing:["px",C],text:[oe],"text-shadow":[oe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",se,m,p,v]}],container:["container"],columns:[{columns:[C,m,p,A]}],"break-after":[{"break-after":Z()}],"break-before":[{"break-before":Z()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:Y()}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[ne,"auto",p,m]}],basis:[{basis:[se,"full","auto",A,...y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[C,se,"auto","initial","none",m]}],grow:[{grow:["",C,p,m]}],shrink:[{shrink:["",C,p,m]}],order:[{order:[ne,"first","last","none",p,m]}],"grid-cols":[{"grid-cols":K()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":K()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":b()}],"auto-rows":[{"auto-rows":b()}],gap:[{gap:y()}],"gap-x":[{"gap-x":y()}],"gap-y":[{"gap-y":y()}],"justify-content":[{justify:[...Q(),"normal"]}],"justify-items":[{"justify-items":[...S(),"normal"]}],"justify-self":[{"justify-self":["auto",...S()]}],"align-content":[{content:["normal",...Q()]}],"align-items":[{items:[...S(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...S(),{baseline:["","last"]}]}],"place-content":[{"place-content":Q()}],"place-items":[{"place-items":[...S(),"baseline"]}],"place-self":[{"place-self":["auto",...S()]}],p:[{p:y()}],px:[{px:y()}],py:[{py:y()}],ps:[{ps:y()}],pe:[{pe:y()}],pt:[{pt:y()}],pr:[{pr:y()}],pb:[{pb:y()}],pl:[{pl:y()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":y()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[A,"screen",...W()]}],"min-w":[{"min-w":[A,"screen","none",...W()]}],"max-w":[{"max-w":[A,"screen","none","prose",{screen:[a]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",o,ge,ae]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,p,De]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ke,m]}],"font-family":[{font:[Xr,m,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,p,m]}],"line-clamp":[{"line-clamp":[C,"none",p,De]}],leading:[{leading:[i,...y()]}],"list-image":[{"list-image":["none",p,m]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",p,m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:h()}],"text-color":[{text:h()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:[C,"from-font","auto",p,ae]}],"text-decoration-color":[{decoration:h()}],"underline-offset":[{"underline-offset":[C,"auto",p,m]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",p,m]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",p,m]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:re()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:l()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ne,p,m],radial:["",p,m],conic:[ne,p,m]},Kr,Zr]}],"bg-color":[{bg:h()}],"gradient-from-pos":[{from:c()}],"gradient-via-pos":[{via:c()}],"gradient-to-pos":[{to:c()}],"gradient-from":[{from:h()}],"gradient-via":[{via:h()}],"gradient-to":[{to:h()}],rounded:[{rounded:u()}],"rounded-s":[{"rounded-s":u()}],"rounded-e":[{"rounded-e":u()}],"rounded-t":[{"rounded-t":u()}],"rounded-r":[{"rounded-r":u()}],"rounded-b":[{"rounded-b":u()}],"rounded-l":[{"rounded-l":u()}],"rounded-ss":[{"rounded-ss":u()}],"rounded-se":[{"rounded-se":u()}],"rounded-ee":[{"rounded-ee":u()}],"rounded-es":[{"rounded-es":u()}],"rounded-tl":[{"rounded-tl":u()}],"rounded-tr":[{"rounded-tr":u()}],"rounded-br":[{"rounded-br":u()}],"rounded-bl":[{"rounded-bl":u()}],"border-w":[{border:M()}],"border-w-x":[{"border-x":M()}],"border-w-y":[{"border-y":M()}],"border-w-s":[{"border-s":M()}],"border-w-e":[{"border-e":M()}],"border-w-t":[{"border-t":M()}],"border-w-r":[{"border-r":M()}],"border-w-b":[{"border-b":M()}],"border-w-l":[{"border-l":M()}],"divide-x":[{"divide-x":M()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":M()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...L(),"hidden","none"]}],"divide-style":[{divide:[...L(),"hidden","none"]}],"border-color":[{border:h()}],"border-color-x":[{"border-x":h()}],"border-color-y":[{"border-y":h()}],"border-color-s":[{"border-s":h()}],"border-color-e":[{"border-e":h()}],"border-color-t":[{"border-t":h()}],"border-color-r":[{"border-r":h()}],"border-color-b":[{"border-b":h()}],"border-color-l":[{"border-l":h()}],"divide-color":[{divide:h()}],"outline-style":[{outline:[...L(),"none","hidden"]}],"outline-offset":[{"outline-offset":[C,p,m]}],"outline-w":[{outline:["",C,ge,ae]}],"outline-color":[{outline:h()}],shadow:[{shadow:["","none",k,we,pe]}],"shadow-color":[{shadow:h()}],"inset-shadow":[{"inset-shadow":["none",D,we,pe]}],"inset-shadow-color":[{"inset-shadow":h()}],"ring-w":[{ring:M()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:h()}],"ring-offset-w":[{"ring-offset":[C,ae]}],"ring-offset-color":[{"ring-offset":h()}],"inset-ring-w":[{"inset-ring":M()}],"inset-ring-color":[{"inset-ring":h()}],"text-shadow":[{"text-shadow":["none",x,we,pe]}],"text-shadow-color":[{"text-shadow":h()}],opacity:[{opacity:[C,p,m]}],"mix-blend":[{"mix-blend":[...q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":q()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[C]}],"mask-image-linear-from-pos":[{"mask-linear-from":j()}],"mask-image-linear-to-pos":[{"mask-linear-to":j()}],"mask-image-linear-from-color":[{"mask-linear-from":h()}],"mask-image-linear-to-color":[{"mask-linear-to":h()}],"mask-image-t-from-pos":[{"mask-t-from":j()}],"mask-image-t-to-pos":[{"mask-t-to":j()}],"mask-image-t-from-color":[{"mask-t-from":h()}],"mask-image-t-to-color":[{"mask-t-to":h()}],"mask-image-r-from-pos":[{"mask-r-from":j()}],"mask-image-r-to-pos":[{"mask-r-to":j()}],"mask-image-r-from-color":[{"mask-r-from":h()}],"mask-image-r-to-color":[{"mask-r-to":h()}],"mask-image-b-from-pos":[{"mask-b-from":j()}],"mask-image-b-to-pos":[{"mask-b-to":j()}],"mask-image-b-from-color":[{"mask-b-from":h()}],"mask-image-b-to-color":[{"mask-b-to":h()}],"mask-image-l-from-pos":[{"mask-l-from":j()}],"mask-image-l-to-pos":[{"mask-l-to":j()}],"mask-image-l-from-color":[{"mask-l-from":h()}],"mask-image-l-to-color":[{"mask-l-to":h()}],"mask-image-x-from-pos":[{"mask-x-from":j()}],"mask-image-x-to-pos":[{"mask-x-to":j()}],"mask-image-x-from-color":[{"mask-x-from":h()}],"mask-image-x-to-color":[{"mask-x-to":h()}],"mask-image-y-from-pos":[{"mask-y-from":j()}],"mask-image-y-to-pos":[{"mask-y-to":j()}],"mask-image-y-from-color":[{"mask-y-from":h()}],"mask-image-y-to-color":[{"mask-y-to":h()}],"mask-image-radial":[{"mask-radial":[p,m]}],"mask-image-radial-from-pos":[{"mask-radial-from":j()}],"mask-image-radial-to-pos":[{"mask-radial-to":j()}],"mask-image-radial-from-color":[{"mask-radial-from":h()}],"mask-image-radial-to-color":[{"mask-radial-to":h()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":J()}],"mask-image-conic-pos":[{"mask-conic":[C]}],"mask-image-conic-from-pos":[{"mask-conic-from":j()}],"mask-image-conic-to-pos":[{"mask-conic-to":j()}],"mask-image-conic-from-color":[{"mask-conic-from":h()}],"mask-image-conic-to-color":[{"mask-conic-to":h()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:l()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",p,m]}],filter:[{filter:["","none",p,m]}],blur:[{blur:g()}],brightness:[{brightness:[C,p,m]}],contrast:[{contrast:[C,p,m]}],"drop-shadow":[{"drop-shadow":["","none",E,we,pe]}],"drop-shadow-color":[{"drop-shadow":h()}],grayscale:[{grayscale:["",C,p,m]}],"hue-rotate":[{"hue-rotate":[C,p,m]}],invert:[{invert:["",C,p,m]}],saturate:[{saturate:[C,p,m]}],sepia:[{sepia:["",C,p,m]}],"backdrop-filter":[{"backdrop-filter":["","none",p,m]}],"backdrop-blur":[{"backdrop-blur":g()}],"backdrop-brightness":[{"backdrop-brightness":[C,p,m]}],"backdrop-contrast":[{"backdrop-contrast":[C,p,m]}],"backdrop-grayscale":[{"backdrop-grayscale":["",C,p,m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[C,p,m]}],"backdrop-invert":[{"backdrop-invert":["",C,p,m]}],"backdrop-opacity":[{"backdrop-opacity":[C,p,m]}],"backdrop-saturate":[{"backdrop-saturate":[C,p,m]}],"backdrop-sepia":[{"backdrop-sepia":["",C,p,m]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":y()}],"border-spacing-x":[{"border-spacing-x":y()}],"border-spacing-y":[{"border-spacing-y":y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",p,m]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[C,"initial",p,m]}],ease:[{ease:["linear","initial",O,p,m]}],delay:[{delay:[C,p,m]}],animate:[{animate:["none",U,p,m]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[N,p,m]}],"perspective-origin":[{"perspective-origin":Y()}],rotate:[{rotate:B()}],"rotate-x":[{"rotate-x":B()}],"rotate-y":[{"rotate-y":B()}],"rotate-z":[{"rotate-z":B()}],scale:[{scale:I()}],"scale-x":[{"scale-x":I()}],"scale-y":[{"scale-y":I()}],"scale-z":[{"scale-z":I()}],"scale-3d":["scale-3d"],skew:[{skew:_()}],"skew-x":[{"skew-x":_()}],"skew-y":[{"skew-y":_()}],transform:[{transform:[p,m,"","none","gpu","cpu"]}],"transform-origin":[{origin:Y()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:R()}],"translate-x":[{"translate-x":R()}],"translate-y":[{"translate-y":R()}],"translate-z":[{"translate-z":R()}],"translate-none":["translate-none"],accent:[{accent:h()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:h()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",p,m]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":y()}],"scroll-mx":[{"scroll-mx":y()}],"scroll-my":[{"scroll-my":y()}],"scroll-ms":[{"scroll-ms":y()}],"scroll-me":[{"scroll-me":y()}],"scroll-mt":[{"scroll-mt":y()}],"scroll-mr":[{"scroll-mr":y()}],"scroll-mb":[{"scroll-mb":y()}],"scroll-ml":[{"scroll-ml":y()}],"scroll-p":[{"scroll-p":y()}],"scroll-px":[{"scroll-px":y()}],"scroll-py":[{"scroll-py":y()}],"scroll-ps":[{"scroll-ps":y()}],"scroll-pe":[{"scroll-pe":y()}],"scroll-pt":[{"scroll-pt":y()}],"scroll-pr":[{"scroll-pr":y()}],"scroll-pb":[{"scroll-pb":y()}],"scroll-pl":[{"scroll-pl":y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",p,m]}],fill:[{fill:["none",...h()]}],"stroke-w":[{stroke:[C,ge,ae,De]}],stroke:[{stroke:["none",...h()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Ve=Yr(_r);function $r({label:e,labelClassName:t,id:o,value:n,onChange:s,error:i,disabled:a=!1,minDate:A,maxDate:d,darkMode:w}){const[k,D]=f.useState(!1),[x,E]=f.useState(new Date().getMonth()),[G,N]=f.useState(new Date().getFullYear()),[v,O]=f.useState({top:0,left:0,width:0}),U=f.useRef(null),Z=f.useRef(null),J=f.useRef(null),Y=w??V.ENABLE_DARK_MODE,F=["January","February","March","April","May","June","July","August","September","October","November","December"],H=Array.from({length:111},(c,u)=>new Date().getFullYear()-100+u),y=f.useCallback(()=>{if(Z.current){const c=Z.current.getBoundingClientRect(),u=window.innerHeight-c.bottom,M=380,L=u<M&&c.top>M?c.top-M+window.scrollY:c.bottom+window.scrollY+8;O({top:L,left:c.left+window.scrollX,width:Math.max(c.width,300)})}},[]);f.useEffect(()=>{if(k){if(n){const c=new Date(n);E(c.getMonth()),N(c.getFullYear())}y()}},[k,n,y]),f.useEffect(()=>{if(!k)return;const c=()=>y();return window.addEventListener("scroll",c,!0),window.addEventListener("resize",c),()=>{window.removeEventListener("scroll",c,!0),window.removeEventListener("resize",c)}},[k,y]),f.useEffect(()=>{const c=u=>{U.current&&!U.current.contains(u.target)&&J.current&&!J.current.contains(u.target)&&D(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[]);const T=c=>c?new Date(c):null,K=c=>{const u=c.getFullYear(),M=String(c.getMonth()+1).padStart(2,"0"),L=String(c.getDate()).padStart(2,"0");return`${u}-${M}-${L}`},$=()=>n||"Select a date",X=c=>{const u=new Date(G,x,c);A&&u<new Date(A)||d&&u>new Date(d)||(s(K(u)),D(!1))},b=(c,u)=>new Date(u,c+1,0).getDate(),Q=(c,u)=>new Date(u,c,1).getDay(),S=c=>{const u=new Date(G,x,c);return!!(A&&u<new Date(A)||d&&u>new Date(d))},P=c=>{if(!n)return!1;const u=T(n);return u?u.getDate()===c&&u.getMonth()===x&&u.getFullYear()===G:!1},W=c=>{const u=new Date;return u.getDate()===c&&u.getMonth()===x&&u.getFullYear()===G},h=()=>{x===0?(E(11),N(G-1)):E(x-1)},re=()=>{x===11?(E(0),N(G+1)):E(x+1)},te=()=>{const c=b(x,G),u=Q(x,G),M=[];for(let L=0;L<u;L++)M.push(r.jsx("div",{className:"calendar-day empty"},`empty-${L}`));for(let L=1;L<=c;L++){const q=S(L),j=P(L),g=W(L);M.push(r.jsx("button",{type:"button",onClick:()=>!q&&X(L),disabled:q,className:`calendar-day ${j?"selected":""} ${g?"today":""} ${q?"disabled":""}`,children:L},L))}return M},l=k&&r.jsx("div",{className:Y?"dark":"",children:r.jsxs("div",{ref:J,className:"datepicker-dropdown-portal",style:{position:"absolute",top:v.top,left:v.left,width:v.width,zIndex:99999},children:[r.jsxs("div",{className:"datepicker-header",children:[r.jsx("button",{type:"button",onClick:h,className:"nav-button",children:r.jsx("svg",{className:"w-4 h-4 sm:w-5 sm:h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 19l-7-7 7-7"})})}),r.jsxs("div",{className:"selects-container",children:[r.jsx("select",{value:x,onChange:c=>E(Number(c.target.value)),className:"month-select",children:F.map((c,u)=>r.jsx("option",{value:u,children:c},c))}),r.jsx("select",{value:G,onChange:c=>N(Number(c.target.value)),className:"year-select",children:H.map(c=>r.jsx("option",{value:c,children:c},c))})]}),r.jsx("button",{type:"button",onClick:re,className:"nav-button",children:r.jsx("svg",{className:"w-4 h-4 sm:w-5 sm:h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 5l7 7-7 7"})})})]}),r.jsx("div",{className:"day-names",children:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map(c=>r.jsx("div",{className:"day-name",children:c},c))}),r.jsx("div",{className:"calendar-grid",children:te()}),r.jsx("button",{type:"button",onClick:()=>{const c=new Date;E(c.getMonth()),N(c.getFullYear()),X(c.getDate())},className:"today-button",children:"Today"})]})});return r.jsxs("div",{className:"flex flex-col w-full datepicker-wrapper",ref:U,children:[e&&r.jsx("label",{className:Ve(`text-label ${Y?"text-gray-200":""} text-[12px] sm:text-[13px] md:text-[14px] lg:text-[15px] xl:text-[16px] mb-1 sm:mb-2 font-semibold`,t||""),children:e}),r.jsxs("div",{className:"relative",children:[r.jsx("button",{ref:Z,id:o,type:"button",onClick:()=>!a&&D(!k),disabled:a,className:`w-full border-gray-400 rounded-full px-3 sm:px-4 md:px-5 py-1.5 sm:py-2 border outline-none text-left text-xs sm:text-sm ${i?Y?"border-red-700 focus:border-red-600":"border-red-300 focus:border-red-500 focus:ring-red-500/30":Y?"focus:border-primary border-gray-700":"focus:border-primary"} ${a?Y?"bg-gray-700 cursor-not-allowed opacity-60":"bg-gray-100 cursor-not-allowed opacity-60":Y?"bg-gray-900 cursor-pointer text-white":"bg-white cursor-pointer"} transition-all duration-300 ease-in-out pr-8 sm:pr-10`,children:$()}),r.jsx("div",{className:"absolute right-2 sm:right-3 top-1/2 transform -translate-y-1/2 pointer-events-none",children:r.jsx("svg",{className:`w-4 h-4 sm:w-5 sm:h-5 ${a?Y?"text-gray-600":"text-gray-400":Y?"text-blue-400":"text-secondary"}`,"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:r.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 10h16m-8-3V4M7 7V4m10 3V4M5 20h14a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1Zm3-7h.01v.01H8V13Zm4 0h.01v.01H12V13Zm4 0h.01v.01H16V13Zm-8 4h.01v.01H8V17Zm4 0h.01v.01H12V17Zm4 0h.01v.01H16V17Z"})})}),k&&xe.createPortal(l,document.body)]}),i&&r.jsx("span",{className:"text-red-500 dark:text-red-400 text-xs sm:text-sm font-medium mt-1",children:i}),r.jsx("style",{children:`
|
|
36
36
|
/* Modern Professional DatePicker - Blue Theme */
|
|
37
37
|
.datepicker-wrapper {
|
|
38
38
|
position: relative;
|
|
@@ -336,7 +336,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
336
336
|
${i?"bg-blue-500":"bg-blue-600"}
|
|
337
337
|
`})}),e&&r.jsx("span",{className:`text-sm font-medium ${i?"text-gray-200":"text-gray-700"}`,children:e})]})});nr.displayName="RadioButton";const je=({icon:e,title:t,message:o,actionText:n,onAction:s,className:i="",type:a,darkMode:A})=>{const d=A??V.ENABLE_DARK_MODE,w={success:"text-success bg-success/10",error:"text-destructive bg-destructive/10",info:"text-info bg-info/10",warning:"text-accent bg-accent/10"};return r.jsxs("div",{className:`flex flex-col items-center justify-center p-8 text-center min-h-[400px] w-full bg-surface rounded-lg border border-border ${d?"dark":""} ${i}`,children:[r.jsx("div",{className:`p-4 rounded-full mb-6 ${w[a]}`,children:e}),r.jsx("h2",{className:"text-2xl font-bold text-foreground mb-2",children:t}),o&&r.jsx("p",{className:"text-muted-foreground max-w-md mb-8",children:o}),n&&s&&r.jsx(Ae,{onClick:s,type:a==="error"?"danger":"primary",children:n})]})},ct=e=>r.jsx(je,{...e,type:"success",icon:r.jsx("svg",{className:"w-12 h-12",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})})}),dt=e=>r.jsx(je,{...e,type:"error",icon:r.jsx("svg",{className:"w-12 h-12",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})}),gt=e=>r.jsx(je,{...e,type:"info",icon:r.jsx("svg",{className:"w-12 h-12",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),At=({onLogin:e,darkMode:t,className:o=""})=>{const n=t??V.ENABLE_DARK_MODE;return r.jsxs("div",{className:`flex flex-col items-center justify-center min-h-screen bg-background p-4 text-center ${n?"dark":""} ${o}`,children:[r.jsx(ye,{className:"text-primary mb-8",size:150}),r.jsxs("div",{className:"w-full max-w-md p-8 bg-card rounded-xl shadow-lg border border-border",children:[r.jsx("div",{className:"mx-auto w-16 h-16 bg-destructive/10 rounded-full flex items-center justify-center mb-6",children:r.jsx("svg",{className:"w-8 h-8 text-destructive",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})}),r.jsx("h1",{className:"text-2xl font-bold text-foreground mb-2",children:"Access Denied"}),r.jsx("p",{className:"text-muted-foreground mb-8",children:"You do not have permission to view this page. Please log in with an authorized account."}),r.jsx(Ae,{onClick:e||(()=>{}),type:"primary",width:"full",buttonText:"Log In"})]})]})},ut=({title:e="Under Construction",message:t="This page is currently being built. Check back soon!",onGoBack:o,darkMode:n,className:s=""})=>{const i=n??V.ENABLE_DARK_MODE;return r.jsx("div",{className:`flex flex-col items-center justify-center min-h-[60vh] p-8 text-center ${i?"dark":""} ${s}`,children:r.jsxs("div",{className:"w-full max-w-md",children:[r.jsx("div",{className:"mx-auto w-20 h-20 bg-accent/10 rounded-full flex items-center justify-center mb-6",children:r.jsx("svg",{className:"w-10 h-10 text-accent",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19.428 15.428a2 2 0 00-1.022-.547l-2.387-.477a6 6 0 00-3.86.517l-.318.158a6 6 0 01-3.86.517L6.05 15.21a2 2 0 00-1.806.547M8 4h8l-1 1v5.172a2 2 0 00.586 1.414l5 5c1.26 1.26.367 3.414-1.415 3.414H4.828c-1.782 0-2.674-2.154-1.414-3.414l5-5A2 2 0 009 10.172V5L8 4z"})})}),r.jsx("h2",{className:"text-2xl font-bold text-foreground mb-2",children:e}),r.jsx("p",{className:"text-muted-foreground mb-8",children:t}),o&&r.jsx(Ae,{onClick:o,type:"primary",buttonText:"Go Back"})]})})},mt=({label:e,options:t,error:o,className:n="",darkMode:s,...i})=>{const a=s??V.ENABLE_DARK_MODE;return r.jsxs("div",{className:`flex flex-col gap-1 ${n}`,children:[e&&r.jsx("label",{className:`text-sm font-medium ${a?"text-gray-200":"text-gray-700"}`,children:e}),r.jsxs("select",{className:`w-full px-3 py-2 border rounded-md focus:outline-none focus:ring-2
|
|
338
338
|
${a?"bg-gray-800 text-gray-100 border-gray-700 focus:ring-blue-500/50":"bg-white text-gray-900 border-gray-300 focus:ring-primary/50"}
|
|
339
|
-
${n}`,...i,children:[r.jsx("option",{value:"",disabled:!0,hidden:!0,children:i.placeholder||"Select an option"}),t.map(A=>r.jsx("option",{value:A.value,className:"text-gray-900",children:A.label},A.value))]}),o&&r.jsx("span",{className:"text-sm text-red-500",children:o})]})};var ar={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Qe=f.createContext&&f.createContext(ar),pt=["attr","size","title"];function wt(e,t){if(e==null)return{};var o=ft(e,t),n,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)n=i[s],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ft(e,t){if(e==null)return{};var o={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;o[n]=e[n]}return o}function be(){return be=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},be.apply(this,arguments)}function Pe(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),o.push.apply(o,n)}return o}function he(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Pe(Object(o),!0).forEach(function(n){bt(e,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Pe(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}function bt(e,t,o){return t=ht(t),t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function ht(e){var t=xt(e,"string");return typeof t=="symbol"?t:t+""}function xt(e,t){if(typeof e!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var n=o.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sr(e){return e&&e.map((t,o)=>f.createElement(t.tag,he({key:o},t.attr),sr(t.child)))}function ir(e){return t=>f.createElement(yt,be({attr:he({},e.attr)},t),sr(e.child))}function yt(e){var t=o=>{var{attr:n,size:s,title:i}=e,a=wt(e,pt),A=s||o.size||"1em",d;return o.className&&(d=o.className),e.className&&(d=(d?d+" ":"")+e.className),f.createElement("svg",be({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},o.attr,n,a,{className:d,style:he(he({color:e.color||o.color},o.style),e.style),height:A,width:A,xmlns:"http://www.w3.org/2000/svg"}),i&&f.createElement("title",null,i),e.children)};return Qe!==void 0?f.createElement(Qe.Consumer,null,o=>t(o)):t(ar)}function kt(e){return ir({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"15 18 9 12 15 6"},child:[]}]})(e)}function Dt(e){return ir({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 18 15 12 9 6"},child:[]}]})(e)}function Mt({data:e,columns:t,isLoading:o=!1,emptyMessage:n="No data available",itemsPerPage:s=10}){const[i,a]=f.useState(1),A=Math.ceil(e.length/s),d=(i-1)*s,w=e.slice(d,d+s),k=D=>{D>=1&&D<=A&&a(D)};return o?r.jsx("div",{className:"w-full h-48 flex items-center justify-center bg-white rounded-xl border border-gray-100",children:r.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):r.jsxs("div",{className:"bg-white rounded-xl shadow-sm border border-gray-100 overflow-hidden",children:[r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"w-full text-left border-collapse",children:[r.jsx("thead",{children:r.jsx("tr",{className:"bg-gray-50/50 border-b border-gray-100",children:t.map((D,y)=>r.jsx("th",{className:`px-6 py-4 text-sm font-semibold text-gray-600 ${D.className||""}`,children:D.header},y))})}),r.jsx("tbody",{className:"divide-y divide-gray-100",children:w.length>0?w.map(D=>r.jsx("tr",{className:"hover:bg-gray-50/50 transition-colors",children:t.map((y,v)=>r.jsx("td",{className:`px-6 py-4 ${y.className||""}`,children:y.cell?y.cell(D):y.accessorKey?D[y.accessorKey]:null},v))},D.id)):r.jsx("tr",{children:r.jsx("td",{colSpan:t.length,className:"px-6 py-8 text-center text-gray-500",children:n})})})]})}),A>1&&r.jsxs("div",{className:"px-6 py-4 border-t border-gray-100 flex items-center justify-between text-sm text-gray-500",children:[r.jsxs("span",{children:["Showing ",d+1," to"," ",Math.min(d+s,e.length)," of ",e.length," ","entries"]}),r.jsxs("div",{className:"flex gap-2",children:[r.jsxs("button",{onClick:()=>k(i-1),disabled:i===1,className:"p-1 px-3 border border-gray-200 rounded hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-1",children:[r.jsx(kt,{})," Previous"]}),r.jsxs("button",{onClick:()=>k(i+1),disabled:i===A,className:"p-1 px-3 border border-gray-200 rounded hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-1",children:["Next ",r.jsx(Dt,{})]})]})]})]})}function Bt({label:e,id:t,value:o,onChange:n,error:s,disabled:i=!1,use24Hour:a=!1,darkMode:A}){const[d,w]=f.useState(!1),[k,D]=f.useState(12),[y,v]=f.useState(0),[G,E]=f.useState("AM"),[N,O]=f.useState({top:0,left:0,width:0}),U=f.useRef(null),Z=f.useRef(null),J=f.useRef(null),Y=A??V.ENABLE_DARK_MODE,F=f.useCallback(()=>{if(Z.current){const b=Z.current.getBoundingClientRect(),Q=window.innerHeight-b.bottom,S=400,P=Q<S&&b.top>S?b.top-S+window.scrollY:b.bottom+window.scrollY+8;O({top:P,left:b.left+window.scrollX,width:Math.max(b.width,280)})}},[]);f.useEffect(()=>{if(d&&o){const[b,Q]=o.split(":").map(Number);a?(D(b),v(Q)):(E(b>=12?"PM":"AM"),D(b===0?12:b>12?b-12:b),v(Q))}d&&F()},[d,o,a,F]),f.useEffect(()=>{if(!d)return;const b=()=>F();return window.addEventListener("scroll",b,!0),window.addEventListener("resize",b),()=>{window.removeEventListener("scroll",b,!0),window.removeEventListener("resize",b)}},[d,F]);const H=(b,Q,S)=>{let P=b;return a||(S==="AM"?P=b===12?0:b:P=b===12?12:b+12),`${String(P).padStart(2,"0")}:${String(Q).padStart(2,"0")}`},x=()=>{n(H(k,y,G)),w(!1)};f.useEffect(()=>{const b=Q=>{U.current&&!U.current.contains(Q.target)&&J.current&&!J.current.contains(Q.target)&&w(!1)};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[]);const T=()=>{if(!o)return"Select time";const[b,Q]=o.split(":").map(Number);if(a)return o;const S=b>=12?"PM":"AM";return`${b===0?12:b>12?b-12:b}:${String(Q).padStart(2,"0")} ${S}`},K=a?Array.from({length:24},(b,Q)=>Q):Array.from({length:12},(b,Q)=>Q+1),$=Array.from({length:60},(b,Q)=>Q),X=d&&r.jsx("div",{className:Y?"dark":"",children:r.jsxs("div",{ref:J,className:"timepicker-dropdown-portal",style:{position:"absolute",top:N.top,left:N.left,width:N.width,zIndex:99999},children:[r.jsxs("div",{className:"timepicker-header",children:[r.jsx("svg",{className:"w-4 h-4 sm:w-5 sm:h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})}),r.jsx("span",{className:"text-sm sm:text-base",children:"Select Time"})]}),r.jsxs("div",{className:"timepicker-display",children:[r.jsx("span",{className:"time-value",children:String(k).padStart(2,"0")}),r.jsx("span",{className:"time-separator",children:":"}),r.jsx("span",{className:"time-value",children:String(y).padStart(2,"0")}),!a&&r.jsx("span",{className:"time-period",children:G})]}),r.jsxs("div",{className:"timepicker-columns",children:[r.jsxs("div",{className:"time-column",children:[r.jsx("div",{className:"column-label",children:"Hour"}),r.jsx("div",{className:"column-scroll",children:K.map(b=>r.jsx("button",{type:"button",onClick:()=>D(b),className:`time-option ${k===b?"selected":""}`,children:String(b).padStart(2,"0")},b))})]}),r.jsxs("div",{className:"time-column",children:[r.jsx("div",{className:"column-label",children:"Min"}),r.jsx("div",{className:"column-scroll",children:$.map(b=>r.jsx("button",{type:"button",onClick:()=>v(b),className:`time-option ${y===b?"selected":""}`,children:String(b).padStart(2,"0")},b))})]}),!a&&r.jsxs("div",{className:"time-column period-column",children:[r.jsx("div",{className:"column-label",children:"Period"}),r.jsxs("div",{className:"column-scroll period-scroll",children:[r.jsx("button",{type:"button",onClick:()=>E("AM"),className:`time-option period-option ${G==="AM"?"selected":""}`,children:"AM"}),r.jsx("button",{type:"button",onClick:()=>E("PM"),className:`time-option period-option ${G==="PM"?"selected":""}`,children:"PM"})]})]})]}),r.jsx("button",{type:"button",onClick:x,className:"done-button",children:"Done"})]})});return r.jsxs("div",{className:"flex flex-col w-full timepicker-wrapper",ref:U,children:[e&&r.jsx("label",{className:`text-label ${Y?"text-gray-200":""} text-[12px] sm:text-[13px] md:text-[14px] lg:text-[15px] xl:text-[16px] mb-1 sm:mb-2 font-semibold`,children:e}),r.jsxs("div",{className:"relative",children:[r.jsx("button",{ref:Z,id:t,type:"button",onClick:()=>!i&&w(!d),disabled:i,className:`w-full border-gray-400 rounded-full px-3 sm:px-4 md:px-5 py-1.5 sm:py-2 border outline-none text-left text-xs sm:text-sm ${s?Y?"border-red-700 focus:border-red-600":"border-red-300 focus:border-red-500 focus:ring-red-500/30":Y?"focus:border-primary border-gray-700":"focus:border-primary"} ${i?Y?"bg-gray-700 cursor-not-allowed opacity-60":"bg-gray-100 cursor-not-allowed opacity-60":Y?"bg-gray-900 cursor-pointer text-white":"bg-white cursor-pointer"} transition-all duration-300 ease-in-out pr-8 sm:pr-10`,children:T()}),r.jsx("div",{className:"absolute right-2 sm:right-3 top-1/2 transform -translate-y-1/2 pointer-events-none",children:r.jsx("svg",{className:`w-4 h-4 sm:w-5 sm:h-5 ${i?Y?"text-gray-600":"text-gray-400":Y?"text-blue-400":"text-secondary"}`,"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:r.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})})}),d&&xe.createPortal(X,document.body)]}),s&&r.jsx("span",{className:"text-red-500 dark:text-red-400 text-xs sm:text-sm font-medium mt-1",children:s}),r.jsx("style",{children:`
|
|
339
|
+
${n}`,...i,children:[r.jsx("option",{value:"",disabled:!0,hidden:!0,children:i.placeholder||"Select an option"}),t.map(A=>r.jsx("option",{value:A.value,className:"text-gray-900",children:A.label},A.value))]}),o&&r.jsx("span",{className:"text-sm text-red-500",children:o})]})};var ar={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Qe=f.createContext&&f.createContext(ar),pt=["attr","size","title"];function wt(e,t){if(e==null)return{};var o=ft(e,t),n,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)n=i[s],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ft(e,t){if(e==null)return{};var o={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;o[n]=e[n]}return o}function be(){return be=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},be.apply(this,arguments)}function Pe(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),o.push.apply(o,n)}return o}function he(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Pe(Object(o),!0).forEach(function(n){bt(e,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Pe(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}function bt(e,t,o){return t=ht(t),t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function ht(e){var t=xt(e,"string");return typeof t=="symbol"?t:t+""}function xt(e,t){if(typeof e!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var n=o.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sr(e){return e&&e.map((t,o)=>f.createElement(t.tag,he({key:o},t.attr),sr(t.child)))}function ir(e){return t=>f.createElement(yt,be({attr:he({},e.attr)},t),sr(e.child))}function yt(e){var t=o=>{var{attr:n,size:s,title:i}=e,a=wt(e,pt),A=s||o.size||"1em",d;return o.className&&(d=o.className),e.className&&(d=(d?d+" ":"")+e.className),f.createElement("svg",be({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},o.attr,n,a,{className:d,style:he(he({color:e.color||o.color},o.style),e.style),height:A,width:A,xmlns:"http://www.w3.org/2000/svg"}),i&&f.createElement("title",null,i),e.children)};return Qe!==void 0?f.createElement(Qe.Consumer,null,o=>t(o)):t(ar)}function kt(e){return ir({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"15 18 9 12 15 6"},child:[]}]})(e)}function Dt(e){return ir({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 18 15 12 9 6"},child:[]}]})(e)}function Mt({data:e,columns:t,isLoading:o=!1,emptyMessage:n="No data available",itemsPerPage:s=10}){const[i,a]=f.useState(1),A=Math.ceil(e.length/s),d=(i-1)*s,w=e.slice(d,d+s),k=D=>{D>=1&&D<=A&&a(D)};return o?r.jsx("div",{className:"w-full h-48 flex items-center justify-center bg-white rounded-xl border border-gray-100",children:r.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):r.jsxs("div",{className:"bg-white rounded-xl shadow-sm border border-gray-100 overflow-hidden",children:[r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"w-full text-left border-collapse",children:[r.jsx("thead",{children:r.jsx("tr",{className:"bg-gray-50/50 border-b border-gray-100",children:t.map((D,x)=>r.jsx("th",{className:`px-6 py-4 text-sm font-semibold text-gray-600 ${D.className||""}`,children:D.header},x))})}),r.jsx("tbody",{className:"divide-y divide-gray-100",children:w.length>0?w.map(D=>r.jsx("tr",{className:"hover:bg-gray-50/50 transition-colors",children:t.map((x,E)=>r.jsx("td",{className:`px-6 py-4 ${x.className||""}`,children:x.cell?x.cell(D):x.accessorKey?D[x.accessorKey]:null},E))},D.id)):r.jsx("tr",{children:r.jsx("td",{colSpan:t.length,className:"px-6 py-8 text-center text-gray-500",children:n})})})]})}),A>1&&r.jsxs("div",{className:"px-6 py-4 border-t border-gray-100 flex items-center justify-between text-sm text-gray-500",children:[r.jsxs("span",{children:["Showing ",d+1," to"," ",Math.min(d+s,e.length)," of ",e.length," ","entries"]}),r.jsxs("div",{className:"flex gap-2",children:[r.jsxs("button",{onClick:()=>k(i-1),disabled:i===1,className:"p-1 px-3 border border-gray-200 rounded hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-1",children:[r.jsx(kt,{})," Previous"]}),r.jsxs("button",{onClick:()=>k(i+1),disabled:i===A,className:"p-1 px-3 border border-gray-200 rounded hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-1",children:["Next ",r.jsx(Dt,{})]})]})]})]})}function Bt({label:e,id:t,value:o,onChange:n,error:s,disabled:i=!1,use24Hour:a=!1,darkMode:A}){const[d,w]=f.useState(!1),[k,D]=f.useState(12),[x,E]=f.useState(0),[G,N]=f.useState("AM"),[v,O]=f.useState({top:0,left:0,width:0}),U=f.useRef(null),Z=f.useRef(null),J=f.useRef(null),Y=A??V.ENABLE_DARK_MODE,F=f.useCallback(()=>{if(Z.current){const b=Z.current.getBoundingClientRect(),Q=window.innerHeight-b.bottom,S=400,P=Q<S&&b.top>S?b.top-S+window.scrollY:b.bottom+window.scrollY+8;O({top:P,left:b.left+window.scrollX,width:Math.max(b.width,280)})}},[]);f.useEffect(()=>{if(d&&o){const[b,Q]=o.split(":").map(Number);a?(D(b),E(Q)):(N(b>=12?"PM":"AM"),D(b===0?12:b>12?b-12:b),E(Q))}d&&F()},[d,o,a,F]),f.useEffect(()=>{if(!d)return;const b=()=>F();return window.addEventListener("scroll",b,!0),window.addEventListener("resize",b),()=>{window.removeEventListener("scroll",b,!0),window.removeEventListener("resize",b)}},[d,F]);const H=(b,Q,S)=>{let P=b;return a||(S==="AM"?P=b===12?0:b:P=b===12?12:b+12),`${String(P).padStart(2,"0")}:${String(Q).padStart(2,"0")}`},y=()=>{n(H(k,x,G)),w(!1)};f.useEffect(()=>{const b=Q=>{U.current&&!U.current.contains(Q.target)&&J.current&&!J.current.contains(Q.target)&&w(!1)};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[]);const T=()=>{if(!o)return"Select time";const[b,Q]=o.split(":").map(Number);if(a)return o;const S=b>=12?"PM":"AM";return`${b===0?12:b>12?b-12:b}:${String(Q).padStart(2,"0")} ${S}`},K=a?Array.from({length:24},(b,Q)=>Q):Array.from({length:12},(b,Q)=>Q+1),$=Array.from({length:60},(b,Q)=>Q),X=d&&r.jsx("div",{className:Y?"dark":"",children:r.jsxs("div",{ref:J,className:"timepicker-dropdown-portal",style:{position:"absolute",top:v.top,left:v.left,width:v.width,zIndex:99999},children:[r.jsxs("div",{className:"timepicker-header",children:[r.jsx("svg",{className:"w-4 h-4 sm:w-5 sm:h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})}),r.jsx("span",{className:"text-sm sm:text-base",children:"Select Time"})]}),r.jsxs("div",{className:"timepicker-display",children:[r.jsx("span",{className:"time-value",children:String(k).padStart(2,"0")}),r.jsx("span",{className:"time-separator",children:":"}),r.jsx("span",{className:"time-value",children:String(x).padStart(2,"0")}),!a&&r.jsx("span",{className:"time-period",children:G})]}),r.jsxs("div",{className:"timepicker-columns",children:[r.jsxs("div",{className:"time-column",children:[r.jsx("div",{className:"column-label",children:"Hour"}),r.jsx("div",{className:"column-scroll",children:K.map(b=>r.jsx("button",{type:"button",onClick:()=>D(b),className:`time-option ${k===b?"selected":""}`,children:String(b).padStart(2,"0")},b))})]}),r.jsxs("div",{className:"time-column",children:[r.jsx("div",{className:"column-label",children:"Min"}),r.jsx("div",{className:"column-scroll",children:$.map(b=>r.jsx("button",{type:"button",onClick:()=>E(b),className:`time-option ${x===b?"selected":""}`,children:String(b).padStart(2,"0")},b))})]}),!a&&r.jsxs("div",{className:"time-column period-column",children:[r.jsx("div",{className:"column-label",children:"Period"}),r.jsxs("div",{className:"column-scroll period-scroll",children:[r.jsx("button",{type:"button",onClick:()=>N("AM"),className:`time-option period-option ${G==="AM"?"selected":""}`,children:"AM"}),r.jsx("button",{type:"button",onClick:()=>N("PM"),className:`time-option period-option ${G==="PM"?"selected":""}`,children:"PM"})]})]})]}),r.jsx("button",{type:"button",onClick:y,className:"done-button",children:"Done"})]})});return r.jsxs("div",{className:"flex flex-col w-full timepicker-wrapper",ref:U,children:[e&&r.jsx("label",{className:`text-label ${Y?"text-gray-200":""} text-[12px] sm:text-[13px] md:text-[14px] lg:text-[15px] xl:text-[16px] mb-1 sm:mb-2 font-semibold`,children:e}),r.jsxs("div",{className:"relative",children:[r.jsx("button",{ref:Z,id:t,type:"button",onClick:()=>!i&&w(!d),disabled:i,className:`w-full border-gray-400 rounded-full px-3 sm:px-4 md:px-5 py-1.5 sm:py-2 border outline-none text-left text-xs sm:text-sm ${s?Y?"border-red-700 focus:border-red-600":"border-red-300 focus:border-red-500 focus:ring-red-500/30":Y?"focus:border-primary border-gray-700":"focus:border-primary"} ${i?Y?"bg-gray-700 cursor-not-allowed opacity-60":"bg-gray-100 cursor-not-allowed opacity-60":Y?"bg-gray-900 cursor-pointer text-white":"bg-white cursor-pointer"} transition-all duration-300 ease-in-out pr-8 sm:pr-10`,children:T()}),r.jsx("div",{className:"absolute right-2 sm:right-3 top-1/2 transform -translate-y-1/2 pointer-events-none",children:r.jsx("svg",{className:`w-4 h-4 sm:w-5 sm:h-5 ${i?Y?"text-gray-600":"text-gray-400":Y?"text-blue-400":"text-secondary"}`,"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:r.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})})}),d&&xe.createPortal(X,document.body)]}),s&&r.jsx("span",{className:"text-red-500 dark:text-red-400 text-xs sm:text-sm font-medium mt-1",children:s}),r.jsx("style",{children:`
|
|
340
340
|
/* Modern Professional TimePicker - Blue Theme */
|
|
341
341
|
.timepicker-wrapper {
|
|
342
342
|
position: relative;
|
|
@@ -593,7 +593,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
593
593
|
`,children:r.jsx("span",{className:`
|
|
594
594
|
inline-block h-4 w-4 transform rounded-full bg-white transition-transform
|
|
595
595
|
${t?"translate-x-6":"translate-x-1"}
|
|
596
|
-
`})}),e&&r.jsx("span",{className:"text-sm text-gray-700",children:e})]});function Ct({label:e,labelClassName:t,id:o,value:n,onChange:s,error:i,disabled:a=!1,darkMode:A}){const[d,w]=f.useState(!1),[k,D]=f.useState("date"),[
|
|
596
|
+
`})}),e&&r.jsx("span",{className:"text-sm text-gray-700",children:e})]});function Ct({label:e,labelClassName:t,id:o,value:n,onChange:s,error:i,disabled:a=!1,darkMode:A}){const[d,w]=f.useState(!1),[k,D]=f.useState("date"),[x,E]=f.useState(new Date),[G,N]=f.useState(new Date().getMonth()),[v,O]=f.useState(new Date().getFullYear()),[U,Z]=f.useState({top:0,left:0,width:0}),J=f.useRef(null),Y=f.useRef(null),F=f.useRef(null),H=A??V.ENABLE_DARK_MODE,y=["January","February","March","April","May","June","July","August","September","October","November","December"],T=Array.from({length:120},(g,B)=>new Date().getFullYear()-100+B);f.useEffect(()=>{if(n){const g=new Date(n);d||(E(g),N(g.getMonth()),O(g.getFullYear()))}},[n,d]);const K=f.useCallback(()=>{if(Y.current){const g=Y.current.getBoundingClientRect(),B=window.innerHeight-g.bottom,I=450,_=B<I&&g.top>I?g.top-I+window.scrollY:g.bottom+window.scrollY+8;Z({top:_,left:g.left+window.scrollX,width:Math.max(g.width,300)})}},[]);f.useEffect(()=>{d&&(K(),N(x.getMonth()),O(x.getFullYear()))},[d,K]),f.useEffect(()=>{if(!d)return;const g=()=>K();return window.addEventListener("scroll",g,!0),window.addEventListener("resize",g),()=>{window.removeEventListener("scroll",g,!0),window.removeEventListener("resize",g)}},[d,K]),f.useEffect(()=>{const g=B=>{J.current&&!J.current.contains(B.target)&&F.current&&!F.current.contains(B.target)&&w(!1)};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[]);const $=()=>{if(!n)return"Select date & time";const g=new Date(n),B=g.getFullYear(),I=String(g.getMonth()+1).padStart(2,"0"),_=String(g.getDate()).padStart(2,"0");let R=g.getHours();const ee=String(g.getMinutes()).padStart(2,"0"),lr=R>=12?"PM":"AM";return R=R%12,R=R||12,`${B}-${I}-${_} ${R}:${ee} ${lr}`},X=(g,B)=>new Date(B,g+1,0).getDate(),b=(g,B)=>new Date(B,g,1).getDay(),Q=g=>{const B=new Date(x);B.setFullYear(v),B.setMonth(G),B.setDate(g),E(B)},S=g=>g===x.getDate()&&G===x.getMonth()&&v===x.getFullYear(),P=g=>{const B=new Date;return g===B.getDate()&&G===B.getMonth()&&v===B.getFullYear()},W=()=>{G===0?(N(11),O(v-1)):N(G-1)},h=()=>{G===11?(N(0),O(v+1)):N(G+1)},re=Array.from({length:12},(g,B)=>B+1),te=Array.from({length:60},(g,B)=>B),l=(g,B)=>{const I=new Date(x);let _=I.getHours();if(g==="hour"){const R=B,ee=_>=12;ee&&R!==12?I.setHours(R+12):!ee&&R===12?I.setHours(0):I.setHours(R)}else if(g==="minute")I.setMinutes(B);else if(g==="ampm"){const R=B==="PM",ee=_%12||12;R&&ee!==12?I.setHours(ee+12):R&&ee===12?I.setHours(12):!R&&ee===12?I.setHours(0):I.setHours(ee)}E(I)},c=x.getHours()%12||12,u=x.getMinutes(),M=x.getHours()>=12?"PM":"AM",L=()=>{s(x.getTime()),w(!1)},q=()=>{const g=new Date;E(g),N(g.getMonth()),O(g.getFullYear())},j=d&&r.jsx("div",{className:H?"dark":"",children:r.jsxs("div",{ref:F,className:"datetime-dropdown-portal",style:{position:"absolute",top:U.top,left:U.left,width:U.width,zIndex:99999},children:[r.jsxs("div",{className:"tab-header",children:[r.jsx("button",{type:"button",className:`tab-btn ${k==="date"?"active":""}`,onClick:()=>D("date"),children:"Date"}),r.jsx("button",{type:"button",className:`tab-btn ${k==="time"?"active":""}`,onClick:()=>D("time"),children:"Time"})]}),r.jsx("div",{className:"picker-content",children:k==="date"?r.jsxs("div",{className:"date-view",children:[r.jsxs("div",{className:"datepicker-header",children:[r.jsx("button",{type:"button",onClick:W,className:"nav-button",children:r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 19l-7-7 7-7"})})}),r.jsxs("div",{className:"selects-container",children:[r.jsx("select",{value:G,onChange:g=>N(Number(g.target.value)),className:"month-select",children:y.map((g,B)=>r.jsx("option",{value:B,children:g},g))}),r.jsx("select",{value:v,onChange:g=>O(Number(g.target.value)),className:"year-select",children:T.map(g=>r.jsx("option",{value:g,children:g},g))})]}),r.jsx("button",{type:"button",onClick:h,className:"nav-button",children:r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 5l7 7-7 7"})})})]}),r.jsx("div",{className:"day-names",children:["Su","Mo","Tu","We","Th","Fr","Sa"].map(g=>r.jsx("div",{className:"day-name",children:g},g))}),r.jsxs("div",{className:"calendar-grid",children:[Array.from({length:b(G,v)}).map((g,B)=>r.jsx("div",{className:"calendar-day empty"},`empty-${B}`)),Array.from({length:X(G,v)}).map((g,B)=>{const I=B+1,_=S(I),R=P(I);return r.jsx("button",{type:"button",onClick:()=>Q(I),className:`calendar-day ${_?"selected":""} ${R?"today":""}`,children:I},I)})]})]}):r.jsxs("div",{className:"time-view",children:[r.jsxs("div",{className:"time-display",children:[r.jsx("span",{className:"time-val",children:String(c).padStart(2,"0")}),r.jsx("span",{className:"sep",children:":"}),r.jsx("span",{className:"time-val",children:String(u).padStart(2,"0")}),r.jsx("span",{className:"period",children:M})]}),r.jsxs("div",{className:"time-columns",children:[r.jsxs("div",{className:"time-col",children:[r.jsx("div",{className:"col-header",children:"Hour"}),r.jsx("div",{className:"col-list",children:re.map(g=>r.jsx("button",{type:"button",className:`time-opt ${c===g?"selected":""}`,onClick:()=>l("hour",g),children:String(g).padStart(2,"0")},g))})]}),r.jsxs("div",{className:"time-col",children:[r.jsx("div",{className:"col-header",children:"Minute"}),r.jsx("div",{className:"col-list",children:te.map(g=>r.jsx("button",{type:"button",className:`time-opt ${u===g?"selected":""}`,onClick:()=>l("minute",g),children:String(g).padStart(2,"0")},g))})]}),r.jsxs("div",{className:"time-col",children:[r.jsx("div",{className:"col-header",children:"Period"}),r.jsx("div",{className:"col-list",children:["AM","PM"].map(g=>r.jsx("button",{type:"button",className:`time-opt ${M===g?"selected":""}`,onClick:()=>l("ampm",g),children:g},g))})]})]})]})}),r.jsxs("div",{className:"modal-footer",children:[r.jsx("button",{type:"button",onClick:q,className:"btn-secondary",children:"Now"}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx("button",{type:"button",onClick:()=>w(!1),className:"btn-secondary",children:"Cancel"}),r.jsx("button",{type:"button",onClick:L,className:"btn-primary",children:"Apply"})]})]})]})});return r.jsxs("div",{className:"flex flex-col w-full datetime-wrapper",ref:J,children:[e&&r.jsx("label",{className:Ve(`text-label ${H?"text-gray-200":""} text-[12px] sm:text-[13px] md:text-[14px] lg:text-[15px] xl:text-[16px] mb-1 sm:mb-2 font-semibold`,t||""),children:e}),r.jsxs("div",{className:"relative",children:[r.jsx("button",{ref:Y,id:o,type:"button",onClick:()=>!a&&w(!d),disabled:a,className:`w-full border-contrast rounded-full px-3 sm:px-4 md:px-5 py-1.5 sm:py-2 border outline-none text-left text-xs sm:text-sm ${i?H?"border-red-700 focus:border-red-600":"border-red-300 focus:border-red-500 focus:ring-red-500/30":H?"focus:border-primary border-gray-700":"focus:border-primary"} ${a?H?"bg-gray-700 cursor-not-allowed opacity-60":"bg-gray-100 cursor-not-allowed opacity-60":H?"bg-gray-900 cursor-pointer text-white":"bg-white cursor-pointer"} transition-all duration-300 ease-in-out pr-8 sm:pr-10`,children:$()}),r.jsx("div",{className:"absolute right-2 sm:right-3 top-1/2 transform -translate-y-1/2 pointer-events-none",children:r.jsx("svg",{className:`w-4 h-4 sm:w-5 sm:h-5 ${a?H?"text-gray-600":"text-gray-400":H?"text-blue-400":"text-secondary"}`,"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:r.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})})}),d&&xe.createPortal(j,document.body)]}),i&&r.jsx("span",{className:"text-red-500 dark:text-red-400 text-xs sm:text-sm font-medium mt-1",children:i}),r.jsx("style",{children:`
|
|
597
597
|
/* DateTimePicker Styles */
|
|
598
598
|
.datetime-dropdown-portal {
|
|
599
599
|
background: white;
|