@activecollab/components 2.0.543 → 2.0.544

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.
Files changed (107) hide show
  1. package/dist/cjs/components/ConfirmDialog/ConfirmDialog.js +2 -2
  2. package/dist/cjs/components/ConfirmDialog/ConfirmDialog.js.map +1 -1
  3. package/dist/cjs/components/Dialog/Dialog.js +11 -8
  4. package/dist/cjs/components/Dialog/Dialog.js.map +1 -1
  5. package/dist/cjs/components/Dialog/DialogFrame.js +7 -7
  6. package/dist/cjs/components/Dialog/DialogFrame.js.map +1 -1
  7. package/dist/cjs/components/Dialog/usePropWarning.js +34 -0
  8. package/dist/cjs/components/Dialog/usePropWarning.js.map +1 -0
  9. package/dist/cjs/components/ObjectFormModal/ObjectFormModal.js +10 -7
  10. package/dist/cjs/components/ObjectFormModal/ObjectFormModal.js.map +1 -1
  11. package/dist/cjs/components/Sheet/Sheet.js +17 -5
  12. package/dist/cjs/components/Sheet/Sheet.js.map +1 -1
  13. package/dist/cjs/presentation/myWork/MyWorkListSettingsDialog.js +1 -1
  14. package/dist/cjs/presentation/myWork/MyWorkListSettingsDialog.js.map +1 -1
  15. package/dist/cjs/presentation/reports/availabilityExport.js +1 -1
  16. package/dist/cjs/presentation/reports/availabilityExport.js.map +1 -1
  17. package/dist/cjs/presentation/selfHostedRedesign/parts.js +6 -6
  18. package/dist/cjs/presentation/selfHostedRedesign/parts.js.map +1 -1
  19. package/dist/cjs/presentation/shared/LinkingCommandsButton.js +1 -1
  20. package/dist/cjs/presentation/shared/LinkingCommandsButton.js.map +1 -1
  21. package/dist/cjs/presentation/shared/MessageDialog.js +1 -1
  22. package/dist/cjs/presentation/shared/MessageDialog.js.map +1 -1
  23. package/dist/cjs/presentation/shared/MessageFeedback.js +1 -1
  24. package/dist/cjs/presentation/shared/MessageFeedback.js.map +1 -1
  25. package/dist/cjs/presentation/shared/ProjectOptionsMenu.js +1 -1
  26. package/dist/cjs/presentation/shared/ProjectOptionsMenu.js.map +1 -1
  27. package/dist/cjs/presentation/shared/SourceCodeSection.js +2 -2
  28. package/dist/cjs/presentation/shared/SourceCodeSection.js.map +1 -1
  29. package/dist/cjs/presentation/shared/UserDetailsDialog.js +1 -1
  30. package/dist/cjs/presentation/shared/UserDetailsDialog.js.map +1 -1
  31. package/dist/cjs/presentation/shared/WebhookLogsDialog.js +1 -1
  32. package/dist/cjs/presentation/shared/WebhookLogsDialog.js.map +1 -1
  33. package/dist/cjs/presentation/shared/selfHostedSettings.js +1 -1
  34. package/dist/cjs/presentation/shared/selfHostedSettings.js.map +1 -1
  35. package/dist/cjs/presentation/shared/selfHostedUpgrade.js +3 -3
  36. package/dist/cjs/presentation/shared/selfHostedUpgrade.js.map +1 -1
  37. package/dist/cjs/presentation/shared/systemSettingsDialog.js +1 -1
  38. package/dist/cjs/presentation/shared/systemSettingsDialog.js.map +1 -1
  39. package/dist/cjs/presentation/whiteboard/peopleMenu.js +1 -1
  40. package/dist/cjs/presentation/whiteboard/peopleMenu.js.map +1 -1
  41. package/dist/cjs/presentation/whiteboard/projectElements.js +1 -1
  42. package/dist/cjs/presentation/whiteboard/projectElements.js.map +1 -1
  43. package/dist/esm/components/ConfirmDialog/ConfirmDialog.d.ts.map +1 -1
  44. package/dist/esm/components/ConfirmDialog/ConfirmDialog.js +2 -2
  45. package/dist/esm/components/ConfirmDialog/ConfirmDialog.js.map +1 -1
  46. package/dist/esm/components/Dialog/Dialog.d.ts +7 -1
  47. package/dist/esm/components/Dialog/Dialog.d.ts.map +1 -1
  48. package/dist/esm/components/Dialog/Dialog.js +11 -8
  49. package/dist/esm/components/Dialog/Dialog.js.map +1 -1
  50. package/dist/esm/components/Dialog/DialogFrame.d.ts +2 -2
  51. package/dist/esm/components/Dialog/DialogFrame.d.ts.map +1 -1
  52. package/dist/esm/components/Dialog/DialogFrame.js +7 -7
  53. package/dist/esm/components/Dialog/DialogFrame.js.map +1 -1
  54. package/dist/esm/components/Dialog/usePropWarning.d.ts +13 -0
  55. package/dist/esm/components/Dialog/usePropWarning.d.ts.map +1 -0
  56. package/dist/esm/components/Dialog/usePropWarning.js +26 -0
  57. package/dist/esm/components/Dialog/usePropWarning.js.map +1 -0
  58. package/dist/esm/components/ObjectFormModal/ObjectFormModal.d.ts +5 -1
  59. package/dist/esm/components/ObjectFormModal/ObjectFormModal.d.ts.map +1 -1
  60. package/dist/esm/components/ObjectFormModal/ObjectFormModal.js +10 -7
  61. package/dist/esm/components/ObjectFormModal/ObjectFormModal.js.map +1 -1
  62. package/dist/esm/components/Sheet/Sheet.d.ts +6 -1
  63. package/dist/esm/components/Sheet/Sheet.d.ts.map +1 -1
  64. package/dist/esm/components/Sheet/Sheet.js +17 -5
  65. package/dist/esm/components/Sheet/Sheet.js.map +1 -1
  66. package/dist/esm/presentation/myWork/MyWorkListSettingsDialog.js +1 -1
  67. package/dist/esm/presentation/myWork/MyWorkListSettingsDialog.js.map +1 -1
  68. package/dist/esm/presentation/reports/availabilityExport.js +1 -1
  69. package/dist/esm/presentation/reports/availabilityExport.js.map +1 -1
  70. package/dist/esm/presentation/selfHostedRedesign/parts.js +6 -6
  71. package/dist/esm/presentation/selfHostedRedesign/parts.js.map +1 -1
  72. package/dist/esm/presentation/shared/LinkingCommandsButton.js +1 -1
  73. package/dist/esm/presentation/shared/LinkingCommandsButton.js.map +1 -1
  74. package/dist/esm/presentation/shared/MessageDialog.js +1 -1
  75. package/dist/esm/presentation/shared/MessageDialog.js.map +1 -1
  76. package/dist/esm/presentation/shared/MessageFeedback.js +1 -1
  77. package/dist/esm/presentation/shared/MessageFeedback.js.map +1 -1
  78. package/dist/esm/presentation/shared/ProjectOptionsMenu.js +1 -1
  79. package/dist/esm/presentation/shared/ProjectOptionsMenu.js.map +1 -1
  80. package/dist/esm/presentation/shared/SourceCodeSection.js +2 -2
  81. package/dist/esm/presentation/shared/SourceCodeSection.js.map +1 -1
  82. package/dist/esm/presentation/shared/UserDetailsDialog.js +1 -1
  83. package/dist/esm/presentation/shared/UserDetailsDialog.js.map +1 -1
  84. package/dist/esm/presentation/shared/WebhookLogsDialog.js +1 -1
  85. package/dist/esm/presentation/shared/WebhookLogsDialog.js.map +1 -1
  86. package/dist/esm/presentation/shared/selfHostedSettings.js +1 -1
  87. package/dist/esm/presentation/shared/selfHostedSettings.js.map +1 -1
  88. package/dist/esm/presentation/shared/selfHostedUpgrade.js +3 -3
  89. package/dist/esm/presentation/shared/selfHostedUpgrade.js.map +1 -1
  90. package/dist/esm/presentation/shared/systemSettingsDialog.d.ts.map +1 -1
  91. package/dist/esm/presentation/shared/systemSettingsDialog.js +1 -1
  92. package/dist/esm/presentation/shared/systemSettingsDialog.js.map +1 -1
  93. package/dist/esm/presentation/whiteboard/peopleMenu.js +1 -1
  94. package/dist/esm/presentation/whiteboard/peopleMenu.js.map +1 -1
  95. package/dist/esm/presentation/whiteboard/projectElements.js +1 -1
  96. package/dist/esm/presentation/whiteboard/projectElements.js.map +1 -1
  97. package/dist/index.js +54 -30
  98. package/dist/index.js.map +1 -1
  99. package/dist/index.min.js +1 -1
  100. package/dist/index.min.js.map +1 -1
  101. package/package.json +1 -1
  102. package/dist/cjs/components/Dialog/useRemovedPropWarning.js +0 -22
  103. package/dist/cjs/components/Dialog/useRemovedPropWarning.js.map +0 -1
  104. package/dist/esm/components/Dialog/useRemovedPropWarning.d.ts +0 -3
  105. package/dist/esm/components/Dialog/useRemovedPropWarning.d.ts.map +0 -1
  106. package/dist/esm/components/Dialog/useRemovedPropWarning.js +0 -16
  107. package/dist/esm/components/Dialog/useRemovedPropWarning.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"projectElements.js","names":["React","useMemo","useState","styled","SELECTION_BLUE","SELECTION_WASH","StyledCanvasElement","Dialog","IconButton","ArrowLeftIcon","PersonIcon","SortGeneralIcon","Input","SkeletonLoader","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","PICKER_LABEL","StyledPickerContent","Content","StyledPickerHeader","StyledPickerList","StyledPickerRow","PickerRow","_ref7","avatar","onSelect","role","tabIndex","onKeyDown","event","key","preventDefault","ProjectElementPicker","_ref8","onSelectProject","onSelectTask","onSelectPerson","onCancel","_useState","setProject","_useState2","setQuery","onTaskStep","onPeopleStep","projectGroups","filter","taskGroups","handleProject","picked","handleBack","people","isEmpty","searchPlaceholder","emptyLabel","open","onClose","animate","enableBackgroundClick","scroll","variant","autoFocus","placeholder","onChange","target","_ref9"],"sources":["../../../../src/presentation/whiteboard/projectElements.tsx"],"sourcesContent":["import React, { ReactElement, useMemo, useState } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport {\n SELECTION_BLUE,\n SELECTION_WASH,\n StyledCanvasElement,\n} from \"./elements\";\nimport { Dialog } from \"../../components/Dialog\";\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 { 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: ${SELECTION_WASH};\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 picker is a DS Dialog, as in the app's EntityPicker: size s, a fade, a\n click outside closes it, and no title or actions — you search, you pick, it\n closes. Its content owns the scroll, so the Dialog content does not. */\n/* The accessible name per kind, as in the app's EntityPicker. */\nconst PICKER_LABEL: Record<ProjectElementKind, string> = {\n project: \"Choose a Project\",\n task: \"Choose a Task\",\n person: \"Choose a Person\",\n};\n\nconst StyledPickerContent = styled(Dialog.Content)`\n && {\n display: flex;\n flex-direction: column;\n max-height: 70vh;\n padding: 0;\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 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 <Dialog\n open\n onClose={onCancel}\n size=\"s\"\n animate=\"fade\"\n enableBackgroundClick\n aria-label={PICKER_LABEL[kind]}\n >\n <StyledPickerContent scroll={false}>\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 </StyledPickerContent>\n </Dialog>\n );\n};\n"],"mappings":";AAAA,OAAOA,KAAK,IAAkBC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAE9D,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,SACEC,cAAc,EACdC,cAAc,EACdC,mBAAmB,QACd,YAAY;AACnB,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,UAAU,QAAQ,6BAA6B;AACxD,SACEC,aAAa,EACbC,UAAU,EACVC,eAAe,QACV,wBAAwB;AAC/B,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,cAAc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AqB,gBAClCxK,KAAA,CAAAyJ,aAAA,CAACxI,KAAK;IAACyJ,MAAM,EAAC;EAAM,GAAEvE,KAAK,CAACvD,MAAc,CACvC,CAAC,EACLuD,KAAK,CAACH,QAAQ,CAAClC,GAAG,CAAEuC,KAAK,iBACxBrG,KAAA,CAAAyJ,aAAA,CAACqC,SAAS;IACRQ,GAAG,EAAEjG,KAAK,CAACrC,EAAG;IACdA,EAAE,EAAEqC,KAAK,CAACrC,EAAG;IACbjB,IAAI,EAAEsD,KAAK,CAACtD,IAAK;IACjBkJ,QAAQ,EAAEA,CAAA,KAAMsB,aAAa,CAAClH,KAAK;EAAE,CACtC,CACF,CACE,CACN,CACW,CACC,CACf,CAAC;AAEb,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"projectElements.js","names":["React","useMemo","useState","styled","SELECTION_BLUE","SELECTION_WASH","StyledCanvasElement","Dialog","IconButton","ArrowLeftIcon","PersonIcon","SortGeneralIcon","Input","SkeletonLoader","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","PICKER_LABEL","StyledPickerContent","Content","StyledPickerHeader","StyledPickerList","StyledPickerRow","PickerRow","_ref7","avatar","onSelect","role","tabIndex","onKeyDown","event","key","preventDefault","ProjectElementPicker","_ref8","onSelectProject","onSelectTask","onSelectPerson","onCancel","_useState","setProject","_useState2","setQuery","onTaskStep","onPeopleStep","projectGroups","filter","taskGroups","handleProject","picked","handleBack","people","isEmpty","searchPlaceholder","emptyLabel","open","onClose","animate","dismissOnBackdropClick","scroll","variant","autoFocus","placeholder","onChange","target","_ref9"],"sources":["../../../../src/presentation/whiteboard/projectElements.tsx"],"sourcesContent":["import React, { ReactElement, useMemo, useState } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport {\n SELECTION_BLUE,\n SELECTION_WASH,\n StyledCanvasElement,\n} from \"./elements\";\nimport { Dialog } from \"../../components/Dialog\";\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 { 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: ${SELECTION_WASH};\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 picker is a DS Dialog, as in the app's EntityPicker: size s, a fade, a\n click outside closes it, and no title or actions — you search, you pick, it\n closes. Its content owns the scroll, so the Dialog content does not. */\n/* The accessible name per kind, as in the app's EntityPicker. */\nconst PICKER_LABEL: Record<ProjectElementKind, string> = {\n project: \"Choose a Project\",\n task: \"Choose a Task\",\n person: \"Choose a Person\",\n};\n\nconst StyledPickerContent = styled(Dialog.Content)`\n && {\n display: flex;\n flex-direction: column;\n max-height: 70vh;\n padding: 0;\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 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 <Dialog\n open\n onClose={onCancel}\n size=\"s\"\n animate=\"fade\"\n dismissOnBackdropClick\n aria-label={PICKER_LABEL[kind]}\n >\n <StyledPickerContent scroll={false}>\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 </StyledPickerContent>\n </Dialog>\n );\n};\n"],"mappings":";AAAA,OAAOA,KAAK,IAAkBC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAE9D,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,SACEC,cAAc,EACdC,cAAc,EACdC,mBAAmB,QACd,YAAY;AACnB,SAASC,MAAM,QAAQ,yBAAyB;AAChD,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,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;;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alRoot.displayName = "ModalRoot";
