ezux 1.1.19 → 1.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -1
- package/dist/{DeleteConfirmationModal-CukNDgtX.cjs → DeleteConfirmationModal-BM1PoL6P.cjs} +1 -1
- package/dist/{DeleteConfirmationModal-p8XGDGIw.js → DeleteConfirmationModal-B_tXm0N0.js} +4 -4
- package/dist/{EzEventModal-BrCBSXBM.cjs → EzEventModal-D1EzXBsQ.cjs} +1 -1
- package/dist/{EzEventModal-BDSHG11m.js → EzEventModal-D5lX9XuW.js} +2 -2
- package/dist/{EzFlow-CQFeY7DL.cjs → EzFlow-B4qRm5KH.cjs} +3 -3
- package/dist/{EzFlow-C74NbZA9.js → EzFlow-CEfPykao.js} +278 -278
- package/dist/EzKanban-2b9skOep.cjs +2 -0
- package/dist/{EzKanban-COcGidzh.js → EzKanban-CpYH8b8g.js} +86 -80
- package/dist/{EzLayout-CiaPLniV.js → EzLayout-DFxegglu.js} +30 -24
- package/dist/EzLayout-EYOfpFXs.cjs +1 -0
- package/dist/{EzScheduler-CjQbi1Na.js → EzScheduler-D7aH4KCY.js} +60 -55
- package/dist/EzScheduler-hC9PsLrI.cjs +1 -0
- package/dist/{EzSchedulerQuickAdd-BeNfGdWs.cjs → EzSchedulerQuickAdd-BYrV9PQ-.cjs} +1 -1
- package/dist/{EzSchedulerQuickAdd-BIC8xbSn.js → EzSchedulerQuickAdd-D0kGTzE3.js} +2 -2
- package/dist/{EzSchedulerToolbar-jMw8KB8k.js → EzSchedulerToolbar-BhlCMeOT.js} +2 -2
- package/dist/{EzSchedulerToolbar-ihfe-5Yd.cjs → EzSchedulerToolbar-Dy62PVnH.cjs} +1 -1
- package/dist/{EzSignature-7UHO5lSP.js → EzSignature-B-CPcf7e.js} +5 -2
- package/dist/{EzSignature-Df7UZ-IS.cjs → EzSignature-DcmWBPIL.cjs} +1 -1
- package/dist/EzTable-Bcq7TByw.cjs +3 -0
- package/dist/{EzTable-D2p1IWHc.js → EzTable-DLbb3nl7.js} +1296 -1161
- package/dist/EzTableEditDialog--8pD39Rp.cjs +1 -0
- package/dist/EzTableEditDialog-m0zW6r6z.js +100 -0
- package/dist/{EzTableFooter-DrLoWelo.js → EzTableFooter-BuTS3wDK.js} +1 -1
- package/dist/{EzTableToolbar-DwuumvWP.cjs → EzTableToolbar-BWjqKfwx.cjs} +1 -1
- package/dist/{EzTableToolbar-BH5z9fSJ.js → EzTableToolbar-BiRfKm9d.js} +2 -2
- package/dist/{EzTreeView-D1G0Aomc.js → EzTreeView-B2B_Ruwm.js} +37 -37
- package/dist/EzTreeView-DLoPKe2i.cjs +1 -0
- package/dist/{KanbanBoard-BsZP_PJi.js → KanbanBoard-CRF0-mYa.js} +119 -119
- package/dist/{KanbanBoard-C9bjU_gk.cjs → KanbanBoard-DdXD-Zjt.cjs} +1 -1
- package/dist/advanced.cjs +2 -2
- package/dist/advanced.es.js +30 -29
- package/dist/card-NlCLCGFb.cjs +1 -0
- package/dist/{card-ZUNxcdIM.js → card-urNaa5h-.js} +1 -1
- package/dist/{checkbox-BrCh_Iid.cjs → checkbox-B9yPkCYi.cjs} +1 -1
- package/dist/{checkbox-DRkQuB4W.js → checkbox-BTuckDEm.js} +1 -1
- package/dist/components/EzTable/EzTableEditDialog.d.ts +1 -1
- package/dist/components/EzTable/hooks/useTableFiltering.d.ts +6 -6
- package/dist/components/EzTable/hooks/useTableHistory.d.ts +3 -3
- package/dist/components/EzTable/hooks/useTableImperative.d.ts +9 -6
- package/dist/components/EzTable/hooks/useTableState.d.ts +12 -12
- package/dist/components/EzTable/types/EzTableProps.d.ts +9 -1
- package/dist/ezux.css +1 -1
- package/dist/flow.cjs +1 -1
- package/dist/flow.es.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.es.js +20 -20
- package/dist/input-CcRi0LeO.js +14 -0
- package/dist/input-DOh8O0iX.cjs +1 -0
- package/dist/kanban.cjs +1 -1
- package/dist/kanban.es.js +2 -2
- package/dist/layout.cjs +1 -1
- package/dist/layout.es.js +1 -1
- package/dist/mock-services.cjs +1 -1
- package/dist/mock-services.es.js +1 -1
- package/dist/scheduler.cjs +1 -1
- package/dist/scheduler.es.js +1 -1
- package/dist/signature.cjs +1 -1
- package/dist/signature.es.js +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.es.js +1 -1
- package/dist/theme-vars.css +25 -5
- package/dist/treeview.cjs +1 -1
- package/dist/treeview.es.js +1 -1
- package/package.json +39 -36
- package/dist/EzKanban-DokdXGqQ.cjs +0 -2
- package/dist/EzLayout-BGnqFtvO.cjs +0 -1
- package/dist/EzScheduler-B8nV1VWY.cjs +0 -1
- package/dist/EzTable-CEXvJR1t.cjs +0 -3
- package/dist/EzTableEditDialog-BXnnYSSy.cjs +0 -1
- package/dist/EzTableEditDialog-Ccd5XoHm.js +0 -84
- package/dist/EzTreeView-KMGlU4ax.cjs +0 -1
- package/dist/card-CPlRZxbq.cjs +0 -1
- package/dist/input-CYlvlbF7.cjs +0 -1
- package/dist/input-Cj3sQK3M.js +0 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./EzProvider-L2qQMq-v.cjs"),t=require("./button-BBMwzUtG.cjs"),n=require("./input-CYlvlbF7.cjs"),r=require("./avatar-BSdRHETK.cjs"),i=require("./label-BGgvoZWD.cjs"),a=require("./dropdown-menu-BRP0tyR_.cjs"),o=require("./EzScheduler-B8nV1VWY.cjs"),s=require("./select-sVieKbLu.cjs"),c=require("./checkbox-BrCh_Iid.cjs"),l=require("./TooltipWrapper-DfbFAZ1U.cjs"),u=require("./Modal-BmX1C448.cjs"),d=require("./card-CPlRZxbq.cjs"),f=require("./date-time-picker-D0w0sDgq.cjs");let p=require("react");p=e.y(p,1);let m=require("class-variance-authority"),h=require("lucide-react"),g=require("react/jsx-runtime"),_=require("@tanstack/react-form"),v=require("@dnd-kit/core"),y=require("@tanstack/react-virtual"),b=require("date-fns"),x=require("@dnd-kit/utilities"),S=require("@dnd-kit/sortable");var C=(0,m.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 w({className:t,variant:n,...r}){return(0,g.jsx)(`div`,{className:e._(C({variant:n}),t),...r})}var T=p.createContext(void 0);function E({className:t,defaultValue:n,value:r,onValueChange:i,children:a,ref:o,...s}){let[c,l]=p.useState(n||``),u=r!==void 0,d=u?r:c,f=p.useCallback(e=>{u||l(e),i?.(e)},[u,i]);return(0,g.jsx)(T.Provider,{value:{value:d,onValueChange:f},children:(0,g.jsx)(`div`,{ref:o,className:e._(t),...s,children:a})})}function D({className:t,ref:n,...r}){return(0,g.jsx)(`div`,{ref:n,className:e._(`inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground`,t),...r})}function O({className:t,value:n,onClick:r,ref:i,...a}){let o=p.useContext(T);if(!o)throw Error(`TabsTrigger must be used within Tabs`);return(0,g.jsx)(`button`,{ref:i,type:`button`,className:e._(`inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50`,o.value===n&&`bg-background text-foreground shadow-sm`,t),onClick:e=>{o.onValueChange(n),r?.(e)},...a})}function k({className:t,value:n,children:r,ref:i,...a}){let o=p.useContext(T);if(!o)throw Error(`TabsContent must be used within Tabs`);return o.value===n?(0,g.jsx)(`div`,{ref:i,className:e._(`mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`,t),...a,children:r}):null}var A=({isOpen:e,onClose:a,onSave:o,onDelete:l,card:m,columns:v=[],columnId:y,customFields:b=[],currentUser:x={id:`current-user`,name:`Current User`}})=>{let{t:S}=d.c(),C=()=>typeof crypto<`u`&&crypto.randomUUID?crypto.randomUUID():`id-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,w=(0,_.useForm)({defaultValues:{title:m?.title||``,description:m?.description||``,columnId:m?.columnId||y||v[0]?.id||``,priority:m?.priority||`medium`,startDate:m?.startDate?new Date(m.startDate):void 0,dueDate:m?.dueDate?new Date(m.dueDate):void 0,checklists:m?.checklists||[],attachments:m?.attachments||[],comments:m?.comments||[],coverImage:m?.coverImage||``,customFieldValues:m?.customFieldValues||{},subtasks:m?.subtasks||[],timeTracking:m?.timeTracking||{estimated:0,actual:0},activity:m?.activity||[],assignees:m?.assignees||[],tags:m?.tags||[],...m},onSubmit:async({value:e})=>{o(e),a()}});(0,p.useEffect)(()=>{},[e,m]);let T=()=>{m?.id&&l&&l(m.id)},[A,j]=(0,p.useState)({}),M=()=>{let e={id:C(),title:`Checklist`,items:[]};w.pushFieldValue(`checklists`,e)},N=(e,t)=>{j(n=>({...n,[e]:t}))},P=e=>{let t=A[e]?.trim();if(!t)return;let n=(w.getFieldValue(`checklists`)||[]).map(n=>n.id===e?{...n,items:[...n.items,{id:C(),text:t,isChecked:!1}]}:n);w.setFieldValue(`checklists`,n),j(t=>({...t,[e]:``}))},F=(e,t)=>{let n=(w.getFieldValue(`checklists`)||[]).map(n=>n.id===e?{...n,items:n.items.map(e=>e.id===t?{...e,isChecked:!e.isChecked}:e)}:n);w.setFieldValue(`checklists`,n)},[I,L]=(0,p.useState)(``),[R,z]=(0,p.useState)(null),[B,V]=(0,p.useState)(``),[H,U]=(0,p.useState)(null),W=()=>{if(!I.trim())return;let e={id:C(),text:I,authorId:x.id,authorName:x.name,createdAt:new Date};w.pushFieldValue(`comments`,e),L(``);let t={id:C(),type:`comment`,text:`commented "${I.slice(0,20)}${I.length>20?`...`:``}"`,userId:x.id,userName:x.name,createdAt:new Date};w.pushFieldValue(`activity`,t)},G=e=>{z(e.id),V(e.text)},K=()=>{if(R&&B.trim()){let e=(w.getFieldValue(`comments`)||[]).map(e=>e.id===R?{...e,text:B}:e);w.setFieldValue(`comments`,e),z(null),V(``)}},q=()=>{z(null),V(``)},ee=e=>{U(e)},te=()=>{U(null)},ne=e=>{let t=w.getFieldValue(`comments`)||[];w.setFieldValue(`comments`,t.filter(t=>t.id!==e)),U(null);let n={id:C(),type:`delete`,text:`deleted a comment`,userId:x.id,userName:x.name,createdAt:new Date};w.pushFieldValue(`activity`,n)},[J,Y]=(0,p.useState)(``),X=()=>{if(!J.trim())return;let e={id:C(),title:J,isCompleted:!1};w.pushFieldValue(`subtasks`,e),Y(``)},re=e=>{let t=(w.getFieldValue(`subtasks`)||[]).map(t=>t.id===e?{...t,isCompleted:!t.isCompleted}:t);w.setFieldValue(`subtasks`,t)},ie=e=>{let t=w.getFieldValue(`subtasks`)||[];w.setFieldValue(`subtasks`,t.filter(t=>t.id!==e))},Z=p.default.useRef(null),[Q,ae]=(0,p.useState)(!1),[oe,se]=(0,p.useState)(null),ce=async e=>{let t=e.target.files?.[0];if(!t)return;ae(!0),se(null),await new Promise(e=>setTimeout(e,1500));let n={id:C(),name:t.name,url:URL.createObjectURL(t),type:t.type.startsWith(`image/`)?`image`:`file`,size:t.size,uploadedAt:new Date};w.pushFieldValue(`attachments`,n),ae(!1),Z.current&&(Z.current.value=``);let r={id:C(),type:`attachment`,text:`attached ${t.name}`,userId:x.id,userName:x.name,createdAt:new Date};w.pushFieldValue(`activity`,r)},le=e=>{let t=w.getFieldValue(`attachments`)||[];w.setFieldValue(`attachments`,t.filter(t=>t.id!==e));let n={id:C(),type:`delete`,text:`removed an attachment`,userId:x.id,userName:x.name,createdAt:new Date};w.pushFieldValue(`activity`,n)},$=!!m?.id,ue=e=>{e.preventDefault(),e.stopPropagation(),w.handleSubmit()},de=(0,g.jsxs)(`div`,{className:`space-y-6`,children:[(0,g.jsx)(`div`,{className:`flex items-start justify-between gap-4`,children:(0,g.jsxs)(`div`,{className:`flex-1 space-y-4`,children:[(0,g.jsx)(w.Field,{name:`title`,children:e=>(0,g.jsxs)(`div`,{className:`space-y-2`,children:[(0,g.jsx)(i.t,{htmlFor:`title`,className:`text-right`,children:S(`common.title`)}),(0,g.jsx)(n.t,{id:`title`,value:e.state.value,onChange:t=>e.handleChange(t.target.value),placeholder:S(`kanban.cardTitlePlaceholder`),className:`text-lg font-semibold`})]})}),(0,g.jsxs)(`div`,{className:`flex gap-4 items-center`,children:[(0,g.jsx)(`div`,{className:`w-[200px]`,children:(0,g.jsx)(w.Field,{name:`columnId`,children:e=>(0,g.jsxs)(s.t,{value:e.state.value,onValueChange:t=>e.handleChange(t),children:[(0,g.jsx)(s.i,{children:(0,g.jsx)(s.a,{placeholder:`Status`})}),(0,g.jsx)(s.n,{children:v.map(e=>(0,g.jsx)(s.r,{value:e.id,children:e.name},e.id))})]})})}),$&&(0,g.jsxs)(`span`,{className:`text-sm text-muted-foreground font-mono`,children:[`#`,m?.id?.slice(0,8)]})]})]})}),(0,g.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-4`,children:[(0,g.jsx)(w.Field,{name:`priority`,children:e=>(0,g.jsxs)(`div`,{className:`space-y-2`,children:[(0,g.jsx)(i.t,{children:`Priority`}),(0,g.jsxs)(s.t,{value:e.state.value,onValueChange:t=>e.handleChange(t),children:[(0,g.jsx)(s.i,{children:(0,g.jsx)(s.a,{placeholder:`Priority`})}),(0,g.jsxs)(s.n,{children:[(0,g.jsx)(s.r,{value:`low`,children:`Low`}),(0,g.jsx)(s.r,{value:`medium`,children:`Medium`}),(0,g.jsx)(s.r,{value:`high`,children:`High`}),(0,g.jsx)(s.r,{value:`critical`,children:`Critical`})]})]})]})}),(0,g.jsx)(w.Field,{name:`startDate`,children:e=>(0,g.jsxs)(`div`,{className:`space-y-2`,children:[(0,g.jsx)(i.t,{children:`Start Date`}),(0,g.jsx)(f.t,{date:e.state.value,setDate:t=>e.handleChange(t),mode:`date`})]})}),(0,g.jsx)(w.Field,{name:`dueDate`,children:e=>(0,g.jsxs)(`div`,{className:`space-y-2`,children:[(0,g.jsx)(i.t,{children:`Due Date`}),(0,g.jsx)(f.t,{date:e.state.value,setDate:t=>e.handleChange(t),mode:`date`})]})})]}),(0,g.jsx)(w.Field,{name:`description`,children:e=>(0,g.jsxs)(`div`,{className:`space-y-2`,children:[(0,g.jsx)(i.t,{children:`Description`}),(0,g.jsx)(d.s,{value:e.state.value||``,onChange:t=>e.handleChange(t.target.value),className:`min-h-[150px]`})]})}),b.length>0&&(0,g.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-4 border-t pt-4`,children:b.map(e=>(0,g.jsx)(w.Field,{name:`customFieldValues.${e.id}`,children:t=>(0,g.jsxs)(`div`,{className:`space-y-2`,children:[(0,g.jsx)(i.t,{children:e.name}),e.type===`text`&&(0,g.jsx)(n.t,{value:t.state.value||``,onChange:e=>t.handleChange(e.target.value)}),e.type===`number`&&(0,g.jsx)(n.t,{type:`number`,value:t.state.value||``,onChange:e=>t.handleChange(Number(e.target.value))}),e.type===`date`&&(0,g.jsx)(f.t,{date:t.state.value,setDate:e=>t.handleChange(e),mode:`date`}),e.type===`select`&&(0,g.jsxs)(s.t,{value:t.state.value||``,onValueChange:e=>t.handleChange(e),children:[(0,g.jsx)(s.i,{children:(0,g.jsx)(s.a,{placeholder:`Select...`})}),(0,g.jsx)(s.n,{children:e.options?.map(e=>(0,g.jsx)(s.r,{value:e,children:e},e))})]}),e.type===`checkbox`&&(0,g.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[(0,g.jsx)(c.t,{checked:!!t.state.value,onCheckedChange:e=>t.handleChange(!!e)}),(0,g.jsx)(`span`,{className:`text-sm font-medium`,children:e.name})]})]})},e.id))}),(0,g.jsxs)(E,{defaultValue:`subtasks`,className:`w-full`,children:[(0,g.jsxs)(D,{className:`grid w-full grid-cols-5`,children:[(0,g.jsx)(O,{value:`subtasks`,children:`Subtasks`}),(0,g.jsx)(O,{value:`checklists`,children:`Checklists`}),(0,g.jsx)(O,{value:`attachments`,children:`Attachments`}),(0,g.jsx)(O,{value:`comments`,children:`Comments`}),(0,g.jsx)(O,{value:`activity`,children:`Activity`})]}),(0,g.jsxs)(k,{value:`subtasks`,className:`space-y-4 pt-4`,children:[(0,g.jsx)(w.Field,{name:`subtasks`,children:e=>(0,g.jsxs)(`div`,{className:`space-y-2`,children:[e.state.value?.map(e=>(0,g.jsxs)(`div`,{className:`flex items-center gap-2 border p-3 rounded-md`,children:[(0,g.jsx)(c.t,{checked:e.isCompleted,onCheckedChange:()=>re(e.id)}),(0,g.jsx)(`span`,{className:e.isCompleted?`line-through text-muted-foreground flex-1`:`flex-1`,children:e.title}),(0,g.jsx)(t.t,{variant:`ghost`,size:`icon`,onClick:()=>ie(e.id),children:(0,g.jsx)(h.X,{className:`w-4 h-4`})})]},e.id)),(!e.state.value||e.state.value.length===0)&&(0,g.jsx)(`div`,{className:`text-center py-8 text-muted-foreground border border-dashed rounded-lg`,children:`No subtasks yet.`})]})}),(0,g.jsxs)(`div`,{className:`flex gap-2`,children:[(0,g.jsx)(n.t,{value:J,onChange:e=>Y(e.target.value),placeholder:`Add a subtask...`,onKeyDown:e=>e.key===`Enter`&&X()}),(0,g.jsx)(t.t,{onClick:X,disabled:!J.trim(),children:`Add`})]})]}),(0,g.jsxs)(k,{value:`checklists`,className:`space-y-4 pt-4`,children:[(0,g.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,g.jsx)(`h3`,{className:`font-medium`,children:`Checklists`}),(0,g.jsxs)(t.t,{size:`sm`,onClick:M,variant:`outline`,children:[(0,g.jsx)(h.Plus,{className:`w-4 h-4 mr-2`}),` Add Checklist`]})]}),(0,g.jsx)(w.Field,{name:`checklists`,children:e=>(0,g.jsxs)(`div`,{className:`space-y-4`,children:[e.state.value?.map(e=>{let r=e.items.length>0?Math.round(e.items.filter(e=>e.isChecked).length/e.items.length*100):0;return(0,g.jsxs)(`div`,{className:`border rounded-md p-4 space-y-3`,children:[(0,g.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,g.jsx)(`div`,{className:`font-medium`,children:e.title}),(0,g.jsxs)(`div`,{className:`text-xs text-muted-foreground`,children:[r,`%`]})]}),(0,g.jsx)(`div`,{className:`h-2 w-full bg-muted rounded-full overflow-hidden`,children:(0,g.jsx)(`div`,{className:`h-full bg-primary transition-all`,style:{width:`${r}%`}})}),(0,g.jsx)(`div`,{className:`space-y-2`,children:e.items.map(t=>(0,g.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,g.jsx)(c.t,{checked:t.isChecked,onCheckedChange:()=>F(e.id,t.id)}),(0,g.jsx)(`span`,{className:t.isChecked?`line-through text-muted-foreground`:``,children:t.text})]},t.id))}),(0,g.jsxs)(`div`,{className:`pt-2 flex gap-2`,children:[(0,g.jsx)(n.t,{placeholder:`Add an item...`,className:`h-8 text-sm`,value:A[e.id]||``,onChange:t=>N(e.id,t.target.value),onKeyDown:t=>t.key===`Enter`&&P(e.id)}),(0,g.jsx)(t.t,{size:`sm`,onClick:()=>P(e.id),disabled:!A[e.id]?.trim(),children:`Add`})]})]},e.id)}),(!e.state.value||e.state.value.length===0)&&(0,g.jsx)(`div`,{className:`text-center py-8 text-muted-foreground border border-dashed rounded-lg`,children:`No checklists yet.`})]})})]}),(0,g.jsxs)(k,{value:`attachments`,className:`space-y-4 pt-4`,children:[(0,g.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,g.jsx)(`h3`,{className:`font-medium`,children:`Attachments`}),(0,g.jsx)(`input`,{type:`file`,className:`hidden`,ref:Z,onChange:ce}),(0,g.jsxs)(`div`,{className:`flex items-center gap-2`,children:[oe&&(0,g.jsx)(`span`,{className:`text-xs text-red-500`,children:oe}),(0,g.jsxs)(t.t,{size:`sm`,variant:`outline`,onClick:()=>Z.current?.click(),disabled:Q,children:[Q?(0,g.jsx)(h.Loader2,{className:`w-4 h-4 mr-2 animate-spin`}):(0,g.jsx)(h.Paperclip,{className:`w-4 h-4 mr-2`}),Q?`Uploading...`:`Upload`]})]})]}),(0,g.jsx)(w.Field,{name:`attachments`,children:e=>(0,g.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[e.state.value?.map(e=>(0,g.jsxs)(`div`,{className:`border p-2 rounded flex items-center gap-2`,children:[(0,g.jsx)(`div`,{className:`w-10 h-10 bg-muted flex items-center justify-center rounded`,children:(0,g.jsx)(h.Image,{className:`w-5 h-5 text-muted-foreground`})}),(0,g.jsxs)(`div`,{className:`overflow-hidden`,children:[(0,g.jsx)(`div`,{className:`truncate font-medium text-sm`,children:e.name}),(0,g.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:e.type})]}),(0,g.jsx)(t.t,{variant:`ghost`,size:`icon`,className:`ml-auto`,onClick:()=>le(e.id),children:(0,g.jsx)(h.X,{className:`w-4 h-4 text-muted-foreground`})})]},e.id)),(!e.state.value||e.state.value.length===0)&&!Q&&(0,g.jsx)(`div`,{className:`text-center py-8 text-muted-foreground border border-dashed rounded-lg`,children:`No attachments yet.`})]})})]}),(0,g.jsxs)(k,{value:`comments`,className:`space-y-4 pt-4`,children:[(0,g.jsx)(w.Field,{name:`comments`,children:e=>(0,g.jsxs)(`div`,{className:`space-y-4`,children:[e.state.value?.map(e=>(0,g.jsxs)(`div`,{className:`flex gap-3`,children:[(0,g.jsx)(r.t,{className:`w-8 h-8`,children:(0,g.jsx)(r.n,{children:e.authorName[0]})}),(0,g.jsxs)(`div`,{className:`space-y-1 w-full`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,g.jsx)(`span`,{className:`font-semibold text-sm`,children:e.authorName}),(0,g.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:new Date(e.createdAt).toLocaleString()})]}),R===e.id?(0,g.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,g.jsx)(d.s,{value:B,onChange:e=>V(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)?K():e.key===`Escape`&&q()},autoFocus:!0}),(0,g.jsxs)(`div`,{className:`flex gap-2 justify-end`,children:[(0,g.jsx)(t.t,{size:`sm`,variant:`ghost`,onClick:q,children:`Cancel`}),(0,g.jsx)(t.t,{size:`sm`,onClick:K,children:`Save`})]})]}):(0,g.jsx)(`div`,{className:`text-sm bg-muted/50 p-2 rounded-md`,children:e.text}),H===e.id&&(0,g.jsxs)(`div`,{className:`flex items-center gap-2 p-2 bg-red-50 text-red-800 rounded-md text-sm mt-2`,children:[(0,g.jsx)(h.AlertTriangle,{className:`w-4 h-4`}),(0,g.jsx)(`span`,{className:`flex-1`,children:`Delete this comment?`}),(0,g.jsx)(t.t,{size:`sm`,variant:`ghost`,className:`h-6 px-2 hover:bg-red-100 text-red-800`,onClick:te,children:`No`}),(0,g.jsx)(t.t,{size:`sm`,variant:`destructive`,className:`h-6 px-2`,onClick:()=>ne(e.id),children:`Yes`})]})]}),(0,g.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,g.jsx)(t.t,{variant:`ghost`,size:`icon`,className:`h-6 w-6`,onClick:()=>G(e),disabled:!!H,children:(0,g.jsx)(h.Edit2,{className:`w-3 h-3 text-muted-foreground`})}),(0,g.jsx)(t.t,{variant:`ghost`,size:`icon`,className:`h-6 w-6`,onClick:()=>ee(e.id),disabled:!!H,children:(0,g.jsx)(h.Trash2,{className:`w-3 h-3 text-muted-foreground`})})]})]},e.id)),(!e.state.value||e.state.value.length===0)&&(0,g.jsx)(`div`,{className:`text-center py-8 text-muted-foreground`,children:`No comments yet.`})]})}),(0,g.jsx)(`div`,{className:`pt-4 border-t sticky bottom-0 bg-background`,children:(0,g.jsxs)(`div`,{className:`flex gap-2`,children:[(0,g.jsx)(r.t,{className:`w-8 h-8`,children:(0,g.jsx)(r.n,{children:x?.name?.[0]||`U`})}),(0,g.jsxs)(`div`,{className:`flex-1 space-y-2`,children:[(0,g.jsx)(d.s,{value:I,onChange:e=>L(e.target.value),placeholder:`Write a comment...`,rows:2}),(0,g.jsx)(`div`,{className:`flex justify-end`,children:(0,g.jsx)(t.t,{size:`sm`,onClick:W,disabled:!I.trim(),children:`Send`})})]})]})})]}),(0,g.jsx)(k,{value:`activity`,className:`space-y-4 pt-4`,children:(0,g.jsx)(w.Field,{name:`activity`,children:e=>(0,g.jsxs)(`div`,{className:`space-y-4`,children:[e.state.value?.map(e=>(0,g.jsxs)(`div`,{className:`flex gap-3 text-sm`,children:[(0,g.jsx)(`div`,{className:`mt-1`,children:(0,g.jsx)(h.Activity,{className:`w-4 h-4 text-muted-foreground`})}),(0,g.jsxs)(`div`,{children:[(0,g.jsx)(`span`,{className:`font-semibold`,children:e.userName}),` `,(0,g.jsx)(`span`,{className:`text-muted-foreground`,children:e.text}),(0,g.jsx)(`div`,{className:`text-xs text-muted-foreground mt-1`,children:new Date(e.createdAt).toLocaleString()})]})]},e.id)),(!e.state.value||e.state.value.length===0)&&(0,g.jsx)(`div`,{className:`text-center py-8 text-muted-foreground`,children:`No activity yet.`})]})})})]})]});return(0,g.jsxs)(u.t,{isOpen:e,onClose:a,title:$?`Edit Card`:`New Card`,className:`sm:max-w-[800px] h-[85vh] flex flex-col`,children:[(0,g.jsx)(`div`,{className:`flex-1 overflow-y-auto pr-2`,children:de}),(0,g.jsxs)(`div`,{className:`flex justify-between pt-4 border-t mt-4`,children:[$&&(0,g.jsx)(t.t,{variant:`destructive`,onClick:T,children:`Delete Card`}),(0,g.jsxs)(`div`,{className:`flex gap-2 ml-auto`,children:[(0,g.jsx)(t.t,{variant:`outline`,onClick:a,children:`Cancel`}),(0,g.jsx)(t.t,{onClick:e=>ue(e),children:`Save`})]})]})]})},j={Active:{color:`emerald`,label:`Active`,icon:h.CheckCircle2},Verified:{color:`emerald`,label:`Verified`,icon:h.CheckCircle2},Approved:{color:`emerald`,label:`Approved`,icon:h.CheckCircle2},Published:{color:`teal`,label:`Published`,icon:h.CheckCircle2},Resolved:{color:`teal`,label:`Resolved`,icon:h.CheckCircle2},Completed:{color:`indigo`,label:`Completed`,icon:h.CheckCircle2},"In Progress":{color:`sky`,label:`In Progress`,icon:h.PlayCircle},Open:{color:`sky`,label:`Open`,icon:h.Unlock},Pending:{color:`amber`,label:`Pending`,icon:h.Clock},"Under Review":{color:`amber`,label:`Under Review`,icon:h.FileText},Scheduled:{color:`orange`,label:`Scheduled`,icon:h.Clock},Returned:{color:`orange`,label:`Returned`,icon:h.RefreshCcw},Rejected:{color:`red`,label:`Rejected`,icon:h.XCircle},Disapproved:{color:`red`,label:`Disapproved`,icon:h.XCircle},Unresolved:{color:`red`,label:`Unresolved`,icon:h.AlertCircle},Expired:{color:`red`,label:`Expired`,icon:h.StopCircle},Cancelled:{color:`rose`,label:`Cancelled`,icon:h.XCircle},Unverified:{color:`rose`,label:`Unverified`,icon:h.HelpCircle},Inactive:{color:`slate`,label:`Inactive`,icon:h.XCircle},"On Leave":{color:`blue`,label:`On Leave`,icon:h.Clock},Archived:{color:`gray`,label:`Archived`,icon:h.Archive},Draft:{color:`gray`,label:`Draft`,icon:h.FileText},Closed:{color:`gray`,label:`Closed`,icon:h.Lock},Public:{color:`blue`,label:`Public`,icon:h.Globe},Private:{color:`slate`,label:`Private`,icon:h.Lock},Restricted:{color:`amber`,label:`Restricted`,icon:h.ShieldAlert},Internal:{color:`indigo`,label:`Internal`,icon:h.Users},External:{color:`blue`,label:`External`,icon:h.Globe},System:{color:`violet`,label:`System`,icon:h.Settings},Default:{color:`gray`,label:`Default`,icon:h.HelpCircle}},M={none:`none`,low:`0 0 10px -5px`,medium:`0 0 20px -8px`,high:`0 0 30px -4px`},N=(0,p.memo)(({status:t,className:n,showDot:r=!1,showIcon:i=!1,iconPosition:a=`left`,hideLabel:o=!1,showTooltip:s=!0,variant:c=`solid`,customWidth:l,customHeight:u,customFontSize:d=`11px`,customBgColor:f,customTextColor:p,showBorder:m=!1,borderThickness:h=`1px`,customBorderColor:_,glowIntensity:v=`medium`})=>{let y=j[t]||j.Default,b=y.color,x=y.icon,S=b===`gray`||b===`slate`;return(0,g.jsxs)(`div`,{style:{width:l||void 0,height:u||void 0,fontSize:d,backgroundColor:f||void 0,color:p||void 0,borderWidth:m?h:`0px`,borderColor:_||(m?`currentColor`:`transparent`),borderStyle:m?`solid`:`none`,boxShadow:v!==`none`&&!f?`${M[v]} var(--tw-shadow-color)`:void 0},title:s?y.label:void 0,className:e._(`inline-flex items-center justify-center gap-2 transition-all duration-300 rounded-full font-bold`,o?`p-1.5 w-[28px] h-[28px]`:`px-3 py-1`,!l&&!o&&`min-w-[120px]`,!u&&!o&&`min-h-[28px]`,!f&&(c===`solid`?`bg-${b}-100`:`bg-transparent`),!p&&`text-${b}-950`,!f&&`dark:bg-${b}-300`,!p&&(S?`dark:text-white dark:bg-gray-800`:`dark:text-black`),`shadow-${b}-500/40`,s&&`cursor-help`,n),children:[a===`left`&&i&&(0,g.jsx)(x,{className:e._(`shrink-0 stroke-[3px]`,o?`w-4 h-4`:`w-3.5 h-3.5`)}),r&&!i&&!o&&(0,g.jsx)(`span`,{className:e._(`w-1.5 h-1.5 rounded-full flex-shrink-0`,`bg-${b}-700`,S?`dark:bg-white`:`dark:bg-black/70`)}),!o&&(0,g.jsx)(`span`,{className:`uppercase tracking-widest font-black leading-none`,children:y.label}),a===`right`&&i&&(0,g.jsx)(x,{className:e._(`shrink-0 stroke-[3px]`,o?`w-4 h-4`:`w-3.5 h-3.5`)})]})});N.displayName=`StatusBadge`;var P={formatDate:(e,t=`PP`)=>{if(!e)return``;let n=new Date(e);return(0,b.isValid)(n)?(0,b.format)(n,t):``},formatDateTime:(e,t=`PP p`)=>{if(!e)return``;let n=new Date(e);return(0,b.isValid)(n)?(0,b.format)(n,t):``},isValidDate:e=>(0,b.isValid)(new Date(e))},F=({card:t,onClick:n,onDoubleClick:i,isDragging:a,isHighlighted:o,enableTooltip:s,tooltipTemplate:c,customFields:u,slots:f,slotProps:p,className:m,dir:_})=>{let v=_===`rtl`,{attributes:y,listeners:b,setNodeRef:C,transform:T,transition:E,isDragging:D}=(0,S.useSortable)({id:t.id,data:{type:`card`,card:t}}),O=a||D,k={transform:x.CSS.Translate.toString(T),transition:E},A={low:`Pending`,medium:`In Progress`,high:`Active`,critical:`Inactive`},j=t.checklists?.reduce((e,t)=>e+t.items.length,0)||0,M=t.checklists?.reduce((e,t)=>e+t.items.filter(e=>e.isChecked).length,0)||0,F=t.subtasks?.length||0,I=t.subtasks?.filter(e=>e.isCompleted).length||0,L=(0,g.jsxs)(`div`,{className:`p-0 space-y-2`,children:[t.coverImage&&(0,g.jsx)(`div`,{className:`h-32 w-full overflow-hidden rounded-t-lg`,children:(0,g.jsx)(`img`,{src:t.coverImage,alt:`Cover`,className:`w-full h-full object-cover`})}),(0,g.jsxs)(`div`,{className:e._(`p-3 space-y-2`,t.coverImage?`pt-1`:``),children:[(0,g.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,g.jsx)(`h4`,{className:`font-medium text-sm line-clamp-2 flex-1`,children:t.title}),t.priority&&(0,g.jsx)(N,{status:A[t.priority]||`Pending`,className:`shrink-0`})]}),t.description&&(0,g.jsx)(`p`,{className:`text-xs text-muted-foreground line-clamp-2`,children:t.description}),t.tags&&t.tags.length>0&&(0,g.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:t.tags.map(e=>(0,g.jsx)(w,{variant:`secondary`,className:`text-xs px-2 py-0`,style:{backgroundColor:e.color,color:`#fff`},children:e.name},e.id))}),(j>0||t.attachments&&t.attachments.length>0||t.comments&&t.comments.length>0||F>0||t.timeTracking)&&(0,g.jsxs)(`div`,{className:`flex items-center gap-3 text-muted-foreground pt-1 flex-wrap`,children:[t.attachments&&t.attachments.length>0&&(0,g.jsxs)(`div`,{className:`flex items-center gap-1 text-xs`,children:[(0,g.jsx)(h.Paperclip,{className:`w-3 h-3`}),(0,g.jsx)(`span`,{children:t.attachments.length})]}),t.comments&&t.comments.length>0&&(0,g.jsxs)(`div`,{className:`flex items-center gap-1 text-xs`,children:[(0,g.jsx)(h.MessageSquare,{className:`w-3 h-3`}),(0,g.jsx)(`span`,{children:t.comments.length})]}),j>0&&(0,g.jsxs)(`div`,{className:`flex items-center gap-1 text-xs`,children:[(0,g.jsx)(h.CheckSquare,{className:`w-3 h-3`}),(0,g.jsxs)(`span`,{children:[M,`/`,j]})]}),F>0&&(0,g.jsxs)(`div`,{className:`flex items-center gap-1 text-xs`,children:[(0,g.jsx)(h.List,{className:`w-3 h-3`}),(0,g.jsxs)(`span`,{children:[I,`/`,F]})]}),t.timeTracking&&(t.timeTracking.estimated>0||t.timeTracking.actual>0)&&(0,g.jsxs)(`div`,{className:`flex items-center gap-1 text-xs`,title:`Estimated: ${t.timeTracking.estimated}h, Actual: ${t.timeTracking.actual}h`,children:[(0,g.jsx)(h.Clock,{className:`w-3 h-3`}),(0,g.jsxs)(`span`,{children:[t.timeTracking.actual,`h / `,t.timeTracking.estimated,`h`]})]})]}),(0,g.jsxs)(`div`,{className:`flex items-center justify-between pt-1`,children:[t.assignees&&t.assignees.length>0&&(0,g.jsxs)(`div`,{className:`flex -space-x-2`,children:[t.assignees.slice(0,3).map(e=>(0,g.jsx)(r.t,{className:`w-6 h-6 border-2 border-background`,children:e.avatarUrl?(0,g.jsx)(r.r,{src:e.avatarUrl,alt:e.name}):(0,g.jsx)(r.n,{className:`text-xs`,children:e.name.substring(0,2).toUpperCase()})},e.id)),t.assignees.length>3&&(0,g.jsx)(`div`,{className:`w-6 h-6 rounded-full bg-muted border-2 border-background flex items-center justify-center`,children:(0,g.jsxs)(`span`,{className:`text-xs`,children:[`+`,t.assignees.length-3]})})]}),t.dueDate&&(0,g.jsxs)(`div`,{className:e._(`flex items-center gap-1 text-xs text-muted-foreground`,v?`mr-auto`:`ml-auto`),children:[(0,g.jsx)(h.Calendar,{className:`w-3 h-3`}),(0,g.jsx)(`span`,{children:P.formatDate(t.dueDate)})]})]})]}),u&&u.length>0&&t.customFieldValues&&(0,g.jsx)(`div`,{className:`px-3 pb-3 gap-1 flex flex-wrap`,children:u.map(e=>{let n=t.customFieldValues?.[e.id];return n==null||n===``?null:(0,g.jsxs)(`div`,{className:`text-xs bg-muted px-1.5 py-0.5 rounded flex items-center gap-1 max-w-full truncate`,children:[(0,g.jsxs)(`span`,{className:`text-muted-foreground opacity-70`,children:[e.name,`:`]}),(0,g.jsx)(`span`,{className:`font-medium truncate`,children:e.type===`date`?P.formatDate(n):String(n)})]},e.id)})})]}),R=f?.cardContent,z=R?(0,g.jsx)(R,{card:t,...p?.cardContent}):L,B=(0,g.jsx)(d.t,{ref:C,style:k,...y,...b,onClick:()=>n?.(t),onDoubleClick:()=>i?.(t),id:t.id,"data-card-id":t.id,className:e._(`cursor-pointer transition-all hover:shadow-md overflow-hidden`,O&&`opacity-50 ring-2 ring-primary/50`,o&&`ring-2 ring-primary bg-primary/5 transition-colors duration-300`,m),children:z}),V=f?.card;return V?(0,g.jsx)(V,{card:t,defaultContent:B,...p?.card}):(0,g.jsx)(l.t,{enabled:s,content:c?c(t):null,children:B})};F.displayName=`KanbanCard`;var I=(0,p.memo)(F),L=({cards:e,estimateSize:t=120,overscan:n=5})=>{let r=(0,p.useRef)(null),i=(0,y.useVirtualizer)({count:e.length,getScrollElement:()=>r.current,estimateSize:()=>t,overscan:n});return{parentRef:r,virtualizer:i,virtualItems:i.getVirtualItems(),totalSize:i.getTotalSize()}},R=({column:n,cards:r,onCardClick:i,onCardDoubleClick:o,onCardDragStart:s,onAddCard:c,onToggleCollapse:l,onDeleteColumn:u,onUpdateColumn:f,onColumnClick:m,selectedColumnId:_,draggedCardId:v,highlightedCardId:y,isDropTarget:b,customFields:C,className:w,dir:T,slots:E,slotProps:D})=>{let O=T===`rtl`,{t:k}=d.c(),[A,j]=p.default.useState(!1),M=E?.card||I,[N,P]=p.default.useState(n.name),F=p.default.useRef(null);p.default.useEffect(()=>{A&&F.current&&(F.current.focus(),F.current.select())},[A]);let R=()=>{N.trim()&&N!==n.name?f?.(n.id,{name:N}):P(n.name),j(!1)},z=e=>{e.key===`Enter`?R():e.key===`Escape`&&(P(n.name),j(!1))},B=n.wipLimit&&r.length>n.wipLimit,V=n.wipLimit&&r.length===n.wipLimit,{setNodeRef:H,attributes:U,listeners:W,transform:G,transition:K,isDragging:q}=(0,S.useSortable)({id:n.id,data:{type:`column`,column:n}});return(0,g.jsxs)(d.t,{ref:H,style:{transform:x.CSS.Translate.toString(G),transition:K},className:e._(`flex flex-col w-80 shrink-0 transition-all duration-200`,_===n.id?`ring-2 ring-primary border-primary`:``,q?`opacity-50`:``,b?`ring-2 ring-primary/70 border-primary/50 bg-primary/5`:``,w),onClick:()=>m?.(n.id),children:[(0,g.jsxs)(d.a,{className:`pb-3`,onDoubleClick:()=>j(!0),children:[(0,g.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2 flex-1`,children:[(0,g.jsx)(`div`,{...U,...W,className:`cursor-grab active:cursor-grabbing p-1 hover:bg-muted rounded text-muted-foreground/50 hover:text-primary transition-colors`,children:(0,g.jsx)(h.MoreHorizontal,{className:`h-4 w-4`})}),(0,g.jsx)(t.t,{variant:`ghost`,size:`sm`,className:`h-6 w-6 p-0`,onClick:()=>l?.(n.id),children:n.isCollapsed?O?(0,g.jsx)(h.ChevronRight,{className:`h-4 w-4 rotate-180`}):(0,g.jsx)(h.ChevronRight,{className:`h-4 w-4`}):(0,g.jsx)(h.ChevronDown,{className:`h-4 w-4`})}),(0,g.jsxs)(`div`,{className:`flex items-center gap-2 flex-1 min-w-0`,children:[A?(0,g.jsx)(`input`,{ref:F,value:N,onChange:e=>P(e.target.value),onBlur:R,onKeyDown:z,className:`h-6 w-full text-sm font-semibold border rounded px-1 bg-background`,onClick:e=>e.stopPropagation()}):(0,g.jsx)(`h3`,{className:`font-semibold text-sm truncate`,title:n.name,children:n.name}),(0,g.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[r.length,` `,k(`items`)]})]})]}),(0,g.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,g.jsxs)(a.t,{children:[(0,g.jsx)(a.h,{asChild:!0,children:(0,g.jsx)(t.t,{variant:`ghost`,size:`sm`,className:`h-6 w-6 p-0`,children:(0,g.jsx)(h.MoreHorizontal,{className:`h-4 w-4`})})}),(0,g.jsx)(a.r,{align:`end`,children:(0,g.jsxs)(a.a,{className:`text-red-600 focus:text-red-600 focus:bg-red-50`,onClick:()=>u?.(n.id),children:[(0,g.jsx)(h.Trash2,{className:`h-4 w-4 me-2`}),k(`delete_column`)||`Delete Column`]})})]}),(0,g.jsx)(t.t,{variant:`ghost`,size:`sm`,className:`h-6 w-6 p-0`,onClick:()=>c?.(n.id),children:(0,g.jsx)(h.Plus,{className:`h-4 w-4`})})]})]}),n.wipLimit&&(0,g.jsx)(`div`,{className:`mt-2`,children:(0,g.jsx)(`div`,{className:`h-1 w-full bg-muted rounded-full overflow-hidden`,children:(0,g.jsx)(`div`,{className:e._(`h-full transition-all`,B?`bg-red-500`:V?`bg-yellow-500`:`bg-green-500`),style:{width:`${Math.min(r.length/n.wipLimit*100,100)}%`}})})})]}),!n.isCollapsed&&(()=>{let t=r.sort((e,t)=>e.position-t.position);if(t.length>50){let{parentRef:e,virtualItems:n,totalSize:r}=L({cards:t,estimateSize:120,overscan:5});return(0,g.jsxs)(d.n,{ref:e,className:`flex-1 overflow-y-auto max-h-[calc(100vh-200px)]`,children:[(0,g.jsx)(`div`,{style:{height:`${r}px`,position:`relative`},children:n.map(e=>{let n=t[e.index];return(0,g.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,width:`100%`,transform:`translateY(${e.start}px)`,paddingBottom:`8px`},children:(0,g.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,width:`100%`,transform:`translateY(${e.start}px)`,paddingBottom:`8px`},children:(0,g.jsx)(M,{card:n,onClick:i,onDoubleClick:o,onDragStart:s,isDragging:v===n.id,isHighlighted:y===n.id,customFields:C,dir:T,...D?.card})},n.id)},n.id)})}),t.length===0&&(0,g.jsx)(`div`,{className:`text-center py-8 text-sm text-muted-foreground`,children:k(`no_cards`)})]})}return(0,g.jsxs)(d.n,{className:`flex-1 overflow-y-auto max-h-[calc(100vh-200px)] space-y-2`,children:[(0,g.jsx)(S.SortableContext,{items:r.map(e=>e.id),strategy:S.verticalListSortingStrategy,children:t.map(e=>(0,g.jsx)(M,{card:e,onClick:i,onDoubleClick:o,onDragStart:s,isDragging:v===e.id,isHighlighted:y===e.id,customFields:C,dir:T,...D?.card},e.id))}),r.length===0&&(0,g.jsx)(`div`,{className:e._(`flex h-32 items-center justify-center rounded-lg border border-dashed text-sm transition-all duration-150`,b?`border-primary/60 bg-primary/5 text-primary/70`:`text-muted-foreground`),children:b?`✦ Drop here`:k(`no_cards`)})]})})()]})},z=({swimlaneId:t,columnId:n,children:r,className:i})=>{let{isOver:a,setNodeRef:o}=(0,v.useDroppable)({id:`swimlane-cell-${t}-${n}`,data:{type:`swimlane-cell`,swimlaneId:t,columnId:n}});return(0,g.jsx)(`div`,{ref:o,className:e._(i,a&&`bg-primary/5 transition-colors`),children:r})},B=({swimlane:n,columns:r,cards:i,onCardClick:a,onCardDoubleClick:o,onCardDragStart:s,onCardDragEnd:c,onToggleCollapse:l,draggedCardId:u,highlightedCardId:f,customFields:p,className:m,dir:_,slots:v,slotProps:y})=>{let b=_===`rtl`,{t:x}=d.c(),S=v?.card||I;return(0,g.jsxs)(`div`,{className:e._(`flex flex-col border rounded-lg bg-card text-card-foreground shadow-sm mb-4`,m),children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2 p-3 border-b bg-muted/30`,children:[(0,g.jsx)(t.t,{variant:`ghost`,size:`sm`,className:`h-6 w-6 p-0`,onClick:()=>l?.(n.id),children:n.isCollapsed?b?(0,g.jsx)(h.ChevronRight,{className:`h-4 w-4 rotate-180`}):(0,g.jsx)(h.ChevronRight,{className:`h-4 w-4`}):(0,g.jsx)(h.ChevronDown,{className:`h-4 w-4`})}),(0,g.jsx)(`h3`,{className:`font-semibold text-sm`,children:n.name}),(0,g.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`(`,i.length,` `,x(`items`),`)`]})]}),!n.isCollapsed&&(0,g.jsx)(`div`,{className:e._(`flex divide-x`,b&&`divide-x-reverse`),children:r.map(e=>{let t=i.filter(t=>t.columnId===e.id);return(0,g.jsx)(z,{swimlaneId:n.id,columnId:e.id,className:`flex-1 min-w-[280px] p-2 min-h-[100px]`,children:(0,g.jsx)(`div`,{className:`space-y-2`,children:t.map(e=>(0,g.jsx)(S,{card:e,onClick:a,onDoubleClick:o,onDragStart:s,onDragEnd:c,isDragging:u===e.id,isHighlighted:f===e.id,customFields:p,dir:_,...y?.card},e.id))})},e.id)})})]})},V=(e,t)=>t.find(t=>t.id===e.columnId)?.color||`hsl(var(--primary))`,H=({cards:e,columns:t,swimlanes:n,onCardUpdate:r,onCardClick:i,onCardCreate:a,className:s,dir:c})=>{let l=(0,p.useMemo)(()=>{let r=[];return n&&n.length>0?(r=n.sort((e,t)=>e.position-t.position).map(e=>({id:e.id,name:e.name,color:e.color})),e.some(e=>!e.swimlaneId)&&r.push({id:`uncategorized`,name:`Uncategorized`,color:`hsl(var(--muted-foreground))`}),r):t.sort((e,t)=>e.position-t.position).map(e=>({id:e.id,name:e.name,color:e.color}))},[n,t,e]),u=(0,p.useMemo)(()=>e.map(e=>{let r=n&&n.length>0?e.swimlaneId||`uncategorized`:e.columnId||`uncategorized`,i=e.startDate?new Date(e.startDate):e.dueDate?(0,b.startOfDay)(new Date(e.dueDate)):(0,b.startOfDay)(new Date),a=e.dueDate?new Date(e.dueDate):(0,b.addDays)(i,1),o=t.find(t=>t.id===e.columnId);return{id:e.id,title:e.title,start:i,end:a,resourceId:r||`uncategorized`,description:e.description,color:V(e,t),status:o?.name,originalCard:e}}),[e,n,t]),d=(0,p.useCallback)(e=>{let i=e.originalCard;if(!i)return;let a={...i,startDate:e.start,dueDate:e.end,...n&&n.length>0?{swimlaneId:e.resourceId}:{columnId:e.resourceId||i.columnId||t[0]?.id||``}};r?.(a,`move`)},[r,n,t]),f=(0,p.useCallback)(e=>{let r=n&&n.length>0,i={title:e.title||`New Card`,startDate:e.start,dueDate:e.end,columnId:!r&&e.resourceId?e.resourceId:t[0]?.id||``,swimlaneId:r&&e.resourceId?e.resourceId:void 0,description:e.description||``,priority:`medium`};a?.(i)},[n,t,a]),m=(0,p.useCallback)(e=>{let t=e.originalCard;t&&i?.(t)},[i]);return(0,g.jsx)(`div`,{className:s,style:{height:`100%`,minHeight:`600px`},children:(0,g.jsx)(o.t,{events:u,resources:l,selectedDate:new Date,view:`TimelineMonth`,views:[`TimelineWeek`,`TimelineMonth`],onEventChange:d,onEventCreate:f,onEventClick:m,showHeaderBar:!0,showResourceHeaders:!0,dir:c})})},U=({board:n,onCardClick:r,onCardDoubleClick:i,onCardDragStart:a,onCardDragEnd:o,onCardDrop:s,onAddCard:c,onToggleColumnCollapse:l,onToggleSwimlaneCollapse:u,onAddColumn:f,onDeleteColumn:m,onUpdateColumn:_,onColumnClick:y,onCreateCard:b,selectedColumnId:x,draggedCardId:C,filteredCards:w,slots:T,slotProps:E,className:D,view:O=`standard`,dir:k})=>{let A=w||n.cards,{t:j}=d.c(),[M,N]=(0,p.useState)(null),[P,F]=(0,p.useState)(null);if(O===`timeline`)return(0,g.jsx)(H,{cards:A,columns:n.columns,swimlanes:n.swimlanes,onCardUpdate:s?async(e,t)=>{t===`move`&&s(e.columnId,e.swimlaneId)}:void 0,onCardClick:r,onCardCreate:b,className:D,dir:k});let I=()=>!n.swimlanes||n.swimlanes.length===0?null:(0,g.jsx)(`div`,{className:e._(`flex flex-col p-4 overflow-y-auto h-full`,D),children:(0,g.jsxs)(S.SortableContext,{items:A.map(e=>e.id),children:[n.swimlanes.sort((e,t)=>e.position-t.position).map(e=>{let t=A.filter(t=>t.swimlaneId===e.id);return(0,g.jsx)(B,{swimlane:e,columns:n.columns.sort((e,t)=>e.position-t.position),cards:t,onCardClick:r,onCardDoubleClick:i,onCardDragStart:a,onCardDragEnd:o,onDrop:s,onToggleCollapse:u,draggedCardId:C,customFields:n.customFields,slots:T,slotProps:E,dir:k},e.id)}),A.some(e=>!e.swimlaneId)&&(0,g.jsx)(B,{swimlane:{id:`uncategorized`,name:j(`uncategorized`),type:`custom`,position:9999,isCollapsed:!1},columns:n.columns.sort((e,t)=>e.position-t.position),cards:A.filter(e=>!e.swimlaneId),onCardClick:r,onCardDoubleClick:i,onCardDragStart:a,onCardDragEnd:o,onDrop:s,onToggleCollapse:()=>{},draggedCardId:C,customFields:n.customFields,slots:T,slotProps:E,dir:k})]})}),L=(0,v.useSensors)((0,v.useSensor)(v.PointerSensor,{activationConstraint:{distance:5}}));return(0,g.jsxs)(v.DndContext,{sensors:L,onDragStart:e=>{let{active:t}=e;t.data.current?.type===`card`&&(N(t.data.current.card),a?.(t.data.current.card))},onDragOver:e=>{let{over:t}=e;if(!t){F(null);return}t.data.current?.type===`column`?F(t.data.current.column.id):t.data.current?.type===`card`?F(t.data.current.card.columnId):t.data.current?.type===`swimlane-cell`?F(t.data.current.columnId):F(null)},onDragEnd:e=>{let{active:t,over:r}=e;if(N(null),F(null),!r){o?.();return}if(t.data.current?.type===`card`){let e,t,i;if(r.data.current?.type===`column`)e=r.data.current.column.id,t=void 0;else if(r.data.current?.type===`swimlane-cell`)e=r.data.current.columnId,i=r.data.current.swimlaneId;else if(r.data.current?.type===`card`){let a=r.data.current.card;e=a.columnId,i=a.swimlaneId;let o=n.cards.filter(t=>t.columnId===e);i&&(o=o.filter(e=>e.swimlaneId===i)),o.sort((e,t)=>(e.position??0)-(t.position??0));let s=o.findIndex(e=>e.id===a.id);t=s>=0?s:void 0}e?s?.(e,i,t):o?.()}else t.data.current?.type===`column`&&r.data.current?.type,o?.()},children:[O===`swimlane`?I():(0,g.jsxs)(`div`,{className:e._(`flex gap-4 overflow-x-auto p-4`,D),children:[(0,g.jsx)(S.SortableContext,{items:n.columns.map(e=>e.id),strategy:S.horizontalListSortingStrategy,children:n.columns.sort((e,t)=>e.position-t.position).map(e=>(0,g.jsx)(R,{column:e,cards:A.filter(t=>t.columnId===e.id),onCardClick:r,onCardDoubleClick:i,onCardDragStart:a,onCardDragEnd:o,onDrop:s,onAddCard:c,onToggleCollapse:l,onDeleteColumn:m,onUpdateColumn:_,onColumnClick:y,selectedColumnId:x,draggedCardId:C,isDropTarget:P===e.id,customFields:n.customFields,slots:T,slotProps:E,dir:k},e.id))}),f&&(0,g.jsx)(`div`,{className:`w-80 shrink-0`,children:(0,g.jsxs)(t.t,{variant:`outline`,className:`w-full h-12 border-dashed`,onClick:f,children:[(0,g.jsx)(h.Plus,{className:`me-2 h-4 w-4`}),j(`add_column`)||`Add Column`]})})]}),(0,g.jsx)(v.DragOverlay,{dropAnimation:{duration:200,easing:`ease`},children:M?(0,g.jsx)(`div`,{className:`rotate-2 opacity-90 shadow-2xl ring-2 ring-primary/60 rounded-lg pointer-events-none w-72`,children:(0,g.jsxs)(`div`,{className:`bg-card border border-border rounded-lg p-3 space-y-1`,children:[(0,g.jsx)(`p`,{className:`font-medium text-sm`,children:M.title}),M.description&&(0,g.jsx)(`p`,{className:`text-xs text-muted-foreground line-clamp-2`,children:M.description})]})}):null})]})};Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return D}});
|
|
1
|
+
const e=require("./EzProvider-L2qQMq-v.cjs"),t=require("./button-BBMwzUtG.cjs"),n=require("./input-DOh8O0iX.cjs"),r=require("./avatar-BSdRHETK.cjs"),i=require("./label-BGgvoZWD.cjs"),a=require("./dropdown-menu-BRP0tyR_.cjs"),o=require("./card-NlCLCGFb.cjs"),s=require("./EzScheduler-hC9PsLrI.cjs"),c=require("./select-sVieKbLu.cjs"),l=require("./checkbox-B9yPkCYi.cjs"),u=require("./TooltipWrapper-DfbFAZ1U.cjs"),d=require("./Modal-BmX1C448.cjs"),f=require("./date-time-picker-D0w0sDgq.cjs");let p=require("react");p=e.y(p,1);let m=require("class-variance-authority"),h=require("lucide-react"),g=require("react/jsx-runtime"),_=require("@tanstack/react-form"),v=require("@tanstack/react-virtual"),y=require("@dnd-kit/core"),b=require("date-fns"),x=require("@dnd-kit/utilities"),S=require("@dnd-kit/sortable");var C=(0,m.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 w({className:t,variant:n,...r}){return(0,g.jsx)(`div`,{className:e._(C({variant:n}),t),...r})}var T=p.createContext(void 0);function E({className:t,defaultValue:n,value:r,onValueChange:i,children:a,ref:o,...s}){let[c,l]=p.useState(n||``),u=r!==void 0,d=u?r:c,f=p.useCallback(e=>{u||l(e),i?.(e)},[u,i]);return(0,g.jsx)(T.Provider,{value:{value:d,onValueChange:f},children:(0,g.jsx)(`div`,{ref:o,className:e._(t),...s,children:a})})}function D({className:t,ref:n,...r}){return(0,g.jsx)(`div`,{ref:n,className:e._(`inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground`,t),...r})}function O({className:t,value:n,onClick:r,ref:i,...a}){let o=p.useContext(T);if(!o)throw Error(`TabsTrigger must be used within Tabs`);return(0,g.jsx)(`button`,{ref:i,type:`button`,className:e._(`inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50`,o.value===n&&`bg-background text-foreground shadow-sm`,t),onClick:e=>{o.onValueChange(n),r?.(e)},...a})}function k({className:t,value:n,children:r,ref:i,...a}){let o=p.useContext(T);if(!o)throw Error(`TabsContent must be used within Tabs`);return o.value===n?(0,g.jsx)(`div`,{ref:i,className:e._(`mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`,t),...a,children:r}):null}var A=({isOpen:e,onClose:a,onSave:s,onDelete:u,card:m,columns:v=[],columnId:y,customFields:b=[],currentUser:x={id:`current-user`,name:`Current User`}})=>{let{t:S}=o.c(),C=()=>typeof crypto<`u`&&crypto.randomUUID?crypto.randomUUID():`id-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,w=(0,_.useForm)({defaultValues:{title:m?.title||``,description:m?.description||``,columnId:m?.columnId||y||v[0]?.id||``,priority:m?.priority||`medium`,startDate:m?.startDate?new Date(m.startDate):void 0,dueDate:m?.dueDate?new Date(m.dueDate):void 0,checklists:m?.checklists||[],attachments:m?.attachments||[],comments:m?.comments||[],coverImage:m?.coverImage||``,customFieldValues:m?.customFieldValues||{},subtasks:m?.subtasks||[],timeTracking:m?.timeTracking||{estimated:0,actual:0},activity:m?.activity||[],assignees:m?.assignees||[],tags:m?.tags||[],...m},onSubmit:async({value:e})=>{s(e),a()}});(0,p.useEffect)(()=>{},[e,m]);let T=()=>{m?.id&&u&&u(m.id)},[A,j]=(0,p.useState)({}),M=()=>{let e={id:C(),title:`Checklist`,items:[]};w.pushFieldValue(`checklists`,e)},N=(e,t)=>{j(n=>({...n,[e]:t}))},P=e=>{let t=A[e]?.trim();if(!t)return;let n=(w.getFieldValue(`checklists`)||[]).map(n=>n.id===e?{...n,items:[...n.items,{id:C(),text:t,isChecked:!1}]}:n);w.setFieldValue(`checklists`,n),j(t=>({...t,[e]:``}))},F=(e,t)=>{let n=(w.getFieldValue(`checklists`)||[]).map(n=>n.id===e?{...n,items:n.items.map(e=>e.id===t?{...e,isChecked:!e.isChecked}:e)}:n);w.setFieldValue(`checklists`,n)},[I,L]=(0,p.useState)(``),[R,z]=(0,p.useState)(null),[B,V]=(0,p.useState)(``),[H,U]=(0,p.useState)(null),W=()=>{if(!I.trim())return;let e={id:C(),text:I,authorId:x.id,authorName:x.name,createdAt:new Date};w.pushFieldValue(`comments`,e),L(``);let t={id:C(),type:`comment`,text:`commented "${I.slice(0,20)}${I.length>20?`...`:``}"`,userId:x.id,userName:x.name,createdAt:new Date};w.pushFieldValue(`activity`,t)},G=e=>{z(e.id),V(e.text)},K=()=>{if(R&&B.trim()){let e=(w.getFieldValue(`comments`)||[]).map(e=>e.id===R?{...e,text:B}:e);w.setFieldValue(`comments`,e),z(null),V(``)}},q=()=>{z(null),V(``)},ee=e=>{U(e)},te=()=>{U(null)},ne=e=>{let t=w.getFieldValue(`comments`)||[];w.setFieldValue(`comments`,t.filter(t=>t.id!==e)),U(null);let n={id:C(),type:`delete`,text:`deleted a comment`,userId:x.id,userName:x.name,createdAt:new Date};w.pushFieldValue(`activity`,n)},[J,Y]=(0,p.useState)(``),X=()=>{if(!J.trim())return;let e={id:C(),title:J,isCompleted:!1};w.pushFieldValue(`subtasks`,e),Y(``)},re=e=>{let t=(w.getFieldValue(`subtasks`)||[]).map(t=>t.id===e?{...t,isCompleted:!t.isCompleted}:t);w.setFieldValue(`subtasks`,t)},ie=e=>{let t=w.getFieldValue(`subtasks`)||[];w.setFieldValue(`subtasks`,t.filter(t=>t.id!==e))},Z=p.default.useRef(null),[Q,ae]=(0,p.useState)(!1),[oe,se]=(0,p.useState)(null),ce=async e=>{let t=e.target.files?.[0];if(!t)return;ae(!0),se(null),await new Promise(e=>setTimeout(e,1500));let n={id:C(),name:t.name,url:URL.createObjectURL(t),type:t.type.startsWith(`image/`)?`image`:`file`,size:t.size,uploadedAt:new Date};w.pushFieldValue(`attachments`,n),ae(!1),Z.current&&(Z.current.value=``);let r={id:C(),type:`attachment`,text:`attached ${t.name}`,userId:x.id,userName:x.name,createdAt:new Date};w.pushFieldValue(`activity`,r)},le=e=>{let t=w.getFieldValue(`attachments`)||[];w.setFieldValue(`attachments`,t.filter(t=>t.id!==e));let n={id:C(),type:`delete`,text:`removed an attachment`,userId:x.id,userName:x.name,createdAt:new Date};w.pushFieldValue(`activity`,n)},$=!!m?.id,ue=e=>{e.preventDefault(),e.stopPropagation(),w.handleSubmit()},de=(0,g.jsxs)(`div`,{className:`space-y-6`,children:[(0,g.jsx)(`div`,{className:`flex items-start justify-between gap-4`,children:(0,g.jsxs)(`div`,{className:`flex-1 space-y-4`,children:[(0,g.jsx)(w.Field,{name:`title`,children:e=>(0,g.jsxs)(`div`,{className:`space-y-2`,children:[(0,g.jsx)(i.t,{htmlFor:`title`,className:`text-right`,children:S(`common.title`)}),(0,g.jsx)(n.t,{id:`title`,value:e.state.value,onChange:t=>e.handleChange(t.target.value),placeholder:S(`kanban.cardTitlePlaceholder`),className:`text-lg font-semibold`})]})}),(0,g.jsxs)(`div`,{className:`flex gap-4 items-center`,children:[(0,g.jsx)(`div`,{className:`w-[200px]`,children:(0,g.jsx)(w.Field,{name:`columnId`,children:e=>(0,g.jsxs)(c.t,{value:e.state.value,onValueChange:t=>e.handleChange(t),children:[(0,g.jsx)(c.i,{children:(0,g.jsx)(c.a,{placeholder:`Status`})}),(0,g.jsx)(c.n,{children:v.map(e=>(0,g.jsx)(c.r,{value:e.id,children:e.name},e.id))})]})})}),$&&(0,g.jsxs)(`span`,{className:`text-sm text-muted-foreground font-mono`,children:[`#`,m?.id?.slice(0,8)]})]})]})}),(0,g.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-4`,children:[(0,g.jsx)(w.Field,{name:`priority`,children:e=>(0,g.jsxs)(`div`,{className:`space-y-2`,children:[(0,g.jsx)(i.t,{children:`Priority`}),(0,g.jsxs)(c.t,{value:e.state.value,onValueChange:t=>e.handleChange(t),children:[(0,g.jsx)(c.i,{children:(0,g.jsx)(c.a,{placeholder:`Priority`})}),(0,g.jsxs)(c.n,{children:[(0,g.jsx)(c.r,{value:`low`,children:`Low`}),(0,g.jsx)(c.r,{value:`medium`,children:`Medium`}),(0,g.jsx)(c.r,{value:`high`,children:`High`}),(0,g.jsx)(c.r,{value:`critical`,children:`Critical`})]})]})]})}),(0,g.jsx)(w.Field,{name:`startDate`,children:e=>(0,g.jsxs)(`div`,{className:`space-y-2`,children:[(0,g.jsx)(i.t,{children:`Start Date`}),(0,g.jsx)(f.t,{date:e.state.value,setDate:t=>e.handleChange(t),mode:`date`})]})}),(0,g.jsx)(w.Field,{name:`dueDate`,children:e=>(0,g.jsxs)(`div`,{className:`space-y-2`,children:[(0,g.jsx)(i.t,{children:`Due Date`}),(0,g.jsx)(f.t,{date:e.state.value,setDate:t=>e.handleChange(t),mode:`date`})]})})]}),(0,g.jsx)(w.Field,{name:`description`,children:e=>(0,g.jsxs)(`div`,{className:`space-y-2`,children:[(0,g.jsx)(i.t,{children:`Description`}),(0,g.jsx)(o.s,{value:e.state.value||``,onChange:t=>e.handleChange(t.target.value),className:`min-h-[150px]`})]})}),b.length>0&&(0,g.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-4 border-t pt-4`,children:b.map(e=>(0,g.jsx)(w.Field,{name:`customFieldValues.${e.id}`,children:t=>(0,g.jsxs)(`div`,{className:`space-y-2`,children:[(0,g.jsx)(i.t,{children:e.name}),e.type===`text`&&(0,g.jsx)(n.t,{value:t.state.value||``,onChange:e=>t.handleChange(e.target.value)}),e.type===`number`&&(0,g.jsx)(n.t,{type:`number`,value:t.state.value||``,onChange:e=>t.handleChange(Number(e.target.value))}),e.type===`date`&&(0,g.jsx)(f.t,{date:t.state.value,setDate:e=>t.handleChange(e),mode:`date`}),e.type===`select`&&(0,g.jsxs)(c.t,{value:t.state.value||``,onValueChange:e=>t.handleChange(e),children:[(0,g.jsx)(c.i,{children:(0,g.jsx)(c.a,{placeholder:`Select...`})}),(0,g.jsx)(c.n,{children:e.options?.map(e=>(0,g.jsx)(c.r,{value:e,children:e},e))})]}),e.type===`checkbox`&&(0,g.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[(0,g.jsx)(l.t,{checked:!!t.state.value,onCheckedChange:e=>t.handleChange(!!e)}),(0,g.jsx)(`span`,{className:`text-sm font-medium`,children:e.name})]})]})},e.id))}),(0,g.jsxs)(E,{defaultValue:`subtasks`,className:`w-full`,children:[(0,g.jsxs)(D,{className:`grid w-full grid-cols-5`,children:[(0,g.jsx)(O,{value:`subtasks`,children:`Subtasks`}),(0,g.jsx)(O,{value:`checklists`,children:`Checklists`}),(0,g.jsx)(O,{value:`attachments`,children:`Attachments`}),(0,g.jsx)(O,{value:`comments`,children:`Comments`}),(0,g.jsx)(O,{value:`activity`,children:`Activity`})]}),(0,g.jsxs)(k,{value:`subtasks`,className:`space-y-4 pt-4`,children:[(0,g.jsx)(w.Field,{name:`subtasks`,children:e=>(0,g.jsxs)(`div`,{className:`space-y-2`,children:[e.state.value?.map(e=>(0,g.jsxs)(`div`,{className:`flex items-center gap-2 border p-3 rounded-md`,children:[(0,g.jsx)(l.t,{checked:e.isCompleted,onCheckedChange:()=>re(e.id)}),(0,g.jsx)(`span`,{className:e.isCompleted?`line-through text-muted-foreground flex-1`:`flex-1`,children:e.title}),(0,g.jsx)(t.t,{variant:`ghost`,size:`icon`,onClick:()=>ie(e.id),children:(0,g.jsx)(h.X,{className:`w-4 h-4`})})]},e.id)),(!e.state.value||e.state.value.length===0)&&(0,g.jsx)(`div`,{className:`text-center py-8 text-muted-foreground border border-dashed rounded-lg`,children:`No subtasks yet.`})]})}),(0,g.jsxs)(`div`,{className:`flex gap-2`,children:[(0,g.jsx)(n.t,{value:J,onChange:e=>Y(e.target.value),placeholder:`Add a subtask...`,onKeyDown:e=>e.key===`Enter`&&X()}),(0,g.jsx)(t.t,{onClick:X,disabled:!J.trim(),children:`Add`})]})]}),(0,g.jsxs)(k,{value:`checklists`,className:`space-y-4 pt-4`,children:[(0,g.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,g.jsx)(`h3`,{className:`font-medium`,children:`Checklists`}),(0,g.jsxs)(t.t,{size:`sm`,onClick:M,variant:`outline`,children:[(0,g.jsx)(h.Plus,{className:`w-4 h-4 mr-2`}),` Add Checklist`]})]}),(0,g.jsx)(w.Field,{name:`checklists`,children:e=>(0,g.jsxs)(`div`,{className:`space-y-4`,children:[e.state.value?.map(e=>{let r=e.items.length>0?Math.round(e.items.filter(e=>e.isChecked).length/e.items.length*100):0;return(0,g.jsxs)(`div`,{className:`border rounded-md p-4 space-y-3`,children:[(0,g.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,g.jsx)(`div`,{className:`font-medium`,children:e.title}),(0,g.jsxs)(`div`,{className:`text-xs text-muted-foreground`,children:[r,`%`]})]}),(0,g.jsx)(`div`,{className:`h-2 w-full bg-muted rounded-full overflow-hidden`,children:(0,g.jsx)(`div`,{className:`h-full bg-primary transition-all`,style:{width:`${r}%`}})}),(0,g.jsx)(`div`,{className:`space-y-2`,children:e.items.map(t=>(0,g.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,g.jsx)(l.t,{checked:t.isChecked,onCheckedChange:()=>F(e.id,t.id)}),(0,g.jsx)(`span`,{className:t.isChecked?`line-through text-muted-foreground`:``,children:t.text})]},t.id))}),(0,g.jsxs)(`div`,{className:`pt-2 flex gap-2`,children:[(0,g.jsx)(n.t,{placeholder:`Add an item...`,className:`h-8 text-sm`,value:A[e.id]||``,onChange:t=>N(e.id,t.target.value),onKeyDown:t=>t.key===`Enter`&&P(e.id)}),(0,g.jsx)(t.t,{size:`sm`,onClick:()=>P(e.id),disabled:!A[e.id]?.trim(),children:`Add`})]})]},e.id)}),(!e.state.value||e.state.value.length===0)&&(0,g.jsx)(`div`,{className:`text-center py-8 text-muted-foreground border border-dashed rounded-lg`,children:`No checklists yet.`})]})})]}),(0,g.jsxs)(k,{value:`attachments`,className:`space-y-4 pt-4`,children:[(0,g.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,g.jsx)(`h3`,{className:`font-medium`,children:`Attachments`}),(0,g.jsx)(`input`,{type:`file`,className:`hidden`,ref:Z,onChange:ce}),(0,g.jsxs)(`div`,{className:`flex items-center gap-2`,children:[oe&&(0,g.jsx)(`span`,{className:`text-xs text-red-500`,children:oe}),(0,g.jsxs)(t.t,{size:`sm`,variant:`outline`,onClick:()=>Z.current?.click(),disabled:Q,children:[Q?(0,g.jsx)(h.Loader2,{className:`w-4 h-4 mr-2 animate-spin`}):(0,g.jsx)(h.Paperclip,{className:`w-4 h-4 mr-2`}),Q?`Uploading...`:`Upload`]})]})]}),(0,g.jsx)(w.Field,{name:`attachments`,children:e=>(0,g.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[e.state.value?.map(e=>(0,g.jsxs)(`div`,{className:`border p-2 rounded flex items-center gap-2`,children:[(0,g.jsx)(`div`,{className:`w-10 h-10 bg-muted flex items-center justify-center rounded`,children:(0,g.jsx)(h.Image,{className:`w-5 h-5 text-muted-foreground`})}),(0,g.jsxs)(`div`,{className:`overflow-hidden`,children:[(0,g.jsx)(`div`,{className:`truncate font-medium text-sm`,children:e.name}),(0,g.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:e.type})]}),(0,g.jsx)(t.t,{variant:`ghost`,size:`icon`,className:`ml-auto`,onClick:()=>le(e.id),children:(0,g.jsx)(h.X,{className:`w-4 h-4 text-muted-foreground`})})]},e.id)),(!e.state.value||e.state.value.length===0)&&!Q&&(0,g.jsx)(`div`,{className:`text-center py-8 text-muted-foreground border border-dashed rounded-lg`,children:`No attachments yet.`})]})})]}),(0,g.jsxs)(k,{value:`comments`,className:`space-y-4 pt-4`,children:[(0,g.jsx)(w.Field,{name:`comments`,children:e=>(0,g.jsxs)(`div`,{className:`space-y-4`,children:[e.state.value?.map(e=>(0,g.jsxs)(`div`,{className:`flex gap-3`,children:[(0,g.jsx)(r.t,{className:`w-8 h-8`,children:(0,g.jsx)(r.n,{children:e.authorName[0]})}),(0,g.jsxs)(`div`,{className:`space-y-1 w-full`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,g.jsx)(`span`,{className:`font-semibold text-sm`,children:e.authorName}),(0,g.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:new Date(e.createdAt).toLocaleString()})]}),R===e.id?(0,g.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,g.jsx)(o.s,{value:B,onChange:e=>V(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)?K():e.key===`Escape`&&q()},autoFocus:!0}),(0,g.jsxs)(`div`,{className:`flex gap-2 justify-end`,children:[(0,g.jsx)(t.t,{size:`sm`,variant:`ghost`,onClick:q,children:`Cancel`}),(0,g.jsx)(t.t,{size:`sm`,onClick:K,children:`Save`})]})]}):(0,g.jsx)(`div`,{className:`text-sm bg-muted/50 p-2 rounded-md`,children:e.text}),H===e.id&&(0,g.jsxs)(`div`,{className:`flex items-center gap-2 p-2 bg-red-50 text-red-800 rounded-md text-sm mt-2`,children:[(0,g.jsx)(h.AlertTriangle,{className:`w-4 h-4`}),(0,g.jsx)(`span`,{className:`flex-1`,children:`Delete this comment?`}),(0,g.jsx)(t.t,{size:`sm`,variant:`ghost`,className:`h-6 px-2 hover:bg-red-100 text-red-800`,onClick:te,children:`No`}),(0,g.jsx)(t.t,{size:`sm`,variant:`destructive`,className:`h-6 px-2`,onClick:()=>ne(e.id),children:`Yes`})]})]}),(0,g.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,g.jsx)(t.t,{variant:`ghost`,size:`icon`,className:`h-6 w-6`,onClick:()=>G(e),disabled:!!H,children:(0,g.jsx)(h.Edit2,{className:`w-3 h-3 text-muted-foreground`})}),(0,g.jsx)(t.t,{variant:`ghost`,size:`icon`,className:`h-6 w-6`,onClick:()=>ee(e.id),disabled:!!H,children:(0,g.jsx)(h.Trash2,{className:`w-3 h-3 text-muted-foreground`})})]})]},e.id)),(!e.state.value||e.state.value.length===0)&&(0,g.jsx)(`div`,{className:`text-center py-8 text-muted-foreground`,children:`No comments yet.`})]})}),(0,g.jsx)(`div`,{className:`pt-4 border-t sticky bottom-0 bg-background`,children:(0,g.jsxs)(`div`,{className:`flex gap-2`,children:[(0,g.jsx)(r.t,{className:`w-8 h-8`,children:(0,g.jsx)(r.n,{children:x?.name?.[0]||`U`})}),(0,g.jsxs)(`div`,{className:`flex-1 space-y-2`,children:[(0,g.jsx)(o.s,{value:I,onChange:e=>L(e.target.value),placeholder:`Write a comment...`,rows:2}),(0,g.jsx)(`div`,{className:`flex justify-end`,children:(0,g.jsx)(t.t,{size:`sm`,onClick:W,disabled:!I.trim(),children:`Send`})})]})]})})]}),(0,g.jsx)(k,{value:`activity`,className:`space-y-4 pt-4`,children:(0,g.jsx)(w.Field,{name:`activity`,children:e=>(0,g.jsxs)(`div`,{className:`space-y-4`,children:[e.state.value?.map(e=>(0,g.jsxs)(`div`,{className:`flex gap-3 text-sm`,children:[(0,g.jsx)(`div`,{className:`mt-1`,children:(0,g.jsx)(h.Activity,{className:`w-4 h-4 text-muted-foreground`})}),(0,g.jsxs)(`div`,{children:[(0,g.jsx)(`span`,{className:`font-semibold`,children:e.userName}),` `,(0,g.jsx)(`span`,{className:`text-muted-foreground`,children:e.text}),(0,g.jsx)(`div`,{className:`text-xs text-muted-foreground mt-1`,children:new Date(e.createdAt).toLocaleString()})]})]},e.id)),(!e.state.value||e.state.value.length===0)&&(0,g.jsx)(`div`,{className:`text-center py-8 text-muted-foreground`,children:`No activity yet.`})]})})})]})]});return(0,g.jsxs)(d.t,{isOpen:e,onClose:a,title:$?`Edit Card`:`New Card`,className:`sm:max-w-[800px] h-[85vh] flex flex-col`,children:[(0,g.jsx)(`div`,{className:`flex-1 overflow-y-auto pr-2`,children:de}),(0,g.jsxs)(`div`,{className:`flex justify-between pt-4 border-t mt-4`,children:[$&&(0,g.jsx)(t.t,{variant:`destructive`,onClick:T,children:`Delete Card`}),(0,g.jsxs)(`div`,{className:`flex gap-2 ml-auto`,children:[(0,g.jsx)(t.t,{variant:`outline`,onClick:a,children:`Cancel`}),(0,g.jsx)(t.t,{onClick:e=>ue(e),children:`Save`})]})]})]})},j={Active:{color:`emerald`,label:`Active`,icon:h.CheckCircle2},Verified:{color:`emerald`,label:`Verified`,icon:h.CheckCircle2},Approved:{color:`emerald`,label:`Approved`,icon:h.CheckCircle2},Published:{color:`teal`,label:`Published`,icon:h.CheckCircle2},Resolved:{color:`teal`,label:`Resolved`,icon:h.CheckCircle2},Completed:{color:`indigo`,label:`Completed`,icon:h.CheckCircle2},"In Progress":{color:`sky`,label:`In Progress`,icon:h.PlayCircle},Open:{color:`sky`,label:`Open`,icon:h.Unlock},Pending:{color:`amber`,label:`Pending`,icon:h.Clock},"Under Review":{color:`amber`,label:`Under Review`,icon:h.FileText},Scheduled:{color:`orange`,label:`Scheduled`,icon:h.Clock},Returned:{color:`orange`,label:`Returned`,icon:h.RefreshCcw},Rejected:{color:`red`,label:`Rejected`,icon:h.XCircle},Disapproved:{color:`red`,label:`Disapproved`,icon:h.XCircle},Unresolved:{color:`red`,label:`Unresolved`,icon:h.AlertCircle},Expired:{color:`red`,label:`Expired`,icon:h.StopCircle},Cancelled:{color:`rose`,label:`Cancelled`,icon:h.XCircle},Unverified:{color:`rose`,label:`Unverified`,icon:h.HelpCircle},Inactive:{color:`slate`,label:`Inactive`,icon:h.XCircle},"On Leave":{color:`blue`,label:`On Leave`,icon:h.Clock},Archived:{color:`gray`,label:`Archived`,icon:h.Archive},Draft:{color:`gray`,label:`Draft`,icon:h.FileText},Closed:{color:`gray`,label:`Closed`,icon:h.Lock},Public:{color:`blue`,label:`Public`,icon:h.Globe},Private:{color:`slate`,label:`Private`,icon:h.Lock},Restricted:{color:`amber`,label:`Restricted`,icon:h.ShieldAlert},Internal:{color:`indigo`,label:`Internal`,icon:h.Users},External:{color:`blue`,label:`External`,icon:h.Globe},System:{color:`violet`,label:`System`,icon:h.Settings},Default:{color:`gray`,label:`Default`,icon:h.HelpCircle}},M={none:`none`,low:`0 0 10px -5px`,medium:`0 0 20px -8px`,high:`0 0 30px -4px`},N=(0,p.memo)(({status:t,className:n,showDot:r=!1,showIcon:i=!1,iconPosition:a=`left`,hideLabel:o=!1,showTooltip:s=!0,variant:c=`solid`,customWidth:l,customHeight:u,customFontSize:d=`11px`,customBgColor:f,customTextColor:p,showBorder:m=!1,borderThickness:h=`1px`,customBorderColor:_,glowIntensity:v=`medium`})=>{let y=j[t]||j.Default,b=y.color,x=y.icon,S=b===`gray`||b===`slate`;return(0,g.jsxs)(`div`,{style:{width:l||void 0,height:u||void 0,fontSize:d,backgroundColor:f||void 0,color:p||void 0,borderWidth:m?h:`0px`,borderColor:_||(m?`currentColor`:`transparent`),borderStyle:m?`solid`:`none`,boxShadow:v!==`none`&&!f?`${M[v]} var(--tw-shadow-color)`:void 0},title:s?y.label:void 0,className:e._(`inline-flex items-center justify-center gap-2 transition-all duration-300 rounded-full font-bold`,o?`p-1.5 w-[28px] h-[28px]`:`px-3 py-1`,!l&&!o&&`min-w-[120px]`,!u&&!o&&`min-h-[28px]`,!f&&(c===`solid`?`bg-${b}-100`:`bg-transparent`),!p&&`text-${b}-950`,!f&&`dark:bg-${b}-300`,!p&&(S?`dark:text-white dark:bg-gray-800`:`dark:text-black`),`shadow-${b}-500/40`,s&&`cursor-help`,n),children:[a===`left`&&i&&(0,g.jsx)(x,{className:e._(`shrink-0 stroke-[3px]`,o?`w-4 h-4`:`w-3.5 h-3.5`)}),r&&!i&&!o&&(0,g.jsx)(`span`,{className:e._(`w-1.5 h-1.5 rounded-full flex-shrink-0`,`bg-${b}-700`,S?`dark:bg-white`:`dark:bg-black/70`)}),!o&&(0,g.jsx)(`span`,{className:`uppercase tracking-widest font-black leading-none`,children:y.label}),a===`right`&&i&&(0,g.jsx)(x,{className:e._(`shrink-0 stroke-[3px]`,o?`w-4 h-4`:`w-3.5 h-3.5`)})]})});N.displayName=`StatusBadge`;var P={formatDate:(e,t=`PP`)=>{if(!e)return``;let n=new Date(e);return(0,b.isValid)(n)?(0,b.format)(n,t):``},formatDateTime:(e,t=`PP p`)=>{if(!e)return``;let n=new Date(e);return(0,b.isValid)(n)?(0,b.format)(n,t):``},isValidDate:e=>(0,b.isValid)(new Date(e))},F=({card:t,onClick:n,onDoubleClick:i,isDragging:a,isHighlighted:s,enableTooltip:c,tooltipTemplate:l,customFields:d,slots:f,slotProps:p,className:m,dir:_})=>{let v=_===`rtl`,{attributes:y,listeners:b,setNodeRef:C,transform:T,transition:E,isDragging:D}=(0,S.useSortable)({id:t.id,data:{type:`card`,card:t}}),O=a||D,k={transform:x.CSS.Translate.toString(T),transition:E},A={low:`Pending`,medium:`In Progress`,high:`Active`,critical:`Inactive`},j=t.checklists?.reduce((e,t)=>e+t.items.length,0)||0,M=t.checklists?.reduce((e,t)=>e+t.items.filter(e=>e.isChecked).length,0)||0,F=t.subtasks?.length||0,I=t.subtasks?.filter(e=>e.isCompleted).length||0,L=(0,g.jsxs)(`div`,{className:`p-0 space-y-2`,children:[t.coverImage&&(0,g.jsx)(`div`,{className:`h-32 w-full overflow-hidden rounded-t-lg`,children:(0,g.jsx)(`img`,{src:t.coverImage,alt:`Cover`,className:`w-full h-full object-cover`})}),(0,g.jsxs)(`div`,{className:e._(`p-3 space-y-2`,t.coverImage?`pt-1`:``),children:[(0,g.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,g.jsx)(`h4`,{className:`font-medium text-sm line-clamp-2 flex-1`,children:t.title}),t.priority&&(0,g.jsx)(N,{status:A[t.priority]||`Pending`,className:`shrink-0`})]}),t.description&&(0,g.jsx)(`p`,{className:`text-xs text-muted-foreground line-clamp-2`,children:t.description}),t.tags&&t.tags.length>0&&(0,g.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:t.tags.map(e=>(0,g.jsx)(w,{variant:`secondary`,className:`text-xs px-2 py-0`,style:{backgroundColor:e.color,color:`#fff`},children:e.name},e.id))}),(j>0||t.attachments&&t.attachments.length>0||t.comments&&t.comments.length>0||F>0||t.timeTracking)&&(0,g.jsxs)(`div`,{className:`flex items-center gap-3 text-muted-foreground pt-1 flex-wrap`,children:[t.attachments&&t.attachments.length>0&&(0,g.jsxs)(`div`,{className:`flex items-center gap-1 text-xs`,children:[(0,g.jsx)(h.Paperclip,{className:`w-3 h-3`}),(0,g.jsx)(`span`,{children:t.attachments.length})]}),t.comments&&t.comments.length>0&&(0,g.jsxs)(`div`,{className:`flex items-center gap-1 text-xs`,children:[(0,g.jsx)(h.MessageSquare,{className:`w-3 h-3`}),(0,g.jsx)(`span`,{children:t.comments.length})]}),j>0&&(0,g.jsxs)(`div`,{className:`flex items-center gap-1 text-xs`,children:[(0,g.jsx)(h.CheckSquare,{className:`w-3 h-3`}),(0,g.jsxs)(`span`,{children:[M,`/`,j]})]}),F>0&&(0,g.jsxs)(`div`,{className:`flex items-center gap-1 text-xs`,children:[(0,g.jsx)(h.List,{className:`w-3 h-3`}),(0,g.jsxs)(`span`,{children:[I,`/`,F]})]}),t.timeTracking&&(t.timeTracking.estimated>0||t.timeTracking.actual>0)&&(0,g.jsxs)(`div`,{className:`flex items-center gap-1 text-xs`,title:`Estimated: ${t.timeTracking.estimated}h, Actual: ${t.timeTracking.actual}h`,children:[(0,g.jsx)(h.Clock,{className:`w-3 h-3`}),(0,g.jsxs)(`span`,{children:[t.timeTracking.actual,`h / `,t.timeTracking.estimated,`h`]})]})]}),(0,g.jsxs)(`div`,{className:`flex items-center justify-between pt-1`,children:[t.assignees&&t.assignees.length>0&&(0,g.jsxs)(`div`,{className:`flex -space-x-2`,children:[t.assignees.slice(0,3).map(e=>(0,g.jsx)(r.t,{className:`w-6 h-6 border-2 border-background`,children:e.avatarUrl?(0,g.jsx)(r.r,{src:e.avatarUrl,alt:e.name}):(0,g.jsx)(r.n,{className:`text-xs`,children:e.name.substring(0,2).toUpperCase()})},e.id)),t.assignees.length>3&&(0,g.jsx)(`div`,{className:`w-6 h-6 rounded-full bg-muted border-2 border-background flex items-center justify-center`,children:(0,g.jsxs)(`span`,{className:`text-xs`,children:[`+`,t.assignees.length-3]})})]}),t.dueDate&&(0,g.jsxs)(`div`,{className:e._(`flex items-center gap-1 text-xs text-muted-foreground`,v?`mr-auto`:`ml-auto`),children:[(0,g.jsx)(h.Calendar,{className:`w-3 h-3`}),(0,g.jsx)(`span`,{children:P.formatDate(t.dueDate)})]})]})]}),d&&d.length>0&&t.customFieldValues&&(0,g.jsx)(`div`,{className:`px-3 pb-3 gap-1 flex flex-wrap`,children:d.map(e=>{let n=t.customFieldValues?.[e.id];return n==null||n===``?null:(0,g.jsxs)(`div`,{className:`text-xs bg-muted px-1.5 py-0.5 rounded flex items-center gap-1 max-w-full truncate`,children:[(0,g.jsxs)(`span`,{className:`text-muted-foreground opacity-70`,children:[e.name,`:`]}),(0,g.jsx)(`span`,{className:`font-medium truncate`,children:e.type===`date`?P.formatDate(n):String(n)})]},e.id)})})]}),R=f?.cardContent,z=R?(0,g.jsx)(R,{card:t,...p?.cardContent}):L,B=(0,g.jsx)(o.t,{ref:C,style:k,...y,...b,onClick:()=>n?.(t),onDoubleClick:()=>i?.(t),id:t.id,"data-card-id":t.id,className:e._(`cursor-pointer transition-all hover:shadow-md overflow-hidden`,O&&`opacity-50 ring-2 ring-primary/50`,s&&`ring-2 ring-primary bg-primary/5 transition-colors duration-300`,m),children:z}),V=f?.card;return V?(0,g.jsx)(V,{card:t,defaultContent:B,...p?.card}):(0,g.jsx)(u.t,{enabled:c,content:l?l(t):null,children:B})};F.displayName=`KanbanCard`;var I=(0,p.memo)(F),L=({cards:e,estimateSize:t=120,overscan:n=5})=>{let r=(0,p.useRef)(null),i=(0,v.useVirtualizer)({count:e.length,getScrollElement:()=>r.current,estimateSize:()=>t,overscan:n});return{parentRef:r,virtualizer:i,virtualItems:i.getVirtualItems(),totalSize:i.getTotalSize()}},R=({column:n,cards:r,onCardClick:i,onCardDoubleClick:s,onCardDragStart:c,onAddCard:l,onToggleCollapse:u,onDeleteColumn:d,onUpdateColumn:f,onColumnClick:m,selectedColumnId:_,draggedCardId:v,highlightedCardId:y,isDropTarget:b,customFields:C,className:w,dir:T,slots:E,slotProps:D})=>{let O=T===`rtl`,{t:k}=o.c(),[A,j]=p.default.useState(!1),M=E?.card||I,[N,P]=p.default.useState(n.name),F=p.default.useRef(null);p.default.useEffect(()=>{A&&F.current&&(F.current.focus(),F.current.select())},[A]);let R=()=>{N.trim()&&N!==n.name?f?.(n.id,{name:N}):P(n.name),j(!1)},z=e=>{e.key===`Enter`?R():e.key===`Escape`&&(P(n.name),j(!1))},B=n.wipLimit&&r.length>n.wipLimit,V=n.wipLimit&&r.length===n.wipLimit,{setNodeRef:H,attributes:U,listeners:W,transform:G,transition:K,isDragging:q}=(0,S.useSortable)({id:n.id,data:{type:`column`,column:n}});return(0,g.jsxs)(o.t,{ref:H,style:{transform:x.CSS.Translate.toString(G),transition:K},className:e._(`flex flex-col w-80 shrink-0 transition-all duration-200`,_===n.id?`ring-2 ring-primary border-primary`:``,q?`opacity-50`:``,b?`ring-2 ring-primary/70 border-primary/50 bg-primary/5`:``,w),onClick:()=>m?.(n.id),children:[(0,g.jsxs)(o.a,{className:`pb-3`,onDoubleClick:()=>j(!0),children:[(0,g.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2 flex-1`,children:[(0,g.jsx)(`div`,{...U,...W,className:`cursor-grab active:cursor-grabbing p-1 hover:bg-muted rounded text-muted-foreground/50 hover:text-primary transition-colors`,children:(0,g.jsx)(h.MoreHorizontal,{className:`h-4 w-4`})}),(0,g.jsx)(t.t,{variant:`ghost`,size:`sm`,className:`h-6 w-6 p-0`,onClick:()=>u?.(n.id),children:n.isCollapsed?O?(0,g.jsx)(h.ChevronRight,{className:`h-4 w-4 rotate-180`}):(0,g.jsx)(h.ChevronRight,{className:`h-4 w-4`}):(0,g.jsx)(h.ChevronDown,{className:`h-4 w-4`})}),(0,g.jsxs)(`div`,{className:`flex items-center gap-2 flex-1 min-w-0`,children:[A?(0,g.jsx)(`input`,{ref:F,value:N,onChange:e=>P(e.target.value),onBlur:R,onKeyDown:z,className:`h-6 w-full text-sm font-semibold border rounded px-1 bg-background`,onClick:e=>e.stopPropagation()}):(0,g.jsx)(`h3`,{className:`font-semibold text-sm truncate`,title:n.name,children:n.name}),(0,g.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[r.length,` `,k(`items`)]})]})]}),(0,g.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,g.jsxs)(a.t,{children:[(0,g.jsx)(a.h,{asChild:!0,children:(0,g.jsx)(t.t,{variant:`ghost`,size:`sm`,className:`h-6 w-6 p-0`,children:(0,g.jsx)(h.MoreHorizontal,{className:`h-4 w-4`})})}),(0,g.jsx)(a.r,{align:`end`,children:(0,g.jsxs)(a.a,{className:`text-red-600 focus:text-red-600 focus:bg-red-50`,onClick:()=>d?.(n.id),children:[(0,g.jsx)(h.Trash2,{className:`h-4 w-4 me-2`}),k(`delete_column`)||`Delete Column`]})})]}),(0,g.jsx)(t.t,{variant:`ghost`,size:`sm`,className:`h-6 w-6 p-0`,onClick:()=>l?.(n.id),children:(0,g.jsx)(h.Plus,{className:`h-4 w-4`})})]})]}),n.wipLimit&&(0,g.jsx)(`div`,{className:`mt-2`,children:(0,g.jsx)(`div`,{className:`h-1 w-full bg-muted rounded-full overflow-hidden`,children:(0,g.jsx)(`div`,{className:e._(`h-full transition-all`,B?`bg-red-500`:V?`bg-yellow-500`:`bg-green-500`),style:{width:`${Math.min(r.length/n.wipLimit*100,100)}%`}})})})]}),!n.isCollapsed&&(()=>{let t=r.sort((e,t)=>e.position-t.position);if(t.length>50){let{parentRef:e,virtualItems:n,totalSize:r}=L({cards:t,estimateSize:120,overscan:5});return(0,g.jsxs)(o.n,{ref:e,className:`flex-1 overflow-y-auto max-h-[calc(100vh-200px)]`,children:[(0,g.jsx)(`div`,{style:{height:`${r}px`,position:`relative`},children:n.map(e=>{let n=t[e.index];return(0,g.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,width:`100%`,transform:`translateY(${e.start}px)`,paddingBottom:`8px`},children:(0,g.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,width:`100%`,transform:`translateY(${e.start}px)`,paddingBottom:`8px`},children:(0,g.jsx)(M,{card:n,onClick:i,onDoubleClick:s,onDragStart:c,isDragging:v===n.id,isHighlighted:y===n.id,customFields:C,dir:T,...D?.card})},n.id)},n.id)})}),t.length===0&&(0,g.jsx)(`div`,{className:`text-center py-8 text-sm text-muted-foreground`,children:k(`no_cards`)})]})}return(0,g.jsxs)(o.n,{className:`flex-1 overflow-y-auto max-h-[calc(100vh-200px)] space-y-2`,children:[(0,g.jsx)(S.SortableContext,{items:r.map(e=>e.id),strategy:S.verticalListSortingStrategy,children:t.map(e=>(0,g.jsx)(M,{card:e,onClick:i,onDoubleClick:s,onDragStart:c,isDragging:v===e.id,isHighlighted:y===e.id,customFields:C,dir:T,...D?.card},e.id))}),r.length===0&&(0,g.jsx)(`div`,{className:e._(`flex h-32 items-center justify-center rounded-lg border border-dashed text-sm transition-all duration-150`,b?`border-primary/60 bg-primary/5 text-primary/70`:`text-muted-foreground`),children:b?`✦ Drop here`:k(`no_cards`)})]})})()]})},z=({swimlaneId:t,columnId:n,children:r,className:i})=>{let{isOver:a,setNodeRef:o}=(0,y.useDroppable)({id:`swimlane-cell-${t}-${n}`,data:{type:`swimlane-cell`,swimlaneId:t,columnId:n}});return(0,g.jsx)(`div`,{ref:o,className:e._(i,a&&`bg-primary/5 transition-colors`),children:r})},B=({swimlane:n,columns:r,cards:i,onCardClick:a,onCardDoubleClick:s,onCardDragStart:c,onCardDragEnd:l,onToggleCollapse:u,draggedCardId:d,highlightedCardId:f,customFields:p,className:m,dir:_,slots:v,slotProps:y})=>{let b=_===`rtl`,{t:x}=o.c(),S=v?.card||I;return(0,g.jsxs)(`div`,{className:e._(`flex flex-col border rounded-lg bg-card text-card-foreground shadow-sm mb-4`,m),children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2 p-3 border-b bg-muted/30`,children:[(0,g.jsx)(t.t,{variant:`ghost`,size:`sm`,className:`h-6 w-6 p-0`,onClick:()=>u?.(n.id),children:n.isCollapsed?b?(0,g.jsx)(h.ChevronRight,{className:`h-4 w-4 rotate-180`}):(0,g.jsx)(h.ChevronRight,{className:`h-4 w-4`}):(0,g.jsx)(h.ChevronDown,{className:`h-4 w-4`})}),(0,g.jsx)(`h3`,{className:`font-semibold text-sm`,children:n.name}),(0,g.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`(`,i.length,` `,x(`items`),`)`]})]}),!n.isCollapsed&&(0,g.jsx)(`div`,{className:e._(`flex divide-x`,b&&`divide-x-reverse`),children:r.map(e=>{let t=i.filter(t=>t.columnId===e.id);return(0,g.jsx)(z,{swimlaneId:n.id,columnId:e.id,className:`flex-1 min-w-[280px] p-2 min-h-[100px]`,children:(0,g.jsx)(`div`,{className:`space-y-2`,children:t.map(e=>(0,g.jsx)(S,{card:e,onClick:a,onDoubleClick:s,onDragStart:c,onDragEnd:l,isDragging:d===e.id,isHighlighted:f===e.id,customFields:p,dir:_,...y?.card},e.id))})},e.id)})})]})},V=(e,t)=>t.find(t=>t.id===e.columnId)?.color||`hsl(var(--primary))`,H=({cards:e,columns:t,swimlanes:n,onCardUpdate:r,onCardClick:i,onCardCreate:a,className:o,dir:c})=>{let l=(0,p.useMemo)(()=>{let r=[];return n&&n.length>0?(r=n.sort((e,t)=>e.position-t.position).map(e=>({id:e.id,name:e.name,color:e.color})),e.some(e=>!e.swimlaneId)&&r.push({id:`uncategorized`,name:`Uncategorized`,color:`hsl(var(--muted-foreground))`}),r):t.sort((e,t)=>e.position-t.position).map(e=>({id:e.id,name:e.name,color:e.color}))},[n,t,e]),u=(0,p.useMemo)(()=>e.map(e=>{let r=n&&n.length>0?e.swimlaneId||`uncategorized`:e.columnId||`uncategorized`,i=e.startDate?new Date(e.startDate):e.dueDate?(0,b.startOfDay)(new Date(e.dueDate)):(0,b.startOfDay)(new Date),a=e.dueDate?new Date(e.dueDate):(0,b.addDays)(i,1),o=t.find(t=>t.id===e.columnId);return{id:e.id,title:e.title,start:i,end:a,resourceId:r||`uncategorized`,description:e.description,color:V(e,t),status:o?.name,originalCard:e}}),[e,n,t]),d=(0,p.useCallback)(e=>{let i=e.originalCard;if(!i)return;let a={...i,startDate:e.start,dueDate:e.end,...n&&n.length>0?{swimlaneId:e.resourceId}:{columnId:e.resourceId||i.columnId||t[0]?.id||``}};r?.(a,`move`)},[r,n,t]),f=(0,p.useCallback)(e=>{let r=n&&n.length>0,i={title:e.title||`New Card`,startDate:e.start,dueDate:e.end,columnId:!r&&e.resourceId?e.resourceId:t[0]?.id||``,swimlaneId:r&&e.resourceId?e.resourceId:void 0,description:e.description||``,priority:`medium`};a?.(i)},[n,t,a]),m=(0,p.useCallback)(e=>{let t=e.originalCard;t&&i?.(t)},[i]);return(0,g.jsx)(`div`,{className:o,style:{height:`100%`,minHeight:`600px`},children:(0,g.jsx)(s.t,{events:u,resources:l,selectedDate:new Date,view:`TimelineMonth`,views:[`TimelineWeek`,`TimelineMonth`],onEventChange:d,onEventCreate:f,onEventClick:m,showHeaderBar:!0,showResourceHeaders:!0,dir:c})})},U=({board:n,onCardClick:r,onCardDoubleClick:i,onCardDragStart:a,onCardDragEnd:s,onCardDrop:c,onAddCard:l,onToggleColumnCollapse:u,onToggleSwimlaneCollapse:d,onAddColumn:f,onDeleteColumn:m,onUpdateColumn:_,onColumnClick:v,onCreateCard:b,selectedColumnId:x,draggedCardId:C,filteredCards:w,slots:T,slotProps:E,className:D,view:O=`standard`,dir:k})=>{let A=w||n.cards,{t:j}=o.c(),[M,N]=(0,p.useState)(null),[P,F]=(0,p.useState)(null);if(O===`timeline`)return(0,g.jsx)(H,{cards:A,columns:n.columns,swimlanes:n.swimlanes,onCardUpdate:c?async(e,t)=>{t===`move`&&c(e.columnId,e.swimlaneId)}:void 0,onCardClick:r,onCardCreate:b,className:D,dir:k});let I=()=>!n.swimlanes||n.swimlanes.length===0?null:(0,g.jsx)(`div`,{className:e._(`flex flex-col p-4 overflow-y-auto h-full`,D),children:(0,g.jsxs)(S.SortableContext,{items:A.map(e=>e.id),children:[[...n.swimlanes].sort((e,t)=>e.position-t.position).map(e=>{let t=A.filter(t=>t.swimlaneId===e.id);return(0,g.jsx)(B,{swimlane:e,columns:[...n.columns].sort((e,t)=>e.position-t.position),cards:t,onCardClick:r,onCardDoubleClick:i,onCardDragStart:a,onCardDragEnd:s,onDrop:c,onToggleCollapse:d,draggedCardId:C,customFields:n.customFields,slots:T,slotProps:E,dir:k},e.id)}),A.some(e=>!e.swimlaneId)&&(0,g.jsx)(B,{swimlane:{id:`uncategorized`,name:j(`uncategorized`),type:`custom`,position:9999,isCollapsed:!1},columns:[...n.columns].sort((e,t)=>e.position-t.position),cards:A.filter(e=>!e.swimlaneId),onCardClick:r,onCardDoubleClick:i,onCardDragStart:a,onCardDragEnd:s,onDrop:c,onToggleCollapse:()=>{},draggedCardId:C,customFields:n.customFields,slots:T,slotProps:E,dir:k})]})}),L=(0,y.useSensors)((0,y.useSensor)(y.PointerSensor,{activationConstraint:{distance:5}}));return(0,g.jsxs)(y.DndContext,{sensors:L,onDragStart:e=>{let{active:t}=e;t.data.current?.type===`card`&&(N(t.data.current.card),a?.(t.data.current.card))},onDragOver:e=>{let{over:t}=e;if(!t){F(null);return}t.data.current?.type===`column`?F(t.data.current.column.id):t.data.current?.type===`card`?F(t.data.current.card.columnId):t.data.current?.type===`swimlane-cell`?F(t.data.current.columnId):F(null)},onDragEnd:e=>{let{active:t,over:r}=e;if(N(null),F(null),!r){s?.();return}if(t.data.current?.type===`card`){let e,t,i;if(r.data.current?.type===`column`)e=r.data.current.column.id,t=void 0;else if(r.data.current?.type===`swimlane-cell`)e=r.data.current.columnId,i=r.data.current.swimlaneId;else if(r.data.current?.type===`card`){let a=r.data.current.card;e=a.columnId,i=a.swimlaneId;let o=n.cards.filter(t=>t.columnId===e);i&&(o=o.filter(e=>e.swimlaneId===i)),o.sort((e,t)=>(e.position??0)-(t.position??0));let s=o.findIndex(e=>e.id===a.id);t=s>=0?s:void 0}e?c?.(e,i,t):s?.()}else t.data.current?.type===`column`&&r.data.current?.type,s?.()},children:[O===`swimlane`?I():(0,g.jsxs)(`div`,{className:e._(`flex gap-4 overflow-x-auto p-4`,D),children:[(0,g.jsx)(S.SortableContext,{items:n.columns.map(e=>e.id),strategy:S.horizontalListSortingStrategy,children:[...n.columns].sort((e,t)=>e.position-t.position).map(e=>(0,g.jsx)(R,{column:e,cards:A.filter(t=>t.columnId===e.id),onCardClick:r,onCardDoubleClick:i,onCardDragStart:a,onCardDragEnd:s,onDrop:c,onAddCard:l,onToggleCollapse:u,onDeleteColumn:m,onUpdateColumn:_,onColumnClick:v,selectedColumnId:x,draggedCardId:C,isDropTarget:P===e.id,customFields:n.customFields,slots:T,slotProps:E,dir:k},e.id))}),f&&(0,g.jsx)(`div`,{className:`w-80 shrink-0`,children:(0,g.jsxs)(t.t,{variant:`outline`,className:`w-full h-12 border-dashed`,onClick:f,children:[(0,g.jsx)(h.Plus,{className:`me-2 h-4 w-4`}),j(`add_column`)||`Add Column`]})})]}),(0,g.jsx)(y.DragOverlay,{dropAnimation:{duration:200,easing:`ease`},children:M?(0,g.jsx)(`div`,{className:`rotate-2 opacity-90 shadow-2xl ring-2 ring-primary/60 rounded-lg pointer-events-none w-72`,children:(0,g.jsxs)(`div`,{className:`bg-card border border-border rounded-lg p-3 space-y-1`,children:[(0,g.jsx)(`p`,{className:`font-medium text-sm`,children:M.title}),M.description&&(0,g.jsx)(`p`,{className:`text-xs text-muted-foreground line-clamp-2`,children:M.description})]})}):null})]})};Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return D}});
|
package/dist/advanced.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./EzProvider-L2qQMq-v.cjs");;/* empty css */const t=require("./button-BBMwzUtG.cjs"),n=require("./input-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./EzProvider-L2qQMq-v.cjs");;/* empty css */const t=require("./button-BBMwzUtG.cjs"),n=require("./input-DOh8O0iX.cjs"),r=require("./avatar-BSdRHETK.cjs"),i=require("./label-BGgvoZWD.cjs"),a=require("./dropdown-menu-BRP0tyR_.cjs"),o=require("./NotificationPanel-CFME00wq.cjs"),s=require("./EzContextMenu-BCUoEQp5.cjs"),c=require("./card-NlCLCGFb.cjs"),l=require("./EzTable-Bcq7TByw.cjs"),u=require("./popover-wZKNvYM5.cjs"),d=require("./tooltip-Qmzrg5u5.cjs"),f=require("./select-sVieKbLu.cjs"),p=require("./checkbox-B9yPkCYi.cjs"),m=require("./KanbanBoard-DdXD-Zjt.cjs"),h=require("./scroll-area-DSkE2KB_.cjs"),g=require("./calendar-DEHX32Cp.cjs"),_=require("./date-time-picker-D0w0sDgq.cjs"),v=require("./EzTableToolbar-BWjqKfwx.cjs"),y=require("./EzTableFooter-CtexeDAC.cjs"),b=require("./EzSchedulerToolbar-Dy62PVnH.cjs"),x=require("./EzEventModal-D1EzXBsQ.cjs"),S=require("./EzSchedulerQuickAdd-BYrV9PQ-.cjs");let C=require("react");C=e.y(C,1);let w=require("@radix-ui/react-slot"),T=require("lucide-react"),E=require("react/jsx-runtime");var D=({resources:e,selectedResourceIds:t,onSelectionChange:r,className:a=``})=>{let[o,s]=C.default.useState(``),c=C.default.useMemo(()=>o?e.filter(e=>e.name.toLowerCase().includes(o.toLowerCase())):e,[e,o]),l=e=>{t.includes(e)?r(t.filter(t=>t!==e)):r([...t,e])};return(0,E.jsxs)(`div`,{className:`p-4 border-r border-border bg-background flex flex-col gap-4 overflow-y-auto ${a}`,children:[(0,E.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,E.jsxs)(`div`,{className:`relative`,children:[(0,E.jsx)(T.Search,{className:`absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground`}),(0,E.jsx)(n.t,{type:`search`,placeholder:`Search resources...`,className:`pl-9 h-9 text-sm`,value:o,onChange:e=>s(e.target.value)})]}),(0,E.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,E.jsxs)(`h3`,{className:`font-semibold text-xs uppercase tracking-wider text-muted-foreground`,children:[c.length,` Found`]}),(0,E.jsx)(`button`,{onClick:()=>{if(c.every(e=>t.includes(e.id)))r(t.filter(e=>!c.find(t=>t.id===e)));else{let e=c.map(e=>e.id);r(Array.from(new Set([...t,...e])))}},className:`text-xs text-primary hover:text-primary/80 font-medium`,children:`Select All`})]})]}),(0,E.jsxs)(`div`,{className:`flex flex-col gap-2 min-h-0 flex-1 overflow-y-auto`,children:[c.map(e=>(0,E.jsxs)(`div`,{className:`flex items-center space-x-2 p-1 hover:bg-muted/50 rounded transition-colors`,children:[(0,E.jsx)(p.t,{id:`res-${e.id}`,checked:t.includes(e.id),onCheckedChange:()=>l(e.id),className:`data-[state=checked]:bg-primary data-[state=checked]:border-primary`}),(0,E.jsxs)(i.t,{htmlFor:`res-${e.id}`,className:`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 flex items-center gap-2 cursor-pointer flex-1 py-1`,children:[(0,E.jsx)(`span`,{className:`w-2.5 h-2.5 rounded-full shrink-0`,style:{backgroundColor:e.color||`#ccc`}}),(0,E.jsx)(`span`,{className:`truncate`,children:e.name})]})]},e.id)),c.length===0&&(0,E.jsx)(`div`,{className:`text-center py-8 text-sm text-muted-foreground`,children:`No resources found.`})]})]})},O=[`#06d6a0`,`#ef476f`,`#ffd166`,`#118ab2`,`#073b4c`],k=({text:e,className:t=``,defaultColor:n=`#2d2e33`,highlight:r,delay:i,textSize:a,textDir:o,highlightDir:s})=>{let c=e.split(``),l=`${a||`text-4xl md:text-5xl lg:text-6xl`} font-black tracking-tight ${t}`,u=r?r.split(``):[],[d,f]=(0,C.useState)(!1);(0,C.useEffect)(()=>{let e=()=>{let e=document.documentElement.classList.contains(`dark`)||window.matchMedia(`(prefers-color-scheme: dark)`).matches;f(e)};e();let t=new MutationObserver(()=>{e()});t.observe(document.documentElement,{attributes:!0,attributeFilter:[`class`]});let n=window.matchMedia(`(prefers-color-scheme: dark)`);return n.addEventListener(`change`,e),()=>{t.disconnect(),n.removeEventListener(`change`,e)}},[]);let p=d?`#ffffff`:n;return(0,E.jsxs)(`span`,{className:`flex flex-col justify-center items-center ${l}`,style:{letterSpacing:`-0.05em`},children:[(0,E.jsx)(`style`,{children:`
|
|
2
2
|
@keyframes wobble {
|
|
3
3
|
0% { transform: translateX(0); }
|
|
4
4
|
20% { transform: translateX(-4px); }
|
|
@@ -7,4 +7,4 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=requi
|
|
|
7
7
|
80% { transform: translateX(4px); }
|
|
8
8
|
100% { transform: translateX(0); }
|
|
9
9
|
}
|
|
10
|
-
`}),(0,E.jsx)(`span`,{className:`flex flex-wrap justify-center text-center`,dir:o,children:c.map((e,t)=>(0,E.jsx)(A,{char:e,defaultColor:p,brandColor:O[t%O.length]},`main-${t}`))}),r&&(0,E.jsx)(`span`,{className:`flex flex-wrap justify-center text-center mt-2`,dir:s,children:u.map((e,t)=>(0,E.jsx)(A,{char:e,defaultColor:`oklch(var(--primary))`,brandColor:O[(c.length+t)%O.length]},`highlight-${t}`))})]})},A=({char:e,defaultColor:t,brandColor:n})=>{let[r,i]=(0,C.useState)(!1);return(0,E.jsx)(`span`,{onMouseEnter:()=>{i(!0)},onAnimationEnd:()=>{i(!1)},style:{display:`inline-block`,whiteSpace:`pre`,cursor:`default`,fontWeight:900,padding:`0 1px`,color:r?n:t,animation:r?`wobble 0.8s ease-in-out 2`:`none`,transition:`color 0.2s ease`},children:e})},j=C.forwardRef(({...e},t)=>(0,E.jsx)(`nav`,{ref:t,"aria-label":`breadcrumb`,...e}));j.displayName=`Breadcrumb`;var M=C.forwardRef(({className:t,...n},r)=>(0,E.jsx)(`ol`,{ref:r,className:e._(`flex flex-wrap items-center gap-1.5 break-words text-sm text-zinc-500 sm:gap-2.5 dark:text-zinc-400`,t),...n}));M.displayName=`BreadcrumbList`;var N=C.forwardRef(({className:t,...n},r)=>(0,E.jsx)(`li`,{ref:r,className:e._(`inline-flex items-center gap-1.5`,t),...n}));N.displayName=`BreadcrumbItem`;var P=C.forwardRef(({asChild:t,className:n,...r},i)=>(0,E.jsx)(t?w.Slot:`a`,{ref:i,className:e._(`transition-colors hover:text-zinc-950 dark:hover:text-zinc-50`,n),...r}));P.displayName=`BreadcrumbLink`;var F=C.forwardRef(({className:t,...n},r)=>(0,E.jsx)(`span`,{ref:r,role:`link`,"aria-disabled":`true`,"aria-current":`page`,className:e._(`font-normal text-zinc-950 dark:text-zinc-50`,t),...n}));F.displayName=`BreadcrumbPage`;var I=({children:t,className:n,...r})=>(0,E.jsx)(`li`,{role:`presentation`,"aria-hidden":`true`,className:e._(`[&>svg]:size-3.5`,n),...r,children:t??(0,E.jsx)(T.ChevronRight,{})});I.displayName=`BreadcrumbSeparator`;var L=({className:t,...n})=>(0,E.jsxs)(`span`,{role:`presentation`,"aria-hidden":`true`,className:e._(`flex h-9 w-9 items-center justify-center`,t),...n,children:[(0,E.jsx)(T.MoreHorizontal,{className:`h-4 w-4`}),(0,E.jsx)(`span`,{className:`sr-only`,children:`More`})]});L.displayName=`BreadcrumbElipsis`;var R=C.forwardRef(({className:t,...r},i)=>{let[a,o]=C.useState(!1);return(0,E.jsxs)(`div`,{className:`relative`,children:[(0,E.jsx)(n.t,{type:a?`text`:`password`,className:e._(`pr-10`,t),ref:i,...r}),(0,E.jsxs)(`button`,{type:`button`,onClick:()=>o(e=>!e),className:`absolute right-3 top-1/2 -translate-y-1/2 text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-200 focus:outline-none`,tabIndex:-1,children:[a?(0,E.jsx)(T.EyeOff,{className:`h-4 w-4`,"aria-hidden":`true`}):(0,E.jsx)(T.Eye,{className:`h-4 w-4`,"aria-hidden":`true`}),(0,E.jsxs)(`span`,{className:`sr-only`,children:[a?`Hide`:`Show`,` password`]})]})]})});R.displayName=`PasswordInput`;function z({className:t,...n}){return(0,E.jsx)(`div`,{className:e._(`animate-pulse rounded-md bg-zinc-100 dark:bg-zinc-800`,t),...n})}var B=C.forwardRef(({className:t,...n},r)=>(0,E.jsx)(`div`,{className:`relative w-full overflow-auto`,children:(0,E.jsx)(`table`,{ref:r,className:e._(`w-full caption-bottom text-sm`,t),...n})}));B.displayName=`Table`;var V=C.forwardRef(({className:t,...n},r)=>(0,E.jsx)(`thead`,{ref:r,className:e._(`[&_tr]:border-b`,t),...n}));V.displayName=`TableHeader`;var H=C.forwardRef(({className:t,...n},r)=>(0,E.jsx)(`tbody`,{ref:r,className:e._(`[&_tr:last-child]:border-0`,t),...n}));H.displayName=`TableBody`;var U=C.forwardRef(({className:t,...n},r)=>(0,E.jsx)(`tfoot`,{ref:r,className:e._(`border-t bg-zinc-100/50 font-medium [&>tr]:last:border-b-0 dark:bg-zinc-800/50`,t),...n}));U.displayName=`TableFooter`;var W=C.forwardRef(({className:t,...n},r)=>(0,E.jsx)(`tr`,{ref:r,className:e._(`border-b transition-colors hover:bg-zinc-100/50 data-[state=selected]:bg-zinc-100 dark:hover:bg-zinc-800/50 dark:data-[state=selected]:bg-zinc-800`,t),...n}));W.displayName=`TableRow`;var G=C.forwardRef(({className:t,...n},r)=>(0,E.jsx)(`th`,{ref:r,className:e._(`h-12 px-4 text-left align-middle font-medium text-zinc-500 [&:has([role=checkbox])]:pr-0 dark:text-zinc-400`,t),...n}));G.displayName=`TableHead`;var K=C.forwardRef(({className:t,...n},r)=>(0,E.jsx)(`td`,{ref:r,className:e._(`p-4 align-middle [&:has([role=checkbox])]:pr-0`,t),...n}));K.displayName=`TableCell`;var q=C.forwardRef(({className:t,...n},r)=>(0,E.jsx)(`caption`,{ref:r,className:e._(`mt-4 text-sm text-zinc-500 dark:text-zinc-400`,t),...n}));q.displayName=`TableCaption`;function J({className:t,value:n=0,max:r=100,ref:i,...a}){let o=Math.min(Math.max(n/r*100,0),100);return(0,E.jsx)(`div`,{ref:i,className:e._(`relative h-4 w-full overflow-hidden rounded-full bg-secondary`,t),...a,children:(0,E.jsx)(`div`,{className:`h-full w-full flex-1 bg-primary transition-all duration-300 ease-in-out`,style:{transform:`translateX(-${100-o}%)`}})})}var Y=({isOpen:n,onClose:r,title:i,children:a,className:o})=>(C.useEffect(()=>(n?document.body.style.overflow=`hidden`:document.body.style.overflow=``,()=>{document.body.style.overflow=``}),[n]),n?(0,E.jsxs)(`div`,{className:`fixed inset-0 z-[100] flex items-center justify-center p-4`,children:[(0,E.jsx)(`div`,{className:`absolute inset-0 bg-black/60 backdrop-blur-sm transition-opacity`,onClick:r}),(0,E.jsxs)(`div`,{className:e._(`relative bg-card text-card-foreground w-full max-w-lg rounded-2xl shadow-2xl border flex flex-col max-h-[90vh] overflow-hidden animate-in fade-in zoom-in-95 duration-200`,o),children:[(0,E.jsxs)(`div`,{className:`flex items-center justify-between p-4 border-b`,children:[i&&(0,E.jsx)(`h2`,{className:`text-lg font-bold truncate`,children:i}),(0,E.jsx)(t.t,{variant:`ghost`,size:`icon`,onClick:r,className:`h-8 w-8 rounded-full ml-auto`,children:(0,E.jsx)(T.X,{className:`h-4 w-4`})})]}),(0,E.jsx)(`div`,{className:`flex-1 overflow-y-auto custom-scrollbar`,children:a})]})]}):null),X=C.forwardRef(({options:n,value:r,onValueChange:i,placeholder:a=`Select option...`,searchPlaceholder:o=`Search...`,emptyText:l=`No results found.`,className:u,dropdownWidth:d=`w-[400px]`,disabled:f,dir:p},m)=>{let[h,g]=C.useState(!1),_=C.useMemo(()=>n.find(e=>e.value===r)?.label||``,[n,r]);return(0,E.jsxs)(c.t,{open:h,onOpenChange:g,dir:p,children:[(0,E.jsx)(c.r,{asChild:!0,children:(0,E.jsxs)(t.t,{ref:m,variant:`ghost`,role:`combobox`,"aria-expanded":h,disabled:f,className:e._(`w-full justify-between font-normal bg-white dark:bg-zinc-900 border border-border/10 rounded-xl px-4 py-3 h-12 text-[14px] shadow-sm hover:bg-zinc-50 dark:hover:bg-zinc-800/50 transition-all`,u),children:[(0,E.jsx)(`span`,{className:`truncate`,children:_||(0,E.jsx)(`span`,{className:`text-muted-foreground`,children:a})}),(0,E.jsx)(T.ChevronDown,{className:e._(`ml-2 h-4 w-4 shrink-0 opacity-50 transition-transform duration-200`,h&&`rotate-180`)})]})}),(0,E.jsx)(c.n,{className:e._(`p-0 border-border/10 shadow-xl overflow-hidden bg-white dark:bg-zinc-950`,d),align:p===`rtl`?`end`:`start`,dir:p,children:(0,E.jsxs)(s.p,{children:[(0,E.jsx)(s.g,{placeholder:o,className:`h-11 border-none focus:ring-0`}),(0,E.jsxs)(s.v,{className:`max-h-[300px] overflow-y-auto`,children:[(0,E.jsx)(s.m,{className:`py-6 text-sm text-muted-foreground`,children:l}),(0,E.jsx)(s.h,{className:`p-1 space-y-1`,children:n.map(e=>(0,E.jsx)(s._,{value:e.label,onSelect:()=>{i?.(e.value),g(!1)},className:`px-4 py-3 text-[14px] cursor-default hover:bg-zinc-100 dark:hover:bg-zinc-800 aria-selected:bg-zinc-100 dark:aria-selected:bg-zinc-800 transition-colors rounded-lg text-start`,children:(0,E.jsx)(`span`,{className:`whitespace-normal leading-relaxed flex-1`,children:e.label})},e.value))})]})]})})]})});X.displayName=`Combobox`,exports.AnimatedText=k,exports.Avatar=r.t,exports.AvatarFallback=r.n,exports.AvatarImage=r.r,exports.Badge=m.f,exports.BaseCell=s.A,exports.BooleanCell=s.C,exports.BooleanEditor=s.w,exports.BooleanFilter=s.T,exports.Breadcrumb=j,exports.BreadcrumbEllipsis=L,exports.BreadcrumbItem=N,exports.BreadcrumbLink=P,exports.BreadcrumbList=M,exports.BreadcrumbPage=F,exports.BreadcrumbSeparator=I,exports.Button=t.t,exports.Calendar=g.t,exports.Card=p.t,exports.CardContent=p.n,exports.CardDescription=p.r,exports.CardFooter=p.i,exports.CardHeader=p.a,exports.CardTitle=p.o,exports.Checkbox=d.t,exports.Combobox=X,exports.Command=s.p,exports.CommandEmpty=s.m,exports.CommandGroup=s.h,exports.CommandInput=s.g,exports.CommandItem=s._,exports.CommandList=s.v,exports.CommandSeparator=s.y,exports.CommandShortcut=s.b,exports.ContextMenu=f.n,exports.ContextMenuCheckboxItem=f.r,exports.ContextMenuContent=f.i,exports.ContextMenuGroup=f.a,exports.ContextMenuItem=f.o,exports.ContextMenuLabel=f.s,exports.ContextMenuPortal=f.c,exports.ContextMenuRadioGroup=f.l,exports.ContextMenuRadioItem=f.u,exports.ContextMenuSeparator=f.d,exports.ContextMenuShortcut=f.f,exports.ContextMenuSub=f.p,exports.ContextMenuSubContent=f.m,exports.ContextMenuSubTrigger=f.h,exports.ContextMenuTrigger=f.g,exports.DateTimePicker=_.t,exports.DropdownMenu=a.t,exports.DropdownMenuCheckboxItem=a.n,exports.DropdownMenuContent=a.r,exports.DropdownMenuGroup=a.i,exports.DropdownMenuItem=a.a,exports.DropdownMenuLabel=a.o,exports.DropdownMenuPortal=a.s,exports.DropdownMenuRadioGroup=a.c,exports.DropdownMenuRadioItem=a.l,exports.DropdownMenuSeparator=a.u,exports.DropdownMenuShortcut=a.d,exports.DropdownMenuSub=a.f,exports.DropdownMenuSubContent=a.p,exports.DropdownMenuSubTrigger=a.m,exports.DropdownMenuTrigger=a.h,exports.EzEventModal=x.t,exports.EzKanbanBoard=m.t,exports.EzKanbanCard=m.a,exports.EzKanbanCardEditor=m.s,exports.EzKanbanColumn=m.i,exports.EzNotificationDropdown=b.r,exports.EzResourceSidebar=D,exports.EzSchedulerQuickAdd=S.t,exports.EzSchedulerToolbar=b.t,exports.EzTableFooter=y.t,exports.EzTablePrimitive=s.n,exports.EzTableToolbar=v.t,exports.Input=n.t,exports.Label=i.t,exports.Modal=Y,exports.NotificationPanel=o.t,exports.PasswordInput=R,exports.Popover=c.t,exports.PopoverContent=c.n,exports.PopoverTrigger=c.r,exports.PrimitiveCell=s.D,exports.PrimitiveEditor=s.O,exports.PrimitiveFilter=s.k,exports.Progress=J,exports.ProgressCell=s.s,exports.RadioGroup=s.x,exports.RadioGroupItem=s.S,exports.ScrollArea=h.t,exports.ScrollBar=h.n,exports.SearchableSelect=s.f,exports.Select=u.t,exports.SelectCell=s.l,exports.SelectContent=u.n,exports.SelectEditor=s.u,exports.SelectFilter=s.d,exports.SelectItem=u.r,exports.SelectTrigger=u.i,exports.SelectValue=u.a,exports.Skeleton=z,exports.SparklineCell=s.c,exports.StatusBadge=m.o,exports.Switch=s.E,exports.Table=B,exports.TableBody=H,exports.TableCaption=q,exports.TableCell=K,exports.TableFooter=U,exports.TableHead=G,exports.TableHeader=V,exports.TableRow=W,exports.Tabs=m.c,exports.TabsContent=m.l,exports.TabsList=m.u,exports.TabsTrigger=m.d,exports.Textarea=p.s,exports.Tooltip=l.t,exports.TooltipContent=l.n,exports.TooltipProvider=l.r,exports.TooltipTrigger=l.i,exports.badgeVariants=m.p,exports.buttonVariants=t.n,exports.calculateColWidth=s.j;
|
|
10
|
+
`}),(0,E.jsx)(`span`,{className:`flex flex-wrap justify-center text-center`,dir:o,children:c.map((e,t)=>(0,E.jsx)(A,{char:e,defaultColor:p,brandColor:O[t%O.length]},`main-${t}`))}),r&&(0,E.jsx)(`span`,{className:`flex flex-wrap justify-center text-center mt-2`,dir:s,children:u.map((e,t)=>(0,E.jsx)(A,{char:e,defaultColor:`oklch(var(--primary))`,brandColor:O[(c.length+t)%O.length]},`highlight-${t}`))})]})},A=({char:e,defaultColor:t,brandColor:n})=>{let[r,i]=(0,C.useState)(!1);return(0,E.jsx)(`span`,{onMouseEnter:()=>{i(!0)},onAnimationEnd:()=>{i(!1)},style:{display:`inline-block`,whiteSpace:`pre`,cursor:`default`,fontWeight:900,padding:`0 1px`,color:r?n:t,animation:r?`wobble 0.8s ease-in-out 2`:`none`,transition:`color 0.2s ease`},children:e})},j=C.forwardRef(({...e},t)=>(0,E.jsx)(`nav`,{ref:t,"aria-label":`breadcrumb`,...e}));j.displayName=`Breadcrumb`;var M=C.forwardRef(({className:t,...n},r)=>(0,E.jsx)(`ol`,{ref:r,className:e._(`flex flex-wrap items-center gap-1.5 break-words ez-text-label text-muted-foreground sm:gap-2.5`,t),...n}));M.displayName=`BreadcrumbList`;var N=C.forwardRef(({className:t,...n},r)=>(0,E.jsx)(`li`,{ref:r,className:e._(`inline-flex items-center gap-1.5`,t),...n}));N.displayName=`BreadcrumbItem`;var P=C.forwardRef(({asChild:t,className:n,...r},i)=>(0,E.jsx)(t?w.Slot:`a`,{ref:i,className:e._(`transition-colors hover:text-foreground`,n),...r}));P.displayName=`BreadcrumbLink`;var F=C.forwardRef(({className:t,...n},r)=>(0,E.jsx)(`span`,{ref:r,role:`link`,"aria-disabled":`true`,"aria-current":`page`,className:e._(`font-normal text-foreground`,t),...n}));F.displayName=`BreadcrumbPage`;var I=({children:t,className:n,...r})=>(0,E.jsx)(`li`,{role:`presentation`,"aria-hidden":`true`,className:e._(`[&>svg]:size-3.5`,n),...r,children:t??(0,E.jsx)(T.ChevronRight,{})});I.displayName=`BreadcrumbSeparator`;var L=({className:t,...n})=>(0,E.jsxs)(`span`,{role:`presentation`,"aria-hidden":`true`,className:e._(`flex h-9 w-9 items-center justify-center`,t),...n,children:[(0,E.jsx)(T.MoreHorizontal,{className:`h-4 w-4`}),(0,E.jsx)(`span`,{className:`sr-only`,children:`More`})]});L.displayName=`BreadcrumbElipsis`;var R=C.forwardRef(({className:t,...r},i)=>{let[a,o]=C.useState(!1);return(0,E.jsxs)(`div`,{className:`relative`,children:[(0,E.jsx)(n.t,{type:a?`text`:`password`,className:e._(`pr-10`,t),ref:i,...r}),(0,E.jsxs)(`button`,{type:`button`,onClick:()=>o(e=>!e),className:`absolute right-3 top-1/2 -translate-y-1/2 text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-200 focus:outline-none`,tabIndex:-1,children:[a?(0,E.jsx)(T.EyeOff,{className:`h-4 w-4`,"aria-hidden":`true`}):(0,E.jsx)(T.Eye,{className:`h-4 w-4`,"aria-hidden":`true`}),(0,E.jsxs)(`span`,{className:`sr-only`,children:[a?`Hide`:`Show`,` password`]})]})]})});R.displayName=`PasswordInput`;function z({className:t,...n}){return(0,E.jsx)(`div`,{className:e._(`animate-pulse rounded-md bg-zinc-100 dark:bg-zinc-800`,t),...n})}var B=C.forwardRef(({className:t,...n},r)=>(0,E.jsx)(`div`,{className:`relative w-full overflow-auto`,children:(0,E.jsx)(`table`,{ref:r,className:e._(`w-full caption-bottom text-sm`,t),...n})}));B.displayName=`Table`;var V=C.forwardRef(({className:t,...n},r)=>(0,E.jsx)(`thead`,{ref:r,className:e._(`[&_tr]:border-b`,t),...n}));V.displayName=`TableHeader`;var H=C.forwardRef(({className:t,...n},r)=>(0,E.jsx)(`tbody`,{ref:r,className:e._(`[&_tr:last-child]:border-0`,t),...n}));H.displayName=`TableBody`;var U=C.forwardRef(({className:t,...n},r)=>(0,E.jsx)(`tfoot`,{ref:r,className:e._(`border-t bg-zinc-100/50 font-medium [&>tr]:last:border-b-0 dark:bg-zinc-800/50`,t),...n}));U.displayName=`TableFooter`;var W=C.forwardRef(({className:t,...n},r)=>(0,E.jsx)(`tr`,{ref:r,className:e._(`border-b transition-colors hover:bg-zinc-100/50 data-[state=selected]:bg-zinc-100 dark:hover:bg-zinc-800/50 dark:data-[state=selected]:bg-zinc-800`,t),...n}));W.displayName=`TableRow`;var G=C.forwardRef(({className:t,...n},r)=>(0,E.jsx)(`th`,{ref:r,className:e._(`h-12 px-4 text-left align-middle font-medium text-zinc-500 [&:has([role=checkbox])]:pr-0 dark:text-zinc-400`,t),...n}));G.displayName=`TableHead`;var K=C.forwardRef(({className:t,...n},r)=>(0,E.jsx)(`td`,{ref:r,className:e._(`p-4 align-middle [&:has([role=checkbox])]:pr-0`,t),...n}));K.displayName=`TableCell`;var q=C.forwardRef(({className:t,...n},r)=>(0,E.jsx)(`caption`,{ref:r,className:e._(`mt-4 text-sm text-zinc-500 dark:text-zinc-400`,t),...n}));q.displayName=`TableCaption`;function J({className:t,value:n=0,max:r=100,ref:i,...a}){let o=Math.min(Math.max(n/r*100,0),100);return(0,E.jsx)(`div`,{ref:i,className:e._(`relative h-4 w-full overflow-hidden rounded-full bg-secondary`,t),...a,children:(0,E.jsx)(`div`,{className:`h-full w-full flex-1 bg-primary transition-all duration-300 ease-in-out`,style:{transform:`translateX(-${100-o}%)`}})})}var Y=({isOpen:n,onClose:r,title:i,children:a,className:o})=>(C.useEffect(()=>(n?document.body.style.overflow=`hidden`:document.body.style.overflow=``,()=>{document.body.style.overflow=``}),[n]),n?(0,E.jsxs)(`div`,{className:`fixed inset-0 z-[100] flex items-center justify-center p-4`,children:[(0,E.jsx)(`div`,{className:`absolute inset-0 bg-black/60 backdrop-blur-sm transition-opacity`,onClick:r}),(0,E.jsxs)(`div`,{className:e._(`relative bg-card text-card-foreground w-full max-w-lg rounded-2xl shadow-2xl border flex flex-col max-h-[90vh] overflow-hidden animate-in fade-in zoom-in-95 duration-200`,o),children:[(0,E.jsxs)(`div`,{className:`flex items-center justify-between p-4 border-b`,children:[i&&(0,E.jsx)(`h2`,{className:`text-lg font-bold truncate`,children:i}),(0,E.jsx)(t.t,{variant:`ghost`,size:`icon`,onClick:r,className:`h-8 w-8 rounded-full ml-auto`,children:(0,E.jsx)(T.X,{className:`h-4 w-4`})})]}),(0,E.jsx)(`div`,{className:`flex-1 overflow-y-auto custom-scrollbar`,children:a})]})]}):null),X=C.forwardRef(({options:n,value:r,onValueChange:i,placeholder:a=`Select option...`,searchPlaceholder:o=`Search...`,emptyText:s=`No results found.`,className:c,dropdownWidth:d=`w-[400px]`,disabled:f,dir:p},m)=>{let[h,g]=C.useState(!1),_=C.useMemo(()=>n.find(e=>e.value===r)?.label||``,[n,r]);return(0,E.jsxs)(u.t,{open:h,onOpenChange:g,dir:p,children:[(0,E.jsx)(u.r,{asChild:!0,children:(0,E.jsxs)(t.t,{ref:m,variant:`ghost`,role:`combobox`,"aria-expanded":h,disabled:f,className:e._(`w-full justify-between font-normal bg-white dark:bg-zinc-900 border border-border/10 rounded-xl px-4 py-3 h-12 text-[14px] shadow-sm hover:bg-zinc-50 dark:hover:bg-zinc-800/50 transition-all`,c),children:[(0,E.jsx)(`span`,{className:`truncate`,children:_||(0,E.jsx)(`span`,{className:`text-muted-foreground`,children:a})}),(0,E.jsx)(T.ChevronDown,{className:e._(`ml-2 h-4 w-4 shrink-0 opacity-50 transition-transform duration-200`,h&&`rotate-180`)})]})}),(0,E.jsx)(u.n,{className:e._(`p-0 border-border/10 shadow-xl overflow-hidden bg-white dark:bg-zinc-950`,d),align:p===`rtl`?`end`:`start`,dir:p,children:(0,E.jsxs)(l.p,{children:[(0,E.jsx)(l.g,{placeholder:o,className:`h-11 border-none focus:ring-0`}),(0,E.jsxs)(l.v,{className:`max-h-[300px] overflow-y-auto`,children:[(0,E.jsx)(l.m,{className:`py-6 text-sm text-muted-foreground`,children:s}),(0,E.jsx)(l.h,{className:`p-1 space-y-1`,children:n.map(e=>(0,E.jsx)(l._,{value:e.label,onSelect:()=>{i?.(e.value),g(!1)},className:`px-4 py-3 text-[14px] cursor-default hover:bg-zinc-100 dark:hover:bg-zinc-800 aria-selected:bg-zinc-100 dark:aria-selected:bg-zinc-800 transition-colors rounded-lg text-start`,children:(0,E.jsx)(`span`,{className:`whitespace-normal leading-relaxed flex-1`,children:e.label})},e.value))})]})]})})]})});X.displayName=`Combobox`,exports.AnimatedText=k,exports.Avatar=r.t,exports.AvatarFallback=r.n,exports.AvatarImage=r.r,exports.Badge=m.f,exports.BaseCell=l.A,exports.BooleanCell=l.C,exports.BooleanEditor=l.w,exports.BooleanFilter=l.T,exports.Breadcrumb=j,exports.BreadcrumbEllipsis=L,exports.BreadcrumbItem=N,exports.BreadcrumbLink=P,exports.BreadcrumbList=M,exports.BreadcrumbPage=F,exports.BreadcrumbSeparator=I,exports.Button=t.t,exports.Calendar=g.t,exports.Card=c.t,exports.CardContent=c.n,exports.CardDescription=c.r,exports.CardFooter=c.i,exports.CardHeader=c.a,exports.CardTitle=c.o,exports.Checkbox=p.t,exports.Combobox=X,exports.Command=l.p,exports.CommandEmpty=l.m,exports.CommandGroup=l.h,exports.CommandInput=l.g,exports.CommandItem=l._,exports.CommandList=l.v,exports.CommandSeparator=l.y,exports.CommandShortcut=l.b,exports.ContextMenu=s.n,exports.ContextMenuCheckboxItem=s.r,exports.ContextMenuContent=s.i,exports.ContextMenuGroup=s.a,exports.ContextMenuItem=s.o,exports.ContextMenuLabel=s.s,exports.ContextMenuPortal=s.c,exports.ContextMenuRadioGroup=s.l,exports.ContextMenuRadioItem=s.u,exports.ContextMenuSeparator=s.d,exports.ContextMenuShortcut=s.f,exports.ContextMenuSub=s.p,exports.ContextMenuSubContent=s.m,exports.ContextMenuSubTrigger=s.h,exports.ContextMenuTrigger=s.g,exports.DateTimePicker=_.t,exports.DropdownMenu=a.t,exports.DropdownMenuCheckboxItem=a.n,exports.DropdownMenuContent=a.r,exports.DropdownMenuGroup=a.i,exports.DropdownMenuItem=a.a,exports.DropdownMenuLabel=a.o,exports.DropdownMenuPortal=a.s,exports.DropdownMenuRadioGroup=a.c,exports.DropdownMenuRadioItem=a.l,exports.DropdownMenuSeparator=a.u,exports.DropdownMenuShortcut=a.d,exports.DropdownMenuSub=a.f,exports.DropdownMenuSubContent=a.p,exports.DropdownMenuSubTrigger=a.m,exports.DropdownMenuTrigger=a.h,exports.EzEventModal=x.t,exports.EzKanbanBoard=m.t,exports.EzKanbanCard=m.a,exports.EzKanbanCardEditor=m.s,exports.EzKanbanColumn=m.i,exports.EzNotificationDropdown=b.r,exports.EzResourceSidebar=D,exports.EzSchedulerQuickAdd=S.t,exports.EzSchedulerToolbar=b.t,exports.EzTableFooter=y.t,exports.EzTablePrimitive=l.n,exports.EzTableToolbar=v.t,exports.Input=n.t,exports.Label=i.t,exports.Modal=Y,exports.NotificationPanel=o.t,exports.PasswordInput=R,exports.Popover=u.t,exports.PopoverContent=u.n,exports.PopoverTrigger=u.r,exports.PrimitiveCell=l.D,exports.PrimitiveEditor=l.O,exports.PrimitiveFilter=l.k,exports.Progress=J,exports.ProgressCell=l.s,exports.RadioGroup=l.x,exports.RadioGroupItem=l.S,exports.ScrollArea=h.t,exports.ScrollBar=h.n,exports.SearchableSelect=l.f,exports.Select=f.t,exports.SelectCell=l.l,exports.SelectContent=f.n,exports.SelectEditor=l.u,exports.SelectFilter=l.d,exports.SelectItem=f.r,exports.SelectTrigger=f.i,exports.SelectValue=f.a,exports.Skeleton=z,exports.SparklineCell=l.c,exports.StatusBadge=m.o,exports.Switch=l.E,exports.Table=B,exports.TableBody=H,exports.TableCaption=q,exports.TableCell=K,exports.TableFooter=U,exports.TableHead=G,exports.TableHeader=V,exports.TableRow=W,exports.Tabs=m.c,exports.TabsContent=m.l,exports.TabsList=m.u,exports.TabsTrigger=m.d,exports.Textarea=c.s,exports.Tooltip=d.t,exports.TooltipContent=d.n,exports.TooltipProvider=d.r,exports.TooltipTrigger=d.i,exports.badgeVariants=m.p,exports.buttonVariants=t.n,exports.calculateColWidth=l.j;
|
package/dist/advanced.es.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
import { _ as e } from "./EzProvider-AlmsYIDk.js";
|
|
3
3
|
import { n as t, t as n } from "./button-CYyNwV8S.js";
|
|
4
|
-
import { t as r } from "./input-
|
|
4
|
+
import { t as r } from "./input-CcRi0LeO.js";
|
|
5
5
|
import { n as i, r as a, t as o } from "./avatar-BvCUJ-_r.js";
|
|
6
6
|
import { t as s } from "./label-DWEV--5W.js";
|
|
7
|
-
import { a as c, c as l, d as u, f as d, h as f, i as p, l as m, m as h, n as ee, o as te, p as ne, r as re, s as ie, t as ae, u as
|
|
8
|
-
import { t as
|
|
9
|
-
import {
|
|
10
|
-
import { n as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { t as
|
|
14
|
-
import { a as
|
|
15
|
-
import {
|
|
16
|
-
import { a as
|
|
7
|
+
import { a as c, c as l, d as u, f as d, h as f, i as p, l as m, m as h, n as ee, o as te, p as ne, r as re, s as ie, t as ae, u as g } from "./dropdown-menu-B_7_K13o.js";
|
|
8
|
+
import { t as oe } from "./NotificationPanel-BzpDc10Q.js";
|
|
9
|
+
import { a as se, c as ce, d as le, f as ue, g as de, h as fe, i as pe, l as me, m as he, n as ge, o as _e, p as ve, r as ye, s as be, u as xe } from "./EzContextMenu-srLxujt8.js";
|
|
10
|
+
import { a as Se, i as Ce, n as we, o as Te, r as Ee, s as De, t as Oe } from "./card-urNaa5h-.js";
|
|
11
|
+
import { A as ke, C as Ae, D as je, E as Me, O as Ne, S as Pe, T as _, _ as v, b as y, c as Fe, d as Ie, f as Le, g as b, h as x, j as Re, k as ze, l as Be, m as S, n as Ve, p as C, s as He, u as Ue, v as w, w as We, x as Ge, y as Ke } from "./EzTable-DLbb3nl7.js";
|
|
12
|
+
import { n as T, r as E, t as D } from "./popover-D1akYj0W.js";
|
|
13
|
+
import { i as qe, n as Je, r as Ye, t as Xe } from "./tooltip-B1wC9m05.js";
|
|
14
|
+
import { a as Ze, i as Qe, n as $e, r as et, t as tt } from "./select-D4tFaSai.js";
|
|
15
|
+
import { t as O } from "./checkbox-BTuckDEm.js";
|
|
16
|
+
import { a as nt, c as rt, d as k, f as it, i as at, l as ot, o as st, p as ct, s as lt, t as ut, u as dt } from "./KanbanBoard-CRF0-mYa.js";
|
|
17
17
|
import { n as ft, t as pt } from "./scroll-area-BJs87d45.js";
|
|
18
18
|
import { t as mt } from "./calendar-DOIPGsyI.js";
|
|
19
19
|
import { t as ht } from "./date-time-picker-DqdtBpAg.js";
|
|
20
|
-
import { t as gt } from "./EzTableToolbar-
|
|
21
|
-
import { t as _t } from "./EzTableFooter-
|
|
22
|
-
import { r as vt, t as yt } from "./EzSchedulerToolbar-
|
|
23
|
-
import { t as bt } from "./EzEventModal-
|
|
24
|
-
import { t as xt } from "./EzSchedulerQuickAdd-
|
|
20
|
+
import { t as gt } from "./EzTableToolbar-BiRfKm9d.js";
|
|
21
|
+
import { t as _t } from "./EzTableFooter-BuTS3wDK.js";
|
|
22
|
+
import { r as vt, t as yt } from "./EzSchedulerToolbar-BhlCMeOT.js";
|
|
23
|
+
import { t as bt } from "./EzEventModal-D5lX9XuW.js";
|
|
24
|
+
import { t as xt } from "./EzSchedulerQuickAdd-D0kGTzE3.js";
|
|
25
25
|
import * as A from "react";
|
|
26
26
|
import j, { useEffect as St, useState as M } from "react";
|
|
27
27
|
import { Slot as Ct } from "@radix-ui/react-slot";
|
|
@@ -98,7 +98,8 @@ var jt = ({ resources: e, selectedResourceIds: t, onSelectionChange: n, classNam
|
|
|
98
98
|
let c = e.split(""), l = `${a || "text-4xl md:text-5xl lg:text-6xl"} font-black tracking-tight ${t}`, u = r ? r.split("") : [], [d, f] = M(!1);
|
|
99
99
|
St(() => {
|
|
100
100
|
let e = () => {
|
|
101
|
-
|
|
101
|
+
let e = document.documentElement.classList.contains("dark") || window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
102
|
+
f(e);
|
|
102
103
|
};
|
|
103
104
|
e();
|
|
104
105
|
let t = new MutationObserver(() => {
|
|
@@ -168,7 +169,7 @@ var jt = ({ resources: e, selectedResourceIds: t, onSelectionChange: n, classNam
|
|
|
168
169
|
L.displayName = "Breadcrumb";
|
|
169
170
|
var R = A.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ N("ol", {
|
|
170
171
|
ref: r,
|
|
171
|
-
className: e("flex flex-wrap items-center gap-1.5 break-words text-
|
|
172
|
+
className: e("flex flex-wrap items-center gap-1.5 break-words ez-text-label text-muted-foreground sm:gap-2.5", t),
|
|
172
173
|
...n
|
|
173
174
|
}));
|
|
174
175
|
R.displayName = "BreadcrumbList";
|
|
@@ -180,7 +181,7 @@ var z = A.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ N("li", {
|
|
|
180
181
|
z.displayName = "BreadcrumbItem";
|
|
181
182
|
var B = A.forwardRef(({ asChild: t, className: n, ...r }, i) => /* @__PURE__ */ N(t ? Ct : "a", {
|
|
182
183
|
ref: i,
|
|
183
|
-
className: e("transition-colors hover:text-
|
|
184
|
+
className: e("transition-colors hover:text-foreground", n),
|
|
184
185
|
...r
|
|
185
186
|
}));
|
|
186
187
|
B.displayName = "BreadcrumbLink";
|
|
@@ -189,7 +190,7 @@ var V = A.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ N("span", {
|
|
|
189
190
|
role: "link",
|
|
190
191
|
"aria-disabled": "true",
|
|
191
192
|
"aria-current": "page",
|
|
192
|
-
className: e("font-normal text-
|
|
193
|
+
className: e("font-normal text-foreground", t),
|
|
193
194
|
...n
|
|
194
195
|
}));
|
|
195
196
|
V.displayName = "BreadcrumbPage";
|
|
@@ -344,11 +345,11 @@ var Ft = ({ isOpen: t, onClose: r, title: i, children: a, className: o }) => (A.
|
|
|
344
345
|
})]
|
|
345
346
|
}) : null), $ = A.forwardRef(({ options: t, value: r, onValueChange: i, placeholder: a = "Select option...", searchPlaceholder: o = "Search...", emptyText: s = "No results found.", className: c, dropdownWidth: l = "w-[400px]", disabled: u, dir: d }, f) => {
|
|
346
347
|
let [p, m] = A.useState(!1), h = A.useMemo(() => t.find((e) => e.value === r)?.label || "", [t, r]);
|
|
347
|
-
return /* @__PURE__ */ P(
|
|
348
|
+
return /* @__PURE__ */ P(D, {
|
|
348
349
|
open: p,
|
|
349
350
|
onOpenChange: m,
|
|
350
351
|
dir: d,
|
|
351
|
-
children: [/* @__PURE__ */ N(
|
|
352
|
+
children: [/* @__PURE__ */ N(E, {
|
|
352
353
|
asChild: !0,
|
|
353
354
|
children: /* @__PURE__ */ P(n, {
|
|
354
355
|
ref: f,
|
|
@@ -365,21 +366,21 @@ var Ft = ({ isOpen: t, onClose: r, title: i, children: a, className: o }) => (A.
|
|
|
365
366
|
})
|
|
366
367
|
}), /* @__PURE__ */ N(wt, { className: e("ml-2 h-4 w-4 shrink-0 opacity-50 transition-transform duration-200", p && "rotate-180") })]
|
|
367
368
|
})
|
|
368
|
-
}), /* @__PURE__ */ N(
|
|
369
|
+
}), /* @__PURE__ */ N(T, {
|
|
369
370
|
className: e("p-0 border-border/10 shadow-xl overflow-hidden bg-white dark:bg-zinc-950", l),
|
|
370
371
|
align: d === "rtl" ? "end" : "start",
|
|
371
372
|
dir: d,
|
|
372
|
-
children: /* @__PURE__ */ P(
|
|
373
|
+
children: /* @__PURE__ */ P(C, { children: [/* @__PURE__ */ N(b, {
|
|
373
374
|
placeholder: o,
|
|
374
375
|
className: "h-11 border-none focus:ring-0"
|
|
375
|
-
}), /* @__PURE__ */ P(
|
|
376
|
+
}), /* @__PURE__ */ P(w, {
|
|
376
377
|
className: "max-h-[300px] overflow-y-auto",
|
|
377
|
-
children: [/* @__PURE__ */ N(
|
|
378
|
+
children: [/* @__PURE__ */ N(S, {
|
|
378
379
|
className: "py-6 text-sm text-muted-foreground",
|
|
379
380
|
children: s
|
|
380
|
-
}), /* @__PURE__ */ N(
|
|
381
|
+
}), /* @__PURE__ */ N(x, {
|
|
381
382
|
className: "p-1 space-y-1",
|
|
382
|
-
children: t.map((e) => /* @__PURE__ */ N(
|
|
383
|
+
children: t.map((e) => /* @__PURE__ */ N(v, {
|
|
383
384
|
value: e.label,
|
|
384
385
|
onSelect: () => {
|
|
385
386
|
i?.(e.value), m(!1);
|
|
@@ -397,4 +398,4 @@ var Ft = ({ isOpen: t, onClose: r, title: i, children: a, className: o }) => (A.
|
|
|
397
398
|
});
|
|
398
399
|
$.displayName = "Combobox";
|
|
399
400
|
//#endregion
|
|
400
|
-
export { Mt as AnimatedText, o as Avatar, i as AvatarFallback, a as AvatarImage, it as Badge,
|
|
401
|
+
export { Mt as AnimatedText, o as Avatar, i as AvatarFallback, a as AvatarImage, it as Badge, ke as BaseCell, Ae as BooleanCell, We as BooleanEditor, _ as BooleanFilter, L as Breadcrumb, U as BreadcrumbEllipsis, z as BreadcrumbItem, B as BreadcrumbLink, R as BreadcrumbList, V as BreadcrumbPage, H as BreadcrumbSeparator, n as Button, mt as Calendar, Oe as Card, we as CardContent, Ee as CardDescription, Ce as CardFooter, Se as CardHeader, Te as CardTitle, O as Checkbox, $ as Combobox, C as Command, S as CommandEmpty, x as CommandGroup, b as CommandInput, v as CommandItem, w as CommandList, Ke as CommandSeparator, y as CommandShortcut, ge as ContextMenu, ye as ContextMenuCheckboxItem, pe as ContextMenuContent, se as ContextMenuGroup, _e as ContextMenuItem, be as ContextMenuLabel, ce as ContextMenuPortal, me as ContextMenuRadioGroup, xe as ContextMenuRadioItem, le as ContextMenuSeparator, ue as ContextMenuShortcut, ve as ContextMenuSub, he as ContextMenuSubContent, fe as ContextMenuSubTrigger, de as ContextMenuTrigger, ht as DateTimePicker, ae as DropdownMenu, ee as DropdownMenuCheckboxItem, re as DropdownMenuContent, p as DropdownMenuGroup, c as DropdownMenuItem, te as DropdownMenuLabel, ie as DropdownMenuPortal, l as DropdownMenuRadioGroup, m as DropdownMenuRadioItem, g as DropdownMenuSeparator, u as DropdownMenuShortcut, d as DropdownMenuSub, ne as DropdownMenuSubContent, h as DropdownMenuSubTrigger, f as DropdownMenuTrigger, bt as EzEventModal, ut as EzKanbanBoard, nt as EzKanbanCard, lt as EzKanbanCardEditor, at as EzKanbanColumn, vt as EzNotificationDropdown, jt as EzResourceSidebar, xt as EzSchedulerQuickAdd, yt as EzSchedulerToolbar, _t as EzTableFooter, Ve as EzTablePrimitive, gt as EzTableToolbar, r as Input, s as Label, Ft as Modal, oe as NotificationPanel, W as PasswordInput, D as Popover, T as PopoverContent, E as PopoverTrigger, je as PrimitiveCell, Ne as PrimitiveEditor, ze as PrimitiveFilter, Pt as Progress, He as ProgressCell, Ge as RadioGroup, Pe as RadioGroupItem, pt as ScrollArea, ft as ScrollBar, Le as SearchableSelect, tt as Select, Be as SelectCell, $e as SelectContent, Ue as SelectEditor, Ie as SelectFilter, et as SelectItem, Qe as SelectTrigger, Ze as SelectValue, Nt as Skeleton, Fe as SparklineCell, st as StatusBadge, Me as Switch, G as Table, q as TableBody, Q as TableCaption, Z as TableCell, J as TableFooter, X as TableHead, K as TableHeader, Y as TableRow, rt as Tabs, ot as TabsContent, dt as TabsList, k as TabsTrigger, De as Textarea, Xe as Tooltip, Je as TooltipContent, Ye as TooltipProvider, qe as TooltipTrigger, ct as badgeVariants, t as buttonVariants, Re as calculateColWidth };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./EzProvider-L2qQMq-v.cjs");let t=require("react");t=e.y(t,1);let n=require("react/jsx-runtime");var r=()=>e.r();function i({className:t,ref:r,...i}){return(0,n.jsx)(`textarea`,{className:e._(`flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 ez-text-body ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50`,t),ref:r,...i})}function a({className:t,ref:r,...i}){return(0,n.jsx)(`div`,{ref:r,className:e._(`rounded-xl border bg-card text-card-foreground shadow`,t),...i})}function o({className:t,ref:r,...i}){return(0,n.jsx)(`div`,{ref:r,className:e._(`flex flex-col space-y-1.5 p-6`,t),...i})}function s({className:t,ref:r,...i}){return(0,n.jsx)(`div`,{ref:r,className:e._(`font-semibold leading-none tracking-tight`,t),...i})}function c({className:t,ref:r,...i}){return(0,n.jsx)(`div`,{ref:r,className:e._(`text-sm text-muted-foreground`,t),...i})}function l({className:t,ref:r,...i}){return(0,n.jsx)(`div`,{ref:r,className:e._(`p-6 pt-0`,t),...i})}function u({className:t,ref:r,...i}){return(0,n.jsx)(`div`,{ref:r,className:e._(`flex items-center p-6 pt-0`,t),...i})}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return a}});
|
|
@@ -7,7 +7,7 @@ var r = () => t();
|
|
|
7
7
|
//#region src/components/ui/textarea.tsx
|
|
8
8
|
function i({ className: t, ref: r, ...i }) {
|
|
9
9
|
return /* @__PURE__ */ n("textarea", {
|
|
10
|
-
className: e("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-
|
|
10
|
+
className: e("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 ez-text-body ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", t),
|
|
11
11
|
ref: r,
|
|
12
12
|
...i
|
|
13
13
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./EzProvider-L2qQMq-v.cjs");let t=require("react");t=e.y(t,1);let n=require("react/jsx-runtime");function r({className:r,checked:i,onCheckedChange:a,ref:o,...s}){let c=t.useRef(null);return t.useImperativeHandle(o,()=>c.current),t.useEffect(()=>{c.current&&(c.current.indeterminate=i===`indeterminate`)},[i]),(0,n.jsx)(`input`,{type:`checkbox`,className:e._(`peer h-4 w-4 shrink-0 rounded-sm border border-zinc-200 border-zinc-900 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-zinc-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-zinc-900 data-[state=checked]:text-zinc-50 dark:border-zinc-800 dark:border-zinc-50 dark:ring-offset-zinc-950 dark:focus-visible:ring-zinc-300 dark:data-[state=checked]:bg-zinc-50 dark:data-[state=checked]:text-zinc-900`,`accent-zinc-900 dark:accent-zinc-50`,r),ref:c,checked:i
|
|
1
|
+
const e=require("./EzProvider-L2qQMq-v.cjs");let t=require("react");t=e.y(t,1);let n=require("react/jsx-runtime");function r({className:r,checked:i,onCheckedChange:a,ref:o,...s}){let c=t.useRef(null);return t.useImperativeHandle(o,()=>c.current),t.useEffect(()=>{c.current&&(c.current.indeterminate=i===`indeterminate`)},[i]),(0,n.jsx)(`input`,{type:`checkbox`,className:e._(`peer h-4 w-4 shrink-0 rounded-sm border border-zinc-200 border-zinc-900 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-zinc-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-zinc-900 data-[state=checked]:text-zinc-50 dark:border-zinc-800 dark:border-zinc-50 dark:ring-offset-zinc-950 dark:focus-visible:ring-zinc-300 dark:data-[state=checked]:bg-zinc-50 dark:data-[state=checked]:text-zinc-900`,`accent-zinc-900 dark:accent-zinc-50`,r),ref:c,checked:i!==`indeterminate`&&i,onChange:e=>{a?.(e.target.checked)},...s})}Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return r}});
|
|
@@ -10,7 +10,7 @@ function r({ className: r, checked: i, onCheckedChange: a, ref: o, ...s }) {
|
|
|
10
10
|
type: "checkbox",
|
|
11
11
|
className: e("peer h-4 w-4 shrink-0 rounded-sm border border-zinc-200 border-zinc-900 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-zinc-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-zinc-900 data-[state=checked]:text-zinc-50 dark:border-zinc-800 dark:border-zinc-50 dark:ring-offset-zinc-950 dark:focus-visible:ring-zinc-300 dark:data-[state=checked]:bg-zinc-50 dark:data-[state=checked]:text-zinc-900", "accent-zinc-900 dark:accent-zinc-50", r),
|
|
12
12
|
ref: c,
|
|
13
|
-
checked: i
|
|
13
|
+
checked: i !== "indeterminate" && i,
|
|
14
14
|
onChange: (e) => {
|
|
15
15
|
a?.(e.target.checked);
|
|
16
16
|
},
|
|
@@ -2,7 +2,7 @@ import { ColumnDef } from '@tanstack/react-table';
|
|
|
2
2
|
interface EzTableEditDialogProps<TData> {
|
|
3
3
|
open: boolean;
|
|
4
4
|
onClose: () => void;
|
|
5
|
-
onSave: (data: TData) => void
|
|
5
|
+
onSave: (data: TData) => void | Promise<void>;
|
|
6
6
|
columns: ColumnDef<TData, any>[];
|
|
7
7
|
initialData?: Partial<TData>;
|
|
8
8
|
isNew?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Table } from '@tanstack/react-table';
|
|
2
|
-
import { EzTableProps } from '../EzTable.types';
|
|
1
|
+
import { Table, ColumnFiltersState, Updater } from '@tanstack/react-table';
|
|
2
|
+
import { EzTableProps, EzGlobalFilterState } from '../EzTable.types';
|
|
3
3
|
/**
|
|
4
4
|
* Handles filtering and search logic for EzTable.
|
|
5
5
|
* Integrates with useTransition for performance and fires legacy/modern events.
|
|
@@ -13,11 +13,11 @@ export declare const useTableFiltering: <TData extends object>(props: EzTablePro
|
|
|
13
13
|
/** Whether a filter/search transition is in progress. @group State */
|
|
14
14
|
isFiltering: boolean;
|
|
15
15
|
/** Handler for column filter changes. @group Events */
|
|
16
|
-
handleColumnFiltersChange: (updater:
|
|
16
|
+
handleColumnFiltersChange: (updater: Updater<ColumnFiltersState>) => void;
|
|
17
17
|
/** Handler for global filter changes. @group Events */
|
|
18
|
-
handleGlobalFilterChange: (updater:
|
|
18
|
+
handleGlobalFilterChange: (updater: Updater<EzGlobalFilterState>) => void;
|
|
19
19
|
/** Programmatically set the filter model. @group Methods */
|
|
20
|
-
setFilterModel: (updater:
|
|
20
|
+
setFilterModel: (updater: Updater<ColumnFiltersState>) => void;
|
|
21
21
|
/** Programmatically set the global filter. @group Methods */
|
|
22
|
-
setGlobalFilter: (updater:
|
|
22
|
+
setGlobalFilter: (updater: Updater<any>) => void;
|
|
23
23
|
};
|
|
@@ -15,8 +15,8 @@ export interface TableAction<TData> {
|
|
|
15
15
|
rowIndex?: number;
|
|
16
16
|
rowId?: string | number;
|
|
17
17
|
columnId?: string;
|
|
18
|
-
oldValue?:
|
|
19
|
-
newValue?:
|
|
18
|
+
oldValue?: unknown;
|
|
19
|
+
newValue?: unknown;
|
|
20
20
|
row?: TData;
|
|
21
21
|
};
|
|
22
22
|
/** Execution timestamp. @group Properties */
|
|
@@ -57,7 +57,7 @@ export declare const useTableHistory: <TData extends object>(initialData: TData[
|
|
|
57
57
|
/** Programmatically set the table data. @group Methods */
|
|
58
58
|
setData: (action: SetStateAction<TData[]>) => void;
|
|
59
59
|
/** Perform a cell edit at a specific coordinate. @group Methods */
|
|
60
|
-
performEdit: (rowIndex: number, columnId: string, newValue:
|
|
60
|
+
performEdit: (rowIndex: number, columnId: string, newValue: unknown) => void;
|
|
61
61
|
/** Add a new row to the data. @group Methods */
|
|
62
62
|
addRow: (newRow: TData, index?: number) => void;
|
|
63
63
|
/** Delete one or more rows by index. @group Methods */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Table } from '@tanstack/react-table';
|
|
2
|
-
import { EzTableProps, EzTableRef } from '../EzTable.types';
|
|
2
|
+
import { EzTableProps, ITableService, EzTableRef } from '../EzTable.types';
|
|
3
3
|
/**
|
|
4
4
|
* Consolidates the massive imperative API for EzTable using shared factory utilities.
|
|
5
5
|
* Reduces boilerplate and ensures consistent naming conventions.
|
|
@@ -35,8 +35,11 @@ export declare const useTableImperative: <TData extends object>(props: EzTablePr
|
|
|
35
35
|
onlyVisible?: boolean;
|
|
36
36
|
maxWidth?: number;
|
|
37
37
|
}) => void;
|
|
38
|
-
addMutation?:
|
|
39
|
-
updateMutation?:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
},
|
|
38
|
+
addMutation?: import('@tanstack/react-query').UseMutationResult<TData, Error, Partial<TData>, unknown>;
|
|
39
|
+
updateMutation?: import('@tanstack/react-query').UseMutationResult<TData, Error, {
|
|
40
|
+
id: string | number;
|
|
41
|
+
updates: Partial<TData>;
|
|
42
|
+
}, unknown>;
|
|
43
|
+
deleteMutation?: import('@tanstack/react-query').UseMutationResult<void, Error, string | number, unknown>;
|
|
44
|
+
service?: ITableService<TData> | null;
|
|
45
|
+
}, ref: React.Ref<EzTableRef<TData>>, extraApi?: Record<string, unknown>) => import('../types').EzTableBaseRef<TData>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SortingState, ColumnFiltersState, PaginationState, RowSelectionState, GroupingState, ExpandedState, RowPinningState, ColumnPinningState, Table } from '@tanstack/react-table';
|
|
1
|
+
import { SortingState, ColumnFiltersState, PaginationState, RowSelectionState, GroupingState, ExpandedState, RowPinningState, ColumnPinningState, Table, Updater } from '@tanstack/react-table';
|
|
2
2
|
import { EzTableProps, EzGlobalFilterState } from '../EzTable.types';
|
|
3
3
|
/**
|
|
4
4
|
* Core state and TanStack table instance initialization for EzTable.
|
|
@@ -8,26 +8,26 @@ export declare const useTableState: <TData extends object>(props: EzTableProps<T
|
|
|
8
8
|
table: Table<TData>;
|
|
9
9
|
states: {
|
|
10
10
|
sorting: SortingState;
|
|
11
|
-
setSorting: (updater:
|
|
11
|
+
setSorting: (updater: Updater<SortingState>) => void;
|
|
12
12
|
columnFilters: ColumnFiltersState;
|
|
13
|
-
setColumnFilters: (updater:
|
|
13
|
+
setColumnFilters: (updater: Updater<ColumnFiltersState>) => void;
|
|
14
14
|
globalFilter: EzGlobalFilterState;
|
|
15
|
-
setGlobalFilter: (updater:
|
|
15
|
+
setGlobalFilter: (updater: Updater<EzGlobalFilterState>) => void;
|
|
16
16
|
rowSelection: RowSelectionState;
|
|
17
|
-
setRowSelection: (updater:
|
|
17
|
+
setRowSelection: (updater: Updater<RowSelectionState>) => void;
|
|
18
18
|
paginationState: PaginationState;
|
|
19
|
-
setPaginationState: (updater:
|
|
19
|
+
setPaginationState: (updater: Updater<PaginationState>) => void;
|
|
20
20
|
grouping: GroupingState;
|
|
21
|
-
setGrouping: (updater:
|
|
21
|
+
setGrouping: (updater: Updater<GroupingState>) => void;
|
|
22
22
|
expanded: ExpandedState;
|
|
23
|
-
setExpanded: (updater:
|
|
23
|
+
setExpanded: (updater: Updater<ExpandedState>) => void;
|
|
24
24
|
rowPinning: RowPinningState;
|
|
25
|
-
setRowPinning: (updater:
|
|
25
|
+
setRowPinning: (updater: Updater<RowPinningState>) => void;
|
|
26
26
|
columnPinning: ColumnPinningState;
|
|
27
|
-
setColumnPinning: (updater:
|
|
27
|
+
setColumnPinning: (updater: Updater<ColumnPinningState>) => void;
|
|
28
28
|
columnVisibility: Record<string, boolean>;
|
|
29
|
-
setColumnVisibility: (updater:
|
|
29
|
+
setColumnVisibility: (updater: Updater<Record<string, boolean>>) => void;
|
|
30
30
|
columnOrder: string[];
|
|
31
|
-
setColumnOrder: (updater:
|
|
31
|
+
setColumnOrder: (updater: Updater<string[]>) => void;
|
|
32
32
|
};
|
|
33
33
|
};
|