@activecollab/components 2.0.408 → 2.0.410

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 (257) hide show
  1. package/dist/cjs/components/BreakPoints.js +12 -1
  2. package/dist/cjs/components/BreakPoints.js.map +1 -1
  3. package/dist/cjs/components/Columns/Columns.js +42 -0
  4. package/dist/cjs/components/Columns/Columns.js.map +1 -0
  5. package/dist/cjs/components/Columns/Styles.js +25 -0
  6. package/dist/cjs/components/Columns/Styles.js.map +1 -0
  7. package/dist/cjs/components/Columns/index.js +17 -0
  8. package/dist/cjs/components/Columns/index.js.map +1 -0
  9. package/dist/cjs/components/Icons/collection/Project.js +98 -0
  10. package/dist/cjs/components/Icons/collection/Project.js.map +1 -0
  11. package/dist/cjs/components/Icons/collection/Task.js +61 -0
  12. package/dist/cjs/components/Icons/collection/Task.js.map +1 -0
  13. package/dist/cjs/components/Icons/collection/index.js +14 -0
  14. package/dist/cjs/components/Icons/collection/index.js.map +1 -1
  15. package/dist/cjs/components/LayoutTokens.js +21 -0
  16. package/dist/cjs/components/LayoutTokens.js.map +1 -0
  17. package/dist/cjs/components/Media/Media.js +39 -0
  18. package/dist/cjs/components/Media/Media.js.map +1 -0
  19. package/dist/cjs/components/Media/Styles.js +18 -0
  20. package/dist/cjs/components/Media/Styles.js.map +1 -0
  21. package/dist/cjs/components/Media/index.js +17 -0
  22. package/dist/cjs/components/Media/index.js.map +1 -0
  23. package/dist/cjs/components/PortableText/PortableText.js +125 -0
  24. package/dist/cjs/components/PortableText/PortableText.js.map +1 -0
  25. package/dist/cjs/components/PortableText/Styles.js +33 -0
  26. package/dist/cjs/components/PortableText/Styles.js.map +1 -0
  27. package/dist/cjs/components/PortableText/index.js +39 -0
  28. package/dist/cjs/components/PortableText/index.js.map +1 -0
  29. package/dist/cjs/components/PortableText/renderers.js +116 -0
  30. package/dist/cjs/components/PortableText/renderers.js.map +1 -0
  31. package/dist/cjs/components/PortableText/types.js +122 -0
  32. package/dist/cjs/components/PortableText/types.js.map +1 -0
  33. package/dist/cjs/components/PortableText/types.test.js +183 -0
  34. package/dist/cjs/components/PortableText/types.test.js.map +1 -0
  35. package/dist/cjs/components/Row/Row.js +30 -0
  36. package/dist/cjs/components/Row/Row.js.map +1 -0
  37. package/dist/cjs/components/Row/Styles.js +25 -0
  38. package/dist/cjs/components/Row/Styles.js.map +1 -0
  39. package/dist/cjs/components/Row/index.js +17 -0
  40. package/dist/cjs/components/Row/index.js.map +1 -0
  41. package/dist/cjs/components/Stack/Stack.js +27 -0
  42. package/dist/cjs/components/Stack/Stack.js.map +1 -0
  43. package/dist/cjs/components/Stack/Styles.js +21 -0
  44. package/dist/cjs/components/Stack/Styles.js.map +1 -0
  45. package/dist/cjs/components/Stack/index.js +17 -0
  46. package/dist/cjs/components/Stack/index.js.map +1 -0
  47. package/dist/cjs/components/Tiles/Styles.js +25 -0
  48. package/dist/cjs/components/Tiles/Styles.js.map +1 -0
  49. package/dist/cjs/components/Tiles/Tiles.js +29 -0
  50. package/dist/cjs/components/Tiles/Tiles.js.map +1 -0
  51. package/dist/cjs/components/Tiles/index.js +17 -0
  52. package/dist/cjs/components/Tiles/index.js.map +1 -0
  53. package/dist/cjs/components/TitledText/Styles.js +15 -0
  54. package/dist/cjs/components/TitledText/Styles.js.map +1 -0
  55. package/dist/cjs/components/TitledText/TitledText.js +50 -0
  56. package/dist/cjs/components/TitledText/TitledText.js.map +1 -0
  57. package/dist/cjs/components/TitledText/index.js +17 -0
  58. package/dist/cjs/components/TitledText/index.js.map +1 -0
  59. package/dist/cjs/components/index.js +88 -0
  60. package/dist/cjs/components/index.js.map +1 -1
  61. package/dist/cjs/presentation/shared/MessageDialog.js +351 -0
  62. package/dist/cjs/presentation/shared/MessageDialog.js.map +1 -0
  63. package/dist/cjs/presentation/shared/index.js +22 -0
  64. package/dist/cjs/presentation/shared/index.js.map +1 -1
  65. package/dist/cjs/presentation/stackedCard/content/NoteCard.js +7 -3
  66. package/dist/cjs/presentation/stackedCard/content/NoteCard.js.map +1 -1
  67. package/dist/cjs/presentation/stackedCard/content/ProjectCard.js +136 -0
  68. package/dist/cjs/presentation/stackedCard/content/ProjectCard.js.map +1 -0
  69. package/dist/cjs/presentation/stackedCard/content/TaskCard.js +183 -56
  70. package/dist/cjs/presentation/stackedCard/content/TaskCard.js.map +1 -1
  71. package/dist/cjs/presentation/stackedCard/content/index.js +11 -0
  72. package/dist/cjs/presentation/stackedCard/content/index.js.map +1 -1
  73. package/dist/cjs/presentation/stackedCard/content/shared.js +66 -19
  74. package/dist/cjs/presentation/stackedCard/content/shared.js.map +1 -1
  75. package/dist/cjs/presentation/whiteboard/bottomDock.js +95 -32
  76. package/dist/cjs/presentation/whiteboard/bottomDock.js.map +1 -1
  77. package/dist/cjs/presentation/whiteboard/canvasElements.js +196 -8
  78. package/dist/cjs/presentation/whiteboard/canvasElements.js.map +1 -1
  79. package/dist/cjs/presentation/whiteboard/inspector.js +149 -47
  80. package/dist/cjs/presentation/whiteboard/inspector.js.map +1 -1
  81. package/dist/cjs/presentation/whiteboard/outline.js +91 -18
  82. package/dist/cjs/presentation/whiteboard/outline.js.map +1 -1
  83. package/dist/cjs/presentation/whiteboard/projectElements.js +883 -0
  84. package/dist/cjs/presentation/whiteboard/projectElements.js.map +1 -0
  85. package/dist/esm/components/BreakPoints.d.ts +2 -0
  86. package/dist/esm/components/BreakPoints.d.ts.map +1 -1
  87. package/dist/esm/components/BreakPoints.js +9 -0
  88. package/dist/esm/components/BreakPoints.js.map +1 -1
  89. package/dist/esm/components/Columns/Columns.d.ts +11 -0
  90. package/dist/esm/components/Columns/Columns.d.ts.map +1 -0
  91. package/dist/esm/components/Columns/Columns.js +34 -0
  92. package/dist/esm/components/Columns/Columns.js.map +1 -0
  93. package/dist/esm/components/Columns/Styles.d.ts +8 -0
  94. package/dist/esm/components/Columns/Styles.d.ts.map +1 -0
  95. package/dist/esm/components/Columns/Styles.js +18 -0
  96. package/dist/esm/components/Columns/Styles.js.map +1 -0
  97. package/dist/esm/components/Columns/index.d.ts +2 -0
  98. package/dist/esm/components/Columns/index.d.ts.map +1 -0
  99. package/dist/esm/components/Columns/index.js +2 -0
  100. package/dist/esm/components/Columns/index.js.map +1 -0
  101. package/dist/esm/components/Icons/collection/Project.d.ts +36 -0
  102. package/dist/esm/components/Icons/collection/Project.d.ts.map +1 -0
  103. package/dist/esm/components/Icons/collection/Project.js +91 -0
  104. package/dist/esm/components/Icons/collection/Project.js.map +1 -0
  105. package/dist/esm/components/Icons/collection/Task.d.ts +32 -0
  106. package/dist/esm/components/Icons/collection/Task.d.ts.map +1 -0
  107. package/dist/esm/components/Icons/collection/Task.js +54 -0
  108. package/dist/esm/components/Icons/collection/Task.js.map +1 -0
  109. package/dist/esm/components/Icons/collection/index.d.ts +2 -0
  110. package/dist/esm/components/Icons/collection/index.d.ts.map +1 -1
  111. package/dist/esm/components/Icons/collection/index.js +2 -0
  112. package/dist/esm/components/Icons/collection/index.js.map +1 -1
  113. package/dist/esm/components/LayoutTokens.d.ts +6 -0
  114. package/dist/esm/components/LayoutTokens.d.ts.map +1 -0
  115. package/dist/esm/components/LayoutTokens.js +15 -0
  116. package/dist/esm/components/LayoutTokens.js.map +1 -0
  117. package/dist/esm/components/Media/Media.d.ts +10 -0
  118. package/dist/esm/components/Media/Media.d.ts.map +1 -0
  119. package/dist/esm/components/Media/Media.js +31 -0
  120. package/dist/esm/components/Media/Media.js.map +1 -0
  121. package/dist/esm/components/Media/Styles.d.ts +4 -0
  122. package/dist/esm/components/Media/Styles.d.ts.map +1 -0
  123. package/dist/esm/components/Media/Styles.js +11 -0
  124. package/dist/esm/components/Media/Styles.js.map +1 -0
  125. package/dist/esm/components/Media/index.d.ts +2 -0
  126. package/dist/esm/components/Media/index.d.ts.map +1 -0
  127. package/dist/esm/components/Media/index.js +2 -0
  128. package/dist/esm/components/Media/index.js.map +1 -0
  129. package/dist/esm/components/PortableText/PortableText.d.ts +24 -0
  130. package/dist/esm/components/PortableText/PortableText.d.ts.map +1 -0
  131. package/dist/esm/components/PortableText/PortableText.js +111 -0
  132. package/dist/esm/components/PortableText/PortableText.js.map +1 -0
  133. package/dist/esm/components/PortableText/Styles.d.ts +9 -0
  134. package/dist/esm/components/PortableText/Styles.d.ts.map +1 -0
  135. package/dist/esm/components/PortableText/Styles.js +27 -0
  136. package/dist/esm/components/PortableText/Styles.js.map +1 -0
  137. package/dist/esm/components/PortableText/index.d.ts +4 -0
  138. package/dist/esm/components/PortableText/index.d.ts.map +1 -0
  139. package/dist/esm/components/PortableText/index.js +4 -0
  140. package/dist/esm/components/PortableText/index.js.map +1 -0
  141. package/dist/esm/components/PortableText/renderers.d.ts +9 -0
  142. package/dist/esm/components/PortableText/renderers.d.ts.map +1 -0
  143. package/dist/esm/components/PortableText/renderers.js +110 -0
  144. package/dist/esm/components/PortableText/renderers.js.map +1 -0
  145. package/dist/esm/components/PortableText/types.d.ts +141 -0
  146. package/dist/esm/components/PortableText/types.d.ts.map +1 -0
  147. package/dist/esm/components/PortableText/types.js +106 -0
  148. package/dist/esm/components/PortableText/types.js.map +1 -0
  149. package/dist/esm/components/PortableText/types.test.d.ts +2 -0
  150. package/dist/esm/components/PortableText/types.test.d.ts.map +1 -0
  151. package/dist/esm/components/PortableText/types.test.js +181 -0
  152. package/dist/esm/components/PortableText/types.test.js.map +1 -0
  153. package/dist/esm/components/Row/Row.d.ts +10 -0
  154. package/dist/esm/components/Row/Row.d.ts.map +1 -0
  155. package/dist/esm/components/Row/Row.js +22 -0
  156. package/dist/esm/components/Row/Row.js.map +1 -0
  157. package/dist/esm/components/Row/Styles.d.ts +8 -0
  158. package/dist/esm/components/Row/Styles.d.ts.map +1 -0
  159. package/dist/esm/components/Row/Styles.js +18 -0
  160. package/dist/esm/components/Row/Styles.js.map +1 -0
  161. package/dist/esm/components/Row/index.d.ts +2 -0
  162. package/dist/esm/components/Row/index.d.ts.map +1 -0
  163. package/dist/esm/components/Row/index.js +2 -0
  164. package/dist/esm/components/Row/index.js.map +1 -0
  165. package/dist/esm/components/Stack/Stack.d.ts +8 -0
  166. package/dist/esm/components/Stack/Stack.d.ts.map +1 -0
  167. package/dist/esm/components/Stack/Stack.js +19 -0
  168. package/dist/esm/components/Stack/Stack.js.map +1 -0
  169. package/dist/esm/components/Stack/Styles.d.ts +6 -0
  170. package/dist/esm/components/Stack/Styles.d.ts.map +1 -0
  171. package/dist/esm/components/Stack/Styles.js +14 -0
  172. package/dist/esm/components/Stack/Styles.js.map +1 -0
  173. package/dist/esm/components/Stack/index.d.ts +2 -0
  174. package/dist/esm/components/Stack/index.d.ts.map +1 -0
  175. package/dist/esm/components/Stack/index.js +2 -0
  176. package/dist/esm/components/Stack/index.js.map +1 -0
  177. package/dist/esm/components/Tiles/Styles.d.ts +8 -0
  178. package/dist/esm/components/Tiles/Styles.d.ts.map +1 -0
  179. package/dist/esm/components/Tiles/Styles.js +18 -0
  180. package/dist/esm/components/Tiles/Styles.js.map +1 -0
  181. package/dist/esm/components/Tiles/Tiles.d.ts +10 -0
  182. package/dist/esm/components/Tiles/Tiles.d.ts.map +1 -0
  183. package/dist/esm/components/Tiles/Tiles.js +21 -0
  184. package/dist/esm/components/Tiles/Tiles.js.map +1 -0
  185. package/dist/esm/components/Tiles/index.d.ts +2 -0
  186. package/dist/esm/components/Tiles/index.d.ts.map +1 -0
  187. package/dist/esm/components/Tiles/index.js +2 -0
  188. package/dist/esm/components/Tiles/index.js.map +1 -0
  189. package/dist/esm/components/TitledText/Styles.d.ts +2 -0
  190. package/dist/esm/components/TitledText/Styles.d.ts.map +1 -0
  191. package/dist/esm/components/TitledText/Styles.js +8 -0
  192. package/dist/esm/components/TitledText/Styles.js.map +1 -0
  193. package/dist/esm/components/TitledText/TitledText.d.ts +18 -0
  194. package/dist/esm/components/TitledText/TitledText.d.ts.map +1 -0
  195. package/dist/esm/components/TitledText/TitledText.js +43 -0
  196. package/dist/esm/components/TitledText/TitledText.js.map +1 -0
  197. package/dist/esm/components/TitledText/index.d.ts +2 -0
  198. package/dist/esm/components/TitledText/index.d.ts.map +1 -0
  199. package/dist/esm/components/TitledText/index.js +2 -0
  200. package/dist/esm/components/TitledText/index.js.map +1 -0
  201. package/dist/esm/components/index.d.ts +8 -0
  202. package/dist/esm/components/index.d.ts.map +1 -1
  203. package/dist/esm/components/index.js +8 -0
  204. package/dist/esm/components/index.js.map +1 -1
  205. package/dist/esm/presentation/shared/MessageDialog.d.ts +35 -0
  206. package/dist/esm/presentation/shared/MessageDialog.d.ts.map +1 -0
  207. package/dist/esm/presentation/shared/MessageDialog.js +331 -0
  208. package/dist/esm/presentation/shared/MessageDialog.js.map +1 -0
  209. package/dist/esm/presentation/shared/index.d.ts +2 -0
  210. package/dist/esm/presentation/shared/index.d.ts.map +1 -1
  211. package/dist/esm/presentation/shared/index.js +1 -0
  212. package/dist/esm/presentation/shared/index.js.map +1 -1
  213. package/dist/esm/presentation/stackedCard/content/NoteCard.d.ts +8 -1
  214. package/dist/esm/presentation/stackedCard/content/NoteCard.d.ts.map +1 -1
  215. package/dist/esm/presentation/stackedCard/content/NoteCard.js +8 -4
  216. package/dist/esm/presentation/stackedCard/content/NoteCard.js.map +1 -1
  217. package/dist/esm/presentation/stackedCard/content/ProjectCard.d.ts +64 -0
  218. package/dist/esm/presentation/stackedCard/content/ProjectCard.d.ts.map +1 -0
  219. package/dist/esm/presentation/stackedCard/content/ProjectCard.js +128 -0
  220. package/dist/esm/presentation/stackedCard/content/ProjectCard.js.map +1 -0
  221. package/dist/esm/presentation/stackedCard/content/TaskCard.d.ts +64 -2
  222. package/dist/esm/presentation/stackedCard/content/TaskCard.d.ts.map +1 -1
  223. package/dist/esm/presentation/stackedCard/content/TaskCard.js +181 -58
  224. package/dist/esm/presentation/stackedCard/content/TaskCard.js.map +1 -1
  225. package/dist/esm/presentation/stackedCard/content/index.d.ts +1 -0
  226. package/dist/esm/presentation/stackedCard/content/index.d.ts.map +1 -1
  227. package/dist/esm/presentation/stackedCard/content/index.js +1 -0
  228. package/dist/esm/presentation/stackedCard/content/index.js.map +1 -1
  229. package/dist/esm/presentation/stackedCard/content/shared.d.ts +30 -0
  230. package/dist/esm/presentation/stackedCard/content/shared.d.ts.map +1 -1
  231. package/dist/esm/presentation/stackedCard/content/shared.js +66 -19
  232. package/dist/esm/presentation/stackedCard/content/shared.js.map +1 -1
  233. package/dist/esm/presentation/whiteboard/bottomDock.d.ts +30 -7
  234. package/dist/esm/presentation/whiteboard/bottomDock.d.ts.map +1 -1
  235. package/dist/esm/presentation/whiteboard/bottomDock.js +79 -32
  236. package/dist/esm/presentation/whiteboard/bottomDock.js.map +1 -1
  237. package/dist/esm/presentation/whiteboard/canvasElements.d.ts +4 -1
  238. package/dist/esm/presentation/whiteboard/canvasElements.d.ts.map +1 -1
  239. package/dist/esm/presentation/whiteboard/canvasElements.js +158 -7
  240. package/dist/esm/presentation/whiteboard/canvasElements.js.map +1 -1
  241. package/dist/esm/presentation/whiteboard/inspector.d.ts +35 -1
  242. package/dist/esm/presentation/whiteboard/inspector.d.ts.map +1 -1
  243. package/dist/esm/presentation/whiteboard/inspector.js +170 -68
  244. package/dist/esm/presentation/whiteboard/inspector.js.map +1 -1
  245. package/dist/esm/presentation/whiteboard/outline.d.ts +23 -3
  246. package/dist/esm/presentation/whiteboard/outline.d.ts.map +1 -1
  247. package/dist/esm/presentation/whiteboard/outline.js +89 -18
  248. package/dist/esm/presentation/whiteboard/outline.js.map +1 -1
  249. package/dist/esm/presentation/whiteboard/projectElements.d.ts +267 -0
  250. package/dist/esm/presentation/whiteboard/projectElements.d.ts.map +1 -0
  251. package/dist/esm/presentation/whiteboard/projectElements.js +824 -0
  252. package/dist/esm/presentation/whiteboard/projectElements.js.map +1 -0
  253. package/dist/index.js +1490 -738
  254. package/dist/index.js.map +1 -1
  255. package/dist/index.min.js +1 -1
  256. package/dist/index.min.js.map +1 -1
  257. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"NoteCard.js","names":["React","styled","EntityDots","Placeholder","NoteIcon","SkeletonLoader","StackedCardRow","StackRow","Body2","StyledNoteBody","withConfig","displayName","componentId","SAMPLE_NOTE","NoteCard","_ref","_ref$title","title","_ref$body","body","createElement","Fragment","role","weight","direction","color","NotePlaceholder","props","_extends","icon","label","NoteSkeleton","style","height","width"],"sources":["../../../../../src/presentation/stackedCard/content/NoteCard.tsx"],"sourcesContent":["import React, { ReactElement } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { EntityDots, Placeholder } from \"./shared\";\nimport { NoteIcon } from \"../../../components/Icons\";\nimport { SkeletonLoader } from \"../../../components/Loaders\";\nimport { StackedCardRow as StackRow } from \"../../../components/StackedCard\";\nimport { Body2 } from \"../../../components/Typography\";\n\n/**\n * NoteCard — the new fifth type. A multi-line text card (Milanote-style): a\n * title row that owns the \"…\" menu, then padded body rows. The body clamps at a\n * line limit and fades out; auto-height, so the card grows with its content.\n * Inline editing lands in task 4/8 — this is the read view + placeholder.\n */\n\n/* The body clamps at a max height and fades out with a mask so long notes end\n softly instead of hard-cropping. white-space: pre-line keeps authored breaks. */\nconst StyledNoteBody = styled(Body2)`\n display: block;\n max-height: 132px;\n overflow: hidden;\n white-space: pre-line;\n -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent);\n mask-image: linear-gradient(180deg, #000 72%, transparent);\n`;\n\nexport const SAMPLE_NOTE = `Kickoff open questions before we lock the columns:\n\n• Who owns the migration off react-dnd, and does it block the canvas work or run in parallel?\n• Confirm the outline-placeholder choreography reads the same in a scrolled column.\n• Do we ship the note type in v1, or defer inline editing?`;\n\nexport interface NoteCardProps {\n title?: string;\n body?: string;\n}\n\nexport const NoteCard = ({\n title = \"Kickoff notes\",\n body = SAMPLE_NOTE,\n}: NoteCardProps): ReactElement => (\n <>\n <StackRow role=\"title\">\n <Body2 weight=\"bold\">{title}</Body2>\n <EntityDots aria-label=\"Note options\" />\n </StackRow>\n <StackRow role=\"custom\" direction=\"column\">\n <StyledNoteBody color=\"secondary\">{body}</StyledNoteBody>\n </StackRow>\n </>\n);\n\n/* ---- placeholder + skeleton ---- */\n\nexport const NotePlaceholder = (\n props: React.ButtonHTMLAttributes<HTMLButtonElement>\n): ReactElement => (\n <Placeholder icon={<NoteIcon />} label=\"Write a note\" {...props} />\n);\n\n/* Skeleton mirrors the note anatomy: a title line, then several body lines. */\nexport const NoteSkeleton = (): ReactElement => (\n <>\n <StackRow role=\"title\">\n <SkeletonLoader style={{ height: 14, width: \"50%\" }} />\n </StackRow>\n <StackRow role=\"custom\" direction=\"column\">\n <SkeletonLoader style={{ height: 10, width: \"100%\" }} />\n <SkeletonLoader style={{ height: 10, width: \"96%\" }} />\n <SkeletonLoader style={{ height: 10, width: \"88%\" }} />\n <SkeletonLoader style={{ height: 10, width: \"70%\" }} />\n </StackRow>\n </>\n);\n"],"mappings":";AAAA,OAAOA,KAAK,MAAwB,OAAO;AAE3C,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,SAASC,UAAU,EAAEC,WAAW,QAAQ,UAAU;AAClD,SAASC,QAAQ,QAAQ,2BAA2B;AACpD,SAASC,cAAc,QAAQ,6BAA6B;AAC5D,SAASC,cAAc,IAAIC,QAAQ,QAAQ,iCAAiC;AAC5E,SAASC,KAAK,QAAQ,gCAAgC;;AAEtD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAMC,cAAc,GAAGR,MAAM,CAACO,KAAK,CAAC,CAAAE,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,oMAOnC;AAED,OAAO,MAAMC,WAAW,wTAImC;AAO3D,OAAO,MAAMC,QAAQ,GAAGC,IAAA;EAAA,IAAAC,UAAA,GAAAD,IAAA,CACtBE,KAAK;IAALA,KAAK,GAAAD,UAAA,cAAG,eAAe,GAAAA,UAAA;IAAAE,SAAA,GAAAH,IAAA,CACvBI,IAAI;IAAJA,IAAI,GAAAD,SAAA,cAAGL,WAAW,GAAAK,SAAA;EAAA,oBAElBlB,KAAA,CAAAoB,aAAA,CAAApB,KAAA,CAAAqB,QAAA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C2B,KAAK,EAAE;IAAEC,MAAM,EAAE,EAAE;IAAEC,KAAK,EAAE;EAAM;AAAE,CAAE,CAAC,eACvDlC,KAAA,CAAAoB,aAAA,CAACf,cAAc;EAAC2B,KAAK,EAAE;IAAEC,MAAM,EAAE,EAAE;IAAEC,KAAK,EAAE;EAAM;AAAE,CAAE,CAAC,eACvDlC,KAAA,CAAAoB,aAAA,CAACf,cAAc;EAAC2B,KAAK,EAAE;IAAEC,MAAM,EAAE,EAAE;IAAEC,KAAK,EAAE;EAAM;AAAE,CAAE,CAC9C,CACV,CACH","ignoreList":[]}