19425
19425
 
19426
- var _excluded$1O = ["forwardedRef", "surface", "open", "onClose", "enableBackgroundClick", "disableCloseOnEsc", "animate", "onClickOutside", "disableReturnFocus"];
19426
+ var _excluded$1O = ["forwardedRef", "surface", "open", "onClose", "dismissOnBackdropClick", "disableCloseOnEsc", "animate", "onBackdropClickBlocked", "disableReturnFocus"];
19427
19427
  // What Dialog and ObjectFormModal share: the native modal, the viewport and the animation around a surface each draws.
19428
19428
  var DialogFrame = function DialogFrame(_ref) {
19429
19429
  var forwardedRef = _ref.forwardedRef,
@@ -19431,13 +19431,13 @@
19431
19431
  _ref$open = _ref.open,
19432
19432
  open = _ref$open === void 0 ? false : _ref$open,
19433
19433
  onClose = _ref.onClose,
19434
- _ref$enableBackground = _ref.enableBackgroundClick,
19435
- enableBackgroundClick = _ref$enableBackground === void 0 ? false : _ref$enableBackground,
19434
+ _ref$dismissOnBackdro = _ref.dismissOnBackdropClick,
19435
+ dismissOnBackdropClick = _ref$dismissOnBackdro === void 0 ? false : _ref$dismissOnBackdro,
19436
19436
  _ref$disableCloseOnEs = _ref.disableCloseOnEsc,
19437
19437
  disableCloseOnEsc = _ref$disableCloseOnEs === void 0 ? false : _ref$disableCloseOnEs,
19438
19438
  _ref$animate = _ref.animate,
19439
19439
  animate = _ref$animate === void 0 ? "slide" : _ref$animate,
19440
- onClickOutside = _ref.onClickOutside,
19440
+ onBackdropClickBlocked = _ref.onBackdropClickBlocked,
19441
19441
  _ref$disableReturnFoc = _ref.disableReturnFocus,
19442
19442
  disableReturnFocus = _ref$disableReturnFoc === void 0 ? false : _ref$disableReturnFoc,
19443
19443
  rest = _objectWithoutProperties(_ref, _excluded$1O);
@@ -19493,9 +19493,9 @@
19493
19493
  }, [innerOpen, ariaLabel, explicitLabelledBy]);
