@activecollab/components 2.0.369 → 2.0.371
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/GlobalStyle.js +1 -1
- package/dist/cjs/components/GlobalStyle.js.map +1 -1
- package/dist/cjs/components/StackedCard/Glyphs.js +86 -0
- package/dist/cjs/components/StackedCard/Glyphs.js.map +1 -0
- package/dist/cjs/components/StackedCard/Primitives.js +129 -0
- package/dist/cjs/components/StackedCard/Primitives.js.map +1 -0
- package/dist/cjs/components/StackedCard/StackedCard.js +103 -0
- package/dist/cjs/components/StackedCard/StackedCard.js.map +1 -0
- package/dist/cjs/components/StackedCard/Styles.js +192 -0
- package/dist/cjs/components/StackedCard/Styles.js.map +1 -0
- package/dist/cjs/components/StackedCard/constants.js +54 -0
- package/dist/cjs/components/StackedCard/constants.js.map +1 -0
- package/dist/cjs/components/StackedCard/index.js +50 -0
- package/dist/cjs/components/StackedCard/index.js.map +1 -0
- package/dist/cjs/components/StepSequence/Styles.js +1 -1
- package/dist/cjs/components/StepSequence/Styles.js.map +1 -1
- package/dist/cjs/components/index.js +11 -0
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/presentation/stackedCard/content/ImageCard.js +5 -6
- package/dist/cjs/presentation/stackedCard/content/ImageCard.js.map +1 -1
- package/dist/cjs/presentation/stackedCard/content/LinkCard.js +28 -23
- package/dist/cjs/presentation/stackedCard/content/LinkCard.js.map +1 -1
- package/dist/cjs/presentation/stackedCard/content/NoteCard.js +5 -5
- package/dist/cjs/presentation/stackedCard/content/NoteCard.js.map +1 -1
- package/dist/cjs/presentation/stackedCard/content/SwatchCard.js +7 -8
- package/dist/cjs/presentation/stackedCard/content/SwatchCard.js.map +1 -1
- package/dist/cjs/presentation/stackedCard/content/TaskCard.js +9 -10
- package/dist/cjs/presentation/stackedCard/content/TaskCard.js.map +1 -1
- package/dist/cjs/presentation/stackedCard/content/shared.js +27 -7
- package/dist/cjs/presentation/stackedCard/content/shared.js.map +1 -1
- package/dist/cjs/presentation/stackedCard/storyScaffold.js +8 -6
- package/dist/cjs/presentation/stackedCard/storyScaffold.js.map +1 -1
- package/dist/esm/components/GlobalStyle.d.ts.map +1 -1
- package/dist/esm/components/GlobalStyle.js +1 -1
- package/dist/esm/components/GlobalStyle.js.map +1 -1
- package/dist/esm/components/StackedCard/Glyphs.d.ts +19 -0
- package/dist/esm/components/StackedCard/Glyphs.d.ts.map +1 -0
- package/dist/esm/components/StackedCard/Glyphs.js +72 -0
- package/dist/esm/components/StackedCard/Glyphs.js.map +1 -0
- package/dist/esm/components/StackedCard/Primitives.d.ts +91 -0
- package/dist/esm/components/StackedCard/Primitives.d.ts.map +1 -0
- package/dist/esm/components/StackedCard/Primitives.js +122 -0
- package/dist/esm/components/StackedCard/Primitives.js.map +1 -0
- package/dist/esm/components/StackedCard/StackedCard.d.ts +74 -0
- package/dist/esm/components/StackedCard/StackedCard.d.ts.map +1 -0
- package/dist/esm/components/StackedCard/StackedCard.js +95 -0
- package/dist/esm/components/StackedCard/StackedCard.js.map +1 -0
- package/dist/esm/components/StackedCard/Styles.d.ts +46 -0
- package/dist/esm/components/StackedCard/Styles.d.ts.map +1 -0
- package/dist/esm/components/StackedCard/Styles.js +186 -0
- package/dist/esm/components/StackedCard/Styles.js.map +1 -0
- package/dist/esm/components/StackedCard/constants.d.ts +37 -0
- package/dist/esm/components/StackedCard/constants.d.ts.map +1 -0
- package/dist/esm/components/StackedCard/constants.js +48 -0
- package/dist/esm/components/StackedCard/constants.js.map +1 -0
- package/dist/esm/components/StackedCard/index.d.ts +5 -0
- package/dist/esm/components/StackedCard/index.d.ts.map +1 -0
- package/dist/esm/components/StackedCard/index.js +5 -0
- package/dist/esm/components/StackedCard/index.js.map +1 -0
- package/dist/esm/components/StepSequence/Styles.js +1 -1
- package/dist/esm/components/StepSequence/Styles.js.map +1 -1
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/presentation/stackedCard/content/ImageCard.d.ts.map +1 -1
- package/dist/esm/presentation/stackedCard/content/ImageCard.js +2 -3
- package/dist/esm/presentation/stackedCard/content/ImageCard.js.map +1 -1
- package/dist/esm/presentation/stackedCard/content/LinkCard.d.ts.map +1 -1
- package/dist/esm/presentation/stackedCard/content/LinkCard.js +14 -9
- package/dist/esm/presentation/stackedCard/content/LinkCard.js.map +1 -1
- package/dist/esm/presentation/stackedCard/content/NoteCard.js +1 -1
- package/dist/esm/presentation/stackedCard/content/NoteCard.js.map +1 -1
- package/dist/esm/presentation/stackedCard/content/SwatchCard.d.ts.map +1 -1
- package/dist/esm/presentation/stackedCard/content/SwatchCard.js +2 -3
- package/dist/esm/presentation/stackedCard/content/SwatchCard.js.map +1 -1
- package/dist/esm/presentation/stackedCard/content/TaskCard.d.ts.map +1 -1
- package/dist/esm/presentation/stackedCard/content/TaskCard.js +1 -2
- package/dist/esm/presentation/stackedCard/content/TaskCard.js.map +1 -1
- package/dist/esm/presentation/stackedCard/content/shared.d.ts +15 -0
- package/dist/esm/presentation/stackedCard/content/shared.d.ts.map +1 -1
- package/dist/esm/presentation/stackedCard/content/shared.js +22 -2
- package/dist/esm/presentation/stackedCard/content/shared.js.map +1 -1
- package/dist/esm/presentation/stackedCard/storyScaffold.d.ts +8 -6
- package/dist/esm/presentation/stackedCard/storyScaffold.d.ts.map +1 -1
- package/dist/esm/presentation/stackedCard/storyScaffold.js +8 -6
- package/dist/esm/presentation/stackedCard/storyScaffold.js.map +1 -1
- package/dist/index.js +1215 -688
- 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
- package/dist/cjs/presentation/stackedCard/primitives.js +0 -254
- package/dist/cjs/presentation/stackedCard/primitives.js.map +0 -1
- package/dist/cjs/presentation/stackedCard/shell.js +0 -165
- package/dist/cjs/presentation/stackedCard/shell.js.map +0 -1
- package/dist/esm/presentation/stackedCard/primitives.d.ts +0 -84
- package/dist/esm/presentation/stackedCard/primitives.d.ts.map +0 -1
- package/dist/esm/presentation/stackedCard/primitives.js +0 -241
- package/dist/esm/presentation/stackedCard/primitives.js.map +0 -1
- package/dist/esm/presentation/stackedCard/shell.d.ts +0 -46
- package/dist/esm/presentation/stackedCard/shell.d.ts.map +0 -1
- package/dist/esm/presentation/stackedCard/shell.js +0 -156
- package/dist/esm/presentation/stackedCard/shell.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkCard.js","names":["React","styled","StyledChip","StyledClamp","StyledColorCover","StyledFavicon","coverManagement","playControl","Placeholder","formatFetchedAt","ArrowRefreshIcon","InsertLinkIcon","WarningTriangleIcon","SkeletonLoader","Body2","Caption1","Typography","Cover","StackRow","COVER_RATIO","COVER_RATIO_HERO","StyledDomainRow","div","withConfig","displayName","componentId","StyledChips","StyledStaleStrip","StyledReunfurl","button","StyledErrorBody","StyledRetry","StyledFooterTitle","StyledDisplayToggle","DisplayToggle","_ref","display","onToggle","createElement","type","className","onClick","LinkCard","_ref2","_data$heroColor2","_data$faviconColor2","unfurl","_ref2$display","onToggleDisplay","status","tier","data","fetchedAt","retry","reunfurl","weight","color","$bg","url","as","variant","hasBasic","hasFull","toggle","undefined","_data$heroColor","_data$faviconColor","Fragment","aspectRatio","centerSlot","playable","topRightSlot","$color","heroColor","style","width","height","role","direction","background","faviconColor","borderRadius","domain","flex","title","description","StaleStrip","onReunfurl","marginTop","kind","duration","_ref3","LinkSkeleton","LinkPlaceholder","props","_extends","icon","label"],"sources":["../../../../../src/presentation/stackedCard/content/LinkCard.tsx"],"sourcesContent":["import React, { ReactElement } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport {\n StyledChip,\n StyledClamp,\n StyledColorCover,\n StyledFavicon,\n coverManagement,\n playControl,\n Placeholder,\n} from \"./shared\";\nimport { UnfurlController, formatFetchedAt } from \"./unfurl\";\nimport {\n ArrowRefreshIcon,\n InsertLinkIcon,\n WarningTriangleIcon,\n} from \"../../../components/Icons\";\nimport { SkeletonLoader } from \"../../../components/Loaders\";\nimport { Body2, Caption1 } from \"../../../components/Typography\";\nimport { Typography } from \"../../../components/Typography/Typography\";\nimport { Cover, StackRow } from \"../primitives\";\nimport { COVER_RATIO, COVER_RATIO_HERO } from \"../shell\";\n\n/**\n * LinkCard — a link preview as a LIFECYCLE, not two static layouts.\n *\n * Data climbs a progressive ladder (url → basic → full); the anatomy is\n * CONSTANT at every tier, so each slot swaps a skeleton for real content in\n * place and the card never reflows on upgrade. Four statuses layer on top:\n * resolving — climbing the ladder, aspect + rows reserved by skeletons\n * resolved — the full card\n * stale — resolved, but past its cache window: shows `fetchedAt` and a\n * re-unfurl affordance\n * error — the unfurl failed: favicon + raw URL + retry, NO media\n *\n * Compact ↔ expanded is a user-switchable DISPLAY LEVEL on the same link\n * entity (the data lives in the controller, so switching never refetches or\n * loses it) — not two separate card types.\n */\n\nexport type LinkDisplay = \"compact\" | \"expanded\";\n\n/* ------------------------------------------------------------------ */\n/* Small building blocks */\n/* ------------------------------------------------------------------ */\n\nconst StyledDomainRow = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n min-height: 16px;\n`;\n\nconst StyledChips = styled.div`\n display: flex;\n align-items: center;\n gap: 6px;\n min-height: 18px;\n`;\n\n/* The stale strip — a re-unfurl affordance with the fetch time. */\nconst StyledStaleStrip = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n color: var(--color-theme-600);\n\n > span {\n flex: 1 1 auto;\n min-width: 0;\n }\n`;\n\nconst StyledReunfurl = styled.button`\n display: inline-flex;\n align-items: center;\n gap: 4px;\n flex: 0 0 auto;\n padding: 3px 8px;\n border: 1px solid var(--border-primary);\n border-radius: 6px;\n background: var(--page-paper-main);\n color: var(--color-theme-800);\n font-size: 11px;\n cursor: pointer;\n\n svg {\n width: 12px;\n height: 12px;\n }\n\n &:hover {\n background: var(--color-theme-200);\n border-color: var(--sc-selection-ring);\n }\n`;\n\n/* The error body — favicon + raw URL + retry, no media (per spec §5). */\nconst StyledErrorBody = styled.div`\n display: flex;\n flex-direction: column;\n gap: 10px;\n padding: 12px;\n\n .err-head {\n display: flex;\n align-items: center;\n gap: 8px;\n color: var(--red-alert);\n }\n\n .err-head svg {\n width: 16px;\n height: 16px;\n flex: 0 0 auto;\n }\n\n .err-url {\n display: flex;\n align-items: center;\n gap: 8px;\n word-break: break-all;\n }\n`;\n\nconst StyledRetry = styled.button`\n align-self: flex-start;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 5px 10px;\n border: 1px solid var(--border-primary);\n border-radius: 6px;\n background: var(--page-paper-main);\n color: var(--color-theme-800);\n cursor: pointer;\n\n svg {\n width: 14px;\n height: 14px;\n }\n\n &:hover {\n background: var(--color-theme-200);\n border-color: var(--sc-selection-ring);\n }\n`;\n\n/* The expanded footer band — tinted, holds the title + domain under the hero. */\nconst StyledFooterTitle = styled(Body2)`\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n`;\n\n/* ------------------------------------------------------------------ */\n/* The display-level switch — lives in the entity \"…\" slot */\n/* ------------------------------------------------------------------ */\n\nconst StyledDisplayToggle = styled.button`\n display: inline-flex;\n align-items: center;\n padding: 2px 8px;\n border: 1px solid var(--border-primary);\n border-radius: 10px;\n background: var(--color-theme-200);\n color: var(--color-theme-700);\n font-size: 11px;\n cursor: pointer;\n white-space: nowrap;\n\n &:hover {\n background: var(--color-theme-300);\n }\n`;\n\nconst DisplayToggle = ({\n display,\n onToggle,\n}: {\n display: LinkDisplay;\n onToggle: () => void;\n}): ReactElement => (\n <StyledDisplayToggle\n type=\"button\"\n data-fixed\n className=\"sc-control\"\n aria-label=\"Switch display level\"\n onClick={onToggle}\n >\n {display === \"compact\" ? \"Expand ▾\" : \"Compact ▴\"}\n </StyledDisplayToggle>\n);\n\n/* ------------------------------------------------------------------ */\n/* LinkCard */\n/* ------------------------------------------------------------------ */\n\nexport interface LinkCardProps {\n unfurl: UnfurlController;\n display?: LinkDisplay;\n onToggleDisplay?: () => void;\n}\n\nexport const LinkCard = ({\n unfurl,\n display = \"compact\",\n onToggleDisplay,\n}: LinkCardProps): ReactElement => {\n const { status, tier, data, fetchedAt, retry, reunfurl } = unfurl;\n\n // ── Error: favicon + raw URL + retry, no media ──────────────────\n if (status === \"error\") {\n return (\n <StyledErrorBody>\n <div className=\"err-head\">\n <WarningTriangleIcon />\n <Caption1 weight=\"bold\" color=\"tertiary\">\n Couldn’t load a preview\n </Caption1>\n </div>\n <div className=\"err-url\">\n <StyledFavicon $bg=\"var(--color-theme-400)\" data-fixed />\n <Caption1 color=\"secondary\">{data.url}</Caption1>\n </div>\n <StyledRetry type=\"button\" onClick={retry}>\n <ArrowRefreshIcon />\n <Typography as=\"span\" variant=\"Caption 1\">\n Retry\n </Typography>\n </StyledRetry>\n </StyledErrorBody>\n );\n }\n\n const hasBasic = tier === \"basic\" || tier === \"full\";\n const hasFull = tier === \"full\";\n const toggle = onToggleDisplay ?? (() => undefined);\n\n // ── Expanded: hero + tinted footer band (title + domain) ────────\n if (display === \"expanded\") {\n return (\n <>\n <Cover\n aspectRatio={COVER_RATIO_HERO}\n centerSlot={hasFull && data.playable ? playControl : undefined}\n topRightSlot={coverManagement()}\n >\n {hasFull ? (\n <StyledColorCover $color={data.heroColor ?? \"#1D9E75\"} />\n ) : (\n <SkeletonLoader style={{ width: \"100%\", height: \"100%\" }} />\n )}\n </Cover>\n <StackRow\n role=\"footer\"\n direction=\"column\"\n background=\"var(--color-theme-200)\"\n >\n <StyledDomainRow>\n {hasBasic ? (\n <StyledFavicon $bg={data.faviconColor ?? \"#0F6E56\"} data-fixed />\n ) : (\n <SkeletonLoader\n data-fixed\n style={{ width: 16, height: 16, borderRadius: 4 }}\n />\n )}\n {hasBasic ? (\n <Caption1 color=\"tertiary\">{data.domain}</Caption1>\n ) : (\n <Caption1 color=\"tertiary\">{data.url}</Caption1>\n )}\n <span style={{ flex: \"1 1 auto\" }} />\n <DisplayToggle display={display} onToggle={toggle} />\n </StyledDomainRow>\n {hasBasic ? (\n <StyledFooterTitle weight=\"bold\">{data.title}</StyledFooterTitle>\n ) : (\n <SkeletonLoader style={{ height: 14, width: \"90%\" }} />\n )}\n {hasFull ? (\n <Caption1 color=\"tertiary\">{data.description}</Caption1>\n ) : (\n <SkeletonLoader style={{ height: 10, width: \"70%\" }} />\n )}\n </StackRow>\n {status === \"stale\" ? (\n <StackRow role=\"meta\">\n <StaleStrip fetchedAt={fetchedAt} onReunfurl={reunfurl} />\n </StackRow>\n ) : null}\n </>\n );\n }\n\n // ── Compact: cover + favicon/domain + title + chips ─────────────\n return (\n <>\n <Cover\n aspectRatio={COVER_RATIO}\n centerSlot={hasFull && data.playable ? playControl : undefined}\n >\n {hasFull ? (\n <StyledColorCover $color={data.heroColor ?? \"#1D9E75\"} />\n ) : (\n <SkeletonLoader style={{ width: \"100%\", height: \"100%\" }} />\n )}\n </Cover>\n\n <StackRow role=\"custom\">\n <StyledDomainRow>\n {hasBasic ? (\n <StyledFavicon $bg={data.faviconColor ?? \"#0F6E56\"} data-fixed />\n ) : (\n <SkeletonLoader\n data-fixed\n style={{ width: 16, height: 16, borderRadius: 4 }}\n />\n )}\n {hasBasic ? (\n <Caption1 color=\"tertiary\">{data.domain}</Caption1>\n ) : (\n <Caption1 color=\"tertiary\">{data.url}</Caption1>\n )}\n <span style={{ flex: \"1 1 auto\" }} />\n <DisplayToggle display={display} onToggle={toggle} />\n </StyledDomainRow>\n </StackRow>\n\n <StackRow role=\"title\">\n {hasBasic ? (\n <StyledClamp>{data.title}</StyledClamp>\n ) : (\n <div style={{ width: \"100%\" }}>\n <SkeletonLoader style={{ height: 14, width: \"92%\" }} />\n <SkeletonLoader\n style={{ height: 14, width: \"60%\", marginTop: 6 }}\n />\n </div>\n )}\n </StackRow>\n\n <StackRow role=\"custom\">\n <StyledChips>\n {hasFull ? (\n <>\n {data.kind ? (\n <StyledChip data-fixed>{data.kind}</StyledChip>\n ) : null}\n {data.duration ? (\n <StyledChip data-fixed>{data.duration}</StyledChip>\n ) : null}\n </>\n ) : (\n <SkeletonLoader\n style={{ height: 18, width: 96, borderRadius: 10 }}\n />\n )}\n </StyledChips>\n </StackRow>\n\n {status === \"stale\" ? (\n <StackRow role=\"meta\">\n <StaleStrip fetchedAt={fetchedAt} onReunfurl={reunfurl} />\n </StackRow>\n ) : null}\n </>\n );\n};\n\n/* The stale affordance — fetch time + a manual re-unfurl button. */\nconst StaleStrip = ({\n fetchedAt,\n onReunfurl,\n}: {\n fetchedAt: number | null;\n onReunfurl: () => void;\n}): ReactElement => (\n <StyledStaleStrip>\n <Typography as=\"span\" variant=\"Caption 1\" color=\"tertiary\">\n Preview may be out of date · fetched {formatFetchedAt(fetchedAt)}\n </Typography>\n <StyledReunfurl type=\"button\" onClick={onReunfurl}>\n <ArrowRefreshIcon />\n Re-unfurl\n </StyledReunfurl>\n </StyledStaleStrip>\n);\n\n/* ---- skeleton ---- */\n\n/* Mirrors the compact anatomy row for row (this is the `resolving` render at\n tier `url`), so a resolving link never reflows as it climbs the ladder. */\nexport const LinkSkeleton = (): ReactElement => (\n <>\n <Cover aspectRatio={COVER_RATIO}>\n <SkeletonLoader style={{ width: \"100%\", height: \"100%\" }} />\n </Cover>\n <StackRow role=\"custom\">\n <StyledDomainRow>\n <SkeletonLoader\n data-fixed\n style={{ width: 16, height: 16, borderRadius: 4 }}\n />\n <SkeletonLoader style={{ height: 10, width: \"40%\" }} />\n </StyledDomainRow>\n </StackRow>\n <StackRow role=\"title\">\n <div style={{ width: \"100%\" }}>\n <SkeletonLoader style={{ height: 14, width: \"92%\" }} />\n <SkeletonLoader style={{ height: 14, width: \"60%\", marginTop: 6 }} />\n </div>\n </StackRow>\n <StackRow role=\"custom\">\n <StyledChips>\n <SkeletonLoader style={{ height: 18, width: 96, borderRadius: 10 }} />\n </StyledChips>\n </StackRow>\n </>\n);\n\n/* ---- placeholder ---- */\n\nexport const LinkPlaceholder = (\n props: React.ButtonHTMLAttributes<HTMLButtonElement>\n): ReactElement => (\n <Placeholder icon={<InsertLinkIcon />} label=\"Add a link\" {...props} />\n);\n"],"mappings":";AAAA,OAAOA,KAAK,MAAwB,OAAO;AAE3C,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,SACEC,UAAU,EACVC,WAAW,EACXC,gBAAgB,EAChBC,aAAa,EACbC,eAAe,EACfC,WAAW,EACXC,WAAW,QACN,UAAU;AACjB,SAA2BC,eAAe,QAAQ,UAAU;AAC5D,SACEC,gBAAgB,EAChBC,cAAc,EACdC,mBAAmB,QACd,2BAA2B;AAClC,SAASC,cAAc,QAAQ,6BAA6B;AAC5D,SAASC,KAAK,EAAEC,QAAQ,QAAQ,gCAAgC;AAChE,SAASC,UAAU,QAAQ,2CAA2C;AACtE,SAASC,KAAK,EAAEC,QAAQ,QAAQ,eAAe;AAC/C,SAASC,WAAW,EAAEC,gBAAgB,QAAQ,UAAU;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;;AAEA,MAAMC,eAAe,GAAGpB,MAAM,CAACqB,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,gEAKjC;AAED,MAAMC,WAAW,GAAGzB,MAAM,CAACqB,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,gEAK7B;;AAED;AACA,MAAME,gBAAgB,GAAG1B,MAAM,CAACqB,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,+GAUlC;AAED,MAAMG,cAAc,GAAG3B,MAAM,CAAC4B,MAAM,CAAAN,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,wVAsBnC;;AAED;AACA,MAAMK,eAAe,GAAG7B,MAAM,CAACqB,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,sQAyBjC;AAED,MAA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C,aAAA,CAACpB,QAAQ;EAAC2D,IAAI,EAAC;AAAO,gBACpB7E,KAAA,CAAAsC,aAAA;EAAKoC,KAAK,EAAE;IAAEC,KAAK,EAAE;EAAO;AAAE,gBAC5B3E,KAAA,CAAAsC,aAAA,CAACzB,cAAc;EAAC6D,KAAK,EAAE;IAAEE,MAAM,EAAE,EAAE;IAAED,KAAK,EAAE;EAAM;AAAE,CAAE,CAAC,eACvD3E,KAAA,CAAAsC,aAAA,CAACzB,cAAc;EAAC6D,KAAK,EAAE;IAAEE,MAAM,EAAE,EAAE;IAAED,KAAK,EAAE,KAAK;IAAEa,SAAS,EAAE;EAAE;AAAE,CAAE,CACjE,CACG,CAAC,eACXxF,KAAA,CAAAsC,aAAA,CAACpB,QAAQ;EAAC2D,IAAI,EAAC;AAAQ,gBACrB7E,KAAA,CAAAsC,aAAA,CAACZ,WAAW,qBACV1B,KAAA,CAAAsC,aAAA,CAACzB,cAAc;EAAC6D,KAAK,EAAE;IAAEE,MAAM,EAAE,EAAE;IAAED,KAAK,EAAE,EAAE;IAAEM,YAAY,EAAE;EAAG;AAAE,CAAE,CAC1D,CACL,CACV,CACH;;AAED;;AAEA,OAAO,MAAMY,eAAe,GAC1BC,KAAoD,iBAEpD9F,KAAA,CAAAsC,aAAA,CAAC9B,WAAW,EAAAuF,QAAA;EAACC,IAAI,eAAEhG,KAAA,CAAAsC,aAAA,CAAC3B,cAAc,MAAE,CAAE;EAACsF,KAAK,EAAC;AAAY,GAAKH,KAAK,CAAG,CACvE","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"LinkCard.js","names":["React","styled","COVER_RATIO_HERO","StyledChip","StyledClamp","StyledColorCover","StyledFavicon","coverManagement","playControl","Placeholder","formatFetchedAt","ArrowRefreshIcon","InsertLinkIcon","WarningTriangleIcon","SkeletonLoader","STACKED_CARD_COVER_RATIO","COVER_RATIO","STACKED_CARD_CONTROL_CLASS","StackedCardCover","Cover","StackedCardRow","StackRow","Body2","Caption1","Typography","StyledDomainRow","div","withConfig","displayName","componentId","StyledChips","StyledStaleStrip","StyledReunfurl","button","StyledErrorRow","StyledRetry","StyledFooterTitle","StyledDisplayToggle","DisplayToggle","_ref","display","onToggle","createElement","type","className","onClick","LinkCard","_ref2","_data$heroColor2","_data$faviconColor2","unfurl","_ref2$display","onToggleDisplay","status","tier","data","fetchedAt","retry","reunfurl","role","direction","weight","color","$bg","url","as","variant","hasBasic","hasFull","toggle","undefined","_data$heroColor","_data$faviconColor","Fragment","aspectRatio","centerSlot","playable","topRightSlot","$color","heroColor","style","width","height","background","faviconColor","borderRadius","domain","flex","title","description","StaleStrip","onReunfurl","marginTop","kind","duration","_ref3","LinkSkeleton","LinkPlaceholder","props","_extends","icon","label"],"sources":["../../../../../src/presentation/stackedCard/content/LinkCard.tsx"],"sourcesContent":["import React, { ReactElement } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport {\n COVER_RATIO_HERO,\n StyledChip,\n StyledClamp,\n StyledColorCover,\n StyledFavicon,\n coverManagement,\n playControl,\n Placeholder,\n} from \"./shared\";\nimport { UnfurlController, formatFetchedAt } from \"./unfurl\";\nimport {\n ArrowRefreshIcon,\n InsertLinkIcon,\n WarningTriangleIcon,\n} from \"../../../components/Icons\";\nimport { SkeletonLoader } from \"../../../components/Loaders\";\nimport {\n STACKED_CARD_COVER_RATIO as COVER_RATIO,\n STACKED_CARD_CONTROL_CLASS,\n StackedCardCover as Cover,\n StackedCardRow as StackRow,\n} from \"../../../components/StackedCard\";\nimport { Body2, Caption1 } from \"../../../components/Typography\";\nimport { Typography } from \"../../../components/Typography/Typography\";\n\n/**\n * LinkCard — a link preview as a LIFECYCLE, not two static layouts.\n *\n * Data climbs a progressive ladder (url → basic → full); the anatomy is\n * CONSTANT at every tier, so each slot swaps a skeleton for real content in\n * place and the card never reflows on upgrade. Four statuses layer on top:\n * resolving — climbing the ladder, aspect + rows reserved by skeletons\n * resolved — the full card\n * stale — resolved, but past its cache window: shows `fetchedAt` and a\n * re-unfurl affordance\n * error — the unfurl failed: favicon + raw URL + retry, NO media\n *\n * Compact ↔ expanded is a user-switchable DISPLAY LEVEL on the same link\n * entity (the data lives in the controller, so switching never refetches or\n * loses it) — not two separate card types.\n */\n\nexport type LinkDisplay = \"compact\" | \"expanded\";\n\n/* ------------------------------------------------------------------ */\n/* Small building blocks */\n/* ------------------------------------------------------------------ */\n\nconst StyledDomainRow = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n min-height: 16px;\n`;\n\nconst StyledChips = styled.div`\n display: flex;\n align-items: center;\n gap: 6px;\n min-height: 18px;\n`;\n\n/* The stale strip — a re-unfurl affordance with the fetch time. */\nconst StyledStaleStrip = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n color: var(--color-theme-600);\n\n > span {\n flex: 1 1 auto;\n min-width: 0;\n }\n`;\n\nconst StyledReunfurl = styled.button`\n display: inline-flex;\n align-items: center;\n gap: 4px;\n flex: 0 0 auto;\n padding: 3px 8px;\n border: 1px solid var(--border-primary);\n border-radius: 6px;\n background: var(--page-paper-main);\n color: var(--color-theme-800);\n font-size: 11px;\n cursor: pointer;\n\n svg {\n width: 12px;\n height: 12px;\n }\n\n &:hover {\n background: var(--color-theme-200);\n border-color: var(--sc-selection-ring);\n }\n`;\n\n/* The error body — favicon + raw URL + retry, no media (per spec §5). It is a\n column row like any other: the padding comes from the role, so the error\n state lines up with the states it replaces instead of setting its own inset.\n Only the gap is widened — three stacked blocks, not four text lines. */\nconst StyledErrorRow = styled(StackRow)`\n gap: 10px;\n\n .err-head {\n display: flex;\n align-items: center;\n gap: 8px;\n color: var(--red-alert);\n }\n\n .err-head svg {\n width: 16px;\n height: 16px;\n flex: 0 0 auto;\n }\n\n .err-url {\n display: flex;\n align-items: center;\n gap: 8px;\n word-break: break-all;\n }\n`;\n\nconst StyledRetry = styled.button`\n align-self: flex-start;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 5px 10px;\n border: 1px solid var(--border-primary);\n border-radius: 6px;\n background: var(--page-paper-main);\n color: var(--color-theme-800);\n cursor: pointer;\n\n svg {\n width: 14px;\n height: 14px;\n }\n\n &:hover {\n background: var(--color-theme-200);\n border-color: var(--sc-selection-ring);\n }\n`;\n\n/* The expanded footer band — tinted, holds the title + domain under the hero. */\nconst StyledFooterTitle = styled(Body2)`\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n`;\n\n/* ------------------------------------------------------------------ */\n/* The display-level switch — lives in the entity \"…\" slot */\n/* ------------------------------------------------------------------ */\n\nconst StyledDisplayToggle = styled.button`\n display: inline-flex;\n align-items: center;\n padding: 2px 8px;\n border: 1px solid var(--border-primary);\n border-radius: 10px;\n background: var(--color-theme-200);\n color: var(--color-theme-700);\n font-size: 11px;\n cursor: pointer;\n white-space: nowrap;\n\n &:hover {\n background: var(--color-theme-300);\n }\n`;\n\nconst DisplayToggle = ({\n display,\n onToggle,\n}: {\n display: LinkDisplay;\n onToggle: () => void;\n}): ReactElement => (\n <StyledDisplayToggle\n type=\"button\"\n data-fixed\n className={STACKED_CARD_CONTROL_CLASS}\n aria-label=\"Switch display level\"\n onClick={onToggle}\n >\n {display === \"compact\" ? \"Expand ▾\" : \"Compact ▴\"}\n </StyledDisplayToggle>\n);\n\n/* ------------------------------------------------------------------ */\n/* LinkCard */\n/* ------------------------------------------------------------------ */\n\nexport interface LinkCardProps {\n unfurl: UnfurlController;\n display?: LinkDisplay;\n onToggleDisplay?: () => void;\n}\n\nexport const LinkCard = ({\n unfurl,\n display = \"compact\",\n onToggleDisplay,\n}: LinkCardProps): ReactElement => {\n const { status, tier, data, fetchedAt, retry, reunfurl } = unfurl;\n\n // ── Error: favicon + raw URL + retry, no media ──────────────────\n if (status === \"error\") {\n return (\n <StyledErrorRow role=\"custom\" direction=\"column\">\n <div className=\"err-head\">\n <WarningTriangleIcon />\n <Caption1 weight=\"bold\" color=\"tertiary\">\n Couldn’t load a preview\n </Caption1>\n </div>\n <div className=\"err-url\">\n <StyledFavicon $bg=\"var(--color-theme-400)\" data-fixed />\n <Caption1 color=\"secondary\">{data.url}</Caption1>\n </div>\n <StyledRetry type=\"button\" onClick={retry}>\n <ArrowRefreshIcon />\n <Typography as=\"span\" variant=\"Caption 1\">\n Retry\n </Typography>\n </StyledRetry>\n </StyledErrorRow>\n );\n }\n\n const hasBasic = tier === \"basic\" || tier === \"full\";\n const hasFull = tier === \"full\";\n const toggle = onToggleDisplay ?? (() => undefined);\n\n // ── Expanded: hero + tinted footer band (title + domain) ────────\n if (display === \"expanded\") {\n return (\n <>\n <Cover\n aspectRatio={COVER_RATIO_HERO}\n centerSlot={hasFull && data.playable ? playControl : undefined}\n topRightSlot={coverManagement()}\n >\n {hasFull ? (\n <StyledColorCover $color={data.heroColor ?? \"#1D9E75\"} />\n ) : (\n <SkeletonLoader style={{ width: \"100%\", height: \"100%\" }} />\n )}\n </Cover>\n <StackRow\n role=\"footer\"\n direction=\"column\"\n background=\"var(--color-theme-200)\"\n >\n <StyledDomainRow>\n {hasBasic ? (\n <StyledFavicon $bg={data.faviconColor ?? \"#0F6E56\"} data-fixed />\n ) : (\n <SkeletonLoader\n data-fixed\n style={{ width: 16, height: 16, borderRadius: 4 }}\n />\n )}\n {hasBasic ? (\n <Caption1 color=\"tertiary\">{data.domain}</Caption1>\n ) : (\n <Caption1 color=\"tertiary\">{data.url}</Caption1>\n )}\n <span style={{ flex: \"1 1 auto\" }} />\n <DisplayToggle display={display} onToggle={toggle} />\n </StyledDomainRow>\n {hasBasic ? (\n <StyledFooterTitle weight=\"bold\">{data.title}</StyledFooterTitle>\n ) : (\n <SkeletonLoader style={{ height: 14, width: \"90%\" }} />\n )}\n {hasFull ? (\n <Caption1 color=\"tertiary\">{data.description}</Caption1>\n ) : (\n <SkeletonLoader style={{ height: 10, width: \"70%\" }} />\n )}\n </StackRow>\n {status === \"stale\" ? (\n <StackRow role=\"meta\">\n <StaleStrip fetchedAt={fetchedAt} onReunfurl={reunfurl} />\n </StackRow>\n ) : null}\n </>\n );\n }\n\n // ── Compact: cover + favicon/domain + title + chips ─────────────\n return (\n <>\n <Cover\n aspectRatio={COVER_RATIO}\n centerSlot={hasFull && data.playable ? playControl : undefined}\n >\n {hasFull ? (\n <StyledColorCover $color={data.heroColor ?? \"#1D9E75\"} />\n ) : (\n <SkeletonLoader style={{ width: \"100%\", height: \"100%\" }} />\n )}\n </Cover>\n\n <StackRow role=\"custom\">\n <StyledDomainRow>\n {hasBasic ? (\n <StyledFavicon $bg={data.faviconColor ?? \"#0F6E56\"} data-fixed />\n ) : (\n <SkeletonLoader\n data-fixed\n style={{ width: 16, height: 16, borderRadius: 4 }}\n />\n )}\n {hasBasic ? (\n <Caption1 color=\"tertiary\">{data.domain}</Caption1>\n ) : (\n <Caption1 color=\"tertiary\">{data.url}</Caption1>\n )}\n <span style={{ flex: \"1 1 auto\" }} />\n <DisplayToggle display={display} onToggle={toggle} />\n </StyledDomainRow>\n </StackRow>\n\n <StackRow role=\"title\">\n {hasBasic ? (\n <StyledClamp>{data.title}</StyledClamp>\n ) : (\n <div style={{ width: \"100%\" }}>\n <SkeletonLoader style={{ height: 14, width: \"92%\" }} />\n <SkeletonLoader\n style={{ height: 14, width: \"60%\", marginTop: 6 }}\n />\n </div>\n )}\n </StackRow>\n\n <StackRow role=\"custom\">\n <StyledChips>\n {hasFull ? (\n <>\n {data.kind ? (\n <StyledChip data-fixed>{data.kind}</StyledChip>\n ) : null}\n {data.duration ? (\n <StyledChip data-fixed>{data.duration}</StyledChip>\n ) : null}\n </>\n ) : (\n <SkeletonLoader\n style={{ height: 18, width: 96, borderRadius: 10 }}\n />\n )}\n </StyledChips>\n </StackRow>\n\n {status === \"stale\" ? (\n <StackRow role=\"meta\">\n <StaleStrip fetchedAt={fetchedAt} onReunfurl={reunfurl} />\n </StackRow>\n ) : null}\n </>\n );\n};\n\n/* The stale affordance — fetch time + a manual re-unfurl button. */\nconst StaleStrip = ({\n fetchedAt,\n onReunfurl,\n}: {\n fetchedAt: number | null;\n onReunfurl: () => void;\n}): ReactElement => (\n <StyledStaleStrip>\n <Typography as=\"span\" variant=\"Caption 1\" color=\"tertiary\">\n Preview may be out of date · fetched {formatFetchedAt(fetchedAt)}\n </Typography>\n <StyledReunfurl type=\"button\" onClick={onReunfurl}>\n <ArrowRefreshIcon />\n Re-unfurl\n </StyledReunfurl>\n </StyledStaleStrip>\n);\n\n/* ---- skeleton ---- */\n\n/* Mirrors the compact anatomy row for row (this is the `resolving` render at\n tier `url`), so a resolving link never reflows as it climbs the ladder. */\nexport const LinkSkeleton = (): ReactElement => (\n <>\n <Cover aspectRatio={COVER_RATIO}>\n <SkeletonLoader style={{ width: \"100%\", height: \"100%\" }} />\n </Cover>\n <StackRow role=\"custom\">\n <StyledDomainRow>\n <SkeletonLoader\n data-fixed\n style={{ width: 16, height: 16, borderRadius: 4 }}\n />\n <SkeletonLoader style={{ height: 10, width: \"40%\" }} />\n </StyledDomainRow>\n </StackRow>\n <StackRow role=\"title\">\n <div style={{ width: \"100%\" }}>\n <SkeletonLoader style={{ height: 14, width: \"92%\" }} />\n <SkeletonLoader style={{ height: 14, width: \"60%\", marginTop: 6 }} />\n </div>\n </StackRow>\n <StackRow role=\"custom\">\n <StyledChips>\n <SkeletonLoader style={{ height: 18, width: 96, borderRadius: 10 }} />\n </StyledChips>\n </StackRow>\n </>\n);\n\n/* ---- placeholder ---- */\n\nexport const LinkPlaceholder = (\n props: React.ButtonHTMLAttributes<HTMLButtonElement>\n): ReactElement => (\n <Placeholder icon={<InsertLinkIcon />} label=\"Add a link\" {...props} />\n);\n"],"mappings":";AAAA,OAAOA,KAAK,MAAwB,OAAO;AAE3C,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,SACEC,gBAAgB,EAChBC,UAAU,EACVC,WAAW,EACXC,gBAAgB,EAChBC,aAAa,EACbC,eAAe,EACfC,WAAW,EACXC,WAAW,QACN,UAAU;AACjB,SAA2BC,eAAe,QAAQ,UAAU;AAC5D,SACEC,gBAAgB,EAChBC,cAAc,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vDjF,KAAA,CAAA0C,aAAA,CAAC5B,cAAc;EAACkE,KAAK,EAAE;IAAEE,MAAM,EAAE,EAAE;IAAED,KAAK,EAAE,KAAK;IAAEW,SAAS,EAAE;EAAE;AAAE,CAAE,CACjE,CACG,CAAC,eACX5F,KAAA,CAAA0C,aAAA,CAACrB,QAAQ;EAACsC,IAAI,EAAC;AAAQ,gBACrB3D,KAAA,CAAA0C,aAAA,CAACZ,WAAW,qBACV9B,KAAA,CAAA0C,aAAA,CAAC5B,cAAc;EAACkE,KAAK,EAAE;IAAEE,MAAM,EAAE,EAAE;IAAED,KAAK,EAAE,EAAE;IAAEI,YAAY,EAAE;EAAG;AAAE,CAAE,CAC1D,CACL,CACV,CACH;;AAED;;AAEA,OAAO,MAAMY,eAAe,GAC1BC,KAAoD,iBAEpDlG,KAAA,CAAA0C,aAAA,CAACjC,WAAW,EAAA0F,QAAA;EAACC,IAAI,eAAEpG,KAAA,CAAA0C,aAAA,CAAC9B,cAAc,MAAE,CAAE;EAACyF,KAAK,EAAC;AAAY,GAAKH,KAAK,CAAG,CACvE","ignoreList":[]}
|
|
@@ -4,8 +4,8 @@ import styled from "styled-components";
|
|
|
4
4
|
import { EntityDots, Placeholder } from "./shared";
|
|
5
5
|
import { NoteIcon } from "../../../components/Icons";
|
|
6
6
|
import { SkeletonLoader } from "../../../components/Loaders";
|
|
7
|
+
import { StackedCardRow as StackRow } from "../../../components/StackedCard";
|
|
7
8
|
import { Body2 } from "../../../components/Typography";
|
|
8
|
-
import { StackRow } from "../primitives";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* NoteCard — the new fifth type. A multi-line text card (Milanote-style): a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoteCard.js","names":["React","styled","EntityDots","Placeholder","NoteIcon","SkeletonLoader","
|
|
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,qBACErB,KAAA,CAAAoB,aAAA,CAACb,QAAQ;IA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AEC,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwatchCard.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/stackedCard/content/SwatchCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SwatchCard.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/stackedCard/content/SwatchCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAW5C;;;GAGG;AAEH,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,UAAU,GAAI,uBAIxB,eAAe,KAAG,YAYpB,CAAC;AAIF,eAAO,MAAM,iBAAiB,GAC5B,OAAO,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,KACnD,YAEF,CAAC;AAEF,eAAO,MAAM,cAAc,QAAO,YAUjC,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { StyledColorCover, Placeholder } from "./shared";
|
|
3
|
+
import { COVER_RATIO_SWATCH, StyledColorCover, Placeholder } from "./shared";
|
|
4
4
|
import { ImageIcon } from "../../../components/Icons";
|
|
5
5
|
import { SkeletonLoader } from "../../../components/Loaders";
|
|
6
|
+
import { StackedCardCover as Cover, StackedCardRow as StackRow } from "../../../components/StackedCard";
|
|
6
7
|
import { Body2, Caption1 } from "../../../components/Typography";
|
|
7
|
-
import { Cover, StackRow } from "../primitives";
|
|
8
|
-
import { COVER_RATIO_SWATCH } from "../shell";
|
|
9
8
|
|
|
10
9
|
/**
|
|
11
10
|
* SwatchCard — the cover IS the colour; a title row states its name and hex.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwatchCard.js","names":["React","StyledColorCover","Placeholder","ImageIcon","SkeletonLoader","
|
|
1
|
+
{"version":3,"file":"SwatchCard.js","names":["React","COVER_RATIO_SWATCH","StyledColorCover","Placeholder","ImageIcon","SkeletonLoader","StackedCardCover","Cover","StackedCardRow","StackRow","Body2","Caption1","SwatchCard","_ref","_ref$color","color","_ref$name","name","_ref$hex","hex","createElement","Fragment","aspectRatio","$color","role","style","fontFamily","SwatchPlaceholder","props","_extends","icon","label","SwatchSkeleton","width","height"],"sources":["../../../../../src/presentation/stackedCard/content/SwatchCard.tsx"],"sourcesContent":["import React, { ReactElement } from \"react\";\n\nimport { COVER_RATIO_SWATCH, StyledColorCover, Placeholder } from \"./shared\";\nimport { ImageIcon } from \"../../../components/Icons\";\nimport { SkeletonLoader } from \"../../../components/Loaders\";\nimport {\n StackedCardCover as Cover,\n StackedCardRow as StackRow,\n} from \"../../../components/StackedCard\";\nimport { Body2, Caption1 } from \"../../../components/Typography\";\n\n/**\n * SwatchCard — the cover IS the colour; a title row states its name and hex.\n * The swatch value is a literal data colour by design (not a theme token).\n */\n\nexport interface SwatchCardProps {\n color?: string;\n name?: string;\n hex?: string;\n}\n\nexport const SwatchCard = ({\n color = \"#1D9E75\",\n name = \"Teal\",\n hex = \"#1D9E75\",\n}: SwatchCardProps): ReactElement => (\n <>\n <Cover aspectRatio={COVER_RATIO_SWATCH}>\n <StyledColorCover $color={color} />\n </Cover>\n <StackRow role=\"title\">\n <Body2>{name}</Body2>\n <Caption1 color=\"tertiary\" data-fixed style={{ fontFamily: \"monospace\" }}>\n {hex}\n </Caption1>\n </StackRow>\n </>\n);\n\n/* ---- placeholder + skeleton ---- */\n\nexport const SwatchPlaceholder = (\n props: React.ButtonHTMLAttributes<HTMLButtonElement>\n): ReactElement => (\n <Placeholder icon={<ImageIcon />} label=\"Pick a colour\" {...props} />\n);\n\nexport const SwatchSkeleton = (): ReactElement => (\n <>\n <Cover aspectRatio={COVER_RATIO_SWATCH}>\n <SkeletonLoader style={{ width: \"100%\", height: \"100%\" }} />\n </Cover>\n <StackRow role=\"title\">\n <SkeletonLoader style={{ height: 14, width: \"40%\" }} />\n <SkeletonLoader data-fixed style={{ height: 12, width: 60 }} />\n </StackRow>\n </>\n);\n"],"mappings":";AAAA,OAAOA,KAAK,MAAwB,OAAO;AAE3C,SAASC,kBAAkB,EAAEC,gBAAgB,EAAEC,WAAW,QAAQ,UAAU;AAC5E,SAASC,SAAS,QAAQ,2BAA2B;AACrD,SAASC,cAAc,QAAQ,6BAA6B;AAC5D,SACEC,gBAAgB,IAAIC,KAAK,EACzBC,cAAc,IAAIC,QAAQ,QACrB,iCAAiC;AACxC,SAASC,KAAK,EAAEC,QAAQ,QAAQ,gCAAgC;;AAEhE;AACA;AACA;AACA;;AAQA,OAAO,MAAMC,UAAU,GAAGC,IAAA;EAAA,IAAAC,UAAA,GAAAD,IAAA,CACxBE,KAAK;IAALA,KAAK,GAAAD,UAAA,cAAG,SAAS,GAAAA,UAAA;IAAAE,SAAA,GAAAH,IAAA,CACjBI,IAAI;IAAJA,IAAI,GAAAD,SAAA,cAAG,MAAM,GAAAA,SAAA;IAAAE,QAAA,GAAAL,IAAA,CACbM,GAAG;IAAHA,GAAG,GAAAD,QAAA,cAAG,SAAS,GAAAA,QAAA;EAAA,oBAEflB,KAAA,CAAAoB,aAAA,CAAApB,KAAA,CAAAqB,QAAA,qBACErB,KAAA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AES,MAAM,EAAE,EAAE;IAAED,KAAK,EAAE;EAAG;AAAE,CAAE,CACtD,CACV,CACH","ignoreList":[]}
|
|
@@ -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;
|
|
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"}
|
|
@@ -4,11 +4,10 @@ import styled, { css } from "styled-components";
|
|
|
4
4
|
import { EntityDots, StyledClamp, coverManagement, playControl, Placeholder } from "./shared";
|
|
5
5
|
import { ChecklistSmallIcon, EyeOffIcon, InsertLinkIcon, MessageSmallIcon, PersonPlusIcon } from "../../../components/Icons";
|
|
6
6
|
import { SkeletonLoader } from "../../../components/Loaders";
|
|
7
|
+
import { STACKED_CARD_COVER_RATIO as COVER_RATIO, StackedCardCover as Cover, StackedCardRow as StackRow } from "../../../components/StackedCard";
|
|
7
8
|
import { Caption1 } from "../../../components/Typography";
|
|
8
9
|
import { Typography } from "../../../components/Typography/Typography";
|
|
9
10
|
import { RoundAvatar, AVATAR_COLORS } from "../../shared";
|
|
10
|
-
import { Cover, StackRow } from "../primitives";
|
|
11
|
-
import { COVER_RATIO } from "../shell";
|
|
12
11
|
|
|
13
12
|
/**
|
|
14
13
|
* TaskCard — the baseline-preservation card.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaskCard.js","names":["React","styled","css","EntityDots","StyledClamp","coverManagement","playControl","Placeholder","ChecklistSmallIcon","EyeOffIcon","InsertLinkIcon","MessageSmallIcon","PersonPlusIcon","SkeletonLoader","Caption1","Typography","RoundAvatar","AVATAR_COLORS","Cover","StackRow","COVER_RATIO","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 { Caption1 } from \"../../../components/Typography\";\nimport { Typography } from \"../../../components/Typography/Typography\";\nimport { RoundAvatar, AVATAR_COLORS } from \"../../shared\";\nimport { Cover, StackRow } from \"../primitives\";\nimport { COVER_RATIO } from \"../shell\";\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, borderR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EAAE;EAAM;AAAE,CACvD,CACO,CACV,CACH","ignoreList":[]}
|
|
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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D,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;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":[]}
|
|
@@ -6,7 +6,22 @@ import React, { ReactElement, ReactNode } from "react";
|
|
|
6
6
|
* menu, the cover-management controls, the clamp, the favicon, the chips and
|
|
7
7
|
* the placeholder frame are content concerns, so they belong here where the
|
|
8
8
|
* typed cards (TaskCard, LinkCard, …) compose them.
|
|
9
|
+
*
|
|
10
|
+
* The card itself — the shell, the Stack/StackRow/Cover primitives and the
|
|
11
|
+
* cover chrome — is the shipped design-system component,
|
|
12
|
+
* `components/StackedCard`. These stories import it under the concept
|
|
13
|
+
* vocabulary (Cover, StackRow, …) so the spec prose and the code keep using
|
|
14
|
+
* the same words.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* The design system ships one default cover ratio
|
|
18
|
+
* (`STACKED_CARD_COVER_RATIO`). How tall a cover reads is a decision of the
|
|
19
|
+
* content type, so the variants live here with the content: a link hero, a
|
|
20
|
+
* full-bleed image, a colour swatch band.
|
|
9
21
|
*/
|
|
22
|
+
export declare const COVER_RATIO_HERO = "320 / 190";
|
|
23
|
+
export declare const COVER_RATIO_IMAGE = "260 / 168";
|
|
24
|
+
export declare const COVER_RATIO_SWATCH = "260 / 104";
|
|
10
25
|
/** Centered media control (play), for a cover that wraps audio/video. */
|
|
11
26
|
export declare const playControl: React.JSX.Element;
|
|
12
27
|
/**
|
|
@@ -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;
|
|
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,cAAc,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,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"}
|
|
@@ -4,9 +4,9 @@ const _excluded = ["icon", "label", "height", "dashed"];
|
|
|
4
4
|
import React from "react";
|
|
5
5
|
import styled, { css } from "styled-components";
|
|
6
6
|
import { PlayIcon, TreeDotsIcon } from "../../../components/Icons";
|
|
7
|
+
import { STACKED_CARD_CONTROL_CLASS, StackedCardCollapseGlyph as CollapseGlyph, StackedCardCoverButton as CoverButton, StackedCardPlayBadge as PlayBadge, StackedCardRemoveCoverGlyph as RemoveCoverGlyph } from "../../../components/StackedCard";
|
|
7
8
|
import { Body2 } from "../../../components/Typography";
|
|
8
9
|
import { Typography } from "../../../components/Typography/Typography";
|
|
9
|
-
import { CollapseGlyph, CoverButton, PlayBadge, RemoveCoverGlyph } from "../primitives";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Content-level chrome shared by the typed StackedCard components.
|
|
@@ -15,7 +15,27 @@ import { CollapseGlyph, CoverButton, PlayBadge, RemoveCoverGlyph } from "../prim
|
|
|
15
15
|
* menu, the cover-management controls, the clamp, the favicon, the chips and
|
|
16
16
|
* the placeholder frame are content concerns, so they belong here where the
|
|
17
17
|
* typed cards (TaskCard, LinkCard, …) compose them.
|
|
18
|
+
*
|
|
19
|
+
* The card itself — the shell, the Stack/StackRow/Cover primitives and the
|
|
20
|
+
* cover chrome — is the shipped design-system component,
|
|
21
|
+
* `components/StackedCard`. These stories import it under the concept
|
|
22
|
+
* vocabulary (Cover, StackRow, …) so the spec prose and the code keep using
|
|
23
|
+
* the same words.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/* ------------------------------------------------------------------ */
|
|
27
|
+
/* Per-type cover ratios */
|
|
28
|
+
/* ------------------------------------------------------------------ */
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The design system ships one default cover ratio
|
|
32
|
+
* (`STACKED_CARD_COVER_RATIO`). How tall a cover reads is a decision of the
|
|
33
|
+
* content type, so the variants live here with the content: a link hero, a
|
|
34
|
+
* full-bleed image, a colour swatch band.
|
|
18
35
|
*/
|
|
36
|
+
export const COVER_RATIO_HERO = "320 / 190";
|
|
37
|
+
export const COVER_RATIO_IMAGE = "260 / 168";
|
|
38
|
+
export const COVER_RATIO_SWATCH = "260 / 104";
|
|
19
39
|
|
|
20
40
|
/* ------------------------------------------------------------------ */
|
|
21
41
|
/* Cover chrome — media control + cover management */
|
|
@@ -58,7 +78,7 @@ export const EntityDots = props => /*#__PURE__*/React.createElement(StyledEntity
|
|
|
58
78
|
type: "button",
|
|
59
79
|
"aria-label": "Options",
|
|
60
80
|
"data-fixed": true,
|
|
61
|
-
className:
|
|
81
|
+
className: STACKED_CARD_CONTROL_CLASS
|
|
62
82
|
}, props), /*#__PURE__*/React.createElement(TreeDotsIcon, null));
|
|
63
83
|
|
|
64
84
|
/* ------------------------------------------------------------------ */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.js","names":["React","styled","css","PlayIcon","TreeDotsIcon","Body2","Typography","CollapseGlyph","CoverButton","PlayBadge","RemoveCoverGlyph","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 { Body2 } from \"../../../components/Typography\";\nimport { Typography } from \"../../../components/Typography/Typography\";\nimport {\n CollapseGlyph,\n CoverButton,\n PlayBadge,\n RemoveCoverGlyph,\n} from \"../primitives\";\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\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=\"sc-control\"\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,SAASC,KAAK,QAAQ,gCAAgC;AACtD,SAASC,UAAU,QAAQ,2CAA2C;AACtE,SACEC,aAAa,EACbC,WAAW,EACXC,SAAS,EACTC,gBAAgB,QACX,eAAe;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,OAAO,MAAMC,WAAW,gBACtBX,KAAA,CAAAY,aAAA,CAACH,SAAS,qBACRT,KAAA,CAAAY,aAAA,CAACT,QAAQ,MAAE,CACF,CACZ;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMU,eAAe,GAAG,SAAAA,CAAAC,KAAA;EAAA,IAAAC,IAAA,GAAAD,KAAA,cAQ3B,CAAC,CAAC,GAAAA,KAAA;IA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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","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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AAKC,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,13 +1,15 @@
|
|
|
1
1
|
import { ReactElement, ReactNode } from "react";
|
|
2
2
|
/**
|
|
3
3
|
* Shared spec-sheet scaffolding for the StackedCard concept stories (Sheet,
|
|
4
|
-
* Section, Labeled, Grid, Column) plus the
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Section, Labeled, Grid, Column) plus the sheet's `--sc-*` values.
|
|
5
|
+
* Presentation-only; keeps the StackedCard stories laying out the same way
|
|
6
|
+
* instead of each re-declaring the sheet chrome.
|
|
7
7
|
*
|
|
8
|
-
* The `--sc-*` variables
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* The `--sc-*` variables (a selection ring + a dark scrim family) are the
|
|
9
|
+
* shipped component's theming hooks: `components/StackedCard` reads each one
|
|
10
|
+
* through a `var()` with a built-in fallback, and declaring them here on the
|
|
11
|
+
* sheet retints every card inside it. No rgba/hex is baked into a reusable
|
|
12
|
+
* style.
|
|
11
13
|
*/
|
|
12
14
|
export declare const StyledSheet: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
13
15
|
export declare const StyledGrid: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storyScaffold.d.ts","sourceRoot":"","sources":["../../../../src/presentation/stackedCard/storyScaffold.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvD
|
|
1
|
+
{"version":3,"file":"storyScaffold.d.ts","sourceRoot":"","sources":["../../../../src/presentation/stackedCard/storyScaffold.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvD;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,WAAW,oEAoBvB,CAAC;AAmBF,eAAO,MAAM,UAAU,oEAKtB,CAAC;AAEF,eAAO,MAAM,YAAY,oEAIxB,CAAC;AAcF,eAAO,MAAM,OAAO,GAAI,sBAGrB;IACD,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,SAAS,CAAC;CACrB,KAAG,YAOH,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,8BAIrB;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,SAAS,CAAC;CACrB,KAAG,YAYH,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,sBAG1B;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;CACrB,KAAG,YAOH,CAAC"}
|
|
@@ -4,13 +4,15 @@ import { Caption1, Title2 } from "../../components/Typography";
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Shared spec-sheet scaffolding for the StackedCard concept stories (Sheet,
|
|
7
|
-
* Section, Labeled, Grid, Column) plus the
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* Section, Labeled, Grid, Column) plus the sheet's `--sc-*` values.
|
|
8
|
+
* Presentation-only; keeps the StackedCard stories laying out the same way
|
|
9
|
+
* instead of each re-declaring the sheet chrome.
|
|
10
10
|
*
|
|
11
|
-
* The `--sc-*` variables
|
|
12
|
-
*
|
|
13
|
-
*
|
|
11
|
+
* The `--sc-*` variables (a selection ring + a dark scrim family) are the
|
|
12
|
+
* shipped component's theming hooks: `components/StackedCard` reads each one
|
|
13
|
+
* through a `var()` with a built-in fallback, and declaring them here on the
|
|
14
|
+
* sheet retints every card inside it. No rgba/hex is baked into a reusable
|
|
15
|
+
* style.
|
|
14
16
|
*/
|
|
15
17
|
|
|
16
18
|
export const StyledSheet = styled.div.withConfig({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storyScaffold.js","names":["React","styled","Caption1","Title2","StyledSheet","div","withConfig","displayName","componentId","StyledSection","section","StyledGrid","StyledColumn","StyledLabeled","figure","Labeled","_ref","label","children","createElement","color","Section","_ref2","caption","note","weight","className","SheetHeading","_ref3","title","Fragment"],"sources":["../../../../src/presentation/stackedCard/storyScaffold.tsx"],"sourcesContent":["import React, { ReactElement, ReactNode } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { Caption1, Title2 } from \"../../components/Typography\";\n\n/**\n * Shared spec-sheet scaffolding for the StackedCard concept stories (Sheet,\n * Section, Labeled, Grid, Column) plus the
|
|
1
|
+
{"version":3,"file":"storyScaffold.js","names":["React","styled","Caption1","Title2","StyledSheet","div","withConfig","displayName","componentId","StyledSection","section","StyledGrid","StyledColumn","StyledLabeled","figure","Labeled","_ref","label","children","createElement","color","Section","_ref2","caption","note","weight","className","SheetHeading","_ref3","title","Fragment"],"sources":["../../../../src/presentation/stackedCard/storyScaffold.tsx"],"sourcesContent":["import React, { ReactElement, ReactNode } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { Caption1, Title2 } from \"../../components/Typography\";\n\n/**\n * Shared spec-sheet scaffolding for the StackedCard concept stories (Sheet,\n * Section, Labeled, Grid, Column) plus the sheet's `--sc-*` values.\n * Presentation-only; keeps the StackedCard stories laying out the same way\n * instead of each re-declaring the sheet chrome.\n *\n * The `--sc-*` variables (a selection ring + a dark scrim family) are the\n * shipped component's theming hooks: `components/StackedCard` reads each one\n * through a `var()` with a built-in fallback, and declaring them here on the\n * sheet retints every card inside it. No rgba/hex is baked into a reusable\n * style.\n */\n\nexport const StyledSheet = styled.div`\n --sc-selection-ring: var(--color-primary-500, #2f6bff);\n --sc-scrim: rgba(0, 0, 0, 0.55);\n --sc-scrim-strong: rgba(0, 0, 0, 0.72);\n --sc-scrim-fg: #ffffff;\n --sc-completed-tint: rgba(72, 201, 176, 0.16);\n\n min-height: 100vh;\n padding: 32px 40px 64px;\n background: var(--page-paper-dimmed, var(--color-theme-200));\n\n .sheet-title {\n margin-bottom: 8px;\n }\n\n .sheet-lede {\n display: block;\n margin-bottom: 24px;\n max-width: 760px;\n }\n`;\n\nconst StyledSection = styled.section`\n margin-top: 40px;\n\n > .section-caption {\n display: block;\n margin-bottom: 4px;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n }\n\n > .section-note {\n display: block;\n margin-bottom: 16px;\n max-width: 720px;\n }\n`;\n\nexport const StyledGrid = styled.div`\n display: flex;\n flex-wrap: wrap;\n gap: 24px;\n align-items: flex-start;\n`;\n\nexport const StyledColumn = styled.div`\n display: flex;\n flex-direction: column;\n gap: 12px;\n`;\n\nconst StyledLabeled = styled.figure`\n margin: 0;\n display: flex;\n flex-direction: column;\n gap: 8px;\n\n > figcaption {\n order: -1;\n max-width: 320px;\n }\n`;\n\nexport const Labeled = ({\n label,\n children,\n}: {\n label: ReactNode;\n children: ReactNode;\n}): ReactElement => (\n <StyledLabeled>\n <figcaption>\n <Caption1 color=\"secondary\">{label}</Caption1>\n </figcaption>\n {children}\n </StyledLabeled>\n);\n\nexport const Section = ({\n caption,\n note,\n children,\n}: {\n caption: string;\n note?: ReactNode;\n children: ReactNode;\n}): ReactElement => (\n <StyledSection>\n <Caption1 weight=\"bold\" color=\"tertiary\" className=\"section-caption\">\n {caption}\n </Caption1>\n {note ? (\n <Caption1 color=\"tertiary\" className=\"section-note\">\n {note}\n </Caption1>\n ) : null}\n <StyledGrid>{children}</StyledGrid>\n </StyledSection>\n);\n\nexport const SheetHeading = ({\n title,\n children,\n}: {\n title: string;\n children: ReactNode;\n}): ReactElement => (\n <>\n <Title2 className=\"sheet-title\">{title}</Title2>\n <Caption1 color=\"tertiary\" className=\"sheet-lede\">\n {children}\n </Caption1>\n </>\n);\n"],"mappings":"AAAA,OAAOA,KAAK,MAAmC,OAAO;AAEtD,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,SAASC,QAAQ,EAAEC,MA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