@activecollab/components 2.0.407 → 2.0.409

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 (89) hide show
  1. package/dist/cjs/components/Icons/collection/Project.js +98 -0
  2. package/dist/cjs/components/Icons/collection/Project.js.map +1 -0
  3. package/dist/cjs/components/Icons/collection/Task.js +61 -0
  4. package/dist/cjs/components/Icons/collection/Task.js.map +1 -0
  5. package/dist/cjs/components/Icons/collection/index.js +14 -0
  6. package/dist/cjs/components/Icons/collection/index.js.map +1 -1
  7. package/dist/cjs/presentation/shared/WebhookLogsDialog.js +170 -46
  8. package/dist/cjs/presentation/shared/WebhookLogsDialog.js.map +1 -1
  9. package/dist/cjs/presentation/stackedCard/content/NoteCard.js +7 -3
  10. package/dist/cjs/presentation/stackedCard/content/NoteCard.js.map +1 -1
  11. package/dist/cjs/presentation/stackedCard/content/ProjectCard.js +136 -0
  12. package/dist/cjs/presentation/stackedCard/content/ProjectCard.js.map +1 -0
  13. package/dist/cjs/presentation/stackedCard/content/TaskCard.js +183 -56
  14. package/dist/cjs/presentation/stackedCard/content/TaskCard.js.map +1 -1
  15. package/dist/cjs/presentation/stackedCard/content/index.js +11 -0
  16. package/dist/cjs/presentation/stackedCard/content/index.js.map +1 -1
  17. package/dist/cjs/presentation/stackedCard/content/shared.js +66 -19
  18. package/dist/cjs/presentation/stackedCard/content/shared.js.map +1 -1
  19. package/dist/cjs/presentation/whiteboard/bottomDock.js +95 -32
  20. package/dist/cjs/presentation/whiteboard/bottomDock.js.map +1 -1
  21. package/dist/cjs/presentation/whiteboard/canvasElements.js +196 -8
  22. package/dist/cjs/presentation/whiteboard/canvasElements.js.map +1 -1
  23. package/dist/cjs/presentation/whiteboard/inspector.js +149 -47
  24. package/dist/cjs/presentation/whiteboard/inspector.js.map +1 -1
  25. package/dist/cjs/presentation/whiteboard/outline.js +91 -18
  26. package/dist/cjs/presentation/whiteboard/outline.js.map +1 -1
  27. package/dist/cjs/presentation/whiteboard/projectElements.js +883 -0
  28. package/dist/cjs/presentation/whiteboard/projectElements.js.map +1 -0
  29. package/dist/esm/components/Icons/collection/Project.d.ts +36 -0
  30. package/dist/esm/components/Icons/collection/Project.d.ts.map +1 -0
  31. package/dist/esm/components/Icons/collection/Project.js +91 -0
  32. package/dist/esm/components/Icons/collection/Project.js.map +1 -0
  33. package/dist/esm/components/Icons/collection/Task.d.ts +32 -0
  34. package/dist/esm/components/Icons/collection/Task.d.ts.map +1 -0
  35. package/dist/esm/components/Icons/collection/Task.js +54 -0
  36. package/dist/esm/components/Icons/collection/Task.js.map +1 -0
  37. package/dist/esm/components/Icons/collection/index.d.ts +2 -0
  38. package/dist/esm/components/Icons/collection/index.d.ts.map +1 -1
  39. package/dist/esm/components/Icons/collection/index.js +2 -0
  40. package/dist/esm/components/Icons/collection/index.js.map +1 -1
  41. package/dist/esm/presentation/shared/WebhookLogsDialog.d.ts +1 -3
  42. package/dist/esm/presentation/shared/WebhookLogsDialog.d.ts.map +1 -1
  43. package/dist/esm/presentation/shared/WebhookLogsDialog.js +164 -46
  44. package/dist/esm/presentation/shared/WebhookLogsDialog.js.map +1 -1
  45. package/dist/esm/presentation/stackedCard/content/NoteCard.d.ts +8 -1
  46. package/dist/esm/presentation/stackedCard/content/NoteCard.d.ts.map +1 -1
  47. package/dist/esm/presentation/stackedCard/content/NoteCard.js +8 -4
  48. package/dist/esm/presentation/stackedCard/content/NoteCard.js.map +1 -1
  49. package/dist/esm/presentation/stackedCard/content/ProjectCard.d.ts +64 -0
  50. package/dist/esm/presentation/stackedCard/content/ProjectCard.d.ts.map +1 -0
  51. package/dist/esm/presentation/stackedCard/content/ProjectCard.js +128 -0
  52. package/dist/esm/presentation/stackedCard/content/ProjectCard.js.map +1 -0
  53. package/dist/esm/presentation/stackedCard/content/TaskCard.d.ts +64 -2
  54. package/dist/esm/presentation/stackedCard/content/TaskCard.d.ts.map +1 -1
  55. package/dist/esm/presentation/stackedCard/content/TaskCard.js +181 -58
  56. package/dist/esm/presentation/stackedCard/content/TaskCard.js.map +1 -1
  57. package/dist/esm/presentation/stackedCard/content/index.d.ts +1 -0
  58. package/dist/esm/presentation/stackedCard/content/index.d.ts.map +1 -1
  59. package/dist/esm/presentation/stackedCard/content/index.js +1 -0
  60. package/dist/esm/presentation/stackedCard/content/index.js.map +1 -1
  61. package/dist/esm/presentation/stackedCard/content/shared.d.ts +30 -0
  62. package/dist/esm/presentation/stackedCard/content/shared.d.ts.map +1 -1
  63. package/dist/esm/presentation/stackedCard/content/shared.js +66 -19
  64. package/dist/esm/presentation/stackedCard/content/shared.js.map +1 -1
  65. package/dist/esm/presentation/whiteboard/bottomDock.d.ts +30 -7
  66. package/dist/esm/presentation/whiteboard/bottomDock.d.ts.map +1 -1
  67. package/dist/esm/presentation/whiteboard/bottomDock.js +79 -32
  68. package/dist/esm/presentation/whiteboard/bottomDock.js.map +1 -1
  69. package/dist/esm/presentation/whiteboard/canvasElements.d.ts +4 -1
  70. package/dist/esm/presentation/whiteboard/canvasElements.d.ts.map +1 -1
  71. package/dist/esm/presentation/whiteboard/canvasElements.js +158 -7
  72. package/dist/esm/presentation/whiteboard/canvasElements.js.map +1 -1
  73. package/dist/esm/presentation/whiteboard/inspector.d.ts +35 -1
  74. package/dist/esm/presentation/whiteboard/inspector.d.ts.map +1 -1
  75. package/dist/esm/presentation/whiteboard/inspector.js +170 -68
  76. package/dist/esm/presentation/whiteboard/inspector.js.map +1 -1
  77. package/dist/esm/presentation/whiteboard/outline.d.ts +23 -3
  78. package/dist/esm/presentation/whiteboard/outline.d.ts.map +1 -1
  79. package/dist/esm/presentation/whiteboard/outline.js +89 -18
  80. package/dist/esm/presentation/whiteboard/outline.js.map +1 -1
  81. package/dist/esm/presentation/whiteboard/projectElements.d.ts +267 -0
  82. package/dist/esm/presentation/whiteboard/projectElements.d.ts.map +1 -0
  83. package/dist/esm/presentation/whiteboard/projectElements.js +824 -0
  84. package/dist/esm/presentation/whiteboard/projectElements.js.map +1 -0
  85. package/dist/index.js +629 -490
  86. package/dist/index.js.map +1 -1
  87. package/dist/index.min.js +1 -1
  88. package/dist/index.min.js.map +1 -1
  89. package/package.json +1 -1
