@activecollab/components 2.0.408 → 2.0.410
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/BreakPoints.js +12 -1
- package/dist/cjs/components/BreakPoints.js.map +1 -1
- package/dist/cjs/components/Columns/Columns.js +42 -0
- package/dist/cjs/components/Columns/Columns.js.map +1 -0
- package/dist/cjs/components/Columns/Styles.js +25 -0
- package/dist/cjs/components/Columns/Styles.js.map +1 -0
- package/dist/cjs/components/Columns/index.js +17 -0
- package/dist/cjs/components/Columns/index.js.map +1 -0
- package/dist/cjs/components/Icons/collection/Project.js +98 -0
- package/dist/cjs/components/Icons/collection/Project.js.map +1 -0
- package/dist/cjs/components/Icons/collection/Task.js +61 -0
- package/dist/cjs/components/Icons/collection/Task.js.map +1 -0
- package/dist/cjs/components/Icons/collection/index.js +14 -0
- package/dist/cjs/components/Icons/collection/index.js.map +1 -1
- package/dist/cjs/components/LayoutTokens.js +21 -0
- package/dist/cjs/components/LayoutTokens.js.map +1 -0
- package/dist/cjs/components/Media/Media.js +39 -0
- package/dist/cjs/components/Media/Media.js.map +1 -0
- package/dist/cjs/components/Media/Styles.js +18 -0
- package/dist/cjs/components/Media/Styles.js.map +1 -0
- package/dist/cjs/components/Media/index.js +17 -0
- package/dist/cjs/components/Media/index.js.map +1 -0
- package/dist/cjs/components/PortableText/PortableText.js +125 -0
- package/dist/cjs/components/PortableText/PortableText.js.map +1 -0
- package/dist/cjs/components/PortableText/Styles.js +33 -0
- package/dist/cjs/components/PortableText/Styles.js.map +1 -0
- package/dist/cjs/components/PortableText/index.js +39 -0
- package/dist/cjs/components/PortableText/index.js.map +1 -0
- package/dist/cjs/components/PortableText/renderers.js +116 -0
- package/dist/cjs/components/PortableText/renderers.js.map +1 -0
- package/dist/cjs/components/PortableText/types.js +122 -0
- package/dist/cjs/components/PortableText/types.js.map +1 -0
- package/dist/cjs/components/PortableText/types.test.js +183 -0
- package/dist/cjs/components/PortableText/types.test.js.map +1 -0
- package/dist/cjs/components/Row/Row.js +30 -0
- package/dist/cjs/components/Row/Row.js.map +1 -0
- package/dist/cjs/components/Row/Styles.js +25 -0
- package/dist/cjs/components/Row/Styles.js.map +1 -0
- package/dist/cjs/components/Row/index.js +17 -0
- package/dist/cjs/components/Row/index.js.map +1 -0
- package/dist/cjs/components/Stack/Stack.js +27 -0
- package/dist/cjs/components/Stack/Stack.js.map +1 -0
- package/dist/cjs/components/Stack/Styles.js +21 -0
- package/dist/cjs/components/Stack/Styles.js.map +1 -0
- package/dist/cjs/components/Stack/index.js +17 -0
- package/dist/cjs/components/Stack/index.js.map +1 -0
- package/dist/cjs/components/Tiles/Styles.js +25 -0
- package/dist/cjs/components/Tiles/Styles.js.map +1 -0
- package/dist/cjs/components/Tiles/Tiles.js +29 -0
- package/dist/cjs/components/Tiles/Tiles.js.map +1 -0
- package/dist/cjs/components/Tiles/index.js +17 -0
- package/dist/cjs/components/Tiles/index.js.map +1 -0
- package/dist/cjs/components/TitledText/Styles.js +15 -0
- package/dist/cjs/components/TitledText/Styles.js.map +1 -0
- package/dist/cjs/components/TitledText/TitledText.js +50 -0
- package/dist/cjs/components/TitledText/TitledText.js.map +1 -0
- package/dist/cjs/components/TitledText/index.js +17 -0
- package/dist/cjs/components/TitledText/index.js.map +1 -0
- package/dist/cjs/components/index.js +88 -0
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/presentation/shared/MessageDialog.js +351 -0
- package/dist/cjs/presentation/shared/MessageDialog.js.map +1 -0
- package/dist/cjs/presentation/shared/index.js +22 -0
- package/dist/cjs/presentation/shared/index.js.map +1 -1
- package/dist/cjs/presentation/stackedCard/content/NoteCard.js +7 -3
- package/dist/cjs/presentation/stackedCard/content/NoteCard.js.map +1 -1
- package/dist/cjs/presentation/stackedCard/content/ProjectCard.js +136 -0
- package/dist/cjs/presentation/stackedCard/content/ProjectCard.js.map +1 -0
- package/dist/cjs/presentation/stackedCard/content/TaskCard.js +183 -56
- package/dist/cjs/presentation/stackedCard/content/TaskCard.js.map +1 -1
- package/dist/cjs/presentation/stackedCard/content/index.js +11 -0
- package/dist/cjs/presentation/stackedCard/content/index.js.map +1 -1
- package/dist/cjs/presentation/stackedCard/content/shared.js +66 -19
- package/dist/cjs/presentation/stackedCard/content/shared.js.map +1 -1
- package/dist/cjs/presentation/whiteboard/bottomDock.js +95 -32
- package/dist/cjs/presentation/whiteboard/bottomDock.js.map +1 -1
- package/dist/cjs/presentation/whiteboard/canvasElements.js +196 -8
- package/dist/cjs/presentation/whiteboard/canvasElements.js.map +1 -1
- package/dist/cjs/presentation/whiteboard/inspector.js +149 -47
- package/dist/cjs/presentation/whiteboard/inspector.js.map +1 -1
- package/dist/cjs/presentation/whiteboard/outline.js +91 -18
- package/dist/cjs/presentation/whiteboard/outline.js.map +1 -1
- package/dist/cjs/presentation/whiteboard/projectElements.js +883 -0
- package/dist/cjs/presentation/whiteboard/projectElements.js.map +1 -0
- package/dist/esm/components/BreakPoints.d.ts +2 -0
- package/dist/esm/components/BreakPoints.d.ts.map +1 -1
- package/dist/esm/components/BreakPoints.js +9 -0
- package/dist/esm/components/BreakPoints.js.map +1 -1
- package/dist/esm/components/Columns/Columns.d.ts +11 -0
- package/dist/esm/components/Columns/Columns.d.ts.map +1 -0
- package/dist/esm/components/Columns/Columns.js +34 -0
- package/dist/esm/components/Columns/Columns.js.map +1 -0
- package/dist/esm/components/Columns/Styles.d.ts +8 -0
- package/dist/esm/components/Columns/Styles.d.ts.map +1 -0
- package/dist/esm/components/Columns/Styles.js +18 -0
- package/dist/esm/components/Columns/Styles.js.map +1 -0
- package/dist/esm/components/Columns/index.d.ts +2 -0
- package/dist/esm/components/Columns/index.d.ts.map +1 -0
- package/dist/esm/components/Columns/index.js +2 -0
- package/dist/esm/components/Columns/index.js.map +1 -0
- package/dist/esm/components/Icons/collection/Project.d.ts +36 -0
- package/dist/esm/components/Icons/collection/Project.d.ts.map +1 -0
- package/dist/esm/components/Icons/collection/Project.js +91 -0
- package/dist/esm/components/Icons/collection/Project.js.map +1 -0
- package/dist/esm/components/Icons/collection/Task.d.ts +32 -0
- package/dist/esm/components/Icons/collection/Task.d.ts.map +1 -0
- package/dist/esm/components/Icons/collection/Task.js +54 -0
- package/dist/esm/components/Icons/collection/Task.js.map +1 -0
- package/dist/esm/components/Icons/collection/index.d.ts +2 -0
- package/dist/esm/components/Icons/collection/index.d.ts.map +1 -1
- package/dist/esm/components/Icons/collection/index.js +2 -0
- package/dist/esm/components/Icons/collection/index.js.map +1 -1
- package/dist/esm/components/LayoutTokens.d.ts +6 -0
- package/dist/esm/components/LayoutTokens.d.ts.map +1 -0
- package/dist/esm/components/LayoutTokens.js +15 -0
- package/dist/esm/components/LayoutTokens.js.map +1 -0
- package/dist/esm/components/Media/Media.d.ts +10 -0
- package/dist/esm/components/Media/Media.d.ts.map +1 -0
- package/dist/esm/components/Media/Media.js +31 -0
- package/dist/esm/components/Media/Media.js.map +1 -0
- package/dist/esm/components/Media/Styles.d.ts +4 -0
- package/dist/esm/components/Media/Styles.d.ts.map +1 -0
- package/dist/esm/components/Media/Styles.js +11 -0
- package/dist/esm/components/Media/Styles.js.map +1 -0
- package/dist/esm/components/Media/index.d.ts +2 -0
- package/dist/esm/components/Media/index.d.ts.map +1 -0
- package/dist/esm/components/Media/index.js +2 -0
- package/dist/esm/components/Media/index.js.map +1 -0
- package/dist/esm/components/PortableText/PortableText.d.ts +24 -0
- package/dist/esm/components/PortableText/PortableText.d.ts.map +1 -0
- package/dist/esm/components/PortableText/PortableText.js +111 -0
- package/dist/esm/components/PortableText/PortableText.js.map +1 -0
- package/dist/esm/components/PortableText/Styles.d.ts +9 -0
- package/dist/esm/components/PortableText/Styles.d.ts.map +1 -0
- package/dist/esm/components/PortableText/Styles.js +27 -0
- package/dist/esm/components/PortableText/Styles.js.map +1 -0
- package/dist/esm/components/PortableText/index.d.ts +4 -0
- package/dist/esm/components/PortableText/index.d.ts.map +1 -0
- package/dist/esm/components/PortableText/index.js +4 -0
- package/dist/esm/components/PortableText/index.js.map +1 -0
- package/dist/esm/components/PortableText/renderers.d.ts +9 -0
- package/dist/esm/components/PortableText/renderers.d.ts.map +1 -0
- package/dist/esm/components/PortableText/renderers.js +110 -0
- package/dist/esm/components/PortableText/renderers.js.map +1 -0
- package/dist/esm/components/PortableText/types.d.ts +141 -0
- package/dist/esm/components/PortableText/types.d.ts.map +1 -0
- package/dist/esm/components/PortableText/types.js +106 -0
- package/dist/esm/components/PortableText/types.js.map +1 -0
- package/dist/esm/components/PortableText/types.test.d.ts +2 -0
- package/dist/esm/components/PortableText/types.test.d.ts.map +1 -0
- package/dist/esm/components/PortableText/types.test.js +181 -0
- package/dist/esm/components/PortableText/types.test.js.map +1 -0
- package/dist/esm/components/Row/Row.d.ts +10 -0
- package/dist/esm/components/Row/Row.d.ts.map +1 -0
- package/dist/esm/components/Row/Row.js +22 -0
- package/dist/esm/components/Row/Row.js.map +1 -0
- package/dist/esm/components/Row/Styles.d.ts +8 -0
- package/dist/esm/components/Row/Styles.d.ts.map +1 -0
- package/dist/esm/components/Row/Styles.js +18 -0
- package/dist/esm/components/Row/Styles.js.map +1 -0
- package/dist/esm/components/Row/index.d.ts +2 -0
- package/dist/esm/components/Row/index.d.ts.map +1 -0
- package/dist/esm/components/Row/index.js +2 -0
- package/dist/esm/components/Row/index.js.map +1 -0
- package/dist/esm/components/Stack/Stack.d.ts +8 -0
- package/dist/esm/components/Stack/Stack.d.ts.map +1 -0
- package/dist/esm/components/Stack/Stack.js +19 -0
- package/dist/esm/components/Stack/Stack.js.map +1 -0
- package/dist/esm/components/Stack/Styles.d.ts +6 -0
- package/dist/esm/components/Stack/Styles.d.ts.map +1 -0
- package/dist/esm/components/Stack/Styles.js +14 -0
- package/dist/esm/components/Stack/Styles.js.map +1 -0
- package/dist/esm/components/Stack/index.d.ts +2 -0
- package/dist/esm/components/Stack/index.d.ts.map +1 -0
- package/dist/esm/components/Stack/index.js +2 -0
- package/dist/esm/components/Stack/index.js.map +1 -0
- package/dist/esm/components/Tiles/Styles.d.ts +8 -0
- package/dist/esm/components/Tiles/Styles.d.ts.map +1 -0
- package/dist/esm/components/Tiles/Styles.js +18 -0
- package/dist/esm/components/Tiles/Styles.js.map +1 -0
- package/dist/esm/components/Tiles/Tiles.d.ts +10 -0
- package/dist/esm/components/Tiles/Tiles.d.ts.map +1 -0
- package/dist/esm/components/Tiles/Tiles.js +21 -0
- package/dist/esm/components/Tiles/Tiles.js.map +1 -0
- package/dist/esm/components/Tiles/index.d.ts +2 -0
- package/dist/esm/components/Tiles/index.d.ts.map +1 -0
- package/dist/esm/components/Tiles/index.js +2 -0
- package/dist/esm/components/Tiles/index.js.map +1 -0
- package/dist/esm/components/TitledText/Styles.d.ts +2 -0
- package/dist/esm/components/TitledText/Styles.d.ts.map +1 -0
- package/dist/esm/components/TitledText/Styles.js +8 -0
- package/dist/esm/components/TitledText/Styles.js.map +1 -0
- package/dist/esm/components/TitledText/TitledText.d.ts +18 -0
- package/dist/esm/components/TitledText/TitledText.d.ts.map +1 -0
- package/dist/esm/components/TitledText/TitledText.js +43 -0
- package/dist/esm/components/TitledText/TitledText.js.map +1 -0
- package/dist/esm/components/TitledText/index.d.ts +2 -0
- package/dist/esm/components/TitledText/index.d.ts.map +1 -0
- package/dist/esm/components/TitledText/index.js +2 -0
- package/dist/esm/components/TitledText/index.js.map +1 -0
- package/dist/esm/components/index.d.ts +8 -0
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +8 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/presentation/shared/MessageDialog.d.ts +35 -0
- package/dist/esm/presentation/shared/MessageDialog.d.ts.map +1 -0
- package/dist/esm/presentation/shared/MessageDialog.js +331 -0
- package/dist/esm/presentation/shared/MessageDialog.js.map +1 -0
- package/dist/esm/presentation/shared/index.d.ts +2 -0
- package/dist/esm/presentation/shared/index.d.ts.map +1 -1
- package/dist/esm/presentation/shared/index.js +1 -0
- package/dist/esm/presentation/shared/index.js.map +1 -1
- package/dist/esm/presentation/stackedCard/content/NoteCard.d.ts +8 -1
- package/dist/esm/presentation/stackedCard/content/NoteCard.d.ts.map +1 -1
- package/dist/esm/presentation/stackedCard/content/NoteCard.js +8 -4
- package/dist/esm/presentation/stackedCard/content/NoteCard.js.map +1 -1
- package/dist/esm/presentation/stackedCard/content/ProjectCard.d.ts +64 -0
- package/dist/esm/presentation/stackedCard/content/ProjectCard.d.ts.map +1 -0
- package/dist/esm/presentation/stackedCard/content/ProjectCard.js +128 -0
- package/dist/esm/presentation/stackedCard/content/ProjectCard.js.map +1 -0
- package/dist/esm/presentation/stackedCard/content/TaskCard.d.ts +64 -2
- package/dist/esm/presentation/stackedCard/content/TaskCard.d.ts.map +1 -1
- package/dist/esm/presentation/stackedCard/content/TaskCard.js +181 -58
- package/dist/esm/presentation/stackedCard/content/TaskCard.js.map +1 -1
- package/dist/esm/presentation/stackedCard/content/index.d.ts +1 -0
- package/dist/esm/presentation/stackedCard/content/index.d.ts.map +1 -1
- package/dist/esm/presentation/stackedCard/content/index.js +1 -0
- package/dist/esm/presentation/stackedCard/content/index.js.map +1 -1
- package/dist/esm/presentation/stackedCard/content/shared.d.ts +30 -0
- package/dist/esm/presentation/stackedCard/content/shared.d.ts.map +1 -1
- package/dist/esm/presentation/stackedCard/content/shared.js +66 -19
- package/dist/esm/presentation/stackedCard/content/shared.js.map +1 -1
- package/dist/esm/presentation/whiteboard/bottomDock.d.ts +30 -7
- package/dist/esm/presentation/whiteboard/bottomDock.d.ts.map +1 -1
- package/dist/esm/presentation/whiteboard/bottomDock.js +79 -32
- package/dist/esm/presentation/whiteboard/bottomDock.js.map +1 -1
- package/dist/esm/presentation/whiteboard/canvasElements.d.ts +4 -1
- package/dist/esm/presentation/whiteboard/canvasElements.d.ts.map +1 -1
- package/dist/esm/presentation/whiteboard/canvasElements.js +158 -7
- package/dist/esm/presentation/whiteboard/canvasElements.js.map +1 -1
- package/dist/esm/presentation/whiteboard/inspector.d.ts +35 -1
- package/dist/esm/presentation/whiteboard/inspector.d.ts.map +1 -1
- package/dist/esm/presentation/whiteboard/inspector.js +170 -68
- package/dist/esm/presentation/whiteboard/inspector.js.map +1 -1
- package/dist/esm/presentation/whiteboard/outline.d.ts +23 -3
- package/dist/esm/presentation/whiteboard/outline.d.ts.map +1 -1
- package/dist/esm/presentation/whiteboard/outline.js +89 -18
- package/dist/esm/presentation/whiteboard/outline.js.map +1 -1
- package/dist/esm/presentation/whiteboard/projectElements.d.ts +267 -0
- package/dist/esm/presentation/whiteboard/projectElements.d.ts.map +1 -0
- package/dist/esm/presentation/whiteboard/projectElements.js +824 -0
- package/dist/esm/presentation/whiteboard/projectElements.js.map +1 -0
- package/dist/index.js +1490 -738
- 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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MessageDialog.js","names":["_react","_interopRequireWildcard","require","_styledComponents","_interopRequireDefault","_BreakPoints","_Button","_Columns","_IconButton","_Icons","_InfoBox","_Media","_Modal","_PortableText","_Styles","_Row","_Stack","_Tiles","_Tooltip","_Typography","_Typography2","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","TypeError","a","_arrayLikeToArray","toString","slice","constructor","name","Array","from","test","length","l","Symbol","iterator","u","next","done","push","value","return","isArray","DIALOG_WIDTH","sm","md","lg","StyledFeedback","styled","div","withConfig","displayName","componentId","screenBelow","DialogFeedback","_ref","onVote","_useState","useState","_useState2","voted","setVoted","vote","useCallback","createElement","Body2","color","Fragment","className","Tooltip","title","IconButton","type","variant","onClick","ThumbUpOutlineIcon","StyledDialog","_ref2","$size","MessageDialog","exports","_ref3","open","onClose","_ref3$size","size","children","Modal","CancelCrossIcon","DocLinkContext","React","createContext","undefined","StyledInterfaceName","span","InterfaceNameMark","_ref4","StyledKeyboardKey","kbd","KeyboardKeyMark","_ref5","StyledDocLink","InlineLink","DocLinkMark","_ref6","mark","openArticle","useContext","href","event","preventDefault","article","CALLOUT_TYPE","info","note","success","CalloutObject","_ref7","_ref8","node","InfoBox","tone","showIcon","StyledButtonReference","ButtonReferenceObject","_ref9","_ref0","label","Button","tabIndex","RowObject","_ref1","_ref10","Row","space","TilesObject","_ref11","_ref12","Tiles","columns","collapseBelow","SplitObject","_ref13","_ref14","media","widths","textColumn","Stack","src","screenshot","mediaColumn","Media","alt","caption","Columns","reverse","alignY","ParagraphBlock","_ref15","lineHeight","ListItemBlock","_ref16","Typography","as","DefaultTitledText","portableTextDefaultBlockRenderers","TitledTextBlock","_ref17","block","messageComponents","marks","objects","callout","row","tiles","split","blocks","paragraph"],"sources":["../../../../src/presentation/shared/MessageDialog.tsx"],"sourcesContent":["import React, {\n ReactElement,\n ReactNode,\n useCallback,\n useContext,\n useState,\n} from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { screenBelow } from \"../../components/BreakPoints\";\nimport { Button } from \"../../components/Button\";\nimport { Columns } from \"../../components/Columns\";\nimport { IconButton } from \"../../components/IconButton\";\nimport { CancelCrossIcon, ThumbUpOutlineIcon } from \"../../components/Icons\";\nimport { InfoBox, InfoBoxType } from \"../../components/InfoBox\";\nimport { Space } from \"../../components/LayoutTokens\";\nimport { Media } from \"../../components/Media\";\nimport { Modal } from \"../../components/Modal\";\nimport {\n portableTextDefaultBlockRenderers,\n PortableTextBlockRenderer,\n PortableTextComponents,\n PortableTextMarkRenderer,\n PortableTextMediaVariant,\n PortableTextObjectRenderer,\n} from \"../../components/PortableText\";\nimport { StyledLink as InlineLink } from \"../../components/PortableText/Styles\";\nimport { Row } from \"../../components/Row\";\nimport { Stack } from \"../../components/Stack\";\nimport { Tiles } from \"../../components/Tiles\";\nimport { Tooltip } from \"../../components/Tooltip\";\nimport { Body2 } from \"../../components/Typography\";\nimport { Typography } from \"../../components/Typography/Typography\";\n\n/**\n * The in-app message dialog, as a Presentation mock.\n *\n * Two pieces, mirroring how the product is split:\n *\n * - {@link MessageDialog} — the hollow dialog shell (width, closing,\n * feedback), built only from design-system parts. In the product this shell\n * lives in the application as `InAppMessageDialog`.\n * - {@link messageComponents} — a demo message element catalog injected into\n * the design-system Portable Text engine, exactly like the typed cards\n * injected into the hollow StackedCard shell. In the product the catalog is\n * application code; the presentation ships this demo copy so the stories\n * need no app imports.\n */\n\n/* ---- the dialog shell ---------------------------------------------- */\n\nexport type MessageDialogSize = \"sm\" | \"md\" | \"lg\";\n\nconst DIALOG_WIDTH: Record<MessageDialogSize, string> = {\n sm: \"520px\",\n md: \"720px\",\n lg: \"880px\",\n};\n\n/* Feedback — the thumbs up / down slot. Down-vote reuses the up icon,\n rotated (the DS set only ships ThumbUpOutlineIcon). */\nconst StyledFeedback = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n padding: 8px 24px 28px;\n\n ${screenBelow.sm} {\n padding: 4px 24px 24px;\n }\n\n .fb-question {\n margin-right: 4px;\n }\n\n .fb-btn svg {\n width: 18px;\n height: 18px;\n }\n\n .fb-down svg {\n transform: rotate(180deg);\n }\n`;\n\nconst DialogFeedback = ({\n onVote,\n}: {\n onVote?: (vote: \"up\" | \"down\") => void;\n}): ReactElement => {\n const [voted, setVoted] = useState<\"up\" | \"down\" | null>(null);\n const vote = useCallback(\n (value: \"up\" | \"down\") => {\n setVoted(value);\n onVote?.(value);\n },\n [onVote]\n );\n\n return (\n <StyledFeedback>\n {voted ? (\n <Body2 color=\"secondary\">Thanks for your feedback!</Body2>\n ) : (\n <>\n <Body2 color=\"secondary\" className=\"fb-question\">\n Was this helpful?\n </Body2>\n <Tooltip title=\"Yes, helpful\">\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n className=\"fb-btn\"\n aria-label=\"Yes, helpful\"\n onClick={() => vote(\"up\")}\n >\n <ThumbUpOutlineIcon />\n </IconButton>\n </Tooltip>\n <Tooltip title=\"No, not helpful\">\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n className=\"fb-btn fb-down\"\n aria-label=\"No, not helpful\"\n onClick={() => vote(\"down\")}\n >\n <ThumbUpOutlineIcon />\n </IconButton>\n </Tooltip>\n </>\n )}\n </StyledFeedback>\n );\n};\n\n/* The shell is behaviour only: it sizes itself, closes on click-outside /\n Esc (DS Modal) / the X, and shows the feedback slot when an onVote handler\n is supplied. Content is whatever the caller renders as children — usually\n the Portable Text engine with the demo catalog injected. */\nconst StyledDialog = styled.div<{ $size: MessageDialogSize }>`\n position: relative;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n width: calc(100% - 32px);\n max-width: ${({ $size }) => DIALOG_WIDTH[$size]};\n max-height: calc(100vh - 96px);\n margin: 56px auto 40px;\n overflow-y: auto;\n background-color: var(--page-paper-main);\n color: var(--color-theme-900);\n border-radius: 12px;\n box-shadow: var(--shadow-primary);\n\n ${screenBelow.sm} {\n margin: 16px auto;\n }\n\n /* X floats in the corner and overlaps the content padding — it does not\n reserve a row of its own. */\n .dlg-close {\n position: absolute;\n top: 12px;\n right: 12px;\n z-index: 2;\n }\n\n .dlg-content {\n padding: 40px;\n }\n\n ${screenBelow.sm} {\n .dlg-content {\n padding: 32px 20px 24px;\n }\n }\n`;\n\nexport interface MessageDialogProps {\n open: boolean;\n onClose: () => void;\n size?: MessageDialogSize;\n /** Supplying a handler shows the centred helpful / not-helpful vote. */\n onVote?: (vote: \"up\" | \"down\") => void;\n children: ReactNode;\n}\n\nexport const MessageDialog = ({\n open,\n onClose,\n size = \"md\",\n onVote,\n children,\n}: MessageDialogProps): ReactElement => (\n <Modal open={open} onClose={onClose}>\n <StyledDialog $size={size}>\n <div className=\"dlg-close\">\n <Tooltip title=\"Close\">\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n aria-label=\"Close\"\n onClick={onClose}\n >\n <CancelCrossIcon />\n </IconButton>\n </Tooltip>\n </div>\n <div className=\"dlg-content\">{children}</div>\n {onVote ? <DialogFeedback onVote={onVote} /> : null}\n </StyledDialog>\n </Modal>\n);\n\n/* ---- doc-link wiring ------------------------------------------------ */\n\n/** How a doc-link mark opens its article (by a slug-like reference). The\n surface that renders the message supplies the handler — in the product it\n closes the dialog and opens the article Sheet. */\nexport type OpenArticleHandler = (article?: string) => void;\n\nexport const DocLinkContext = React.createContext<OpenArticleHandler>(\n () => undefined\n);\n\n/* ---- the demo message element catalog ------------------------------- */\n\n/* Inline marks ------------------------------------------------------- */\n\n/* interface-name — the name of an interface element, e.g. the Security page. */\nconst StyledInterfaceName = styled.span`\n padding: 0 4px;\n border-radius: 4px;\n background-color: var(--color-theme-300);\n color: var(--color-theme-900);\n font-weight: 600;\n white-space: nowrap;\n`;\nconst InterfaceNameMark: PortableTextMarkRenderer = ({ children }) => (\n <StyledInterfaceName>{children}</StyledInterfaceName>\n);\n\n/* keyboard-key — a keyboard key cap. */\nconst StyledKeyboardKey = styled.kbd`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 20px;\n height: 20px;\n padding: 0 6px;\n border: 1px solid var(--border-primary);\n border-bottom-width: 2px;\n border-radius: 5px;\n background-color: var(--color-theme-200);\n color: var(--color-theme-900);\n font-family: ui-monospace, \"SFMono-Regular\", Menlo, Consolas, monospace;\n font-size: 11px;\n font-weight: 600;\n line-height: 1;\n vertical-align: baseline;\n`;\nconst KeyboardKeyMark: PortableTextMarkRenderer = ({ children }) => (\n <StyledKeyboardKey>{children}</StyledKeyboardKey>\n);\n\n/* doc-link — an inline link that opens a full help article. The mark carries\n an article reference; the open behaviour comes from DocLinkContext, so the\n authored content stays declarative. */\n/* Built on the engine's inline anchor so a doc-link sits in the sentence\n exactly like a default link mark — same size, weight and line box as the\n surrounding copy — just recoloured. */\nconst StyledDocLink = styled(InlineLink)`\n color: var(--color-secondary);\n text-decoration-color: var(--color-secondary);\n`;\nconst DocLinkMark: PortableTextMarkRenderer = ({ mark, children }) => {\n const openArticle = useContext(DocLinkContext);\n return (\n <StyledDocLink\n href=\"#\"\n onClick={(event: React.MouseEvent) => {\n event.preventDefault();\n openArticle(mark?.article as string | undefined);\n }}\n >\n {children}\n </StyledDocLink>\n );\n};\n\n/* Component objects --------------------------------------------------- */\n\n/* callout — rendered with the DS InfoBox; the catalog keeps its own tone\n vocabulary and maps it to InfoBox types. */\ntype CalloutTone = \"info\" | \"note\" | \"success\";\nconst CALLOUT_TYPE: Record<CalloutTone, InfoBoxType> = {\n info: \"default\",\n note: \"note\",\n success: \"success\",\n};\nconst CalloutObject: PortableTextObjectRenderer = ({ node, children }) => (\n <InfoBox\n type={CALLOUT_TYPE[(node.tone as CalloutTone | undefined) ?? \"info\"]}\n title={node.title as string | undefined}\n showIcon\n >\n {children}\n </InfoBox>\n);\n\n/* button-reference — a real DS Button shown for reference as its own block,\n so a message can point at a button instead of screenshotting it. It is\n intentionally non-interactive. */\nconst StyledButtonReference = styled.div`\n display: flex;\n\n .c-button {\n pointer-events: none;\n }\n`;\ntype ButtonReferenceVariant =\n | \"primary\"\n | \"secondary\"\n | \"text colored\"\n | \"text gray\";\nconst ButtonReferenceObject: PortableTextObjectRenderer = ({ node }) => {\n if (typeof node.label !== \"string\") {\n return null;\n }\n\n return (\n <StyledButtonReference aria-hidden=\"true\">\n <Button\n variant={\n (node.variant as ButtonReferenceVariant | undefined) ?? \"primary\"\n }\n size=\"small\"\n type=\"button\"\n tabIndex={-1}\n >\n {node.label}\n </Button>\n </StyledButtonReference>\n );\n};\n\n/* row — a horizontal run of blocks (e.g. two button references). */\nconst RowObject: PortableTextObjectRenderer = ({ node, children }) => (\n <Row space={(node.space as Space | undefined) ?? \"sm\"}>{children}</Row>\n);\n\n/* tiles — an equal-size mosaic of blocks. */\nconst TilesObject: PortableTextObjectRenderer = ({ node, children }) => (\n <Tiles\n columns={(node.columns as number | undefined) ?? 3}\n space=\"md\"\n collapseBelow=\"sm\"\n >\n {children}\n </Tiles>\n);\n\n/* split — text beside media, with the one layout rule the messages follow:\n screenshots sit on the right, flat illustrations on the left. `widths` is\n authored as [text, media] and reordered with the columns. */\ninterface SplitMedia {\n src: string;\n alt?: string;\n variant?: PortableTextMediaVariant;\n caption?: string;\n}\nconst SplitObject: PortableTextObjectRenderer = ({ node, children }) => {\n const media = node.media as SplitMedia | undefined;\n const widths = (node.widths as number[] | undefined) ?? [1, 1];\n const textColumn = <Stack space=\"lg\">{children}</Stack>;\n\n // A split without media degrades to its text column instead of crashing.\n if (!media?.src) {\n return textColumn;\n }\n\n const screenshot = media.variant === \"screenshot\";\n\n const mediaColumn = (\n <Media\n src={media.src}\n alt={media.alt}\n variant={media.variant}\n caption={media.caption}\n />\n );\n\n return (\n <Columns\n widths={screenshot ? widths : [...widths].reverse()}\n space=\"xl\"\n alignY=\"center\"\n collapseBelow=\"md\"\n >\n {screenshot ? textColumn : mediaColumn}\n {screenshot ? mediaColumn : textColumn}\n </Columns>\n );\n};\n\n/* Default-block overrides --------------------------------------------- */\n\n/* The engine's defaults use Body 1 primary; the messages are designed on the\n quieter Body 2 secondary voice, so the catalog overrides the text blocks —\n demonstrating the `blocks` half of the injection contract. */\nconst ParagraphBlock: PortableTextBlockRenderer = ({ children }) => (\n <Body2 color=\"secondary\" lineHeight=\"loose\">\n {children}\n </Body2>\n);\n\nconst ListItemBlock: PortableTextBlockRenderer = ({ children }) => (\n <Typography variant=\"Body 2\" as=\"li\" color=\"secondary\" lineHeight=\"loose\">\n {children}\n </Typography>\n);\n\n/* Only the delta from the default renderer: the messages want a roomier\n rhythm between a titled section's content nodes. */\nconst DefaultTitledText = portableTextDefaultBlockRenderers[\"titled-text\"];\nconst TitledTextBlock: PortableTextBlockRenderer = ({ block, children }) => (\n <DefaultTitledText block={block}>\n {children ? <Stack space=\"sm\">{children}</Stack> : undefined}\n </DefaultTitledText>\n);\n\n/** The demo catalog the presentations inject into the Portable Text engine —\n the stand-in for the application's `messageComponents` map. */\nexport const messageComponents: PortableTextComponents = {\n marks: {\n \"interface-name\": InterfaceNameMark,\n \"keyboard-key\": KeyboardKeyMark,\n \"doc-link\": DocLinkMark,\n },\n objects: {\n callout: CalloutObject,\n \"button-reference\": ButtonReferenceObject,\n row: RowObject,\n tiles: TilesObject,\n split: SplitObject,\n },\n blocks: {\n paragraph: ParagraphBlock,\n \"list-item\": ListItemBlock,\n \"titled-text\": TitledTextBlock,\n },\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAQA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AAEA,IAAAS,MAAA,GAAAT,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AACA,IAAAW,aAAA,GAAAX,OAAA;AAQA,IAAAY,OAAA,GAAAZ,OAAA;AACA,IAAAa,IAAA,GAAAb,OAAA;AACA,IAAAc,MAAA,GAAAd,OAAA;AACA,IAAAe,MAAA,GAAAf,OAAA;AACA,IAAAgB,QAAA,GAAAhB,OAAA;AACA,IAAAiB,WAAA,GAAAjB,OAAA;AACA,IAAAkB,YAAA,GAAAlB,OAAA;AAAoE,SAAAE,uBAAAiB,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAApB,wBAAAoB,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAxB,uBAAA,YAAAA,wBAAAoB,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA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B,EAAEQ,qBAAqB;IACzCiD,GAAG,EAAE3C,SAAS;IACd4C,KAAK,EAAEvC,WAAW;IAClBwC,KAAK,EAAElC;EACT,CAAC;EACDmC,MAAM,EAAE;IACNC,SAAS,EAAEpB,cAAc;IACzB,WAAW,EAAEG,aAAa;IAC1B,aAAa,EAAEM;EACjB;AACF,CAAC","ignoreList":[]}
|
|
@@ -12,6 +12,9 @@ var _exportNames = {
|
|
|
12
12
|
ProjectPageHeader: true,
|
|
13
13
|
TabHeader: true,
|
|
14
14
|
FloatingControls: true,
|
|
15
|
+
MessageDialog: true,
|
|
16
|
+
DocLinkContext: true,
|
|
17
|
+
messageComponents: true,
|
|
15
18
|
HelpAndSupportMenu: true,
|
|
16
19
|
LinkingCommandsButton: true,
|
|
17
20
|
LinkBranchOrPullRequestDialog: true,
|
|
@@ -85,6 +88,12 @@ Object.defineProperty(exports, "CreateLoginCodeDialogs", {
|
|
|
85
88
|
return _TwoFactorDialogs.CreateLoginCodeDialogs;
|
|
86
89
|
}
|
|
87
90
|
});
|
|
91
|
+
Object.defineProperty(exports, "DocLinkContext", {
|
|
92
|
+
enumerable: true,
|
|
93
|
+
get: function get() {
|
|
94
|
+
return _MessageDialog.DocLinkContext;
|
|
95
|
+
}
|
|
96
|
+
});
|
|
88
97
|
Object.defineProperty(exports, "FloatingControls", {
|
|
89
98
|
enumerable: true,
|
|
90
99
|
get: function get() {
|
|
@@ -127,6 +136,12 @@ Object.defineProperty(exports, "MainLogo", {
|
|
|
127
136
|
return _MainLogo.MainLogo;
|
|
128
137
|
}
|
|
129
138
|
});
|
|
139
|
+
Object.defineProperty(exports, "MessageDialog", {
|
|
140
|
+
enumerable: true,
|
|
141
|
+
get: function get() {
|
|
142
|
+
return _MessageDialog.MessageDialog;
|
|
143
|
+
}
|
|
144
|
+
});
|
|
130
145
|
Object.defineProperty(exports, "PROJECT_REPOSITORIES", {
|
|
131
146
|
enumerable: true,
|
|
132
147
|
get: function get() {
|
|
@@ -271,6 +286,12 @@ Object.defineProperty(exports, "buildRepoOptions", {
|
|
|
271
286
|
return _ConnectRepositoryDialog.buildRepoOptions;
|
|
272
287
|
}
|
|
273
288
|
});
|
|
289
|
+
Object.defineProperty(exports, "messageComponents", {
|
|
290
|
+
enumerable: true,
|
|
291
|
+
get: function get() {
|
|
292
|
+
return _MessageDialog.messageComponents;
|
|
293
|
+
}
|
|
294
|
+
});
|
|
274
295
|
var _tokens = require("./tokens");
|
|
275
296
|
Object.keys(_tokens).forEach(function (key) {
|
|
276
297
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -288,6 +309,7 @@ var _RoundAvatar = require("./RoundAvatar");
|
|
|
288
309
|
var _PresentationShell = require("./PresentationShell");
|
|
289
310
|
var _headers = require("./headers");
|
|
290
311
|
var _FloatingControls = require("./FloatingControls");
|
|
312
|
+
var _MessageDialog = require("./MessageDialog");
|
|
291
313
|
var _HelpAndSupportMenu = require("./HelpAndSupportMenu");
|
|
292
314
|
var _LinkingCommandsButton = require("./LinkingCommandsButton");
|
|
293
315
|
var _LinkBranchOrPullRequestDialog = require("./LinkBranchOrPullRequestDialog");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_tokens","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_MainLogo","_RoundAvatar","_PresentationShell","_headers","_FloatingControls","_HelpAndSupportMenu","_LinkingCommandsButton","_LinkBranchOrPullRequestDialog","_ConnectRepositoryDialog","_WebhookLogsDialog","_SourceCodeSection","_SuggestSubtasksButton","_TaskOptionsMenu","_UserMenu","_TwoFactorShield","_TwoFactorDialogs","_settings"],"sources":["../../../../src/presentation/shared/index.ts"],"sourcesContent":["/**\n * Shared building blocks for the Presentation mock-ups (`Presentation/*`\n * stories). The application shell, page headers, tab bar and small widgets are\n * defined once here and reused by the List view, Column view, Task sheet and\n * empty-page stories so the chrome stays identical and in one place.\n */\nexport * from \"./tokens\";\nexport { MainLogo } from \"./MainLogo\";\nexport { RoundAvatar } from \"./RoundAvatar\";\nexport { PresentationShell, StyledPagePaper } from \"./PresentationShell\";\nexport type { PresentationShellProps } from \"./PresentationShell\";\nexport { PageHeader, ProjectPageHeader, TabHeader } from \"./headers\";\nexport type {\n PageHeaderProps,\n ProjectPageHeaderProps,\n TabHeaderProps,\n} from \"./headers\";\nexport { FloatingControls } from \"./FloatingControls\";\nexport { HelpAndSupportMenu } from \"./HelpAndSupportMenu\";\nexport type { HelpAndSupportMenuProps } from \"./HelpAndSupportMenu\";\nexport { LinkingCommandsButton } from \"./LinkingCommandsButton\";\nexport { LinkBranchOrPullRequestDialog } from \"./LinkBranchOrPullRequestDialog\";\nexport type { LinkBranchOrPullRequestDialogProps } from \"./LinkBranchOrPullRequestDialog\";\nexport {\n ConnectRepositoryDialog,\n RepositorySelect,\n buildRepoOptions,\n CONNECTIONS,\n PROJECT_REPOSITORIES,\n CONNECTABLE_REPOSITORIES,\n} from \"./ConnectRepositoryDialog\";\nexport type {\n ConnectRepositoryDialogProps,\n RepositorySelectProps,\n Connection,\n ConnectionService,\n Repository,\n} from \"./ConnectRepositoryDialog\";\nexport {\n WebhookLogsDialog,\n WEBHOOK_CONNECTIONS,\n WEBHOOK_REPOSITORIES,\n} from \"./WebhookLogsDialog\";\nexport type {\n WebhookLogsDialogProps,\n WebhookConnection,\n WebhookRepository,\n WebhookLog,\n} from \"./WebhookLogsDialog\";\nexport {\n SourceCodeSection,\n IssueRow,\n CodeRow,\n Spine,\n HistoryDialog,\n CompletedHeader,\n} from \"./SourceCodeSection\";\nexport type {\n IssueEntry,\n CodeEntry,\n Stage,\n HistoryEvent,\n StageState,\n CodeStatus,\n SectionVariant,\n} from \"./SourceCodeSection\";\nexport { SuggestSubtasksButton } from \"./SuggestSubtasksButton\";\nexport { TaskOptionsMenu, TaskListOptionsMenu } from \"./TaskOptionsMenu\";\nexport type {\n TaskOptionsMenuProps,\n TaskListOptionsMenuProps,\n} from \"./TaskOptionsMenu\";\nexport { UserMenu } from \"./UserMenu\";\nexport type { UserMenuProps, UserMenuVariant } from \"./UserMenu\";\nexport { TwoFactorShield } from \"./TwoFactorShield\";\nexport type { TwoFactorShieldProps } from \"./TwoFactorShield\";\nexport { BackupCodesDialogs, CreateLoginCodeDialogs } from \"./TwoFactorDialogs\";\nexport type {\n BackupCodesDialogsProps,\n CreateLoginCodeDialogsProps,\n} from \"./TwoFactorDialogs\";\nexport {\n SettingsHeader,\n SettingsContent,\n StyledSettingRow,\n RowText,\n SettingRow,\n} from \"./settings\";\nexport type { SettingsHeaderProps, SettingRowProps } from \"./settings\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["_tokens","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_MainLogo","_RoundAvatar","_PresentationShell","_headers","_FloatingControls","_MessageDialog","_HelpAndSupportMenu","_LinkingCommandsButton","_LinkBranchOrPullRequestDialog","_ConnectRepositoryDialog","_WebhookLogsDialog","_SourceCodeSection","_SuggestSubtasksButton","_TaskOptionsMenu","_UserMenu","_TwoFactorShield","_TwoFactorDialogs","_settings"],"sources":["../../../../src/presentation/shared/index.ts"],"sourcesContent":["/**\n * Shared building blocks for the Presentation mock-ups (`Presentation/*`\n * stories). The application shell, page headers, tab bar and small widgets are\n * defined once here and reused by the List view, Column view, Task sheet and\n * empty-page stories so the chrome stays identical and in one place.\n */\nexport * from \"./tokens\";\nexport { MainLogo } from \"./MainLogo\";\nexport { RoundAvatar } from \"./RoundAvatar\";\nexport { PresentationShell, StyledPagePaper } from \"./PresentationShell\";\nexport type { PresentationShellProps } from \"./PresentationShell\";\nexport { PageHeader, ProjectPageHeader, TabHeader } from \"./headers\";\nexport type {\n PageHeaderProps,\n ProjectPageHeaderProps,\n TabHeaderProps,\n} from \"./headers\";\nexport { FloatingControls } from \"./FloatingControls\";\nexport {\n MessageDialog,\n DocLinkContext,\n messageComponents,\n} from \"./MessageDialog\";\nexport type {\n MessageDialogProps,\n MessageDialogSize,\n OpenArticleHandler,\n} from \"./MessageDialog\";\nexport { HelpAndSupportMenu } from \"./HelpAndSupportMenu\";\nexport type { HelpAndSupportMenuProps } from \"./HelpAndSupportMenu\";\nexport { LinkingCommandsButton } from \"./LinkingCommandsButton\";\nexport { LinkBranchOrPullRequestDialog } from \"./LinkBranchOrPullRequestDialog\";\nexport type { LinkBranchOrPullRequestDialogProps } from \"./LinkBranchOrPullRequestDialog\";\nexport {\n ConnectRepositoryDialog,\n RepositorySelect,\n buildRepoOptions,\n CONNECTIONS,\n PROJECT_REPOSITORIES,\n CONNECTABLE_REPOSITORIES,\n} from \"./ConnectRepositoryDialog\";\nexport type {\n ConnectRepositoryDialogProps,\n RepositorySelectProps,\n Connection,\n ConnectionService,\n Repository,\n} from \"./ConnectRepositoryDialog\";\nexport {\n WebhookLogsDialog,\n WEBHOOK_CONNECTIONS,\n WEBHOOK_REPOSITORIES,\n} from \"./WebhookLogsDialog\";\nexport type {\n WebhookLogsDialogProps,\n WebhookConnection,\n WebhookRepository,\n WebhookLog,\n} from \"./WebhookLogsDialog\";\nexport {\n SourceCodeSection,\n IssueRow,\n CodeRow,\n Spine,\n HistoryDialog,\n CompletedHeader,\n} from \"./SourceCodeSection\";\nexport type {\n IssueEntry,\n CodeEntry,\n Stage,\n HistoryEvent,\n StageState,\n CodeStatus,\n SectionVariant,\n} from \"./SourceCodeSection\";\nexport { SuggestSubtasksButton } from \"./SuggestSubtasksButton\";\nexport { TaskOptionsMenu, TaskListOptionsMenu } from \"./TaskOptionsMenu\";\nexport type {\n TaskOptionsMenuProps,\n TaskListOptionsMenuProps,\n} from \"./TaskOptionsMenu\";\nexport { UserMenu } from \"./UserMenu\";\nexport type { UserMenuProps, UserMenuVariant } from \"./UserMenu\";\nexport { TwoFactorShield } from \"./TwoFactorShield\";\nexport type { TwoFactorShieldProps } from \"./TwoFactorShield\";\nexport { BackupCodesDialogs, CreateLoginCodeDialogs } from \"./TwoFactorDialogs\";\nexport type {\n BackupCodesDialogsProps,\n CreateLoginCodeDialogsProps,\n} from \"./TwoFactorDialogs\";\nexport {\n SettingsHeader,\n SettingsContent,\n StyledSettingRow,\n RowText,\n SettingRow,\n} from \"./settings\";\nexport type { SettingsHeaderProps, SettingRowProps } from \"./settings\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAAA,OAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,OAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAL,OAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAb,OAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,SAAA,GAAAb,OAAA;AACA,IAAAc,YAAA,GAAAd,OAAA;AACA,IAAAe,kBAAA,GAAAf,OAAA;AAEA,IAAAgB,QAAA,GAAAhB,OAAA;AAMA,IAAAiB,iBAAA,GAAAjB,OAAA;AACA,IAAAkB,cAAA,GAAAlB,OAAA;AAUA,IAAAmB,mBAAA,GAAAnB,OAAA;AAEA,IAAAoB,sBAAA,GAAApB,OAAA;AACA,IAAAqB,8BAAA,GAAArB,OAAA;AAEA,IAAAsB,wBAAA,GAAAtB,OAAA;AAeA,IAAAuB,kBAAA,GAAAvB,OAAA;AAWA,IAAAwB,kBAAA,GAAAxB,OAAA;AAiBA,IAAAyB,sBAAA,GAAAzB,OAAA;AACA,IAAA0B,gBAAA,GAAA1B,OAAA;AAKA,IAAA2B,SAAA,GAAA3B,OAAA;AAEA,IAAA4B,gBAAA,GAAA5B,OAAA;AAEA,IAAA6B,iBAAA,GAAA7B,OAAA;AAKA,IAAA8B,SAAA,GAAA9B,OAAA","ignoreList":[]}
|
|
@@ -31,12 +31,16 @@ var NoteCard = exports.NoteCard = function NoteCard(_ref) {
|
|
|
31
31
|
var _ref$title = _ref.title,
|
|
32
32
|
title = _ref$title === void 0 ? "Kickoff notes" : _ref$title,
|
|
33
33
|
_ref$body = _ref.body,
|
|
34
|
-
body = _ref$body === void 0 ? SAMPLE_NOTE : _ref$body
|
|
34
|
+
body = _ref$body === void 0 ? SAMPLE_NOTE : _ref$body,
|
|
35
|
+
_ref$showProjectName = _ref.showProjectName,
|
|
36
|
+
showProjectName = _ref$showProjectName === void 0 ? false : _ref$showProjectName,
|
|
37
|
+
_ref$projectName = _ref.projectName,
|
|
38
|
+
projectName = _ref$projectName === void 0 ? "Marketing Site" : _ref$projectName;
|
|
35
39
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_StackedCard.StackedCardRow, {
|
|
36
40
|
role: "title"
|
|
37
|
-
}, /*#__PURE__*/_react.default.createElement(_Typography.Body2, {
|
|
41
|
+
}, /*#__PURE__*/_react.default.createElement(_shared.StyledTitleBlock, null, showProjectName ? /*#__PURE__*/_react.default.createElement(_shared.CardProjectLine, null, projectName) : null, /*#__PURE__*/_react.default.createElement(_Typography.Body2, {
|
|
38
42
|
weight: "bold"
|
|
39
|
-
}, title), /*#__PURE__*/_react.default.createElement(_shared.EntityDots, {
|
|
43
|
+
}, title)), /*#__PURE__*/_react.default.createElement(_shared.EntityDots, {
|
|
40
44
|
"aria-label": "Note options"
|
|
41
45
|
})), /*#__PURE__*/_react.default.createElement(_StackedCard.StackedCardRow, {
|
|
42
46
|
role: "custom",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoteCard.js","names":["_react","_interopRequireDefault","require","_styledComponents","_shared","_Icons","_Loaders","_StackedCard","_Typography","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","StyledNoteBody","styled","Body2","withConfig","displayName","componentId","SAMPLE_NOTE","exports","NoteCard","_ref","_ref$title","title","_ref$body","body","createElement","Fragment","StackedCardRow","role","weight","EntityDots","direction","color","NotePlaceholder","props","Placeholder","icon","NoteIcon","label","NoteSkeleton","SkeletonLoader","style","height","width"],"sources":["../../../../../src/presentation/stackedCard/content/NoteCard.tsx"],"sourcesContent":["import React, { ReactElement } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport {
|
|
1
|
+
{"version":3,"file":"NoteCard.js","names":["_react","_interopRequireDefault","require","_styledComponents","_shared","_Icons","_Loaders","_StackedCard","_Typography","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","StyledNoteBody","styled","Body2","withConfig","displayName","componentId","SAMPLE_NOTE","exports","NoteCard","_ref","_ref$title","title","_ref$body","body","_ref$showProjectName","showProjectName","_ref$projectName","projectName","createElement","Fragment","StackedCardRow","role","StyledTitleBlock","CardProjectLine","weight","EntityDots","direction","color","NotePlaceholder","props","Placeholder","icon","NoteIcon","label","NoteSkeleton","SkeletonLoader","style","height","width"],"sources":["../../../../../src/presentation/stackedCard/content/NoteCard.tsx"],"sourcesContent":["import React, { ReactElement } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport {\n CardProjectLine,\n EntityDots,\n Placeholder,\n StyledTitleBlock,\n} from \"./shared\";\nimport { NoteIcon } from \"../../../components/Icons\";\nimport { SkeletonLoader } from \"../../../components/Loaders\";\nimport { StackedCardRow as StackRow } from \"../../../components/StackedCard\";\nimport { Body2 } from \"../../../components/Typography\";\n\n/**\n * NoteCard — the new fifth type. A multi-line text card (Milanote-style): a\n * title row that owns the \"…\" menu, then padded body rows. The body clamps at a\n * line limit and fades out; auto-height, so the card grows with its content.\n * Inline editing lands in task 4/8 — this is the read view + placeholder.\n */\n\n/* The body clamps at a max height and fades out with a mask so long notes end\n softly instead of hard-cropping. white-space: pre-line keeps authored breaks. */\nconst StyledNoteBody = styled(Body2)`\n display: block;\n max-height: 132px;\n overflow: hidden;\n white-space: pre-line;\n -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent);\n mask-image: linear-gradient(180deg, #000 72%, transparent);\n`;\n\nexport const SAMPLE_NOTE = `Kickoff open questions before we lock the columns:\n\n• Who owns the migration off react-dnd, and does it block the canvas work or run in parallel?\n• Confirm the outline-placeholder choreography reads the same in a scrolled column.\n• Do we ship the note type in v1, or defer inline editing?`;\n\nexport interface NoteCardProps {\n title?: string;\n body?: string;\n /**\n * The project the note belongs to, above the title — the same line, in the\n * same treatment, that a TaskCard uses. Off by default: only a surface that\n * mixes projects needs it.\n */\n showProjectName?: boolean;\n projectName?: string;\n}\n\nexport const NoteCard = ({\n title = \"Kickoff notes\",\n body = SAMPLE_NOTE,\n showProjectName = false,\n projectName = \"Marketing Site\",\n}: NoteCardProps): ReactElement => (\n <>\n <StackRow role=\"title\">\n <StyledTitleBlock>\n {showProjectName ? (\n <CardProjectLine>{projectName}</CardProjectLine>\n ) : null}\n <Body2 weight=\"bold\">{title}</Body2>\n </StyledTitleBlock>\n <EntityDots aria-label=\"Note options\" />\n </StackRow>\n <StackRow role=\"custom\" direction=\"column\">\n <StyledNoteBody color=\"secondary\">{body}</StyledNoteBody>\n </StackRow>\n </>\n);\n\n/* ---- placeholder + skeleton ---- */\n\nexport const NotePlaceholder = (\n props: React.ButtonHTMLAttributes<HTMLButtonElement>\n): ReactElement => (\n <Placeholder icon={<NoteIcon />} label=\"Write a note\" {...props} />\n);\n\n/* Skeleton mirrors the note anatomy: a title line, then several body lines. */\nexport const NoteSkeleton = (): ReactElement => (\n <>\n <StackRow role=\"title\">\n <SkeletonLoader style={{ height: 14, width: \"50%\" }} />\n </StackRow>\n <StackRow role=\"custom\" direction=\"column\">\n <SkeletonLoader style={{ height: 10, width: \"100%\" }} />\n <SkeletonLoader style={{ height: 10, width: \"96%\" }} />\n <SkeletonLoader style={{ height: 10, width: \"88%\" }} />\n <SkeletonLoader style={{ height: 10, width: \"70%\" }} />\n </StackRow>\n </>\n);\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AAMA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAAuD,SAAAD,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,SAAA,WAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAC,IAAA,eAAAC,CAAA,aAAAP,CAAA,MAAAA,CAAA,GAAAQ,SAAA,CAAAC,MAAA,EAAAT,CAAA,UAAAU,CAAA,GAAAF,SAAA,CAAAR,CAAA,YAAAW,CAAA,IAAAD,CAAA,OAAAE,cAAA,CAAAC,IAAA,CAAAH,CAAA,EAAAC,CAAA,MAAAJ,CAAA,CAAAI,CAAA,IAAAD,CAAA,CAAAC,CAAA,aAAAJ,CAAA,KAAAJ,QAAA,CAAAW,KAAA,OAAAN,SAAA;AAEvD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAMO,cAAc,GAAG,IAAAC,yBAAM,EAACC,iBAAK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,CAAE,CAAC,eACxD9D,MAAA,CAAAW,OAAA,CAAA+B,aAAA,CAACpC,QAAA,CAAAqD,cAAc;IAACC,KAAK,EAAE;MAAEC,MAAM,EAAE,EAAE;MAAEC,KAAK,EAAE;IAAM;EAAE,CAAE,CAAC,eACvD9D,MAAA,CAAAW,OAAA,CAAA+B,aAAA,CAACpC,QAAA,CAAAqD,cAAc;IAACC,KAAK,EAAE;MAAEC,MAAM,EAAE,EAAE;MAAEC,KAAK,EAAE;IAAM;EAAE,CAAE,CAAC,eACvD9D,MAAA,CAAAW,OAAA,CAAA+B,aAAA,CAACpC,QAAA,CAAAqD,cAAc;IAACC,KAAK,EAAE;MAAEC,MAAM,EAAE,EAAE;MAAEC,KAAK,EAAE;IAAM;EAAE,CAAE,CAC9C,CACV,CAAC;AAAA,CACJ","ignoreList":[]}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.projectClientLine = exports.ProjectCard = exports.INTERNAL_CLIENT_LABEL = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
var _shared = require("./shared");
|
|
10
|
+
var _Chip = require("../../../components/Chip");
|
|
11
|
+
var _StackedCard = require("../../../components/StackedCard");
|
|
12
|
+
var _Typography = require("../../../components/Typography");
|
|
13
|
+
var _shared2 = require("../../shared");
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
/**
|
|
16
|
+
* ProjectCard — a project as a stacked card.
|
|
17
|
+
*
|
|
18
|
+
* The sixth content type, and the second one that mirrors a project-management
|
|
19
|
+
* record rather than something authored on the surface (TaskCard is the first).
|
|
20
|
+
* It composes the same shell and the same rows; nothing in `components/StackedCard`
|
|
21
|
+
* knows it exists.
|
|
22
|
+
*
|
|
23
|
+
* The face is the app's Projects page, read off `ProjectListGroup.jsx`:
|
|
24
|
+
* - the NAME is the card's title (`Header3`, as in the grid card);
|
|
25
|
+
* - the CLIENT sits under it — `Entity.Property "entity-property-client"`, the
|
|
26
|
+
* company the project is for;
|
|
27
|
+
* - the DESCRIPTION is the project's `body`, the grid card's `Body2` tertiary
|
|
28
|
+
* excerpt, clamped because the whole text lives on the project and this is a
|
|
29
|
+
* reference to it, not a copy;
|
|
30
|
+
* - the LEADER and the LABEL share one row. The label is a FILLED pill whose
|
|
31
|
+
* background is the label's own colour and whose text is a darker shade of
|
|
32
|
+
* it (`ProjectLabel.jsx`: `EntityLabel` with `backgroundColor: label.color`,
|
|
33
|
+
* `color: label.darker_text_color`) — the design system's `Chip`, not the
|
|
34
|
+
* colour-text `Tag` the column cards use for task labels.
|
|
35
|
+
*
|
|
36
|
+
* There is deliberately NO progress indicator. A single percentage is the one
|
|
37
|
+
* number on a project that cannot be read without knowing how it was computed,
|
|
38
|
+
* and a card is a place people put a project to talk ABOUT it — the number
|
|
39
|
+
* invites a conversation about the number instead.
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
/** A project label carries both of the colours the app stores for it. */
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* What an internal project's client line says.
|
|
46
|
+
*
|
|
47
|
+
* A project with no client belongs to the account's own company, and printing
|
|
48
|
+
* that company's name back at someone who works there says nothing. So the line
|
|
49
|
+
* states the fact instead.
|
|
50
|
+
*/
|
|
51
|
+
var INTERNAL_CLIENT_LABEL = exports.INTERNAL_CLIENT_LABEL = "Internal";
|
|
52
|
+
|
|
53
|
+
/** One rule for the client line, so no surface can label the same project twice. */
|
|
54
|
+
var projectClientLine = exports.projectClientLine = function projectClientLine(client) {
|
|
55
|
+
return client !== null && client !== void 0 ? client : INTERNAL_CLIENT_LABEL;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/* The description excerpt. Three lines is the most a card can carry before it
|
|
59
|
+
stops being a card, so it clamps. */
|
|
60
|
+
var StyledExcerpt = (0, _styledComponents.default)(_Typography.Body2).withConfig({
|
|
61
|
+
displayName: "ProjectCard__StyledExcerpt",
|
|
62
|
+
componentId: "sc-1afak94-0"
|
|
63
|
+
})(["display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;"]);
|
|
64
|
+
var StyledName = (0, _styledComponents.default)(_Typography.Header3).withConfig({
|
|
65
|
+
displayName: "ProjectCard__StyledName",
|
|
66
|
+
componentId: "sc-1afak94-1"
|
|
67
|
+
})(["overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"]);
|
|
68
|
+
var StyledClient = (0, _styledComponents.default)(_Typography.Caption2).withConfig({
|
|
69
|
+
displayName: "ProjectCard__StyledClient",
|
|
70
|
+
componentId: "sc-1afak94-2"
|
|
71
|
+
})(["display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"]);
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* One row for the two facts that are each optional: the leader on the LEFT, the
|
|
75
|
+
* label on the RIGHT. `space-between` is what keeps the label right when there is
|
|
76
|
+
* no leader beside it, and the row is not rendered at all when the project has
|
|
77
|
+
* neither — a bare project produces a small card, not a card with empty
|
|
78
|
+
* furniture in it.
|
|
79
|
+
*
|
|
80
|
+
* No rule above it: the card carries no internal separators. The row's own role
|
|
81
|
+
* padding is what sets it apart from the excerpt, the same way every other row in
|
|
82
|
+
* every other content type is set apart — a hairline here would be the only line
|
|
83
|
+
* inside any card in the set.
|
|
84
|
+
*/
|
|
85
|
+
var StyledMetaRow = (0, _styledComponents.default)(_StackedCard.StackedCardRow).withConfig({
|
|
86
|
+
displayName: "ProjectCard__StyledMetaRow",
|
|
87
|
+
componentId: "sc-1afak94-3"
|
|
88
|
+
})(["justify-content:space-between;.sc-leader{display:flex;align-items:center;gap:8px;min-width:0;}.sc-leader > .typography{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}.sc-label{flex-shrink:0;display:flex;}"]);
|
|
89
|
+
var ProjectCard = exports.ProjectCard = function ProjectCard(_ref) {
|
|
90
|
+
var _ref$name = _ref.name,
|
|
91
|
+
name = _ref$name === void 0 ? "Marketing Site" : _ref$name,
|
|
92
|
+
_ref$client = _ref.client,
|
|
93
|
+
client = _ref$client === void 0 ? "ActiveCollab Inc." : _ref$client,
|
|
94
|
+
description = _ref.description,
|
|
95
|
+
leader = _ref.leader,
|
|
96
|
+
label = _ref.label;
|
|
97
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_StackedCard.StackedCardRow, {
|
|
98
|
+
role: "title"
|
|
99
|
+
}, /*#__PURE__*/_react.default.createElement(_shared.StyledTitleBlock, null, /*#__PURE__*/_react.default.createElement(StyledName, null, name), /*#__PURE__*/_react.default.createElement(StyledClient, {
|
|
100
|
+
color: "tertiary"
|
|
101
|
+
}, projectClientLine(client))), /*#__PURE__*/_react.default.createElement(_shared.EntityDots, {
|
|
102
|
+
"aria-label": "Project options"
|
|
103
|
+
})), description ? /*#__PURE__*/_react.default.createElement(_StackedCard.StackedCardRow, {
|
|
104
|
+
role: "custom"
|
|
105
|
+
}, /*#__PURE__*/_react.default.createElement(StyledExcerpt, {
|
|
106
|
+
color: "secondary"
|
|
107
|
+
}, description)) : null, leader || label ? /*#__PURE__*/_react.default.createElement(StyledMetaRow, {
|
|
108
|
+
role: "footer"
|
|
109
|
+
}, leader ? /*#__PURE__*/_react.default.createElement("span", {
|
|
110
|
+
className: "sc-leader"
|
|
111
|
+
}, /*#__PURE__*/_react.default.createElement(_shared2.RoundAvatar, {
|
|
112
|
+
$bg: leader.color,
|
|
113
|
+
$size: 24,
|
|
114
|
+
$bordered: false,
|
|
115
|
+
"data-fixed": true
|
|
116
|
+
}, leader.initials), /*#__PURE__*/_react.default.createElement(_Typography.Caption1, {
|
|
117
|
+
color: "secondary"
|
|
118
|
+
}, leader.name)) :
|
|
119
|
+
/*#__PURE__*/
|
|
120
|
+
/* Keeps the label on the right when there is no leader to push it
|
|
121
|
+
there — an empty flex item is cheaper than a second layout. */
|
|
122
|
+
_react.default.createElement("span", null), label ? /*#__PURE__*/_react.default.createElement("span", {
|
|
123
|
+
className: "sc-label",
|
|
124
|
+
"data-fixed": true
|
|
125
|
+
}, /*#__PURE__*/_react.default.createElement(_Chip.Chip, {
|
|
126
|
+
size: "small",
|
|
127
|
+
label: label.text,
|
|
128
|
+
backgroundColor: label.color,
|
|
129
|
+
color: label.textColor,
|
|
130
|
+
typographyProps: {
|
|
131
|
+
variant: "Caption 2",
|
|
132
|
+
weight: "bold"
|
|
133
|
+
}
|
|
134
|
+
})) : null) : null);
|
|
135
|
+
};
|
|
136
|
+
//# sourceMappingURL=ProjectCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectCard.js","names":["_react","_interopRequireDefault","require","_styledComponents","_shared","_Chip","_StackedCard","_Typography","_shared2","e","__esModule","default","INTERNAL_CLIENT_LABEL","exports","projectClientLine","client","StyledExcerpt","styled","Body2","withConfig","displayName","componentId","StyledName","Header3","StyledClient","Caption2","StyledMetaRow","StackRow","ProjectCard","_ref","_ref$name","name","_ref$client","description","leader","label","createElement","Fragment","StackedCardRow","role","StyledTitleBlock","color","EntityDots","className","RoundAvatar","$bg","$size","$bordered","initials","Caption1","Chip","size","text","backgroundColor","textColor","typographyProps","variant","weight"],"sources":["../../../../../src/presentation/stackedCard/content/ProjectCard.tsx"],"sourcesContent":["import React, { ReactElement } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { EntityDots, StyledTitleBlock } from \"./shared\";\nimport { Chip } from \"../../../components/Chip\";\nimport { StackedCardRow as StackRow } from \"../../../components/StackedCard\";\nimport {\n Body2,\n Caption1,\n Caption2,\n Header3,\n} from \"../../../components/Typography\";\nimport { RoundAvatar } from \"../../shared\";\n\n/**\n * ProjectCard — a project as a stacked card.\n *\n * The sixth content type, and the second one that mirrors a project-management\n * record rather than something authored on the surface (TaskCard is the first).\n * It composes the same shell and the same rows; nothing in `components/StackedCard`\n * knows it exists.\n *\n * The face is the app's Projects page, read off `ProjectListGroup.jsx`:\n * - the NAME is the card's title (`Header3`, as in the grid card);\n * - the CLIENT sits under it — `Entity.Property \"entity-property-client\"`, the\n * company the project is for;\n * - the DESCRIPTION is the project's `body`, the grid card's `Body2` tertiary\n * excerpt, clamped because the whole text lives on the project and this is a\n * reference to it, not a copy;\n * - the LEADER and the LABEL share one row. The label is a FILLED pill whose\n * background is the label's own colour and whose text is a darker shade of\n * it (`ProjectLabel.jsx`: `EntityLabel` with `backgroundColor: label.color`,\n * `color: label.darker_text_color`) — the design system's `Chip`, not the\n * colour-text `Tag` the column cards use for task labels.\n *\n * There is deliberately NO progress indicator. A single percentage is the one\n * number on a project that cannot be read without knowing how it was computed,\n * and a card is a place people put a project to talk ABOUT it — the number\n * invites a conversation about the number instead.\n */\n\nexport interface ProjectCardPerson {\n name: string;\n initials: string;\n /** Avatar colours stand in for the server-rendered avatar: data, not theme. */\n color: string;\n}\n\n/** A project label carries both of the colours the app stores for it. */\nexport interface ProjectCardLabel {\n text: string;\n /** `label.color` — the pill's background. */\n color: string;\n /** `label.darker_text_color` — the pill's text. */\n textColor: string;\n}\n\n/**\n * What an internal project's client line says.\n *\n * A project with no client belongs to the account's own company, and printing\n * that company's name back at someone who works there says nothing. So the line\n * states the fact instead.\n */\nexport const INTERNAL_CLIENT_LABEL = \"Internal\";\n\n/** One rule for the client line, so no surface can label the same project twice. */\nexport const projectClientLine = (client: string | null | undefined): string =>\n client ?? INTERNAL_CLIENT_LABEL;\n\n/* The description excerpt. Three lines is the most a card can carry before it\n stops being a card, so it clamps. */\nconst StyledExcerpt = styled(Body2)`\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n`;\n\nconst StyledName = styled(Header3)`\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n`;\n\nconst StyledClient = styled(Caption2)`\n display: block;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n`;\n\n/**\n * One row for the two facts that are each optional: the leader on the LEFT, the\n * label on the RIGHT. `space-between` is what keeps the label right when there is\n * no leader beside it, and the row is not rendered at all when the project has\n * neither — a bare project produces a small card, not a card with empty\n * furniture in it.\n *\n * No rule above it: the card carries no internal separators. The row's own role\n * padding is what sets it apart from the excerpt, the same way every other row in\n * every other content type is set apart — a hairline here would be the only line\n * inside any card in the set.\n */\nconst StyledMetaRow = styled(StackRow)`\n justify-content: space-between;\n\n .sc-leader {\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n }\n\n .sc-leader > .typography {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n /* The Chip brings its own padding and radius, so the slot only has to refuse\n to shrink and stay out of the leader's way. */\n .sc-label {\n flex-shrink: 0;\n display: flex;\n }\n`;\n\nexport interface ProjectCardProps {\n name?: string;\n /** The client company. `null` is an internal project — the line reads \"Internal\". */\n client?: string | null;\n /** The project's `body`; the excerpt row exists only when it has one. */\n description?: string;\n /** A project need not have a leader. */\n leader?: ProjectCardPerson;\n /** A project need not have a label. */\n label?: ProjectCardLabel;\n}\n\nexport const ProjectCard = ({\n name = \"Marketing Site\",\n client = \"ActiveCollab Inc.\",\n description,\n leader,\n label,\n}: ProjectCardProps): ReactElement => (\n <>\n <StackRow role=\"title\">\n <StyledTitleBlock>\n <StyledName>{name}</StyledName>\n <StyledClient color=\"tertiary\">\n {projectClientLine(client)}\n </StyledClient>\n </StyledTitleBlock>\n <EntityDots aria-label=\"Project options\" />\n </StackRow>\n\n {description ? (\n <StackRow role=\"custom\">\n <StyledExcerpt color=\"secondary\">{description}</StyledExcerpt>\n </StackRow>\n ) : null}\n\n {leader || label ? (\n <StyledMetaRow role=\"footer\">\n {leader ? (\n <span className=\"sc-leader\">\n <RoundAvatar\n $bg={leader.color}\n $size={24}\n $bordered={false}\n data-fixed\n >\n {leader.initials}\n </RoundAvatar>\n <Caption1 color=\"secondary\">{leader.name}</Caption1>\n </span>\n ) : (\n /* Keeps the label on the right when there is no leader to push it\n there — an empty flex item is cheaper than a second layout. */\n <span />\n )}\n {label ? (\n <span className=\"sc-label\" data-fixed>\n <Chip\n size=\"small\"\n label={label.text}\n backgroundColor={label.color}\n color={label.textColor}\n typographyProps={{ variant: \"Caption 2\", weight: \"bold\" }}\n />\n </span>\n ) : null}\n </StyledMetaRow>\n ) : null}\n </>\n);\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAMA,IAAAM,QAAA,GAAAN,OAAA;AAA2C,SAAAD,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,IAAMG,qBAAqB,GAAAC,OAAA,CAAAD,qBAAA,GAAG,UAAU;;AAE/C;AACO,IAAME,iBAAiB,GAAAD,OAAA,CAAAC,iBAAA,GAAG,SAApBA,iBAAiBA,CAAIC,MAAiC;EAAA,OACjEA,MAAM,aAANA,MAAM,cAANA,MAAM,GAAIH,qBAAqB;AAAA;;AAEjC;AACA;AACA,IAAMI,aAAa,GAAG,IAAAC,yBAAM,EAACC,iBAAK,CAAC,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,6FAKlC;AAED,IAAMC,UAAU,GAAG,IAAAL,yBAAM,EAACM,mBAAO,CAAC,CAAAJ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