19494
19494
  var handleDismissBlocked = React.useCallback(function (reason, event) {
19495
19495
  if (reason === "backdrop") {
19496
- onClickOutside === null || onClickOutside === void 0 || onClickOutside(event);
19496
+ onBackdropClickBlocked === null || onBackdropClickBlocked === void 0 || onBackdropClickBlocked(event);
19497
19497
  }
19498
- }, [onClickOutside]);
19498
+ }, [onBackdropClickBlocked]);
19499
19499
  var contextValue = React.useMemo(function () {
19500
19500
  return {
19501
19501
  requestClose,
@@ -19512,7 +19512,7 @@
19512
19512
  onClose: onClose,
19513
19513
  disableCloseOnEsc: disableCloseOnEsc,
19514
19514
  disableReturnFocus: disableReturnFocus,
19515
- disableBackgroundClick: !enableBackgroundClick,
19515
+ disableBackgroundClick: !dismissOnBackdropClick,
19516
19516
  "aria-labelledby": ariaLabelledBy
19517
19517
  }), function (_ref2) {
19518
19518
  var isIn = _ref2.in,
@@ -19666,9 +19666,16 @@
19666
19666
  };
19667
19667
 
19668
19668
  var warned = new Set();
19669
+ var STATUS_TEXT = {
19670
+ deprecated: "is deprecated",
19671
+ removed: "is gone"
19672
+ };
19669
19673
 
19670
- /** Warns once per component and prop in development while a caller still passes a prop that no longer does anything. */
19671
- var useRemovedPropWarning = function useRemovedPropWarning(component, prop, value, message) {
19674
+ /**
19675
+ * Warns once per component and prop in development while a caller still passes a prop that is deprecated (it still
19676
+ * works and has a replacement) or removed (it does nothing any more).
19677
+ */
19678
+ var usePropWarning = function usePropWarning(component, prop, value, status, message) {
19672
19679
  React.useEffect(function () {
19673
19680
  var key = "".concat(component, ".").concat(prop);
19674
19681
  if (process.env.NODE_ENV === "production" || value === undefined || warned.has(key)) {
@@ -19676,20 +19683,21 @@
19676
19683
  }
19677
19684
  warned.add(key);
19678
19685
  // eslint-disable-next-line no-console
19679
- console.warn("".concat(component, ": the ").concat(prop, " prop is gone. ").concat(message));
19680
- }, [component, prop, value, message]);
19686
+ console.warn("".concat(component, ": the ").concat(prop, " prop ").concat(STATUS_TEXT[status], ". ").concat(message));
19687
+ }, [component, prop, value, status, message]);
19681
19688
  };