@@ -0,0 +1,128 @@
1
+ import React from "react";
2
+ import styled from "styled-components";
3
+ import { EntityDots, StyledTitleBlock } from "./shared";
4
+ import { Chip } from "../../../components/Chip";
5
+ import { StackedCardRow as StackRow } from "../../../components/StackedCard";
6
+ import { Body2, Caption1, Caption2, Header3 } from "../../../components/Typography";
7
+ import { RoundAvatar } from "../../shared";
8
+
9
+ /**
10
+ * ProjectCard — a project as a stacked card.
11
+ *
12
+ * The sixth content type, and the second one that mirrors a project-management
13
+ * record rather than something authored on the surface (TaskCard is the first).
14
+ * It composes the same shell and the same rows; nothing in `components/StackedCard`
15
+ * knows it exists.
16
+ *
17
+ * The face is the app's Projects page, read off `ProjectListGroup.jsx`:
18
+ * - the NAME is the card's title (`Header3`, as in the grid card);
19
+ * - the CLIENT sits under it — `Entity.Property "entity-property-client"`, the
20
+ * company the project is for;
21
+ * - the DESCRIPTION is the project's `body`, the grid card's `Body2` tertiary
22
+ * excerpt, clamped because the whole text lives on the project and this is a
23
+ * reference to it, not a copy;
24
+ * - the LEADER and the LABEL share one row. The label is a FILLED pill whose
25
+ * background is the label's own colour and whose text is a darker shade of
26
+ * it (`ProjectLabel.jsx`: `EntityLabel` with `backgroundColor: label.color`,
27
+ * `color: label.darker_text_color`) — the design system's `Chip`, not the
28
+ * colour-text `Tag` the column cards use for task labels.
29
+ *
30
+ * There is deliberately NO progress indicator. A single percentage is the one
31
+ * number on a project that cannot be read without knowing how it was computed,
32
+ * and a card is a place people put a project to talk ABOUT it — the number
33
+ * invites a conversation about the number instead.
34
+ */
35
+
36
+ /** A project label carries both of the colours the app stores for it. */
37
+
38
+ /**
39
+ * What an internal project's client line says.
40
+ *
41
+ * A project with no client belongs to the account's own company, and printing
42
+ * that company's name back at someone who works there says nothing. So the line
43
+ * states the fact instead.
44
+ */
45
+ export const INTERNAL_CLIENT_LABEL = "Internal";
46
+
47
+ /** One rule for the client line, so no surface can label the same project twice. */
48
+ export const projectClientLine = client => client != null ? client : INTERNAL_CLIENT_LABEL;
49
+
50
+ /* The description excerpt. Three lines is the most a card can carry before it
51
+ stops being a card, so it clamps. */
52
+ const StyledExcerpt = styled(Body2).withConfig({
53
+ displayName: "ProjectCard__StyledExcerpt",
54
+ componentId: "sc-1afak94-0"
55
+ })(["display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;"]);
56
+ const StyledName = styled(Header3).withConfig({
57
+ displayName: "ProjectCard__StyledName",
58
+ componentId: "sc-1afak94-1"
59
+ })(["overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"]);
60
+ const StyledClient = styled(Caption2).withConfig({
61
+ displayName: "ProjectCard__StyledClient",
62
+ componentId: "sc-1afak94-2"
63
+ })(["display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"]);
64
+
65
+ /**
66
+ * One row for the two facts that are each optional: the leader on the LEFT, the
67
+ * label on the RIGHT. `space-between` is what keeps the label right when there is
68
+ * no leader beside it, and the row is not rendered at all when the project has
69
+ * neither — a bare project produces a small card, not a card with empty
70
+ * furniture in it.
71
+ *
72
+ * No rule above it: the card carries no internal separators. The row's own role
73
+ * padding is what sets it apart from the excerpt, the same way every other row in
74
+ * every other content type is set apart — a hairline here would be the only line
75
+ * inside any card in the set.
76
+ */
77
+ const StyledMetaRow = styled(StackRow).withConfig({
78
+ displayName: "ProjectCard__StyledMetaRow",
79
+ componentId: "sc-1afak94-3"
80
+ })(["justify-content:space-between;.sc-leader{display:flex;align-items:center;gap:8px;min-width:0;}.sc-leader > .typography{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}.sc-label{flex-shrink:0;display:flex;}"]);
81
+ export const ProjectCard = _ref => {
82
+ let _ref$name = _ref.name,
83
+ name = _ref$name === void 0 ? "Marketing Site" : _ref$name,
84
+ _ref$client = _ref.client,
85
+ client = _ref$client === void 0 ? "ActiveCollab Inc." : _ref$client,
86
+ description = _ref.description,
87
+ leader = _ref.leader,
88
+ label = _ref.label;
89
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StackRow, {
90
+ role: "title"
91
+ }, /*#__PURE__*/React.createElement(StyledTitleBlock, null, /*#__PURE__*/React.createElement(StyledName, null, name), /*#__PURE__*/React.createElement(StyledClient, {
92
+ color: "tertiary"
93
+ }, projectClientLine(client))), /*#__PURE__*/React.createElement(EntityDots, {
94
+ "aria-label": "Project options"
95
+ })), description ? /*#__PURE__*/React.createElement(StackRow, {
96
+ role: "custom"
97
+ }, /*#__PURE__*/React.createElement(StyledExcerpt, {
98
+ color: "secondary"
99
+ }, description)) : null, leader || label ? /*#__PURE__*/React.createElement(StyledMetaRow, {
100
+ role: "footer"
101
+ }, leader ? /*#__PURE__*/React.createElement("span", {
102
+ className: "sc-leader"
103
+ }, /*#__PURE__*/React.createElement(RoundAvatar, {
104
+ $bg: leader.color,
105
+ $size: 24,
106
+ $bordered: false,
107
+ "data-fixed": true
108
+ }, leader.initials), /*#__PURE__*/React.createElement(Caption1, {
109
+ color: "secondary"
110
+ }, leader.name)) :
111
+ /*#__PURE__*/
112
+ /* Keeps the label on the right when there is no leader to push it
113
+ there — an empty flex item is cheaper than a second layout. */
114
+ React.createElement("span", null), label ? /*#__PURE__*/React.createElement("span", {
115
+ className: "sc-label",
116
+ "data-fixed": true
117
+ }, /*#__PURE__*/React.createElement(Chip, {
118
+ size: "small",
119
+ label: label.text,
120
+ backgroundColor: label.color,
121
+ color: label.textColor,
122
+ typographyProps: {
123
+ variant: "Caption 2",
124
+ weight: "bold"
125
+ }
126
+ })) : null) : null);
127
+ };
128
+ //# sourceMappingURL=ProjectCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProjectCard.js","names":["React","styled","EntityDots","StyledTitleBlock","Chip","StackedCardRow","StackRow","Body2","Caption1","Caption2","Header3","RoundAvatar","INTERNAL_CLIENT_LABEL","projectClientLine","client","StyledExcerpt","withConfig","displayName","componentId","StyledName","StyledClient","StyledMetaRow","ProjectCard","_ref","_ref$name","name","_ref$client","description","leader","label","createElement","Fragment","role","color","className","$bg","$size","$bordered","initials","size","text","backgroundColor","textColor","typographyProps","variant","weight"],"sources":["../../../../../src/presentation/stackedCard/content/ProjectCard.tsx"],"sourcesContent":["import React, { ReactElement } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { EntityDots, StyledTitleBlock } from \"./shared\";\nimport { Chip } from \"../../../components/Chip\";\nimport { StackedCardRow as StackRow } from \"../../../components/StackedCard\";\nimport {\n Body2,\n Caption1,\n Caption2,\n Header3,\n} from \"../../../components/Typography\";\nimport { RoundAvatar } from \"../../shared\";\n\n/**\n * ProjectCard — a project as a stacked card.\n *\n * The sixth content type, and the second one that mirrors a project-management\n * record rather than something authored on the surface (TaskCard is the first).\n * It composes the same shell and the same rows; nothing in `components/StackedCard`\n * knows it exists.\n *\n * The face is the app's Projects page, read off `ProjectListGroup.jsx`:\n * - the NAME is the card's title (`Header3`, as in the grid card);\n * - the CLIENT sits under it — `Entity.Property \"entity-property-client\"`, the\n * company the project is for;\n * - the DESCRIPTION is the project's `body`, the grid card's `Body2` tertiary\n * excerpt, clamped because the whole text lives on the project and this is a\n * reference to it, not a copy;\n * - the LEADER and the LABEL share one row. The label is a FILLED pill whose\n * background is the label's own colour and whose text is a darker shade of\n * it (`ProjectLabel.jsx`: `EntityLabel` with `backgroundColor: label.color`,\n * `color: label.darker_text_color`) — the design system's `Chip`, not the\n * colour-text `Tag` the column cards use for task labels.\n *\n * There is deliberately NO progress indicator. A single percentage is the one\n * number on a project that cannot be read without knowing how it was computed,\n * and a card is a place people put a project to talk ABOUT it — the number\n * invites a conversation about the number instead.\n */\n\nexport interface ProjectCardPerson {\n name: string;\n initials: string;\n /** Avatar colours stand in for the server-rendered avatar: data, not theme. */\n color: string;\n}\n\n/** A project label carries both of the colours the app stores for it. */\nexport interface ProjectCardLabel {\n text: string;\n /** `label.color` — the pill's background. */\n color: string;\n /** `label.darker_text_color` — the pill's text. */\n textColor: string;\n}\n\n/**\n * What an internal project's client line says.\n *\n * A project with no client belongs to the account's own company, and printing\n * that company's name back at someone who works there says nothing. So the line\n * states the fact instead.\n */\nexport const INTERNAL_CLIENT_LABEL = \"Internal\";\n\n/** One rule for the client line, so no surface can label the same project twice. */\nexport const projectClientLine = (client: string | null | undefined): string =>\n client ?? INTERNAL_CLIENT_LABEL;\n\n/* The description excerpt. Three lines is the most a card can carry before it\n stops being a card, so it clamps. */\nconst StyledExcerpt = styled(Body2)`\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n`;\n\nconst StyledName = styled(Header3)`\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n`;\n\nconst StyledClient = styled(Caption2)`\n display: block;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n`;\n\n/**\n * One row for the two facts that are each optional: the leader on the LEFT, the\n * label on the RIGHT. `space-between` is what keeps the label right when there is\n * no leader beside it, and the row is not rendered at all when the project has\n * neither — a bare project produces a small card, not a card with empty\n * furniture in it.\n *\n * No rule above it: the card carries no internal separators. The row's own role\n * padding is what sets it apart from the excerpt, the same way every other row in\n * every other content type is set apart — a hairline here would be the only line\n * inside any card in the set.\n */\nconst StyledMetaRow = styled(StackRow)`\n justify-content: space-between;\n\n .sc-leader {\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n }\n\n .sc-leader > .typography {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n /* The Chip brings its own padding and radius, so the slot only has to refuse\n to shrink and stay out of the leader's way. */\n .sc-label {\n flex-shrink: 0;\n display: flex;\n }\n`;\n\nexport interface ProjectCardProps {\n name?: string;\n /** The client company. `null` is an internal project — the line reads \"Internal\". */\n client?: string | null;\n /** The project's `body`; the excerpt row exists only when it has one. */\n description?: string;\n /** A project need not have a leader. */\n leader?: ProjectCardPerson;\n /** A project need not have a label. */\n label?: ProjectCardLabel;\n}\n\nexport const ProjectCard = ({\n name = \"Marketing Site\",\n client = \"ActiveCollab Inc.\",\n description,\n leader,\n label,\n}: ProjectCardProps): ReactElement => (\n <>\n <StackRow role=\"title\">\n <StyledTitleBlock>\n <StyledName>{name}</StyledName>\n <StyledClient color=\"tertiary\">\n {projectClientLine(client)}\n </StyledClient>\n </StyledTitleBlock>\n <EntityDots aria-label=\"Project options\" />\n </StackRow>\n\n {description ? (\n <StackRow role=\"custom\">\n <StyledExcerpt color=\"secondary\">{description}</StyledExcerpt>\n </StackRow>\n ) : null}\n\n {leader || label ? (\n <StyledMetaRow role=\"footer\">\n {leader ? (\n <span className=\"sc-leader\">\n <RoundAvatar\n $bg={leader.color}\n $size={24}\n $bordered={false}\n data-fixed\n >\n {leader.initials}\n </RoundAvatar>\n <Caption1 color=\"secondary\">{leader.name}</Caption1>\n </span>\n ) : (\n /* Keeps the label on the right when there is no leader to push it\n there — an empty flex item is cheaper than a second layout. */\n <span />\n )}\n {label ? (\n <span className=\"sc-label\" data-fixed>\n <Chip\n size=\"small\"\n label={label.text}\n backgroundColor={label.color}\n color={label.textColor}\n typographyProps={{ variant: \"Caption 2\", weight: \"bold\" }}\n />\n </span>\n ) : null}\n </StyledMetaRow>\n ) : null}\n </>\n);\n"],"mappings":"AAAA,OAAOA,KAAK,MAAwB,OAAO;AAE3C,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,SAASC,UAAU,EAAEC,gBAAgB,QAAQ,UAAU;AACvD,SAASC,IAAI,QAAQ,0BAA0B;AAC/C,SAASC,cAAc,IAAIC,QAAQ,QAAQ,iCAAiC;AAC5E,SACEC,KAAK,EACLC,QAAQ,EACRC,QAAQ,EACRC,OAAO,QACF,gCAAgC;AACvC,SAASC,WAAW,QAAQ,cAAc;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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WAAW;MAAEC,MAAM,EAAE;IAAO;EAAE,CAC3D,CACG,CAAC,GACL,IACS,CAAC,GACd,IACJ,CAAC;AAAA,CACJ","ignoreList":[]}
@@ -1,4 +1,42 @@
1
1
  import React, { ReactElement } from "react";
