@activecollab/components 2.0.445 → 2.0.446

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.
@@ -38,8 +38,11 @@ import { INTERNAL_CLIENT_LABEL as CONTENT_INTERNAL_CLIENT_LABEL, ProjectCard, Ta
38
38
  * resolved the placeholder becomes the real card, anchored at the
39
39
  * placeholder's top-left and grown to the card's natural size.
40
40
  *
41
- * Escape or a click on the overlay cancels: the picker closes and the
42
- * placeholder is thrown away, so a cancelled gesture leaves no debris.
41
+ * Escape or a click on the overlay closes the picker and leaves the
42
+ * placeholder on the board: the drawn box is the user's layout, and a click
43
+ * on the placeholder opens the picker again — the same "keep the frame, fill
44
+ * it later" the app does, so a board can be laid out before its cards are
45
+ * chosen.
43
46
  */
44
47
 
45
48
  /* A drawn box smaller than this reads as "I just want a card here", so the
@@ -455,16 +458,20 @@ export const projectElementTitle = element => {
455
458
  /* ------------------------------------------------------------------ */
456
459
 
457
460
  /**
458
- * Two cards the board starts with, both limited.
461
+ * The project elements the board starts with: two limited cards and one
462
+ * placeholder of each kind.
459
463
  *
460
- * They are seeded rather than reachable through the picker on purpose: limited
461
- * access is a property of the VIEWER, and you cannot pick a card you are not
462
- * allowed to see. Someone else placed these; this session is simply the one
463
- * that cannot open them. Seeding is also the whole demonstration — no "view as"
464
- * switch is needed to show what the state looks like.
464
+ * The limited cards are seeded rather than reachable through the picker on
465
+ * purpose: limited access is a property of the VIEWER, and you cannot pick a
466
+ * card you are not allowed to see. Someone else placed these; this session is
467
+ * simply the one that cannot open them. Seeding is also the whole
468
+ * demonstration — no "view as" switch is needed to show what the state looks
469
+ * like. Both are `resolved` with `project` and `task` left null: the record
470
+ * was never withheld pending a fetch, it is withheld full stop.
465
471
  *
466
- * Both are `resolved` with `project` and `task` left null: the record was never
467
- * withheld pending a fetch, it is withheld full stop.
472
+ * The placeholders are seeded so the standing state is on the board without
473
+ * drawing one first: a task and a project frame, and a person circle, each
474
+ * waiting for its pick.
468
475
  */
469
476
 
470
477
  const SEEDED = [{
@@ -495,6 +502,45 @@ const SEEDED = [{
495
502
  },
496
503
  x: 120,
497
504
  y: 380
505
+ }, {
506
+ element: {
507
+ id: "placeholder-task",
508
+ kind: "task",
509
+ width: TASK_CARD_WIDTH,
510
+ height: PLACEHOLDER_MIN_HEIGHT,
511
+ status: "placeholder",
512
+ project: null,
513
+ task: null,
514
+ person: null
515
+ },
516
+ x: 640,
517
+ y: 470
518
+ }, {
519
+ element: {
520
+ id: "placeholder-project",
521
+ kind: "project",
522
+ width: PROJECT_CARD_WIDTH,
523
+ height: PLACEHOLDER_MIN_HEIGHT,
524
+ status: "placeholder",
525
+ project: null,
526
+ task: null,
527
+ person: null
528
+ },
529
+ x: 640,
530
+ y: 630
531
+ }, {
532
+ element: {
533
+ id: "placeholder-person",
534
+ kind: "person",
535
+ width: PERSON_DEFAULT_SIZE,
536
+ height: PERSON_DEFAULT_SIZE,
537
+ status: "placeholder",
538
+ project: null,
539
+ task: null,
540
+ person: null
541
+ },
542
+ x: 980,
543
+ y: 470
498
544
  }];
499
545
 
500
546
  /* Derived from one list, the way INITIAL_POSITIONS is derived from
@@ -531,11 +577,12 @@ export const StyledPersonDraft = styled(StyledProjectDraft).withConfig({
531
577
  })(["border-radius:50%;"]);
532
578
 
533
579
  /* The placeholder that waits for the picker's answer. Card-like on purpose:
534
- rounded, dashed, tinted — a card-shaped hole, not a selection marquee. */
580
+ rounded, dashed, tinted — a card-shaped hole, not a selection marquee. On
581
+ the board it renders as a button, so the whole frame reopens the picker. */
535
582
  export const StyledPlaceholder = styled.div.withConfig({
536
583
  displayName: "projectElements__StyledPlaceholder",
537
584
  componentId: "sc-1cayxi5-3"
538
- })(["box-sizing:border-box;width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:12px;border:1.5px dashed var(--border-primary);border-radius:8px;background-color:var(--color-theme-200);user-select:none;"]);
585
+ })(["box-sizing:border-box;width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:12px;border:1.5px dashed var(--border-primary);border-radius:8px;background-color:var(--color-theme-200);user-select:none;font:inherit;color:inherit;&:is(button){cursor:pointer;}"]);
539
586
 
540
587
  /* A person's placeholder is the circle its avatar will fill — dashed and
541
588
  tinted like the card placeholder, with the person glyph where the face will
@@ -711,7 +758,8 @@ export const PersonElementFace = _ref5 => {
711
758
  /** One board element, in whichever of its three states it currently is. */