19682
19689
 
19683
- var _excluded$1L = ["children", "open", "onClose", "className", "enableBackgroundClick", "disableCloseOnEsc", "animate", "onClickOutside", "size", "height", "native"];
19690
+ var _excluded$1L = ["children", "open", "onClose", "className", "dismissOnBackdropClick", "onBackdropClickBlocked", "enableBackgroundClick", "disableCloseOnEsc", "animate", "onClickOutside", "size", "height", "native"];
19684
19691
  var _Dialog = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
19685
- var _dialogSizes$size;
19692
+ var _dialogSizes$size, _ref2;
19686
19693
  var children = _ref.children,
19687
19694
  _ref$open = _ref.open,
19688
19695
  open = _ref$open === void 0 ? false : _ref$open,
19689
19696
  onClose = _ref.onClose,
19690
19697
  className = _ref.className,
19691
- _ref$enableBackground = _ref.enableBackgroundClick,
19692
- enableBackgroundClick = _ref$enableBackground === void 0 ? false : _ref$enableBackground,
19698
+ dismissOnBackdropClick = _ref.dismissOnBackdropClick,
19699
+ onBackdropClickBlocked = _ref.onBackdropClickBlocked,
19700
+ enableBackgroundClick = _ref.enableBackgroundClick,
19693
19701
  _ref$disableCloseOnEs = _ref.disableCloseOnEsc,
