cortex-react-components 1.39.2 → 1.39.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-Y5CGMHFF.mjs → chunk-2JZGT4F6.mjs} +1 -1
- package/dist/chunk-4NQDN4LR.mjs +4 -0
- package/dist/{chunk-U4NCHUCT.mjs → chunk-6TGQ2756.mjs} +1 -1
- package/dist/{chunk-3PC5BLK7.mjs → chunk-7XSAYKJ7.mjs} +1 -1
- package/dist/{chunk-DJ5BLICX.mjs → chunk-7ZHB6VE4.mjs} +1 -1
- package/dist/{chunk-D3727TBZ.mjs → chunk-BD4GVPWR.mjs} +1 -1
- package/dist/{chunk-Y5LJ6MWY.mjs → chunk-DOZXVU56.mjs} +1 -1
- package/dist/chunk-DYIUZ4V5.mjs +4 -0
- package/dist/{chunk-4ZCQ4OUP.mjs → chunk-F4NSZHLC.mjs} +1 -1
- package/dist/{chunk-DESYC5BB.mjs → chunk-GHBJK554.mjs} +1 -1
- package/dist/{chunk-D5DOMEF7.mjs → chunk-O77SHHMY.mjs} +1 -1
- package/dist/{chunk-ILCZ25VJ.mjs → chunk-OZ7CSBQO.mjs} +1 -1
- package/dist/{chunk-GOMLTG5W.mjs → chunk-RZTXT4UD.mjs} +1 -1
- package/dist/components/Cards/index.mjs +1 -1
- package/dist/components/HeaderFooter/Header.mjs +1 -1
- package/dist/components/HeaderFooter/Header.stories.mjs +1 -1
- package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
- package/dist/components/HeaderFooter/index.mjs +1 -1
- package/dist/components/Heros/RenderHero.mjs +1 -1
- package/dist/components/Heros/SectionHero/index.mjs +1 -1
- package/dist/components/Heros/index.mjs +1 -1
- package/dist/components/Holidays/ApproveLeave.d.ts +8 -2
- package/dist/components/Holidays/ApproveLeave.js +1 -1
- package/dist/components/Holidays/ApproveLeave.mjs +1 -1
- package/dist/components/Holidays/ApproveLeave.stories.js +39 -39
- package/dist/components/Holidays/ApproveLeave.stories.mjs +1 -1
- package/dist/components/Holidays/HolidayTracker.d.ts +9 -1
- package/dist/components/Holidays/HolidayTracker.js +1 -1
- package/dist/components/Holidays/HolidayTracker.mjs +1 -1
- package/dist/components/Holidays/HolidayTracker.stories.js +201 -201
- package/dist/components/Holidays/HolidayTracker.stories.mjs +1 -1
- package/dist/components/Holidays/index.js +1 -1
- package/dist/components/Holidays/index.mjs +1 -1
- package/dist/components/Menus/index.mjs +1 -1
- package/dist/components/Payload/index.mjs +1 -1
- package/dist/components/index.js +6 -6
- package/dist/components/index.mjs +1 -1
- package/dist/index.js +6 -6
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/Blog.mjs +1 -1
- package/dist/pages/Blog.stories.mjs +1 -1
- package/dist/pages/Documentation.mjs +1 -1
- package/dist/pages/Documentation.stories.mjs +1 -1
- package/dist/pages/IndexPage.mjs +1 -1
- package/dist/pages/IndexPage.stories.mjs +1 -1
- package/dist/pages/Intranet.mjs +1 -1
- package/dist/pages/Intranet.stories.mjs +1 -1
- package/dist/pages/LandingPage.mjs +1 -1
- package/dist/pages/LandingPage.stories.mjs +1 -1
- package/dist/pages/Page.mjs +1 -1
- package/dist/pages/Page.stories.mjs +1 -1
- package/dist/pages/Publish.mjs +1 -1
- package/dist/pages/Publish.stories.mjs +1 -1
- package/dist/pages/Website.mjs +1 -1
- package/dist/pages/Website.stories.mjs +1 -1
- package/dist/sections/BlogListSection.mjs +1 -1
- package/dist/sections/BlogListSection.stories.mjs +1 -1
- package/dist/sections/ContactSection.mjs +1 -1
- package/dist/sections/ContactSection.stories.mjs +1 -1
- package/dist/sections/form/index.mjs +1 -1
- package/dist/sections/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-BXBLKTRB.mjs +0 -4
- package/dist/chunk-EPPW2K6R.mjs +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{a as f}from"./chunk-YLGJP63J.mjs";import{a as
|
|
4
|
+
import{a as f}from"./chunk-YLGJP63J.mjs";import{a as p}from"./chunk-NOEITQK2.mjs";import{a as C}from"./chunk-EG6XIOOJ.mjs";import{b as v}from"./chunk-GLEWUUGS.mjs";import{a as i}from"./chunk-NIQ4466A.mjs";import{Formik as x}from"formik";import{FaUser as w}from"react-icons/fa6";import*as m from"yup";import{toast as b}from"sonner";import{jsx as e,jsxs as n}from"react/jsx-runtime";var s={tooShort:"Must be at least ${min} characters",tooLong:"Must be at most ${max} characters",required:"This field is required",email:"Invalid email format"},L=m.object().shape({name:m.string().min(2,s.tooShort).max(50,s.tooLong).required(s.required),email:m.string().email(s.email).required(s.required),subject:m.string().min(2,s.tooShort).max(50,s.tooLong).required(s.required),message:m.string().min(2,s.tooShort).max(300,s.tooLong).required(s.required)}),u=i("!pr-[44px]"),g=i("!border-red-600 border"),d=i("sr-only");function U(){return e(x,{initialValues:{name:"",email:"",subject:"",message:""},validationSchema:L,onSubmit:async(a,{resetForm:t})=>{let o=await f(a);o.data===null?b.error(o.message):(b.success(o.message),t())},children:({errors:a,touched:t,values:o,handleChange:r,handleBlur:c,isSubmitting:l,handleSubmit:h})=>n("form",{onSubmit:h,className:"grid grid-cols-1 gap-2 pt-2 lg:grid-cols-2",children:[n("div",{children:[e(p,{placeholder:"Your Name",type:"text",name:"name",value:o.name,onChange:r,onBlur:c,disabled:l,icon:e(w,{}),className:i(u,a.name&&t.name&&g)}),a.name&&t.name&&e("p",{title:a.name,"aria-live":"polite",role:"error message",className:d,children:a.name})]}),n("div",{children:[e(p,{placeholder:"Your Email",type:"email",name:"email",value:o.email,onChange:r,onBlur:c,disabled:l,icon:e(N,{}),className:i(u,a.email&&t.email&&g)}),a.email&&t.email&&e("p",{title:a.email,"aria-live":"polite",role:"error message",className:d,children:a.email})]}),n("div",{className:"lg:col-span-2",children:[e(p,{placeholder:"Subject",type:"text",name:"subject",value:o.subject,onChange:r,onBlur:c,disabled:l,className:i(u,a.subject&&t.subject&&g)}),a.subject&&t.subject&&e("p",{title:a.subject,"aria-live":"polite",role:"error message",className:d,children:a.subject})]}),n("div",{className:"lg:col-span-2",children:[e(C,{placeholder:"Write Message...",name:"message",value:o.message,onChange:r,onBlur:c,disabled:l,icon:e(S,{}),className:i(u,a.message&&t.message&&g)}),a.message&&t.message&&e("p",{title:a.message,"aria-live":"polite",role:"error message",className:d,children:a.message})]}),e("div",{className:"lg:col-span-2",children:e(v,{type:"submit",className:"w-full outline outline-accent bg-accent text-accent-foreground hover:bg-white hover:text-accent",disabled:l,children:e("span",{children:"SEND"})})})]})})}function N(){return e("svg",{width:16,height:15,viewBox:"0 0 16 15",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M14.9727 1.76172L13.2227 13.1094C13.1953 13.3828 13.0312 13.6289 12.7852 13.7656C12.6484 13.8203 12.5117 13.875 12.3477 13.875C12.2383 13.875 12.1289 13.8477 12.0195 13.793L8.68359 12.3984L7.28906 14.4766C7.17969 14.668 6.98828 14.75 6.79688 14.75C6.49609 14.75 6.25 14.5039 6.25 14.2031V11.5781C6.25 11.3594 6.30469 11.168 6.41406 11.0312L12.375 3.375L4.33594 10.6211L1.51953 9.44531C1.21875 9.30859 1 9.03516 1 8.67969C0.972656 8.29688 1.13672 8.02344 1.4375 7.85938L13.6875 0.886719C13.9609 0.722656 14.3438 0.722656 14.6172 0.914062C14.8906 1.10547 15.0273 1.43359 14.9727 1.76172Z"})})}function S(){return e("svg",{width:"14",height:"11",viewBox:"0 0 14 11",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M12.6875 0.5C13.3984 0.5 14 1.10156 14 1.8125C14 2.25 13.7812 2.63281 13.4531 2.87891L7.51953 7.33594C7.19141 7.58203 6.78125 7.58203 6.45312 7.33594L0.519531 2.87891C0.191406 2.63281 0 2.25 0 1.8125C0 1.10156 0.574219 0.5 1.3125 0.5H12.6875ZM5.93359 8.04688C6.5625 8.51172 7.41016 8.51172 8.03906 8.04688L14 3.5625V9.25C14 10.2344 13.207 11 12.25 11H1.75C0.765625 11 0 10.2344 0 9.25V3.5625L5.93359 8.04688Z"})})}export{U as a};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
import{a as y}from"./chunk-ZGOBG76E.mjs";import{a as f}from"./chunk-RMI4G7HJ.mjs";import{a as v}from"./chunk-YF7BU7S3.mjs";import{a as p}from"./chunk-DYIUZ4V5.mjs";import{useState as N}from"react";import{ChevronDown as C}from"lucide-react";import{CalendarDays as q,Grid as P,PlusCircle as R,CheckSquare as A}from"lucide-react";import{useRouter as k}from"next/navigation";import{format as T}from"date-fns";import{jsx as r,jsxs as n}from"react/jsx-runtime";function b(...s){return s.filter(Boolean).join(" ")}function B({holidays:s,currentUser:t,currentDate:o,leaveApprovals:D,employees:h,submitLeaveRequest:i,approveLeave:d,rejectLeave:m}){let[a,l]=N("Calendar View"),x=k(),w=!1,c=async e=>{console.log("Setting current date:",e);let L=T(e,"dd-MM-yyyy"),g=new URL(window.location.href);return g.searchParams.set("date",L),x.push(g.toString()),{success:!0}};if(w)return r("div",{className:"flex justify-center items-center h-screen",children:r("div",{className:"animate-spin rounded-full h-32 w-32 border-t-2 border-b-2 border-gray-900"})});let u=[{name:"Grid View",icon:P,current:a==="Grid View"},{name:"Calendar View",icon:q,current:a==="Calendar View"},{name:"Request Leave",icon:R,current:a==="Request Leave"},{name:"Approve Leave",icon:A,current:a==="Approve Leave"}];return n("div",{className:"container mx-auto p-4",children:[r("h1",{className:"text-3xl font-bold mb-4",children:"Holiday Tracker"}),n("div",{className:"mb-8",children:[n("div",{className:"sm:hidden",children:[r("select",{value:a,onChange:e=>l(e.target.value),className:"block w-full rounded-md border-gray-300 py-2 pl-3 pr-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm",children:u.map(e=>r("option",{children:e.name},e.name))}),r(C,{className:"pointer-events-none absolute right-3 top-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]}),r("div",{className:"hidden sm:block",children:r("div",{className:"border-b border-gray-200",children:r("nav",{className:"-mb-px flex space-x-8","aria-label":"Tabs",children:u.map(e=>n("a",{onClick:()=>{(e.name!=="Approve Leave"||t.grade==="Manager"||t.grade==="Senior Manager"||t.grade==="Partner")&&l(e.name)},className:b(e.current?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",e.name==="Approve Leave"&&t.grade!=="Manager"&&t.grade!=="Senior Manager"&&t.grade!=="Partner"?"cursor-not-allowed opacity-50":"","group inline-flex items-center border-b-2 py-4 px-1 text-sm font-medium"),"aria-current":e.current?"page":void 0,children:[r(e.icon,{className:b(e.current?"text-accent":"text-gray-400 group-hover:text-gray-500","-ml-0.5 mr-2 h-5 w-5"),"aria-hidden":"true"}),r("span",{children:e.name})]},e.name))})})})]}),a==="Grid View"&&r(f,{currentDate:o,setCurrentDate:c,holidays:s,employees:h}),a==="Calendar View"&&r(y,{currentDate:o,setCurrentDate:c,holidays:s}),a==="Request Leave"&&r(v,{remainingDays:t.remainingLeaveDays,submitLeaveRequest:e=>i?i(e):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),a==="Approve Leave"&&r(p,{leaveRequests:D,onApprove:e=>d?d(e):Promise.resolve({success:!1,message:"Approve leave request function not provided"}),onReject:e=>m?m(e):Promise.resolve({success:!1,message:"Reject leave request function not provided"})})]})}export{B as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as g}from"./chunk-AD7PG4E2.mjs";import{a as
|
|
1
|
+
import{a as g}from"./chunk-AD7PG4E2.mjs";import{a as e}from"./chunk-WZLEEZ5C.mjs";import{a as n}from"./chunk-6ZNVXWZR.mjs";import{a as o}from"./chunk-65EMMROH.mjs";import{a as s}from"./chunk-UESKYRNK.mjs";import{jsx as i,jsxs as a}from"react/jsx-runtime";function f({blogs:l,pages:m,categories:t,types:r}){return i("section",{children:i(s,{children:a("div",{className:"grid gap-30px lg:grid-cols-[1fr_410px]",children:[a("div",{children:[r&&i(n,{types:r}),i(g,{blogs:l}),i(e,{pages:m})]}),i("div",{className:"grid gap-30px w-full self-baseline max-md:mx-auto max-md:max-w-[410px] lg:gap-10",children:i("div",{className:"lg:-mt-24 w-full",children:t&&t.links&&i(o,{links:t.links,title:t.title})})})]})})})}export{f as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{a as s}from"./chunk-4DJ6HKHR.mjs";import{a as c}from"./chunk-WU3JMLSC.mjs";import{a as u}from"./chunk-BZAYEKYC.mjs";import{b as l}from"./chunk-GLEWUUGS.mjs";import{a,b as i,c as t,e as o}from"./chunk-D76EO57Z.mjs";import{a as m}from"./chunk-
|
|
4
|
+
import{a as s}from"./chunk-4DJ6HKHR.mjs";import{a as c}from"./chunk-WU3JMLSC.mjs";import{a as u}from"./chunk-BZAYEKYC.mjs";import{b as l}from"./chunk-GLEWUUGS.mjs";import{a,b as i,c as t,e as o}from"./chunk-D76EO57Z.mjs";import{a as m}from"./chunk-RZTXT4UD.mjs";import{ExternalLink as d}from"lucide-react";import{jsx as e,jsxs as r}from"react/jsx-runtime";function b({...n}){return r("div",{className:"relative",children:[e("div",{className:"h-screen relative overflow-hidden",children:e(m,{...n.header,logoVideo:s,logoLight:u,logoDark:c})}),r("div",{id:"next-section",className:"mt-16 pt-16 min-h-screen",children:[" ",e("div",{className:"container py-8",children:r("div",{className:"grid grid-cols-1 gap-8 lg:grid-cols-3",children:[e("div",{className:"lg:col-span-2",children:n.children}),r("div",{className:"space-y-6",children:[r(a,{children:[e(i,{children:e(t,{children:"Quick Actions"})}),r(o,{children:[e("p",{className:"mb-4 text-sm text-muted-foreground",children:"Get started with your first action in just a few clicks."}),e(l,{className:"w-full",children:"Create New"})]})]}),r(a,{children:[e(i,{children:e(t,{children:"Resources"})}),e(o,{children:r("nav",{className:"flex flex-col space-y-2",children:[r("a",{href:"#",className:"inline-flex items-center text-sm text-blue-600 hover:underline",children:["User Guide",e(d,{className:"ml-1 h-3 w-3"})]}),r("a",{href:"#",className:"inline-flex items-center text-sm text-blue-600 hover:underline",children:["API Documentation",e(d,{className:"ml-1 h-3 w-3"})]}),r("a",{href:"#",className:"inline-flex items-center text-sm text-blue-600 hover:underline",children:["View Pricing Details",e(d,{className:"ml-1 h-3 w-3"})]})]})})]})]})]})})]})]})}export{b as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{a as g}from"./chunk-WU3JMLSC.mjs";import{a as h}from"./chunk-BZAYEKYC.mjs";import{a as S}from"./chunk-QL74DMZ3.mjs";import{a as p}from"./chunk-4VDJWCUB.mjs";import{a as o,b as d,c as i,d as t,e as m,f as l}from"./chunk-AWFQEK7A.mjs";import{a as c}from"./chunk-3YZN4MJB.mjs";import{b as s,d as b,f as u}from"./chunk-AFA6LBJ4.mjs";import{a as n}from"./chunk-Y5VTKEKS.mjs";import{a as f}from"./chunk-
|
|
4
|
+
import{a as g}from"./chunk-WU3JMLSC.mjs";import{a as h}from"./chunk-BZAYEKYC.mjs";import{a as S}from"./chunk-QL74DMZ3.mjs";import{a as p}from"./chunk-4VDJWCUB.mjs";import{a as o,b as d,c as i,d as t,e as m,f as l}from"./chunk-AWFQEK7A.mjs";import{a as c}from"./chunk-3YZN4MJB.mjs";import{b as s,d as b,f as u}from"./chunk-AFA6LBJ4.mjs";import{a as n}from"./chunk-Y5VTKEKS.mjs";import{a as f}from"./chunk-GHBJK554.mjs";import{jsx as e,jsxs as r}from"react/jsx-runtime";function v({...a}){return r("div",{className:"bg-sidebar",children:[e(f,{isMenuOpen:!0,logoLight:h,logoDark:g,...a.header,className:"bg-sidebar"}),r(s,{className:"top-24 mb-4 h-full max-h-[calc(100vh-3.5rem)] flex-1 flex-row overflow-y-clip",children:[e(p,{...a.sidebarLeft,className:"flex-none top-24"}),r(u,{className:"grow overflow-hidden",children:[e("header",{className:"flex h-16 shrink-0 items-center gap-2",children:r("div",{className:"flex items-center gap-2 px-4",children:[e(b,{className:"-ml-1"}),e(n,{orientation:"vertical",className:"mr-2 h-4"}),e(o,{children:r(d,{children:[e(i,{className:"hidden md:block",children:e(t,{href:"#",children:"Building Your Application"})}),e(l,{className:"hidden md:block"}),e(i,{children:e(m,{children:"Data Fetching"})})]})})]})}),r("div",{className:"flex flex-1 flex-col gap-4 p-4 pt-0",children:[r("div",{className:"grid auto-rows-min gap-4 md:grid-cols-3",children:[e("div",{className:"aspect-video rounded-xl bg-muted/50"}),e("div",{className:"aspect-video rounded-xl bg-muted/50"}),e("div",{className:"aspect-video rounded-xl bg-muted/50"})]}),e("div",{className:"flex-1 rounded-xl bg-muted/50 md:min-h-min"})]})]}),e(S,{...a.sidebarRight,className:"flex-none top-24"})]}),e(c,{})]})}export{v as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as f}from"./chunk-WU3JMLSC.mjs";import{a as l}from"./chunk-BZAYEKYC.mjs";import{a}from"./chunk-6D7LTGTN.mjs";import{b as r}from"./chunk-
|
|
1
|
+
import{a as f}from"./chunk-WU3JMLSC.mjs";import{a as l}from"./chunk-BZAYEKYC.mjs";import{a}from"./chunk-6D7LTGTN.mjs";import{b as r}from"./chunk-DOZXVU56.mjs";import{a as n}from"./chunk-FF5RGGCG.mjs";import{a as i}from"./chunk-GHBJK554.mjs";import{a as o}from"./chunk-6K2R3OAD.mjs";import{jsx as t,jsxs as p}from"react/jsx-runtime";function g({...e}){let s=e.page,{contentWithIds:c,tableOfContents:m}=o(s);return p("div",{className:"flex fixed flex-col w-screen h-screen max-h-screen overflow-auto overscroll-contain",children:[t(i,{isMenuOpen:!0,logoLight:l,logoDark:f}),t(r,{...e.hero}),t(a,{edit:e.edit,pageId:e.page.id,tableOfContents:m,relatedContent:e.relatedContent,children:t(n,{blocks:c})})]})}export{g as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as s}from"./chunk-KQLEXEOG.mjs";import{a as l}from"./chunk-XJIMKYBF.mjs";import{a as c}from"./chunk-4AVYTUS2.mjs";import{a as i}from"./chunk-UESKYRNK.mjs";import b from"next/image";import{ChevronRightIcon as u,HomeIcon as g}from"@heroicons/react/20/solid";import{Fragment as x,jsx as t,jsxs as n}from"react/jsx-runtime";var h={highImpact:s,lowImpact:l,mediumImpact:c,sectionHero:m},k=a=>{let{type:r}=a||{};if(!r||r==="none")return null;let e=h[r];return e?t(e,{...a}):null};function d({breadcrumbItems:a}){if(a&&a.length>0){let r=a.filter(e=>e.label.toLowerCase()!=="home");return t("nav",{"aria-label":"Breadcrumb",className:"flex",children:n("ol",{role:"list",className:"flex items-center space-x-4",children:[t("li",{children:t("div",{children:n("a",{href:"/",className:"text-foreground hover:text-accent",children:[t(g,{"aria-hidden":"true",className:"size-5 shrink-0"}),t("span",{className:"sr-only",children:"Home"})]})})}),r.map((e,p)=>t("li",{children:n("div",{className:"flex items-center",children:[t(u,{"aria-hidden":"true",className:"size-5 shrink-0 text-gray-400"}),e.href?t("a",{href:e.href,className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:e.label}):t("div",{className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:e.label})]})},p))]})})}return t(x,{})}import{jsx as o,jsxs as f}from"react/jsx-runtime";function m({title:a,breadcrumbItems:r,image:e}){return f("section",{className:"-z-10 relative flex min-h-[250px] pt-auto items-end",children:[o("div",{className:"absolute inset-0 z-0",children:e&&o(b,{priority:!0,src:e.src,alt:`${process.env.NEXT_PUBLIC_SITE_NAME}`,layout:"fill",style:{objectFit:"cover"},sizes:"100vw",className:"pointer-events-none object-cover"})}),o("span",{className:"absolute inset-0 bg-gradient-1 from-background/0 to-background dark:from-background/0 dark:to-background"}),o(i,{children:f("div",{className:"relative z-10 flex flex-wrap items-center justify-between gap-x-20 gap-y-8 text-accent-900 dark:text-white lg:pt-[40px] pb-5",children:[o("h1",{className:"underline underline-offset-8 decoration-1 decoration-accent font-secondary text-5xl font-bold lg:w-1/2",children:a}),r&&r.length>0&&o(d,{breadcrumbItems:r})]})})]})}export{m as a,k as b,d as c};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
import{a as o}from"./chunk-Y5ZFXDW5.mjs";import{a as m,b as p,c as v}from"./chunk-SBM5HULF.mjs";import{b as g}from"./chunk-Q6SEVCRG.mjs";import{b as n}from"./chunk-GLEWUUGS.mjs";import{useState as A}from"react";import{Toaster as D,toast as c}from"sonner";import{useRouter as k}from"next/navigation";import{jsx as s,jsxs as t}from"react/jsx-runtime";function R({leaveRequests:l,onApprove:f,onReject:u}){let[a,i]=A([]),d=k(),h=()=>{a.length===l.length?i([]):i(l.map(e=>e.id))},N=e=>{i(r=>r.includes(e)?r.filter(b=>b!==e):[...r,e])},x=async()=>{let e=await f(a);e.success?(c.success(e.message),d.refresh()):c.error(`Error: ${e.message}`),i([])},y=async()=>{let e=await u(a);e.success?(c.success(e.message),d.refresh()):c.error(`Error: ${e.message}`),i([])};return t("div",{className:"space-y-4",children:[t("div",{className:"flex justify-between items-center",children:[s("h2",{className:"text-2xl font-bold",children:"Approve Leave Requests"}),t("div",{className:"space-x-2",children:[s(n,{onClick:x,disabled:a.length===0,variant:"default",children:"Approve Selected"}),s(n,{onClick:y,disabled:a.length===0,variant:"destructive",children:"Reject Selected"})]})]}),s("div",{className:"overflow-hidden sm:rounded-md",children:t("ul",{className:"divide-y divide-gray-200",children:[s("li",{className:"px-4 py-4 sm:px-6",children:t("div",{className:"flex items-center justify-between",children:[t("div",{className:"flex items-center",children:[s(o,{id:"select-all",checked:a.length===l.length,onCheckedChange:h,className:"border-accent"}),s("label",{htmlFor:"select-all",className:"ml-2 text-sm font-medium text-foreground",children:"Select All"})]}),t("span",{className:"text-sm font-medium text-gray-500",children:[a.length," of ",l.length," selected"]})]})}),l.map(e=>s("li",{className:"px-4 py-4 sm:px-6 group hover:bg-gray-50",children:t("div",{className:"flex items-center justify-between",children:[t("div",{className:"flex items-center",children:[s(o,{id:`select-${e.id}`,checked:a.includes(e.id),onCheckedChange:()=>N(e.id),className:"border-accent"}),t("div",{className:"ml-3 flex items-center",children:[t(m,{className:"h-10 w-10",children:[s(p,{src:e.userImage,alt:e.userName}),s(v,{children:e.userName.split(" ").map(r=>r[0]).join("")})]}),s("div",{className:"ml-3",children:s("p",{className:"text-sm font-medium text-foreground group-hover:text-accent",children:e.userName})})]})]}),t("div",{className:"flex items-center space-x-2",children:[t("span",{className:"text-sm text-gray-500",children:[new Date(e.startDate).toLocaleDateString(),e.startDate!==e.endDate&&` - ${new Date(e.endDate).toLocaleDateString()}`,e.leaveType!="Full Day"&&` (${e.leaveType})`,` - ${e.totalDays} day${e.totalDays!==1?"s":""}`]}),s(g,{variant:e.status==="approved"?"default":e.status==="rejected"?"destructive":"secondary",children:e.status})]})]})},e.id))]})}),s(D,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9})]})}export{R as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{a as h}from"./chunk-WU3JMLSC.mjs";import{a as f}from"./chunk-BZAYEKYC.mjs";import{a as
|
|
4
|
+
import{a as h}from"./chunk-WU3JMLSC.mjs";import{a as f}from"./chunk-BZAYEKYC.mjs";import{a as l}from"./chunk-KQLEXEOG.mjs";import{a as u}from"./chunk-XJIMKYBF.mjs";import{a as p}from"./chunk-4AVYTUS2.mjs";import{a as c}from"./chunk-CWNEDSLD.mjs";import{b as n}from"./chunk-GLEWUUGS.mjs";import{a as o,b as a,c as i,e as m}from"./chunk-D76EO57Z.mjs";import{a as s}from"./chunk-GHBJK554.mjs";import{ExternalLink as d}from"lucide-react";import{jsx as e,jsxs as t}from"react/jsx-runtime";function b({...r}){return t("div",{children:[e(s,{isMenuOpen:!0,logoLight:f,logoDark:h,...r.header}),r.hero&&r.hero.type==="lowImpact"&&e(u,{...r.hero}),r.hero&&r.hero.type==="mediumImpact"&&e(p,{...r.hero}),r.hero&&r.hero.type==="highImpact"&&e(l,{...r.hero}),r.hero&&r.hero.type==="postHero"&&e(c,{...r.hero}),e("div",{className:"container py-8",children:t("div",{className:"grid grid-cols-1 gap-8 lg:grid-cols-3",children:[e("div",{className:"lg:col-span-2",children:r.children}),t("div",{className:"space-y-6",children:[t(o,{children:[e(a,{children:e(i,{children:"Quick Actions"})}),t(m,{children:[e("p",{className:"mb-4 text-sm text-muted-foreground",children:"Get started with your first action in just a few clicks."}),e(n,{className:"w-full",children:"Create New"})]})]}),t(o,{children:[e(a,{children:e(i,{children:"Resources"})}),e(m,{children:t("nav",{className:"flex flex-col space-y-2",children:[t("a",{href:"#",className:"inline-flex items-center text-sm text-blue-600 hover:underline",children:["User Guide",e(d,{className:"ml-1 h-3 w-3"})]}),t("a",{href:"#",className:"inline-flex items-center text-sm text-blue-600 hover:underline",children:["API Documentation",e(d,{className:"ml-1 h-3 w-3"})]}),t("a",{href:"#",className:"inline-flex items-center text-sm text-blue-600 hover:underline",children:["View Pricing Details",e(d,{className:"ml-1 h-3 w-3"})]})]})})]})]})]})})]})}export{b as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as i}from"./chunk-3TIFSACL.mjs";import{a as m}from"./chunk-XDP6BKTK.mjs";import{a as t}from"./chunk-NIQ4466A.mjs";import{jsx as p,jsxs as s}from"react/jsx-runtime";function l({isMenuOpen:e,logoLight:o,logoDark:r,menuItems:a,className:n}){return s("div",{className:t("fixed top-0 left-0 right-0 z-50",n),children:[p(i,{isMenuOpen:e,logoLight:o,logoDark:r,menuItems:a}),p(m,{isMenuOpen:e,logoLight:o,logoDark:r,menuItems:a})]})}export{l as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as m}from"./chunk-
|
|
1
|
+
import{a as m}from"./chunk-2JZGT4F6.mjs";import{a as r}from"./chunk-KML6U7IE.mjs";import{a as l}from"./chunk-BYXEE5EN.mjs";import{a as n}from"./chunk-UESKYRNK.mjs";import v from"next/image";import{FaEnvelope as x,FaPhoneFlip as h}from"react-icons/fa6";import{Fragment as N,jsx as e,jsxs as t}from"react/jsx-runtime";function H(s){let{sectionHeading:d,image:a}=s;return t(N,{children:[e("section",{className:"section-padding-primary",children:e("div",{className:"",children:e("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:e("div",{className:"mx-auto max-w-2xl space-y-16 divide-y divide-gray-100 lg:mx-0 lg:max-w-none",children:t("div",{className:"grid grid-cols-1 gap-10 pt-16 lg:grid-cols-3",children:[t("div",{children:[e("h2",{className:"text-pretty text-4xl font-semibold tracking-tight text-accent",children:"Locations"}),e("p",{className:"mt-4 text-base/7 text-foreground",children:"We have multiple locations across the UK where we are based. These are our key locations."})]}),e("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:col-span-2 lg:gap-8",children:s.locations&&s.locations.map((i,c)=>{var o;return t("div",{className:"rounded-2xl p-10 border",children:[e("h3",{className:"text-base/7 font-semibold text-accent",children:i.title}),t("address",{className:"mt-3 space-y-1 text-sm/6 not-italic text-foreground",children:[(o=i.location.split(","))==null?void 0:o.map((p,g)=>e("p",{children:p},g))," ",i.mails&&t("p",{className:"flex items-center space-x-2",children:[e(x,{className:"pr-2 text-accent size-auto"}),e("span",{children:i.mails[0]})]}),i.phoneNumbers&&i.phoneNumbers.length>0&&t("p",{className:"flex items-center space-x-2",children:[e(h,{className:"pr-2 text-accent size-auto"}),i.phoneNumbers[0]]})]})]},c)})})]})})})})}),e("section",{className:"section-padding-primary",children:t("div",{className:"relative py-[60px]",children:[e("div",{className:"absolute left-0 top-0 z-1 h-full w-full overflow-hidden bg-red-500 md:w-[56%] md:rounded-r-5",children:e(v,{src:a.src,alt:a.alt,fill:!0,className:"object-cover",sizes:"(min-width: 768px) 60vw, 100vw",placeholder:"blur",blurDataURL:r})}),e(n,{children:e("div",{className:"ml-auto md:w-1/2",children:t("div",{className:"relative z-[2] rounded-5 bg-white p-10 shadow-1 dark:bg-accent-700 lg:p-[60px]",children:[e("div",{className:"mb-30px",children:e(l,{...d,invert:!0})}),e(m,{})]})})})]})})]})}export{H as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-WU3JMLSC.mjs";import{a as m}from"./chunk-BZAYEKYC.mjs";import{a as i}from"./chunk-R75QPTHT.mjs";import{a as o}from"./chunk-CWNEDSLD.mjs";import{a as t}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-WU3JMLSC.mjs";import{a as m}from"./chunk-BZAYEKYC.mjs";import{a as i}from"./chunk-R75QPTHT.mjs";import{a as o}from"./chunk-CWNEDSLD.mjs";import{a as t}from"./chunk-GHBJK554.mjs";import{jsx as r,jsxs as n}from"react/jsx-runtime";function d({...e}){return n("div",{children:[r(t,{isMenuOpen:!0,logoLight:m,logoDark:a}),r(o,{...e.hero}),r(i,{className:"!pb-0",...e.blog})]})}export{d as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{a as
|
|
4
|
+
import{a as u}from"./chunk-3TIFSACL.mjs";import{a as v}from"./chunk-XDP6BKTK.mjs";import{a as m}from"./chunk-NIQ4466A.mjs";import{useState as f,useEffect as b}from"react";import{Menu as x,ChevronDown as w}from"lucide-react";import N from"next/image";import{jsx as e,jsxs as t}from"react/jsx-runtime";function O({logoVideo:p,logoLight:s,logoDark:i,menuItems:a,title:r,subtitle:n}){let[c,d]=f(!1),[l,g]=f(!1),h=()=>{let o=document.getElementById("next-section");o&&o.scrollIntoView({behavior:"smooth"})};return b(()=>{let o=()=>{window.scrollY>100?d(!0):d(!1)};return window.addEventListener("scroll",o,{passive:!0}),()=>window.removeEventListener("scroll",o)},[]),t("div",{className:"relative h-screen",children:[t("div",{className:"absolute inset-0 w-full h-screen overflow-hidden",children:[t("video",{className:"object-cover w-full h-full",autoPlay:!0,loop:!0,muted:!0,playsInline:!0,children:[e("source",{src:"assets/videos/background.mov",type:"video/mp4"}),"Your browser does not support the video tag."]}),e("div",{className:"absolute inset-0 bg-primary-900/50"})]}),!c&&!l&&e("button",{className:"fixed hidden lg:block top-4 right-4 z-[60] p-2 rounded-full bg-white/10 backdrop-blur-sm transition-all duration-300 hover:bg-white/20",onClick:()=>{g(!l)},children:e(x,{className:"w-6 h-6 text-white"})}),t("div",{className:"fixed top-0 left-0 right-0 z-50",children:[e(u,{isMenuOpen:c||l,logoLight:s,logoDark:i,menuItems:a}),e(v,{isMenuOpen:!0,logoLight:s,logoDark:i,menuItems:a})]}),t("div",{className:"absolute inset-0 h-full z-10 flex flex-col items-center justify-between text-white text-center px-4",children:[e(N,{src:p,alt:"Cortex Reply Logo",width:720,height:320,className:m("absolute top-2.5 h-auto w-auto mt-8 hidden lg:block",l&&"lg:hidden")}),t("div",{className:"absolute top-1/2vv h-full flex flex-col px-4 items-center justify-center",children:[e("h1",{className:"text-6xl font-bold pt-auto mb-12",children:r&&r}),e("div",{className:"text-3xl mb-8 max-w-2xl",children:n&&n})]}),e("div",{className:"absolute bottom-10 flex justify-center items-center w-full mb-8",children:e("div",{className:"animate-bounce cursor-pointer hover:text-accent",onClick:h,children:e(w,{size:64})})})]})]})}export{O as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a
|
|
1
|
+
import{a}from"../../chunk-ZWKWU7U4.mjs";import{a as e}from"../../chunk-P5NVJTJ5.mjs";import{a as d}from"../../chunk-FGWIT6CV.mjs";import{a as g}from"../../chunk-66ZAIUUI.mjs";import{a as f}from"../../chunk-TQCGX4Y6.mjs";import{a as b}from"../../chunk-VZXLXNVY.mjs";import{a as c}from"../../chunk-Y2KKUQDU.mjs";import"../../chunk-JWDVKGZL.mjs";import"../../chunk-SBM5HULF.mjs";import"../../chunk-Q6SEVCRG.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-D76EO57Z.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-SFLOMJ2U.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";export{b as CustomerCard,c as EventCard,a as FeatureCard,e as Image,g as PricingCard,d as ProjectCard,f as ServiceCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-GHBJK554.mjs";import"../../chunk-3TIFSACL.mjs";import"../../chunk-SV3TTIPR.mjs";import"../../chunk-XDP6BKTK.mjs";import"../../chunk-HAYRX2WO.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-SFLOMJ2U.mjs";import"../../chunk-UESKYRNK.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";export{a as Header};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"../../chunk-WU3JMLSC.mjs";import{a as n}from"../../chunk-BZAYEKYC.mjs";import{a as o}from"../../chunk-X5KZKO2V.mjs";import{a as e}from"../../chunk-
|
|
1
|
+
import{a as t}from"../../chunk-WU3JMLSC.mjs";import{a as n}from"../../chunk-BZAYEKYC.mjs";import{a as o}from"../../chunk-X5KZKO2V.mjs";import{a as e}from"../../chunk-GHBJK554.mjs";import"../../chunk-3TIFSACL.mjs";import"../../chunk-SV3TTIPR.mjs";import"../../chunk-XDP6BKTK.mjs";import"../../chunk-HAYRX2WO.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-SFLOMJ2U.mjs";import"../../chunk-UESKYRNK.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";import{jsx as r}from"react/jsx-runtime";var p={title:"Header/Header",component:e,decorators:[i=>r(o,{attribute:"class",defaultTheme:"dark",enableSystem:!0,disableTransitionOnChange:!0,children:r(i,{})})]},d={args:{isMenuOpen:!0,logoDark:t,logoLight:n,menuItems:[{name:"Product",items:[{name:"Analytics",description:"Understand your traffic",href:"#",icon:{type:"thin",iconName:"cloud"}},{name:"Engagement",description:"Interact with customers",href:"#",icon:{type:"thin",iconName:"cloud"}},{name:"Security",description:"Protect your data",href:"#",icon:{type:"thin",iconName:"cloud"}}]},{name:"Resources",items:[{name:"Documentation",href:"#",icon:{type:"thin",iconName:"cloud"}},{name:"API Reference",href:"#",icon:{type:"thin",iconName:"cloud"}},{name:"Github",href:"#",icon:{type:"brands",iconName:"github"}}],actions:[{name:"Watch demo",href:"#",icon:{type:"thin",iconName:"cloud"}},{name:"Contact sales",href:"#",icon:{type:"thin",iconName:"cloud"}},{name:"View all products",href:"#",icon:{type:"thin",iconName:"cloud"}}]},{name:"Company",href:"#"}]}};export{d as Primary,p as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";import{a}from"../../chunk-
|
|
2
|
+
"use strict";import{a}from"../../chunk-RZTXT4UD.mjs";import"../../chunk-3TIFSACL.mjs";import"../../chunk-SV3TTIPR.mjs";import"../../chunk-XDP6BKTK.mjs";import"../../chunk-HAYRX2WO.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-SFLOMJ2U.mjs";import"../../chunk-UESKYRNK.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";export{a as VideoHeader};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a
|
|
1
|
+
import{a}from"../../chunk-O5XLZ254.mjs";import{a as e}from"../../chunk-RZTXT4UD.mjs";import"../../chunk-ZDPQXVTF.mjs";import"../../chunk-CS77R54Z.mjs";import{a as f}from"../../chunk-23L5ZJ2U.mjs";import{a as g}from"../../chunk-GHBJK554.mjs";import{a as c}from"../../chunk-3TIFSACL.mjs";import"../../chunk-SV3TTIPR.mjs";import{a as d}from"../../chunk-XDP6BKTK.mjs";import{a as b}from"../../chunk-HAYRX2WO.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-YNNW2C2U.mjs";import"../../chunk-SFLOMJ2U.mjs";import"../../chunk-UESKYRNK.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";export{b as BrandLogo,f as Footer,g as Header,c as HeaderDesktop,d as HeaderMobile,a as SimpleHeader,e as VideoHeader};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as a,c as b}from"../../chunk-
|
|
1
|
+
import{b as a,c as b}from"../../chunk-DOZXVU56.mjs";import"../../chunk-KQLEXEOG.mjs";import"../../chunk-XJIMKYBF.mjs";import"../../chunk-4AVYTUS2.mjs";import"../../chunk-OCZTJKMQ.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-NWW7KWJK.mjs";import"../../chunk-UK4IPFAO.mjs";import"../../chunk-ICTOXY7D.mjs";import"../../chunk-YNDKGRL6.mjs";import"../../chunk-TFWGOEV7.mjs";import"../../chunk-763KMQIQ.mjs";import"../../chunk-J2VQUYES.mjs";import"../../chunk-SJWGFZJ6.mjs";import"../../chunk-44TDI42O.mjs";import"../../chunk-BOPZHZ27.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-UESKYRNK.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";export{b as Breadcrumbs,a as RenderHero};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../../chunk-
|
|
1
|
+
import{a}from"../../../chunk-DOZXVU56.mjs";import"../../../chunk-KQLEXEOG.mjs";import"../../../chunk-XJIMKYBF.mjs";import"../../../chunk-4AVYTUS2.mjs";import"../../../chunk-OCZTJKMQ.mjs";import"../../../chunk-O5BAW5XQ.mjs";import"../../../chunk-NWW7KWJK.mjs";import"../../../chunk-UK4IPFAO.mjs";import"../../../chunk-ICTOXY7D.mjs";import"../../../chunk-YNDKGRL6.mjs";import"../../../chunk-TFWGOEV7.mjs";import"../../../chunk-763KMQIQ.mjs";import"../../../chunk-J2VQUYES.mjs";import"../../../chunk-SJWGFZJ6.mjs";import"../../../chunk-44TDI42O.mjs";import"../../../chunk-BOPZHZ27.mjs";import"../../../chunk-GLEWUUGS.mjs";import"../../../chunk-UESKYRNK.mjs";import"../../../chunk-NIQ4466A.mjs";import"../../../chunk-6K2R3OAD.mjs";import"../../../chunk-S7OK7D5I.mjs";export{a as SectionHero};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,b as f,c as g}from"../../chunk-
|
|
1
|
+
import{a as e,b as f,c as g}from"../../chunk-DOZXVU56.mjs";import{a}from"../../chunk-KQLEXEOG.mjs";import{a as c}from"../../chunk-XJIMKYBF.mjs";import{a as b}from"../../chunk-4AVYTUS2.mjs";import{a as d}from"../../chunk-CWNEDSLD.mjs";import"../../chunk-PRUIYGQW.mjs";import"../../chunk-H4Y4SZIU.mjs";import"../../chunk-A5EYIB3V.mjs";import"../../chunk-4NKKWJ2X.mjs";import"../../chunk-4JC2TJML.mjs";import"../../chunk-RBZMFLLA.mjs";import"../../chunk-WRPART4J.mjs";import"../../chunk-7VKHSE4O.mjs";import"../../chunk-N6EJQZAV.mjs";import"../../chunk-HWEPDRG6.mjs";import"../../chunk-DWRQHV42.mjs";import"../../chunk-XGQLOPHW.mjs";import"../../chunk-Y5ZFXDW5.mjs";import"../../chunk-JWDVKGZL.mjs";import"../../chunk-AWFQEK7A.mjs";import"../../chunk-OCZTJKMQ.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-NWW7KWJK.mjs";import"../../chunk-UK4IPFAO.mjs";import"../../chunk-ICTOXY7D.mjs";import"../../chunk-YNDKGRL6.mjs";import"../../chunk-TFWGOEV7.mjs";import"../../chunk-763KMQIQ.mjs";import"../../chunk-J2VQUYES.mjs";import"../../chunk-SJWGFZJ6.mjs";import"../../chunk-44TDI42O.mjs";import"../../chunk-BOPZHZ27.mjs";import"../../chunk-3YZN4MJB.mjs";import"../../chunk-WNPA7YT3.mjs";import"../../chunk-AFA6LBJ4.mjs";import"../../chunk-CGBVZQYY.mjs";import"../../chunk-BSQVKZCW.mjs";import"../../chunk-Y5VTKEKS.mjs";import"../../chunk-QOIH63J3.mjs";import"../../chunk-YNCJATT7.mjs";import"../../chunk-OAOCXXC2.mjs";import"../../chunk-SBM5HULF.mjs";import"../../chunk-Q6SEVCRG.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-YNNW2C2U.mjs";import"../../chunk-UESKYRNK.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-FRWX5YES.mjs";import"../../chunk-CV7PH2KH.mjs";import"../../chunk-S7OK7D5I.mjs";export{g as Breadcrumbs,a as HighImpactHero,c as LowImpactHero,b as MediumImpactHero,d as PostHero,f as RenderHero,e as SectionHero};
|
|
@@ -12,8 +12,14 @@ interface LeaveRequest {
|
|
|
12
12
|
}
|
|
13
13
|
interface ApproveLeaveProps {
|
|
14
14
|
leaveRequests: LeaveRequest[];
|
|
15
|
-
onApprove: (ids: string[]) =>
|
|
16
|
-
|
|
15
|
+
onApprove: (ids: string[]) => Promise<{
|
|
16
|
+
success: boolean;
|
|
17
|
+
message: string;
|
|
18
|
+
}>;
|
|
19
|
+
onReject: (ids: string[]) => Promise<{
|
|
20
|
+
success: boolean;
|
|
21
|
+
message: string;
|
|
22
|
+
}>;
|
|
17
23
|
}
|
|
18
24
|
export declare function ApproveLeave({ leaveRequests, onApprove, onReject }: ApproveLeaveProps): import("react/jsx-runtime").JSX.Element;
|
|
19
25
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
"use strict";"use client";var Me=Object.create;var _=Object.defineProperty;var Ie=Object.getOwnPropertyDescriptor;var Ge=Object.getOwnPropertyNames;var Le=Object.getPrototypeOf,Te=Object.prototype.hasOwnProperty;var Ee=(e,t)=>{for(var r in t)_(e,r,{get:t[r],enumerable:!0})},de=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Ge(t))!Te.call(e,s)&&s!==r&&_(e,s,{get:()=>t[s],enumerable:!(o=Ie(t,s))||o.enumerable});return e};var T=(e,t,r)=>(r=e!=null?Me(Le(e)):{},de(t||!e||!e.__esModule?_(r,"default",{value:e,enumerable:!0}):r,e)),Ve=e=>de(_({},"__esModule",{value:!0}),e);var ht={};Ee(ht,{ApproveLeave:()=>bt});module.exports=Ve(ht);var Se=require("react");var ye=require("clsx");var q="-",je=e=>{let t=Fe(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:l=>{let a=l.split(q);return a[0]===""&&a.length!==1&&a.shift(),me(a,t)||Be(l)},getConflictingClassGroupIds:(l,a)=>{let m=r[l]||[];return a&&o[l]?[...m,...o[l]]:m}}},me=(e,t)=>{var l;if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),s=o?me(e.slice(1),o):void 0;if(s)return s;if(t.validators.length===0)return;let n=e.join(q);return(l=t.validators.find(({validator:a})=>a(n)))==null?void 0:l.classGroupId},pe=/^\[(.+)\]$/,Be=e=>{if(pe.test(e)){let t=pe.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Fe=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return _e(Object.entries(e.classGroups),r).forEach(([n,l])=>{Y(l,o,n,t)}),o},Y=(e,t,r,o)=>{e.forEach(s=>{if(typeof s=="string"){let n=s===""?t:ue(t,s);n.classGroupId=r;return}if(typeof s=="function"){if(We(s)){Y(s(o),t,r,o);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([n,l])=>{Y(l,ue(t,n),r,o)})})},ue=(e,t)=>{let r=e;return t.split(q).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},We=e=>e.isThemeGetter,_e=(e,t)=>t?e.map(([r,o])=>{let s=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([l,a])=>[t+l,a])):n);return[r,s]}):e,$e=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,s=(n,l)=>{r.set(n,l),t++,t>e&&(t=0,o=r,r=new Map)};return{get(n){let l=r.get(n);if(l!==void 0)return l;if((l=o.get(n))!==void 0)return s(n,l),l},set(n,l){r.has(n)?r.set(n,l):s(n,l)}}},fe="!",De=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,s=t[0],n=t.length,l=a=>{let m=[],i=0,f=0,v;for(let g=0;g<a.length;g++){let h=a[g];if(i===0){if(h===s&&(o||a.slice(g,g+n)===t)){m.push(a.slice(f,g)),f=g+n;continue}if(h==="/"){v=g;continue}}h==="["?i++:h==="]"&&i--}let w=m.length===0?a:a.substring(f),C=w.startsWith(fe),k=C?w.substring(1):w,b=v&&v>f?v-f:void 0;return{modifiers:m,hasImportantModifier:C,baseClassName:k,maybePostfixModifierPosition:b}};return r?a=>r({className:a,parseClassName:l}):l},He=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},Oe=e=>({cache:$e(e.cacheSize),parseClassName:De(e),...je(e)}),Ue=/\s+/,Je=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:s}=t,n=[],l=e.trim().split(Ue),a="";for(let m=l.length-1;m>=0;m-=1){let i=l[m],{modifiers:f,hasImportantModifier:v,baseClassName:w,maybePostfixModifierPosition:C}=r(i),k=!!C,b=o(k?w.substring(0,C):w);if(!b){if(!k){a=i+(a.length>0?" "+a:a);continue}if(b=o(w),!b){a=i+(a.length>0?" "+a:a);continue}k=!1}let g=He(f).join(":"),h=v?g+fe:g,y=h+b;if(n.includes(y))continue;n.push(y);let G=s(b,k);for(let S=0;S<G.length;++S){let B=G[S];n.push(h+B)}a=i+(a.length>0?" "+a:a)}return a};function Ke(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=ge(t))&&(o&&(o+=" "),o+=r);return o}var ge=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=ge(e[o]))&&(r&&(r+=" "),r+=t);return r};function Xe(e,...t){let r,o,s,n=l;function l(m){let i=t.reduce((f,v)=>v(f),e());return r=Oe(i),o=r.cache.get,s=r.cache.set,n=a,a(m)}function a(m){let i=o(m);if(i)return i;let f=Je(m,r);return s(m,f),f}return function(){return n(Ke.apply(null,arguments))}}var p=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},be=/^\[(?:([a-z-]+):)?(.+)\]$/i,Ze=/^\Ce+\/\Ce+$/,Qe=new Set(["px","full","screen"]),Ye=/^(\Ce+(\.\Ce+)?)?(xs|sm|md|lg|xl)$/,qe=/\Ce+(%|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$/,et=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,tt=/^(inset_)?-?((\Ce+)?\.?(\Ce+)[a-z]+|0)_-?((\Ce+)?\.?(\Ce+)[a-z]+|0)/,rt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,A=e=>M(e)||Qe.has(e)||Ze.test(e),N=e=>I(e,"length",dt),M=e=>!!e&&!Number.isNaN(Number(e)),Q=e=>I(e,"number",M),E=e=>!!e&&Number.isInteger(Number(e)),ot=e=>e.endsWith("%")&&M(e.slice(0,-1)),c=e=>be.test(e),z=e=>Ye.test(e),nt=new Set(["length","size","percentage"]),st=e=>I(e,nt,he),at=e=>I(e,"position",he),it=new Set(["image","url"]),lt=e=>I(e,it,ut),ct=e=>I(e,"",pt),V=()=>!0,I=(e,t,r)=>{let o=be.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},dt=e=>qe.test(e)&&!et.test(e),he=()=>!1,pt=e=>tt.test(e),ut=e=>rt.test(e);var mt=()=>{let e=p("colors"),t=p("spacing"),r=p("blur"),o=p("brightness"),s=p("borderColor"),n=p("borderRadius"),l=p("borderSpacing"),a=p("borderWidth"),m=p("contrast"),i=p("grayscale"),f=p("hueRotate"),v=p("invert"),w=p("gap"),C=p("gradientColorStops"),k=p("gradientColorStopPositions"),b=p("inset"),g=p("margin"),h=p("opacity"),y=p("padding"),G=p("saturate"),S=p("scale"),B=p("sepia"),oe=p("skew"),ne=p("space"),se=p("translate"),J=()=>["auto","contain","none"],K=()=>["auto","hidden","clip","visible","scroll"],X=()=>["auto",c,t],u=()=>[c,t],ae=()=>["",A,N],F=()=>["auto",M,c],ie=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["solid","dashed","dotted","double","none"],le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>["start","end","center","between","around","evenly","stretch"],L=()=>["","0",c],ce=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>[M,c];return{cacheSize:500,separator:":",theme:{colors:[V],spacing:[A,N],blur:["none","",z,c],brightness:R(),borderColor:[e],borderRadius:["none","","full",z,c],borderSpacing:u(),borderWidth:ae(),contrast:R(),grayscale:L(),hueRotate:R(),invert:L(),gap:u(),gradientColorStops:[e],gradientColorStopPositions:[ot,N],inset:X(),margin:X(),opacity:R(),padding:u(),saturate:R(),scale:R(),sepia:L(),skew:R(),space:u(),translate:u()},classGroups:{aspect:[{aspect:["auto","square","video",c]}],container:["container"],columns:[{columns:[z]}],"break-after":[{"break-after":ce()}],"break-before":[{"break-before":ce()}],"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"],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:[...ie(),c]}],overflow:[{overflow:K()}],"overflow-x":[{"overflow-x":K()}],"overflow-y":[{"overflow-y":K()}],overscroll:[{overscroll:J()}],"overscroll-x":[{"overscroll-x":J()}],"overscroll-y":[{"overscroll-y":J()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",E,c]}],basis:[{basis:X()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",c]}],grow:[{grow:L()}],shrink:[{shrink:L()}],order:[{order:["first","last","none",E,c]}],"grid-cols":[{"grid-cols":[V]}],"col-start-end":[{col:["auto",{span:["full",E,c]},c]}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":[V]}],"row-start-end":[{row:["auto",{span:[E,c]},c]}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",c]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",c]}],gap:[{gap:[w]}],"gap-x":[{"gap-x":[w]}],"gap-y":[{"gap-y":[w]}],"justify-content":[{justify:["normal",...Z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],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:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[ne]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ne]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",c,t]}],"min-w":[{"min-w":[c,t,"min","max","fit"]}],"max-w":[{"max-w":[c,t,"none","full","min","max","fit","prose",{screen:[z]},z]}],h:[{h:[c,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[c,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[c,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[c,t,"auto","min","max","fit"]}],"font-size":[{text:["base",z,N]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Q]}],"font-family":[{font:[V]}],"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:["tighter","tight","normal","wide","wider","widest",c]}],"line-clamp":[{"line-clamp":["none",M,Q]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",A,c]}],"list-image":[{"list-image":["none",c]}],"list-style-type":[{list:["none","disc","decimal",c]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[h]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[h]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",A,N]}],"underline-offset":[{"underline-offset":["auto",A,c]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:u()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",c]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",c]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[h]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ie(),at]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",st]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},lt]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[k]}],"gradient-via-pos":[{via:[k]}],"gradient-to-pos":[{to:[k]}],"gradient-from":[{from:[C]}],"gradient-via":[{via:[C]}],"gradient-to":[{to:[C]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[h]}],"border-style":[{border:[...W(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[h]}],"divide-style":[{divide:W()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...W()]}],"outline-offset":[{"outline-offset":[A,c]}],"outline-w":[{outline:[A,N]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[h]}],"ring-offset-w":[{"ring-offset":[A,N]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",z,ct]}],"shadow-color":[{shadow:[V]}],opacity:[{opacity:[h]}],"mix-blend":[{"mix-blend":[...le(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":le()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[m]}],"drop-shadow":[{"drop-shadow":["","none",z,c]}],grayscale:[{grayscale:[i]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[v]}],saturate:[{saturate:[G]}],sepia:[{sepia:[B]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[m]}],"backdrop-grayscale":[{"backdrop-grayscale":[i]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[v]}],"backdrop-opacity":[{"backdrop-opacity":[h]}],"backdrop-saturate":[{"backdrop-saturate":[G]}],"backdrop-sepia":[{"backdrop-sepia":[B]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",c]}],duration:[{duration:R()}],ease:[{ease:["linear","in","out","in-out",c]}],delay:[{delay:R()}],animate:[{animate:["none","spin","ping","pulse","bounce",c]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[E,c]}],"translate-x":[{"translate-x":[se]}],"translate-y":[{"translate-y":[se]}],"skew-x":[{"skew-x":[oe]}],"skew-y":[{"skew-y":[oe]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",c]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",c]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":u()}],"scroll-mx":[{"scroll-mx":u()}],"scroll-my":[{"scroll-my":u()}],"scroll-ms":[{"scroll-ms":u()}],"scroll-me":[{"scroll-me":u()}],"scroll-mt":[{"scroll-mt":u()}],"scroll-mr":[{"scroll-mr":u()}],"scroll-mb":[{"scroll-mb":u()}],"scroll-ml":[{"scroll-ml":u()}],"scroll-p":[{"scroll-p":u()}],"scroll-px":[{"scroll-px":u()}],"scroll-py":[{"scroll-py":u()}],"scroll-ps":[{"scroll-ps":u()}],"scroll-pe":[{"scroll-pe":u()}],"scroll-pt":[{"scroll-pt":u()}],"scroll-pr":[{"scroll-pr":u()}],"scroll-pb":[{"scroll-pb":u()}],"scroll-pl":[{"scroll-pl":u()}],"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",c]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[A,N,Q]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}};var ve=Xe(mt);function x(...e){return ve((0,ye.clsx)(e))}var xe=require("@radix-ui/react-slot"),we=require("class-variance-authority"),ke=T(require("react")),Ce=require("react/jsx-runtime"),ft=(0,we.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-primary text-primary-foreground hover:bg-primary-ON_HOVER",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent-foreground",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80"}}}),$=ke.forwardRef(({asChild:e=!1,className:t,size:r,variant:o,...s},n)=>(0,Ce.jsx)(e?xe.Slot:"button",{className:x(ft({className:t,size:r,variant:o})),ref:n,...s}));$.displayName="Button";var j=T(require("@radix-ui/react-checkbox")),Re=require("lucide-react"),Ae=T(require("react")),H=Ae.forwardRef(({className:e,...t},r)=>(0,Ce.jsx)(j.Root,{className:x("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:r,...t,children:(0,Ce.jsx)(j.Indicator,{className:x("flex items-center justify-center text-current"),children:(0,Ce.jsx)(Re.Check,{className:"h-4 w-4"})})}));H.displayName=j.Root.displayName;var O=T(require("react")),P=T(require("@radix-ui/react-avatar"));var ee=O.forwardRef(({className:e,...t},r)=>(0,Ce.jsx)(P.Root,{ref:r,className:x("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));ee.displayName=P.Root.displayName;var te=O.forwardRef(({className:e,...t},r)=>(0,Ce.jsx)(P.Image,{ref:r,className:x("aspect-square h-full w-full",e),...t}));te.displayName=P.Image.displayName;var re=O.forwardRef(({className:e,...t},r)=>(0,Ce.jsx)(P.Fallback,{ref:r,className:x("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));re.displayName=P.Fallback.displayName;var gt=(0,we.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Ne({className:e,variant:t,...r}){return(0,Ce.jsx)("div",{className:x(gt({variant:t}),e),...r})}function bt({leaveRequests:e,onApprove:t,onReject:r}){let[o,s]=(0,Se.useState)([]),n=()=>{o.length===e.length?s([]):s(e.map(i=>i.id))},l=i=>{s(f=>f.includes(i)?f.filter(v=>v!==i):[...f,i])},a=()=>{t(o),s([])},m=()=>{r(o),s([])};return(0,Ce.jsxs)("div",{className:"space-y-4",children:[(0,Ce.jsxs)("div",{className:"flex justify-between items-center",children:[(0,Ce.jsx)("h2",{className:"text-2xl font-bold",children:"Approve Leave Requests"}),(0,Ce.jsxs)("div",{className:"space-x-2",children:[(0,Ce.jsx)($,{onClick:a,disabled:o.length===0,variant:"default",children:"Approve Selected"}),(0,Ce.jsx)($,{onClick:m,disabled:o.length===0,variant:"destructive",children:"Reject Selected"})]})]}),(0,Ce.jsx)("div",{className:"overflow-hidden sm:rounded-md",children:(0,Ce.jsxs)("ul",{className:"divide-y divide-gray-200",children:[(0,Ce.jsx)("li",{className:"px-4 py-4 sm:px-6",children:(0,Ce.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ce.jsxs)("div",{className:"flex items-center",children:[(0,Ce.jsx)(H,{id:"select-all",checked:o.length===e.length,onCheckedChange:n,className:"border-accent"}),(0,Ce.jsx)("label",{htmlFor:"select-all",className:"ml-2 text-sm font-medium text-foreground",children:"Select All"})]}),(0,Ce.jsxs)("span",{className:"text-sm font-medium text-gray-500",children:[o.length," of ",e.length," selected"]})]})}),e.map(i=>(0,Ce.jsx)("li",{className:"px-4 py-4 sm:px-6 group hover:bg-gray-50",children:(0,Ce.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ce.jsxs)("div",{className:"flex items-center",children:[(0,Ce.jsx)(H,{id:`select-${i.id}`,checked:o.includes(i.id),onCheckedChange:()=>l(i.id),className:"border-accent"}),(0,Ce.jsxs)("div",{className:"ml-3 flex items-center",children:[(0,Ce.jsxs)(ee,{className:"h-10 w-10",children:[(0,Ce.jsx)(te,{src:i.userImage,alt:i.userName}),(0,Ce.jsx)(re,{children:i.userName.split(" ").map(f=>f[0]).join("")})]}),(0,Ce.jsx)("div",{className:"ml-3",children:(0,Ce.jsx)("p",{className:"text-sm font-medium text-foreground group-hover:text-accent",children:i.userName})})]})]}),(0,Ce.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ce.jsxs)("span",{className:"text-sm text-gray-500",children:[new Date(i.startDate).toLocaleDateString(),i.startDate!==i.endDate&&` - ${new Date(i.endDate).toLocaleDateString()}`,i.leaveType!="Full Day"&&` (${i.leaveType})`,` - ${i.totalDays} day${i.totalDays!==1?"s":""}`]}),(0,Ce.jsx)(Ne,{variant:i.status==="approved"?"default":i.status==="rejected"?"destructive":"secondary",children:i.status})]})]})},i.id))]})})]})}0&&(module.exports={ApproveLeave});
|
|
4
|
+
"use strict";"use client";var Te=Object.create;var _=Object.defineProperty;var Ge=Object.getOwnPropertyDescriptor;var Ee=Object.getOwnPropertyNames;var Le=Object.getPrototypeOf,Be=Object.prototype.hasOwnProperty;var Ve=(e,t)=>{for(var r in t)_(e,r,{get:t[r],enumerable:!0})},pe=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Ee(t))!Be.call(e,s)&&s!==r&&_(e,s,{get:()=>t[s],enumerable:!(o=Ge(t,s))||o.enumerable});return e};var L=(e,t,r)=>(r=e!=null?Te(Le(e)):{},pe(t||!e||!e.__esModule?_(r,"default",{value:e,enumerable:!0}):r,e)),je=e=>pe(_({},"__esModule",{value:!0}),e);var yt={};Ve(yt,{ApproveLeave:()=>vt});module.exports=je(yt);var Me=require("react");var xe=require("clsx");var ee="-",Fe=e=>{let t=$e(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:l=>{let a=l.split(ee);return a[0]===""&&a.length!==1&&a.shift(),fe(a,t)||We(l)},getConflictingClassGroupIds:(l,a)=>{let m=r[l]||[];return a&&o[l]?[...m,...o[l]]:m}}},fe=(e,t)=>{var l;if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),s=o?fe(e.slice(1),o):void 0;if(s)return s;if(t.validators.length===0)return;let n=e.join(ee);return(l=t.validators.find(({validator:a})=>a(n)))==null?void 0:l.classGroupId},ue=/^\[(.+)\]$/,We=e=>{if(ue.test(e)){let t=ue.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},$e=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return De(Object.entries(e.classGroups),r).forEach(([n,l])=>{q(l,o,n,t)}),o},q=(e,t,r,o)=>{e.forEach(s=>{if(typeof s=="string"){let n=s===""?t:me(t,s);n.classGroupId=r;return}if(typeof s=="function"){if(_e(s)){q(s(o),t,r,o);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([n,l])=>{q(l,me(t,n),r,o)})})},me=(e,t)=>{let r=e;return t.split(ee).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},_e=e=>e.isThemeGetter,De=(e,t)=>t?e.map(([r,o])=>{let s=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([l,a])=>[t+l,a])):n);return[r,s]}):e,He=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,s=(n,l)=>{r.set(n,l),t++,t>e&&(t=0,o=r,r=new Map)};return{get(n){let l=r.get(n);if(l!==void 0)return l;if((l=o.get(n))!==void 0)return s(n,l),l},set(n,l){r.has(n)?r.set(n,l):s(n,l)}}},ge="!",Oe=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,s=t[0],n=t.length,l=a=>{let m=[],g=0,i=0,b;for(let f=0;f<a.length;f++){let v=a[f];if(g===0){if(v===s&&(o||a.slice(f,f+n)===t)){m.push(a.slice(i,f)),i=f+n;continue}if(v==="/"){b=f;continue}}v==="["?g++:v==="]"&&g--}let y=m.length===0?a:a.substring(i),C=y.startsWith(ge),k=C?y.substring(1):y,h=b&&b>i?b-i:void 0;return{modifiers:m,hasImportantModifier:C,baseClassName:k,maybePostfixModifierPosition:h}};return r?a=>r({className:a,parseClassName:l}):l},Ue=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},Je=e=>({cache:He(e.cacheSize),parseClassName:Oe(e),...Fe(e)}),Ke=/\s+/,Xe=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:s}=t,n=[],l=e.trim().split(Ke),a="";for(let m=l.length-1;m>=0;m-=1){let g=l[m],{modifiers:i,hasImportantModifier:b,baseClassName:y,maybePostfixModifierPosition:C}=r(g),k=!!C,h=o(k?y.substring(0,C):y);if(!h){if(!k){a=g+(a.length>0?" "+a:a);continue}if(h=o(y),!h){a=g+(a.length>0?" "+a:a);continue}k=!1}let f=Ue(i).join(":"),v=b?f+ge:f,x=v+h;if(n.includes(x))continue;n.push(x);let G=s(h,k);for(let S=0;S<G.length;++S){let F=G[S];n.push(v+F)}a=g+(a.length>0?" "+a:a)}return a};function Ze(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=be(t))&&(o&&(o+=" "),o+=r);return o}var be=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=be(e[o]))&&(r&&(r+=" "),r+=t);return r};function Qe(e,...t){let r,o,s,n=l;function l(m){let g=t.reduce((i,b)=>b(i),e());return r=Je(g),o=r.cache.get,s=r.cache.set,n=a,a(m)}function a(m){let g=o(m);if(g)return g;let i=Xe(m,r);return s(m,i),i}return function(){return n(Ze.apply(null,arguments))}}var p=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},he=/^\[(?:([a-z-]+):)?(.+)\]$/i,Ye=/^\Re+\/\Re+$/,qe=new Set(["px","full","screen"]),et=/^(\Re+(\.\Re+)?)?(xs|sm|md|lg|xl)$/,tt=/\Re+(%|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$/,rt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ot=/^(inset_)?-?((\Re+)?\.?(\Re+)[a-z]+|0)_-?((\Re+)?\.?(\Re+)[a-z]+|0)/,nt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,A=e=>I(e)||qe.has(e)||Ye.test(e),N=e=>T(e,"length",ut),I=e=>!!e&&!Number.isNaN(Number(e)),Y=e=>T(e,"number",I),B=e=>!!e&&Number.isInteger(Number(e)),st=e=>e.endsWith("%")&&I(e.slice(0,-1)),c=e=>he.test(e),z=e=>et.test(e),at=new Set(["length","size","percentage"]),it=e=>T(e,at,ve),lt=e=>T(e,"position",ve),ct=new Set(["image","url"]),dt=e=>T(e,ct,ft),pt=e=>T(e,"",mt),V=()=>!0,T=(e,t,r)=>{let o=he.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},ut=e=>tt.test(e)&&!rt.test(e),ve=()=>!1,mt=e=>ot.test(e),ft=e=>nt.test(e);var gt=()=>{let e=p("colors"),t=p("spacing"),r=p("blur"),o=p("brightness"),s=p("borderColor"),n=p("borderRadius"),l=p("borderSpacing"),a=p("borderWidth"),m=p("contrast"),g=p("grayscale"),i=p("hueRotate"),b=p("invert"),y=p("gap"),C=p("gradientColorStops"),k=p("gradientColorStopPositions"),h=p("inset"),f=p("margin"),v=p("opacity"),x=p("padding"),G=p("saturate"),S=p("scale"),F=p("sepia"),ne=p("skew"),se=p("space"),ae=p("translate"),K=()=>["auto","contain","none"],X=()=>["auto","hidden","clip","visible","scroll"],Z=()=>["auto",c,t],u=()=>[c,t],ie=()=>["",A,N],W=()=>["auto",I,c],le=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],$=()=>["solid","dashed","dotted","double","none"],ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>["start","end","center","between","around","evenly","stretch"],E=()=>["","0",c],de=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>[I,c];return{cacheSize:500,separator:":",theme:{colors:[V],spacing:[A,N],blur:["none","",z,c],brightness:R(),borderColor:[e],borderRadius:["none","","full",z,c],borderSpacing:u(),borderWidth:ie(),contrast:R(),grayscale:E(),hueRotate:R(),invert:E(),gap:u(),gradientColorStops:[e],gradientColorStopPositions:[st,N],inset:Z(),margin:Z(),opacity:R(),padding:u(),saturate:R(),scale:R(),sepia:E(),skew:R(),space:u(),translate:u()},classGroups:{aspect:[{aspect:["auto","square","video",c]}],container:["container"],columns:[{columns:[z]}],"break-after":[{"break-after":de()}],"break-before":[{"break-before":de()}],"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"],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:[...le(),c]}],overflow:[{overflow:X()}],"overflow-x":[{"overflow-x":X()}],"overflow-y":[{"overflow-y":X()}],overscroll:[{overscroll:K()}],"overscroll-x":[{"overscroll-x":K()}],"overscroll-y":[{"overscroll-y":K()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",B,c]}],basis:[{basis:Z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",c]}],grow:[{grow:E()}],shrink:[{shrink:E()}],order:[{order:["first","last","none",B,c]}],"grid-cols":[{"grid-cols":[V]}],"col-start-end":[{col:["auto",{span:["full",B,c]},c]}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":[V]}],"row-start-end":[{row:["auto",{span:[B,c]},c]}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",c]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",c]}],gap:[{gap:[y]}],"gap-x":[{"gap-x":[y]}],"gap-y":[{"gap-y":[y]}],"justify-content":[{justify:["normal",...Q()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Q(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Q(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],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:[f]}],mx:[{mx:[f]}],my:[{my:[f]}],ms:[{ms:[f]}],me:[{me:[f]}],mt:[{mt:[f]}],mr:[{mr:[f]}],mb:[{mb:[f]}],ml:[{ml:[f]}],"space-x":[{"space-x":[se]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[se]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",c,t]}],"min-w":[{"min-w":[c,t,"min","max","fit"]}],"max-w":[{"max-w":[c,t,"none","full","min","max","fit","prose",{screen:[z]},z]}],h:[{h:[c,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[c,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[c,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[c,t,"auto","min","max","fit"]}],"font-size":[{text:["base",z,N]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Y]}],"font-family":[{font:[V]}],"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:["tighter","tight","normal","wide","wider","widest",c]}],"line-clamp":[{"line-clamp":["none",I,Y]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",A,c]}],"list-image":[{"list-image":["none",c]}],"list-style-type":[{list:["none","disc","decimal",c]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",A,N]}],"underline-offset":[{"underline-offset":["auto",A,c]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:u()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",c]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",c]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...le(),lt]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",it]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},dt]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[k]}],"gradient-via-pos":[{via:[k]}],"gradient-to-pos":[{to:[k]}],"gradient-from":[{from:[C]}],"gradient-via":[{via:[C]}],"gradient-to":[{to:[C]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...$(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:$()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...$()]}],"outline-offset":[{"outline-offset":[A,c]}],"outline-w":[{outline:[A,N]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[A,N]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",z,pt]}],"shadow-color":[{shadow:[V]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...ce(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ce()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[m]}],"drop-shadow":[{"drop-shadow":["","none",z,c]}],grayscale:[{grayscale:[g]}],"hue-rotate":[{"hue-rotate":[i]}],invert:[{invert:[b]}],saturate:[{saturate:[G]}],sepia:[{sepia:[F]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[m]}],"backdrop-grayscale":[{"backdrop-grayscale":[g]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[i]}],"backdrop-invert":[{"backdrop-invert":[b]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[G]}],"backdrop-sepia":[{"backdrop-sepia":[F]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",c]}],duration:[{duration:R()}],ease:[{ease:["linear","in","out","in-out",c]}],delay:[{delay:R()}],animate:[{animate:["none","spin","ping","pulse","bounce",c]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[B,c]}],"translate-x":[{"translate-x":[ae]}],"translate-y":[{"translate-y":[ae]}],"skew-x":[{"skew-x":[ne]}],"skew-y":[{"skew-y":[ne]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",c]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",c]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":u()}],"scroll-mx":[{"scroll-mx":u()}],"scroll-my":[{"scroll-my":u()}],"scroll-ms":[{"scroll-ms":u()}],"scroll-me":[{"scroll-me":u()}],"scroll-mt":[{"scroll-mt":u()}],"scroll-mr":[{"scroll-mr":u()}],"scroll-mb":[{"scroll-mb":u()}],"scroll-ml":[{"scroll-ml":u()}],"scroll-p":[{"scroll-p":u()}],"scroll-px":[{"scroll-px":u()}],"scroll-py":[{"scroll-py":u()}],"scroll-ps":[{"scroll-ps":u()}],"scroll-pe":[{"scroll-pe":u()}],"scroll-pt":[{"scroll-pt":u()}],"scroll-pr":[{"scroll-pr":u()}],"scroll-pb":[{"scroll-pb":u()}],"scroll-pl":[{"scroll-pl":u()}],"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",c]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[A,N,Y]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}};var ye=Qe(gt);function w(...e){return ye((0,xe.clsx)(e))}var we=require("@radix-ui/react-slot"),ke=require("class-variance-authority"),Ce=L(require("react")),Re=require("react/jsx-runtime"),bt=(0,ke.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-primary text-primary-foreground hover:bg-primary-ON_HOVER",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent-foreground",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80"}}}),D=Ce.forwardRef(({asChild:e=!1,className:t,size:r,variant:o,...s},n)=>(0,Re.jsx)(e?we.Slot:"button",{className:w(bt({className:t,size:r,variant:o})),ref:n,...s}));D.displayName="Button";var j=L(require("@radix-ui/react-checkbox")),Ae=require("lucide-react"),Pe=L(require("react")),O=Pe.forwardRef(({className:e,...t},r)=>(0,Re.jsx)(j.Root,{className:w("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:r,...t,children:(0,Re.jsx)(j.Indicator,{className:w("flex items-center justify-center text-current"),children:(0,Re.jsx)(Ae.Check,{className:"h-4 w-4"})})}));O.displayName=j.Root.displayName;var U=L(require("react")),P=L(require("@radix-ui/react-avatar"));var te=U.forwardRef(({className:e,...t},r)=>(0,Re.jsx)(P.Root,{ref:r,className:w("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));te.displayName=P.Root.displayName;var re=U.forwardRef(({className:e,...t},r)=>(0,Re.jsx)(P.Image,{ref:r,className:w("aspect-square h-full w-full",e),...t}));re.displayName=P.Image.displayName;var oe=U.forwardRef(({className:e,...t},r)=>(0,Re.jsx)(P.Fallback,{ref:r,className:w("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));oe.displayName=P.Fallback.displayName;var ht=(0,ke.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ze({className:e,variant:t,...r}){return(0,Re.jsx)("div",{className:w(ht({variant:t}),e),...r})}var M=require("sonner"),Ie=require("next/navigation");function vt({leaveRequests:e,onApprove:t,onReject:r}){let[o,s]=(0,Me.useState)([]),n=(0,Ie.useRouter)(),l=()=>{o.length===e.length?s([]):s(e.map(i=>i.id))},a=i=>{s(b=>b.includes(i)?b.filter(y=>y!==i):[...b,i])},m=async()=>{let i=await t(o);i.success?(M.toast.success(i.message),n.refresh()):M.toast.error(`Error: ${i.message}`),s([])},g=async()=>{let i=await r(o);i.success?(M.toast.success(i.message),n.refresh()):M.toast.error(`Error: ${i.message}`),s([])};return(0,Re.jsxs)("div",{className:"space-y-4",children:[(0,Re.jsxs)("div",{className:"flex justify-between items-center",children:[(0,Re.jsx)("h2",{className:"text-2xl font-bold",children:"Approve Leave Requests"}),(0,Re.jsxs)("div",{className:"space-x-2",children:[(0,Re.jsx)(D,{onClick:m,disabled:o.length===0,variant:"default",children:"Approve Selected"}),(0,Re.jsx)(D,{onClick:g,disabled:o.length===0,variant:"destructive",children:"Reject Selected"})]})]}),(0,Re.jsx)("div",{className:"overflow-hidden sm:rounded-md",children:(0,Re.jsxs)("ul",{className:"divide-y divide-gray-200",children:[(0,Re.jsx)("li",{className:"px-4 py-4 sm:px-6",children:(0,Re.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Re.jsxs)("div",{className:"flex items-center",children:[(0,Re.jsx)(O,{id:"select-all",checked:o.length===e.length,onCheckedChange:l,className:"border-accent"}),(0,Re.jsx)("label",{htmlFor:"select-all",className:"ml-2 text-sm font-medium text-foreground",children:"Select All"})]}),(0,Re.jsxs)("span",{className:"text-sm font-medium text-gray-500",children:[o.length," of ",e.length," selected"]})]})}),e.map(i=>(0,Re.jsx)("li",{className:"px-4 py-4 sm:px-6 group hover:bg-gray-50",children:(0,Re.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Re.jsxs)("div",{className:"flex items-center",children:[(0,Re.jsx)(O,{id:`select-${i.id}`,checked:o.includes(i.id),onCheckedChange:()=>a(i.id),className:"border-accent"}),(0,Re.jsxs)("div",{className:"ml-3 flex items-center",children:[(0,Re.jsxs)(te,{className:"h-10 w-10",children:[(0,Re.jsx)(re,{src:i.userImage,alt:i.userName}),(0,Re.jsx)(oe,{children:i.userName.split(" ").map(b=>b[0]).join("")})]}),(0,Re.jsx)("div",{className:"ml-3",children:(0,Re.jsx)("p",{className:"text-sm font-medium text-foreground group-hover:text-accent",children:i.userName})})]})]}),(0,Re.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Re.jsxs)("span",{className:"text-sm text-gray-500",children:[new Date(i.startDate).toLocaleDateString(),i.startDate!==i.endDate&&` - ${new Date(i.endDate).toLocaleDateString()}`,i.leaveType!="Full Day"&&` (${i.leaveType})`,` - ${i.totalDays} day${i.totalDays!==1?"s":""}`]}),(0,Re.jsx)(ze,{variant:i.status==="approved"?"default":i.status==="rejected"?"destructive":"secondary",children:i.status})]})]})},i.id))]})}),(0,Re.jsx)(M.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9})]})}0&&(module.exports={ApproveLeave});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";import{a}from"../../chunk-
|
|
2
|
+
"use strict";import{a}from"../../chunk-DYIUZ4V5.mjs";import"../../chunk-Y5ZFXDW5.mjs";import"../../chunk-SBM5HULF.mjs";import"../../chunk-Q6SEVCRG.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";export{a as ApproveLeave};
|