@medixdeck/ui 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/package.json +5 -2
package/dist/index.cjs
CHANGED
|
@@ -192,5 +192,5 @@
|
|
|
192
192
|
0% { left: -40%; }
|
|
193
193
|
100% { left: 100%; }
|
|
194
194
|
}
|
|
195
|
-
`,document.head.appendChild(t)}}const Mr=w.forwardRef(({value:e,colorScheme:t="blue",size:n="md",showLabel:i=!1,animated:s=!0,isIndeterminate:r=!1,...o},a)=>{const c=Math.min(100,Math.max(0,e)),u=Nf[t],d=_f[n];return l.jsxs(p.Box,{ref:a,w:"100%",...o,children:[i&&l.jsxs(p.Box,{display:"flex",justifyContent:"space-between",mb:"1",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[l.jsx("span",{children:"Progress"}),l.jsxs("span",{children:[c,"%"]})]}),l.jsx(p.Box,{w:"100%",h:d,bg:"bg.subtle",borderRadius:"full",overflow:"hidden",position:"relative",children:r?l.jsx(p.Box,{position:"absolute",h:"100%",w:"40%",bg:u,borderRadius:"full",style:{animation:"medix-indeterminate 1.5s linear infinite"}}):l.jsx(p.Box,{h:"100%",w:`${c}%`,bg:u,borderRadius:"full",transition:s?"width 0.6s cubic-bezier(0.4, 0, 0.2, 1)":"none",position:"relative"})})]})});Mr.displayName="MedixProgress";const $f={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl",full:"full"};function Uf({isOpen:e,onClose:t,title:n,description:i,size:s="md",closeOnOverlayClick:r=!0,footer:o,children:a}){return l.jsxs(p.DialogRoot,{open:e,onOpenChange:c=>{c.open||t()},closeOnInteractOutside:r,size:$f[s],children:[l.jsx(p.DialogBackdrop,{bg:"rgba(10, 18, 32, 0.7)",backdropFilter:"blur(4px)"}),l.jsx(p.DialogPositioner,{children:l.jsxs(p.DialogContent,{bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"modal",boxShadow:"xl",children:[(n||i)&&l.jsxs(p.DialogHeader,{borderBottom:"1px solid",borderColor:"border",px:"6",py:"4",children:[n&&l.jsx(p.DialogTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:n}),i&&l.jsx(p.DialogDescription,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:i}),l.jsx(p.DialogCloseTrigger,{position:"absolute",top:"4",right:"4",w:"8",h:"8",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"md",color:"text.muted",_hover:{bg:"bg.subtle",color:"text.heading"},transition:"all 0.15s"})]}),l.jsx(p.DialogBody,{px:"6",py:"5",children:a}),o&&l.jsx(p.DialogFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",children:o})]})})]})}function Kf({label:e,children:t,placement:n="top",...i}){return l.jsxs(p.Tooltip.Root,{positioning:{placement:n},...i,children:[l.jsx(p.Tooltip.Trigger,{asChild:!0,children:l.jsx("span",{style:{display:"inline-flex"},children:t})}),l.jsx(p.Tooltip.Positioner,{children:l.jsx(p.Tooltip.Content,{bg:"gray.900",color:"white",borderRadius:"md",px:"3",py:"1.5",fontSize:"xs",fontFamily:"var(--font-body)",boxShadow:"lg",children:e})})]})}function Gf({icon:e,title:t,description:n,actionLabel:i,onAction:s,secondaryLabel:r,onSecondaryAction:o,...a}){return l.jsxs(p.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",py:"16",px:"8",gap:"4",...a,children:[e&&l.jsx(p.Box,{w:"16",h:"16",borderRadius:"full",bg:"bg.subtle",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"3xl",color:"text.muted",mb:"2",children:e}),l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"xl",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"2",children:t}),n&&l.jsx(p.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"360px",lineHeight:"loose",children:n})]}),(i||r)&&l.jsxs(p.Box,{display:"flex",gap:"3",mt:"2",children:[i&&l.jsx(be,{variant:"solid",colorScheme:"blue",onClick:s,children:i}),r&&l.jsx(be,{variant:"ghost",colorScheme:"blue",onClick:o,children:r})]})]})}function Yf({isOpen:e,onClose:t,title:n,placement:i="right",size:s="md",closeOnOverlayClick:r=!0,footer:o,children:a}){return l.jsxs(p.DrawerRoot,{open:e,onOpenChange:c=>{c.open||t()},placement:i,size:s,closeOnInteractOutside:r,children:[l.jsx(p.DrawerBackdrop,{bg:"rgba(10, 18, 32, 0.6)",backdropFilter:"blur(2px)"}),l.jsx(p.DrawerPositioner,{children:l.jsxs(p.DrawerContent,{bg:"bg",borderColor:"border",boxShadow:"2xl",children:[n&&l.jsxs(p.DrawerHeader,{borderBottom:"1px solid",borderColor:"border",px:"6",py:"4",children:[l.jsx(p.DrawerTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:n}),l.jsx(p.DrawerCloseTrigger,{position:"absolute",top:"4",right:"4",w:"8",h:"8",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"md",color:"text.muted",_hover:{bg:"bg.subtle",color:"text.heading"},transition:"all 0.15s"})]}),l.jsx(p.DrawerBody,{px:"6",py:"5",children:a}),o&&l.jsx(p.DrawerFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",children:o})]})})]})}function Xf({items:e,allowMultiple:t=!1,defaultOpenIds:n=[],...i}){const[s,r]=w.useState(new Set(n)),o=a=>{r(c=>{const u=new Set(c);return u.has(a)?u.delete(a):(t||u.clear(),u.add(a)),u})};return l.jsx(p.Box,{display:"flex",flexDirection:"column",gap:"4",...i,children:e.map(a=>{const c=s.has(a.id);return l.jsxs(p.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",transition:"border-color 0.2s",_hover:{borderColor:c?"blue.500":"border"},children:[l.jsxs(p.Box,{as:"button",w:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"4",px:"6",py:"5",bg:"transparent",border:"none",cursor:"pointer",textAlign:"left",onClick:()=>o(a.id),"aria-expanded":c,children:[l.jsx(p.Box,{fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",flex:"1",lineHeight:"short",children:a.question}),l.jsx(p.Box,{flexShrink:0,w:"10",h:"10",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",transition:"background 0.2s, border-color 0.2s, color 0.2s","aria-hidden":"true",style:{border:c?"none":"1.5px solid var(--medix-form-border, #E2E8F0)",background:c?"#0685FF":"transparent",color:c?"#ffffff":"inherit",flexShrink:0},children:c?l.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:l.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:"currentColor"})}):l.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:[l.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:"currentColor"}),l.jsx("rect",{x:"8.25",y:"3",width:"1.5",height:"12",rx:"0.75",fill:"currentColor"})]})})]}),l.jsx(p.Box,{overflow:"hidden",maxH:c?"800px":"0px",opacity:c?1:0,transition:"max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease",children:l.jsx(p.Box,{px:"6",pb:"6",pt:"0",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",children:a.answer})})]},a.id)})})}function Zf({quote:e,authorName:t,authorTitle:n,authorAvatar:i,rating:s,...r}){return l.jsxs(p.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},...r,children:[s!==void 0&&l.jsx(p.Box,{display:"flex",gap:"0.5",children:Array.from({length:5}).map((o,a)=>l.jsx(p.Box,{as:"span",fontSize:"sm",color:a<s?"#F59E0B":"text.muted",children:"★"},a))}),l.jsxs(p.Box,{as:"blockquote",m:"0",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",fontStyle:"italic",children:['"',e,'"']}),l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:"3",mt:"auto",children:[i?l.jsx("img",{src:i,alt:t,style:{width:36,height:36,borderRadius:"50%",objectFit:"cover"}}):l.jsx(p.Box,{w:"9",h:"9",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"sm",fontWeight:"semibold",color:"white",flexShrink:0,children:t.charAt(0).toUpperCase()}),l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:t}),n&&l.jsx(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n})]})]})]})}function qf(e){if(!e)return null;try{const t=new Date(e);return isNaN(t.getTime())?null:{day:String(t.getUTCDate()),weekday:t.toLocaleDateString("en-US",{weekday:"short",timeZone:"UTC"}).toUpperCase()}}catch{return null}}function Jf({title:e,excerpt:t,category:n,date:i,coverImage:s,href:r,onClick:o,...a}){const c=!!(r||o),u=qf(i),d={display:"block",textDecoration:"none",background:"transparent",border:"none",padding:0,cursor:c?"pointer":"default",width:"100%",textAlign:"left"},f=l.jsxs(p.Box,{bg:"bg.surface",borderRadius:"card",overflow:"hidden",transition:"transform 0.22s ease, box-shadow 0.22s ease",boxShadow:"0 2px 12px rgba(0,0,0,0.07)",_dark:{bg:"bg.surface",boxShadow:"0 2px 14px rgba(0,0,0,0.32)"},_hover:c?{transform:"translateY(-4px)",boxShadow:"0 12px 32px rgba(0,0,0,0.13)"}:void 0,...a,children:[l.jsxs(p.Box,{position:"relative",overflow:"hidden",children:[s?l.jsx("img",{src:s,alt:e,style:{width:"100%",height:220,objectFit:"cover",display:"block"}}):l.jsx(p.Box,{h:"220px",style:{background:"linear-gradient(135deg, #0685FF 0%, #7700CC 100%)"}}),u&&l.jsxs(p.Box,{position:"absolute",bottom:"3",right:"3",bg:"white",borderRadius:"10px",px:"3",py:"2",display:"flex",flexDirection:"column",alignItems:"center",minW:"44px",boxShadow:"0 2px 8px rgba(0,0,0,0.16)",children:[l.jsx(p.Box,{style:{fontSize:22,fontWeight:700,color:"#0685FF",lineHeight:1,fontFamily:"var(--font-heading)"},children:u.day}),l.jsx(p.Box,{style:{fontSize:10,fontWeight:600,color:"#6B7280",letterSpacing:"0.08em",marginTop:2,fontFamily:"var(--font-body)"},children:u.weekday})]})]}),l.jsxs(p.Box,{px:"4",pt:"3",pb:"4",children:[n&&l.jsx(p.Box,{display:"inline-flex",alignItems:"center",px:"3",py:"1",mb:"3",borderRadius:"full",bg:"blue.500",color:"white",fontSize:"xs",fontWeight:"medium",fontFamily:"var(--font-body)",letterSpacing:"wide",children:n}),l.jsx(p.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",mb:t?"2":"0",children:e}),t&&l.jsx(p.Box,{fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"relaxed",style:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:t})]})]});return r?l.jsx("a",{href:r,style:d,onClick:o,children:f}):o?l.jsx("button",{type:"button",style:d,onClick:o,children:f}):f}function Qf({columns:e,data:t,rowKey:n="id",isLoading:i=!1,emptyMessage:s="No data available",sortable:r=!1,sortKey:o,sortDirection:a="asc",onSort:c,striped:u=!1,onRowClick:d,caption:f,style:h,className:m}){const[g,x]=w.useState(o),[y,b]=w.useState(a),v=o??g,S=o?a:y,T=F=>{const j=v===F&&S==="asc"?"desc":"asc";x(F),b(j),c==null||c(F,j)},C=w.useMemo(()=>!v||c?t:[...t].sort((F,j)=>{const D=F[v],E=j[v],U=String(D??""),K=String(E??""),G=U.localeCompare(K,void 0,{numeric:!0,sensitivity:"base"});return S==="asc"?G:-G}),[t,v,S,c]),k=({colKey:F})=>v!==F?l.jsx("span",{style:{opacity:.3,marginLeft:4},children:"↕"}):l.jsx("span",{style:{marginLeft:4},children:S==="asc"?"↑":"↓"}),P={padding:"12px 16px",textAlign:"left",fontSize:"12px",fontWeight:600,letterSpacing:"0.05em",textTransform:"uppercase",color:"var(--chakra-colors-text-muted, #6B7280)",fontFamily:"var(--font-body)",borderBottom:"1px solid var(--chakra-colors-border, #E2E8F0)",whiteSpace:"nowrap",userSelect:"none"},A={padding:"14px 16px",fontSize:"14px",color:"var(--chakra-colors-text-body, #374151)",fontFamily:"var(--font-body)",verticalAlign:"middle"};return l.jsx(p.Box,{border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",bg:"bg.surface",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},style:h,className:m,children:l.jsx(p.Box,{overflowX:"auto",children:l.jsxs("table",{style:{width:"100%",borderCollapse:"collapse"},"aria-label":f,children:[f&&l.jsx("caption",{style:{display:"none"},children:f}),l.jsx("thead",{children:l.jsx("tr",{style:{background:"var(--chakra-colors-bg-subtle, #F6F6F6)"},children:e.map(F=>l.jsx("th",{style:{...P,textAlign:F.align??"left",minWidth:F.minWidth,cursor:F.sortable||r?"pointer":"default"},onClick:()=>F.sortable||r?T(F.key):void 0,"aria-sort":v===F.key?S==="asc"?"ascending":"descending":void 0,children:l.jsxs("span",{style:{display:"inline-flex",alignItems:"center"},children:[F.label,(F.sortable||r)&&l.jsx(k,{colKey:F.key})]})},F.key))})}),l.jsx("tbody",{children:i?Array.from({length:5}).map((F,j)=>l.jsx("tr",{children:e.map(D=>l.jsx("td",{style:A,children:l.jsx(p.Box,{h:"4",bg:"bg.subtle",borderRadius:"full",w:`${60+Math.random()*30}%`,style:{animation:"medix-shimmer 1.5s infinite"}})},D.key))},j)):C.length===0?l.jsx("tr",{children:l.jsx("td",{colSpan:e.length,style:{...A,textAlign:"center",padding:"48px 16px"},children:l.jsx(p.Text,{color:"text.muted",fontFamily:"var(--font-body)",children:s})})}):C.map((F,j)=>{const D=String(F[n]??j);return l.jsx("tr",{onClick:()=>d==null?void 0:d(F,j),style:{background:u&&j%2===1?"var(--chakra-colors-bg-subtle, #F6F6F6)":void 0,cursor:d?"pointer":"default",borderBottom:"1px solid var(--chakra-colors-border, #E2E8F0)",transition:"background 0.1s"},onMouseEnter:E=>{d&&(E.currentTarget.style.background="var(--chakra-colors-bg-subtle, #F6F6F6)")},onMouseLeave:E=>{d&&(E.currentTarget.style.background="")},children:e.map(E=>l.jsx("td",{style:{...A,textAlign:E.align??"left"},children:E.render?E.render(F[E.key],F,j):String(F[E.key]??"—")},E.key))},D)})})]})})})}function eh({name:e,specialty:t,location:n,avatar:i,rating:s,reviewCount:r,consultationFee:o,isVerified:a=!1,isAvailable:c=!1,availabilityLabel:u="Available today",onBookClick:d,onViewClick:f,...h}){return l.jsxs(p.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},transition:"all 0.2s ease",_hover:{transform:"translateY(-2px)",boxShadow:"lg",borderColor:"blue.200"},...h,children:[l.jsxs(p.Box,{display:"flex",gap:"3",alignItems:"flex-start",children:[l.jsxs(p.Box,{position:"relative",flexShrink:0,children:[i?l.jsx("img",{src:i,alt:e,style:{width:56,height:56,borderRadius:"50%",objectFit:"cover",border:"2px solid var(--chakra-colors-border)",display:"block"}}):l.jsx(p.Box,{w:"14",h:"14",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"xl",fontWeight:"bold",color:"white",border:"2px solid",borderColor:"blue.200",children:e.charAt(0)}),c&&l.jsx(p.Box,{position:"absolute",bottom:"0",right:"0",w:"3.5",h:"3.5",bg:"green.500",borderRadius:"full",border:"2px solid",borderColor:"bg.surface"})]}),l.jsxs(p.Box,{flex:"1",children:[l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:"1.5",flexWrap:"wrap",children:[l.jsx(p.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),a&&l.jsx(p.Box,{color:"blue.500",fontSize:"md",title:"MDCN Verified",children:"✓"})]}),l.jsx(p.Box,{fontSize:"sm",color:"blue.500",fontFamily:"var(--font-body)",mt:"0.5",children:t}),n&&l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:"1",mt:"0.5",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[l.jsx(p.Box,{as:"span",children:"📍"}),l.jsx(p.Box,{as:"span",children:n})]})]}),c&&l.jsx(xt,{status:"success",size:"sm",children:u})]}),s!==void 0&&l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:"2",children:[l.jsx(p.Box,{display:"flex",gap:"0.5",children:Array.from({length:5}).map((m,g)=>l.jsx(p.Box,{as:"span",fontSize:"sm",color:g<Math.round(s)?"#F59E0B":"text.muted",children:"★"},g))}),l.jsx(p.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:s.toFixed(1)}),r!==void 0&&l.jsxs(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:["(",r," reviews)"]})]}),o&&l.jsxs(p.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",pt:"3",borderTop:"1px solid",borderColor:"border",mt:"auto",children:[l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),l.jsx(p.Box,{fontSize:"lg",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:o})]}),l.jsxs(p.Box,{display:"flex",gap:"2",children:[f&&l.jsx(p.Box,{as:"button",px:"3",py:"1.5",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",border:"1px solid",borderColor:"border",borderRadius:"md",bg:"transparent",color:"text.body",cursor:"pointer",transition:"all 0.15s",_hover:{borderColor:"blue.400",color:"blue.500"},onClick:f,children:"View"}),d&&l.jsx(p.Box,{as:"button",px:"4",py:"1.5",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-body)",bg:"blue.500",color:"white",borderRadius:"md",border:"none",cursor:"pointer",transition:"all 0.15s",_hover:{bg:"blue.600"},onClick:d,children:"Book"})]})]})]})}const th={normal:{bg:"rgba(27, 122, 56, 0.08)",dot:"#1B7A38",text:"#1B7A38"},warning:{bg:"rgba(217, 119, 6, 0.08)",dot:"#D97706",text:"#D97706"},critical:{bg:"rgba(220, 38, 38, 0.08)",dot:"#DC2626",text:"#DC2626"}};function nh({label:e,value:t,unit:n,status:i="normal",...s}){const r=th[i];return l.jsxs(p.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:"3",py:"2",borderRadius:"md",bg:r.bg,border:"1px solid",borderColor:`${r.dot}33`,...s,children:[l.jsx(p.Box,{w:"2",h:"2",borderRadius:"full",bg:r.dot,flexShrink:0}),l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"2xs",color:"text.muted",fontFamily:"var(--font-body)",textTransform:"uppercase",letterSpacing:"wide",children:e}),l.jsxs(p.Box,{display:"flex",alignItems:"baseline",gap:"1",children:[l.jsx(p.Box,{fontSize:"md",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-mono, monospace)",children:t}),n&&l.jsx(p.Box,{fontSize:"xs",color:r.text,fontFamily:"var(--font-body)",children:n})]})]})]})}const ih={upcoming:{label:"Upcoming",color:"info"},completed:{label:"Completed",color:"success"},cancelled:{label:"Cancelled",color:"error"}};function sh({doctorName:e,doctorSpecialty:t,doctorAvatar:n,date:i,time:s,type:r="video",status:o="upcoming",onCancel:a,onReschedule:c,onJoin:u,...d}){const f=ih[o];return l.jsxs(p.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",...d,children:[l.jsxs(p.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:"3",children:[n?l.jsx("img",{src:n,alt:e,style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",display:"block"}}):l.jsx(p.Box,{w:"10",h:"10",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"md",fontWeight:"bold",color:"white",children:e.charAt(0)}),l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),t&&l.jsx(p.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t})]})]}),l.jsx(xt,{status:f.color,size:"sm",children:f.label})]}),l.jsxs(p.Box,{display:"flex",gap:"4",py:"3",borderTop:"1px solid",borderBottom:"1px solid",borderColor:"border",children:[l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Date"}),l.jsx(p.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i})]}),l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Time"}),l.jsx(p.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:s})]}),l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Type"}),l.jsx(p.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",textTransform:"capitalize",children:r==="video"?"🎥 Video Call":"🏥 In-Person"})]})]}),o==="upcoming"&&l.jsxs(p.Box,{display:"flex",gap:"2",children:[u&&l.jsx(p.Box,{as:"button",flex:"1",py:"2",bg:"blue.500",color:"white",borderRadius:"md",border:"none",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-body)",cursor:"pointer",_hover:{bg:"blue.600"},transition:"all 0.15s",onClick:u,children:"Join Call"}),c&&l.jsx(p.Box,{as:"button",flex:"1",py:"2",bg:"transparent",color:"text.body",border:"1px solid",borderColor:"border",borderRadius:"md",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",cursor:"pointer",_hover:{borderColor:"blue.400",color:"blue.500"},transition:"all 0.15s",onClick:c,children:"Reschedule"}),a&&l.jsx(p.Box,{as:"button",py:"2",px:"3",bg:"transparent",color:"red.500",border:"1px solid",borderColor:"red.200",borderRadius:"md",fontSize:"sm",fontFamily:"var(--font-body)",cursor:"pointer",_hover:{bg:"red.50"},transition:"all 0.15s",onClick:a,children:"Cancel"})]})]})}Object.defineProperty(exports,"Box",{enumerable:!0,get:()=>p.Box});Object.defineProperty(exports,"Center",{enumerable:!0,get:()=>p.Center});Object.defineProperty(exports,"Flex",{enumerable:!0,get:()=>p.Flex});Object.defineProperty(exports,"Grid",{enumerable:!0,get:()=>p.Grid});Object.defineProperty(exports,"GridItem",{enumerable:!0,get:()=>p.GridItem});Object.defineProperty(exports,"HStack",{enumerable:!0,get:()=>p.HStack});Object.defineProperty(exports,"Heading",{enumerable:!0,get:()=>p.Heading});Object.defineProperty(exports,"Icon",{enumerable:!0,get:()=>p.Icon});Object.defineProperty(exports,"Image",{enumerable:!0,get:()=>p.Image});Object.defineProperty(exports,"Link",{enumerable:!0,get:()=>p.Link});Object.defineProperty(exports,"SimpleGrid",{enumerable:!0,get:()=>p.SimpleGrid});Object.defineProperty(exports,"Stack",{enumerable:!0,get:()=>p.Stack});Object.defineProperty(exports,"Text",{enumerable:!0,get:()=>p.Text});Object.defineProperty(exports,"VStack",{enumerable:!0,get:()=>p.VStack});Object.defineProperty(exports,"Wrap",{enumerable:!0,get:()=>p.Wrap});Object.defineProperty(exports,"WrapItem",{enumerable:!0,get:()=>p.WrapItem});exports.Accordion=Xf;exports.Alert=Pr;exports.AppointmentCard=sh;exports.Avatar=Bs;exports.AvatarGroup=Qr;exports.Badge=xt;exports.BlogCard=Jf;exports.Breadcrumb=Mf;exports.Button=be;exports.Card=Ws;exports.CardBody=xa;exports.CardFooter=ya;exports.CardHeader=ga;exports.Checkbox=Is;exports.Container=Ns;exports.DataTable=Qf;exports.DatePicker=ma;exports.Divider=Ps;exports.DoctorCard=eh;exports.Drawer=Yf;exports.EmptyState=Gf;exports.FormControl=fa;exports.FullPageSpinner=ea;exports.IconButton=js;exports.Input=mn;exports.Logo=Es;exports.MedixProvider=Yr;exports.Modal=Uf;exports.Navbar=Df;exports.OTPInput=Os;exports.Pagination=If;exports.PhoneInput=pa;exports.PinInput=ha;exports.Progress=Mr;exports.RadioGroup=la;exports.SearchInput=Ms;exports.SectionHeader=va;exports.Select=Vs;exports.Skeleton=ye;exports.SkeletonCard=Hf;exports.SkeletonText=Er;exports.Spinner=As;exports.StatCard=Hs;exports.Stepper=zf;exports.Switch=zs;exports.Tabs=Vf;exports.Tag=Ds;exports.TestimonialCard=Zf;exports.Textarea=Rs;exports.Tooltip=Kf;exports.VitalBadge=nh;exports.colorTokens=re;exports.medixConfig=Ts;exports.radiiTokens=ws;exports.shadowTokens=Cs;exports.spacingTokens=Ss;exports.system=Fs;exports.textStyleTokens=vs;exports.typographyTokens=Te;
|
|
195
|
+
`,document.head.appendChild(t)}}const Mr=w.forwardRef(({value:e,colorScheme:t="blue",size:n="md",showLabel:i=!1,animated:s=!0,isIndeterminate:r=!1,...o},a)=>{const c=Math.min(100,Math.max(0,e)),u=Nf[t],d=_f[n];return l.jsxs(p.Box,{ref:a,w:"100%",...o,children:[i&&l.jsxs(p.Box,{display:"flex",justifyContent:"space-between",mb:"1",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[l.jsx("span",{children:"Progress"}),l.jsxs("span",{children:[c,"%"]})]}),l.jsx(p.Box,{w:"100%",h:d,bg:"bg.subtle",borderRadius:"full",overflow:"hidden",position:"relative",children:r?l.jsx(p.Box,{position:"absolute",h:"100%",w:"40%",bg:u,borderRadius:"full",style:{animation:"medix-indeterminate 1.5s linear infinite"}}):l.jsx(p.Box,{h:"100%",w:`${c}%`,bg:u,borderRadius:"full",transition:s?"width 0.6s cubic-bezier(0.4, 0, 0.2, 1)":"none",position:"relative"})})]})});Mr.displayName="MedixProgress";const $f={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl",full:"full"};function Uf({isOpen:e,onClose:t,title:n,description:i,size:s="md",closeOnOverlayClick:r=!0,footer:o,children:a}){return l.jsxs(p.DialogRoot,{open:e,onOpenChange:c=>{c.open||t()},closeOnInteractOutside:r,size:$f[s],children:[l.jsx(p.DialogBackdrop,{bg:"rgba(10, 18, 32, 0.7)",backdropFilter:"blur(4px)"}),l.jsx(p.DialogPositioner,{children:l.jsxs(p.DialogContent,{bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"modal",boxShadow:"xl",children:[(n||i)&&l.jsxs(p.DialogHeader,{borderBottom:"1px solid",borderColor:"border",px:"6",py:"4",children:[n&&l.jsx(p.DialogTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:n}),i&&l.jsx(p.DialogDescription,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:i}),l.jsx(p.DialogCloseTrigger,{position:"absolute",top:"4",right:"4",w:"8",h:"8",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"md",color:"text.muted",_hover:{bg:"bg.subtle",color:"text.heading"},transition:"all 0.15s"})]}),l.jsx(p.DialogBody,{px:"6",py:"5",children:a}),o&&l.jsx(p.DialogFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",children:o})]})})]})}function Kf({label:e,children:t,placement:n="top",...i}){return l.jsxs(p.Tooltip.Root,{positioning:{placement:n},...i,children:[l.jsx(p.Tooltip.Trigger,{asChild:!0,children:l.jsx("span",{style:{display:"inline-flex"},children:t})}),l.jsx(p.Tooltip.Positioner,{children:l.jsx(p.Tooltip.Content,{bg:"gray.900",color:"white",borderRadius:"md",px:"3",py:"1.5",fontSize:"xs",fontFamily:"var(--font-body)",boxShadow:"lg",children:e})})]})}function Gf({icon:e,title:t,description:n,actionLabel:i,onAction:s,secondaryLabel:r,onSecondaryAction:o,...a}){return l.jsxs(p.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",py:"16",px:"8",gap:"4",...a,children:[e&&l.jsx(p.Box,{w:"16",h:"16",borderRadius:"full",bg:"bg.subtle",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"3xl",color:"text.muted",mb:"2",children:e}),l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"xl",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"2",children:t}),n&&l.jsx(p.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"360px",lineHeight:"loose",children:n})]}),(i||r)&&l.jsxs(p.Box,{display:"flex",gap:"3",mt:"2",children:[i&&l.jsx(be,{variant:"solid",colorScheme:"blue",onClick:s,children:i}),r&&l.jsx(be,{variant:"ghost",colorScheme:"blue",onClick:o,children:r})]})]})}function Yf({isOpen:e,onClose:t,title:n,placement:i="right",size:s="md",closeOnOverlayClick:r=!0,footer:o,children:a}){return l.jsxs(p.DrawerRoot,{open:e,onOpenChange:c=>{c.open||t()},placement:i,size:s,closeOnInteractOutside:r,children:[l.jsx(p.DrawerBackdrop,{bg:"rgba(10, 18, 32, 0.6)",backdropFilter:"blur(2px)"}),l.jsx(p.DrawerPositioner,{children:l.jsxs(p.DrawerContent,{bg:"bg",borderColor:"border",boxShadow:"2xl",children:[n&&l.jsxs(p.DrawerHeader,{borderBottom:"1px solid",borderColor:"border",px:"6",py:"4",children:[l.jsx(p.DrawerTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:n}),l.jsx(p.DrawerCloseTrigger,{position:"absolute",top:"4",right:"4",w:"8",h:"8",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"md",color:"text.muted",_hover:{bg:"bg.subtle",color:"text.heading"},transition:"all 0.15s"})]}),l.jsx(p.DrawerBody,{px:"6",py:"5",children:a}),o&&l.jsx(p.DrawerFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",children:o})]})})]})}function Xf({items:e,allowMultiple:t=!1,defaultOpenIds:n=[],...i}){const[s,r]=w.useState(new Set(n)),o=a=>{r(c=>{const u=new Set(c);return u.has(a)?u.delete(a):(t||u.clear(),u.add(a)),u})};return l.jsx(p.Box,{display:"flex",flexDirection:"column",gap:"4",...i,children:e.map(a=>{const c=s.has(a.id);return l.jsxs(p.Box,{bg:"bg.primary",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",transition:"border-color 0.2s",_hover:{borderColor:c?"blue.500":"border"},children:[l.jsxs(p.Box,{as:"button",w:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"4",px:"6",py:"5",bg:"transparent",border:"none",cursor:"pointer",textAlign:"left",onClick:()=>o(a.id),"aria-expanded":c,children:[l.jsx(p.Box,{fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",flex:"1",lineHeight:"short",children:a.question}),l.jsx(p.Box,{flexShrink:0,w:"10",h:"10",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",transition:"background 0.2s, border-color 0.2s, color 0.2s","aria-hidden":"true",style:{border:c?"none":"1.5px solid var(--medix-form-text)",background:c?"#0685FF":"transparent",color:c?"#ffffff":"inherit",flexShrink:0},children:c?l.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:l.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:" var(--medix-form-text)"})}):l.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:[l.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:" var(--medix-form-text)"}),l.jsx("rect",{x:"8.25",y:"3",width:"1.5",height:"12",rx:"0.75",fill:" var(--medix-form-text)"})]})})]}),l.jsx(p.Box,{overflow:"hidden",maxH:c?"800px":"0px",opacity:c?1:0,transition:"max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease",children:l.jsx(p.Box,{px:"6",pb:"6",pt:"0",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",children:a.answer})})]},a.id)})})}function Zf({quote:e,authorName:t,authorTitle:n,authorAvatar:i,rating:s,...r}){return l.jsxs(p.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},...r,children:[s!==void 0&&l.jsx(p.Box,{display:"flex",gap:"0.5",children:Array.from({length:5}).map((o,a)=>l.jsx(p.Box,{as:"span",fontSize:"sm",color:a<s?"#F59E0B":"text.muted",children:"★"},a))}),l.jsxs(p.Box,{as:"blockquote",m:"0",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",fontStyle:"italic",children:['"',e,'"']}),l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:"3",mt:"auto",children:[i?l.jsx("img",{src:i,alt:t,style:{width:36,height:36,borderRadius:"50%",objectFit:"cover"}}):l.jsx(p.Box,{w:"9",h:"9",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"sm",fontWeight:"semibold",color:"white",flexShrink:0,children:t.charAt(0).toUpperCase()}),l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:t}),n&&l.jsx(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n})]})]})]})}function qf(e){if(!e)return null;try{const t=new Date(e);return isNaN(t.getTime())?null:{day:String(t.getUTCDate()),weekday:t.toLocaleDateString("en-US",{weekday:"short",timeZone:"UTC"}).toUpperCase()}}catch{return null}}function Jf({title:e,excerpt:t,category:n,date:i,coverImage:s,href:r,onClick:o,...a}){const c=!!(r||o),u=qf(i),d={display:"block",textDecoration:"none",background:"transparent",border:"none",padding:0,cursor:c?"pointer":"default",width:"100%",textAlign:"left"},f=l.jsxs(p.Box,{bg:"bg.primary",borderRadius:"card",overflow:"hidden",transition:"transform 0.22s ease, box-shadow 0.22s ease",_dark:{bg:"bg.primary"},_hover:c?{transform:"translateY(-4px)"}:void 0,...a,children:[l.jsxs(p.Box,{position:"relative",overflow:"hidden",children:[s?l.jsx("img",{src:s,alt:e,style:{width:"100%",height:220,objectFit:"cover",display:"block"}}):l.jsx(p.Box,{borderRadius:"card",h:"220px",style:{background:"linear-gradient(135deg, #0685FF 0%, #7700CC 100%)"}}),u&&l.jsxs(p.Box,{position:"absolute",bottom:"3",right:"3",bg:"white",borderRadius:"10px",px:"3",py:"2",display:"flex",flexDirection:"column",alignItems:"center",minW:"44px",boxShadow:"0 2px 8px rgba(0,0,0,0.16)",children:[l.jsx(p.Box,{style:{fontSize:22,fontWeight:700,color:"#0685FF",lineHeight:1,fontFamily:"var(--font-heading)"},children:u.day}),l.jsx(p.Box,{style:{fontSize:10,fontWeight:600,color:"#6B7280",letterSpacing:"0.08em",marginTop:2,fontFamily:"var(--font-body)"},children:u.weekday})]})]}),l.jsxs(p.Box,{px:"4",pt:"3",pb:"4",children:[n&&l.jsx(p.Box,{display:"inline-flex",alignItems:"center",px:"3",py:"1",mb:"3",borderRadius:"full",bg:"blue.500",color:"white",fontSize:"xs",fontWeight:"medium",fontFamily:"var(--font-body)",letterSpacing:"wide",children:n}),l.jsx(p.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",mb:t?"2":"0",children:e}),t&&l.jsx(p.Box,{fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"relaxed",style:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:t})]})]});return r?l.jsx("a",{href:r,style:d,onClick:o,children:f}):o?l.jsx("button",{type:"button",style:d,onClick:o,children:f}):f}function Qf({columns:e,data:t,rowKey:n="id",isLoading:i=!1,emptyMessage:s="No data available",sortable:r=!1,sortKey:o,sortDirection:a="asc",onSort:c,striped:u=!1,onRowClick:d,caption:f,style:h,className:m}){const[g,x]=w.useState(o),[y,b]=w.useState(a),v=o??g,S=o?a:y,T=F=>{const j=v===F&&S==="asc"?"desc":"asc";x(F),b(j),c==null||c(F,j)},C=w.useMemo(()=>!v||c?t:[...t].sort((F,j)=>{const D=F[v],E=j[v],U=String(D??""),K=String(E??""),G=U.localeCompare(K,void 0,{numeric:!0,sensitivity:"base"});return S==="asc"?G:-G}),[t,v,S,c]),k=({colKey:F})=>v!==F?l.jsx("span",{style:{opacity:.3,marginLeft:4},children:"↕"}):l.jsx("span",{style:{marginLeft:4},children:S==="asc"?"↑":"↓"}),P={padding:"12px 16px",textAlign:"left",fontSize:"12px",fontWeight:600,letterSpacing:"0.05em",textTransform:"uppercase",color:"var(--chakra-colors-text-muted, #6B7280)",fontFamily:"var(--font-body)",borderBottom:"1px solid var(--chakra-colors-border, #E2E8F0)",whiteSpace:"nowrap",userSelect:"none"},A={padding:"14px 16px",fontSize:"14px",color:"var(--chakra-colors-text-body, #374151)",fontFamily:"var(--font-body)",verticalAlign:"middle"};return l.jsx(p.Box,{border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",bg:"bg.surface",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},style:h,className:m,children:l.jsx(p.Box,{overflowX:"auto",children:l.jsxs("table",{style:{width:"100%",borderCollapse:"collapse"},"aria-label":f,children:[f&&l.jsx("caption",{style:{display:"none"},children:f}),l.jsx("thead",{children:l.jsx("tr",{style:{background:"var(--chakra-colors-bg-subtle, #F6F6F6)"},children:e.map(F=>l.jsx("th",{style:{...P,textAlign:F.align??"left",minWidth:F.minWidth,cursor:F.sortable||r?"pointer":"default"},onClick:()=>F.sortable||r?T(F.key):void 0,"aria-sort":v===F.key?S==="asc"?"ascending":"descending":void 0,children:l.jsxs("span",{style:{display:"inline-flex",alignItems:"center"},children:[F.label,(F.sortable||r)&&l.jsx(k,{colKey:F.key})]})},F.key))})}),l.jsx("tbody",{children:i?Array.from({length:5}).map((F,j)=>l.jsx("tr",{children:e.map(D=>l.jsx("td",{style:A,children:l.jsx(p.Box,{h:"4",bg:"bg.subtle",borderRadius:"full",w:`${60+Math.random()*30}%`,style:{animation:"medix-shimmer 1.5s infinite"}})},D.key))},j)):C.length===0?l.jsx("tr",{children:l.jsx("td",{colSpan:e.length,style:{...A,textAlign:"center",padding:"48px 16px"},children:l.jsx(p.Text,{color:"text.muted",fontFamily:"var(--font-body)",children:s})})}):C.map((F,j)=>{const D=String(F[n]??j);return l.jsx("tr",{onClick:()=>d==null?void 0:d(F,j),style:{background:u&&j%2===1?"var(--chakra-colors-bg-subtle, #F6F6F6)":void 0,cursor:d?"pointer":"default",borderBottom:"1px solid var(--chakra-colors-border, #E2E8F0)",transition:"background 0.1s"},onMouseEnter:E=>{d&&(E.currentTarget.style.background="var(--chakra-colors-bg-subtle, #F6F6F6)")},onMouseLeave:E=>{d&&(E.currentTarget.style.background="")},children:e.map(E=>l.jsx("td",{style:{...A,textAlign:E.align??"left"},children:E.render?E.render(F[E.key],F,j):String(F[E.key]??"—")},E.key))},D)})})]})})})}function eh({name:e,specialty:t,location:n,avatar:i,rating:s,reviewCount:r,consultationFee:o,isVerified:a=!1,isAvailable:c=!1,availabilityLabel:u="Available today",onBookClick:d,onViewClick:f,...h}){return l.jsxs(p.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},transition:"all 0.2s ease",_hover:{transform:"translateY(-2px)",boxShadow:"lg",borderColor:"blue.200"},...h,children:[l.jsxs(p.Box,{display:"flex",gap:"3",alignItems:"flex-start",children:[l.jsxs(p.Box,{position:"relative",flexShrink:0,children:[i?l.jsx("img",{src:i,alt:e,style:{width:56,height:56,borderRadius:"50%",objectFit:"cover",border:"2px solid var(--chakra-colors-border)",display:"block"}}):l.jsx(p.Box,{w:"14",h:"14",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"xl",fontWeight:"bold",color:"white",border:"2px solid",borderColor:"blue.200",children:e.charAt(0)}),c&&l.jsx(p.Box,{position:"absolute",bottom:"0",right:"0",w:"3.5",h:"3.5",bg:"green.500",borderRadius:"full",border:"2px solid",borderColor:"bg.surface"})]}),l.jsxs(p.Box,{flex:"1",children:[l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:"1.5",flexWrap:"wrap",children:[l.jsx(p.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),a&&l.jsx(p.Box,{color:"blue.500",fontSize:"md",title:"MDCN Verified",children:"✓"})]}),l.jsx(p.Box,{fontSize:"sm",color:"blue.500",fontFamily:"var(--font-body)",mt:"0.5",children:t}),n&&l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:"1",mt:"0.5",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[l.jsx(p.Box,{as:"span",children:"📍"}),l.jsx(p.Box,{as:"span",children:n})]})]}),c&&l.jsx(xt,{status:"success",size:"sm",children:u})]}),s!==void 0&&l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:"2",children:[l.jsx(p.Box,{display:"flex",gap:"0.5",children:Array.from({length:5}).map((m,g)=>l.jsx(p.Box,{as:"span",fontSize:"sm",color:g<Math.round(s)?"#F59E0B":"text.muted",children:"★"},g))}),l.jsx(p.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:s.toFixed(1)}),r!==void 0&&l.jsxs(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:["(",r," reviews)"]})]}),o&&l.jsxs(p.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",pt:"3",borderTop:"1px solid",borderColor:"border",mt:"auto",children:[l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),l.jsx(p.Box,{fontSize:"lg",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:o})]}),l.jsxs(p.Box,{display:"flex",gap:"2",children:[f&&l.jsx(p.Box,{as:"button",px:"3",py:"1.5",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",border:"1px solid",borderColor:"border",borderRadius:"md",bg:"transparent",color:"text.body",cursor:"pointer",transition:"all 0.15s",_hover:{borderColor:"blue.400",color:"blue.500"},onClick:f,children:"View"}),d&&l.jsx(p.Box,{as:"button",px:"4",py:"1.5",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-body)",bg:"blue.500",color:"white",borderRadius:"md",border:"none",cursor:"pointer",transition:"all 0.15s",_hover:{bg:"blue.600"},onClick:d,children:"Book"})]})]})]})}const th={normal:{bg:"rgba(27, 122, 56, 0.08)",dot:"#1B7A38",text:"#1B7A38"},warning:{bg:"rgba(217, 119, 6, 0.08)",dot:"#D97706",text:"#D97706"},critical:{bg:"rgba(220, 38, 38, 0.08)",dot:"#DC2626",text:"#DC2626"}};function nh({label:e,value:t,unit:n,status:i="normal",...s}){const r=th[i];return l.jsxs(p.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:"3",py:"2",borderRadius:"md",bg:r.bg,border:"1px solid",borderColor:`${r.dot}33`,...s,children:[l.jsx(p.Box,{w:"2",h:"2",borderRadius:"full",bg:r.dot,flexShrink:0}),l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"2xs",color:"text.muted",fontFamily:"var(--font-body)",textTransform:"uppercase",letterSpacing:"wide",children:e}),l.jsxs(p.Box,{display:"flex",alignItems:"baseline",gap:"1",children:[l.jsx(p.Box,{fontSize:"md",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-mono, monospace)",children:t}),n&&l.jsx(p.Box,{fontSize:"xs",color:r.text,fontFamily:"var(--font-body)",children:n})]})]})]})}const ih={upcoming:{label:"Upcoming",color:"info"},completed:{label:"Completed",color:"success"},cancelled:{label:"Cancelled",color:"error"}};function sh({doctorName:e,doctorSpecialty:t,doctorAvatar:n,date:i,time:s,type:r="video",status:o="upcoming",onCancel:a,onReschedule:c,onJoin:u,...d}){const f=ih[o];return l.jsxs(p.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",...d,children:[l.jsxs(p.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:"3",children:[n?l.jsx("img",{src:n,alt:e,style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",display:"block"}}):l.jsx(p.Box,{w:"10",h:"10",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"md",fontWeight:"bold",color:"white",children:e.charAt(0)}),l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),t&&l.jsx(p.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t})]})]}),l.jsx(xt,{status:f.color,size:"sm",children:f.label})]}),l.jsxs(p.Box,{display:"flex",gap:"4",py:"3",borderTop:"1px solid",borderBottom:"1px solid",borderColor:"border",children:[l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Date"}),l.jsx(p.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i})]}),l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Time"}),l.jsx(p.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:s})]}),l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Type"}),l.jsx(p.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",textTransform:"capitalize",children:r==="video"?"🎥 Video Call":"🏥 In-Person"})]})]}),o==="upcoming"&&l.jsxs(p.Box,{display:"flex",gap:"2",children:[u&&l.jsx(p.Box,{as:"button",flex:"1",py:"2",bg:"blue.500",color:"white",borderRadius:"md",border:"none",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-body)",cursor:"pointer",_hover:{bg:"blue.600"},transition:"all 0.15s",onClick:u,children:"Join Call"}),c&&l.jsx(p.Box,{as:"button",flex:"1",py:"2",bg:"transparent",color:"text.body",border:"1px solid",borderColor:"border",borderRadius:"md",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",cursor:"pointer",_hover:{borderColor:"blue.400",color:"blue.500"},transition:"all 0.15s",onClick:c,children:"Reschedule"}),a&&l.jsx(p.Box,{as:"button",py:"2",px:"3",bg:"transparent",color:"red.500",border:"1px solid",borderColor:"red.200",borderRadius:"md",fontSize:"sm",fontFamily:"var(--font-body)",cursor:"pointer",_hover:{bg:"red.50"},transition:"all 0.15s",onClick:a,children:"Cancel"})]})]})}Object.defineProperty(exports,"Box",{enumerable:!0,get:()=>p.Box});Object.defineProperty(exports,"Center",{enumerable:!0,get:()=>p.Center});Object.defineProperty(exports,"Flex",{enumerable:!0,get:()=>p.Flex});Object.defineProperty(exports,"Grid",{enumerable:!0,get:()=>p.Grid});Object.defineProperty(exports,"GridItem",{enumerable:!0,get:()=>p.GridItem});Object.defineProperty(exports,"HStack",{enumerable:!0,get:()=>p.HStack});Object.defineProperty(exports,"Heading",{enumerable:!0,get:()=>p.Heading});Object.defineProperty(exports,"Icon",{enumerable:!0,get:()=>p.Icon});Object.defineProperty(exports,"Image",{enumerable:!0,get:()=>p.Image});Object.defineProperty(exports,"Link",{enumerable:!0,get:()=>p.Link});Object.defineProperty(exports,"SimpleGrid",{enumerable:!0,get:()=>p.SimpleGrid});Object.defineProperty(exports,"Stack",{enumerable:!0,get:()=>p.Stack});Object.defineProperty(exports,"Text",{enumerable:!0,get:()=>p.Text});Object.defineProperty(exports,"VStack",{enumerable:!0,get:()=>p.VStack});Object.defineProperty(exports,"Wrap",{enumerable:!0,get:()=>p.Wrap});Object.defineProperty(exports,"WrapItem",{enumerable:!0,get:()=>p.WrapItem});exports.Accordion=Xf;exports.Alert=Pr;exports.AppointmentCard=sh;exports.Avatar=Bs;exports.AvatarGroup=Qr;exports.Badge=xt;exports.BlogCard=Jf;exports.Breadcrumb=Mf;exports.Button=be;exports.Card=Ws;exports.CardBody=xa;exports.CardFooter=ya;exports.CardHeader=ga;exports.Checkbox=Is;exports.Container=Ns;exports.DataTable=Qf;exports.DatePicker=ma;exports.Divider=Ps;exports.DoctorCard=eh;exports.Drawer=Yf;exports.EmptyState=Gf;exports.FormControl=fa;exports.FullPageSpinner=ea;exports.IconButton=js;exports.Input=mn;exports.Logo=Es;exports.MedixProvider=Yr;exports.Modal=Uf;exports.Navbar=Df;exports.OTPInput=Os;exports.Pagination=If;exports.PhoneInput=pa;exports.PinInput=ha;exports.Progress=Mr;exports.RadioGroup=la;exports.SearchInput=Ms;exports.SectionHeader=va;exports.Select=Vs;exports.Skeleton=ye;exports.SkeletonCard=Hf;exports.SkeletonText=Er;exports.Spinner=As;exports.StatCard=Hs;exports.Stepper=zf;exports.Switch=zs;exports.Tabs=Vf;exports.Tag=Ds;exports.TestimonialCard=Zf;exports.Textarea=Rs;exports.Tooltip=Kf;exports.VitalBadge=nh;exports.colorTokens=re;exports.medixConfig=Ts;exports.radiiTokens=ws;exports.shadowTokens=Cs;exports.spacingTokens=Ss;exports.system=Fs;exports.textStyleTokens=vs;exports.typographyTokens=Te;
|
|
196
196
|
//# sourceMappingURL=index.cjs.map
|