@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.
- package/dist/cjs/components/Icons/collection/Project.js +98 -0
- package/dist/cjs/components/Icons/collection/Project.js.map +1 -0
- package/dist/cjs/components/Icons/collection/Task.js +61 -0
- package/dist/cjs/components/Icons/collection/Task.js.map +1 -0
- package/dist/cjs/components/Icons/collection/index.js +14 -0
- package/dist/cjs/components/Icons/collection/index.js.map +1 -1
- package/dist/cjs/presentation/shared/WebhookLogsDialog.js +170 -46
- package/dist/cjs/presentation/shared/WebhookLogsDialog.js.map +1 -1
- package/dist/cjs/presentation/stackedCard/content/NoteCard.js +7 -3
- package/dist/cjs/presentation/stackedCard/content/NoteCard.js.map +1 -1
- package/dist/cjs/presentation/stackedCard/content/ProjectCard.js +136 -0
- package/dist/cjs/presentation/stackedCard/content/ProjectCard.js.map +1 -0
- package/dist/cjs/presentation/stackedCard/content/TaskCard.js +183 -56
- package/dist/cjs/presentation/stackedCard/content/TaskCard.js.map +1 -1
- package/dist/cjs/presentation/stackedCard/content/index.js +11 -0
- package/dist/cjs/presentation/stackedCard/content/index.js.map +1 -1
- package/dist/cjs/presentation/stackedCard/content/shared.js +66 -19
- package/dist/cjs/presentation/stackedCard/content/shared.js.map +1 -1
- package/dist/cjs/presentation/whiteboard/bottomDock.js +95 -32
- package/dist/cjs/presentation/whiteboard/bottomDock.js.map +1 -1
- package/dist/cjs/presentation/whiteboard/canvasElements.js +196 -8
- package/dist/cjs/presentation/whiteboard/canvasElements.js.map +1 -1
- package/dist/cjs/presentation/whiteboard/inspector.js +149 -47
- package/dist/cjs/presentation/whiteboard/inspector.js.map +1 -1
- package/dist/cjs/presentation/whiteboard/outline.js +91 -18
- package/dist/cjs/presentation/whiteboard/outline.js.map +1 -1
- package/dist/cjs/presentation/whiteboard/projectElements.js +883 -0
- package/dist/cjs/presentation/whiteboard/projectElements.js.map +1 -0
- package/dist/esm/components/Icons/collection/Project.d.ts +36 -0
- package/dist/esm/components/Icons/collection/Project.d.ts.map +1 -0
- package/dist/esm/components/Icons/collection/Project.js +91 -0
- package/dist/esm/components/Icons/collection/Project.js.map +1 -0
- package/dist/esm/components/Icons/collection/Task.d.ts +32 -0
- package/dist/esm/components/Icons/collection/Task.d.ts.map +1 -0
- package/dist/esm/components/Icons/collection/Task.js +54 -0
- package/dist/esm/components/Icons/collection/Task.js.map +1 -0
- package/dist/esm/components/Icons/collection/index.d.ts +2 -0
- package/dist/esm/components/Icons/collection/index.d.ts.map +1 -1
- package/dist/esm/components/Icons/collection/index.js +2 -0
- package/dist/esm/components/Icons/collection/index.js.map +1 -1
- package/dist/esm/presentation/shared/WebhookLogsDialog.d.ts +1 -3
- package/dist/esm/presentation/shared/WebhookLogsDialog.d.ts.map +1 -1
- package/dist/esm/presentation/shared/WebhookLogsDialog.js +164 -46
- package/dist/esm/presentation/shared/WebhookLogsDialog.js.map +1 -1
- package/dist/esm/presentation/stackedCard/content/NoteCard.d.ts +8 -1
- package/dist/esm/presentation/stackedCard/content/NoteCard.d.ts.map +1 -1
- package/dist/esm/presentation/stackedCard/content/NoteCard.js +8 -4
- package/dist/esm/presentation/stackedCard/content/NoteCard.js.map +1 -1
- package/dist/esm/presentation/stackedCard/content/ProjectCard.d.ts +64 -0
- package/dist/esm/presentation/stackedCard/content/ProjectCard.d.ts.map +1 -0
- package/dist/esm/presentation/stackedCard/content/ProjectCard.js +128 -0
- package/dist/esm/presentation/stackedCard/content/ProjectCard.js.map +1 -0
- package/dist/esm/presentation/stackedCard/content/TaskCard.d.ts +64 -2
- package/dist/esm/presentation/stackedCard/content/TaskCard.d.ts.map +1 -1
- package/dist/esm/presentation/stackedCard/content/TaskCard.js +181 -58
- package/dist/esm/presentation/stackedCard/content/TaskCard.js.map +1 -1
- package/dist/esm/presentation/stackedCard/content/index.d.ts +1 -0
- package/dist/esm/presentation/stackedCard/content/index.d.ts.map +1 -1
- package/dist/esm/presentation/stackedCard/content/index.js +1 -0
- package/dist/esm/presentation/stackedCard/content/index.js.map +1 -1
- package/dist/esm/presentation/stackedCard/content/shared.d.ts +30 -0
- package/dist/esm/presentation/stackedCard/content/shared.d.ts.map +1 -1
- package/dist/esm/presentation/stackedCard/content/shared.js +66 -19
- package/dist/esm/presentation/stackedCard/content/shared.js.map +1 -1
- package/dist/esm/presentation/whiteboard/bottomDock.d.ts +30 -7
- package/dist/esm/presentation/whiteboard/bottomDock.d.ts.map +1 -1
- package/dist/esm/presentation/whiteboard/bottomDock.js +79 -32
- package/dist/esm/presentation/whiteboard/bottomDock.js.map +1 -1
- package/dist/esm/presentation/whiteboard/canvasElements.d.ts +4 -1
- package/dist/esm/presentation/whiteboard/canvasElements.d.ts.map +1 -1
- package/dist/esm/presentation/whiteboard/canvasElements.js +158 -7
- package/dist/esm/presentation/whiteboard/canvasElements.js.map +1 -1
- package/dist/esm/presentation/whiteboard/inspector.d.ts +35 -1
- package/dist/esm/presentation/whiteboard/inspector.d.ts.map +1 -1
- package/dist/esm/presentation/whiteboard/inspector.js +170 -68
- package/dist/esm/presentation/whiteboard/inspector.js.map +1 -1
- package/dist/esm/presentation/whiteboard/outline.d.ts +23 -3
- package/dist/esm/presentation/whiteboard/outline.d.ts.map +1 -1
- package/dist/esm/presentation/whiteboard/outline.js +89 -18
- package/dist/esm/presentation/whiteboard/outline.js.map +1 -1
- package/dist/esm/presentation/whiteboard/projectElements.d.ts +267 -0
- package/dist/esm/presentation/whiteboard/projectElements.d.ts.map +1 -0
- package/dist/esm/presentation/whiteboard/projectElements.js +824 -0
- package/dist/esm/presentation/whiteboard/projectElements.js.map +1 -0
- package/dist/index.js +629 -490
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaskCard.js","names":["React","styled","css","EntityDots","StyledClamp","coverManagement","playControl","Placeholder","ChecklistSmallIcon","EyeOffIcon","InsertLinkIcon","MessageSmallIcon","PersonPlusIcon","SkeletonLoader","STACKED_CARD_COVER_RATIO","COVER_RATIO","StackedCardCover","Cover","StackedCardRow","StackRow","Caption1","Typography","RoundAvatar","AVATAR_COLORS","LABEL_DOTS","StyledBody","div","withConfig","displayName","componentId","_ref","$completed","StyledMetaCluster","StyledDot","span","_ref2","$color","StyledHiddenBadge","StyledDate","_ref3","$overdue","StyledAddAssignee","button","TaskCard","_ref4","_ref4$title","title","_ref4$cover","cover","_ref4$playable","playable","_ref4$coverControls","coverControls","_ref4$showTaskId","showTaskId","_ref4$taskId","taskId","_ref4$dateLabel","dateLabel","_ref4$overdue","overdue","_ref4$showDependencie","showDependencies","_ref4$dependencyCount","dependencyCount","_ref4$hiddenFromClien","hiddenFromClients","_ref4$projectDefaultH","projectDefaultHidden","_ref4$assigned","assigned","_ref4$completed","completed","showHiddenSignifier","dateIsOverdue","createElement","aspectRatio","centerSlot","undefined","topRightSlot","style","width","height","background","role","as","variant","color","className","map","key","Fragment","$bg","teal","$size","$bordered","type","TaskPlaceholder","props","_extends","icon","label","TaskSkeleton","borderRadius"],"sources":["../../../../../src/presentation/stackedCard/content/TaskCard.tsx"],"sourcesContent":["import React, { ReactElement } from \"react\";\n\nimport styled, { css } from \"styled-components\";\n\nimport {\n EntityDots,\n StyledClamp,\n coverManagement,\n playControl,\n Placeholder,\n} from \"./shared\";\nimport {\n ChecklistSmallIcon,\n EyeOffIcon,\n InsertLinkIcon,\n MessageSmallIcon,\n PersonPlusIcon,\n} from \"../../../components/Icons\";\nimport { SkeletonLoader } from \"../../../components/Loaders\";\nimport {\n STACKED_CARD_COVER_RATIO as COVER_RATIO,\n StackedCardCover as Cover,\n StackedCardRow as StackRow,\n} from \"../../../components/StackedCard\";\nimport { Caption1 } from \"../../../components/Typography\";\nimport { Typography } from \"../../../components/Typography/Typography\";\nimport { RoundAvatar, AVATAR_COLORS } from \"../../shared\";\n\n/**\n * TaskCard — the baseline-preservation card.\n *\n * This is the replacement for today's column card, so it must reproduce every\n * behavior that card has (note 52104 §B2) — none of them are optional, each is\n * a silent-regression risk. Every one is a prop here so the story can toggle it:\n *\n * - task-number prefix in the title (config-gated, mirrors `show_task_id`)\n * - overdue date colouring (red ONLY when overdue AND not completed)\n * - dependency counter (behind a feature-flag prop)\n * - hidden-from-clients signifier (shown only when it DIFFERS from the\n * project default)\n * - inline assignee affordance (avatar, or an add-assignee placeholder)\n * - completed (teal tint, no \"…\" menu, no overdue colour)\n *\n * The pending/optimistic and priority states are SHELL states (dimmed +\n * pointer-events off; red left bar), so the card is wrapped in a `<StackedCard\n * pending>` / `<StackedCard priorityColor>` by the host — they are not the\n * card's own concern and live on the shell, not here.\n */\n\nconst LABEL_DOTS = [\"#378ADD\", \"#D85A30\", \"#639922\", \"#EF9F27\", \"#7F77DD\"];\n\n/* The completed tint fills the card body; the shell keeps the priority bar and\n selection ring on top of it. */\nconst StyledBody = styled.div<{ $completed?: boolean }>`\n display: flex;\n flex-direction: column;\n\n ${({ $completed }) =>\n $completed &&\n css`\n background: var(--sc-completed-tint, rgba(72, 201, 176, 0.16));\n `}\n`;\n\nconst StyledMetaCluster = styled.div`\n display: flex;\n align-items: center;\n gap: 6px;\n color: var(--color-theme-600);\n\n .sc-dots {\n display: flex;\n gap: 4px;\n }\n\n .sc-sep {\n opacity: 0.6;\n }\n\n .sc-count {\n display: inline-flex;\n align-items: center;\n gap: 3px;\n }\n\n svg {\n width: 14px;\n height: 14px;\n }\n`;\n\nconst StyledDot = styled.span<{ $color: string }>`\n width: 11px;\n height: 11px;\n border-radius: 50%;\n background: ${({ $color }) => $color};\n`;\n\n/* Hidden-from-clients signifier — an eye-off badge, shown only when the task's\n visibility differs from the project default. */\nconst StyledHiddenBadge = styled.span`\n display: inline-flex;\n align-items: center;\n gap: 3px;\n color: var(--color-theme-600);\n\n svg {\n width: 14px;\n height: 14px;\n }\n`;\n\n/* Date — bold; turns red only when overdue AND the task is not completed. */\nconst StyledDate = styled.span<{ $overdue?: boolean }>`\n font-weight: bold;\n color: ${({ $overdue }) =>\n $overdue ? \"var(--red-alert)\" : \"var(--color-theme-900)\"};\n`;\n\n/* Inline assignee affordance placeholder — a dashed add-assignee target that\n stands in until the real picker is wired at integration. */\nconst StyledAddAssignee = styled.button`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n padding: 0;\n border: 1.5px dashed var(--color-theme-400);\n border-radius: 50%;\n background: transparent;\n color: var(--color-theme-600);\n cursor: pointer;\n\n svg {\n width: 14px;\n height: 14px;\n display: block;\n }\n\n &:hover {\n border-color: var(--sc-selection-ring);\n color: var(--color-theme-800);\n }\n`;\n\nexport interface TaskCardProps {\n title?: string;\n /** Optional cover — task cards in a column usually have none. */\n cover?: boolean;\n playable?: boolean;\n coverControls?: boolean;\n /** Config-gated task-number prefix (mirrors `show_task_id`). */\n showTaskId?: boolean;\n taskId?: number;\n dateLabel?: string;\n /** Overdue date — colours the date red, but only when NOT completed. */\n overdue?: boolean;\n /** Dependency counter, gated behind a feature flag. */\n showDependencies?: boolean;\n dependencyCount?: number;\n /** The task's hidden-from-clients flag. */\n hiddenFromClients?: boolean;\n /** The project default for client visibility; the signifier shows on a diff. */\n projectDefaultHidden?: boolean;\n /** Whether the task has an assignee (avatar) or shows the add affordance. */\n assigned?: boolean;\n /** Completed — teal tint, no \"…\" menu, no overdue colour. */\n completed?: boolean;\n}\n\nexport const TaskCard = ({\n title = \"Implement the design from the reference on this page\",\n cover = false,\n playable = false,\n coverControls = false,\n showTaskId = false,\n taskId = 4521,\n dateLabel = \"May 8 – Sep 10\",\n overdue = false,\n showDependencies = false,\n dependencyCount = 2,\n hiddenFromClients = false,\n projectDefaultHidden = false,\n assigned = true,\n completed = false,\n}: TaskCardProps): ReactElement => {\n // Signifier appears only when the task's visibility differs from the default.\n const showHiddenSignifier = hiddenFromClients !== projectDefaultHidden;\n // Overdue colour is suppressed on completed tasks.\n const dateIsOverdue = overdue && !completed;\n\n return (\n <StyledBody $completed={completed}>\n {cover ? (\n <Cover\n aspectRatio={COVER_RATIO}\n centerSlot={playable ? playControl : undefined}\n topRightSlot={coverControls ? coverManagement() : undefined}\n >\n <div\n style={{\n width: \"100%\",\n height: \"100%\",\n background: \"var(--color-theme-300)\",\n }}\n />\n </Cover>\n ) : null}\n\n <StackRow role=\"title\">\n <StyledClamp>\n {showTaskId ? (\n <Typography as=\"span\" variant=\"Caption 1\" color=\"tertiary\">\n {`#${taskId} `}\n </Typography>\n ) : null}\n {title}\n </StyledClamp>\n {/* Completed tasks drop the \"…\" menu. */}\n {completed ? null : <EntityDots aria-label=\"Task options\" />}\n </StackRow>\n\n <StackRow role=\"meta\">\n <StyledMetaCluster>\n <span className=\"sc-dots\">\n {LABEL_DOTS.map((color) => (\n <StyledDot key={color} $color={color} />\n ))}\n </span>\n <Caption1 color=\"tertiary\">+3</Caption1>\n <span className=\"sc-sep\">·</span>\n <span className=\"sc-count\">\n <MessageSmallIcon />\n <Caption1 color=\"tertiary\">7</Caption1>\n </span>\n <span className=\"sc-sep\">·</span>\n <span className=\"sc-count\">\n <ChecklistSmallIcon />\n <Caption1 color=\"tertiary\">2</Caption1>\n </span>\n {showDependencies ? (\n <>\n <span className=\"sc-sep\">·</span>\n <span className=\"sc-count\" title=\"Dependencies\">\n <InsertLinkIcon />\n <Caption1 color=\"tertiary\">{dependencyCount}</Caption1>\n </span>\n </>\n ) : null}\n {showHiddenSignifier ? (\n <>\n <span className=\"sc-sep\">·</span>\n <StyledHiddenBadge title=\"Hidden from clients\">\n <EyeOffIcon />\n </StyledHiddenBadge>\n </>\n ) : null}\n </StyledMetaCluster>\n </StackRow>\n\n <StackRow role=\"footer\">\n <StyledDate $overdue={dateIsOverdue}>{dateLabel}</StyledDate>\n <span />\n {assigned ? (\n <RoundAvatar\n $bg={AVATAR_COLORS.teal}\n $size={24}\n $bordered={false}\n data-fixed\n >\n MS\n </RoundAvatar>\n ) : (\n <StyledAddAssignee type=\"button\" aria-label=\"Assign task\" data-fixed>\n <PersonPlusIcon />\n </StyledAddAssignee>\n )}\n </StackRow>\n </StyledBody>\n );\n};\n\n/* ---- placeholder + skeleton ---- */\n\nexport const TaskPlaceholder = (\n props: React.ButtonHTMLAttributes<HTMLButtonElement>\n): ReactElement => (\n <Placeholder\n icon={<ChecklistSmallIcon />}\n label=\"Name this task\"\n {...props}\n />\n);\n\n/* Skeleton mirrors the task anatomy row for row: title, meta, footer. */\nexport const TaskSkeleton = (): ReactElement => (\n <>\n <StackRow role=\"title\">\n <SkeletonLoader style={{ height: 14, width: \"90%\" }} />\n </StackRow>\n <StackRow role=\"meta\">\n <SkeletonLoader style={{ height: 10, width: \"55%\" }} />\n </StackRow>\n <StackRow role=\"footer\">\n <SkeletonLoader style={{ height: 12, width: 64 }} data-fixed />\n <span />\n <SkeletonLoader\n data-fixed\n style={{ width: 24, height: 24, borderRadius: \"50%\" }}\n />\n </StackRow>\n </>\n);\n"],"mappings":";AAAA,OAAOA,KAAK,MAAwB,OAAO;AAE3C,OAAOC,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAE/C,SACEC,UAAU,EACVC,WAAW,EACXC,eAAe,EACfC,WAAW,EACXC,WAAW,QACN,UAAU;AACjB,SACEC,kBAAkB,EAClBC,UAAU,EACVC,cAAc,EACdC,gBAAgB,EAChBC,cAAc,QACT,2BAA2B;AAClC,SAASC,cAAc,QAAQ,6BAA6B;AAC5D,SACEC,wBAAwB,IAAIC,WAAW,EACvCC,gBAAgB,IAAIC,KAAK,EACzBC,cAAc,IAAIC,QAAQ,QACrB,iCAAiC;AACxC,SAASC,QAAQ,QAAQ,gCAAgC;AACzD,SAASC,UAAU,QAAQ,2CAA2C;AACtE,SAASC,WAAW,EAAEC,aAAa,QAAQ,cAAc;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,UAAU,GAAG,CAAC,SAAS,EAAE,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AACiE,IAAI,EAAC;AAAM,gBACnBpF,KAAA,CAAA2E,aAAA,CAAC9D,cAAc;EAACmE,KAAK,EAAE;IAAEE,MAAM,EAAE,EAAE;IAAED,KAAK,EAAE;EAAM;AAAE,CAAE,CAC9C,CAAC,eACXjF,KAAA,CAAA2E,aAAA,CAACxD,QAAQ;EAACiE,IAAI,EAAC;AAAQ,gBACrBpF,KAAA,CAAA2E,aAAA,CAAC9D,cAAc;EAACmE,KAAK,EAAE;IAAEE,MAAM,EAAE,EAAE;IAAED,KAAK,EAAE;EAAG,CAAE;EAAC;AAAU,CAAE,CAAC,eAC/DjF,KAAA,CAAA2E,aAAA,aAAO,CAAC,eACR3E,KAAA,CAAA2E,aAAA,CAAC9D,cAAc;EACb,kBAAU;EACVmE,KAAK,EAAE;IAAEC,KAAK,EAAE,EAAE;IAAEC,MAAM,EAAE,EAAE;IAAEqB,YAAY,EAAE;EAAM;AAAE,CACvD,CACO,CACV,CACH","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"TaskCard.js","names":["React","styled","css","CARD_FONT","CardProjectLine","EntityDots","StyledClamp","StyledTitleBlock","coverManagement","playControl","Placeholder","ChecklistSmallIcon","DependencySmallIcon","EyeOffSmallIcon","MessageSmallIcon","PersonPlusIcon","SkeletonLoader","Signifier","STACKED_CARD_COVER_RATIO","COVER_RATIO","StackedCardCover","Cover","StackedCardRow","StackRow","Tag","Caption1","Typography","RoundAvatar","AVATAR_COLORS","DEMO_LABELS","text","color","LABELS_AS_TEXT_MAX","LABEL_DOTS_MAX","StyledBody","div","withConfig","displayName","componentId","_ref","$completed","StyledInfoLine","StyledDot","span","_ref2","$color","StyledDate","_ref3","$overdue","StyledAssignees","StyledAddAssignee","button","ASSIGNEE_LIMIT","TaskCard","_ref4","_ref4$title","title","_ref4$cover","cover","_ref4$playable","playable","_ref4$coverControls","coverControls","_ref4$showTaskId","showTaskId","_ref4$taskId","taskId","_ref4$showProjectName","showProjectName","_ref4$projectName","projectName","_ref4$labels","labels","_ref4$subtaskCount","subtaskCount","_ref4$commentCount","commentCount","_ref4$dateLabel","dateLabel","_ref4$overdue","overdue","_ref4$showDependencie","showDependencies","_ref4$dependencyCount","dependencyCount","_ref4$hiddenFromClien","hiddenFromClients","_ref4$projectDefaultH","projectDefaultHidden","_ref4$assigned","assigned","assignees","_ref4$completed","completed","showHiddenSignifier","dateIsOverdue","hasDate","collapseLabels","length","assigneeSlot","createElement","className","slice","map","person","key","name","$bg","$size","$overlap","initials","teal","$bordered","type","signifiers","push","value","tooltipText","showInfoLine","aspectRatio","centerSlot","undefined","topRightSlot","style","width","height","background","role","as","variant","label","showDot","TaskPlaceholder","props","_extends","icon","TaskSkeleton","Fragment","borderRadius"],"sources":["../../../../../src/presentation/stackedCard/content/TaskCard.tsx"],"sourcesContent":["import React, { ReactElement } from \"react\";\n\nimport styled, { css } from \"styled-components\";\n\nimport {\n CARD_FONT,\n CardProjectLine,\n EntityDots,\n StyledClamp,\n StyledTitleBlock,\n coverManagement,\n playControl,\n Placeholder,\n} from \"./shared\";\nimport {\n ChecklistSmallIcon,\n DependencySmallIcon,\n EyeOffSmallIcon,\n MessageSmallIcon,\n PersonPlusIcon,\n} from \"../../../components/Icons\";\nimport { SkeletonLoader } from \"../../../components/Loaders\";\nimport { Signifier } from \"../../../components/Signifier\";\nimport {\n STACKED_CARD_COVER_RATIO as COVER_RATIO,\n StackedCardCover as Cover,\n StackedCardRow as StackRow,\n} from \"../../../components/StackedCard\";\nimport { Tag } from \"../../../components/Tag\";\nimport { Caption1 } from \"../../../components/Typography\";\nimport { Typography } from \"../../../components/Typography/Typography\";\nimport { RoundAvatar, AVATAR_COLORS } from \"../../shared\";\n\n/**\n * TaskCard — the baseline-preservation card.\n *\n * This is the replacement for today's column card, so it must reproduce every\n * behavior that card has (note 52104 §B2) — none of them are optional, each is\n * a silent-regression risk. Every one is a prop here so the story can toggle it:\n *\n * - task-number prefix in the title (config-gated, mirrors `show_task_id`)\n * - overdue date colouring (red ONLY when overdue AND not completed)\n * - dependency counter (behind a feature-flag prop)\n * - hidden-from-clients signifier (shown only when it DIFFERS from the\n * project default)\n * - inline assignee affordance (avatar, or an add-assignee placeholder)\n * - completed (teal tint, no \"…\" menu, no overdue colour)\n * - assignees appear ONCE (in the info line when the card has no\n * date range, in the date row when it\n * has one — never in both)\n *\n * The pending/optimistic and priority states are SHELL states (dimmed +\n * pointer-events off; red left bar), so the card is wrapped in a `<StackedCard\n * pending>` / `<StackedCard priorityColor>` by the host — they are not the\n * card's own concern and live on the shell, not here.\n *\n * Everything is measured against the app: `ColumnCardBody.jsx`,\n * `ColumnCardBodyInfo.jsx`, `ColumnCardDate.jsx` and\n * `view.project_tasks_column_mode.less`.\n */\n\nexport interface TaskCardLabel {\n text: string;\n /** The label's own colour — data, not theme. */\n color: string;\n}\n\nexport interface TaskCardPerson {\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/**\n * Eight labels, so the default card demonstrates the collapsed form. Colours are\n * the labels' own, which is why they are literals.\n */\nconst DEMO_LABELS: TaskCardLabel[] = [\n { text: \"DESIGN\", color: \"#378ADD\" },\n { text: \"BLOCKED\", color: \"#D85A30\" },\n { text: \"READY\", color: \"#639922\" },\n { text: \"REVIEW\", color: \"#EF9F27\" },\n { text: \"RESEARCH\", color: \"#7F77DD\" },\n { text: \"COPY\", color: \"#8C5A2B\" },\n { text: \"QA\", color: \"#2F5DA8\" },\n { text: \"RELEASE\", color: \"#8A3E6B\" },\n];\n\n/**\n * How many labels read as text before the line has to collapse them, and how\n * many dots stand in for the rest. Two colour-text `Tag`s fit a 260px card; past\n * that the app's own answer (and the design system's mapping) is coloured dots\n * plus an overflow count.\n */\nconst LABELS_AS_TEXT_MAX = 2;\nconst LABEL_DOTS_MAX = 5;\n\n/* The completed tint fills the card body; the shell keeps the priority bar and\n selection ring on top of it. */\nconst StyledBody = styled.div<{ $completed?: boolean }>`\n display: flex;\n flex-direction: column;\n\n ${({ $completed }) =>\n $completed &&\n css`\n background: var(--sc-completed-tint, rgba(72, 201, 176, 0.16));\n `}\n`;\n\n/**\n * The info line — labels, then signifiers, then (only when the card has no date\n * range) the assignees.\n *\n * The separator is the app's, rule for rule: a 2px round dot in\n * `--color-theme-600` with `margin: 0 6px`, drawn by `::before` on every item\n * EXCEPT the first (`view.project_tasks_column_mode.less`:\n * `.c-signifier:not(:first-child):before`, `.label_single_container:not(:first-child)\n * .label_item:before`, `.dot:before`). Because the rule keys off position rather\n * than off \"am I a signifier\", a line that starts with a signifier — a task with\n * counters but no labels — cannot open with a dangling dot.\n *\n * `font-size: 11px` is the `.labels` block's own; the vertical rhythm the app\n * gets from `margin-top: 10px` comes from the `meta` row's role padding here.\n */\nconst StyledInfoLine = styled.div`\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n width: 100%;\n font-size: 11px;\n\n > * {\n display: flex;\n align-items: center;\n min-height: 18px;\n }\n\n /* The assignees are excluded: they end the line rather than continuing the\n enumeration, and the app draws no dot before them either. */\n > *:not(:first-child):not(.sc-assignees)::before {\n content: \"\";\n flex-shrink: 0;\n width: 2px;\n height: 2px;\n margin: 0 6px;\n border-radius: 100%;\n background-color: var(--color-theme-600);\n }\n\n /* Labels truncate rather than push the line wider: 74px for the item, 60px\n for the text inside it — the app's two numbers. */\n .sc-label {\n max-width: 74px;\n }\n\n .sc-label .c-tag > div {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n max-width: 60px;\n }\n\n .sc-dots {\n gap: 4px;\n }\n\n /* The assignees end the line, right-aligned, when there is no date row to\n carry them. */\n .sc-assignees {\n flex: 1 1 auto;\n justify-content: flex-end;\n }\n`;\n\nconst StyledDot = styled.span<{ $color: string }>`\n width: 11px;\n height: 11px;\n border-radius: 50%;\n background: ${({ $color }) => $color};\n`;\n\n/**\n * The date row's text.\n *\n * A raw `<span>` in this Storybook inherits the browser's serif default at the\n * ancestor's size, which is why the date used to read as huge serif type. The\n * app sets the same four values in CSS on a plain `div` (`.due_date`: 13px,\n * bold, 24px tall, `--color-theme-900`, `--red-alert` when `.overdue`), so the\n * fix is to state them here — plus the font stack the missing reset does not\n * supply.\n */\nconst StyledDate = styled.span<{ $overdue?: boolean }>`\n height: 24px;\n font-family: ${CARD_FONT};\n font-size: 13px;\n font-weight: bold;\n line-height: 24px;\n letter-spacing: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n color: ${({ $overdue }) =>\n $overdue ? \"var(--red-alert)\" : \"var(--color-theme-900)\"};\n`;\n\n/* Avatars are limited to 3 and overlap, as MultiAssigneesPicker does. */\nconst StyledAssignees = styled.span`\n display: flex;\n align-items: center;\n justify-content: flex-end;\n`;\n\n/* Inline assignee affordance placeholder — a dashed add-assignee target that\n stands in until the real picker is wired at integration. */\nconst StyledAddAssignee = styled.button`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n padding: 0;\n border: 1.5px dashed var(--color-theme-400);\n border-radius: 50%;\n background: transparent;\n color: var(--color-theme-600);\n cursor: pointer;\n\n svg {\n width: 14px;\n height: 14px;\n display: block;\n }\n\n &:hover {\n border-color: var(--sc-selection-ring);\n color: var(--color-theme-800);\n }\n`;\n\n/** The app's assignee limit (MultiAssigneesPicker `limit={3}`). */\nconst ASSIGNEE_LIMIT = 3;\n\nexport interface TaskCardProps {\n title?: string;\n /** Optional cover — task cards in a column usually have none. */\n cover?: boolean;\n playable?: boolean;\n coverControls?: boolean;\n /** Config-gated task-number prefix (mirrors `show_task_id`). */\n showTaskId?: boolean;\n taskId?: number;\n /**\n * The project the task lives in, above the title. Off by default: in a column\n * the column already says it, and only a surface that mixes projects (a\n * canvas) needs the line.\n */\n showProjectName?: boolean;\n projectName?: string;\n /**\n * The task's labels. Up to two read as colour text (`Tag`, the column card's\n * treatment); more collapse to coloured dots plus an overflow count, which is\n * what the design system maps \">2 labels\" to. An empty array means the card\n * has no labels — and then the info line must not open with a separator.\n */\n labels?: TaskCardLabel[];\n /** Open-subtask and comment counters; each shows only when it is non-zero. */\n subtaskCount?: number;\n commentCount?: number;\n /**\n * The date range. `null` (or empty) means the task has none — the date row\n * disappears and the assignees move up into the info line, so they still\n * appear exactly once.\n */\n dateLabel?: string | null;\n /** Overdue date — colours the date red, but only when NOT completed. */\n overdue?: boolean;\n /** Dependency counter, gated behind a feature flag. */\n showDependencies?: boolean;\n dependencyCount?: number;\n /** The task's hidden-from-clients flag. */\n hiddenFromClients?: boolean;\n /** The project default for client visibility; the signifier shows on a diff. */\n projectDefaultHidden?: boolean;\n /** Whether the task has an assignee (avatar) or shows the add affordance. */\n assigned?: boolean;\n /** The actual assignees, when the host has them. Limited to 3, as in the app. */\n assignees?: TaskCardPerson[];\n /** Completed — teal tint, no \"…\" menu, no overdue colour. */\n completed?: boolean;\n}\n\nexport const TaskCard = ({\n title = \"Implement the design from the reference on this page\",\n cover = false,\n playable = false,\n coverControls = false,\n showTaskId = false,\n taskId = 4521,\n showProjectName = false,\n projectName = \"Marketing Site\",\n labels = DEMO_LABELS,\n subtaskCount = 2,\n commentCount = 7,\n dateLabel = \"May 8 – Sep 10\",\n overdue = false,\n showDependencies = false,\n dependencyCount = 2,\n hiddenFromClients = false,\n projectDefaultHidden = false,\n assigned = true,\n assignees,\n completed = false,\n}: TaskCardProps): ReactElement => {\n // Signifier appears only when the task's visibility differs from the default.\n const showHiddenSignifier = hiddenFromClients !== projectDefaultHidden;\n // Overdue colour is suppressed on completed tasks.\n const dateIsOverdue = overdue && !completed;\n const hasDate = dateLabel != null && dateLabel !== \"\";\n const collapseLabels = labels.length > LABELS_AS_TEXT_MAX;\n\n /* The assignee slot: the real avatars when the host has them, the demo avatar\n when it only says \"assigned\", the add affordance when it says nothing is. */\n const assigneeSlot = assigned ? (\n <StyledAssignees className=\"sc-assignees\" data-fixed>\n {assignees ? (\n assignees.slice(0, ASSIGNEE_LIMIT).map((person) => (\n <RoundAvatar key={person.name} $bg={person.color} $size={24} $overlap>\n {person.initials}\n </RoundAvatar>\n ))\n ) : (\n <RoundAvatar $bg={AVATAR_COLORS.teal} $size={24} $bordered={false}>\n MS\n </RoundAvatar>\n )}\n </StyledAssignees>\n ) : (\n <StyledAssignees className=\"sc-assignees\" data-fixed>\n <StyledAddAssignee type=\"button\" aria-label=\"Assign task\">\n <PersonPlusIcon />\n </StyledAddAssignee>\n </StyledAssignees>\n );\n\n /* Signifiers in the app's fixed order: subtasks → comments → dependencies →\n hidden-from-clients. Each is one child of the info line, so the line's own\n separator rule spaces them. */\n const signifiers: ReactElement[] = [];\n if (subtaskCount > 0) {\n signifiers.push(\n <Signifier\n key=\"subtasks\"\n type={ChecklistSmallIcon}\n value={subtaskCount}\n tooltipText=\"Subtasks\"\n />\n );\n }\n if (commentCount > 0) {\n signifiers.push(\n <Signifier\n key=\"comments\"\n type={MessageSmallIcon}\n value={commentCount}\n tooltipText=\"Comments\"\n />\n );\n }\n if (showDependencies && dependencyCount > 0) {\n signifiers.push(\n <Signifier\n key=\"dependencies\"\n type={DependencySmallIcon}\n value={dependencyCount}\n tooltipText=\"Dependencies\"\n />\n );\n }\n if (showHiddenSignifier) {\n signifiers.push(\n <Signifier\n key=\"hidden\"\n type={EyeOffSmallIcon}\n tooltipText=\"Hidden from clients\"\n />\n );\n }\n\n /* The info line exists when it has something to say — labels, signifiers, or\n the assignees it has to carry because there is no date row. */\n const showInfoLine = labels.length > 0 || signifiers.length > 0 || !hasDate;\n\n return (\n <StyledBody $completed={completed}>\n {cover ? (\n <Cover\n aspectRatio={COVER_RATIO}\n centerSlot={playable ? playControl : undefined}\n topRightSlot={coverControls ? coverManagement() : undefined}\n >\n <div\n style={{\n width: \"100%\",\n height: \"100%\",\n background: \"var(--color-theme-300)\",\n }}\n />\n </Cover>\n ) : null}\n\n <StackRow role=\"title\">\n <StyledTitleBlock>\n {showProjectName ? (\n <CardProjectLine>{projectName}</CardProjectLine>\n ) : null}\n <StyledClamp>\n {showTaskId ? (\n <Typography as=\"span\" variant=\"Caption 1\" color=\"tertiary\">\n {`#${taskId} `}\n </Typography>\n ) : null}\n {title}\n </StyledClamp>\n </StyledTitleBlock>\n {/* Completed tasks drop the \"…\" menu. */}\n {completed ? null : <EntityDots aria-label=\"Task options\" />}\n </StackRow>\n\n {showInfoLine ? (\n <StackRow role=\"meta\">\n <StyledInfoLine>\n {collapseLabels ? (\n <span className=\"sc-dots\">\n {labels.slice(0, LABEL_DOTS_MAX).map((label) => (\n <StyledDot key={label.text} $color={label.color} />\n ))}\n {labels.length > LABEL_DOTS_MAX ? (\n <Caption1 color=\"tertiary\">{`+${\n labels.length - LABEL_DOTS_MAX\n }`}</Caption1>\n ) : null}\n </span>\n ) : (\n labels.map((label) => (\n <span className=\"sc-label\" key={label.text}>\n <Tag name={label.text} color={label.color} showDot={false} />\n </span>\n ))\n )}\n {signifiers}\n {/* Key invariant: assignees are here ONLY when the card has no date\n row to hold them. */}\n {hasDate ? null : assigneeSlot}\n </StyledInfoLine>\n </StackRow>\n ) : null}\n\n {hasDate ? (\n <StackRow role=\"footer\">\n <StyledDate $overdue={dateIsOverdue}>{dateLabel}</StyledDate>\n {assigneeSlot}\n </StackRow>\n ) : null}\n </StyledBody>\n );\n};\n\n/* ---- placeholder + skeleton ---- */\n\nexport const TaskPlaceholder = (\n props: React.ButtonHTMLAttributes<HTMLButtonElement>\n): ReactElement => (\n <Placeholder\n icon={<ChecklistSmallIcon />}\n label=\"Name this task\"\n {...props}\n />\n);\n\n/* Skeleton mirrors the task anatomy row for row: title, meta, footer. */\nexport const TaskSkeleton = (): ReactElement => (\n <>\n <StackRow role=\"title\">\n <SkeletonLoader style={{ height: 14, width: \"90%\" }} />\n </StackRow>\n <StackRow role=\"meta\">\n <SkeletonLoader style={{ height: 10, width: \"55%\" }} />\n </StackRow>\n <StackRow role=\"footer\">\n <SkeletonLoader style={{ height: 12, width: 64 }} data-fixed />\n <span />\n <SkeletonLoader\n data-fixed\n style={{ width: 24, height: 24, borderRadius: \"50%\" }}\n />\n </StackRow>\n </>\n);\n"],"mappings":";A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U;EACV2G,KAAK,EAAE;IAAEC,KAAK,EAAE,EAAE;IAAEC,MAAM,EAAE,EAAE;IAAEa,YAAY,EAAE;EAAM;AAAE,CACvD,CACO,CACV,CACH","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/stackedCard/content/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/stackedCard/content/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/presentation/stackedCard/content/index.ts"],"sourcesContent":["export * from \"./shared\";\nexport * from \"./unfurl\";\nexport * from \"./TaskCard\";\nexport * from \"./LinkCard\";\nexport * from \"./ImageCard\";\nexport * from \"./SwatchCard\";\nexport * from \"./NoteCard\";\n"],"mappings":"AAAA,cAAc,UAAU;AACxB,cAAc,UAAU;AACxB,cAAc,YAAY;AAC1B,cAAc,YAAY;AAC1B,cAAc,aAAa;AAC3B,cAAc,cAAc;AAC5B,cAAc,YAAY","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/presentation/stackedCard/content/index.ts"],"sourcesContent":["export * from \"./shared\";\nexport * from \"./unfurl\";\nexport * from \"./ProjectCard\";\nexport * from \"./TaskCard\";\nexport * from \"./LinkCard\";\nexport * from \"./ImageCard\";\nexport * from \"./SwatchCard\";\nexport * from \"./NoteCard\";\n"],"mappings":"AAAA,cAAc,UAAU;AACxB,cAAc,UAAU;AACxB,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,cAAc,YAAY;AAC1B,cAAc,aAAa;AAC3B,cAAc,cAAc;AAC5B,cAAc,YAAY","ignoreList":[]}
|
|
@@ -13,6 +13,15 @@ import React, { ReactElement, ReactNode } from "react";
|
|
|
13
13
|
* vocabulary (Cover, StackRow, …) so the spec prose and the code keep using
|
|
14
14
|
* the same words.
|
|
15
15
|
*/
|
|
16
|
+
/**
|
|
17
|
+
* There is no global CSS reset in this Storybook, so a raw element (a `<span>`
|
|
18
|
+
* holding a date, a `<button>` holding a word) falls back to the browser default
|
|
19
|
+
* — a SERIF face at the UA's own size. Anything that is not a DS `Typography`
|
|
20
|
+
* has to name the font itself. Use a DS Typography where one fits; use this
|
|
21
|
+
* where the app itself sets the size in CSS (the column card's date row is a
|
|
22
|
+
* plain `div` in `view.project_tasks_column_mode.less`, not a Typography).
|
|
23
|
+
*/
|
|
24
|
+
export declare const CARD_FONT = "-apple-system, BlinkMacSystemFont, \"Roboto\",\n \"Helvetica Neue\", Arial, sans-serif";
|
|
16
25
|
/**
|
|
17
26
|
* The design system ships one default cover ratio
|
|
18
27
|
* (`STACKED_CARD_COVER_RATIO`). How tall a cover reads is a decision of the
|
|
@@ -37,6 +46,27 @@ export declare const coverManagement: ({ removeLabel, onCollapse, onRemove, }?:
|
|
|
37
46
|
export declare const EntityDots: (props: React.ButtonHTMLAttributes<HTMLButtonElement>) => ReactElement;
|
|
38
47
|
/** Two-line title clamp — the card's name row content. */
|
|
39
48
|
export declare const StyledClamp: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<import("../../..").IBodyProps & Omit<import("../../../components/Typography/Typography").ITypographyProps, "variant" | "weight"> & React.RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
49
|
+
/**
|
|
50
|
+
* The title block — everything the title row stacks to the LEFT of the "…"
|
|
51
|
+
* menu. A card that only has a title puts the clamp straight in the row; a card
|
|
52
|
+
* that puts a line above or below it (the project a task belongs to, the client
|
|
53
|
+
* a project is for) stacks them here so the row keeps its two-child shape:
|
|
54
|
+
* text block, then the fixed-width menu.
|
|
55
|
+
*/
|
|
56
|
+
export declare const StyledTitleBlock: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
57
|
+
/**
|
|
58
|
+
* The project a card's entity lives in, above the title.
|
|
59
|
+
*
|
|
60
|
+
* On a canvas a task card has lost the column that used to say which project it
|
|
61
|
+
* came from, so the card says it itself. One line, one treatment, shared by
|
|
62
|
+
* every content type that can carry it (the whiteboard's own task face already
|
|
63
|
+
* wrote it this way: `Caption 2` tertiary, tight above the title, ellipsis on
|
|
64
|
+
* overflow — a project name is a reference, never a second title).
|
|
65
|
+
*/
|
|
66
|
+
export declare const StyledProjectLine: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<import("../../..").ICaptionProps & Omit<import("../../../components/Typography/Typography").ITypographyProps, "variant" | "weight"> & React.RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
67
|
+
export declare const CardProjectLine: ({ children, }: {
|
|
68
|
+
children: ReactNode;
|
|
69
|
+
}) => ReactElement;
|
|
40
70
|
/** A favicon square — a solid data colour stands in for the real favicon. */
|
|
41
71
|
export declare const StyledFavicon: import("styled-components").StyledComponent<"span", any, {
|
|
42
72
|
$bg: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/stackedCard/content/shared.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAevD;;;;;;;;;;;;;GAaG;AAMH;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,cAAc,CAAC;AAC5C,eAAO,MAAM,iBAAiB,cAA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CAAC;AAC7C,eAAO,MAAM,kBAAkB,cAAc,CAAC;AAM9C,yEAAyE;AACzE,eAAO,MAAM,WAAW,mBAIvB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAI,yCAI7B;IACD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CAClB,KAAG,YASR,CAAC;AA8BF,eAAO,MAAM,UAAU,GACrB,OAAO,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,KACnD,YAUF,CAAC;AAMF,0DAA0D;AAC1D,eAAO,MAAM,WAAW,sQAKvB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,oEAI5B,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,yQAM7B,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,eAE7B;IACD,QAAQ,EAAE,SAAS,CAAC;CACrB,KAAG,YAIH,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,aAAa;SAAsB,MAAM;SAOrD,CAAC;AAEF,gEAAgE;AAChE,eAAO,MAAM,UAAU,qEAStB,CAAC;AAEF,oFAAoF;AACpF,eAAO,MAAM,gBAAgB;YAAwB,MAAM;SAI1D,CAAC;AA6CF;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,0CAMzB;IACD,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,GAAG,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,KAAG,YAOnD,CAAC"}
|
|
@@ -5,7 +5,7 @@ import React from "react";
|
|
|
5
5
|
import styled, { css } from "styled-components";
|
|
6
6
|
import { PlayIcon, TreeDotsIcon } from "../../../components/Icons";
|
|
7
7
|
import { STACKED_CARD_CONTROL_CLASS, StackedCardCollapseGlyph as CollapseGlyph, StackedCardCoverButton as CoverButton, StackedCardPlayBadge as PlayBadge, StackedCardRemoveCoverGlyph as RemoveCoverGlyph } from "../../../components/StackedCard";
|
|
8
|
-
import { Body2 } from "../../../components/Typography";
|
|
8
|
+
import { Body2, Caption2 } from "../../../components/Typography";
|
|
9
9
|
import { Typography } from "../../../components/Typography/Typography";
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -23,6 +23,20 @@ import { Typography } from "../../../components/Typography/Typography";
|
|
|
23
23
|
* the same words.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
+
/* ------------------------------------------------------------------ */
|
|
27
|
+
/* The font stack for raw text */
|
|
28
|
+
/* ------------------------------------------------------------------ */
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* There is no global CSS reset in this Storybook, so a raw element (a `<span>`
|
|
32
|
+
* holding a date, a `<button>` holding a word) falls back to the browser default
|
|
33
|
+
* — a SERIF face at the UA's own size. Anything that is not a DS `Typography`
|
|
34
|
+
* has to name the font itself. Use a DS Typography where one fits; use this
|
|
35
|
+
* where the app itself sets the size in CSS (the column card's date row is a
|
|
36
|
+
* plain `div` in `view.project_tasks_column_mode.less`, not a Typography).
|
|
37
|
+
*/
|
|
38
|
+
export const CARD_FONT = "-apple-system, BlinkMacSystemFont, \"Roboto\",\n \"Helvetica Neue\", Arial, sans-serif";
|
|
39
|
+
|
|
26
40
|
/* ------------------------------------------------------------------ */
|
|
27
41
|
/* Per-type cover ratios */
|
|
28
42
|
/* ------------------------------------------------------------------ */
|
|
@@ -91,27 +105,60 @@ export const StyledClamp = styled(Body2).withConfig({
|
|
|
91
105
|
componentId: "sc-1x5md9a-1"
|
|
92
106
|
})(["display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;"]);
|
|
93
107
|
|
|
108
|
+
/**
|
|
109
|
+
* The title block — everything the title row stacks to the LEFT of the "…"
|
|
110
|
+
* menu. A card that only has a title puts the clamp straight in the row; a card
|
|
111
|
+
* that puts a line above or below it (the project a task belongs to, the client
|
|
112
|
+
* a project is for) stacks them here so the row keeps its two-child shape:
|
|
113
|
+
* text block, then the fixed-width menu.
|
|
114
|
+
*/
|
|
115
|
+
export const StyledTitleBlock = styled.div.withConfig({
|
|
116
|
+
displayName: "shared__StyledTitleBlock",
|
|
117
|
+
componentId: "sc-1x5md9a-2"
|
|
118
|
+
})(["display:flex;flex-direction:column;min-width:0;"]);
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* The project a card's entity lives in, above the title.
|
|
122
|
+
*
|
|
123
|
+
* On a canvas a task card has lost the column that used to say which project it
|
|
124
|
+
* came from, so the card says it itself. One line, one treatment, shared by
|
|
125
|
+
* every content type that can carry it (the whiteboard's own task face already
|
|
126
|
+
* wrote it this way: `Caption 2` tertiary, tight above the title, ellipsis on
|
|
127
|
+
* overflow — a project name is a reference, never a second title).
|
|
128
|
+
*/
|
|
129
|
+
export const StyledProjectLine = styled(Caption2).withConfig({
|
|
130
|
+
displayName: "shared__StyledProjectLine",
|
|
131
|
+
componentId: "sc-1x5md9a-3"
|
|
132
|
+
})(["display:block;margin-bottom:2px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"]);
|
|
133
|
+
export const CardProjectLine = _ref2 => {
|
|
134
|
+
let children = _ref2.children;
|
|
135
|
+
return /*#__PURE__*/React.createElement(StyledProjectLine, {
|
|
136
|
+
color: "tertiary",
|
|
137
|
+
className: "sc-project"
|
|
138
|
+
}, children);
|
|
139
|
+
};
|
|
140
|
+
|
|
94
141
|
/** A favicon square — a solid data colour stands in for the real favicon. */
|
|
95
142
|
export const StyledFavicon = styled.span.withConfig({
|
|
96
143
|
displayName: "shared__StyledFavicon",
|
|
97
|
-
componentId: "sc-1x5md9a-
|
|
98
|
-
})(["display:inline-flex;width:16px;height:16px;border-radius:4px;background:", ";flex-shrink:0;"],
|
|
99
|
-
let $bg =
|
|
144
|
+
componentId: "sc-1x5md9a-4"
|
|
145
|
+
})(["display:inline-flex;width:16px;height:16px;border-radius:4px;background:", ";flex-shrink:0;"], _ref3 => {
|
|
146
|
+
let $bg = _ref3.$bg;
|
|
100
147
|
return $bg;
|
|
101
148
|
});
|
|
102
149
|
|
|
103
150
|
/** A small pill for link metadata (media kind, duration, …). */
|
|
104
151
|
export const StyledChip = styled.span.withConfig({
|
|
105
152
|
displayName: "shared__StyledChip",
|
|
106
|
-
componentId: "sc-1x5md9a-
|
|
153
|
+
componentId: "sc-1x5md9a-5"
|
|
107
154
|
})(["display:inline-flex;align-items:center;padding:2px 8px;border-radius:10px;background:var(--color-theme-300);color:var(--color-theme-800);font-size:11px;white-space:nowrap;"]);
|
|
108
155
|
|
|
109
156
|
/** A solid-colour cover fill (swatch value, generic link cover, image stand-in). */
|
|
110
157
|
export const StyledColorCover = styled.div.withConfig({
|
|
111
158
|
displayName: "shared__StyledColorCover",
|
|
112
|
-
componentId: "sc-1x5md9a-
|
|
113
|
-
})(["width:100%;height:100%;background:", ";"],
|
|
114
|
-
let $color =
|
|
159
|
+
componentId: "sc-1x5md9a-6"
|
|
160
|
+
})(["width:100%;height:100%;background:", ";"], _ref4 => {
|
|
161
|
+
let $color = _ref4.$color;
|
|
115
162
|
return $color;
|
|
116
163
|
});
|
|
117
164
|
|
|
@@ -121,12 +168,12 @@ export const StyledColorCover = styled.div.withConfig({
|
|
|
121
168
|
|
|
122
169
|
const StyledPlaceholder = styled.button.withConfig({
|
|
123
170
|
displayName: "shared__StyledPlaceholder",
|
|
124
|
-
componentId: "sc-1x5md9a-
|
|
125
|
-
})(["display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;width:100%;height:", "px;padding:0;border:0;background:transparent;color:var(--color-theme-600);text-align:center;cursor:pointer;", " > svg{width:40px;height:40px;color:var(--color-theme-500);}"],
|
|
126
|
-
let $height =
|
|
171
|
+
componentId: "sc-1x5md9a-7"
|
|
172
|
+
})(["display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;width:100%;height:", "px;padding:0;border:0;background:transparent;color:var(--color-theme-600);text-align:center;cursor:pointer;", " > svg{width:40px;height:40px;color:var(--color-theme-500);}"], _ref5 => {
|
|
173
|
+
let $height = _ref5.$height;
|
|
127
174
|
return $height != null ? $height : 150;
|
|
128
|
-
},
|
|
129
|
-
let $dashed =
|
|
175
|
+
}, _ref6 => {
|
|
176
|
+
let $dashed = _ref6.$dashed;
|
|
130
177
|
return $dashed && css(["margin:8px;width:calc(100% - 16px);border:1.5px dashed var(--color-theme-400);border-radius:6px;&:hover{border-color:var(--sc-selection-ring);color:var(--color-theme-700);}"]);
|
|
131
178
|
});
|
|
132
179
|
|
|
@@ -135,12 +182,12 @@ const StyledPlaceholder = styled.button.withConfig({
|
|
|
135
182
|
* sentence-case invitation (ActiveCollab voice). Interactive by design — the
|
|
136
183
|
* whole frame is a button — and distinct from the loading skeleton.
|
|
137
184
|
*/
|
|
138
|
-
export const Placeholder =
|
|
139
|
-
let icon =
|
|
140
|
-
label =
|
|
141
|
-
height =
|
|
142
|
-
dashed =
|
|
143
|
-
rest = _objectWithoutPropertiesLoose(
|
|
185
|
+
export const Placeholder = _ref7 => {
|
|
186
|
+
let icon = _ref7.icon,
|
|
187
|
+
label = _ref7.label,
|
|
188
|
+
height = _ref7.height,
|
|
189
|
+
dashed = _ref7.dashed,
|
|
190
|
+
rest = _objectWithoutPropertiesLoose(_ref7, _excluded);
|
|
144
191
|
return /*#__PURE__*/React.createElement(StyledPlaceholder, _extends({
|
|
145
192
|
type: "button",
|
|
146
193
|
$height: height,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.js","names":["React","styled","css","PlayIcon","TreeDotsIcon","STACKED_CARD_CONTROL_CLASS","StackedCardCollapseGlyph","CollapseGlyph","StackedCardCoverButton","CoverButton","StackedCardPlayBadge","PlayBadge","StackedCardRemoveCoverGlyph","RemoveCoverGlyph","Body2","Typography","COVER_RATIO_HERO","COVER_RATIO_IMAGE","COVER_RATIO_SWATCH","playControl","createElement","coverManagement","_temp","_ref","_ref$removeLabel","removeLabel","onCollapse","onRemove","Fragment","type","onClick","StyledEntityDots","button","withConfig","displayName","componentId","EntityDots","props","_extends","className","StyledClamp","StyledFavicon","span","_ref2","$bg","StyledChip","StyledColorCover","div","_ref3","$color","StyledPlaceholder","_ref4","$height","_ref5","$dashed","Placeholder","_ref6","icon","label","height","dashed","rest","_objectWithoutPropertiesLoose","_excluded","as","variant","color"],"sources":["../../../../../src/presentation/stackedCard/content/shared.tsx"],"sourcesContent":["import React, { ReactElement, ReactNode } from \"react\";\n\nimport styled, { css } from \"styled-components\";\n\nimport { PlayIcon, TreeDotsIcon } from \"../../../components/Icons\";\nimport {\n STACKED_CARD_CONTROL_CLASS,\n StackedCardCollapseGlyph as CollapseGlyph,\n StackedCardCoverButton as CoverButton,\n StackedCardPlayBadge as PlayBadge,\n StackedCardRemoveCoverGlyph as RemoveCoverGlyph,\n} from \"../../../components/StackedCard\";\nimport { Body2 } from \"../../../components/Typography\";\nimport { Typography } from \"../../../components/Typography/Typography\";\n\n/**\n * Content-level chrome shared by the typed StackedCard components.\n *\n * These live OUTSIDE the shell on purpose. The shell is hollow; the \"…\" entity\n * menu, the cover-management controls, the clamp, the favicon, the chips and\n * the placeholder frame are content concerns, so they belong here where the\n * typed cards (TaskCard, LinkCard, …) compose them.\n *\n * The card itself — the shell, the Stack/StackRow/Cover primitives and the\n * cover chrome — is the shipped design-system component,\n * `components/StackedCard`. These stories import it under the concept\n * vocabulary (Cover, StackRow, …) so the spec prose and the code keep using\n * the same words.\n */\n\n/* ------------------------------------------------------------------ */\n/* Per-type cover ratios */\n/* ------------------------------------------------------------------ */\n\n/**\n * The design system ships one default cover ratio\n * (`STACKED_CARD_COVER_RATIO`). How tall a cover reads is a decision of the\n * content type, so the variants live here with the content: a link hero, a\n * full-bleed image, a colour swatch band.\n */\nexport const COVER_RATIO_HERO = \"320 / 190\";\nexport const COVER_RATIO_IMAGE = \"260 / 168\";\nexport const COVER_RATIO_SWATCH = \"260 / 104\";\n\n/* ------------------------------------------------------------------ */\n/* Cover chrome — media control + cover management */\n/* ------------------------------------------------------------------ */\n\n/** Centered media control (play), for a cover that wraps audio/video. */\nexport const playControl = (\n <PlayBadge>\n <PlayIcon />\n </PlayBadge>\n);\n\n/**\n * Top-right cover management. Acts on the COVER (collapse it, remove it) — not\n * on the entity. Callers wire the click handlers; the default is inert chrome\n * for the static demos.\n */\nexport const coverManagement = ({\n removeLabel = \"Remove cover\",\n onCollapse,\n onRemove,\n}: {\n removeLabel?: string;\n onCollapse?: () => void;\n onRemove?: () => void;\n} = {}): ReactElement => (\n <>\n <CoverButton type=\"button\" aria-label=\"Collapse cover\" onClick={onCollapse}>\n <CollapseGlyph />\n </CoverButton>\n <CoverButton type=\"button\" aria-label={removeLabel} onClick={onRemove}>\n <RemoveCoverGlyph />\n </CoverButton>\n </>\n);\n\n/* ------------------------------------------------------------------ */\n/* Entity \"…\" menu — acts on the ENTITY, lives in a content row */\n/* ------------------------------------------------------------------ */\n\nconst StyledEntityDots = styled.button`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 26px;\n height: 26px;\n padding: 0;\n border: 0;\n border-radius: 6px;\n cursor: pointer;\n color: var(--color-theme-700);\n background: var(--color-theme-200);\n\n svg {\n width: 16px;\n height: 16px;\n display: block;\n }\n\n &:hover {\n background: var(--color-theme-300);\n }\n`;\n\nexport const EntityDots = (\n props: React.ButtonHTMLAttributes<HTMLButtonElement>\n): ReactElement => (\n <StyledEntityDots\n type=\"button\"\n aria-label=\"Options\"\n data-fixed\n className={STACKED_CARD_CONTROL_CLASS}\n {...props}\n >\n <TreeDotsIcon />\n </StyledEntityDots>\n);\n\n/* ------------------------------------------------------------------ */\n/* Text + inline bits */\n/* ------------------------------------------------------------------ */\n\n/** Two-line title clamp — the card's name row content. */\nexport const StyledClamp = styled(Body2)`\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n`;\n\n/** A favicon square — a solid data colour stands in for the real favicon. */\nexport const StyledFavicon = styled.span<{ $bg: string }>`\n display: inline-flex;\n width: 16px;\n height: 16px;\n border-radius: 4px;\n background: ${({ $bg }) => $bg};\n flex-shrink: 0;\n`;\n\n/** A small pill for link metadata (media kind, duration, …). */\nexport const StyledChip = styled.span`\n display: inline-flex;\n align-items: center;\n padding: 2px 8px;\n border-radius: 10px;\n background: var(--color-theme-300);\n color: var(--color-theme-800);\n font-size: 11px;\n white-space: nowrap;\n`;\n\n/** A solid-colour cover fill (swatch value, generic link cover, image stand-in). */\nexport const StyledColorCover = styled.div<{ $color: string }>`\n width: 100%;\n height: 100%;\n background: ${({ $color }) => $color};\n`;\n\n/* ------------------------------------------------------------------ */\n/* Placeholder frame — the interactive empty state, per type */\n/* ------------------------------------------------------------------ */\n\nconst StyledPlaceholder = styled.button<{\n $height?: number;\n $dashed?: boolean;\n}>`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 10px;\n width: 100%;\n height: ${({ $height }) => $height ?? 150}px;\n padding: 0;\n border: 0;\n background: transparent;\n color: var(--color-theme-600);\n text-align: center;\n cursor: pointer;\n\n ${({ $dashed }) =>\n $dashed &&\n css`\n margin: 8px;\n width: calc(100% - 16px);\n border: 1.5px dashed var(--color-theme-400);\n border-radius: 6px;\n\n &:hover {\n border-color: var(--sc-selection-ring);\n color: var(--color-theme-700);\n }\n `}\n\n > svg {\n width: 40px;\n height: 40px;\n color: var(--color-theme-500);\n }\n`;\n\n/**\n * The shared placeholder frame. Each type supplies its own icon and verb-first,\n * sentence-case invitation (ActiveCollab voice). Interactive by design — the\n * whole frame is a button — and distinct from the loading skeleton.\n */\nexport const Placeholder = ({\n icon,\n label,\n height,\n dashed,\n ...rest\n}: {\n icon: ReactNode;\n label: ReactNode;\n height?: number;\n dashed?: boolean;\n} & React.ButtonHTMLAttributes<HTMLButtonElement>): ReactElement => (\n <StyledPlaceholder type=\"button\" $height={height} $dashed={dashed} {...rest}>\n {icon}\n <Typography as=\"span\" variant=\"Body 2\" color=\"secondary\">\n {label}\n </Typography>\n </StyledPlaceholder>\n);\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAmC,OAAO;AAEtD,OAAOC,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAE/C,SAASC,QAAQ,EAAEC,YAAY,QAAQ,2BAA2B;AAClE,SACEC,0BAA0B,EAC1BC,wBAAwB,IAAIC,aAAa,EACzCC,sBAAsB,IAAIC,WAAW,EACrCC,oBAAoB,IAAIC,SAAS,EACjCC,2BAA2B,IAAIC,gBAAgB,QAC1C,iCAAiC;AACxC,SAASC,KAAK,QAAQ,gCAAgC;AACtD,SAASC,UAAU,QAAQ,2CAA2C;;AAEtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,gBAAgB,GAAG,WAAW;AAC3C,OAAO,MAAMC,iBAAiB,GAAG,WAAW;AAC5C,OAAO,MAAMC,kBAAkB,GAAG,WAAW;;AAE7C;AACA;AACA;;AAEA;AACA,OAAO,MAAMC,WAAW,gBACtBnB,KAAA,CAAAoB,aAAA,CAACT,SAAS,qBACRX,KAAA,CAAAoB,aAAA,CAACjB,QAAQ,MAAE,CACF,CACZ;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMkB,eAAe,GAAG,SAAAA,CAAAC,KAAA;EAAA,IAAAC,IAAA,GAAAD,KAAA,cAQ3B,CAAC,CAAC,GAAAA,KAAA;IAAAE,gBAAA,GAAAD,IAAA,CAPJE,WAAW;IAAXA,WAAW,GAAAD,gBAAA,cAAG,cAAc,GAAAA,gBAAA;IAC5BE,UAAU,GAAAH,IAAA,CAAVG,UAAU;IACVC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;EAAA,oBAMR3B,KAAA,CAAAoB,aAAA,CAAApB,KAAA,CAAA4B,QAAA,qBACE5B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GAAG,CAAAd,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,gDAG1Ba,KAAA;EAAA,IAAGC,MAAM,GAAAD,KAAA,CAANC,MAAM;EAAA,OAAOA,MAAM;AAAA,EACrC;;AAED;AACA;AACA;;AAEA,MAAMC,iBAAiB,GAAGjD,MAAM,CAAC+B,MAAM,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,gSAU3BgB,KAAA;EAAA,IAAGC,OAAO,GAAAD,KAAA,CAAPC,OAAO;EAAA,OAAOA,OAAO,WAAPA,OAAO,GAAI,GAAG;AAAA,GAQvCC,KAAA;EAAA,IAAGC,OAAO,GAAAD,KAAA,CAAPC,OAAO;EAAA,OACVA,OAAO,IACPpD,GAAG,kLAUF;AAAA,EAOJ;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMqD,WAAW,GAAGC,KAAA;EAAA,IACzBC,IAAI,GAAAD,KAAA,CAAJC,IAAI;IACJC,KAAK,GAAAF,KAAA,CAALE,KAAK;IACLC,MAAM,GAAAH,KAAA,CAANG,MAAM;IACNC,MAAM,GAAAJ,KAAA,CAANI,MAAM;IACHC,IAAI,GAAAC,6BAAA,CAAAN,KAAA,EAAAO,SAAA;EAAA,oBAOP/D,KAAA,CAAAoB,aAAA,CAAC8B,iBAAiB,EAAAZ,QAAA;IAACT,IAAI,EAAC,QAAQ;IAACuB,OAAO,EAAEO,MAAO;IAACL,OAAO,EAAEM;EAAO,GAAKC,IAAI,GACxEJ,IAAI,eACLzD,KAAA,CAAAoB,aAAA,CAACL,UAAU;IAACiD,EAAE,EAAC,MAAM;IAACC,OAAO,EAAC,QAAQ;IAACC,KAAK,EAAC;EAAW,GACrDR,KACS,CACK,CAAC;AAAA,CACrB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"shared.js","names":["React","styled","css","PlayIcon","TreeDotsIcon","STACKED_CARD_CONTROL_CLASS","StackedCardCollapseGlyph","CollapseGlyph","StackedCardCoverButton","CoverButton","StackedCardPlayBadge","PlayBadge","StackedCardRemoveCoverGlyph","RemoveCoverGlyph","Body2","Caption2","Typography","CARD_FONT","COVER_RATIO_HERO","COVER_RATIO_IMAGE","COVER_RATIO_SWATCH","playControl","createElement","coverManagement","_temp","_ref","_ref$removeLabel","removeLabel","onCollapse","onRemove","Fragment","type","onClick","StyledEntityDots","button","withConfig","displayName","componentId","EntityDots","props","_extends","className","StyledClamp","StyledTitleBlock","div","StyledProjectLine","CardProjectLine","_ref2","children","color","StyledFavicon","span","_ref3","$bg","StyledChip","StyledColorCover","_ref4","$color","StyledPlaceholder","_ref5","$height","_ref6","$dashed","Placeholder","_ref7","icon","label","height","dashed","rest","_objectWithoutPropertiesLoose","_excluded","as","variant"],"sources":["../../../../../src/presentation/stackedCard/content/shared.tsx"],"sourcesContent":["import React, { ReactElement, ReactNode } from \"react\";\n\nimport styled, { css } from \"styled-components\";\n\nimport { PlayIcon, TreeDotsIcon } from \"../../../components/Icons\";\nimport {\n STACKED_CARD_CONTROL_CLASS,\n StackedCardCollapseGlyph as CollapseGlyph,\n StackedCardCoverButton as CoverButton,\n StackedCardPlayBadge as PlayBadge,\n StackedCardRemoveCoverGlyph as RemoveCoverGlyph,\n} from \"../../../components/StackedCard\";\nimport { Body2, Caption2 } from \"../../../components/Typography\";\nimport { Typography } from \"../../../components/Typography/Typography\";\n\n/**\n * Content-level chrome shared by the typed StackedCard components.\n *\n * These live OUTSIDE the shell on purpose. The shell is hollow; the \"…\" entity\n * menu, the cover-management controls, the clamp, the favicon, the chips and\n * the placeholder frame are content concerns, so they belong here where the\n * typed cards (TaskCard, LinkCard, …) compose them.\n *\n * The card itself — the shell, the Stack/StackRow/Cover primitives and the\n * cover chrome — is the shipped design-system component,\n * `components/StackedCard`. These stories import it under the concept\n * vocabulary (Cover, StackRow, …) so the spec prose and the code keep using\n * the same words.\n */\n\n/* ------------------------------------------------------------------ */\n/* The font stack for raw text */\n/* ------------------------------------------------------------------ */\n\n/**\n * There is no global CSS reset in this Storybook, so a raw element (a `<span>`\n * holding a date, a `<button>` holding a word) falls back to the browser default\n * — a SERIF face at the UA's own size. Anything that is not a DS `Typography`\n * has to name the font itself. Use a DS Typography where one fits; use this\n * where the app itself sets the size in CSS (the column card's date row is a\n * plain `div` in `view.project_tasks_column_mode.less`, not a Typography).\n */\nexport const CARD_FONT = `-apple-system, BlinkMacSystemFont, \"Roboto\",\n \"Helvetica Neue\", Arial, sans-serif`;\n\n/* ------------------------------------------------------------------ */\n/* Per-type cover ratios */\n/* ------------------------------------------------------------------ */\n\n/**\n * The design system ships one default cover ratio\n * (`STACKED_CARD_COVER_RATIO`). How tall a cover reads is a decision of the\n * content type, so the variants live here with the content: a link hero, a\n * full-bleed image, a colour swatch band.\n */\nexport const COVER_RATIO_HERO = \"320 / 190\";\nexport const COVER_RATIO_IMAGE = \"260 / 168\";\nexport const COVER_RATIO_SWATCH = \"260 / 104\";\n\n/* ------------------------------------------------------------------ */\n/* Cover chrome — media control + cover management */\n/* ------------------------------------------------------------------ */\n\n/** Centered media control (play), for a cover that wraps audio/video. */\nexport const playControl = (\n <PlayBadge>\n <PlayIcon />\n </PlayBadge>\n);\n\n/**\n * Top-right cover management. Acts on the COVER (collapse it, remove it) — not\n * on the entity. Callers wire the click handlers; the default is inert chrome\n * for the static demos.\n */\nexport const coverManagement = ({\n removeLabel = \"Remove cover\",\n onCollapse,\n onRemove,\n}: {\n removeLabel?: string;\n onCollapse?: () => void;\n onRemove?: () => void;\n} = {}): ReactElement => (\n <>\n <CoverButton type=\"button\" aria-label=\"Collapse cover\" onClick={onCollapse}>\n <CollapseGlyph />\n </CoverButton>\n <CoverButton type=\"button\" aria-label={removeLabel} onClick={onRemove}>\n <RemoveCoverGlyph />\n </CoverButton>\n </>\n);\n\n/* ------------------------------------------------------------------ */\n/* Entity \"…\" menu — acts on the ENTITY, lives in a content row */\n/* ------------------------------------------------------------------ */\n\nconst StyledEntityDots = styled.button`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 26px;\n height: 26px;\n padding: 0;\n border: 0;\n border-radius: 6px;\n cursor: pointer;\n color: var(--color-theme-700);\n background: var(--color-theme-200);\n\n svg {\n width: 16px;\n height: 16px;\n display: block;\n }\n\n &:hover {\n background: var(--color-theme-300);\n }\n`;\n\nexport const EntityDots = (\n props: React.ButtonHTMLAttributes<HTMLButtonElement>\n): ReactElement => (\n <StyledEntityDots\n type=\"button\"\n aria-label=\"Options\"\n data-fixed\n className={STACKED_CARD_CONTROL_CLASS}\n {...props}\n >\n <TreeDotsIcon />\n </StyledEntityDots>\n);\n\n/* ------------------------------------------------------------------ */\n/* Text + inline bits */\n/* ------------------------------------------------------------------ */\n\n/** Two-line title clamp — the card's name row content. */\nexport const StyledClamp = styled(Body2)`\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n`;\n\n/**\n * The title block — everything the title row stacks to the LEFT of the \"…\"\n * menu. A card that only has a title puts the clamp straight in the row; a card\n * that puts a line above or below it (the project a task belongs to, the client\n * a project is for) stacks them here so the row keeps its two-child shape:\n * text block, then the fixed-width menu.\n */\nexport const StyledTitleBlock = styled.div`\n display: flex;\n flex-direction: column;\n min-width: 0;\n`;\n\n/**\n * The project a card's entity lives in, above the title.\n *\n * On a canvas a task card has lost the column that used to say which project it\n * came from, so the card says it itself. One line, one treatment, shared by\n * every content type that can carry it (the whiteboard's own task face already\n * wrote it this way: `Caption 2` tertiary, tight above the title, ellipsis on\n * overflow — a project name is a reference, never a second title).\n */\nexport const StyledProjectLine = styled(Caption2)`\n display: block;\n margin-bottom: 2px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n`;\n\nexport const CardProjectLine = ({\n children,\n}: {\n children: ReactNode;\n}): ReactElement => (\n <StyledProjectLine color=\"tertiary\" className=\"sc-project\">\n {children}\n </StyledProjectLine>\n);\n\n/** A favicon square — a solid data colour stands in for the real favicon. */\nexport const StyledFavicon = styled.span<{ $bg: string }>`\n display: inline-flex;\n width: 16px;\n height: 16px;\n border-radius: 4px;\n background: ${({ $bg }) => $bg};\n flex-shrink: 0;\n`;\n\n/** A small pill for link metadata (media kind, duration, …). */\nexport const StyledChip = styled.span`\n display: inline-flex;\n align-items: center;\n padding: 2px 8px;\n border-radius: 10px;\n background: var(--color-theme-300);\n color: var(--color-theme-800);\n font-size: 11px;\n white-space: nowrap;\n`;\n\n/** A solid-colour cover fill (swatch value, generic link cover, image stand-in). */\nexport const StyledColorCover = styled.div<{ $color: string }>`\n width: 100%;\n height: 100%;\n background: ${({ $color }) => $color};\n`;\n\n/* ------------------------------------------------------------------ */\n/* Placeholder frame — the interactive empty state, per type */\n/* ------------------------------------------------------------------ */\n\nconst StyledPlaceholder = styled.button<{\n $height?: number;\n $dashed?: boolean;\n}>`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 10px;\n width: 100%;\n height: ${({ $height }) => $height ?? 150}px;\n padding: 0;\n border: 0;\n background: transparent;\n color: var(--color-theme-600);\n text-align: center;\n cursor: pointer;\n\n ${({ $dashed }) =>\n $dashed &&\n css`\n margin: 8px;\n width: calc(100% - 16px);\n border: 1.5px dashed var(--color-theme-400);\n border-radius: 6px;\n\n &:hover {\n border-color: var(--sc-selection-ring);\n color: var(--color-theme-700);\n }\n `}\n\n > svg {\n width: 40px;\n height: 40px;\n color: var(--color-theme-500);\n }\n`;\n\n/**\n * The shared placeholder frame. Each type supplies its own icon and verb-first,\n * sentence-case invitation (ActiveCollab voice). Interactive by design — the\n * whole frame is a button — and distinct from the loading skeleton.\n */\nexport const Placeholder = ({\n icon,\n label,\n height,\n dashed,\n ...rest\n}: {\n icon: ReactNode;\n label: ReactNode;\n height?: number;\n dashed?: boolean;\n} & React.ButtonHTMLAttributes<HTMLButtonElement>): ReactElement => (\n <StyledPlaceholder type=\"button\" $height={height} $dashed={dashed} {...rest}>\n {icon}\n <Typography as=\"span\" variant=\"Body 2\" color=\"secondary\">\n {label}\n </Typography>\n </StyledPlaceholder>\n);\n"],"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CAANI,MAAM;IACHC,IAAI,GAAAC,6BAAA,CAAAN,KAAA,EAAAO,SAAA;EAAA,oBAOPvE,KAAA,CAAAsB,aAAA,CAACoC,iBAAiB,EAAAlB,QAAA;IAACT,IAAI,EAAC,QAAQ;IAAC6B,OAAO,EAAEO,MAAO;IAACL,OAAO,EAAEM;EAAO,GAAKC,IAAI,GACxEJ,IAAI,eACLjE,KAAA,CAAAsB,aAAA,CAACN,UAAU;IAACwD,EAAE,EAAC,MAAM;IAACC,OAAO,EAAC,QAAQ;IAACxB,KAAK,EAAC;EAAW,GACrDiB,KACS,CACK,CAAC;AAAA,CACrB","ignoreList":[]}
|
|
@@ -2,31 +2,54 @@ import React, { ReactElement, ReactNode } from "react";
|
|
|
2
2
|
export declare const ToolSurface: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
3
|
export declare const verticalDivider = "\n .divider {\n width: 1px;\n height: 24px;\n background-color: var(--color-theme-400);\n margin: 0 6px;\n flex-shrink: 0;\n }\n";
|
|
4
4
|
export declare const StyledBottomDock: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* The floating second toolbar row — a small pill above the dock that holds the
|
|
7
|
+
* members of one tool family (Circle / Rectangle / Triangle, or Task / Project).
|
|
8
|
+
*
|
|
9
|
+
* It is the same surface as the dock itself, so a family reads as an extension
|
|
10
|
+
* of the button that opened it rather than as a different kind of UI. Only one
|
|
11
|
+
* pill is ever up, because only one tool is ever armed.
|
|
12
|
+
*/
|
|
13
|
+
export declare const StyledToolPill: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
14
|
export declare const StyledHint: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<import("../..").ICaptionProps & Omit<import("../../components/Typography/Typography").ITypographyProps, "variant" | "weight"> & React.RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
7
15
|
export declare const TOOL_HINTS: {
|
|
8
16
|
readonly circle: "Click to drop a default circle, or draw one to size. Press O for a circle.";
|
|
9
17
|
readonly roundedRectangle: "Click to drop a default rectangle, or draw one to size. Press R for a rectangle.";
|
|
10
18
|
readonly triangle: "Click to drop a default triangle, or draw one to size. Press Y for a triangle.";
|
|
11
19
|
readonly connector: "Drag from one element to another to connect them. Press C to connect.";
|
|
20
|
+
readonly projectElements: "Put a task or a project on the board — pick which above, then draw its card.";
|
|
21
|
+
readonly project: "Draw a box to place a project card, then pick the project it shows.";
|
|
22
|
+
readonly task: "Draw a box to place a task card, then pick the task it shows.";
|
|
12
23
|
readonly link: "Draw a box to place a link, or paste a URL anywhere. Press L for link.";
|
|
13
24
|
readonly file: "Draw a box to place a file, or drop one on the board. Press F for file.";
|
|
14
25
|
readonly sticky: "Click anywhere on the canvas to drop a sticky note. Press S for a sticky note.";
|
|
15
26
|
readonly text: "Click anywhere on the canvas to start typing. Press T for text.";
|
|
16
27
|
readonly draw: "Click and drag to draw freehand. Press D for the pen.";
|
|
17
|
-
readonly shapes: "
|
|
28
|
+
readonly shapes: "Pick a shape above, then draw it on the board. Press R for a rectangle.";
|
|
18
29
|
};
|
|
19
30
|
export type ToolHintKey = keyof typeof TOOL_HINTS;
|
|
20
31
|
export type ShapeTool = "circle" | "roundedRectangle" | "triangle";
|
|
21
32
|
/**
|
|
22
|
-
* The armed board tool. Link, File and the three shapes are
|
|
23
|
-
* turns the next canvas click into "drop the default-size
|
|
24
|
-
* drag into "draw one this big"; everything else stays a
|
|
25
|
-
* otherwise always in select mode.
|
|
33
|
+
* The armed board tool. Link, File, Project, Task and the three shapes are
|
|
34
|
+
* wired — arming one turns the next canvas click into "drop the default-size
|
|
35
|
+
* element here" and a drag into "draw one this big"; everything else stays a
|
|
36
|
+
* mock, so the board is otherwise always in select mode.
|
|
26
37
|
*/
|
|
27
|
-
export type BoardTool = "select" | "link" | "file" | ShapeTool;
|
|
38
|
+
export type BoardTool = "select" | "link" | "file" | "project" | "task" | ShapeTool;
|
|
28
39
|
export declare const SHAPE_TOOLS: readonly ShapeTool[];
|
|
29
40
|
export declare const isShapeTool: (tool: BoardTool) => tool is ShapeTool;
|
|
41
|
+
/**
|
|
42
|
+
* What a dock button arms the instant its pill opens.
|
|
43
|
+
*
|
|
44
|
+
* Opening a family and choosing inside it are two separate decisions, and the
|
|
45
|
+
* second one has a right answer often enough that asking for it every time is
|
|
46
|
+
* just a toll: a shape is usually a rectangle, and the thing people put on a
|
|
47
|
+
* board is usually a task. So the pill opens with that member already armed and
|
|
48
|
+
* the gesture can start immediately — picking another member is a correction,
|
|
49
|
+
* not a required step.
|
|
50
|
+
*/
|
|
51
|
+
export declare const DEFAULT_SHAPE_TOOL: ShapeTool;
|
|
52
|
+
export declare const DEFAULT_PROJECT_ELEMENT_TOOL: BoardTool;
|
|
30
53
|
export declare const SHAPE_DEFAULT_SIZES: Record<ShapeTool, {
|
|
31
54
|
width: number;
|
|
32
55
|
height: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bottomDock.d.ts","sourceRoot":"","sources":["../../../../src/presentation/whiteboard/bottomDock.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,YAAY,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"bottomDock.d.ts","sourceRoot":"","sources":["../../../../src/presentation/whiteboard/bottomDock.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,YAAY,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AA4BjE,eAAO,MAAM,WAAW,oEA2BvB,CAAC;AAGF,eAAO,MAAM,eAAe,sJAQ3B,CAAC;AAEF,eAAO,MAAM,gBAAgB,oEAU5B,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,oEAAwB,CAAC;AAIpD,eAAO,MAAM,UAAU,mQAQtB,CAAC;AAGF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;CAsBb,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,UAAU,CAAC;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