{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"team-invite","type":"registry:block","title":"Team Invite","description":"Connected teammates – a cursor drags a new one into the empty slot, the line turns solid and they go online","dependencies":[],"files":[{"path":"illustrations/team-invite/team-invite.tsx","type":"registry:block","content":"\"use client\";\n\nimport { useId } from \"react\";\n\n/*\n * Team Invite – a small card illustration, in a single self-contained file.\n * Two connected teammates and an empty dashed slot. A cursor drags a third avatar into the slot:\n * it lands, the dashed line turns solid and the status dot lights up – then the scene starts over.\n * The artwork is laid out on a 600 × 400 grid inside a 3 : 2 frame and scales with its container.\n */\n\nexport type TeamInviteAvatar = {\n  /** Image URL – a square portrait, shown in a circle */\n  src: string;\n  /** Name for the accessible description */\n  name?: string;\n};\n\nexport type TeamInviteProps = {\n  /** The two teammates that are already connected, then the one being invited */\n  avatars: [TeamInviteAvatar, TeamInviteAvatar, TeamInviteAvatar];\n  className?: string;\n  /** Accessible description of the scene */\n  label?: string;\n};\n\nexport function TeamInvite({ avatars, className, label }: TeamInviteProps) {\n  const id = \"ui-ti\" + useId().replace(/[^a-zA-Z0-9_-]/g, \"\");\n  const [a, b, c] = avatars;\n  const names = avatars.map((p, i) => p.name ?? `Teammate ${i + 1}`);\n\n  return (\n    <div\n      className={[\"ui-ti\", className].filter(Boolean).join(\" \")}\n      role=\"img\"\n      aria-label={label ?? `${names[0]} and ${names[1]} are connected; ${names[2]} is dragged into the empty slot and joins the team`}\n    >\n      {/* React 19 hoists this into <head> once, no matter how many instances render */}\n      <style href=\"ui-team-invite\" precedence=\"default\">\n        {css}\n      </style>\n\n      <svg className=\"ui-ti-lines\" viewBox=\"0 0 600 400\" aria-hidden=\"true\">\n        <defs>\n          <linearGradient id={`${id}-line`} x1=\"0\" y1=\"0\" x2=\"1\" y2=\"0\">\n            <stop offset=\"0%\" className=\"ui-ti-stop-a\" />\n            <stop offset=\"100%\" className=\"ui-ti-stop-b\" />\n          </linearGradient>\n        </defs>\n        {/* Already connected */}\n        <path className=\"ui-ti-line\" d=\"M162 159C214 159 222 105 258 105\" stroke={`url(#${id}-line)`} />\n        {/* The open invite: dashed while waiting, drawn solid once the avatar lands */}\n        <path className=\"ui-ti-line ui-ti-line--dashed\" d=\"M162 159C214 165 214 245 248 245\" />\n        <path className=\"ui-ti-line ui-ti-line--joined\" d=\"M162 159C214 165 214 245 248 245\" pathLength={1} stroke={`url(#${id}-line)`} />\n        {/* Empty slot – same stroke, dash and gap as the dashed line (19 dashes fit the circle exactly) */}\n        <g className=\"ui-ti-slot\">\n          <circle className=\"ui-ti-line ui-ti-line--slot\" cx=\"290\" cy=\"245\" r=\"40\" />\n          <path className=\"ui-ti-plus\" d=\"M290 234v22M279 245h22\" />\n        </g>\n      </svg>\n\n      <Node className=\"ui-ti-node--a\" avatar={a} online />\n      <Node className=\"ui-ti-node--b\" avatar={b} online />\n\n      {/* Dragged from the right into the slot, with the cursor holding on */}\n      <div className=\"ui-ti-drag\" aria-hidden=\"true\">\n        <Node className=\"ui-ti-node--c\" avatar={c} online />\n        {/* Pointer with soft, rounded corners; its tip sits at (0, 0) of the viewBox */}\n        <svg className=\"ui-ti-cursor\" viewBox=\"-2.186 -0.256 18.514 22.277\" aria-hidden=\"true\">\n          <path\n            transform=\"rotate(21.37)\"\n            d=\"M13.92 4.07c1.69.66 3.03 1.18 3.94 1.68.46.25.87.53 1.16.86.31.35.51.79.48 1.29-.03.51-.27.92-.62 1.23-.33.3-.77.53-1.25.74-.96.4-2.36.78-4.12 1.26-.56.15-.98.27-1.26.37-.26.1-.38.18-.47.27-.09.09-.17.21-.27.47-.1.28-.22.7-.37 1.26-.48 1.76-.86 3.16-1.26 4.12-.2.49-.44.93-.74 1.25-.32.35-.72.6-1.23.62-.51.03-.94-.17-1.29-.48-.33-.29-.61-.7-.86-1.16-.5-.91-1.02-2.25-1.68-3.94L1.66 7.76C.96 5.99.41 4.59.16 3.51-.09 2.44-.12 1.39.63.63 1.39-.12 2.44-.09 3.51.16c1.08.25 2.48.8 4.25 1.5l6.16 2.41Z\"\n          />\n        </svg>\n      </div>\n    </div>\n  );\n}\n\nfunction Node({ avatar, online, className }: { avatar: TeamInviteAvatar; online?: boolean; className: string }) {\n  return (\n    <div className={`ui-ti-node ${className}`} aria-hidden=\"true\">\n      <span className=\"ui-ti-face\">\n        <img src={avatar.src} alt=\"\" draggable={false} />\n      </span>\n      {online && <span className=\"ui-ti-dot\" />}\n    </div>\n  );\n}\n\n/* ---------- Styles ---------- */\n\nconst css = /* css */ `\n.ui-ti {\n  /* 1 unit of the 600 × 400 layout grid */\n  --u: calc(100cqw / 600);\n  --ui-ti-bubble: #ffffff;\n  --ui-ti-bubble-ring: rgba(10, 10, 10, 0.06);\n  --ui-ti-face: #eef0f4;\n  /* Same gray as the lines in Outreach Branches */\n  --ui-ti-line-a: #e4e7ec;\n  --ui-ti-line-b: #e4e7ec;\n  --ui-ti-dash: #e4e7ec;\n  --ui-ti-plus: #c4c4c4;\n  --ui-ti-online: #34c46a;\n  /* Ring around the status dot: mostly white with a hint of the green, fully opaque */\n  --ui-ti-dot-ring: #e2f6e9;\n  --ui-ti-dot-edge: rgba(52, 196, 106, 0.1);\n  --ui-ti-cursor: #141b34;\n  --ui-ti-shadow: 0 calc(10 * var(--u)) calc(24 * var(--u)) rgba(0, 0, 0, 0.07), 0 calc(2 * var(--u)) calc(5 * var(--u)) rgba(0, 0, 0, 0.05);\n  --ui-ti-lift: 0 calc(18 * var(--u)) calc(34 * var(--u)) rgba(0, 0, 0, 0.12), 0 calc(3 * var(--u)) calc(8 * var(--u)) rgba(0, 0, 0, 0.06);\n  --ui-ti-loop: 4.4s;\n  --ui-ti-ease: cubic-bezier(0.7, 0, 0.25, 1);\n  position: relative;\n  width: 100%;\n  aspect-ratio: 3 / 2;\n  overflow: hidden;\n  container-type: inline-size;\n}\n.ui-ti *, .ui-ti *::before, .ui-ti *::after { box-sizing: border-box; }\n\n.ui-ti-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }\n.ui-ti-stop-a { stop-color: var(--ui-ti-line-a); }\n.ui-ti-stop-b { stop-color: var(--ui-ti-line-b); }\n.ui-ti-line { fill: none; stroke-width: 2.4; stroke-linecap: round; }\n.ui-ti-line--dashed {\n  stroke: var(--ui-ti-dash);\n  stroke-dasharray: 6 7.23;\n  animation: ui-ti-dashed var(--ui-ti-loop) linear infinite;\n}\n.ui-ti-line--slot {\n  stroke: var(--ui-ti-dash);\n  stroke-dasharray: 6 7.23;\n}\n.ui-ti-line--joined {\n  stroke-dasharray: 1;\n  stroke-dashoffset: 1;\n  animation: ui-ti-joined var(--ui-ti-loop) linear infinite;\n}\n\n/* ---------- Nodes ---------- */\n\n.ui-ti-node {\n  position: absolute;\n  width: calc(84 * var(--u));\n  height: calc(84 * var(--u));\n  margin: calc(-42 * var(--u)) 0 0 calc(-42 * var(--u));\n  padding: calc(5 * var(--u));\n  border-radius: 50%;\n  background: var(--ui-ti-bubble);\n  box-shadow: inset 0 0 0 calc(1 * var(--u)) var(--ui-ti-bubble-ring), var(--ui-ti-shadow);\n}\n.ui-ti-node--a { left: calc(120 * var(--u)); top: calc(159 * var(--u)); }\n.ui-ti-node--b { left: calc(300 * var(--u)); top: calc(105 * var(--u)); }\n.ui-ti-face {\n  display: block;\n  width: 100%;\n  height: 100%;\n  overflow: hidden;\n  border-radius: 50%;\n  background: var(--ui-ti-face);\n}\n.ui-ti-face img {\n  display: block;\n  width: 100%;\n  height: 100%;\n  object-fit: cover;\n  user-select: none;\n}\n/* Status: a bright green dot in a thick, pale green ring with a faint 10% halo outside */\n.ui-ti-dot {\n  position: absolute;\n  right: calc(1 * var(--u));\n  bottom: calc(3 * var(--u));\n  width: calc(24 * var(--u));\n  height: calc(24 * var(--u));\n  border: calc(7 * var(--u)) solid var(--ui-ti-dot-ring);\n  border-radius: 50%;\n  background: var(--ui-ti-online);\n  box-shadow: 0 0 0 calc(2 * var(--u)) var(--ui-ti-dot-edge);\n}\n\n/* ---------- Empty slot ---------- */\n\n.ui-ti-slot {\n  transform-box: fill-box;\n  transform-origin: center;\n  animation: ui-ti-slot var(--ui-ti-loop) linear infinite;\n}\n.ui-ti-plus { fill: none; stroke: var(--ui-ti-plus); stroke-width: 1.8; stroke-linecap: round; }\n\n/* ---------- The invite being dragged in ---------- */\n\n/* Starts on the right and is carried to the slot (290, 245) */\n.ui-ti-drag {\n  position: absolute;\n  left: calc(456 * var(--u));\n  top: calc(281 * var(--u));\n  animation: ui-ti-drag var(--ui-ti-loop) infinite;\n}\n.ui-ti-node--c {\n  left: 0;\n  top: 0;\n  animation: ui-ti-lift var(--ui-ti-loop) infinite;\n}\n.ui-ti-node--c .ui-ti-dot { animation: ui-ti-online var(--ui-ti-loop) infinite; }\n/* The pointer rests on the photo: its tip at (+16, +14) from the avatar's centre (the tip is 11.8% / 1.15% into the image) */\n.ui-ti-cursor {\n  position: absolute;\n  left: calc(11.28 * var(--u));\n  top: calc(13.45 * var(--u));\n  width: calc(40 * var(--u));\n  height: calc(48.13 * var(--u));\n  overflow: visible;\n  transform-origin: calc(4.72 * var(--u)) calc(0.55 * var(--u));\n  filter: drop-shadow(0 calc(3 * var(--u)) calc(7 * var(--u)) rgba(0, 0, 0, 0.16));\n  animation: ui-ti-cursor var(--ui-ti-loop) infinite;\n}\n.ui-ti-cursor path {\n  fill: var(--ui-ti-cursor);\n  stroke: #fff;\n  stroke-width: 1.7;\n  stroke-linejoin: round;\n  paint-order: stroke;\n}\n\n/*\n * One loop:\n *   (4.4 s)\n *   0–12%   rest on the right          12–16% pick up (lift)\n *   16–42%  carried to the slot        42–48% drop, settle\n *   48–54%  line draws solid, dot pops 54–62% cursor lets go and drifts off\n *   62–88%  hold the finished team     88–100% fade back to the start\n */\n@keyframes ui-ti-drag {\n  0%, 16% { transform: translate(0, 0); opacity: 1; animation-timing-function: var(--ui-ti-ease); }\n  42%, 88% { transform: translate(calc(-166 * var(--u)), calc(-36 * var(--u))); opacity: 1; }\n  94% { transform: translate(calc(-166 * var(--u)), calc(-36 * var(--u))); opacity: 0; }\n  95% { transform: translate(0, 0); opacity: 0; }\n  100% { transform: translate(0, 0); opacity: 1; }\n}\n@keyframes ui-ti-lift {\n  0%, 12% { transform: scale(1); box-shadow: inset 0 0 0 calc(1 * var(--u)) var(--ui-ti-bubble-ring), var(--ui-ti-shadow); animation-timing-function: var(--ui-ti-ease); }\n  16%, 40% { transform: scale(1.07); box-shadow: inset 0 0 0 calc(1 * var(--u)) var(--ui-ti-bubble-ring), var(--ui-ti-lift); animation-timing-function: var(--ui-ti-ease); }\n  46%, 100% { transform: scale(1); box-shadow: inset 0 0 0 calc(1 * var(--u)) var(--ui-ti-bubble-ring), var(--ui-ti-shadow); }\n}\n@keyframes ui-ti-online {\n  0%, 48% { transform: scale(0); }\n  52% { transform: scale(1.25); }\n  56%, 100% { transform: scale(1); }\n}\n@keyframes ui-ti-cursor {\n  0%, 11% { transform: translate(0, 0) scale(1); opacity: 1; animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); }\n  14%, 42% { transform: translate(0, 0) scale(0.86); opacity: 1; animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); }\n  47% { transform: translate(0, 0) scale(1); opacity: 1; animation-timing-function: var(--ui-ti-ease); }\n  62%, 88% { transform: translate(calc(70 * var(--u)), calc(44 * var(--u))) scale(1); opacity: 0; }\n  95% { transform: translate(calc(20 * var(--u)), calc(14 * var(--u))) scale(1); opacity: 0; }\n  100% { transform: translate(0, 0) scale(1); opacity: 1; }\n}\n@keyframes ui-ti-slot {\n  0%, 30% { opacity: 1; transform: scale(1); animation-timing-function: var(--ui-ti-ease); }\n  42%, 90% { opacity: 0; transform: scale(1.12); }\n  100% { opacity: 1; transform: scale(1); }\n}\n@keyframes ui-ti-dashed {\n  0%, 46% { opacity: 1; }\n  50%, 92% { opacity: 0; }\n  100% { opacity: 1; }\n}\n@keyframes ui-ti-joined {\n  0%, 44% { stroke-dashoffset: 1; opacity: 1; }\n  54%, 88% { stroke-dashoffset: 0; opacity: 1; }\n  94%, 100% { stroke-dashoffset: 0; opacity: 0; }\n}\n\n/* Reduced motion: a still frame of the waiting state */\n@media (prefers-reduced-motion: reduce) {\n  .ui-ti-drag, .ui-ti-node--c, .ui-ti-node--c .ui-ti-dot, .ui-ti-cursor, .ui-ti-slot,\n  .ui-ti-line--dashed, .ui-ti-line--joined { animation: none; }\n  .ui-ti-node--c .ui-ti-dot { transform: scale(0); }\n}\n\n/* Dark mode: follows a .dark class or data-theme=\"dark\" on any ancestor, e.g. <html> */\n:where(.dark, [data-theme=\"dark\"]) .ui-ti {\n  --ui-ti-bubble: #232326;\n  --ui-ti-bubble-ring: rgba(255, 255, 255, 0.08);\n  --ui-ti-face: #2e2e33;\n  --ui-ti-line-a: rgba(255, 255, 255, 0.14);\n  --ui-ti-line-b: rgba(255, 255, 255, 0.14);\n  --ui-ti-dash: rgba(255, 255, 255, 0.14);\n  --ui-ti-plus: #5c5c61;\n  --ui-ti-online: #3fd17a;\n  --ui-ti-dot-ring: #24392c;\n  --ui-ti-dot-edge: rgba(63, 209, 122, 0.12);\n  --ui-ti-shadow: 0 calc(10 * var(--u)) calc(24 * var(--u)) rgba(0, 0, 0, 0.4), 0 calc(2 * var(--u)) calc(5 * var(--u)) rgba(0, 0, 0, 0.3);\n  --ui-ti-lift: 0 calc(18 * var(--u)) calc(34 * var(--u)) rgba(0, 0, 0, 0.5), 0 calc(3 * var(--u)) calc(8 * var(--u)) rgba(0, 0, 0, 0.3);\n}\n`;\n"}]}