19694
19702
  disableCloseOnEsc = _ref$disableCloseOnEs === void 0 ? false : _ref$disableCloseOnEs,
19695
19703
  _ref$animate = _ref.animate,
@@ -19705,7 +19713,9 @@
19705
19713
  _useState2 = _slicedToArray(_useState, 2),
19706
19714
  dialogNode = _useState2[0],
19707
19715
  setDialogNode = _useState2[1];
19708
- useRemovedPropWarning("Dialog", "native", native, "Every Dialog is a native modal now, so remove it.");
19716
+ usePropWarning("Dialog", "native", native, "removed", "Every Dialog is a native modal now, so remove it.");
19717
+ usePropWarning("Dialog", "enableBackgroundClick", enableBackgroundClick, "deprecated", "Use dismissOnBackdropClick.");
19718
+ usePropWarning("Dialog", "onClickOutside", onClickOutside, "deprecated", "Use onBackdropClickBlocked.");
19709
19719
  useFluidHeightAnimation(dialogNode, height === "fluid");
19710
19720
  var surface = /*#__PURE__*/React__default["default"].createElement(StyledDialog, {
19711
19721
  ref: setDialogNode,
@@ -19717,10 +19727,10 @@
19717
19727
  forwardedRef: ref,
19718
19728
  open: open,
19719
19729
  onClose: onClose,
19720
- enableBackgroundClick: enableBackgroundClick,
19730
+ dismissOnBackdropClick: (_ref2 = dismissOnBackdropClick !== null && dismissOnBackdropClick !== void 0 ? dismissOnBackdropClick : enableBackgroundClick) !== null && _ref2 !== void 0 ? _ref2 : false,
19731
+ onBackdropClickBlocked: onBackdropClickBlocked !== null && onBackdropClickBlocked !== void 0 ? onBackdropClickBlocked : onClickOutside,
19721
19732
  disableCloseOnEsc: disableCloseOnEsc,
19722
19733
  animate: animate,
19723
- onClickOutside: onClickOutside,
19724
19734
  surface: surface
19725
19735
  }));