2
+ /**
3
+ * TaskCard — the baseline-preservation card.
4
+ *
5
+ * This is the replacement for today's column card, so it must reproduce every
6
+ * behavior that card has (note 52104 §B2) — none of them are optional, each is
7
+ * a silent-regression risk. Every one is a prop here so the story can toggle it:
8
+ *
9
+ * - task-number prefix in the title (config-gated, mirrors `show_task_id`)
10
+ * - overdue date colouring (red ONLY when overdue AND not completed)
11
+ * - dependency counter (behind a feature-flag prop)
12
+ * - hidden-from-clients signifier (shown only when it DIFFERS from the
13
+ * project default)
14
+ * - inline assignee affordance (avatar, or an add-assignee placeholder)
15
+ * - completed (teal tint, no "…" menu, no overdue colour)
16
+ * - assignees appear ONCE (in the info line when the card has no
17
+ * date range, in the date row when it
18
+ * has one — never in both)
19
+ *
20
+ * The pending/optimistic and priority states are SHELL states (dimmed +
21
+ * pointer-events off; red left bar), so the card is wrapped in a `<StackedCard
22
+ * pending>` / `<StackedCard priorityColor>` by the host — they are not the
23
+ * card's own concern and live on the shell, not here.
24
+ *
25
+ * Everything is measured against the app: `ColumnCardBody.jsx`,
26
+ * `ColumnCardBodyInfo.jsx`, `ColumnCardDate.jsx` and
27
+ * `view.project_tasks_column_mode.less`.
28
+ */
29
+ export interface TaskCardLabel {
30
+ text: string;
31
+ /** The label's own colour — data, not theme. */
32
+ color: string;
33
+ }
34
+ export interface TaskCardPerson {
35
+ name: string;
36
+ initials: string;
37
+ /** Avatar colours stand in for the server-rendered avatar: data, not theme. */
38
+ color: string;
39
+ }
2
40
  export interface TaskCardProps {
3
41
  title?: string;
4
42
  /** Optional cover — task cards in a column usually have none. */
@@ -8,7 +46,29 @@ export interface TaskCardProps {
8
46
  /** Config-gated task-number prefix (mirrors `show_task_id`). */
9
47
  showTaskId?: boolean;
10
48
  taskId?: number;
11
- dateLabel?: string;
49
+ /**
50
+ * The project the task lives in, above the title. Off by default: in a column
51
+ * the column already says it, and only a surface that mixes projects (a
52
+ * canvas) needs the line.
53
+ */
54
+ showProjectName?: boolean;
55
+ projectName?: string;
56
+ /**
57
+ * The task's labels. Up to two read as colour text (`Tag`, the column card's
58
+ * treatment); more collapse to coloured dots plus an overflow count, which is
59
+ * what the design system maps ">2 labels" to. An empty array means the card
60
+ * has no labels — and then the info line must not open with a separator.
61
+ */
62
+ labels?: TaskCardLabel[];
63
+ /** Open-subtask and comment counters; each shows only when it is non-zero. */
64
+ subtaskCount?: number;
65
+ commentCount?: number;
66
+ /**
67
+ * The date range. `null` (or empty) means the task has none — the date row
68
+ * disappears and the assignees move up into the info line, so they still
69
+ * appear exactly once.
70
+ */
71
+ dateLabel?: string | null;
12
72
  /** Overdue date — colours the date red, but only when NOT completed. */
13
73
  overdue?: boolean;
14
74
  /** Dependency counter, gated behind a feature flag. */
@@ -20,10 +80,12 @@ export interface TaskCardProps {
20
80
  projectDefaultHidden?: boolean;
21
81
  /** Whether the task has an assignee (avatar) or shows the add affordance. */
22
82
  assigned?: boolean;
83
+ /** The actual assignees, when the host has them. Limited to 3, as in the app. */
84
+ assignees?: TaskCardPerson[];
23
85
  /** Completed — teal tint, no "…" menu, no overdue colour. */
24
86
  completed?: boolean;
25
87
  }
26
- export declare const TaskCard: ({ title, cover, playable, coverControls, showTaskId, taskId, dateLabel, overdue, showDependencies, dependencyCount, hiddenFromClients, projectDefaultHidden, assigned, completed, }: TaskCardProps) => ReactElement;
88
+ export declare const TaskCard: ({ title, cover, playable, coverControls, showTaskId, taskId, showProjectName, projectName, labels, subtaskCount, commentCount, dateLabel, overdue, showDependencies, dependencyCount, hiddenFromClients, projectDefaultHidden, assigned, assignees, completed, }: TaskCardProps) => ReactElement;
27
89
  export declare const TaskPlaceholder: (props: React.ButtonHTMLAttributes<HTMLButtonElement>) => ReactElement;
28
90
  export declare const TaskSkeleton: () => ReactElement;
29
91
  //# sourceMappingURL=TaskCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TaskCard.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/stackedCard/content/TaskCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAkJ5C,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,gEAAgE;IAChE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,uDAAuD;IACvD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,2CAA2C;IAC3C,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,gFAAgF;IAChF,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6DAA6D;IAC7D,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,QAAQ,GAAI,qLAetB,aAAa,KAAG,YA+FlB,CAAC;AAIF,eAAO,MAAM,eAAe,GAC1B,OAAO,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,KACnD,YAMF,CAAC;AAGF,eAAO,MAAM,YAAY,QAAO,YAiB/B,CAAC"}
1
+ {"version":3,"file":"TaskCard.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/stackedCard/content/TaskCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC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C7D,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,QAAQ,GAAI,kQAqBtB,aAAa,KAAG,YAyJlB,CAAC;AAIF,eAAO,MAAM,eAAe,GAC1B,OAAO,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,KACnD,YAMF,CAAC;AAGF,eAAO,MAAM,YAAY,QAAO,YAiB/B,CAAC"}
@@ -1,10 +1,12 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import React from "react";
3
3
  import styled, { css } from "styled-components";
4
- import { EntityDots, StyledClamp, coverManagement, playControl, Placeholder } from "./shared";
5
- import { ChecklistSmallIcon, EyeOffIcon, InsertLinkIcon, MessageSmallIcon, PersonPlusIcon } from "../../../components/Icons";
4
+ import { CARD_FONT, CardProjectLine, EntityDots, StyledClamp, StyledTitleBlock, coverManagement, playControl, Placeholder } from "./shared";
5
+ import { ChecklistSmallIcon, DependencySmallIcon, EyeOffSmallIcon, MessageSmallIcon, PersonPlusIcon } from "../../../components/Icons";
6
6
  import { SkeletonLoader } from "../../../components/Loaders";
7
+ import { Signifier } from "../../../components/Signifier";
7
8
  import { STACKED_CARD_COVER_RATIO as COVER_RATIO, StackedCardCover as Cover, StackedCardRow as StackRow } from "../../../components/StackedCard";
9
+ import { Tag } from "../../../components/Tag";
8
10
  import { Caption1 } from "../../../components/Typography";
9
11
  import { Typography } from "../../../components/Typography/Typography";
10
12
  import { RoundAvatar, AVATAR_COLORS } from "../../shared";
@@ -23,14 +25,58 @@ import { RoundAvatar, AVATAR_COLORS } from "../../shared";
23
25
  * project default)
24
26
  * - inline assignee affordance (avatar, or an add-assignee placeholder)
25
27
  * - completed (teal tint, no "…" menu, no overdue colour)
28
+ * - assignees appear ONCE (in the info line when the card has no
29
+ * date range, in the date row when it
30
+ * has one — never in both)
26
31
  *
27
32
  * The pending/optimistic and priority states are SHELL states (dimmed +
28
33
  * pointer-events off; red left bar), so the card is wrapped in a `<StackedCard
29
34
  * pending>` / `<StackedCard priorityColor>` by the host — they are not the
30
35
  * card's own concern and live on the shell, not here.
36
+ *
37
+ * Everything is measured against the app: `ColumnCardBody.jsx`,
38
+ * `ColumnCardBodyInfo.jsx`, `ColumnCardDate.jsx` and
39
+ * `view.project_tasks_column_mode.less`.
40
+ */
41
+
42
+ /**
43
+ * Eight labels, so the default card demonstrates the collapsed form. Colours are
44
+ * the labels' own, which is why they are literals.
31
45
  */
46
+ const DEMO_LABELS = [{
47
+ text: "DESIGN",
48
+ color: "#378ADD"
49
+ }, {
50
+ text: "BLOCKED",
51
+ color: "#D85A30"
52
+ }, {
53
+ text: "READY",
54
+ color: "#639922"
55
+ }, {
56
+ text: "REVIEW",
57
+ color: "#EF9F27"
58
+ }, {
59
+ text: "RESEARCH",
60
+ color: "#7F77DD"
61
+ }, {
62
+ text: "COPY",
63
+ color: "#8C5A2B"
64
+ }, {
65
+ text: "QA",
66
+ color: "#2F5DA8"
67
+ }, {
68
+ text: "RELEASE",
69
+ color: "#8A3E6B"
70
+ }];
32
71
 
33
- const LABEL_DOTS = ["#378ADD", "#D85A30", "#639922", "#EF9F27", "#7F77DD"];
72
+ /**
73
+ * How many labels read as text before the line has to collapse them, and how
74
+ * many dots stand in for the rest. Two colour-text `Tag`s fit a 260px card; past
75
+ * that the app's own answer (and the design system's mapping) is coloured dots
76
+ * plus an overflow count.
77
+ */
78
+ const LABELS_AS_TEXT_MAX = 2;
79
+ const LABEL_DOTS_MAX = 5;
34
80
 
35
81
  /* The completed tint fills the card body; the shell keeps the priority bar and
36
82
  selection ring on top of it. */
@@ -41,10 +87,26 @@ const StyledBody = styled.div.withConfig({
41
87
  let $completed = _ref.$completed;
42
88
  return $completed && css(["background:var(--sc-completed-tint,rgba(72,201,176,0.16));"]);
43
89
  });
44
- const StyledMetaCluster = styled.div.withConfig({
45
- displayName: "TaskCard__StyledMetaCluster",
90
+
91
+ /**
92
+ * The info line — labels, then signifiers, then (only when the card has no date
93
+ * range) the assignees.
94
+ *
95
+ * The separator is the app's, rule for rule: a 2px round dot in
96
+ * `--color-theme-600` with `margin: 0 6px`, drawn by `::before` on every item
97
+ * EXCEPT the first (`view.project_tasks_column_mode.less`:
98
+ * `.c-signifier:not(:first-child):before`, `.label_single_container:not(:first-child)
99
+ * .label_item:before`, `.dot:before`). Because the rule keys off position rather
100
+ * than off "am I a signifier", a line that starts with a signifier — a task with
101
+ * counters but no labels — cannot open with a dangling dot.
102
+ *
103
+ * `font-size: 11px` is the `.labels` block's own; the vertical rhythm the app
104
+ * gets from `margin-top: 10px` comes from the `meta` row's role padding here.
105
+ */
106
+ const StyledInfoLine = styled.div.withConfig({
107
+ displayName: "TaskCard__StyledInfoLine",
46
108
  componentId: "sc-5iuhg8-1"
47
- })(["display:flex;align-items:center;gap:6px;color:var(--color-theme-600);.sc-dots{display:flex;gap:4px;}.sc-sep{opacity:0.6;}.sc-count{display:inline-flex;align-items:center;gap:3px;}svg{width:14px;height:14px;}"]);
109
+ })(["display:flex;flex-wrap:wrap;align-items:center;width:100%;font-size:11px;> *{display:flex;align-items:center;min-height:18px;}> *:not(:first-child):not(.sc-assignees)::before{content:\"\";flex-shrink:0;width:2px;height:2px;margin:0 6px;border-radius:100%;background-color:var(--color-theme-600);}.sc-label{max-width:74px;}.sc-label .c-tag > div{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:60px;}.sc-dots{gap:4px;}.sc-assignees{flex:1 1 auto;justify-content:flex-end;}"]);
48
110
  const StyledDot = styled.span.withConfig({
49
111
  displayName: "TaskCard__StyledDot",
50
112
  componentId: "sc-5iuhg8-2"
@@ -53,28 +115,39 @@ const StyledDot = styled.span.withConfig({
53
115
  return $color;
54
116
  });
55
117
 
56
- /* Hidden-from-clients signifier — an eye-off badge, shown only when the task's
57
- visibility differs from the project default. */
58
- const StyledHiddenBadge = styled.span.withConfig({
59
- displayName: "TaskCard__StyledHiddenBadge",
60
- componentId: "sc-5iuhg8-3"
61
- })(["display:inline-flex;align-items:center;gap:3px;color:var(--color-theme-600);svg{width:14px;height:14px;}"]);
62
-
63
- /* Date bold; turns red only when overdue AND the task is not completed. */
118
+ /**
119
+ * The date row's text.
120
+ *
121
+ * A raw `<span>` in this Storybook inherits the browser's serif default at the
122
+ * ancestor's size, which is why the date used to read as huge serif type. The
123
+ * app sets the same four values in CSS on a plain `div` (`.due_date`: 13px,
124
+ * bold, 24px tall, `--color-theme-900`, `--red-alert` when `.overdue`), so the
125
+ * fix is to state them here plus the font stack the missing reset does not
126
+ * supply.
127
+ */
64
128
  const StyledDate = styled.span.withConfig({
65
129
  displayName: "TaskCard__StyledDate",
66
- componentId: "sc-5iuhg8-4"
67
- })(["font-weight:bold;color:", ";"], _ref3 => {
130
+ componentId: "sc-5iuhg8-3"
131
+ })(["height:24px;font-family:", ";font-size:13px;font-weight:bold;line-height:24px;letter-spacing:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:", ";"], CARD_FONT, _ref3 => {
68
132
  let $overdue = _ref3.$overdue;
69
133
  return $overdue ? "var(--red-alert)" : "var(--color-theme-900)";
70
134
  });
71
135
 
136
+ /* Avatars are limited to 3 and overlap, as MultiAssigneesPicker does. */
137
+ const StyledAssignees = styled.span.withConfig({
138
+ displayName: "TaskCard__StyledAssignees",
139
+ componentId: "sc-5iuhg8-4"
140
+ })(["display:flex;align-items:center;justify-content:flex-end;"]);
141
+
72
142
  /* Inline assignee affordance placeholder — a dashed add-assignee target that
73
143
  stands in until the real picker is wired at integration. */
74
144
  const StyledAddAssignee = styled.button.withConfig({
75
145
  displayName: "TaskCard__StyledAddAssignee",
76
146
  componentId: "sc-5iuhg8-5"
77
147
  })(["display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:1.5px dashed var(--color-theme-400);border-radius:50%;background:transparent;color:var(--color-theme-600);cursor:pointer;svg{width:14px;height:14px;display:block;}&:hover{border-color:var(--sc-selection-ring);color:var(--color-theme-800);}"]);
148
+
149
+ /** The app's assignee limit (MultiAssigneesPicker `limit={3}`). */
150
+ const ASSIGNEE_LIMIT = 3;
78
151
  export const TaskCard = _ref4 => {
79
152
  let _ref4$title = _ref4.title,
80
153
  title = _ref4$title === void 0 ? "Implement the design from the reference on this page" : _ref4$title,
@@ -88,6 +161,16 @@ export const TaskCard = _ref4 => {
88
161
  showTaskId = _ref4$showTaskId === void 0 ? false : _ref4$showTaskId,
89
162
  _ref4$taskId = _ref4.taskId,
90
163
  taskId = _ref4$taskId === void 0 ? 4521 : _ref4$taskId,
164
+ _ref4$showProjectName = _ref4.showProjectName,
165
+ showProjectName = _ref4$showProjectName === void 0 ? false : _ref4$showProjectName,
166
+ _ref4$projectName = _ref4.projectName,
167
+ projectName = _ref4$projectName === void 0 ? "Marketing Site" : _ref4$projectName,
168
+ _ref4$labels = _ref4.labels,
169
+ labels = _ref4$labels === void 0 ? DEMO_LABELS : _ref4$labels,
170
+ _ref4$subtaskCount = _ref4.subtaskCount,
171
+ subtaskCount = _ref4$subtaskCount === void 0 ? 2 : _ref4$subtaskCount,
172
+ _ref4$commentCount = _ref4.commentCount,
173
+ commentCount = _ref4$commentCount === void 0 ? 7 : _ref4$commentCount,
91
174
  _ref4$dateLabel = _ref4.dateLabel,
92
175
  dateLabel = _ref4$dateLabel === void 0 ? "May 8 – Sep 10" : _ref4$dateLabel,
93
176
  _ref4$overdue = _ref4.overdue,
@@ -102,12 +185,77 @@ export const TaskCard = _ref4 => {
102
185
  projectDefaultHidden = _ref4$projectDefaultH === void 0 ? false : _ref4$projectDefaultH,
103
186
  _ref4$assigned = _ref4.assigned,
104
187
  assigned = _ref4$assigned === void 0 ? true : _ref4$assigned,
188
+ assignees = _ref4.assignees,
105
189
  _ref4$completed = _ref4.completed,
106
190
  completed = _ref4$completed === void 0 ? false : _ref4$completed;
107
191
  // Signifier appears only when the task's visibility differs from the default.
108
192
  const showHiddenSignifier = hiddenFromClients !== projectDefaultHidden;
109
193
  // Overdue colour is suppressed on completed tasks.
110
194
  const dateIsOverdue = overdue && !completed;
195
+ const hasDate = dateLabel != null && dateLabel !== "";
196
+ const collapseLabels = labels.length > LABELS_AS_TEXT_MAX;
197
+
198
+ /* The assignee slot: the real avatars when the host has them, the demo avatar
199
+ when it only says "assigned", the add affordance when it says nothing is. */
200
+ const assigneeSlot = assigned ? /*#__PURE__*/React.createElement(StyledAssignees, {
201
+ className: "sc-assignees",
202
+ "data-fixed": true
203
+ }, assignees ? assignees.slice(0, ASSIGNEE_LIMIT).map(person => /*#__PURE__*/React.createElement(RoundAvatar, {
204
+ key: person.name,
205
+ $bg: person.color,
206
+ $size: 24,
207
+ $overlap: true
208
+ }, person.initials)) : /*#__PURE__*/React.createElement(RoundAvatar, {
209
+ $bg: AVATAR_COLORS.teal,
210
+ $size: 24,
211
+ $bordered: false
212
+ }, "MS")) : /*#__PURE__*/React.createElement(StyledAssignees, {
213
+ className: "sc-assignees",
214
+ "data-fixed": true
215
+ }, /*#__PURE__*/React.createElement(StyledAddAssignee, {
216
+ type: "button",
217
+ "aria-label": "Assign task"
218
+ }, /*#__PURE__*/React.createElement(PersonPlusIcon, null)));
219
+
220
+ /* Signifiers in the app's fixed order: subtasks → comments → dependencies →
221
+ hidden-from-clients. Each is one child of the info line, so the line's own
222
+ separator rule spaces them. */
223
+ const signifiers = [];
224
+ if (subtaskCount > 0) {
225
+ signifiers.push(/*#__PURE__*/React.createElement(Signifier, {
226
+ key: "subtasks",
227
+ type: ChecklistSmallIcon,
228
+ value: subtaskCount,
229
+ tooltipText: "Subtasks"
230
+ }));
231
+ }
232
+ if (commentCount > 0) {
233
+ signifiers.push(/*#__PURE__*/React.createElement(Signifier, {
234
+ key: "comments",
235
+ type: MessageSmallIcon,
236
+ value: commentCount,
237
+ tooltipText: "Comments"
238
+ }));
239
+ }
240
+ if (showDependencies && dependencyCount > 0) {
241
+ signifiers.push(/*#__PURE__*/React.createElement(Signifier, {
242
+ key: "dependencies",
243
+ type: DependencySmallIcon,
244
+ value: dependencyCount,
245
+ tooltipText: "Dependencies"
246
+ }));
247
+ }
248
+ if (showHiddenSignifier) {
249
+ signifiers.push(/*#__PURE__*/React.createElement(Signifier, {
250
+ key: "hidden",
251
+ type: EyeOffSmallIcon,
252
+ tooltipText: "Hidden from clients"
253
+ }));
254
+ }
255
+
256
+ /* The info line exists when it has something to say — labels, signifiers, or
257
+ the assignees it has to carry because there is no date row. */
258
+ const showInfoLine = labels.length > 0 || signifiers.length > 0 || !hasDate;
111
259
  return /*#__PURE__*/React.createElement(StyledBody, {
112
260
  $completed: completed
113
261
  }, cover ? /*#__PURE__*/React.createElement(Cover, {
@@ -122,58 +270,33 @@ export const TaskCard = _ref4 => {
122
270
  }
123
271
  })) : null, /*#__PURE__*/React.createElement(StackRow, {
124
272
  role: "title"
125
- }, /*#__PURE__*/React.createElement(StyledClamp, null, showTaskId ? /*#__PURE__*/React.createElement(Typography, {
273
+ }, /*#__PURE__*/React.createElement(StyledTitleBlock, null, showProjectName ? /*#__PURE__*/React.createElement(CardProjectLine, null, projectName) : null, /*#__PURE__*/React.createElement(StyledClamp, null, showTaskId ? /*#__PURE__*/React.createElement(Typography, {
126
274
  as: "span",
127
275
  variant: "Caption 1",
128
276
  color: "tertiary"
129
- }, "#" + taskId + " ") : null, title), completed ? null : /*#__PURE__*/React.createElement(EntityDots, {
277
+ }, "#" + taskId + " ") : null, title)), completed ? null : /*#__PURE__*/React.createElement(EntityDots, {
130
278
  "aria-label": "Task options"
131
- })), /*#__PURE__*/React.createElement(StackRow, {
279
+ })), showInfoLine ? /*#__PURE__*/React.createElement(StackRow, {
132
280
  role: "meta"
133
- }, /*#__PURE__*/React.createElement(StyledMetaCluster, null, /*#__PURE__*/React.createElement("span", {
281
+ }, /*#__PURE__*/React.createElement(StyledInfoLine, null, collapseLabels ? /*#__PURE__*/React.createElement("span", {
134
282
  className: "sc-dots"
135
- }, LABEL_DOTS.map(color => /*#__PURE__*/React.createElement(StyledDot, {
136
- key: color,
137
- $color: color
138
- }))), /*#__PURE__*/React.createElement(Caption1, {
139
- color: "tertiary"
140
- }, "+3"), /*#__PURE__*/React.createElement("span", {
141
- className: "sc-sep"
142
- }, "\xB7"), /*#__PURE__*/React.createElement("span", {
143
- className: "sc-count"
144
- }, /*#__PURE__*/React.createElement(MessageSmallIcon, null), /*#__PURE__*/React.createElement(Caption1, {
145
- color: "tertiary"
146
- }, "7")), /*#__PURE__*/React.createElement("span", {
147
- className: "sc-sep"
148
- }, "\xB7"), /*#__PURE__*/React.createElement("span", {
149
- className: "sc-count"
150
- }, /*#__PURE__*/React.createElement(ChecklistSmallIcon, null), /*#__PURE__*/React.createElement(Caption1, {
151
- color: "tertiary"
152
- }, "2")), showDependencies ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
153
- className: "sc-sep"
154
- }, "\xB7"), /*#__PURE__*/React.createElement("span", {
155
- className: "sc-count",
156
- title: "Dependencies"
157
- }, /*#__PURE__*/React.createElement(InsertLinkIcon, null), /*#__PURE__*/React.createElement(Caption1, {
283
+ }, labels.slice(0, LABEL_DOTS_MAX).map(label => /*#__PURE__*/React.createElement(StyledDot, {
284
+ key: label.text,
285
+ $color: label.color
286
+ })), labels.length > LABEL_DOTS_MAX ? /*#__PURE__*/React.createElement(Caption1, {
158
287
  color: "tertiary"
159
- }, dependencyCount))) : null, showHiddenSignifier ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
160
- className: "sc-sep"
161
- }, "\xB7"), /*#__PURE__*/React.createElement(StyledHiddenBadge, {
162
- title: "Hidden from clients"
163
- }, /*#__PURE__*/React.createElement(EyeOffIcon, null))) : null)), /*#__PURE__*/React.createElement(StackRow, {
288
+ }, "+" + (labels.length - LABEL_DOTS_MAX)) : null) : labels.map(label => /*#__PURE__*/React.createElement("span", {
289
+ className: "sc-label",
290
+ key: label.text
291
+ }, /*#__PURE__*/React.createElement(Tag, {
292
+ name: label.text,
293
+ color: label.color,
294
+ showDot: false
295
+ }))), signifiers, hasDate ? null : assigneeSlot)) : null, hasDate ? /*#__PURE__*/React.createElement(StackRow, {
164
296
  role: "footer"
165
297
  }, /*#__PURE__*/React.createElement(StyledDate, {
166
298
  $overdue: dateIsOverdue
167
- }, dateLabel), /*#__PURE__*/React.createElement("span", null), assigned ? /*#__PURE__*/React.createElement(RoundAvatar, {
168
- $bg: AVATAR_COLORS.teal,
169
- $size: 24,
170
- $bordered: false,
171
- "data-fixed": true
172
- }, "MS") : /*#__PURE__*/React.createElement(StyledAddAssignee, {
173
- type: "button",
174
- "aria-label": "Assign task",
175
- "data-fixed": true
176
- }, /*#__PURE__*/React.createElement(PersonPlusIcon, null))));
299
+ }, dateLabel), assigneeSlot) : null);
177
300
  };
178
301
 
179
302
  /* ---- placeholder + skeleton ---- */