PageSourceSearch

https://meetborderless.com/build/assets/JourneyStepperCard-t6nvnBHJ.js

js meetborderless.com collected 2026-10-09 22:43:16 UTC 5,906 bytes, 1 lines download raw bytes

1import{j as e}from"./app-C1iegf7Q.js";import{b as N,L as u,f as b}from"./inertia-BpyZy4w-.js";import{a as c}from"./utils-BiuKVCuu.js";import{M as v}from"./map-BNV3OJ1S.js";import{C as k}from"./circle-check-BMWvzPMx.js";import{C as w}from"./chevron-down-B1YaU0K5.js";import{A as f}from"./arrow-right-CQhEyoMD.js";import{C as _}from"./check-0O-UND6N.js";import{L as C}from"./lock-eEI5w3jQ.js";import{C as y}from"./circle-CLXJbTMk.js";import{E as I}from"./external-link-avvfS30C.js";/* empty css            */import"./createLucideIcon-wqc1LSWg.js";function q({stepper:s}){const o=s?.steps.findIndex(t=>t.status==="current")??-1,[i,x]=N.useState(o>=0?o:0);if(!s||s.steps.length===0)return null;const d=t=>{x(i===t?null:t)};return e.jsxs("div",{className:"dash-card p-5",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(v,{className:"h-4 w-4 text-app-lime"}),e.jsx("span",{className:"text-2xs font-bold uppercase tracking-[1.5px] text-app-lime",children:s.title})]}),e.jsxs("span",{className:"text-xs text-app-text3",children:["Step ",o>=0?o+1:s.steps.length," of ",s.steps.length]})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"h-1 w-full rounded-full bg-app-surface2 overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full bg-app-lime transition-all duration-500",style:{width:`${Math.max(s.overall_progress,2)}%`}})}),e.jsxs("p",{className:"text-2xs text-app-text3 mt-1",children:[Math.round(s.overall_progress),"% complete"]})]}),e.jsx("div",{className:"space-y-0",children:s.steps.map((t,n)=>{const p=n===s.steps.length-1,a=t.status==="done",l=t.status==="current",r=i===n,h=t.items&&t.items.length>0,g=t.items?.filter(m=>m.is_completed).length??0,j=t.items?.length??0;return e.jsx("div",{children:e.jsxs("div",{className:"flex gap-3",children:[e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("div",{className:`flex h-6 w-6 items-center justify-center rounded-full text-2xs font-bold shrink-0 ${a?"bg-dash-teal text-app-bg":l?"bg-app-lime text-app-bg":"bg-app-surface2 text-app-text2"}`,children:a?e.jsx(k,{className:"h-3.5 w-3.5"}):n+1}),!p&&e.jsx("div",{className:`w-px flex-1 my-1 ${a?"bg-dash-teal/40":"bg-app-border"}`})]}),e.jsxs("div",{className:`flex-1 min-w-0 ${p&&!r?"pb-0":"pb-3"}`,children:[e.jsxs("button",{onClick:()=>d(n),className:"flex items-center gap-2 w-full text-left cursor-pointer group",children:[e.jsxs("p",{className:c("text-sm font-semibold flex-1",a&&"text-dash-teal",l&&"text-app-text",!a&&!l&&"text-app-text2"),children:[t.label,t.is_gated&&!a&&e.jsx("span",{className:"ml-1.5 text-3xs font-bold text-dash-gold bg-dash-gold/10 px-1.5 py-0.5 rounded",children:"Adviser review"})]}),h&&e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[e.jsxs("span",{className:c("text-2xs font-medium",a?"text-dash-teal":"text-app-text3"),children:[g,"/",j]}),e.jsx(w,{className:c("h-3.5 w-3.5 text-app-text3 transition-transform",r&&"rotate-180")})]})]}),r&&h&&e.jsx("div",{className:"mt-2.5 space-y-1",children:t.items.map(m=>e.jsx(E,{item:m,stepDone:a},m.id))}),!r&&l&&t.progress&&t.progress.total>0&&e.jsx("div",{className:"mt-1.5",children:e.jsx("div",{className:"h-1 w-full max-w-[160px] rounded-full bg-app-surface2 overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full bg-app-lime/60 transition-all",style:{width:`${t.progress.percentage}%`}})})})]})]})},t.key)})}),e.jsxs(u,{href:"/tasks",className:"group flex items-center gap-2 mt-4 pt-3 border-t border-app-border no-underline",children:[e.jsx("span",{className:"text-xs font-bold text-app-text2 group-hover:text-app-text",children:"View all tasks"}),e.jsx(f,{className:"h-3 w-3 text-app-text3 ml-auto transition-transform group-hover:translate-x-0.5"})]})]})}function E({item:s,stepDone:o}){const i=!!s.completion_trigger,x=!!s.external_url,d=l=>{l.preventDefault(),l.stopPropagation(),!s.is_locked&&b.post(`/checklists/item/${s.id}/toggle`,{completed:!s.is_completed},{preserveScroll:!0})},t=e.jsx("button",{onClick:d,className:"shrink-0 mt-0.5 cursor-pointer",disabled:s.is_locked,title:s.is_completed?"Mark as not done":"Mark as done",children:s.is_completed?e.jsx(_,{className:"h-4 w-4 text-dash-teal"}):s.is_locked?e.jsx(C,{className:"h-4 w-4 text-app-text3"}):e.jsx(y,{className:"h-4 w-4 text-app-text3 hover:text-app-text2"})}),n=e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:c("text-sm leading-tight",s.is_completed?"text-dash-teal line-through":"text-app-text"),children:s.title}),!s.is_completed&&!o&&s.description&&e.jsx("p",{className:"text-xs text-app-text3 mt-0.5 line-clamp-2",children:s.description}),!s.is_completed&&!s.is_locked&&e.jsx("button",{onClick:d,className:"text-2xs font-medium text-app-text3 hover:text-app-text2 mt-0.5 inline-block cursor-pointer",children:"Mark as done"}),i&&!s.is_completed&&e.jsx("span",{className:"text-2xs text-app-lime/60 ml-2 inline-block",children:"Also completes automatically"})]}),p=x?s.external_url.startsWith("http")?e.jsx(I,{className:"h-3.5 w-3.5 shrink-0 mt-0.5 text-app-text3"}):e.jsx(f,{className:"h-3.5 w-3.5 shrink-0 mt-0.5 text-app-text3"}):null,a=c("flex items-start gap-2.5 rounded-lg px-2.5 py-2 transition-colors",s.is_completed&&"bg-dash-teal/[0.04]",s.is_locked&&!s.is_completed&&"opacity-50",!s.is_completed&&!s.is_locked&&"hover:bg-app-surface2/50");if(x){const l=s.external_url.startsWith("http")?r=>e.jsx("a",{href:s.external_url,target:"_blank",rel:"noopener noreferrer",className:"no-underline flex-1 min-w-0 flex items-start gap-2.5",children:r}):r=>e.jsx(u,{href:s.external_url,className:"no-underline flex-1 min-w-0 flex items-start gap-2.5",children:r});return e.jsxs("div",{className:a,children:[t,l(e.jsxs(e.Fragment,{children:[n,p]}))]})}return e.jsxs("div",{className:a,children:[t,n]})}export{q as JourneyStepperCard};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.