19726
19736
  });
@@ -19767,7 +19777,7 @@
19767
19777
  _useState2 = _slicedToArray(_useState, 2),
19768
19778
  confirmed = _useState2[0],
19769
19779
  setConfirmed = _useState2[1];
19770
- useRemovedPropWarning("ConfirmDialog", "native", native, "Every confirmation is a native modal now, so remove it.");
19780
+ usePropWarning("ConfirmDialog", "native", native, "removed", "Every confirmation is a native modal now, so remove it.");
19771
19781
  var isConfirmBlocked = Boolean(confirmationLabel) && !confirmed;
19772
19782
  var handleToggleConfirmed = React.useCallback(function (event) {
19773
19783
  return setConfirmed(event.target.checked);
@@ -28870,7 +28880,7 @@
28870
28880
  };
28871
28881
  };
28872
28882
 
28873
- var _excluded$_ = ["children", "onClose", "controls", "open", "animation", "position", "mode", "maxWidth", "surface", "disableFocusLock", "disableScrollLock", "disableBackgroundColor", "bodyStyle", "bodyClassName", "disableBackgroundClick"];
28883
+ var _excluded$_ = ["children", "onClose", "controls", "open", "animation", "position", "mode", "maxWidth", "surface", "disableFocusLock", "disableScrollLock", "disableBackgroundColor", "bodyStyle", "bodyClassName", "dismissOnBackdropClick", "onBackdropClickBlocked", "disableBackgroundClick"];
28874
28884
  var INSET_VAR = "--c-sheet-inset-right";