712
759
  export const ProjectElementNode = _ref6 => {
713
760
  let element = _ref6.element,
714
- selected = _ref6.selected;
761
+ selected = _ref6.selected,
762
+ onPick = _ref6.onPick;
715
763
  /* Checked before anything else: a limited element must never be able to fall
716
764
  through to a branch that renders entity data. */
717
765
  if (element.limited) {
@@ -723,7 +771,12 @@ export const ProjectElementNode = _ref6 => {
723
771
  /* A person is the board's second non-card render: every state is a circle. */
724
772
  if (element.kind === "person") {
725
773
  if (element.status === "placeholder") {
726
- return /*#__PURE__*/React.createElement(StyledPersonPlaceholder, {
774
+ return onPick ? /*#__PURE__*/React.createElement(StyledPersonPlaceholder, {
775
+ as: "button",
776
+ type: "button",
777
+ "aria-label": "Pick a person",
778
+ onClick: onPick
779
+ }, /*#__PURE__*/React.createElement(PersonIcon, null)) : /*#__PURE__*/React.createElement(StyledPersonPlaceholder, {
727
780
  "aria-label": "Pick a person"
728
781
  }, /*#__PURE__*/React.createElement(PersonIcon, null));
729
782
  }
@@ -739,9 +792,16 @@ export const ProjectElementNode = _ref6 => {
739
792
  return /*#__PURE__*/React.createElement(StyledPersonPlaceholder, null);
740
793
  }
741
794
  if (element.status === "placeholder") {
742
- return /*#__PURE__*/React.createElement(StyledPlaceholder, null, /*#__PURE__*/React.createElement(Caption1, {
795
+ const label = element.kind === "project" ? "Pick a project…" : "Pick a task…";
796
+ return onPick ? /*#__PURE__*/React.createElement(StyledPlaceholder, {
797
+ as: "button",
798
+ type: "button",
799
+ onClick: onPick
800
+ }, /*#__PURE__*/React.createElement(Caption1, {
801
+ color: "tertiary"
802
+ }, label)) : /*#__PURE__*/React.createElement(StyledPlaceholder, null, /*#__PURE__*/React.createElement(Caption1, {
743
803
  color: "tertiary"
744
- }, element.kind === "project" ? "Pick a project…" : "Pick a task…"));
804
+ }, label));
745
805
  }
746
806
  if (element.status === "resolving") {
747
807
  return /*#__PURE__*/React.createElement(StyledResolving, null, /*#__PURE__*/React.createElement(SkeletonLoader, {
@@ -1 +1 @@
1
- {"version":3,"file":"projectElements.js","names":["React","useMemo","useRef","useState","styled","SELECTION_BLUE","StyledCanvasElement","IconButton","ArrowLeftIcon","PersonIcon","SortGeneralIcon","Input","SkeletonLoader","Modal","Paper","RadioButton","StackedCard","Tooltip","Body2","Caption1","AVATAR_COLORS","RoundAvatar","INTERNAL_CLIENT_LABEL","CONTENT_INTERNAL_CLIENT_LABEL","ProjectCard","TaskCard","PLACEHOLDER_MIN_WIDTH","PLACEHOLDER_MIN_HEIGHT","PROJECT_CARD_WIDTH","TASK_CARD_WIDTH","RESOLVE_MS","isProjectTool","tool","PERSON_DEFAULT_SIZE","PERSON_MIN_SIZE","PERSON_MAX_SIZE","clampPersonSize","size","Math","min","max","round","projectClientLabel","project","_project$client","client","PICKER_PEOPLE","jasmina","name","initials","color","purple","marko","teal","dina","orange","elena","yellow","tomas","blue","PICKER_PEOPLE_LIST","Object","entries","map","_ref","id","person","sort","a","b","localeCompare","PICKER_LABELS","assigned","text","blocked","inProgress","review","PICKER_PROJECT_LABELS","textColor","internal","urgent","research","mockTask","number","taskList","extra","_extends","assignees","date","PICKER_PROJECTS","description","lead","label","tasks","subtasks","comments","groupProjects","projects","reduce","groups","group","find","entry","push","groupTasks","task","matchesQuery","value","query","toLowerCase","includes","trim","taskDisplayName","LIMITED_ACCESS_LABEL","LIMITED_ACCESS_MESSAGE","projectCardWidth","kind","projectElementTitle","element","limited","_element$person$name","_element$person","_element$project$name","_element$project","SEEDED","width","height","status","x","y","SEEDED_PROJECT_ELEMENTS","seed","SEEDED_PROJECT_ELEMENT_POSITIONS","acc","StyledProjectElementBox","withConfig","displayName","componentId","StyledProjectDraft","div","StyledPersonDraft","StyledPlaceholder","StyledPersonPlaceholder","StyledPersonResolving","StyledPersonFace","StyledResolving","StyledLimitedCard","StyledEntityCard","TaskElementCard","_ref2","_task$subtasks","_task$comments","_task$date","selected","createElement","title","showProjectName","projectName","labels","subtaskCount","commentCount","dateLabel","length","ProjectElementCard","_ref3","leader","LimitedElementCard","_ref4","_ref4$round","className","undefined","weight","PersonElementFace","_ref5","$bg","$size","$bordered","style","fontSize","ProjectElementNode","_ref6","StyledPickerPanel","StyledPickerHeader","StyledPickerList","StyledPickerRow","PickerRow","_ref7","avatar","onSelect","role","tabIndex","onClick","onKeyDown","event","key","preventDefault","ProjectElementPicker","_ref8","onSelectProject","onSelectTask","onSelectPerson","onCancel","_useState","setProject","_useState2","setQuery","pressedInsideRef","onTaskStep","onPeopleStep","projectGroups","filter","taskGroups","handleProject","picked","handleBack","people","isEmpty","searchPlaceholder","emptyLabel","open","onClose","disableBackgroundClick","onMouseDown","current","onClickOutside","type","variant","autoFocus","placeholder","onChange","target","_ref9"],"sources":["../../../../src/presentation/whiteboard/projectElements.tsx"],"sourcesContent":["import React, { ReactElement, useMemo, useRef, useState } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { SELECTION_BLUE, StyledCanvasElement } from \"./elements\";\nimport { IconButton } from \"../../components/IconButton\";\nimport {\n ArrowLeftIcon,\n PersonIcon,\n SortGeneralIcon,\n} from \"../../components/Icons\";\nimport { Input } from \"../../components/Input\";\nimport { SkeletonLoader } from \"../../components/Loaders\";\nimport { Modal } from \"../../components/Modal\";\nimport { Paper } from \"../../components/Paper\";\nimport { RadioButton } from \"../../components/RadioButton\";\nimport { StackedCard } from \"../../components/StackedCard\";\nimport { Tooltip } from \"../../components/Tooltip\";\nimport { Body2, Caption1 } from \"../../components/Typography\";\nimport { AVATAR_COLORS, RoundAvatar } from \"../shared\";\nimport {\n INTERNAL_CLIENT_LABEL as CONTENT_INTERNAL_CLIENT_LABEL,\n ProjectCard,\n ProjectCardLabel,\n ProjectCardPerson,\n TaskCard,\n TaskCardLabel,\n} from \"../stackedCard/content\";\n\n/* ------------------------------------------------------------------ */\n/* Project elements — placeholder → picker → resolved card */\n/* ------------------------------------------------------------------ */\n\n/**\n * The board's third \"draw a box, then say what goes in it\" element, after the\n * link and the file card. The gesture ladder is deliberately the same one those\n * two already established, because it is the only one the dock teaches:\n *\n * armed the Project Elements dock button opens a submenu (Project /\n * Task); picking one arms the tool and puts the canvas in\n * crosshair mode.\n * drawn mouse down → drag → up leaves a dashed PLACEHOLDER at the drawn\n * box (clamped to a card-sized minimum), exactly where the real\n * card will sit.\n * picking the release opens the picker — a centred popover replicating the\n * app's `MenuSelector/ProjectList` (and, for tasks, the two-step\n * `ProjectTaskMenuSelector`: projects, then that project's tasks).\n * resolving a short skeleton flash in the placeholder's own box, standing in\n * for \"the board is fetching this record's details\".\n * resolved the placeholder becomes the real card, anchored at the\n * placeholder's top-left and grown to the card's natural size.\n *\n * Escape or a click on the overlay cancels: the picker closes and the\n * placeholder is thrown away, so a cancelled gesture leaves no debris.\n */\n\n/* A drawn box smaller than this reads as \"I just want a card here\", so the\n placeholder takes the minimum rather than the (unusable) drawn size. */\nexport const PLACEHOLDER_MIN_WIDTH = 260;\nexport const PLACEHOLDER_MIN_HEIGHT = 120;\n\n/* The natural width each resolved card grows to. Heights follow the content,\n like every other card on this board. */\nexport const PROJECT_CARD_WIDTH = 300;\nexport const TASK_CARD_WIDTH = 260;\n\n/* How long the \"details are being resolved from the backend\" flash lasts. */\nexport const RESOLVE_MS = 480;\n\nexport type ProjectElementKind = \"project\" | \"task\" | \"person\";\n\nexport type ProjectElementStatus = \"placeholder\" | \"resolving\" | \"resolved\";\n\n/** True for the three board tools this module owns. */\nexport const isProjectTool = (tool: string): tool is ProjectElementKind =>\n tool === \"project\" || tool === \"task\" || tool === \"person\";\n\n/* A person is not a card: a square whose width IS its height, so the avatar\n circle stays a circle. The drawn width is its side, clamped to these bounds —\n the same 1:1 lock the app enforces on the canvas grip and in the Inspector. */\nexport const PERSON_DEFAULT_SIZE = 96;\nexport const PERSON_MIN_SIZE = 48;\nexport const PERSON_MAX_SIZE = 240;\n\nexport const clampPersonSize = (size: number): number =>\n Math.min(PERSON_MAX_SIZE, Math.max(PERSON_MIN_SIZE, Math.round(size)));\n\n/* ------------------------------------------------------------------ */\n/* Mock data */\n/* ------------------------------------------------------------------ */\n\n/**\n * The people and labels the board carries are exactly what the shared content\n * cards read, so the picker's types ARE the cards' types — one shape, so a card\n * cannot be fed something it does not understand.\n */\nexport type PickerPerson = ProjectCardPerson;\n\nexport type PickerTaskLabel = TaskCardLabel;\n\nexport interface PickerTask {\n id: string;\n /** The task number the app prefixes the name with (`#123: …`). */\n number: number;\n name: string;\n /** The task list the task belongs to — the picker's group header. */\n taskList: string;\n label?: PickerTaskLabel;\n subtasks?: number;\n comments?: number;\n date?: string;\n assignees: PickerPerson[];\n}\n\n/**\n * A project label. The app renders it as a FILLED pill whose background is the\n * label's own colour and whose text is a darker shade of it\n * (`ProjectLabel.jsx`: `EntityLabel` with `backgroundColor: label.color` and\n * `color: label.darker_text_color`), which is the design system's `Chip` — not\n * the colour-text `Tag` the column cards use. Both colours are data. The shape\n * is the shared `ProjectCard`'s own.\n */\nexport type PickerProjectLabel = ProjectCardLabel;\n\nexport interface PickerProject {\n id: string;\n name: string;\n /**\n * The client company, and the picker's group header. NULL for an internal\n * project: the card then reads \"Internal\" rather than repeating the owner\n * company's own name back at the reader, which says nothing.\n */\n client: string | null;\n /** The description excerpt, when the project has one. */\n description?: string;\n /** A project need not have a leader. */\n lead?: PickerPerson;\n /** A project need not have a label. */\n label?: PickerProjectLabel;\n tasks: PickerTask[];\n}\n\n/**\n * What an internal project's client line says. The word belongs to the card (it\n * is the card that has to decide what to print for a project with no client), so\n * the board re-exports the card's own constant rather than keeping a second copy\n * that could drift.\n */\nexport const INTERNAL_CLIENT_LABEL = CONTENT_INTERNAL_CLIENT_LABEL;\n\n/* One rule for both the card's client line and the picker's group header, so a\n project can never be filed under one name and labelled with another. */\nexport const projectClientLabel = (project: PickerProject): string =>\n project.client ?? INTERNAL_CLIENT_LABEL;\n\nexport interface PickerProjectGroup {\n client: string;\n projects: PickerProject[];\n}\n\nexport interface PickerTaskGroup {\n taskList: string;\n tasks: PickerTask[];\n}\n\n/* Avatar colours are DATA, not theme — they stand in for real user avatars. */\nexport const PICKER_PEOPLE: Record<string, PickerPerson> = {\n jasmina: {\n name: \"Jasmina Sekulić\",\n initials: \"JS\",\n color: AVATAR_COLORS.purple,\n },\n marko: { name: \"Marko Antić\", initials: \"MA\", color: AVATAR_COLORS.teal },\n dina: { name: \"Dina Kovač\", initials: \"DK\", color: AVATAR_COLORS.orange },\n elena: {\n name: \"Elena Petrović\",\n initials: \"EP\",\n color: AVATAR_COLORS.yellow,\n },\n tomas: { name: \"Tomas Slavik\", initials: \"TS\", color: AVATAR_COLORS.blue },\n};\n\n/* The People picker's one flat list: everyone the board knows, by name, with\n no company or project layer — a person chip points at a user, not at a\n membership. The record key doubles as the row id. */\nexport const PICKER_PEOPLE_LIST: { id: string; person: PickerPerson }[] =\n Object.entries(PICKER_PEOPLE)\n .map(([id, person]) => ({ id, person }))\n .sort((a, b) => a.person.name.localeCompare(b.person.name));\n\n/* Label colours are data too: they are the label's own colour in the app. */\nexport const PICKER_LABELS: Record<string, PickerTaskLabel> = {\n assigned: { text: \"ASSIGNED\", color: \"#E08B8B\" },\n blocked: { text: \"BLOCKED\", color: \"#D9534F\" },\n inProgress: { text: \"IN PROGRESS\", color: \"#9BA0A8\" },\n review: { text: \"REVIEW\", color: \"#D4A017\" },\n};\n\n/* Project labels carry a background AND a darker text colour, the pair the app\n stores as `color` / `darker_text_color`. Uppercase because that is how the\n app saves a new project label (ProjectLabel.jsx upper-cases the name). */\nexport const PICKER_PROJECT_LABELS: Record<string, PickerProjectLabel> = {\n client: { text: \"CLIENT WORK\", color: \"#FBBB75\", textColor: \"#6B4416\" },\n internal: { text: \"INTERNAL\", color: \"#B7D8B0\", textColor: \"#2F5B28\" },\n urgent: { text: \"URGENT\", color: \"#F3A7A7\", textColor: \"#7A2222\" },\n research: { text: \"RESEARCH\", color: \"#B8CDEB\", textColor: \"#274974\" },\n};\n\n/* A compact constructor so every mocked task stays one readable row. */\nconst mockTask = (\n number: number,\n name: string,\n taskList: string,\n extra: Partial<PickerTask> = {}\n): PickerTask => ({\n id: `task-${number}`,\n number,\n name,\n taskList,\n assignees: [PICKER_PEOPLE.elena],\n date: \"16. Jul\",\n ...extra,\n});\n\nexport const PICKER_PROJECTS: PickerProject[] = [\n {\n id: \"p-ama\",\n name: \"AMA Webinar\",\n client: \"ActiveCollab Inc.\",\n description:\n \"Quarterly live session with the community. Collect questions up front, keep the run of show to forty minutes, and publish the recap the same week.\",\n lead: PICKER_PEOPLE.jasmina,\n label: PICKER_PROJECT_LABELS.client,\n tasks: [\n mockTask(184, \"Draft the run of show\", \"Preparation\", { subtasks: 3 }),\n mockTask(185, \"Collect questions from the community\", \"Preparation\", {\n label: PICKER_LABELS.assigned,\n comments: 4,\n }),\n mockTask(186, \"Record the intro segment\", \"Production\", {\n assignees: [PICKER_PEOPLE.marko],\n }),\n mockTask(187, \"Publish the recap post\", \"Follow-up\", {\n label: PICKER_LABELS.review,\n date: \"24. Jul\",\n }),\n ],\n },\n {\n id: \"p-care\",\n /* Internal project WITH a description and a leader, but no label. */\n name: \"Customer Care Team\",\n client: null,\n description:\n \"Where the support team plans its week. Macros, escalation paths and the weekly churn review all live here.\",\n lead: PICKER_PEOPLE.dina,\n tasks: [\n mockTask(201, \"Rewrite the macro replies\", \"Inbox\", {\n label: PICKER_LABELS.inProgress,\n comments: 2,\n }),\n mockTask(202, \"Weekly churn review\", \"Reporting\", { subtasks: 5 }),\n mockTask(203, \"Escalation path for billing\", \"Inbox\", {\n assignees: [PICKER_PEOPLE.tomas],\n }),\n mockTask(204, \"Onboarding call script\", \"Reporting\", {\n date: \"2. Aug\",\n }),\n ],\n },\n {\n id: \"p-backlog\",\n /* No description and NO leader — the meta row is the label alone, pushed\n to the right of an otherwise empty row. */\n name: \"Design Backlog\",\n client: null,\n label: PICKER_PROJECT_LABELS.internal,\n tasks: [\n mockTask(311, \"Whiteboard element inspector\", \"Ideas\", {\n label: PICKER_LABELS.assigned,\n subtasks: 2,\n comments: 3,\n }),\n mockTask(312, \"Empty states for the board list\", \"Ideas\"),\n mockTask(313, \"Dark theme audit of the dock\", \"Ready\", {\n label: PICKER_LABELS.blocked,\n assignees: [PICKER_PEOPLE.jasmina, PICKER_PEOPLE.marko],\n }),\n mockTask(314, \"Icon set for board elements\", \"Ready\", { date: \"9. Aug\" }),\n ],\n },\n {\n id: \"p-design-team\",\n /* Leader only: no description, no label. */\n name: \"Design Team\",\n client: null,\n lead: PICKER_PEOPLE.elena,\n tasks: [\n mockTask(402, \"Design system spring cleanup\", \"This Sprint\", {\n subtasks: 8,\n }),\n mockTask(403, \"Retro board template\", \"This Sprint\", {\n label: PICKER_LABELS.inProgress,\n assignees: [PICKER_PEOPLE.dina],\n }),\n mockTask(404, \"Handoff checklist\", \"Next Sprint\", { comments: 1 }),\n mockTask(405, \"Component audit: cards\", \"Next Sprint\", {\n date: \"30. Jul\",\n }),\n ],\n },\n {\n id: \"p-foo\",\n /* The bare minimum a project card can be: name and client line only. No\n description, no leader, no label — so no meta row at all. */\n name: \"Foo Kanban\",\n client: null,\n tasks: [\n mockTask(77, \"Set up the columns\", \"Task List\", { subtasks: 1 }),\n mockTask(78, \"Import the old cards\", \"Task List\", {\n label: PICKER_LABELS.blocked,\n }),\n mockTask(79, \"Invite the team\", \"Task List 2\", {\n assignees: [PICKER_PEOPLE.marko],\n }),\n mockTask(80, \"Archive stale swimlanes\", \"Task List 2\", {\n date: \"5. Aug\",\n }),\n ],\n },\n {\n id: \"p-marketing\",\n name: \"Marketing Site\",\n client: \"ActiveCollab Inc.\",\n description:\n \"Pricing, case studies and the homepage. Copy passes go through content, performance budgets through engineering.\",\n lead: PICKER_PEOPLE.marko,\n label: PICKER_PROJECT_LABELS.urgent,\n tasks: [\n mockTask(510, \"Pricing page copy pass\", \"Content\", {\n label: PICKER_LABELS.review,\n comments: 6,\n }),\n mockTask(511, \"Case study: Bright Lane\", \"Content\", { subtasks: 4 }),\n mockTask(512, \"Lighthouse budget for the homepage\", \"Engineering\", {\n assignees: [PICKER_PEOPLE.tomas],\n }),\n mockTask(513, \"Cookie banner rework\", \"Engineering\", { date: \"11. Aug\" }),\n ],\n },\n {\n id: \"p-research\",\n name: \"Product Research\",\n client: null,\n description:\n \"Interviews, synthesis and concept tests for the board work. Findings are shared with design at the end of each round.\",\n lead: PICKER_PEOPLE.jasmina,\n label: PICKER_PROJECT_LABELS.research,\n tasks: [\n mockTask(620, \"Interview script for board users\", \"Discovery\", {\n subtasks: 3,\n }),\n mockTask(621, \"Synthesis of the June calls\", \"Discovery\", {\n label: PICKER_LABELS.inProgress,\n comments: 2,\n }),\n mockTask(622, \"Concept test: project cards\", \"Validation\", {\n assignees: [PICKER_PEOPLE.elena, PICKER_PEOPLE.dina],\n }),\n mockTask(623, \"Share findings with design\", \"Validation\", {\n date: \"19. Aug\",\n }),\n ],\n },\n {\n id: \"p-brand\",\n name: \"Brand Refresh\",\n client: \"Bright Lane Studio\",\n description:\n \"Identity work: logo lockups, a typography scale and the photography direction, collected into a brand book.\",\n lead: PICKER_PEOPLE.dina,\n label: PICKER_PROJECT_LABELS.client,\n tasks: [\n mockTask(701, \"Logo lockup variations\", \"Identity\", { subtasks: 6 }),\n mockTask(702, \"Typography scale\", \"Identity\", {\n label: PICKER_LABELS.assigned,\n }),\n mockTask(703, \"Photography direction\", \"Guidelines\", { comments: 3 }),\n mockTask(704, \"Brand book layout\", \"Guidelines\", { date: \"28. Jul\" }),\n ],\n },\n {\n id: \"p-portal\",\n /* Leader AND label, but no description. */\n name: \"Client Portal\",\n client: \"Bright Lane Studio\",\n lead: PICKER_PEOPLE.tomas,\n label: PICKER_PROJECT_LABELS.urgent,\n tasks: [\n mockTask(810, \"Invoice list pagination\", \"Backend\", {\n label: PICKER_LABELS.blocked,\n subtasks: 2,\n }),\n mockTask(811, \"Single sign-on for clients\", \"Backend\", { comments: 5 }),\n mockTask(812, \"Dashboard tiles\", \"Frontend\", {\n assignees: [PICKER_PEOPLE.jasmina],\n }),\n mockTask(813, \"Mobile navigation\", \"Frontend\", { date: \"3. Sep\" }),\n ],\n },\n];\n\n/* The picker groups projects by client and tasks by task list, exactly the way\n `ProjectList` / `TaskList` group them in the app. Order is the data's own\n order — the first project of a client decides where its group sits. Internal\n projects group under the same word their card shows, so the header and the\n card cannot say different things about the same project. */\nexport const groupProjects = (\n projects: PickerProject[]\n): PickerProjectGroup[] =>\n projects.reduce<PickerProjectGroup[]>((groups, project) => {\n const client = projectClientLabel(project);\n const group = groups.find((entry) => entry.client === client);\n if (group) {\n group.projects.push(project);\n\n return groups;\n }\n\n return [...groups, { client, projects: [project] }];\n }, []);\n\nexport const groupTasks = (tasks: PickerTask[]): PickerTaskGroup[] =>\n tasks.reduce<PickerTaskGroup[]>((groups, task) => {\n const group = groups.find((entry) => entry.taskList === task.taskList);\n if (group) {\n group.tasks.push(task);\n\n return groups;\n }\n\n return [...groups, { taskList: task.taskList, tasks: [task] }];\n }, []);\n\nconst matchesQuery = (value: string, query: string): boolean =>\n value.toLowerCase().includes(query.trim().toLowerCase());\n\n/** `#123: Name` — `utils/taskDisplayName`, the app's own task display name. */\nexport const taskDisplayName = (task: PickerTask): string =>\n `#${task.number}: ${task.name}`;\n\n/* ------------------------------------------------------------------ */\n/* Limited access */\n/* ------------------------------------------------------------------ */\n\n/**\n * A board is shared with people who do not all see the same projects. When a\n * card points at a task or project the current viewer cannot open, the board\n * cannot just drop it: the element is part of everyone else's layout, and a\n * hole would be a worse lie than a blank. So the card stays and says exactly\n * one thing — something is here, and it is not yours to see.\n *\n * This follows the app's existing limited-access language (Workload):\n * - the wording is \"Limited Access\", the phrase `EntityPlaceholder`,\n * `WorkloadCalendarEvent`, Expenses and Timelist all already use;\n * - nothing else is rendered. Workload's own limited cell\n * (`.workload_null_project_cell`) shows an aggregate and no name, and the\n * shape it is fed is literally `{ hoursOccupied, leftOffset }` — a quantity\n * and a position, never an identity;\n * - the surface is muted and hatched, the treatment the app reserves for\n * \"this area is not live\" (weekend / day-off cells, `--muted-surface`);\n * - no affordance suggests opening: Workload points the link at \"#\", disables\n * the name tooltip so the title cannot leak, and marks blocked interactions\n * `cursor: not-allowed`.\n */\nexport const LIMITED_ACCESS_LABEL = \"Limited Access\";\n\n/* The one sentence a limited card is allowed to say, in the app's own voice.\n It states the viewer's situation as a fact and stops — Workload's secondary\n line is \"with your limited access\" (WorkloadProjectContainer.js), and its\n status sentences read \"Work scheduled for a day off.\" and \"task doesn't have\n an estimate\": second person, sentence case, contraction, no apology, and\n never a word about why the thing is on the screen. */\nexport const LIMITED_ACCESS_MESSAGE = \"You don't have access to this item.\";\n\n/* ------------------------------------------------------------------ */\n/* The element on the board */\n/* ------------------------------------------------------------------ */\n\n/** A project / task element on the board. Position lives in `positions`. */\nexport interface ProjectElementDef {\n id: string;\n kind: ProjectElementKind;\n /**\n * The element's width — the drawn placeholder box first, then the card's\n * natural width, written once when the card resolves.\n *\n * It is one field and not two (a placeholder box plus a derived card width)\n * because the Inspector edits this: a derived width would be read-only by\n * construction, and a second stored width would be a copy that can disagree.\n */\n width: number;\n /** The placeholder box height. A resolved card is auto-height. */\n height: number;\n status: ProjectElementStatus;\n /**\n * The viewer cannot access what this card points at, so there is nothing to\n * fill `project` / `task` with and never will be — the details are withheld\n * by the server, not merely unfetched. Everything the card can do is\n * withheld with them: it does not move, resize or open.\n */\n limited?: boolean;\n /** Filled once the picker returns; for a task this is its project. */\n project: PickerProject | null;\n task: PickerTask | null;\n /** Filled once the People picker returns, for a person element. */\n person: PickerPerson | null;\n}\n\n/** The natural width a resolved card of this kind grows to. */\nexport const projectCardWidth = (kind: ProjectElementKind): number =>\n kind === \"project\" ? PROJECT_CARD_WIDTH : TASK_CARD_WIDTH;\n\n/**\n * What the card is OF — the task's or the project's own name.\n *\n * These cards are a view of a record that lives in the project, so the board\n * does not get to name them: the title is the entity's, and it is read-only\n * wherever it appears. A placeholder has no entity yet, so it says what it is\n * still waiting for.\n */\nexport const projectElementTitle = (element: ProjectElementDef): string => {\n if (element.limited) {\n return LIMITED_ACCESS_LABEL;\n }\n\n if (element.kind === \"person\") {\n return element.person?.name ?? \"Person\";\n }\n\n if (element.kind === \"project\") {\n return element.project?.name ?? \"Project\";\n }\n\n return element.task ? taskDisplayName(element.task) : \"Task\";\n};\n\n/* ------------------------------------------------------------------ */\n/* Seeded board state */\n/* ------------------------------------------------------------------ */\n\n/**\n * Two cards the board starts with, both limited.\n *\n * They are seeded rather than reachable through the picker on purpose: limited\n * access is a property of the VIEWER, and you cannot pick a card you are not\n * allowed to see. Someone else placed these; this session is simply the one\n * that cannot open them. Seeding is also the whole demonstration — no \"view as\"\n * switch is needed to show what the state looks like.\n *\n * Both are `resolved` with `project` and `task` left null: the record was never\n * withheld pending a fetch, it is withheld full stop.\n */\ninterface SeededProjectElement {\n element: ProjectElementDef;\n x: number;\n y: number;\n}\n\nconst SEEDED: SeededProjectElement[] = [\n {\n element: {\n id: \"limited-task\",\n kind: \"task\",\n width: TASK_CARD_WIDTH,\n height: PLACEHOLDER_MIN_HEIGHT,\n status: \"resolved\",\n limited: true,\n project: null,\n task: null,\n person: null,\n },\n x: 120,\n y: 200,\n },\n {\n element: {\n id: \"limited-project\",\n kind: \"project\",\n width: PROJECT_CARD_WIDTH,\n height: PLACEHOLDER_MIN_HEIGHT,\n status: \"resolved\",\n limited: true,\n project: null,\n task: null,\n person: null,\n },\n x: 120,\n y: 380,\n },\n];\n\n/* Derived from one list, the way INITIAL_POSITIONS is derived from\n CANVAS_ELEMENTS — a seed's position is written once, not twice. */\nexport const SEEDED_PROJECT_ELEMENTS: ProjectElementDef[] = SEEDED.map(\n (seed) => seed.element\n);\n\nexport const SEEDED_PROJECT_ELEMENT_POSITIONS: Record<\n string,\n { x: number; y: number }\n> = SEEDED.reduce<Record<string, { x: number; y: number }>>((acc, seed) => {\n acc[seed.element.id] = { x: seed.x, y: seed.y };\n\n return acc;\n}, {});\n\n/* The board wrapper. It is the canvas element box, only rounded — the shared\n box is square because shapes are, and a square selection ring around a\n rounded card reads as a second, wrong border. The transition is what makes\n the placeholder GROW into its card instead of being replaced by one. */\nexport const StyledProjectElementBox = styled(StyledCanvasElement)`\n border-radius: 8px;\n transition: width 160ms ease;\n\n /* A limited card cannot be dragged, so it must not advertise that it can —\n the board's move cursor would be a promise it does not keep. not-allowed\n is what workload.less uses for a blocked interaction. */\n &.limited {\n cursor: not-allowed;\n }\n\n /* A person's box is the avatar circle itself, so its ring is round too. */\n &.person {\n border-radius: 50%;\n }\n`;\n\n/* The rubber band and the armed tool's hover preview — the same blue dashed\n box the link tool draws, so the gesture reads as one board convention. */\nexport const StyledProjectDraft = styled.div`\n position: absolute;\n box-sizing: border-box;\n border: 1.5px dashed ${SELECTION_BLUE};\n border-radius: 8px;\n background-color: rgba(59, 130, 246, 0.08);\n pointer-events: none;\n`;\n\n/* The person rubber band and hover preview: the same dashed blue, round. */\nexport const StyledPersonDraft = styled(StyledProjectDraft)`\n border-radius: 50%;\n`;\n\n/* The placeholder that waits for the picker's answer. Card-like on purpose:\n rounded, dashed, tinted — a card-shaped hole, not a selection marquee. */\nexport const StyledPlaceholder = styled.div`\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 12px;\n border: 1.5px dashed var(--border-primary);\n border-radius: 8px;\n background-color: var(--color-theme-200);\n user-select: none;\n`;\n\n/* A person's placeholder is the circle its avatar will fill — dashed and\n tinted like the card placeholder, with the person glyph where the face will\n be, so the pick swaps one circle for another without a change of shape. */\nexport const StyledPersonPlaceholder = styled(StyledPlaceholder)`\n border-radius: 50%;\n padding: 0;\n color: var(--color-theme-600);\n\n svg {\n width: 40%;\n height: 40%;\n fill: currentColor;\n }\n`;\n\nexport const StyledPersonResolving = styled.div`\n width: 100%;\n height: 100%;\n border-radius: 50%;\n overflow: hidden;\n\n .c-loader {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n }\n`;\n\n/* The resolved chip. The avatar fills the element's square and the name hangs\n below it, outside the box: the circle is the whole footprint the board\n measures, so the caption never changes the element's size. */\nexport const StyledPersonFace = styled.div`\n position: relative;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n user-select: none;\n\n .person-avatar {\n width: 100%;\n height: 100%;\n }\n\n .person-name {\n position: absolute;\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-top: 6px;\n white-space: nowrap;\n }\n`;\n\n/* The resolving flash: the placeholder's box, with the card's rows sketched in\n so the swap to the real card does not read as a different element. */\nexport const StyledResolving = styled(StyledPlaceholder)`\n flex-direction: column;\n align-items: stretch;\n justify-content: center;\n gap: 10px;\n\n .c-loader {\n height: 12px;\n }\n`;\n\n/**\n * The limited-access face — the card-shaped translation of Workload's black\n * `.workload_null_project_cell`.\n *\n * The app hardcodes that cell `#000000` on `#ffffff` text, which works there\n * because it always sits on light paper. A canvas is not always light: on the\n * dark board a black slab would sink into the background instead of reading as\n * something withheld. So the same idea is expressed with the design system's\n * own \"not live\" tokens — `--muted-surface` / `--muted-surface-text` are the\n * pair the app itself substitutes for muted surfaces in dark themes, and they\n * are a legible, deliberately flat combination in every theme.\n *\n * The -45° hatch is copied stroke for stroke from the app's unavailable\n * surfaces (weekend and day-off cells): `transparent 5px, <line> 5px, <line>\n * 5.7px`, with `--stripe-pattern` as the line — the token workload.less uses\n * for exactly this in dark themes.\n */\nexport const StyledLimitedCard = styled.div`\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n min-height: 96px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 12px;\n border: 1px solid var(--border-primary);\n border-radius: 8px;\n background-color: var(--muted-surface);\n background-image: repeating-linear-gradient(\n -45deg,\n transparent,\n transparent 5px,\n var(--stripe-pattern) 5px,\n var(--stripe-pattern) 5.7px\n );\n color: var(--muted-surface-text);\n cursor: not-allowed;\n user-select: none;\n\n /* The label is the card's whole content, so it carries the colour itself\n rather than inheriting a Typography theme colour that would be tuned for\n the paper background instead of this one. */\n .limited-label {\n color: var(--muted-surface-text);\n }\n\n /* A limited person keeps the person's silhouette: round, and it says\n nothing more than the card version does. */\n &.round {\n border-radius: 50%;\n min-height: 0;\n }\n`;\n\n/**\n * Both resolved faces are the design system's `StackedCard` — the same shell the\n * board's link and file cards already stand on — filled with the shared typed\n * content cards from `../stackedCard/content`. The board owns only the width and\n * the selection state; everything inside the card is the card's business.\n *\n * Identical to `StyledLinkCard`: the shell's reference 260px width gives way to\n * the box the board drew, and the height stays auto.\n */\nconst StyledEntityCard = styled(StackedCard)`\n && {\n width: 100%;\n }\n\n user-select: none;\n`;\n\nexport interface TaskFaceProps {\n project: PickerProject;\n task: PickerTask;\n selected?: boolean;\n}\n\n/**\n * The task face — the shared `TaskCard`, with the project line switched on.\n *\n * The board writes no anatomy of its own: the title clamp, the info line (labels\n * as colour text, the counter signifiers and their 2px dot separators) and the\n * date / assignees row all live in the content card, where the column-view\n * baseline they preserve is documented. The one thing the board asks for is the\n * project line above the title: on a canvas a task card has lost the column that\n * used to say which project it came from.\n *\n * The title is the app's own display name (`#123: Name`, `taskDisplayName`), so\n * the card's separate task-number prefix stays off.\n */\nexport const TaskElementCard = ({\n project,\n task,\n selected,\n}: TaskFaceProps): ReactElement => (\n <StyledEntityCard selected={selected}>\n <TaskCard\n title={taskDisplayName(task)}\n showProjectName\n projectName={project.name}\n labels={task.label ? [task.label] : []}\n subtaskCount={task.subtasks ?? 0}\n commentCount={task.comments ?? 0}\n dateLabel={task.date ?? null}\n assigned={task.assignees.length > 0}\n assignees={task.assignees}\n />\n </StyledEntityCard>\n);\n\n/**\n * The project face — the shared `ProjectCard`.\n *\n * The whiteboard's face spec and the content type's are the SAME spec, so it is\n * implemented once, in the card: name and client, an optional description\n * excerpt, and one row carrying the leader on the left and the label on the\n * right. No progress indicator, and no row at all when the project has neither a\n * leader nor a label.\n */\nexport const ProjectElementCard = ({\n project,\n selected,\n}: {\n project: PickerProject;\n selected?: boolean;\n}): ReactElement => (\n <StyledEntityCard selected={selected}>\n <ProjectCard\n name={project.name}\n client={project.client}\n description={project.description}\n leader={project.lead}\n label={project.label}\n />\n </StyledEntityCard>\n);\n\n/**\n * The limited-access card. Deliberately the shortest component in this file:\n * one phrase, no icon, no entity data of any kind.\n *\n * No icon because the app uses none — Expenses and Timelist both render the\n * bare `Caption1 weight=\"bold\"` \"Limited Access\", and an icon here would be a\n * second signal competing with the hatch. Even the KIND (task vs project) is\n * withheld: the viewer is told that a card exists, not what sort of thing it\n * points at.\n *\n * The tooltip is allowed to exist because it carries the viewer's situation,\n * not the entity's identity — the opposite of the tooltip Workload disables on\n * a limited event, which would have leaked the name.\n */\nexport const LimitedElementCard = ({\n round = false,\n}: {\n round?: boolean;\n}): ReactElement => (\n <Tooltip title={LIMITED_ACCESS_MESSAGE}>\n <StyledLimitedCard\n data-testid=\"wb-limited-card\"\n className={round ? \"round\" : undefined}\n >\n <Caption1 weight=\"bold\" className=\"limited-label\">\n {LIMITED_ACCESS_LABEL}\n </Caption1>\n </StyledLimitedCard>\n </Tooltip>\n);\n\nexport interface PersonFaceProps {\n person: PickerPerson;\n /** The element's side; the avatar fills it and the initials scale with it. */\n size: number;\n}\n\n/**\n * The person face — an avatar circle with a name caption. Always a chip: never\n * a StackedCard, it never expands, no hover card, no online-status dot. The\n * initials avatar stands in for the server-rendered avatar, as it does on the\n * cards.\n */\nexport const PersonElementFace = ({\n person,\n size,\n}: PersonFaceProps): ReactElement => (\n <StyledPersonFace data-testid=\"wb-person-face\">\n <RoundAvatar\n className=\"person-avatar\"\n $bg={person.color}\n $size={size}\n $bordered={false}\n style={{ fontSize: Math.round(size * 0.28) }}\n aria-label={person.name}\n >\n {person.initials}\n </RoundAvatar>\n <Caption1 weight=\"bold\" className=\"person-name\">\n {person.name}\n </Caption1>\n </StyledPersonFace>\n);\n\n/** One board element, in whichever of its three states it currently is. */\nexport const ProjectElementNode = ({\n element,\n selected,\n}: {\n element: ProjectElementDef;\n /**\n * Host-owned selection. A resolved card is a `StackedCard`, and the shell draws\n * its own ring from `--sc-selection-ring` (the board sets it to the selection\n * blue) — the same arrangement the link and file cards already use, which is\n * why their wrapper carries `is-card` to suppress the box's second ring.\n */\n selected?: boolean;\n}): ReactElement => {\n /* Checked before anything else: a limited element must never be able to fall\n through to a branch that renders entity data. */\n if (element.limited) {\n return <LimitedElementCard round={element.kind === \"person\"} />;\n }\n\n /* A person is the board's second non-card render: every state is a circle. */\n if (element.kind === \"person\") {\n if (element.status === \"placeholder\") {\n return (\n <StyledPersonPlaceholder aria-label=\"Pick a person\">\n <PersonIcon />\n </StyledPersonPlaceholder>\n );\n }\n\n if (element.status === \"resolving\") {\n return (\n <StyledPersonResolving>\n <SkeletonLoader />\n </StyledPersonResolving>\n );\n }\n\n if (element.person) {\n return <PersonElementFace person={element.person} size={element.width} />;\n }\n\n return <StyledPersonPlaceholder />;\n }\n\n if (element.status === \"placeholder\") {\n return (\n <StyledPlaceholder>\n <Caption1 color=\"tertiary\">\n {element.kind === \"project\" ? \"Pick a project…\" : \"Pick a task…\"}\n </Caption1>\n </StyledPlaceholder>\n );\n }\n\n if (element.status === \"resolving\") {\n return (\n <StyledResolving>\n <SkeletonLoader style={{ width: \"80%\" }} />\n <SkeletonLoader style={{ width: \"55%\" }} />\n <SkeletonLoader style={{ width: \"40%\" }} />\n </StyledResolving>\n );\n }\n\n if (element.kind === \"project\" && element.project) {\n return <ProjectElementCard project={element.project} selected={selected} />;\n }\n\n if (element.project && element.task) {\n return (\n <TaskElementCard\n project={element.project}\n task={element.task}\n selected={selected}\n />\n );\n }\n\n return <StyledPlaceholder />;\n};\n\n/* ------------------------------------------------------------------ */\n/* The picker */\n/* ------------------------------------------------------------------ */\n\n/* The popover, centred over the board's own overlay. It is deliberately NOT a\n DS `Dialog`: the app's picker has no title and no action buttons — you search,\n you pick, it closes. `Modal` is used only for what a dialog and a popover do\n share: the portal, the overlay, the focus lock and the Esc handler. */\nconst StyledPickerPanel = styled(Paper)`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n flex-direction: column;\n width: 470px;\n max-width: calc(100vw - 32px);\n max-height: 70vh;\n overflow: hidden;\n\n && {\n border-radius: 12px;\n border: 1px solid var(--border-primary);\n box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);\n }\n`;\n\n/* Search + adornments, mirroring `Select`'s own form row: the back arrow is a\n start adornment (TaskList), the group-by sort a end adornment (ProjectList). */\nconst StyledPickerHeader = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n flex-shrink: 0;\n padding: 12px 12px 8px;\n\n /* the DS Input wrapper is a fixed 360px — the panel owns the width here */\n .picker-search {\n width: 100%;\n border-radius: 8px;\n }\n\n .picker-search:focus-within {\n border-color: var(--color-primary);\n outline: 1px solid var(--color-primary);\n }\n`;\n\nconst StyledPickerList = styled.div`\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n padding: 4px 0 12px;\n\n .picker-group-header {\n box-sizing: border-box;\n height: 36px;\n display: flex;\n align-items: center;\n padding: 0 20px;\n margin-top: 4px;\n }\n\n .picker-empty {\n padding: 24px 20px;\n text-align: center;\n }\n`;\n\n/* A generously spaced row: the name on the left, an empty radio on the right —\n the shape `Select` gives a single-choice option, at picker scale. */\nconst StyledPickerRow = styled.div`\n box-sizing: border-box;\n height: 56px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n padding: 0 20px;\n cursor: pointer;\n outline: none;\n\n &:hover,\n &:focus-visible {\n background-color: var(--color-theme-200);\n }\n\n .row-lead {\n display: flex;\n align-items: center;\n gap: 12px;\n min-width: 0;\n }\n\n .row-name {\n min-width: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n .c-radio-btn {\n flex-shrink: 0;\n }\n`;\n\nexport interface PickerRowProps {\n id: string;\n name: string;\n /** A person row carries the avatar in front of the name. */\n avatar?: PickerPerson;\n onSelect: () => void;\n}\n\nconst PickerRow = ({\n id,\n name,\n avatar,\n onSelect,\n}: PickerRowProps): ReactElement => (\n <StyledPickerRow\n role=\"button\"\n tabIndex={0}\n onClick={onSelect}\n onKeyDown={(event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n onSelect();\n }\n }}\n >\n <span className=\"row-lead\">\n {avatar ? (\n <RoundAvatar $bg={avatar.color} $size={24} $bordered={false}>\n {avatar.initials}\n </RoundAvatar>\n ) : null}\n <span className=\"row-name\">\n <Body2>{name}</Body2>\n </span>\n </span>\n <RadioButton id={`wb-picker-${id}`} tabIndex={-1} />\n </StyledPickerRow>\n);\n\nexport interface ProjectElementPickerProps {\n kind: ProjectElementKind;\n onSelectProject: (project: PickerProject) => void;\n onSelectTask: (project: PickerProject, task: PickerTask) => void;\n onSelectPerson: (person: PickerPerson) => void;\n onCancel: () => void;\n}\n\n/**\n * One picker, three flows — the same split the app makes between\n * `MenuSelector/ProjectList` (one step), `ProjectTaskMenuSelector` (project,\n * then task) and the flat People list (one step, no grouping). The task flow\n * deliberately drops the app's \"Directly on project\" default option: a task\n * card has to be a task.\n */\nexport const ProjectElementPicker = ({\n kind,\n onSelectProject,\n onSelectTask,\n onSelectPerson,\n onCancel,\n}: ProjectElementPickerProps): ReactElement => {\n const [project, setProject] = useState<PickerProject | null>(null);\n const [query, setQuery] = useState(\"\");\n /* The picker opens on a mouseUP — the end of the draw gesture — so the click\n that closes that gesture arrives when the overlay is already on screen. A\n dismissal therefore has to be a WHOLE click on the overlay: press, then\n release. Without this the placeholder could be cancelled by the very\n gesture that created it. */\n const pressedInsideRef = useRef(false);\n\n const onTaskStep = kind === \"task\" && project !== null;\n const onPeopleStep = kind === \"person\";\n\n const projectGroups = useMemo(\n () =>\n groupProjects(\n PICKER_PROJECTS.filter((entry) => matchesQuery(entry.name, query))\n ),\n [query]\n );\n\n const taskGroups = useMemo(\n () =>\n project\n ? groupTasks(\n project.tasks.filter((task) =>\n matchesQuery(taskDisplayName(task), query)\n )\n )\n : [],\n [project, query]\n );\n\n const handleProject = (picked: PickerProject): void => {\n if (kind === \"project\") {\n onSelectProject(picked);\n\n return;\n }\n\n setProject(picked);\n setQuery(\"\");\n };\n\n const handleBack = (): void => {\n setProject(null);\n setQuery(\"\");\n };\n\n const people = useMemo(\n () =>\n PICKER_PEOPLE_LIST.filter((entry) =>\n matchesQuery(entry.person.name, query)\n ),\n [query]\n );\n\n const isEmpty = onPeopleStep\n ? people.length === 0\n : onTaskStep\n ? taskGroups.length === 0\n : projectGroups.length === 0;\n\n const searchPlaceholder = onPeopleStep\n ? \"Search a person\"\n : onTaskStep\n ? \"Search a task\"\n : \"Search a project\";\n\n const emptyLabel = onPeopleStep\n ? \"No people\"\n : onTaskStep\n ? \"No Result\"\n : \"No Projects\";\n\n return (\n <Modal\n open\n onClose={onCancel}\n disableBackgroundClick\n onMouseDown={() => {\n pressedInsideRef.current = true;\n }}\n onClickOutside={() => {\n if (pressedInsideRef.current) {\n onCancel();\n }\n }}\n >\n <StyledPickerPanel type=\"paper-2\">\n <StyledPickerHeader>\n {onTaskStep ? (\n <Tooltip title=\"Back to projects\">\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n onClick={handleBack}\n aria-label=\"Back to projects\"\n >\n <ArrowLeftIcon />\n </IconButton>\n </Tooltip>\n ) : null}\n <Input\n className=\"picker-search\"\n autoFocus\n value={query}\n placeholder={searchPlaceholder}\n onChange={(event) => setQuery(event.target.value)}\n />\n {onTaskStep || onPeopleStep ? null : (\n <Tooltip title=\"Group by\">\n <IconButton type=\"button\" variant=\"text gray\">\n <SortGeneralIcon />\n </IconButton>\n </Tooltip>\n )}\n </StyledPickerHeader>\n\n <StyledPickerList>\n {isEmpty ? (\n <div className=\"picker-empty\">\n <Body2 color=\"tertiary\">{emptyLabel}</Body2>\n </div>\n ) : null}\n\n {onPeopleStep\n ? people.map(({ id, person }) => (\n <PickerRow\n key={id}\n id={id}\n name={person.name}\n avatar={person}\n onSelect={() => onSelectPerson(person)}\n />\n ))\n : null}\n\n {onTaskStep && project\n ? taskGroups.map((group) => (\n <div key={group.taskList}>\n <div className=\"picker-group-header\">\n <Body2 weight=\"bold\">{group.taskList}</Body2>\n </div>\n {group.tasks.map((task) => (\n <PickerRow\n key={task.id}\n id={task.id}\n name={taskDisplayName(task)}\n onSelect={() => onSelectTask(project, task)}\n />\n ))}\n </div>\n ))\n : null}\n\n {onTaskStep || onPeopleStep\n ? null\n : projectGroups.map((group) => (\n <div key={group.client}>\n <div className=\"picker-group-header\">\n <Body2 weight=\"bold\">{group.client}</Body2>\n </div>\n {group.projects.map((entry) => (\n <PickerRow\n key={entry.id}\n id={entry.id}\n name={entry.name}\n onSelect={() => handleProject(entry)}\n />\n ))}\n </div>\n ))}\n </StyledPickerList>\n </StyledPickerPanel>\n </Modal>\n );\n};\n"],"mappings":";AAAA,OAAOA,KAAK,IAAkBC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAEtE,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,SAASC,cAAc,EAAEC,mBAAmB,QAAQ,YAAY;AAChE,SAASC,UAAU,QAAQ,6BAA6B;AACxD,SACEC,aAAa,EACbC,UAAU,EACVC,eAAe,QACV,wBAAwB;AAC/B,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,SAASC,OAAO,QAAQ,0BAA0B;AAClD,SAASC,KAAK,EAAEC,QAAQ,QAAQ,6BAA6B;AAC7D,SAASC,aAAa,EAAEC,WAAW,QAAQ,WAAW;AACtD,SACEC,qBAAqB,IAAIC,6BA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State","styled","SELECTION_BLUE","StyledCanvasElement","IconButton","ArrowLeftIcon","PersonIcon","SortGeneralIcon","Input","SkeletonLoader","Modal","Paper","RadioButton","StackedCard","Tooltip","Body2","Caption1","AVATAR_COLORS","RoundAvatar","INTERNAL_CLIENT_LABEL","CONTENT_INTERNAL_CLIENT_LABEL","ProjectCard","TaskCard","PLACEHOLDER_MIN_WIDTH","PLACEHOLDER_MIN_HEIGHT","PROJECT_CARD_WIDTH","TASK_CARD_WIDTH","RESOLVE_MS","isProjectTool","tool","PERSON_DEFAULT_SIZE","PERSON_MIN_SIZE","PERSON_MAX_SIZE","clampPersonSize","size","Math","min","max","round","projectClientLabel","project","_project$client","client","PICKER_PEOPLE","jasmina","name","initials","color","purple","marko","teal","dina","orange","elena","yellow","tomas","blue","PICKER_PEOPLE_LIST","Object","entries","map","_ref","id","person","sort","a","b","localeCompare","PICKER_LABELS","assigned","text","blocked","inProgress","review","PICKER_PROJECT_LABELS","textColor","internal","urgent","research","mockTask","number","taskList","extra","_extends","assignees","date","PICKER_PROJECTS","description","lead","label","tasks","subtasks","comments","groupProjects","projects","reduce","groups","group","find","entry","push","groupTasks","task","matchesQuery","value","query","toLowerCase","includes","trim","taskDisplayName","LIMITED_ACCESS_LABEL","LIMITED_ACCESS_MESSAGE","projectCardWidth","kind","projectElementTitle","element","limited","_element$person$name","_element$person","_element$project$name","_element$project","SEEDED","width","height","status","x","y","SEEDED_PROJECT_ELEMENTS","seed","SEEDED_PROJECT_ELEMENT_POSITIONS","acc","StyledProjectElementBox","withConfig","displayName","componentId","StyledProjectDraft","div","StyledPersonDraft","StyledPlaceholder","StyledPersonPlaceholder","StyledPersonResolving","StyledPersonFace","StyledResolving","StyledLimitedCard","StyledEntityCard","TaskElementCard","_ref2","_task$subtasks","_task$comments","_task$date","selected","createElement","title","showProjectName","projectName","labels","subtaskCount","commentCount","dateLabel","length","ProjectElementCard","_ref3","leader","LimitedElementCard","_ref4","_ref4$round","className","undefined","weight","PersonElementFace","_ref5","$bg","$size","$bordered","style","fontSize","ProjectElementNode","_ref6","onPick","as","type","onClick","StyledPickerPanel","StyledPickerHeader","StyledPickerList","StyledPickerRow","PickerRow","_ref7","avatar","onSelect","role","tabIndex","onKeyDown","event","key","preventDefault","ProjectElementPicker","_ref8","onSelectProject","onSelectTask","onSelectPerson","onCancel","_useState","setProject","_useState2","setQuery","pressedInsideRef","onTaskStep","onPeopleStep","projectGroups","filter","taskGroups","handleProject","picked","handleBack","people","isEmpty","searchPlaceholder","emptyLabel","open","onClose","disableBackgroundClick","onMouseDown","current","onClickOutside","variant","autoFocus","placeholder","onChange","target","_ref9"],"sources":["../../../../src/presentation/whiteboard/projectElements.tsx"],"sourcesContent":["import React, { ReactElement, useMemo, useRef, useState } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { SELECTION_BLUE, StyledCanvasElement } from \"./elements\";\nimport { IconButton } from \"../../components/IconButton\";\nimport {\n ArrowLeftIcon,\n PersonIcon,\n SortGeneralIcon,\n} from \"../../components/Icons\";\nimport { Input } from \"../../components/Input\";\nimport { SkeletonLoader } from \"../../components/Loaders\";\nimport { Modal } from \"../../components/Modal\";\nimport { Paper } from \"../../components/Paper\";\nimport { RadioButton } from \"../../components/RadioButton\";\nimport { StackedCard } from \"../../components/StackedCard\";\nimport { Tooltip } from \"../../components/Tooltip\";\nimport { Body2, Caption1 } from \"../../components/Typography\";\nimport { AVATAR_COLORS, RoundAvatar } from \"../shared\";\nimport {\n INTERNAL_CLIENT_LABEL as CONTENT_INTERNAL_CLIENT_LABEL,\n ProjectCard,\n ProjectCardLabel,\n ProjectCardPerson,\n TaskCard,\n TaskCardLabel,\n} from \"../stackedCard/content\";\n\n/* ------------------------------------------------------------------ */\n/* Project elements — placeholder → picker → resolved card */\n/* ------------------------------------------------------------------ */\n\n/**\n * The board's third \"draw a box, then say what goes in it\" element, after the\n * link and the file card. The gesture ladder is deliberately the same one those\n * two already established, because it is the only one the dock teaches:\n *\n * armed the Project Elements dock button opens a submenu (Project /\n * Task); picking one arms the tool and puts the canvas in\n * crosshair mode.\n * drawn mouse down → drag → up leaves a dashed PLACEHOLDER at the drawn\n * box (clamped to a card-sized minimum), exactly where the real\n * card will sit.\n * picking the release opens the picker — a centred popover replicating the\n * app's `MenuSelector/ProjectList` (and, for tasks, the two-step\n * `ProjectTaskMenuSelector`: projects, then that project's tasks).\n * resolving a short skeleton flash in the placeholder's own box, standing in\n * for \"the board is fetching this record's details\".\n * resolved the placeholder becomes the real card, anchored at the\n * placeholder's top-left and grown to the card's natural size.\n *\n * Escape or a click on the overlay closes the picker and leaves the\n * placeholder on the board: the drawn box is the user's layout, and a click\n * on the placeholder opens the picker again — the same \"keep the frame, fill\n * it later\" the app does, so a board can be laid out before its cards are\n * chosen.\n */\n\n/* A drawn box smaller than this reads as \"I just want a card here\", so the\n placeholder takes the minimum rather than the (unusable) drawn size. */\nexport const PLACEHOLDER_MIN_WIDTH = 260;\nexport const PLACEHOLDER_MIN_HEIGHT = 120;\n\n/* The natural width each resolved card grows to. Heights follow the content,\n like every other card on this board. */\nexport const PROJECT_CARD_WIDTH = 300;\nexport const TASK_CARD_WIDTH = 260;\n\n/* How long the \"details are being resolved from the backend\" flash lasts. */\nexport const RESOLVE_MS = 480;\n\nexport type ProjectElementKind = \"project\" | \"task\" | \"person\";\n\nexport type ProjectElementStatus = \"placeholder\" | \"resolving\" | \"resolved\";\n\n/** True for the three board tools this module owns. */\nexport const isProjectTool = (tool: string): tool is ProjectElementKind =>\n tool === \"project\" || tool === \"task\" || tool === \"person\";\n\n/* A person is not a card: a square whose width IS its height, so the avatar\n circle stays a circle. The drawn width is its side, clamped to these bounds —\n the same 1:1 lock the app enforces on the canvas grip and in the Inspector. */\nexport const PERSON_DEFAULT_SIZE = 96;\nexport const PERSON_MIN_SIZE = 48;\nexport const PERSON_MAX_SIZE = 240;\n\nexport const clampPersonSize = (size: number): number =>\n Math.min(PERSON_MAX_SIZE, Math.max(PERSON_MIN_SIZE, Math.round(size)));\n\n/* ------------------------------------------------------------------ */\n/* Mock data */\n/* ------------------------------------------------------------------ */\n\n/**\n * The people and labels the board carries are exactly what the shared content\n * cards read, so the picker's types ARE the cards' types — one shape, so a card\n * cannot be fed something it does not understand.\n */\nexport type PickerPerson = ProjectCardPerson;\n\nexport type PickerTaskLabel = TaskCardLabel;\n\nexport interface PickerTask {\n id: string;\n /** The task number the app prefixes the name with (`#123: …`). */\n number: number;\n name: string;\n /** The task list the task belongs to — the picker's group header. */\n taskList: string;\n label?: PickerTaskLabel;\n subtasks?: number;\n comments?: number;\n date?: string;\n assignees: PickerPerson[];\n}\n\n/**\n * A project label. The app renders it as a FILLED pill whose background is the\n * label's own colour and whose text is a darker shade of it\n * (`ProjectLabel.jsx`: `EntityLabel` with `backgroundColor: label.color` and\n * `color: label.darker_text_color`), which is the design system's `Chip` — not\n * the colour-text `Tag` the column cards use. Both colours are data. The shape\n * is the shared `ProjectCard`'s own.\n */\nexport type PickerProjectLabel = ProjectCardLabel;\n\nexport interface PickerProject {\n id: string;\n name: string;\n /**\n * The client company, and the picker's group header. NULL for an internal\n * project: the card then reads \"Internal\" rather than repeating the owner\n * company's own name back at the reader, which says nothing.\n */\n client: string | null;\n /** The description excerpt, when the project has one. */\n description?: string;\n /** A project need not have a leader. */\n lead?: PickerPerson;\n /** A project need not have a label. */\n label?: PickerProjectLabel;\n tasks: PickerTask[];\n}\n\n/**\n * What an internal project's client line says. The word belongs to the card (it\n * is the card that has to decide what to print for a project with no client), so\n * the board re-exports the card's own constant rather than keeping a second copy\n * that could drift.\n */\nexport const INTERNAL_CLIENT_LABEL = CONTENT_INTERNAL_CLIENT_LABEL;\n\n/* One rule for both the card's client line and the picker's group header, so a\n project can never be filed under one name and labelled with another. */\nexport const projectClientLabel = (project: PickerProject): string =>\n project.client ?? INTERNAL_CLIENT_LABEL;\n\nexport interface PickerProjectGroup {\n client: string;\n projects: PickerProject[];\n}\n\nexport interface PickerTaskGroup {\n taskList: string;\n tasks: PickerTask[];\n}\n\n/* Avatar colours are DATA, not theme — they stand in for real user avatars. */\nexport const PICKER_PEOPLE: Record<string, PickerPerson> = {\n jasmina: {\n name: \"Jasmina Sekulić\",\n initials: \"JS\",\n color: AVATAR_COLORS.purple,\n },\n marko: { name: \"Marko Antić\", initials: \"MA\", color: AVATAR_COLORS.teal },\n dina: { name: \"Dina Kovač\", initials: \"DK\", color: AVATAR_COLORS.orange },\n elena: {\n name: \"Elena Petrović\",\n initials: \"EP\",\n color: AVATAR_COLORS.yellow,\n },\n tomas: { name: \"Tomas Slavik\", initials: \"TS\", color: AVATAR_COLORS.blue },\n};\n\n/* The People picker's one flat list: everyone the board knows, by name, with\n no company or project layer — a person chip points at a user, not at a\n membership. The record key doubles as the row id. */\nexport const PICKER_PEOPLE_LIST: { id: string; person: PickerPerson }[] =\n Object.entries(PICKER_PEOPLE)\n .map(([id, person]) => ({ id, person }))\n .sort((a, b) => a.person.name.localeCompare(b.person.name));\n\n/* Label colours are data too: they are the label's own colour in the app. */\nexport const PICKER_LABELS: Record<string, PickerTaskLabel> = {\n assigned: { text: \"ASSIGNED\", color: \"#E08B8B\" },\n blocked: { text: \"BLOCKED\", color: \"#D9534F\" },\n inProgress: { text: \"IN PROGRESS\", color: \"#9BA0A8\" },\n review: { text: \"REVIEW\", color: \"#D4A017\" },\n};\n\n/* Project labels carry a background AND a darker text colour, the pair the app\n stores as `color` / `darker_text_color`. Uppercase because that is how the\n app saves a new project label (ProjectLabel.jsx upper-cases the name). */\nexport const PICKER_PROJECT_LABELS: Record<string, PickerProjectLabel> = {\n client: { text: \"CLIENT WORK\", color: \"#FBBB75\", textColor: \"#6B4416\" },\n internal: { text: \"INTERNAL\", color: \"#B7D8B0\", textColor: \"#2F5B28\" },\n urgent: { text: \"URGENT\", color: \"#F3A7A7\", textColor: \"#7A2222\" },\n research: { text: \"RESEARCH\", color: \"#B8CDEB\", textColor: \"#274974\" },\n};\n\n/* A compact constructor so every mocked task stays one readable row. */\nconst mockTask = (\n number: number,\n name: string,\n taskList: string,\n extra: Partial<PickerTask> = {}\n): PickerTask => ({\n id: `task-${number}`,\n number,\n name,\n taskList,\n assignees: [PICKER_PEOPLE.elena],\n date: \"16. Jul\",\n ...extra,\n});\n\nexport const PICKER_PROJECTS: PickerProject[] = [\n {\n id: \"p-ama\",\n name: \"AMA Webinar\",\n client: \"ActiveCollab Inc.\",\n description:\n \"Quarterly live session with the community. Collect questions up front, keep the run of show to forty minutes, and publish the recap the same week.\",\n lead: PICKER_PEOPLE.jasmina,\n label: PICKER_PROJECT_LABELS.client,\n tasks: [\n mockTask(184, \"Draft the run of show\", \"Preparation\", { subtasks: 3 }),\n mockTask(185, \"Collect questions from the community\", \"Preparation\", {\n label: PICKER_LABELS.assigned,\n comments: 4,\n }),\n mockTask(186, \"Record the intro segment\", \"Production\", {\n assignees: [PICKER_PEOPLE.marko],\n }),\n mockTask(187, \"Publish the recap post\", \"Follow-up\", {\n label: PICKER_LABELS.review,\n date: \"24. Jul\",\n }),\n ],\n },\n {\n id: \"p-care\",\n /* Internal project WITH a description and a leader, but no label. */\n name: \"Customer Care Team\",\n client: null,\n description:\n \"Where the support team plans its week. Macros, escalation paths and the weekly churn review all live here.\",\n lead: PICKER_PEOPLE.dina,\n tasks: [\n mockTask(201, \"Rewrite the macro replies\", \"Inbox\", {\n label: PICKER_LABELS.inProgress,\n comments: 2,\n }),\n mockTask(202, \"Weekly churn review\", \"Reporting\", { subtasks: 5 }),\n mockTask(203, \"Escalation path for billing\", \"Inbox\", {\n assignees: [PICKER_PEOPLE.tomas],\n }),\n mockTask(204, \"Onboarding call script\", \"Reporting\", {\n date: \"2. Aug\",\n }),\n ],\n },\n {\n id: \"p-backlog\",\n /* No description and NO leader — the meta row is the label alone, pushed\n to the right of an otherwise empty row. */\n name: \"Design Backlog\",\n client: null,\n label: PICKER_PROJECT_LABELS.internal,\n tasks: [\n mockTask(311, \"Whiteboard element inspector\", \"Ideas\", {\n label: PICKER_LABELS.assigned,\n subtasks: 2,\n comments: 3,\n }),\n mockTask(312, \"Empty states for the board list\", \"Ideas\"),\n mockTask(313, \"Dark theme audit of the dock\", \"Ready\", {\n label: PICKER_LABELS.blocked,\n assignees: [PICKER_PEOPLE.jasmina, PICKER_PEOPLE.marko],\n }),\n mockTask(314, \"Icon set for board elements\", \"Ready\", { date: \"9. Aug\" }),\n ],\n },\n {\n id: \"p-design-team\",\n /* Leader only: no description, no label. */\n name: \"Design Team\",\n client: null,\n lead: PICKER_PEOPLE.elena,\n tasks: [\n mockTask(402, \"Design system spring cleanup\", \"This Sprint\", {\n subtasks: 8,\n }),\n mockTask(403, \"Retro board template\", \"This Sprint\", {\n label: PICKER_LABELS.inProgress,\n assignees: [PICKER_PEOPLE.dina],\n }),\n mockTask(404, \"Handoff checklist\", \"Next Sprint\", { comments: 1 }),\n mockTask(405, \"Component audit: cards\", \"Next Sprint\", {\n date: \"30. Jul\",\n }),\n ],\n },\n {\n id: \"p-foo\",\n /* The bare minimum a project card can be: name and client line only. No\n description, no leader, no label — so no meta row at all. */\n name: \"Foo Kanban\",\n client: null,\n tasks: [\n mockTask(77, \"Set up the columns\", \"Task List\", { subtasks: 1 }),\n mockTask(78, \"Import the old cards\", \"Task List\", {\n label: PICKER_LABELS.blocked,\n }),\n mockTask(79, \"Invite the team\", \"Task List 2\", {\n assignees: [PICKER_PEOPLE.marko],\n }),\n mockTask(80, \"Archive stale swimlanes\", \"Task List 2\", {\n date: \"5. Aug\",\n }),\n ],\n },\n {\n id: \"p-marketing\",\n name: \"Marketing Site\",\n client: \"ActiveCollab Inc.\",\n description:\n \"Pricing, case studies and the homepage. Copy passes go through content, performance budgets through engineering.\",\n lead: PICKER_PEOPLE.marko,\n label: PICKER_PROJECT_LABELS.urgent,\n tasks: [\n mockTask(510, \"Pricing page copy pass\", \"Content\", {\n label: PICKER_LABELS.review,\n comments: 6,\n }),\n mockTask(511, \"Case study: Bright Lane\", \"Content\", { subtasks: 4 }),\n mockTask(512, \"Lighthouse budget for the homepage\", \"Engineering\", {\n assignees: [PICKER_PEOPLE.tomas],\n }),\n mockTask(513, \"Cookie banner rework\", \"Engineering\", { date: \"11. Aug\" }),\n ],\n },\n {\n id: \"p-research\",\n name: \"Product Research\",\n client: null,\n description:\n \"Interviews, synthesis and concept tests for the board work. Findings are shared with design at the end of each round.\",\n lead: PICKER_PEOPLE.jasmina,\n label: PICKER_PROJECT_LABELS.research,\n tasks: [\n mockTask(620, \"Interview script for board users\", \"Discovery\", {\n subtasks: 3,\n }),\n mockTask(621, \"Synthesis of the June calls\", \"Discovery\", {\n label: PICKER_LABELS.inProgress,\n comments: 2,\n }),\n mockTask(622, \"Concept test: project cards\", \"Validation\", {\n assignees: [PICKER_PEOPLE.elena, PICKER_PEOPLE.dina],\n }),\n mockTask(623, \"Share findings with design\", \"Validation\", {\n date: \"19. Aug\",\n }),\n ],\n },\n {\n id: \"p-brand\",\n name: \"Brand Refresh\",\n client: \"Bright Lane Studio\",\n description:\n \"Identity work: logo lockups, a typography scale and the photography direction, collected into a brand book.\",\n lead: PICKER_PEOPLE.dina,\n label: PICKER_PROJECT_LABELS.client,\n tasks: [\n mockTask(701, \"Logo lockup variations\", \"Identity\", { subtasks: 6 }),\n mockTask(702, \"Typography scale\", \"Identity\", {\n label: PICKER_LABELS.assigned,\n }),\n mockTask(703, \"Photography direction\", \"Guidelines\", { comments: 3 }),\n mockTask(704, \"Brand book layout\", \"Guidelines\", { date: \"28. Jul\" }),\n ],\n },\n {\n id: \"p-portal\",\n /* Leader AND label, but no description. */\n name: \"Client Portal\",\n client: \"Bright Lane Studio\",\n lead: PICKER_PEOPLE.tomas,\n label: PICKER_PROJECT_LABELS.urgent,\n tasks: [\n mockTask(810, \"Invoice list pagination\", \"Backend\", {\n label: PICKER_LABELS.blocked,\n subtasks: 2,\n }),\n mockTask(811, \"Single sign-on for clients\", \"Backend\", { comments: 5 }),\n mockTask(812, \"Dashboard tiles\", \"Frontend\", {\n assignees: [PICKER_PEOPLE.jasmina],\n }),\n mockTask(813, \"Mobile navigation\", \"Frontend\", { date: \"3. Sep\" }),\n ],\n },\n];\n\n/* The picker groups projects by client and tasks by task list, exactly the way\n `ProjectList` / `TaskList` group them in the app. Order is the data's own\n order — the first project of a client decides where its group sits. Internal\n projects group under the same word their card shows, so the header and the\n card cannot say different things about the same project. */\nexport const groupProjects = (\n projects: PickerProject[]\n): PickerProjectGroup[] =>\n projects.reduce<PickerProjectGroup[]>((groups, project) => {\n const client = projectClientLabel(project);\n const group = groups.find((entry) => entry.client === client);\n if (group) {\n group.projects.push(project);\n\n return groups;\n }\n\n return [...groups, { client, projects: [project] }];\n }, []);\n\nexport const groupTasks = (tasks: PickerTask[]): PickerTaskGroup[] =>\n tasks.reduce<PickerTaskGroup[]>((groups, task) => {\n const group = groups.find((entry) => entry.taskList === task.taskList);\n if (group) {\n group.tasks.push(task);\n\n return groups;\n }\n\n return [...groups, { taskList: task.taskList, tasks: [task] }];\n }, []);\n\nconst matchesQuery = (value: string, query: string): boolean =>\n value.toLowerCase().includes(query.trim().toLowerCase());\n\n/** `#123: Name` — `utils/taskDisplayName`, the app's own task display name. */\nexport const taskDisplayName = (task: PickerTask): string =>\n `#${task.number}: ${task.name}`;\n\n/* ------------------------------------------------------------------ */\n/* Limited access */\n/* ------------------------------------------------------------------ */\n\n/**\n * A board is shared with people who do not all see the same projects. When a\n * card points at a task or project the current viewer cannot open, the board\n * cannot just drop it: the element is part of everyone else's layout, and a\n * hole would be a worse lie than a blank. So the card stays and says exactly\n * one thing — something is here, and it is not yours to see.\n *\n * This follows the app's existing limited-access language (Workload):\n * - the wording is \"Limited Access\", the phrase `EntityPlaceholder`,\n * `WorkloadCalendarEvent`, Expenses and Timelist all already use;\n * - nothing else is rendered. Workload's own limited cell\n * (`.workload_null_project_cell`) shows an aggregate and no name, and the\n * shape it is fed is literally `{ hoursOccupied, leftOffset }` — a quantity\n * and a position, never an identity;\n * - the surface is muted and hatched, the treatment the app reserves for\n * \"this area is not live\" (weekend / day-off cells, `--muted-surface`);\n * - no affordance suggests opening: Workload points the link at \"#\", disables\n * the name tooltip so the title cannot leak, and marks blocked interactions\n * `cursor: not-allowed`.\n */\nexport const LIMITED_ACCESS_LABEL = \"Limited Access\";\n\n/* The one sentence a limited card is allowed to say, in the app's own voice.\n It states the viewer's situation as a fact and stops — Workload's secondary\n line is \"with your limited access\" (WorkloadProjectContainer.js), and its\n status sentences read \"Work scheduled for a day off.\" and \"task doesn't have\n an estimate\": second person, sentence case, contraction, no apology, and\n never a word about why the thing is on the screen. */\nexport const LIMITED_ACCESS_MESSAGE = \"You don't have access to this item.\";\n\n/* ------------------------------------------------------------------ */\n/* The element on the board */\n/* ------------------------------------------------------------------ */\n\n/** A project / task element on the board. Position lives in `positions`. */\nexport interface ProjectElementDef {\n id: string;\n kind: ProjectElementKind;\n /**\n * The element's width — the drawn placeholder box first, then the card's\n * natural width, written once when the card resolves.\n *\n * It is one field and not two (a placeholder box plus a derived card width)\n * because the Inspector edits this: a derived width would be read-only by\n * construction, and a second stored width would be a copy that can disagree.\n */\n width: number;\n /** The placeholder box height. A resolved card is auto-height. */\n height: number;\n status: ProjectElementStatus;\n /**\n * The viewer cannot access what this card points at, so there is nothing to\n * fill `project` / `task` with and never will be — the details are withheld\n * by the server, not merely unfetched. Everything the card can do is\n * withheld with them: it does not move, resize or open.\n */\n limited?: boolean;\n /** Filled once the picker returns; for a task this is its project. */\n project: PickerProject | null;\n task: PickerTask | null;\n /** Filled once the People picker returns, for a person element. */\n person: PickerPerson | null;\n}\n\n/** The natural width a resolved card of this kind grows to. */\nexport const projectCardWidth = (kind: ProjectElementKind): number =>\n kind === \"project\" ? PROJECT_CARD_WIDTH : TASK_CARD_WIDTH;\n\n/**\n * What the card is OF — the task's or the project's own name.\n *\n * These cards are a view of a record that lives in the project, so the board\n * does not get to name them: the title is the entity's, and it is read-only\n * wherever it appears. A placeholder has no entity yet, so it says what it is\n * still waiting for.\n */\nexport const projectElementTitle = (element: ProjectElementDef): string => {\n if (element.limited) {\n return LIMITED_ACCESS_LABEL;\n }\n\n if (element.kind === \"person\") {\n return element.person?.name ?? \"Person\";\n }\n\n if (element.kind === \"project\") {\n return element.project?.name ?? \"Project\";\n }\n\n return element.task ? taskDisplayName(element.task) : \"Task\";\n};\n\n/* ------------------------------------------------------------------ */\n/* Seeded board state */\n/* ------------------------------------------------------------------ */\n\n/**\n * The project elements the board starts with: two limited cards and one\n * placeholder of each kind.\n *\n * The limited cards are seeded rather than reachable through the picker on\n * purpose: limited access is a property of the VIEWER, and you cannot pick a\n * card you are not allowed to see. Someone else placed these; this session is\n * simply the one that cannot open them. Seeding is also the whole\n * demonstration — no \"view as\" switch is needed to show what the state looks\n * like. Both are `resolved` with `project` and `task` left null: the record\n * was never withheld pending a fetch, it is withheld full stop.\n *\n * The placeholders are seeded so the standing state is on the board without\n * drawing one first: a task and a project frame, and a person circle, each\n * waiting for its pick.\n */\ninterface SeededProjectElement {\n element: ProjectElementDef;\n x: number;\n y: number;\n}\n\nconst SEEDED: SeededProjectElement[] = [\n {\n element: {\n id: \"limited-task\",\n kind: \"task\",\n width: TASK_CARD_WIDTH,\n height: PLACEHOLDER_MIN_HEIGHT,\n status: \"resolved\",\n limited: true,\n project: null,\n task: null,\n person: null,\n },\n x: 120,\n y: 200,\n },\n {\n element: {\n id: \"limited-project\",\n kind: \"project\",\n width: PROJECT_CARD_WIDTH,\n height: PLACEHOLDER_MIN_HEIGHT,\n status: \"resolved\",\n limited: true,\n project: null,\n task: null,\n person: null,\n },\n x: 120,\n y: 380,\n },\n {\n element: {\n id: \"placeholder-task\",\n kind: \"task\",\n width: TASK_CARD_WIDTH,\n height: PLACEHOLDER_MIN_HEIGHT,\n status: \"placeholder\",\n project: null,\n task: null,\n person: null,\n },\n x: 640,\n y: 470,\n },\n {\n element: {\n id: \"placeholder-project\",\n kind: \"project\",\n width: PROJECT_CARD_WIDTH,\n height: PLACEHOLDER_MIN_HEIGHT,\n status: \"placeholder\",\n project: null,\n task: null,\n person: null,\n },\n x: 640,\n y: 630,\n },\n {\n element: {\n id: \"placeholder-person\",\n kind: \"person\",\n width: PERSON_DEFAULT_SIZE,\n height: PERSON_DEFAULT_SIZE,\n status: \"placeholder\",\n project: null,\n task: null,\n person: null,\n },\n x: 980,\n y: 470,\n },\n];\n\n/* Derived from one list, the way INITIAL_POSITIONS is derived from\n CANVAS_ELEMENTS — a seed's position is written once, not twice. */\nexport const SEEDED_PROJECT_ELEMENTS: ProjectElementDef[] = SEEDED.map(\n (seed) => seed.element\n);\n\nexport const SEEDED_PROJECT_ELEMENT_POSITIONS: Record<\n string,\n { x: number; y: number }\n> = SEEDED.reduce<Record<string, { x: number; y: number }>>((acc, seed) => {\n acc[seed.element.id] = { x: seed.x, y: seed.y };\n\n return acc;\n}, {});\n\n/* The board wrapper. It is the canvas element box, only rounded — the shared\n box is square because shapes are, and a square selection ring around a\n rounded card reads as a second, wrong border. The transition is what makes\n the placeholder GROW into its card instead of being replaced by one. */\nexport const StyledProjectElementBox = styled(StyledCanvasElement)`\n border-radius: 8px;\n transition: width 160ms ease;\n\n /* A limited card cannot be dragged, so it must not advertise that it can —\n the board's move cursor would be a promise it does not keep. not-allowed\n is what workload.less uses for a blocked interaction. */\n &.limited {\n cursor: not-allowed;\n }\n\n /* A person's box is the avatar circle itself, so its ring is round too. */\n &.person {\n border-radius: 50%;\n }\n`;\n\n/* The rubber band and the armed tool's hover preview — the same blue dashed\n box the link tool draws, so the gesture reads as one board convention. */\nexport const StyledProjectDraft = styled.div`\n position: absolute;\n box-sizing: border-box;\n border: 1.5px dashed ${SELECTION_BLUE};\n border-radius: 8px;\n background-color: rgba(59, 130, 246, 0.08);\n pointer-events: none;\n`;\n\n/* The person rubber band and hover preview: the same dashed blue, round. */\nexport const StyledPersonDraft = styled(StyledProjectDraft)`\n border-radius: 50%;\n`;\n\n/* The placeholder that waits for the picker's answer. Card-like on purpose:\n rounded, dashed, tinted — a card-shaped hole, not a selection marquee. On\n the board it renders as a button, so the whole frame reopens the picker. */\nexport const StyledPlaceholder = styled.div`\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 12px;\n border: 1.5px dashed var(--border-primary);\n border-radius: 8px;\n background-color: var(--color-theme-200);\n user-select: none;\n font: inherit;\n color: inherit;\n\n &:is(button) {\n cursor: pointer;\n }\n`;\n\n/* A person's placeholder is the circle its avatar will fill — dashed and\n tinted like the card placeholder, with the person glyph where the face will\n be, so the pick swaps one circle for another without a change of shape. */\nexport const StyledPersonPlaceholder = styled(StyledPlaceholder)`\n border-radius: 50%;\n padding: 0;\n color: var(--color-theme-600);\n\n svg {\n width: 40%;\n height: 40%;\n fill: currentColor;\n }\n`;\n\nexport const StyledPersonResolving = styled.div`\n width: 100%;\n height: 100%;\n border-radius: 50%;\n overflow: hidden;\n\n .c-loader {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n }\n`;\n\n/* The resolved chip. The avatar fills the element's square and the name hangs\n below it, outside the box: the circle is the whole footprint the board\n measures, so the caption never changes the element's size. */\nexport const StyledPersonFace = styled.div`\n position: relative;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n user-select: none;\n\n .person-avatar {\n width: 100%;\n height: 100%;\n }\n\n .person-name {\n position: absolute;\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-top: 6px;\n white-space: nowrap;\n }\n`;\n\n/* The resolving flash: the placeholder's box, with the card's rows sketched in\n so the swap to the real card does not read as a different element. */\nexport const StyledResolving = styled(StyledPlaceholder)`\n flex-direction: column;\n align-items: stretch;\n justify-content: center;\n gap: 10px;\n\n .c-loader {\n height: 12px;\n }\n`;\n\n/**\n * The limited-access face — the card-shaped translation of Workload's black\n * `.workload_null_project_cell`.\n *\n * The app hardcodes that cell `#000000` on `#ffffff` text, which works there\n * because it always sits on light paper. A canvas is not always light: on the\n * dark board a black slab would sink into the background instead of reading as\n * something withheld. So the same idea is expressed with the design system's\n * own \"not live\" tokens — `--muted-surface` / `--muted-surface-text` are the\n * pair the app itself substitutes for muted surfaces in dark themes, and they\n * are a legible, deliberately flat combination in every theme.\n *\n * The -45° hatch is copied stroke for stroke from the app's unavailable\n * surfaces (weekend and day-off cells): `transparent 5px, <line> 5px, <line>\n * 5.7px`, with `--stripe-pattern` as the line — the token workload.less uses\n * for exactly this in dark themes.\n */\nexport const StyledLimitedCard = styled.div`\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n min-height: 96px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 12px;\n border: 1px solid var(--border-primary);\n border-radius: 8px;\n background-color: var(--muted-surface);\n background-image: repeating-linear-gradient(\n -45deg,\n transparent,\n transparent 5px,\n var(--stripe-pattern) 5px,\n var(--stripe-pattern) 5.7px\n );\n color: var(--muted-surface-text);\n cursor: not-allowed;\n user-select: none;\n\n /* The label is the card's whole content, so it carries the colour itself\n rather than inheriting a Typography theme colour that would be tuned for\n the paper background instead of this one. */\n .limited-label {\n color: var(--muted-surface-text);\n }\n\n /* A limited person keeps the person's silhouette: round, and it says\n nothing more than the card version does. */\n &.round {\n border-radius: 50%;\n min-height: 0;\n }\n`;\n\n/**\n * Both resolved faces are the design system's `StackedCard` — the same shell the\n * board's link and file cards already stand on — filled with the shared typed\n * content cards from `../stackedCard/content`. The board owns only the width and\n * the selection state; everything inside the card is the card's business.\n *\n * Identical to `StyledLinkCard`: the shell's reference 260px width gives way to\n * the box the board drew, and the height stays auto.\n */\nconst StyledEntityCard = styled(StackedCard)`\n && {\n width: 100%;\n }\n\n user-select: none;\n`;\n\nexport interface TaskFaceProps {\n project: PickerProject;\n task: PickerTask;\n selected?: boolean;\n}\n\n/**\n * The task face — the shared `TaskCard`, with the project line switched on.\n *\n * The board writes no anatomy of its own: the title clamp, the info line (labels\n * as colour text, the counter signifiers and their 2px dot separators) and the\n * date / assignees row all live in the content card, where the column-view\n * baseline they preserve is documented. The one thing the board asks for is the\n * project line above the title: on a canvas a task card has lost the column that\n * used to say which project it came from.\n *\n * The title is the app's own display name (`#123: Name`, `taskDisplayName`), so\n * the card's separate task-number prefix stays off.\n */\nexport const TaskElementCard = ({\n project,\n task,\n selected,\n}: TaskFaceProps): ReactElement => (\n <StyledEntityCard selected={selected}>\n <TaskCard\n title={taskDisplayName(task)}\n showProjectName\n projectName={project.name}\n labels={task.label ? [task.label] : []}\n subtaskCount={task.subtasks ?? 0}\n commentCount={task.comments ?? 0}\n dateLabel={task.date ?? null}\n assigned={task.assignees.length > 0}\n assignees={task.assignees}\n />\n </StyledEntityCard>\n);\n\n/**\n * The project face — the shared `ProjectCard`.\n *\n * The whiteboard's face spec and the content type's are the SAME spec, so it is\n * implemented once, in the card: name and client, an optional description\n * excerpt, and one row carrying the leader on the left and the label on the\n * right. No progress indicator, and no row at all when the project has neither a\n * leader nor a label.\n */\nexport const ProjectElementCard = ({\n project,\n selected,\n}: {\n project: PickerProject;\n selected?: boolean;\n}): ReactElement => (\n <StyledEntityCard selected={selected}>\n <ProjectCard\n name={project.name}\n client={project.client}\n description={project.description}\n leader={project.lead}\n label={project.label}\n />\n </StyledEntityCard>\n);\n\n/**\n * The limited-access card. Deliberately the shortest component in this file:\n * one phrase, no icon, no entity data of any kind.\n *\n * No icon because the app uses none — Expenses and Timelist both render the\n * bare `Caption1 weight=\"bold\"` \"Limited Access\", and an icon here would be a\n * second signal competing with the hatch. Even the KIND (task vs project) is\n * withheld: the viewer is told that a card exists, not what sort of thing it\n * points at.\n *\n * The tooltip is allowed to exist because it carries the viewer's situation,\n * not the entity's identity — the opposite of the tooltip Workload disables on\n * a limited event, which would have leaked the name.\n */\nexport const LimitedElementCard = ({\n round = false,\n}: {\n round?: boolean;\n}): ReactElement => (\n <Tooltip title={LIMITED_ACCESS_MESSAGE}>\n <StyledLimitedCard\n data-testid=\"wb-limited-card\"\n className={round ? \"round\" : undefined}\n >\n <Caption1 weight=\"bold\" className=\"limited-label\">\n {LIMITED_ACCESS_LABEL}\n </Caption1>\n </StyledLimitedCard>\n </Tooltip>\n);\n\nexport interface PersonFaceProps {\n person: PickerPerson;\n /** The element's side; the avatar fills it and the initials scale with it. */\n size: number;\n}\n\n/**\n * The person face — an avatar circle with a name caption. Always a chip: never\n * a StackedCard, it never expands, no hover card, no online-status dot. The\n * initials avatar stands in for the server-rendered avatar, as it does on the\n * cards.\n */\nexport const PersonElementFace = ({\n person,\n size,\n}: PersonFaceProps): ReactElement => (\n <StyledPersonFace data-testid=\"wb-person-face\">\n <RoundAvatar\n className=\"person-avatar\"\n $bg={person.color}\n $size={size}\n $bordered={false}\n style={{ fontSize: Math.round(size * 0.28) }}\n aria-label={person.name}\n >\n {person.initials}\n </RoundAvatar>\n <Caption1 weight=\"bold\" className=\"person-name\">\n {person.name}\n </Caption1>\n </StyledPersonFace>\n);\n\n/** One board element, in whichever of its three states it currently is. */\nexport const ProjectElementNode = ({\n element,\n selected,\n onPick,\n}: {\n element: ProjectElementDef;\n /**\n * Opens the picker for a placeholder. Given, the placeholder renders as a\n * button spanning its whole frame; absent, it is the inert frame the\n * resolving flash and the tests render.\n */\n onPick?: () => void;\n /**\n * Host-owned selection. A resolved card is a `StackedCard`, and the shell draws\n * its own ring from `--sc-selection-ring` (the board sets it to the selection\n * blue) — the same arrangement the link and file cards already use, which is\n * why their wrapper carries `is-card` to suppress the box's second ring.\n */\n selected?: boolean;\n}): ReactElement => {\n /* Checked before anything else: a limited element must never be able to fall\n through to a branch that renders entity data. */\n if (element.limited) {\n return <LimitedElementCard round={element.kind === \"person\"} />;\n }\n\n /* A person is the board's second non-card render: every state is a circle. */\n if (element.kind === \"person\") {\n if (element.status === \"placeholder\") {\n return onPick ? (\n <StyledPersonPlaceholder\n as=\"button\"\n type=\"button\"\n aria-label=\"Pick a person\"\n onClick={onPick}\n >\n <PersonIcon />\n </StyledPersonPlaceholder>\n ) : (\n <StyledPersonPlaceholder aria-label=\"Pick a person\">\n <PersonIcon />\n </StyledPersonPlaceholder>\n );\n }\n\n if (element.status === \"resolving\") {\n return (\n <StyledPersonResolving>\n <SkeletonLoader />\n </StyledPersonResolving>\n );\n }\n\n if (element.person) {\n return <PersonElementFace person={element.person} size={element.width} />;\n }\n\n return <StyledPersonPlaceholder />;\n }\n\n if (element.status === \"placeholder\") {\n const label =\n element.kind === \"project\" ? \"Pick a project…\" : \"Pick a task…\";\n\n return onPick ? (\n <StyledPlaceholder as=\"button\" type=\"button\" onClick={onPick}>\n <Caption1 color=\"tertiary\">{label}</Caption1>\n </StyledPlaceholder>\n ) : (\n <StyledPlaceholder>\n <Caption1 color=\"tertiary\">{label}</Caption1>\n </StyledPlaceholder>\n );\n }\n\n if (element.status === \"resolving\") {\n return (\n <StyledResolving>\n <SkeletonLoader style={{ width: \"80%\" }} />\n <SkeletonLoader style={{ width: \"55%\" }} />\n <SkeletonLoader style={{ width: \"40%\" }} />\n </StyledResolving>\n );\n }\n\n if (element.kind === \"project\" && element.project) {\n return <ProjectElementCard project={element.project} selected={selected} />;\n }\n\n if (element.project && element.task) {\n return (\n <TaskElementCard\n project={element.project}\n task={element.task}\n selected={selected}\n />\n );\n }\n\n return <StyledPlaceholder />;\n};\n\n/* ------------------------------------------------------------------ */\n/* The picker */\n/* ------------------------------------------------------------------ */\n\n/* The popover, centred over the board's own overlay. It is deliberately NOT a\n DS `Dialog`: the app's picker has no title and no action buttons — you search,\n you pick, it closes. `Modal` is used only for what a dialog and a popover do\n share: the portal, the overlay, the focus lock and the Esc handler. */\nconst StyledPickerPanel = styled(Paper)`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n flex-direction: column;\n width: 470px;\n max-width: calc(100vw - 32px);\n max-height: 70vh;\n overflow: hidden;\n\n && {\n border-radius: 12px;\n border: 1px solid var(--border-primary);\n box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);\n }\n`;\n\n/* Search + adornments, mirroring `Select`'s own form row: the back arrow is a\n start adornment (TaskList), the group-by sort a end adornment (ProjectList). */\nconst StyledPickerHeader = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n flex-shrink: 0;\n padding: 12px 12px 8px;\n\n /* the DS Input wrapper is a fixed 360px — the panel owns the width here */\n .picker-search {\n width: 100%;\n border-radius: 8px;\n }\n\n .picker-search:focus-within {\n border-color: var(--color-primary);\n outline: 1px solid var(--color-primary);\n }\n`;\n\nconst StyledPickerList = styled.div`\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n padding: 4px 0 12px;\n\n .picker-group-header {\n box-sizing: border-box;\n height: 36px;\n display: flex;\n align-items: center;\n padding: 0 20px;\n margin-top: 4px;\n }\n\n .picker-empty {\n padding: 24px 20px;\n text-align: center;\n }\n`;\n\n/* A generously spaced row: the name on the left, an empty radio on the right —\n the shape `Select` gives a single-choice option, at picker scale. */\nconst StyledPickerRow = styled.div`\n box-sizing: border-box;\n height: 56px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n padding: 0 20px;\n cursor: pointer;\n outline: none;\n\n &:hover,\n &:focus-visible {\n background-color: var(--color-theme-200);\n }\n\n .row-lead {\n display: flex;\n align-items: center;\n gap: 12px;\n min-width: 0;\n }\n\n .row-name {\n min-width: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n .c-radio-btn {\n flex-shrink: 0;\n }\n`;\n\nexport interface PickerRowProps {\n id: string;\n name: string;\n /** A person row carries the avatar in front of the name. */\n avatar?: PickerPerson;\n onSelect: () => void;\n}\n\nconst PickerRow = ({\n id,\n name,\n avatar,\n onSelect,\n}: PickerRowProps): ReactElement => (\n <StyledPickerRow\n role=\"button\"\n tabIndex={0}\n onClick={onSelect}\n onKeyDown={(event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n onSelect();\n }\n }}\n >\n <span className=\"row-lead\">\n {avatar ? (\n <RoundAvatar $bg={avatar.color} $size={24} $bordered={false}>\n {avatar.initials}\n </RoundAvatar>\n ) : null}\n <span className=\"row-name\">\n <Body2>{name}</Body2>\n </span>\n </span>\n <RadioButton id={`wb-picker-${id}`} tabIndex={-1} />\n </StyledPickerRow>\n);\n\nexport interface ProjectElementPickerProps {\n kind: ProjectElementKind;\n onSelectProject: (project: PickerProject) => void;\n onSelectTask: (project: PickerProject, task: PickerTask) => void;\n onSelectPerson: (person: PickerPerson) => void;\n onCancel: () => void;\n}\n\n/**\n * One picker, three flows — the same split the app makes between\n * `MenuSelector/ProjectList` (one step), `ProjectTaskMenuSelector` (project,\n * then task) and the flat People list (one step, no grouping). The task flow\n * deliberately drops the app's \"Directly on project\" default option: a task\n * card has to be a task.\n */\nexport const ProjectElementPicker = ({\n kind,\n onSelectProject,\n onSelectTask,\n onSelectPerson,\n onCancel,\n}: ProjectElementPickerProps): ReactElement => {\n const [project, setProject] = useState<PickerProject | null>(null);\n const [query, setQuery] = useState(\"\");\n /* The picker opens on a mouseUP — the end of the draw gesture — so the click\n that closes that gesture arrives when the overlay is already on screen. A\n dismissal therefore has to be a WHOLE click on the overlay: press, then\n release. Without this the placeholder could be cancelled by the very\n gesture that created it. */\n const pressedInsideRef = useRef(false);\n\n const onTaskStep = kind === \"task\" && project !== null;\n const onPeopleStep = kind === \"person\";\n\n const projectGroups = useMemo(\n () =>\n groupProjects(\n PICKER_PROJECTS.filter((entry) => matchesQuery(entry.name, query))\n ),\n [query]\n );\n\n const taskGroups = useMemo(\n () =>\n project\n ? groupTasks(\n project.tasks.filter((task) =>\n matchesQuery(taskDisplayName(task), query)\n )\n )\n : [],\n [project, query]\n );\n\n const handleProject = (picked: PickerProject): void => {\n if (kind === \"project\") {\n onSelectProject(picked);\n\n return;\n }\n\n setProject(picked);\n setQuery(\"\");\n };\n\n const handleBack = (): void => {\n setProject(null);\n setQuery(\"\");\n };\n\n const people = useMemo(\n () =>\n PICKER_PEOPLE_LIST.filter((entry) =>\n matchesQuery(entry.person.name, query)\n ),\n [query]\n );\n\n const isEmpty = onPeopleStep\n ? people.length === 0\n : onTaskStep\n ? taskGroups.length === 0\n : projectGroups.length === 0;\n\n const searchPlaceholder = onPeopleStep\n ? \"Search a person\"\n : onTaskStep\n ? \"Search a task\"\n : \"Search a project\";\n\n const emptyLabel = onPeopleStep\n ? \"No people\"\n : onTaskStep\n ? \"No Result\"\n : \"No Projects\";\n\n return (\n <Modal\n open\n onClose={onCancel}\n disableBackgroundClick\n onMouseDown={() => {\n pressedInsideRef.current = true;\n }}\n onClickOutside={() => {\n if (pressedInsideRef.current) {\n onCancel();\n }\n }}\n >\n <StyledPickerPanel type=\"paper-2\">\n <StyledPickerHeader>\n {onTaskStep ? (\n <Tooltip title=\"Back to projects\">\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n onClick={handleBack}\n aria-label=\"Back to projects\"\n >\n <ArrowLeftIcon />\n </IconButton>\n </Tooltip>\n ) : null}\n <Input\n className=\"picker-search\"\n autoFocus\n value={query}\n placeholder={searchPlaceholder}\n onChange={(event) => setQuery(event.target.value)}\n />\n {onTaskStep || onPeopleStep ? null : (\n <Tooltip title=\"Group by\">\n <IconButton type=\"button\" variant=\"text gray\">\n <SortGeneralIcon />\n </IconButton>\n </Tooltip>\n )}\n </StyledPickerHeader>\n\n <StyledPickerList>\n {isEmpty ? (\n <div className=\"picker-empty\">\n <Body2 color=\"tertiary\">{emptyLabel}</Body2>\n </div>\n ) : null}\n\n {onPeopleStep\n ? people.map(({ id, person }) => (\n <PickerRow\n key={id}\n id={id}\n name={person.name}\n avatar={person}\n onSelect={() => onSelectPerson(person)}\n />\n ))\n : null}\n\n {onTaskStep && project\n ? taskGroups.map((group) => (\n <div key={group.taskList}>\n <div className=\"picker-group-header\">\n <Body2 weight=\"bold\">{group.taskList}</Body2>\n </div>\n {group.tasks.map((task) => (\n <PickerRow\n key={task.id}\n id={task.id}\n name={taskDisplayName(task)}\n onSelect={() => onSelectTask(project, task)}\n />\n ))}\n </div>\n ))\n : null}\n\n {onTaskStep || onPeopleStep\n ? null\n : projectGroups.map((group) => (\n <div key={group.client}>\n <div className=\"picker-group-header\">\n <Body2 weight=\"bold\">{group.client}</Body2>\n </div>\n {group.projects.map((entry) => (\n <PickerRow\n key={entry.id}\n id={entry.id}\n name={entry.name}\n onSelect={() => handleProject(entry)}\n />\n ))}\n </div>\n ))}\n </StyledPickerList>\n </StyledPickerPanel>\n </Modal>\n );\n};\n"],"mappings":";AAAA,OAAOA,KAAK,IAAkBC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAEtE,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,SAASC,cAAc,EAAEC,mBAAmB,QAAQ,YAAY;AAChE,SAASC,UAAU,QAAQ,6BAA6B;AACxD,SACEC,aAAa,EACbC,UAAU,EACVC,eAAe,QACV,wBAAwB;AAC/B,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,SAASC,OAAO,QAAQ,0BAA0B;AAClD,SAASC,KAAK,EAAEC,QAAQ,QAAQ,6BAA6B;AAC7D,SAASC,aAAa,EAAEC,WAAW,QAAQ,WAAW;AACtD,SACEC,qBAAqB,IAAIC,6BAA6B,EACtDC,WAAW,EAGXC,QAAQ,QAEH,wBAAwB;;AAE/B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO,MAAMC,qBAAqB,GAAG,GAAG;AACxC,OAAO,MAAMC,sBAAsB,GAAG,GAAG;;AAEzC;AACA;AACA,OAAO,MAAMC,kBAAkB,GAAG,GAAG;AACrC,OAAO,MAAMC,eAAe,GAAG,GAAG;;AAElC;AACA,OAAO,MAAMC,UAAU,GAAG,GAAG;AAM7B;AACA,OAAO,MAAMC,aAAa,GAAIC,IAAY,IACxCA,IAAI,KAA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AE0C,IAAI,iBACpBzG,KAAA,CAAA0J,aAAA,CAACmC,SAAS;IACRQ,GAAG,EAAE5F,IAAI,CAACxC,EAAG;IACbA,EAAE,EAAEwC,IAAI,CAACxC,EAAG;IACZjB,IAAI,EAAEgE,eAAe,CAACP,IAAI,CAAE;IAC5BuF,QAAQ,EAAEA,CAAA,KAAMU,YAAY,CAAC/J,OAAO,EAAE8D,IAAI;EAAE,CAC7C,CACF,CACE,CACN,CAAC,GACF,IAAI,EAEPyG,UAAU,IAAIC,YAAY,GACvB,IAAI,GACJC,aAAa,CAACrJ,GAAG,CAAEqC,KAAK,iBACtBpG,KAAA,CAAA0J,aAAA;IAAK2C,GAAG,EAAEjG,KAAK,CAACvD;EAAO,gBACrB7C,KAAA,CAAA0J,aAAA;IAAKe,SAAS,EAAC;EAAqB,gBAClCzK,KAAA,CAAA0J,aAAA,CAACxI,KAAK;IAACyJ,MAAM,EAAC;EAAM,GAAEvE,KAAK,CAACvD,MAAc,CACvC,CAAC,EACLuD,KAAK,CAACH,QAAQ,CAAClC,GAAG,CAAEuC,KAAK,iBACxBtG,KAAA,CAAA0J,aAAA,CAACmC,SAAS;IACRQ,GAAG,EAAE/F,KAAK,CAACrC,EAAG;IACdA,EAAE,EAAEqC,KAAK,CAACrC,EAAG;IACbjB,IAAI,EAAEsD,KAAK,CAACtD,IAAK;IACjBgJ,QAAQ,EAAEA,CAAA,KAAMuB,aAAa,CAACjH,KAAK;EAAE,CACtC,CACF,CACE,CACN,CACW,CACD,CACd,CAAC;AAEZ,CAAC","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@activecollab/components",
3
- "version": "2.0.445",
3
+ "version": "2.0.446",
4
4
  "description": "ActiveCollab Components",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",