1
+ {"version":3,"file":"NoteCard.js","names":["React","styled","CardProjectLine","EntityDots","Placeholder","StyledTitleBlock","NoteIcon","SkeletonLoader","StackedCardRow","StackRow","Body2","StyledNoteBody","withConfig","displayName","componentId","SAMPLE_NOTE","NoteCard","_ref","_ref$title","title","_ref$body","body","_ref$showProjectName","showProjectName","_ref$projectName","projectName","createElement","Fragment","role","weight","direction","color","NotePlaceholder","props","_extends","icon","label","NoteSkeleton","style","height","width"],"sources":["../../../../../src/presentation/stackedCard/content/NoteCard.tsx"],"sourcesContent":["import React, { ReactElement } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport {\n CardProjectLine,\n EntityDots,\n Placeholder,\n StyledTitleBlock,\n} from \"./shared\";\nimport { NoteIcon } from \"../../../components/Icons\";\nimport { SkeletonLoader } from \"../../../components/Loaders\";\nimport { StackedCardRow as StackRow } from \"../../../components/StackedCard\";\nimport { Body2 } from \"../../../components/Typography\";\n\n/**\n * NoteCard — the new fifth type. A multi-line text card (Milanote-style): a\n * title row that owns the \"…\" menu, then padded body rows. The body clamps at a\n * line limit and fades out; auto-height, so the card grows with its content.\n * Inline editing lands in task 4/8 — this is the read view + placeholder.\n */\n\n/* The body clamps at a max height and fades out with a mask so long notes end\n softly instead of hard-cropping. white-space: pre-line keeps authored breaks. */\nconst StyledNoteBody = styled(Body2)`\n display: block;\n max-height: 132px;\n overflow: hidden;\n white-space: pre-line;\n -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent);\n mask-image: linear-gradient(180deg, #000 72%, transparent);\n`;\n\nexport const SAMPLE_NOTE = `Kickoff open questions before we lock the columns:\n\n• Who owns the migration off react-dnd, and does it block the canvas work or run in parallel?\n• Confirm the outline-placeholder choreography reads the same in a scrolled column.\n• Do we ship the note type in v1, or defer inline editing?`;\n\nexport interface NoteCardProps {\n title?: string;\n body?: string;\n /**\n * The project the note belongs to, above the title — the same line, in the\n * same treatment, that a TaskCard uses. Off by default: only a surface that\n * mixes projects needs it.\n */\n showProjectName?: boolean;\n projectName?: string;\n}\n\nexport const NoteCard = ({\n title = \"Kickoff notes\",\n body = SAMPLE_NOTE,\n showProjectName = false,\n projectName = \"Marketing Site\",\n}: NoteCardProps): ReactElement => (\n <>\n <StackRow role=\"title\">\n <StyledTitleBlock>\n {showProjectName ? (\n <CardProjectLine>{projectName}</CardProjectLine>\n ) : null}\n <Body2 weight=\"bold\">{title}</Body2>\n </StyledTitleBlock>\n <EntityDots aria-label=\"Note options\" />\n </StackRow>\n <StackRow role=\"custom\" direction=\"column\">\n <StyledNoteBody color=\"secondary\">{body}</StyledNoteBody>\n </StackRow>\n </>\n);\n\n/* ---- placeholder + skeleton ---- */\n\nexport const NotePlaceholder = (\n props: React.ButtonHTMLAttributes<HTMLButtonElement>\n): ReactElement => (\n <Placeholder icon={<NoteIcon />} label=\"Write a note\" {...props} />\n);\n\n/* Skeleton mirrors the note anatomy: a title line, then several body lines. */\nexport const NoteSkeleton = (): ReactElement => (\n <>\n <StackRow role=\"title\">\n <SkeletonLoader style={{ height: 14, width: \"50%\" }} />\n </StackRow>\n <StackRow role=\"custom\" direction=\"column\">\n <SkeletonLoader style={{ height: 10, width: \"100%\" }} />\n <SkeletonLoader style={{ height: 10, width: \"96%\" }} />\n <SkeletonLoader style={{ height: 10, width: \"88%\" }} />\n <SkeletonLoader style={{ height: 10, width: \"70%\" }} />\n </StackRow>\n </>\n);\n"],"mappings":";AA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,cAAc;EAAC+B,KAAK,EAAE;IAAEC,MAAM,EAAE,EAAE;IAAEC,KAAK,EAAE;EAAM;AAAE,CAAE,CAAC,eACvDxC,KAAA,CAAA0B,aAAA,CAACnB,cAAc;EAAC+B,KAAK,EAAE;IAAEC,MAAM,EAAE,EAAE;IAAEC,KAAK,EAAE;EAAM;AAAE,CAAE,CAC9C,CACV,CACH","ignoreList":[]}
@@ -0,0 +1,64 @@
1
+ import { ReactElement } from "react";
2
+ /**
3
+ * ProjectCard — a project as a stacked card.
4
+ *
5
+ * The sixth content type, and the second one that mirrors a project-management
6
+ * record rather than something authored on the surface (TaskCard is the first).
7
+ * It composes the same shell and the same rows; nothing in `components/StackedCard`
8
+ * knows it exists.
9
+ *
10
+ * The face is the app's Projects page, read off `ProjectListGroup.jsx`:
11
+ * - the NAME is the card's title (`Header3`, as in the grid card);
12
+ * - the CLIENT sits under it — `Entity.Property "entity-property-client"`, the
13
+ * company the project is for;
14
+ * - the DESCRIPTION is the project's `body`, the grid card's `Body2` tertiary
15
+ * excerpt, clamped because the whole text lives on the project and this is a
16
+ * reference to it, not a copy;
17
+ * - the LEADER and the LABEL share one row. The label is a FILLED pill whose
18
+ * background is the label's own colour and whose text is a darker shade of
19
+ * it (`ProjectLabel.jsx`: `EntityLabel` with `backgroundColor: label.color`,
20
+ * `color: label.darker_text_color`) — the design system's `Chip`, not the
21
+ * colour-text `Tag` the column cards use for task labels.
22
+ *
23
+ * There is deliberately NO progress indicator. A single percentage is the one
24
+ * number on a project that cannot be read without knowing how it was computed,
25
+ * and a card is a place people put a project to talk ABOUT it — the number
26
+ * invites a conversation about the number instead.
27
+ */
28
+ export interface ProjectCardPerson {
29
+ name: string;
30
+ initials: string;
31
+ /** Avatar colours stand in for the server-rendered avatar: data, not theme. */
32
+ color: string;
33
+ }
34
+ /** A project label carries both of the colours the app stores for it. */
35
+ export interface ProjectCardLabel {
36
+ text: string;
37
+ /** `label.color` — the pill's background. */
38
+ color: string;
39
+ /** `label.darker_text_color` — the pill's text. */
40
+ textColor: string;
41
+ }
42
+ /**
43
+ * What an internal project's client line says.
44
+ *
45
+ * A project with no client belongs to the account's own company, and printing
46
+ * that company's name back at someone who works there says nothing. So the line
47
+ * states the fact instead.
48
+ */
49
+ export declare const INTERNAL_CLIENT_LABEL = "Internal";
50
+ /** One rule for the client line, so no surface can label the same project twice. */
51
+ export declare const projectClientLine: (client: string | null | undefined) => string;
52
+ export interface ProjectCardProps {
53
+ name?: string;
54
+ /** The client company. `null` is an internal project — the line reads "Internal". */
55
+ client?: string | null;
56
+ /** The project's `body`; the excerpt row exists only when it has one. */
57
+ description?: string;
58
+ /** A project need not have a leader. */
59
+ leader?: ProjectCardPerson;
60
+ /** A project need not have a label. */
61
+ label?: ProjectCardLabel;
62
+ }
63
+ export declare const ProjectCard: ({ name, client, description, leader, label, }: ProjectCardProps) => ReactElement;
64
+ //# sourceMappingURL=ProjectCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProjectCard.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/stackedCard/content/ProjectCard.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAe5C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAC;CACf;AAED,yEAAyE;AACzE,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,aAAa,CAAC;AAEhD,oFAAoF;AACpF,eAAO,MAAM,iBAAiB,GAAI,QAAQ,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG,MACrC,CAAC;AA4DlC,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qFAAqF;IACrF,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wCAAwC;IACxC,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,uCAAuC;IACvC,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B;AAED,eAAO,MAAM,WAAW,GAAI,+CAMzB,gBAAgB,KAAG,YAmDrB,CAAC"}
@@ -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,0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,SAAS,EAAC,UAAU;IAAC;EAAU,gBACnClC,KAAA,CAAA8B,aAAA,CAAC1B,IAAI;IACHmC,IAAI,EAAC,OAAO;IACZV,KAAK,EAAEA,KAAK,CAACW,IAAK;IAClBC,eAAe,EAAEZ,KAAK,CAACI,KAAM;IAC7BA,KAAK,EAAEJ,KAAK,CAACa,SAAU;IACvBC,eAAe,EAAE;MAAEC,OAAO,EAAE,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;AAiC5C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAC;CACf;AA4KD,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;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,aAAa,EAAE,CAAC;IACzB,8EAA8E;IAC9E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,wEAAwE;IACxE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,uDAAuD;IACvD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC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