28875
28885
  var INSET_DURATION_VAR = "--c-sheet-inset-duration";
28876
28886
  // The controls column stands 48px left of the sheet. With less room it is not there.
@@ -28955,8 +28965,9 @@
28955
28965
  disableBackgroundColor = _ref$disableBackgroun === void 0 ? false : _ref$disableBackgroun,
28956
28966
  bodyStyle = _ref.bodyStyle,
28957
28967
  bodyClassName = _ref.bodyClassName,
28958
- _ref$disableBackgroun2 = _ref.disableBackgroundClick,
28959
- disableBackgroundClick = _ref$disableBackgroun2 === void 0 ? false : _ref$disableBackgroun2,
28968
+ dismissOnBackdropClick = _ref.dismissOnBackdropClick,
28969
+ onBackdropClickBlocked = _ref.onBackdropClickBlocked,
28970
+ disableBackgroundClick = _ref.disableBackgroundClick,
28960
28971
  rest = _objectWithoutProperties(_ref, _excluded$_);
28961
28972
  var _useState = React.useState(defaultOpen),
28962
28973
  _useState2 = _slicedToArray(_useState, 2),
@@ -28992,12 +29003,22 @@
28992
29003
  var handleOverlayExit = React.useCallback(function () {
28993
29004
  setOverlayEntered(false);
28994
29005
  }, []);
29006
+ usePropWarning("Sheet", "disableBackgroundClick", disableBackgroundClick, "deprecated", "Use dismissOnBackdropClick={false}.");
29007
+ var closesOnBackdropClick = dismissOnBackdropClick !== null && dismissOnBackdropClick !== void 0 ? dismissOnBackdropClick : !disableBackgroundClick;
29008
+
29009
+ // Over a native dialog the overlay takes clicks while it fades out too, and a sheet that is closing has nothing
29010
+ // left to block.
28995
29011
  var handleBackgroundClick = React.useCallback(function (event) {
28996
- if (!disableBackgroundClick) {
29012
+ if (!open) {
29013
+ return;
29014
+ }
29015
+ if (closesOnBackdropClick) {
28997
29016
  event.preventDefault();
28998
29017
  handleClose();
29018
+ } else {
29019
+ onBackdropClickBlocked === null || onBackdropClickBlocked === void 0 || onBackdropClickBlocked(event);
28999
29020
  }
29000
- }, [disableBackgroundClick, handleClose]);
29021
+ }, [open, closesOnBackdropClick, handleClose, onBackdropClickBlocked]);
29001
29022
  React.useImperativeHandle(ref, function () {
29002
29023
  return {
29003
29024
  close: handleClose
@@ -31151,13 +31172,13 @@
31151
31172
  }, FontStyle, BoxSizingStyle);
31152
31173
  StyledObjectFormModal.displayName = "StyledObjectFormModal";
31153
31174
 
31154
- var _excluded$J = ["children", "open", "onClose", "label", "size", "enableBackgroundClick", "disableCloseOnEsc", "disableFocusLock", "fill", "closeButton", "closeLabel", "className"];
31175
+ var _excluded$J = ["children", "open", "onClose", "label", "size", "dismissOnBackdropClick", "onBackdropClickBlocked", "enableBackgroundClick", "disableCloseOnEsc", "disableFocusLock", "fill", "closeButton", "closeLabel", "className"];
31155
31176
  // Menus and pickers opened from the form keep the layer they had before the form became a native modal.
31156
31177
  var MODAL_LAYER = {
31157
31178
  zIndex: layers.skyscraper
31158
31179
  };
31159
31180
  var ObjectFormModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
31160
- var _dialogSizes$size;
31181
+ var _ref2, _dialogSizes$size;
31161
31182
  var children = _ref.children,
31162
31183
  _ref$open = _ref.open,
31163
31184
  open = _ref$open === void 0 ? false : _ref$open,
@@ -31165,8 +31186,9 @@
31165
31186
  label = _ref.label,
31166
31187
  _ref$size = _ref.size,
31167
31188
  size = _ref$size === void 0 ? "s" : _ref$size,
31168
- _ref$enableBackground = _ref.enableBackgroundClick,
31169
- enableBackgroundClick = _ref$enableBackground === void 0 ? false : _ref$enableBackground,
31189
+ dismissOnBackdropClick = _ref.dismissOnBackdropClick,
31190
+ onBackdropClickBlocked = _ref.onBackdropClickBlocked,
31191
+ enableBackgroundClick = _ref.enableBackgroundClick,
31170
31192
  _ref$disableCloseOnEs = _ref.disableCloseOnEsc,
31171
31193
  disableCloseOnEsc = _ref$disableCloseOnEs === void 0 ? false : _ref$disableCloseOnEs,
31172
31194
  disableFocusLock = _ref.disableFocusLock,
@@ -31191,13 +31213,15 @@
31191
31213
  }
31192
31214
  }, [ref]);
31193
31215
  useFluidHeightAnimation(surfaceNode, true);
31194
- useRemovedPropWarning("ObjectFormModal", "disableFocusLock", disableFocusLock, "The modal is a native dialog now, so remove it.");
31216
+ usePropWarning("ObjectFormModal", "enableBackgroundClick", enableBackgroundClick, "deprecated", "Use dismissOnBackdropClick.");
31217
+ usePropWarning("ObjectFormModal", "disableFocusLock", disableFocusLock, "removed", "The modal is a native dialog now, so remove it.");
31195
31218
  return /*#__PURE__*/React__default["default"].createElement(LayerContextProvider, {
31196
31219
  value: MODAL_LAYER
31197
31220
  }, /*#__PURE__*/React__default["default"].createElement(DialogFrame, {
31198
31221
  open: open,
31199
31222
  onClose: onClose,
31200
- enableBackgroundClick: enableBackgroundClick,
31223
+ dismissOnBackdropClick: (_ref2 = dismissOnBackdropClick !== null && dismissOnBackdropClick !== void 0 ? dismissOnBackdropClick : enableBackgroundClick) !== null && _ref2 !== void 0 ? _ref2 : false,
31224
+ onBackdropClickBlocked: onBackdropClickBlocked,
31201
31225
  disableCloseOnEsc: disableCloseOnEsc,
31202
31226
  "aria-label": label,
31203
31227
  surface: /*#__PURE__*/React__default["default"].createElement(StyledObjectFormModal, _extends({}, rest, {