@pega/cosmos-react-work 9.0.0-build.10.3 → 9.0.0-build.11.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"CaseView.styles.d.ts","sourceRoot":"","sources":["../../../src/components/CaseView/CaseView.styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAoCtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iEAAiE,CAAC;AAiC5G,eAAO,MAAM,wBAAwB;2BAbrC,CAAA;;cAcY,OAAO;SA0BjB,CAAC;AAIH,eAAO,MAAM,0BAA0B;2BA5CvC,CAAA;2BAkDE,CAAC;AAEH,eAAO,MAAM,uBAAuB,6EAqBlC,CAAC;AAIH,eAAO,MAAM,uBAAuB,8MAelC,CAAC;AAIH,eAAO,MAAM,oBAAoB,sLAI/B,CAAC;AAIH,eAAO,MAAM,gBAAgB,gFA0C3B,CAAC;AAIH,eAAO,MAAM,oBAAoB,+EAShC,CAAC;AAIF,eAAO,MAAM,gBAAgB,2EAAa,CAAC;AAI3C,eAAO,MAAM,mBAAmB;eAA2B,OAAO;SAehE,CAAC;AAIH,eAAO,MAAM,oBAAoB,gFAyD/B,CAAC;AAIH,eAAO,MAAM,8BAA8B,wLA6CzC,CAAC;AAIH,eAAO,MAAM,wBAAwB;cAA0B,OAAO;SAqBpE,CAAC;AAmCH,eAAO,MAAM,mBAAmB,4EAgD9B,CAAC;AAIH,eAAO,MAAM,wBAAwB;WAK5B,OAAO;eACH,OAAO;WACX,YAAY;SAmCnB,CAAC;AAIH,eAAO,MAAM,qBAAqB,6EA+BjC,CAAC;AAIF,eAAO,MAAM,0BAA0B,6EAoBrC,CAAC;AAIH,eAAO,MAAM,0BAA0B,wLAQrC,CAAC;AAIH,eAAO,MAAM,iCAAiC,wLAgC5C,CAAC;AAIH,eAAO,MAAM,iBAAiB,6EAqD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AEF,eAAO,MAAM,cAAc,6EAqF1B,CAAC;AAIF,eAAO,MAAM,qBAAqB,sLAMjC,CAAC;AAIF,eAAO,MAAM,iBAAiB,sPAoB5B,CAAC;AAIH,eAAO,MAAM,sBAAsB;iBACpB,MAAM,GAAG,SAAS;SAO/B,CAAC"}
@@ -342,14 +342,14 @@ export const StyledHeaderSummaryValue = styled(StyledFieldValue)(({ bold, trunca
342
342
  `;
343
343
  });
344
344
  StyledHeaderSummaryValue.defaultProps = defaultThemeProp;
345
- export const StyledCaseSummaryInfo = styled.div(({ theme: { base: { palette: { 'primary-background': primaryBackground }, 'border-radius': borderRadius }, components: { tabs: { detached: tabsDetached } } } }) => {
345
+ export const StyledCaseSummaryInfo = styled.div(({ theme: { base: { 'border-radius': borderRadius }, components: { tabs: { detached: tabsDetached }, card: { background } } } }) => {
346
346
  const { intelligentGuidance } = useCaseViewContext();
347
347
  return css `
348
348
  overflow: auto;
349
349
  flex: 1;
350
350
  ${tabsDetached &&
351
351
  css `
352
- background: ${primaryBackground};
352
+ background: ${background};
353
353
  border-radius: ${borderRadius};
354
354
  border-start-start-radius: 0;
355
355
  border-start-end-radius: 0;
@@ -363,14 +363,14 @@ export const StyledCaseSummaryInfo = styled.div(({ theme: { base: { palette: { '
363
363
  });
364
364
  StyledCaseSummaryInfo.defaultProps = defaultThemeProp;
365
365
  export const StyledCaseSummaryContainer = styled.div(({ theme }) => {
366
- const { base: { palette: { 'primary-background': primaryBackground } }, components: { 'field-value-list': { inline: { detached } } } } = theme;
366
+ const { components: { 'field-value-list': { inline: { detached } }, card: { background } } } = theme;
367
367
  return css `
368
368
  padding: calc(1.5 * ${theme.base.spacing}) calc(${theme.components.card.padding} * 2);
369
369
 
370
370
  ${detached &&
371
371
  css `
372
372
  padding: 0;
373
- background: ${primaryBackground};
373
+ background: ${background};
374
374
  `}
375
375
  `;
376
376
  });
@@ -418,10 +418,10 @@ export const StyledExpandCollapseSummaryButton = styled(StyledExpandCollapseButt
418
418
  `;
419
419
  });
420
420
  StyledExpandCollapseSummaryButton.defaultProps = defaultThemeProp;
421
- export const StyledCaseSummary = styled.div(({ theme: { base: { spacing, palette: { 'primary-background': primaryBackground, 'border-line': borderLine }, 'border-radius': borderRadius, 'hit-area': { 'mouse-min': mouseMin, 'finger-min': fingerMin } }, components: { 'case-view': { summary: { detached } }, tabs: { detached: tabsDetached } } } }) => {
421
+ export const StyledCaseSummary = styled.div(({ theme: { base: { spacing, palette: { 'border-line': borderLine, interactive }, 'border-radius': borderRadius, 'hit-area': { 'mouse-min': mouseMin, 'finger-min': fingerMin } }, components: { 'case-view': { summary: { detached } }, card: { background: cardBackground }, tabs: { detached: tabsDetached } } } }) => {
422
422
  const { summaryExpanded, aboveMD } = useCaseViewContext();
423
423
  return css `
424
- background: ${primaryBackground};
424
+ background: ${cardBackground};
425
425
  position: relative;
426
426
  height: 100%;
427
427
  ${aboveMD &&
@@ -448,6 +448,9 @@ export const StyledCaseSummary = styled.div(({ theme: { base: { spacing, palette
448
448
  @media (pointer: coarse) {
449
449
  height: ${fingerMin};
450
450
  }
451
+ &[aria-selected='true'] {
452
+ background-color: ${transparentize(0.92, interactive)};
453
+ }
451
454
  }
452
455
  }
453
456
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CaseView.styles.js","sourceRoot":"","sources":["../../../src/components/CaseView/CaseView.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,uBAAuB,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACpG,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EACL,MAAM,EACN,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,UAAU,EACV,WAAW,EACX,aAAa,EACb,UAAU,EACV,aAA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C/B,EACF,EAAE,EAAE;IACH,MAAM,EAAE,aAAa,EAAE,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC;IAEtD,OAAO,GAAG,CAAA;;;;gCAIoB,OAAO;iCACN,OAAO;MAClC,aAAa;QACf,GAAG,CAAA;2BACoB,WAAW,CAAC,EAAE;6DACoB,oBAAoB;;KAE5E;GACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,iBAAiB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAElD,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,GAAG,CAE7C,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE;IACrB,OAAO,WAAW,KAAK,SAAS;QAC9B,CAAC,CAAC,GAAG,CAAA;kCACyB,WAAW;OACtC;QACH,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAC,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport type { DefaultTheme } from 'styled-components';\nimport { getContrast, hideVisually, meetsContrastGuidelines, rgba, transparentize } from 'polished';\nimport { useContext } from 'react';\n\nimport {\n Button,\n calculateFontSize,\n CardContent,\n defaultThemeProp,\n StyledBreadcrumbs,\n StyledButtonLink,\n StyledFieldValue,\n StyledStackedFieldValue,\n StyledIcon,\n StyledLabel,\n StyledPopover,\n StyledText,\n StyledTooltip,\n tryCatch,\n FieldValueList,\n StyledLink,\n readableHue,\n StyledCard,\n Text,\n readableColor,\n AppShellContext,\n AIButton,\n StyledButton,\n calculateForegroundColor,\n calculateBackgroundAndContrastColor,\n isSolidColor,\n StyledSummaryListItem,\n StyledProgressBackdrop\n} from '@pega/cosmos-react-core';\nimport type { FontSize } from '@pega/cosmos-react-core';\nimport { StyledMenu } from '@pega/cosmos-react-core/lib/components/Menu/Menu.styles';\nimport type { AppShellContextValue } from '@pega/cosmos-react-core/lib/components/AppShell/AppShellContext';\nimport { headerHeight } from '@pega/cosmos-react-core/lib/components/AppShell/AppShell.styles';\nimport { StyledCardHeader } from '@pega/cosmos-react-core/lib/components/Card/CardHeader';\nimport {\n StyledAllTabsWrapper,\n StyledTabs,\n StylesAllTabsButtonWrapper\n} from '@pega/cosmos-react-core/lib/components/Tabs/Tabs.styles';\nimport {\n resizeDrawerMinWidth,\n resizeDrawerMaxWidth,\n resizeDrawerDefaultWidth\n} from '@pega/cosmos-react-core/lib/styles/constants';\nimport { StyledMenuButton } from '@pega/cosmos-react-core/lib/components/MenuButton/MenuButton';\nimport { StyledTab } from '@pega/cosmos-react-core/lib/components/Tabs/Tab';\nimport { StyledTabPanel } from '@pega/cosmos-react-core/lib/components/Tabs/TabPanel';\nimport { StyledCardContent } from '@pega/cosmos-react-core/lib/components/Card/CardContent';\n\nimport { StyledStage, StyledStageContainer, StyledStages } from '../Stages/Stages.styles';\nimport { StyledAssignments } from '../Assignments/Assignments.styles';\nimport { StyledAssignments as StyledHierarchicalAssignments } from '../HierarchicalAssignments/Assignments.styles';\nimport {\n StyledGenAICoachContainer,\n StyledInitialMessageContainer\n} from '../GenAICoach/GenAICoach.styles';\nimport { StyledTaskList } from '../Tasks/TaskList';\nimport { oneColumnDetailsColumnWidth } from '../Details/Details.styles';\n\nimport { useCaseViewContext } from './CaseView.context';\n\nconst labelWidth = '16ch';\nconst inlineEndButtonOffset = '0.375rem';\n\nexport const StyledSummaryPrimaryList = styled(FieldValueList)<{\n wrapped?: boolean;\n}>(({ theme, wrapped }) => {\n const fontSizes = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n const detached = theme.components['field-value-list'].inline.detached;\n\n return css`\n ${wrapped\n ? css`\n grid-template-columns: minmax(0, 1fr);\n `\n : css`\n ${detached &&\n css`\n gap: calc(${theme.base.spacing});\n `}\n grid-template-columns: ${labelWidth} auto;\n `}\n\n ${StyledFieldValue} {\n font-size: ${fontSizes[theme.components.text.h1['font-size'] as FontSize]};\n font-weight: ${theme.components.text.h1['font-weight']};\n > ${StyledButtonLink} {\n font-weight: inherit;\n }\n }\n `;\n});\n\nStyledSummaryPrimaryList.defaultProps = defaultThemeProp;\n\nexport const StyledSummarySecondaryList = styled(FieldValueList)(() => {\n return css`\n ${StyledStackedFieldValue} {\n grid-column: 1 / -1;\n }\n `;\n});\n\nexport const StyledCaseSummaryFields = styled.div(({ theme }) => {\n const {\n components: {\n 'field-value-list': {\n inline: { detached }\n }\n }\n } = theme;\n\n return (\n detached &&\n css`\n ${StyledSummaryPrimaryList},${StyledSummarySecondaryList} {\n padding: calc(${theme.components.card.padding} * 2);\n }\n\n ${StyledSummaryPrimaryList} + ${StyledSummarySecondaryList} {\n border-block-start: 0.0625rem solid ${theme.base.palette['border-line']};\n }\n `\n );\n});\n\nStyledCaseSummaryFields.defaultProps = defaultThemeProp;\n\nexport const StyledSummaryTabContent = styled(CardContent)(({ theme }) => {\n const {\n base: { spacing }\n } = theme;\n return css`\n ${StyledSummarySecondaryList} {\n > ${StyledStackedFieldValue} {\n max-width: ${oneColumnDetailsColumnWidth};\n }\n\n > ${StyledFieldValue} {\n max-width: calc(${oneColumnDetailsColumnWidth} - ${labelWidth} - 2 * ${spacing});\n }\n }\n `;\n});\n\nStyledSummaryTabContent.defaultProps = defaultThemeProp;\n\nexport const StyledSummaryHeading = styled(Text)(({ theme }) => {\n return css`\n margin-block-end: ${theme.base.spacing};\n `;\n});\n\nStyledSummaryHeading.defaultProps = defaultThemeProp;\n\nexport const StyledCaseHeader = styled.header(({ theme }) => {\n const {\n components: {\n 'case-view': {\n header: { 'foreground-color': caseHeaderForegroundColor, background },\n summary: { detached: summaryDetached },\n utilities: { detached: utilitiesDetached }\n }\n },\n base: { 'border-radius': borderRadius, spacing, shadow, 'z-index': zIndex, palette }\n } = theme;\n const foregroundColor = calculateForegroundColor(background, caseHeaderForegroundColor);\n const { aboveSM, aboveMD, persistentUtility, aboveXL, summaryExpanded, isPreview } =\n useCaseViewContext();\n const shouldRenderMobileTabs = !aboveMD || (persistentUtility && !aboveXL) || !summaryExpanded;\n const caseHeaderBorderRadius = shouldRenderMobileTabs\n ? `0 0 ${utilitiesDetached ? borderRadius : 0} ${borderRadius}`\n : `${borderRadius} ${borderRadius} 0 0`;\n\n return css`\n background: ${background};\n color: ${foregroundColor};\n padding: ${spacing} calc(2 * ${spacing});\n position: relative;\n\n ${summaryDetached &&\n !isPreview &&\n aboveSM &&\n css`\n border-radius: ${caseHeaderBorderRadius};\n `}\n\n h1:focus-visible {\n outline: transparent;\n box-shadow: ${shadow.focus};\n }\n\n ${StyledMenu} {\n color: ${palette['foreground-color']};\n z-index: ${zIndex.popover + 1};\n }\n `;\n});\n\nStyledCaseHeader.defaultProps = defaultThemeProp;\n\nexport const StyledFollowIconWrap = styled.label`\n font-size: 1.25rem;\n input {\n ${hideVisually}\n }\n\n input:focus + svg {\n box-shadow: ${({ theme }) => theme.base.shadow.focus};\n }\n`;\n\nStyledFollowIconWrap.defaultProps = defaultThemeProp;\n\nexport const StyledSubheading = styled.p``;\n\nStyledSubheading.defaultProps = defaultThemeProp;\n\nexport const StyledHeaderActions = styled.div<{ offsetEnd: boolean }>(({ offsetEnd, theme }) => {\n return css`\n margin-inline-start: auto;\n padding-block: ${theme.base.spacing};\n padding-inline-start: calc(2 * ${theme.base.spacing});\n\n ${offsetEnd &&\n css`\n padding-inline-end: ${inlineEndButtonOffset};\n `};\n\n ${StyledButton} {\n margin-inline-start: 0;\n }\n `;\n});\n\nStyledHeaderActions.defaultProps = defaultThemeProp;\n\nexport const StyledCaseHeaderText = styled.hgroup(({ theme }) => {\n const {\n components: {\n 'case-view': {\n header: { 'foreground-color': foregroundColor, background: caseHeaderBackground }\n }\n }\n } = theme;\n\n /* If the foreground-color is auto, we calculate the text color and transparentColor based on the background color. */\n const color = calculateForegroundColor(caseHeaderBackground, foregroundColor);\n\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n const idStyle = css`\n color: ${color};\n font-size: ${fontSize.s};\n font-weight: normal;\n `;\n\n return css`\n word-break: break-word;\n\n ${StyledSubheading} {\n ${idStyle}\n }\n\n ${StyledBreadcrumbs} {\n max-width: 100%;\n\n > a,\n > span,\n > button,\n > svg {\n ${idStyle}\n }\n\n > a,\n > button {\n &:focus {\n box-shadow: ${theme.base.shadow.focus};\n }\n }\n\n ${StyledPopover}:not(${StyledTooltip}) {\n color: ${theme.base.palette['foreground-color']};\n }\n }\n\n > ${StyledText} > ${StyledLink} {\n color: ${color};\n }\n\n + ${StyledHeaderActions} {\n padding-inline-start: 0;\n }\n `;\n});\n\nStyledCaseHeaderText.defaultProps = defaultThemeProp;\n\nexport const StyledCaseHeaderPromotedAction = styled(Button)(({ theme }) => {\n const {\n base: {\n palette: { interactive }\n },\n components: {\n 'case-view': {\n header: { background, 'foreground-color': foregroundColor }\n }\n }\n } = theme;\n\n /* If foreground color is auto, we calculate the text color based on the background color. */\n const textColor = calculateForegroundColor(background, foregroundColor);\n const isGradientBackground = !isSolidColor(background);\n const backgroundColor = isGradientBackground ? readableColor(textColor) : background;\n const interactiveUsable = getContrast(backgroundColor, interactive) >= 4.5;\n const color = !isGradientBackground && interactiveUsable ? interactive : textColor;\n\n let hoverBackground = rgba(color, 0.15);\n if (!isGradientBackground && interactiveUsable) {\n hoverBackground = readableHue(interactive, color);\n }\n return css`\n --button-background-color: ${backgroundColor};\n color: ${color};\n background-color: transparent;\n border-color: ${color};\n\n @media (hover: hover) {\n &:hover {\n --button-background-color: ${hoverBackground};\n color: ${color};\n background-color: ${hoverBackground};\n border-color: ${color};\n }\n\n &:active {\n --button-background-color: ${hoverBackground};\n color: ${color};\n background-color: ${hoverBackground};\n border-color: ${color};\n }\n }\n `;\n});\n\nStyledCaseHeaderPromotedAction.defaultProps = defaultThemeProp;\n\nexport const StyledHeaderSummaryBlock = styled.div<{ hasItems: boolean }>(({ hasItems, theme }) => {\n const {\n base: {\n spacing,\n palette: { 'brand-primary': primary }\n }\n } = theme;\n\n const color = readableColor(primary);\n const transparentColor = tryCatch(() => transparentize(0.5, color));\n\n return css`\n ${hasItems &&\n css`\n border-inline-start: 0.0625rem solid ${transparentColor};\n `}\n\n ${StyledStackedFieldValue}:first-child {\n margin-inline-start: calc(2 * ${spacing});\n }\n `;\n});\n\nStyledHeaderSummaryBlock.defaultProps = defaultThemeProp;\n\nconst popoverColorReset = (theme: DefaultTheme) => {\n const {\n base: {\n palette: { interactive, light, 'foreground-color': baseForeground }\n }\n } = theme;\n\n return css`\n ${StyledPopover}:not(${StyledTooltip}) {\n color: ${baseForeground};\n\n ${StyledButtonLink},\n ${StyledLink} {\n color: ${interactive};\n text-decoration: none;\n\n &:hover,\n &:active {\n text-decoration: underline;\n }\n\n &:focus {\n box-shadow:\n inset 0 0 0 0.0625rem ${light},\n 0 0 0.125rem 0.0625rem ${interactive};\n }\n }\n }\n `;\n};\n\nexport const StyledHeaderSummary = styled.dl(({ theme }) => {\n const {\n base: {\n palette: { interactive }\n },\n components: {\n 'case-view': {\n header: { 'foreground-color': foregroundColor, background }\n }\n }\n } = theme;\n\n /* If the foreground-color is auto, we calculate the text color and transparentColor based on the background color. */\n const color = calculateForegroundColor(background, foregroundColor);\n const { backgroundColor } = calculateBackgroundAndContrastColor(background, foregroundColor);\n const interactiveUsable = meetsContrastGuidelines(backgroundColor, interactive).AA;\n\n return css`\n max-width: 100%;\n min-width: 0;\n\n > ${StyledStackedFieldValue} {\n > ${StyledLabel} {\n color: ${color};\n white-space: nowrap;\n }\n\n > ${StyledFieldValue} {\n color: ${color};\n white-space: nowrap;\n }\n\n ${StyledButtonLink},\n ${StyledLink} {\n &:focus-visible {\n box-shadow: inset 0 0 0 0.0625rem ${color};\n }\n\n ${!interactiveUsable &&\n css`\n color: ${color};\n text-decoration: underline;\n `}\n }\n\n ${popoverColorReset(theme)}\n }\n `;\n});\n\nStyledHeaderSummary.defaultProps = defaultThemeProp;\n\nexport const StyledHeaderSummaryValue = styled(StyledFieldValue)(({\n bold,\n truncate,\n theme\n}: {\n bold?: boolean;\n truncate?: boolean;\n theme: DefaultTheme;\n}) => {\n const {\n base: {\n 'content-width': { xs }\n },\n components: {\n text: {\n h1: { 'font-weight': h1Weight }\n }\n }\n } = theme;\n\n return css`\n overflow: hidden;\n text-overflow: ellipsis;\n\n ${truncate &&\n css`\n max-width: ${xs};\n `}\n\n ${bold &&\n css`\n font-weight: ${h1Weight};\n `}\n\n /*\n * :not([hidden]) necessary to prevent hidden span with preview a11y instructions from\n * factoring into scrollWidth of element when determining truncation.\n */\n > :not([hidden]) {\n display: inline;\n }\n `;\n});\n\nStyledHeaderSummaryValue.defaultProps = defaultThemeProp;\n\nexport const StyledCaseSummaryInfo = styled.div(\n ({\n theme: {\n base: {\n palette: { 'primary-background': primaryBackground },\n 'border-radius': borderRadius\n },\n components: {\n tabs: { detached: tabsDetached }\n }\n }\n }) => {\n const { intelligentGuidance } = useCaseViewContext();\n\n return css`\n overflow: auto;\n flex: 1;\n ${tabsDetached &&\n css`\n background: ${primaryBackground};\n border-radius: ${borderRadius};\n border-start-start-radius: 0;\n border-start-end-radius: 0;\n `}\n ${intelligentGuidance &&\n css`\n /* Accounts for collapsed intelligentGuidance list covering summary panel content when fully scrolled. */\n padding-block-end: 4rem;\n `}\n `;\n }\n);\n\nStyledCaseSummaryInfo.defaultProps = defaultThemeProp;\n\nexport const StyledCaseSummaryContainer = styled.div(({ theme }) => {\n const {\n base: {\n palette: { 'primary-background': primaryBackground }\n },\n components: {\n 'field-value-list': {\n inline: { detached }\n }\n }\n } = theme;\n return css`\n padding: calc(1.5 * ${theme.base.spacing}) calc(${theme.components.card.padding} * 2);\n\n ${detached &&\n css`\n padding: 0;\n background: ${primaryBackground};\n `}\n `;\n});\n\nStyledCaseSummaryContainer.defaultProps = defaultThemeProp;\n\nexport const StyledExpandCollapseButton = styled(Button)(() => {\n return css`\n border: none;\n ${StyledIcon} {\n width: 1.5rem;\n height: 1.5rem;\n }\n `;\n});\n\nStyledExpandCollapseButton.defaultProps = defaultThemeProp;\n\nexport const StyledExpandCollapseSummaryButton = styled(StyledExpandCollapseButton)(({ theme }) => {\n const { summaryExpanded } = useCaseViewContext();\n\n return css`\n --half-compact-btn-height: calc(${theme.base['hit-area'].compact} / 2);\n --half-btn-compact-difference: calc(\n (${theme.base['hit-area'].mouse} - ${theme.base['hit-area'].compact}) / 2\n );\n --half-case-icon-compact-difference: calc(\n ((4 * ${theme.base.spacing}) - ${theme.base['hit-area'].compact}) / 2\n );\n @media (pointer: coarse) {\n --half-btn-compact-difference: calc(\n (${theme.base['hit-area'].finger} - ${theme.base['hit-area'].compact}) / 2\n );\n }\n position: absolute;\n z-index: 1;\n box-shadow: ${theme.base.shadow.low};\n\n ${summaryExpanded\n ? css`\n inset-block-start: calc(2 * ${theme.base.spacing} + var(--half-btn-compact-difference));\n inset-inline-start: calc(100% - var(--half-compact-btn-height));\n `\n : css`\n inset-block-end: calc(var(--half-compact-btn-height) * -1);\n inset-inline-start: calc(\n 2 * ${theme.base.spacing} + var(--half-case-icon-compact-difference)\n );\n `}\n `;\n});\n\nStyledExpandCollapseSummaryButton.defaultProps = defaultThemeProp;\n\nexport const StyledCaseSummary = styled.div(\n ({\n theme: {\n base: {\n spacing,\n palette: { 'primary-background': primaryBackground, 'border-line': borderLine },\n 'border-radius': borderRadius,\n 'hit-area': { 'mouse-min': mouseMin, 'finger-min': fingerMin }\n },\n components: {\n 'case-view': {\n summary: { detached }\n },\n tabs: { detached: tabsDetached }\n }\n }\n }) => {\n const { summaryExpanded, aboveMD } = useCaseViewContext();\n\n return css`\n background: ${primaryBackground};\n position: relative;\n height: 100%;\n ${aboveMD &&\n summaryExpanded &&\n css`\n width: 25rem;\n `}\n\n ${detached &&\n css`\n border-radius: ${borderRadius};\n --border-radius: calc(${borderRadius} * 0.5);\n `}\n\n ${tabsDetached &&\n css`\n & ${StyledTabs} {\n &[aria-orientation='vertical'] {\n padding-top: calc(1.5 * ${spacing});\n border-block-start: 0.0625rem solid ${borderLine};\n & ${StyledTab} {\n height: ${mouseMin};\n\n @media (pointer: coarse) {\n height: ${fingerMin};\n }\n }\n }\n }\n `}\n `;\n }\n);\n\nStyledCaseSummary.defaultProps = defaultThemeProp;\n\nexport const StyledTasks = styled.div(\n ({\n theme: {\n base: { spacing }\n }\n }) => {\n return css`\n &:not(:has(${StyledCard})) {\n /* Add negative top margin to compensate extra row-gap due to empty Tasks container */\n margin-block-start: calc(-2 * ${spacing});\n }\n `;\n }\n);\nStyledTasks.defaultProps = defaultThemeProp;\n\nexport const StyledTabPanelWrapper = styled.div(\n ({\n theme: {\n components: {\n card: { 'border-radius': cardBorderRadius }\n }\n }\n }) => {\n return css`\n ${StyledTabPanel} ${StyledProgressBackdrop} {\n border-radius: ${cardBorderRadius};\n }\n `;\n }\n);\n\nStyledTabPanelWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledWorkArea = styled.div(\n ({\n theme: {\n base: {\n palette: { 'border-line': borderLine },\n spacing,\n 'border-radius': borderRadius\n },\n components: {\n 'case-view': {\n assignments: {\n detached: assignmentDetached,\n background: assignmentBackground,\n 'foreground-color': assignmentForegroundColor\n }\n },\n tabs: { detached: tabsDetached },\n card: { background, 'foreground-color': foregroundColor, 'border-radius': cardBorderRadius }\n }\n }\n }) => {\n const { backgroundColor } = calculateBackgroundAndContrastColor(background, foregroundColor);\n const foregroundColorForAssignment = calculateForegroundColor(\n assignmentBackground,\n assignmentForegroundColor\n );\n const { summaryExpanded, aboveMD, intelligentGuidance, isPreview } = useCaseViewContext();\n let pbeRem = 0;\n\n if (intelligentGuidance) {\n pbeRem = aboveMD && !summaryExpanded ? 4 : 6;\n }\n\n return css`\n grid-area: work-area;\n padding: calc(2 * ${spacing});\n\n ${aboveMD &&\n css`\n padding: calc(2 * ${spacing}) 0;\n\n /* This is required to make scrollStick work. */\n ${!isPreview &&\n css`\n height: max-content;\n `}\n\n ${!summaryExpanded &&\n css`\n margin-inline-start: calc(2 * ${spacing});\n `}\n `}\n\n /* Order of style here is necessary for overriding styles above. */\n ${pbeRem > 0 &&\n css`\n /* Accounts for collapsed intelligentGuidance bubble covering work area content when fully scrolled. */\n padding-block-end: ${pbeRem}rem;\n `}\n\n &:has(${StyledAssignments}),\n &:has(${StyledHierarchicalAssignments}) {\n ${StyledStages} {\n border-block-end: 0.0625rem solid ${borderLine};\n\n &,\n ${StyledStageContainer}:first-of-type > ${StyledStage} {\n border-end-start-radius: 0;\n }\n\n &,\n ${StyledStageContainer}:last-of-type > ${StyledStage} {\n border-end-end-radius: 0;\n }\n }\n }\n\n ${tabsDetached &&\n css`\n ${StyledAllTabsWrapper} {\n border-start-start-radius: ${cardBorderRadius};\n border-start-end-radius: ${cardBorderRadius};\n\n ${StyledTabs} {\n border-radius: unset;\n border-start-end-radius: inherit;\n }\n\n ${StylesAllTabsButtonWrapper}, ${StyledMenuButton} {\n border-start-start-radius: inherit;\n }\n }\n `}\n\n &:has(${StyledStages}) {\n ${StyledCard}${StyledAssignments},\n ${StyledCard}${StyledHierarchicalAssignments} {\n margin-block-start: calc(-2 * ${spacing});\n border-start-start-radius: 0;\n border-start-end-radius: 0;\n }\n\n &:has(${StyledCard}${StyledAssignments} > ${StyledCardHeader}),\n &:has(${StyledCard}${StyledHierarchicalAssignments} > ${StyledCardHeader}) {\n ${StyledCard}${StyledAssignments},\n ${StyledCard}${StyledHierarchicalAssignments} {\n background: ${assignmentBackground};\n color: ${foregroundColorForAssignment};\n ${assignmentDetached &&\n css`\n ${StyledTaskList} {\n background-color: ${backgroundColor};\n border: solid 0.0625rem ${borderLine};\n border-radius: var(--border-radius, ${borderRadius});\n ${StyledSummaryListItem} {\n padding: calc(${spacing} / 2) ${spacing};\n }\n }\n `}\n }\n }\n }\n `;\n }\n);\n\nStyledWorkArea.defaultProps = defaultThemeProp;\n\nexport const StyledUtilitiesHeading = styled(Text)``;\n\nexport const StyledExpandCollapseUtilitiesButton = styled(StyledExpandCollapseButton)(() => {\n const { utilitiesExpanded } = useCaseViewContext();\n\n return css`\n /* Centers button over the utilities summary */\n margin-inline-end: ${utilitiesExpanded && '0.625rem'};\n `;\n});\n\nStyledExpandCollapseUtilitiesButton.defaultProps = defaultThemeProp;\n\nexport const StyledUtilities = styled.div(({ theme }) => {\n const { utilitiesExpanded, aboveLG, aboveMD } = useCaseViewContext();\n\n return css`\n height: max-content;\n margin-block: calc(2 * ${theme.base.spacing});\n\n ${StyledCardContent} ${StyledProgressBackdrop} {\n border-radius: ${theme.components.card['border-radius']};\n }\n\n /* If utilities are in an expanded drawer. */\n ${utilitiesExpanded &&\n aboveMD &&\n !aboveLG &&\n css`\n /* Maintains the column width to avoid page content shift. */\n visibility: hidden;\n `}\n\n ${aboveLG &&\n utilitiesExpanded &&\n css`\n width: 25rem;\n `}\n\n\n /* Selects the h2 in the utilities column, not the drawer. */\n ${StyledUtilitiesHeading} {\n /* Hide the utilities h2 under certain conditions.*/\n ${((aboveMD && !utilitiesExpanded) || (aboveMD && utilitiesExpanded && !aboveLG)) &&\n hideVisually()}\n }\n `;\n});\n\nStyledUtilities.defaultProps = defaultThemeProp;\n\nexport const StyledSummary = styled.div(\n ({\n theme: {\n base: { spacing, breakpoints, 'z-index': zIndex },\n components: {\n 'case-view': {\n summary: { detached: summaryDetached },\n utilities: { detached: utilitiesDetached }\n }\n }\n }\n }) => {\n const { aboveSM, aboveMD, persistentUtility, aboveXL, summaryExpanded, isPreview } =\n useCaseViewContext();\n const shouldRenderMobileTabs = !aboveMD || (persistentUtility && !aboveXL) || !summaryExpanded;\n\n return css`\n top: ${summaryExpanded ? 'var(--top-offset)' : 'var(--appshell-offset, 0)'};\n width: 100%;\n z-index: ${zIndex.popover};\n\n ${aboveMD &&\n summaryExpanded &&\n css`\n height: var(--case-view-height);\n `}\n\n ${summaryDetached &&\n aboveSM &&\n css`\n padding: calc(2 * ${spacing});\n padding-inline-end: ${utilitiesDetached && shouldRenderMobileTabs\n ? `calc(2 * ${spacing})`\n : 0};\n padding-block: ${shouldRenderMobileTabs ? 0 : `calc(2 * ${spacing})`};\n `}\n\n ${isPreview &&\n css`\n padding: 0;\n `}\n\n ${aboveMD\n ? css`\n position: sticky;\n `\n : css`\n @media (min-height: ${breakpoints.sm}) {\n position: sticky;\n }\n `}\n `;\n }\n);\n\nStyledSummary.defaultProps = defaultThemeProp;\n\nexport const StyledCaseDrawer = styled.div<{\n previewActive?: AppShellContextValue['previewActive'];\n utilitiesExpanded?: boolean;\n}>(({ previewActive, utilitiesExpanded, theme }) => {\n return css`\n --utilities-drawer-width: var(--resize-drawer-width);\n --utilities-drawer-min-width: ${resizeDrawerMinWidth};\n min-width: var(--utilities-drawer-min-width);\n max-width: ${resizeDrawerMaxWidth};\n width: var(--utilities-drawer-width);\n background-color: ${theme.base.palette['primary-background']};\n height: calc(100vh - ${headerHeight});\n inset-block-start: ${headerHeight};\n z-index: ${theme.base['z-index'].drawer - 1};\n\n ${previewActive &&\n css`\n @media (min-width: ${theme.base.breakpoints.xl}) {\n inset-inline-end: ${resizeDrawerDefaultWidth};\n ${utilitiesExpanded &&\n css`\n inset-inline-end: var(--resize-drawer-width);\n width: var(--utilities-drawer-min-width);\n `}\n }\n `}\n\n ${StyledGenAICoachContainer} {\n width: calc(var(--utilities-drawer-width) - 2rem);\n }\n `;\n});\n\nStyledCaseDrawer.defaultProps = defaultThemeProp;\n\nexport const StyledCaseDrawerContent = styled.div(\n ({\n theme: {\n base: {\n palette: { 'app-background': appBackground },\n spacing\n }\n }\n }) => {\n return css`\n background: ${appBackground};\n padding: calc(2 * ${spacing});\n height: 100%;\n overflow: auto;\n `;\n }\n);\n\nStyledCaseDrawerContent.defaultProps = defaultThemeProp;\n\nexport const StyledPersistentUtility = styled.div<{ persistentUtilityExpanded?: boolean }>(\n ({ theme, persistentUtilityExpanded }) => {\n return css`\n width: ${persistentUtilityExpanded ? '100%' : theme.base['content-width'].md};\n overflow: auto;\n position: sticky;\n z-index: 1;\n height: var(--case-view-height);\n inset-block-start: var(--top-offset);\n padding-block: calc(2 * ${theme.base.spacing});\n `;\n }\n);\n\nStyledPersistentUtility.defaultProps = defaultThemeProp;\n\nexport const StyledPersistentContainer = styled.div(({ theme }) => {\n return css`\n height: 100%;\n\n &&& ${StyledCardHeader} {\n padding-inline-start: ${theme.base.spacing};\n }\n `;\n});\n\nStyledPersistentContainer.defaultProps = defaultThemeProp;\n\nexport const StyledPersistentContent = styled.div(({ theme }) => {\n return css`\n height: calc(100% - calc(4 * ${theme.base.spacing}));\n `;\n});\n\nStyledPersistentContent.defaultProps = defaultThemeProp;\n\nexport const ScrollStick = styled.div`\n position: sticky;\n top: 0;\n`;\n\nexport const StyledCaseView = styled.div(\n ({\n theme: {\n base: {\n palette: { 'app-background': appBackground },\n spacing,\n 'border-radius': borderRadius\n },\n components: {\n 'case-view': {\n utilities: {\n detached: utilitiesDetached,\n background: utilitiesBackground,\n 'foreground-color': utilitiesForegroundColor\n },\n summary: { detached: summaryDetached }\n }\n }\n }\n }) => {\n const utilitiesForegroundComputed = calculateForegroundColor(\n utilitiesBackground,\n utilitiesForegroundColor\n );\n const { aboveSM, aboveMD, isPreview } = useCaseViewContext();\n\n return css`\n --top-offset: calc(var(--appshell-offset, 0rem) + var(--summary-height));\n --case-view-height: calc(100vh - var(--top-offset));\n position: relative;\n min-height: var(--case-view-height);\n background: ${appBackground};\n\n ${aboveMD &&\n css`\n ${StyledUtilities}:last-child {\n margin-inline-end: calc(2 * ${spacing});\n color: ${utilitiesForegroundComputed};\n\n ${!utilitiesDetached &&\n css`\n background: ${utilitiesBackground};\n margin-inline-end: 0;\n padding: calc(2 * ${spacing});\n padding-inline-end: 0;\n border-radius: ${borderRadius} 0 0 ${borderRadius};\n\n ${StyledCard},\n ${StyledGenAICoachContainer} {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n ${StyledGenAICoachContainer} {\n inset-inline-end: 0;\n }\n `}\n }\n `}\n\n ${aboveSM &&\n summaryDetached &&\n !isPreview &&\n css`\n &:not(:has(${StyledUtilities})) {\n ${StyledSummary} {\n padding-inline-end: calc(2 * ${spacing});\n }\n ${StyledCaseHeader} {\n border-end-end-radius: ${borderRadius};\n }\n }\n `}\n\n ${!aboveMD &&\n css`\n ${StyledGenAICoachContainer} {\n height: 42.5rem;\n ${StyledInitialMessageContainer} {\n justify-content: center;\n }\n }\n `}\n `;\n }\n);\n\nStyledCaseView.defaultProps = defaultThemeProp;\n\nexport const StyledUtilitiesHeader = styled(Text)`\n align-self: center;\n\n &:not(:focus) {\n ${hideVisually}\n }\n`;\n\nStyledUtilitiesHeader.defaultProps = defaultThemeProp;\n\nexport const StyledCoachButton = styled(AIButton)(({\n theme: {\n base: { spacing, breakpoints }\n }\n}) => {\n const { previewActive } = useContext(AppShellContext);\n\n return css`\n position: fixed;\n width: 2.75rem;\n height: 2.75rem;\n inset-block-end: calc(2 * ${spacing});\n inset-inline-end: calc(2 * ${spacing});\n ${previewActive &&\n css`\n @media (min-width: ${breakpoints.xl}) {\n margin-inline-end: min(var(--resize-drawer-width), ${resizeDrawerMaxWidth});\n }\n `}\n `;\n});\n\nStyledCoachButton.defaultProps = defaultThemeProp;\n\nexport const StyledUtilitiesWrapper = styled.div<{\n genAIHeight: number | undefined;\n}>(({ genAIHeight }) => {\n return genAIHeight !== undefined\n ? css`\n padding-block-end: calc(${genAIHeight}px + 1rem);\n `\n : null;\n});\n"]}
1
+ {"version":3,"file":"CaseView.styles.js","sourceRoot":"","sources":["../../../src/components/CaseView/CaseView.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,uBAAuB,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACpG,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EACL,MAAM,EACN,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,UAAU,EACV,WAAW,EACX,aAAa,EACb,UAAU,EACV,aAAa,EACb,QAAQ,EACR,cAAc,EACd,UAAU,EACV,WAAW,EACX,UAAU,E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AE,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC;IAEtD,OAAO,GAAG,CAAA;;;;gCAIoB,OAAO;iCACN,OAAO;MAClC,aAAa;QACf,GAAG,CAAA;2BACoB,WAAW,CAAC,EAAE;6DACoB,oBAAoB;;KAE5E;GACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,iBAAiB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAElD,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,GAAG,CAE7C,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE;IACrB,OAAO,WAAW,KAAK,SAAS;QAC9B,CAAC,CAAC,GAAG,CAAA;kCACyB,WAAW;OACtC;QACH,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAC,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport type { DefaultTheme } from 'styled-components';\nimport { getContrast, hideVisually, meetsContrastGuidelines, rgba, transparentize } from 'polished';\nimport { useContext } from 'react';\n\nimport {\n Button,\n calculateFontSize,\n CardContent,\n defaultThemeProp,\n StyledBreadcrumbs,\n StyledButtonLink,\n StyledFieldValue,\n StyledStackedFieldValue,\n StyledIcon,\n StyledLabel,\n StyledPopover,\n StyledText,\n StyledTooltip,\n tryCatch,\n FieldValueList,\n StyledLink,\n readableHue,\n StyledCard,\n Text,\n readableColor,\n AppShellContext,\n AIButton,\n StyledButton,\n calculateForegroundColor,\n calculateBackgroundAndContrastColor,\n isSolidColor,\n StyledSummaryListItem,\n StyledProgressBackdrop\n} from '@pega/cosmos-react-core';\nimport type { FontSize } from '@pega/cosmos-react-core';\nimport { StyledMenu } from '@pega/cosmos-react-core/lib/components/Menu/Menu.styles';\nimport type { AppShellContextValue } from '@pega/cosmos-react-core/lib/components/AppShell/AppShellContext';\nimport { headerHeight } from '@pega/cosmos-react-core/lib/components/AppShell/AppShell.styles';\nimport { StyledCardHeader } from '@pega/cosmos-react-core/lib/components/Card/CardHeader';\nimport {\n StyledAllTabsWrapper,\n StyledTabs,\n StylesAllTabsButtonWrapper\n} from '@pega/cosmos-react-core/lib/components/Tabs/Tabs.styles';\nimport {\n resizeDrawerMinWidth,\n resizeDrawerMaxWidth,\n resizeDrawerDefaultWidth\n} from '@pega/cosmos-react-core/lib/styles/constants';\nimport { StyledMenuButton } from '@pega/cosmos-react-core/lib/components/MenuButton/MenuButton';\nimport { StyledTab } from '@pega/cosmos-react-core/lib/components/Tabs/Tab';\nimport { StyledTabPanel } from '@pega/cosmos-react-core/lib/components/Tabs/TabPanel';\nimport { StyledCardContent } from '@pega/cosmos-react-core/lib/components/Card/CardContent';\n\nimport { StyledStage, StyledStageContainer, StyledStages } from '../Stages/Stages.styles';\nimport { StyledAssignments } from '../Assignments/Assignments.styles';\nimport { StyledAssignments as StyledHierarchicalAssignments } from '../HierarchicalAssignments/Assignments.styles';\nimport {\n StyledGenAICoachContainer,\n StyledInitialMessageContainer\n} from '../GenAICoach/GenAICoach.styles';\nimport { StyledTaskList } from '../Tasks/TaskList';\nimport { oneColumnDetailsColumnWidth } from '../Details/Details.styles';\n\nimport { useCaseViewContext } from './CaseView.context';\n\nconst labelWidth = '16ch';\nconst inlineEndButtonOffset = '0.375rem';\n\nexport const StyledSummaryPrimaryList = styled(FieldValueList)<{\n wrapped?: boolean;\n}>(({ theme, wrapped }) => {\n const fontSizes = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n const detached = theme.components['field-value-list'].inline.detached;\n\n return css`\n ${wrapped\n ? css`\n grid-template-columns: minmax(0, 1fr);\n `\n : css`\n ${detached &&\n css`\n gap: calc(${theme.base.spacing});\n `}\n grid-template-columns: ${labelWidth} auto;\n `}\n\n ${StyledFieldValue} {\n font-size: ${fontSizes[theme.components.text.h1['font-size'] as FontSize]};\n font-weight: ${theme.components.text.h1['font-weight']};\n > ${StyledButtonLink} {\n font-weight: inherit;\n }\n }\n `;\n});\n\nStyledSummaryPrimaryList.defaultProps = defaultThemeProp;\n\nexport const StyledSummarySecondaryList = styled(FieldValueList)(() => {\n return css`\n ${StyledStackedFieldValue} {\n grid-column: 1 / -1;\n }\n `;\n});\n\nexport const StyledCaseSummaryFields = styled.div(({ theme }) => {\n const {\n components: {\n 'field-value-list': {\n inline: { detached }\n }\n }\n } = theme;\n\n return (\n detached &&\n css`\n ${StyledSummaryPrimaryList},${StyledSummarySecondaryList} {\n padding: calc(${theme.components.card.padding} * 2);\n }\n\n ${StyledSummaryPrimaryList} + ${StyledSummarySecondaryList} {\n border-block-start: 0.0625rem solid ${theme.base.palette['border-line']};\n }\n `\n );\n});\n\nStyledCaseSummaryFields.defaultProps = defaultThemeProp;\n\nexport const StyledSummaryTabContent = styled(CardContent)(({ theme }) => {\n const {\n base: { spacing }\n } = theme;\n return css`\n ${StyledSummarySecondaryList} {\n > ${StyledStackedFieldValue} {\n max-width: ${oneColumnDetailsColumnWidth};\n }\n\n > ${StyledFieldValue} {\n max-width: calc(${oneColumnDetailsColumnWidth} - ${labelWidth} - 2 * ${spacing});\n }\n }\n `;\n});\n\nStyledSummaryTabContent.defaultProps = defaultThemeProp;\n\nexport const StyledSummaryHeading = styled(Text)(({ theme }) => {\n return css`\n margin-block-end: ${theme.base.spacing};\n `;\n});\n\nStyledSummaryHeading.defaultProps = defaultThemeProp;\n\nexport const StyledCaseHeader = styled.header(({ theme }) => {\n const {\n components: {\n 'case-view': {\n header: { 'foreground-color': caseHeaderForegroundColor, background },\n summary: { detached: summaryDetached },\n utilities: { detached: utilitiesDetached }\n }\n },\n base: { 'border-radius': borderRadius, spacing, shadow, 'z-index': zIndex, palette }\n } = theme;\n const foregroundColor = calculateForegroundColor(background, caseHeaderForegroundColor);\n const { aboveSM, aboveMD, persistentUtility, aboveXL, summaryExpanded, isPreview } =\n useCaseViewContext();\n const shouldRenderMobileTabs = !aboveMD || (persistentUtility && !aboveXL) || !summaryExpanded;\n const caseHeaderBorderRadius = shouldRenderMobileTabs\n ? `0 0 ${utilitiesDetached ? borderRadius : 0} ${borderRadius}`\n : `${borderRadius} ${borderRadius} 0 0`;\n\n return css`\n background: ${background};\n color: ${foregroundColor};\n padding: ${spacing} calc(2 * ${spacing});\n position: relative;\n\n ${summaryDetached &&\n !isPreview &&\n aboveSM &&\n css`\n border-radius: ${caseHeaderBorderRadius};\n `}\n\n h1:focus-visible {\n outline: transparent;\n box-shadow: ${shadow.focus};\n }\n\n ${StyledMenu} {\n color: ${palette['foreground-color']};\n z-index: ${zIndex.popover + 1};\n }\n `;\n});\n\nStyledCaseHeader.defaultProps = defaultThemeProp;\n\nexport const StyledFollowIconWrap = styled.label`\n font-size: 1.25rem;\n input {\n ${hideVisually}\n }\n\n input:focus + svg {\n box-shadow: ${({ theme }) => theme.base.shadow.focus};\n }\n`;\n\nStyledFollowIconWrap.defaultProps = defaultThemeProp;\n\nexport const StyledSubheading = styled.p``;\n\nStyledSubheading.defaultProps = defaultThemeProp;\n\nexport const StyledHeaderActions = styled.div<{ offsetEnd: boolean }>(({ offsetEnd, theme }) => {\n return css`\n margin-inline-start: auto;\n padding-block: ${theme.base.spacing};\n padding-inline-start: calc(2 * ${theme.base.spacing});\n\n ${offsetEnd &&\n css`\n padding-inline-end: ${inlineEndButtonOffset};\n `};\n\n ${StyledButton} {\n margin-inline-start: 0;\n }\n `;\n});\n\nStyledHeaderActions.defaultProps = defaultThemeProp;\n\nexport const StyledCaseHeaderText = styled.hgroup(({ theme }) => {\n const {\n components: {\n 'case-view': {\n header: { 'foreground-color': foregroundColor, background: caseHeaderBackground }\n }\n }\n } = theme;\n\n /* If the foreground-color is auto, we calculate the text color and transparentColor based on the background color. */\n const color = calculateForegroundColor(caseHeaderBackground, foregroundColor);\n\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n const idStyle = css`\n color: ${color};\n font-size: ${fontSize.s};\n font-weight: normal;\n `;\n\n return css`\n word-break: break-word;\n\n ${StyledSubheading} {\n ${idStyle}\n }\n\n ${StyledBreadcrumbs} {\n max-width: 100%;\n\n > a,\n > span,\n > button,\n > svg {\n ${idStyle}\n }\n\n > a,\n > button {\n &:focus {\n box-shadow: ${theme.base.shadow.focus};\n }\n }\n\n ${StyledPopover}:not(${StyledTooltip}) {\n color: ${theme.base.palette['foreground-color']};\n }\n }\n\n > ${StyledText} > ${StyledLink} {\n color: ${color};\n }\n\n + ${StyledHeaderActions} {\n padding-inline-start: 0;\n }\n `;\n});\n\nStyledCaseHeaderText.defaultProps = defaultThemeProp;\n\nexport const StyledCaseHeaderPromotedAction = styled(Button)(({ theme }) => {\n const {\n base: {\n palette: { interactive }\n },\n components: {\n 'case-view': {\n header: { background, 'foreground-color': foregroundColor }\n }\n }\n } = theme;\n\n /* If foreground color is auto, we calculate the text color based on the background color. */\n const textColor = calculateForegroundColor(background, foregroundColor);\n const isGradientBackground = !isSolidColor(background);\n const backgroundColor = isGradientBackground ? readableColor(textColor) : background;\n const interactiveUsable = getContrast(backgroundColor, interactive) >= 4.5;\n const color = !isGradientBackground && interactiveUsable ? interactive : textColor;\n\n let hoverBackground = rgba(color, 0.15);\n if (!isGradientBackground && interactiveUsable) {\n hoverBackground = readableHue(interactive, color);\n }\n return css`\n --button-background-color: ${backgroundColor};\n color: ${color};\n background-color: transparent;\n border-color: ${color};\n\n @media (hover: hover) {\n &:hover {\n --button-background-color: ${hoverBackground};\n color: ${color};\n background-color: ${hoverBackground};\n border-color: ${color};\n }\n\n &:active {\n --button-background-color: ${hoverBackground};\n color: ${color};\n background-color: ${hoverBackground};\n border-color: ${color};\n }\n }\n `;\n});\n\nStyledCaseHeaderPromotedAction.defaultProps = defaultThemeProp;\n\nexport const StyledHeaderSummaryBlock = styled.div<{ hasItems: boolean }>(({ hasItems, theme }) => {\n const {\n base: {\n spacing,\n palette: { 'brand-primary': primary }\n }\n } = theme;\n\n const color = readableColor(primary);\n const transparentColor = tryCatch(() => transparentize(0.5, color));\n\n return css`\n ${hasItems &&\n css`\n border-inline-start: 0.0625rem solid ${transparentColor};\n `}\n\n ${StyledStackedFieldValue}:first-child {\n margin-inline-start: calc(2 * ${spacing});\n }\n `;\n});\n\nStyledHeaderSummaryBlock.defaultProps = defaultThemeProp;\n\nconst popoverColorReset = (theme: DefaultTheme) => {\n const {\n base: {\n palette: { interactive, light, 'foreground-color': baseForeground }\n }\n } = theme;\n\n return css`\n ${StyledPopover}:not(${StyledTooltip}) {\n color: ${baseForeground};\n\n ${StyledButtonLink},\n ${StyledLink} {\n color: ${interactive};\n text-decoration: none;\n\n &:hover,\n &:active {\n text-decoration: underline;\n }\n\n &:focus {\n box-shadow:\n inset 0 0 0 0.0625rem ${light},\n 0 0 0.125rem 0.0625rem ${interactive};\n }\n }\n }\n `;\n};\n\nexport const StyledHeaderSummary = styled.dl(({ theme }) => {\n const {\n base: {\n palette: { interactive }\n },\n components: {\n 'case-view': {\n header: { 'foreground-color': foregroundColor, background }\n }\n }\n } = theme;\n\n /* If the foreground-color is auto, we calculate the text color and transparentColor based on the background color. */\n const color = calculateForegroundColor(background, foregroundColor);\n const { backgroundColor } = calculateBackgroundAndContrastColor(background, foregroundColor);\n const interactiveUsable = meetsContrastGuidelines(backgroundColor, interactive).AA;\n\n return css`\n max-width: 100%;\n min-width: 0;\n\n > ${StyledStackedFieldValue} {\n > ${StyledLabel} {\n color: ${color};\n white-space: nowrap;\n }\n\n > ${StyledFieldValue} {\n color: ${color};\n white-space: nowrap;\n }\n\n ${StyledButtonLink},\n ${StyledLink} {\n &:focus-visible {\n box-shadow: inset 0 0 0 0.0625rem ${color};\n }\n\n ${!interactiveUsable &&\n css`\n color: ${color};\n text-decoration: underline;\n `}\n }\n\n ${popoverColorReset(theme)}\n }\n `;\n});\n\nStyledHeaderSummary.defaultProps = defaultThemeProp;\n\nexport const StyledHeaderSummaryValue = styled(StyledFieldValue)(({\n bold,\n truncate,\n theme\n}: {\n bold?: boolean;\n truncate?: boolean;\n theme: DefaultTheme;\n}) => {\n const {\n base: {\n 'content-width': { xs }\n },\n components: {\n text: {\n h1: { 'font-weight': h1Weight }\n }\n }\n } = theme;\n\n return css`\n overflow: hidden;\n text-overflow: ellipsis;\n\n ${truncate &&\n css`\n max-width: ${xs};\n `}\n\n ${bold &&\n css`\n font-weight: ${h1Weight};\n `}\n\n /*\n * :not([hidden]) necessary to prevent hidden span with preview a11y instructions from\n * factoring into scrollWidth of element when determining truncation.\n */\n > :not([hidden]) {\n display: inline;\n }\n `;\n});\n\nStyledHeaderSummaryValue.defaultProps = defaultThemeProp;\n\nexport const StyledCaseSummaryInfo = styled.div(\n ({\n theme: {\n base: { 'border-radius': borderRadius },\n components: {\n tabs: { detached: tabsDetached },\n card: { background }\n }\n }\n }) => {\n const { intelligentGuidance } = useCaseViewContext();\n\n return css`\n overflow: auto;\n flex: 1;\n ${tabsDetached &&\n css`\n background: ${background};\n border-radius: ${borderRadius};\n border-start-start-radius: 0;\n border-start-end-radius: 0;\n `}\n ${intelligentGuidance &&\n css`\n /* Accounts for collapsed intelligentGuidance list covering summary panel content when fully scrolled. */\n padding-block-end: 4rem;\n `}\n `;\n }\n);\n\nStyledCaseSummaryInfo.defaultProps = defaultThemeProp;\n\nexport const StyledCaseSummaryContainer = styled.div(({ theme }) => {\n const {\n components: {\n 'field-value-list': {\n inline: { detached }\n },\n card: { background }\n }\n } = theme;\n return css`\n padding: calc(1.5 * ${theme.base.spacing}) calc(${theme.components.card.padding} * 2);\n\n ${detached &&\n css`\n padding: 0;\n background: ${background};\n `}\n `;\n});\n\nStyledCaseSummaryContainer.defaultProps = defaultThemeProp;\n\nexport const StyledExpandCollapseButton = styled(Button)(() => {\n return css`\n border: none;\n ${StyledIcon} {\n width: 1.5rem;\n height: 1.5rem;\n }\n `;\n});\n\nStyledExpandCollapseButton.defaultProps = defaultThemeProp;\n\nexport const StyledExpandCollapseSummaryButton = styled(StyledExpandCollapseButton)(({ theme }) => {\n const { summaryExpanded } = useCaseViewContext();\n\n return css`\n --half-compact-btn-height: calc(${theme.base['hit-area'].compact} / 2);\n --half-btn-compact-difference: calc(\n (${theme.base['hit-area'].mouse} - ${theme.base['hit-area'].compact}) / 2\n );\n --half-case-icon-compact-difference: calc(\n ((4 * ${theme.base.spacing}) - ${theme.base['hit-area'].compact}) / 2\n );\n @media (pointer: coarse) {\n --half-btn-compact-difference: calc(\n (${theme.base['hit-area'].finger} - ${theme.base['hit-area'].compact}) / 2\n );\n }\n position: absolute;\n z-index: 1;\n box-shadow: ${theme.base.shadow.low};\n\n ${summaryExpanded\n ? css`\n inset-block-start: calc(2 * ${theme.base.spacing} + var(--half-btn-compact-difference));\n inset-inline-start: calc(100% - var(--half-compact-btn-height));\n `\n : css`\n inset-block-end: calc(var(--half-compact-btn-height) * -1);\n inset-inline-start: calc(\n 2 * ${theme.base.spacing} + var(--half-case-icon-compact-difference)\n );\n `}\n `;\n});\n\nStyledExpandCollapseSummaryButton.defaultProps = defaultThemeProp;\n\nexport const StyledCaseSummary = styled.div(\n ({\n theme: {\n base: {\n spacing,\n palette: { 'border-line': borderLine, interactive },\n 'border-radius': borderRadius,\n 'hit-area': { 'mouse-min': mouseMin, 'finger-min': fingerMin }\n },\n components: {\n 'case-view': {\n summary: { detached }\n },\n card: { background: cardBackground },\n tabs: { detached: tabsDetached }\n }\n }\n }) => {\n const { summaryExpanded, aboveMD } = useCaseViewContext();\n\n return css`\n background: ${cardBackground};\n position: relative;\n height: 100%;\n ${aboveMD &&\n summaryExpanded &&\n css`\n width: 25rem;\n `}\n\n ${detached &&\n css`\n border-radius: ${borderRadius};\n --border-radius: calc(${borderRadius} * 0.5);\n `}\n\n ${tabsDetached &&\n css`\n & ${StyledTabs} {\n &[aria-orientation='vertical'] {\n padding-top: calc(1.5 * ${spacing});\n border-block-start: 0.0625rem solid ${borderLine};\n & ${StyledTab} {\n height: ${mouseMin};\n\n @media (pointer: coarse) {\n height: ${fingerMin};\n }\n &[aria-selected='true'] {\n background-color: ${transparentize(0.92, interactive)};\n }\n }\n }\n }\n `}\n `;\n }\n);\n\nStyledCaseSummary.defaultProps = defaultThemeProp;\n\nexport const StyledTasks = styled.div(\n ({\n theme: {\n base: { spacing }\n }\n }) => {\n return css`\n &:not(:has(${StyledCard})) {\n /* Add negative top margin to compensate extra row-gap due to empty Tasks container */\n margin-block-start: calc(-2 * ${spacing});\n }\n `;\n }\n);\nStyledTasks.defaultProps = defaultThemeProp;\n\nexport const StyledTabPanelWrapper = styled.div(\n ({\n theme: {\n components: {\n card: { 'border-radius': cardBorderRadius }\n }\n }\n }) => {\n return css`\n ${StyledTabPanel} ${StyledProgressBackdrop} {\n border-radius: ${cardBorderRadius};\n }\n `;\n }\n);\n\nStyledTabPanelWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledWorkArea = styled.div(\n ({\n theme: {\n base: {\n palette: { 'border-line': borderLine },\n spacing,\n 'border-radius': borderRadius\n },\n components: {\n 'case-view': {\n assignments: {\n detached: assignmentDetached,\n background: assignmentBackground,\n 'foreground-color': assignmentForegroundColor\n }\n },\n tabs: { detached: tabsDetached },\n card: { background, 'foreground-color': foregroundColor, 'border-radius': cardBorderRadius }\n }\n }\n }) => {\n const { backgroundColor } = calculateBackgroundAndContrastColor(background, foregroundColor);\n const foregroundColorForAssignment = calculateForegroundColor(\n assignmentBackground,\n assignmentForegroundColor\n );\n const { summaryExpanded, aboveMD, intelligentGuidance, isPreview } = useCaseViewContext();\n let pbeRem = 0;\n\n if (intelligentGuidance) {\n pbeRem = aboveMD && !summaryExpanded ? 4 : 6;\n }\n\n return css`\n grid-area: work-area;\n padding: calc(2 * ${spacing});\n\n ${aboveMD &&\n css`\n padding: calc(2 * ${spacing}) 0;\n\n /* This is required to make scrollStick work. */\n ${!isPreview &&\n css`\n height: max-content;\n `}\n\n ${!summaryExpanded &&\n css`\n margin-inline-start: calc(2 * ${spacing});\n `}\n `}\n\n /* Order of style here is necessary for overriding styles above. */\n ${pbeRem > 0 &&\n css`\n /* Accounts for collapsed intelligentGuidance bubble covering work area content when fully scrolled. */\n padding-block-end: ${pbeRem}rem;\n `}\n\n &:has(${StyledAssignments}),\n &:has(${StyledHierarchicalAssignments}) {\n ${StyledStages} {\n border-block-end: 0.0625rem solid ${borderLine};\n\n &,\n ${StyledStageContainer}:first-of-type > ${StyledStage} {\n border-end-start-radius: 0;\n }\n\n &,\n ${StyledStageContainer}:last-of-type > ${StyledStage} {\n border-end-end-radius: 0;\n }\n }\n }\n\n ${tabsDetached &&\n css`\n ${StyledAllTabsWrapper} {\n border-start-start-radius: ${cardBorderRadius};\n border-start-end-radius: ${cardBorderRadius};\n\n ${StyledTabs} {\n border-radius: unset;\n border-start-end-radius: inherit;\n }\n\n ${StylesAllTabsButtonWrapper}, ${StyledMenuButton} {\n border-start-start-radius: inherit;\n }\n }\n `}\n\n &:has(${StyledStages}) {\n ${StyledCard}${StyledAssignments},\n ${StyledCard}${StyledHierarchicalAssignments} {\n margin-block-start: calc(-2 * ${spacing});\n border-start-start-radius: 0;\n border-start-end-radius: 0;\n }\n\n &:has(${StyledCard}${StyledAssignments} > ${StyledCardHeader}),\n &:has(${StyledCard}${StyledHierarchicalAssignments} > ${StyledCardHeader}) {\n ${StyledCard}${StyledAssignments},\n ${StyledCard}${StyledHierarchicalAssignments} {\n background: ${assignmentBackground};\n color: ${foregroundColorForAssignment};\n ${assignmentDetached &&\n css`\n ${StyledTaskList} {\n background-color: ${backgroundColor};\n border: solid 0.0625rem ${borderLine};\n border-radius: var(--border-radius, ${borderRadius});\n ${StyledSummaryListItem} {\n padding: calc(${spacing} / 2) ${spacing};\n }\n }\n `}\n }\n }\n }\n `;\n }\n);\n\nStyledWorkArea.defaultProps = defaultThemeProp;\n\nexport const StyledUtilitiesHeading = styled(Text)``;\n\nexport const StyledExpandCollapseUtilitiesButton = styled(StyledExpandCollapseButton)(() => {\n const { utilitiesExpanded } = useCaseViewContext();\n\n return css`\n /* Centers button over the utilities summary */\n margin-inline-end: ${utilitiesExpanded && '0.625rem'};\n `;\n});\n\nStyledExpandCollapseUtilitiesButton.defaultProps = defaultThemeProp;\n\nexport const StyledUtilities = styled.div(({ theme }) => {\n const { utilitiesExpanded, aboveLG, aboveMD } = useCaseViewContext();\n\n return css`\n height: max-content;\n margin-block: calc(2 * ${theme.base.spacing});\n\n ${StyledCardContent} ${StyledProgressBackdrop} {\n border-radius: ${theme.components.card['border-radius']};\n }\n\n /* If utilities are in an expanded drawer. */\n ${utilitiesExpanded &&\n aboveMD &&\n !aboveLG &&\n css`\n /* Maintains the column width to avoid page content shift. */\n visibility: hidden;\n `}\n\n ${aboveLG &&\n utilitiesExpanded &&\n css`\n width: 25rem;\n `}\n\n\n /* Selects the h2 in the utilities column, not the drawer. */\n ${StyledUtilitiesHeading} {\n /* Hide the utilities h2 under certain conditions.*/\n ${((aboveMD && !utilitiesExpanded) || (aboveMD && utilitiesExpanded && !aboveLG)) &&\n hideVisually()}\n }\n `;\n});\n\nStyledUtilities.defaultProps = defaultThemeProp;\n\nexport const StyledSummary = styled.div(\n ({\n theme: {\n base: { spacing, breakpoints, 'z-index': zIndex },\n components: {\n 'case-view': {\n summary: { detached: summaryDetached },\n utilities: { detached: utilitiesDetached }\n }\n }\n }\n }) => {\n const { aboveSM, aboveMD, persistentUtility, aboveXL, summaryExpanded, isPreview } =\n useCaseViewContext();\n const shouldRenderMobileTabs = !aboveMD || (persistentUtility && !aboveXL) || !summaryExpanded;\n\n return css`\n top: ${summaryExpanded ? 'var(--top-offset)' : 'var(--appshell-offset, 0)'};\n width: 100%;\n z-index: ${zIndex.popover};\n\n ${aboveMD &&\n summaryExpanded &&\n css`\n height: var(--case-view-height);\n `}\n\n ${summaryDetached &&\n aboveSM &&\n css`\n padding: calc(2 * ${spacing});\n padding-inline-end: ${utilitiesDetached && shouldRenderMobileTabs\n ? `calc(2 * ${spacing})`\n : 0};\n padding-block: ${shouldRenderMobileTabs ? 0 : `calc(2 * ${spacing})`};\n `}\n\n ${isPreview &&\n css`\n padding: 0;\n `}\n\n ${aboveMD\n ? css`\n position: sticky;\n `\n : css`\n @media (min-height: ${breakpoints.sm}) {\n position: sticky;\n }\n `}\n `;\n }\n);\n\nStyledSummary.defaultProps = defaultThemeProp;\n\nexport const StyledCaseDrawer = styled.div<{\n previewActive?: AppShellContextValue['previewActive'];\n utilitiesExpanded?: boolean;\n}>(({ previewActive, utilitiesExpanded, theme }) => {\n return css`\n --utilities-drawer-width: var(--resize-drawer-width);\n --utilities-drawer-min-width: ${resizeDrawerMinWidth};\n min-width: var(--utilities-drawer-min-width);\n max-width: ${resizeDrawerMaxWidth};\n width: var(--utilities-drawer-width);\n background-color: ${theme.base.palette['primary-background']};\n height: calc(100vh - ${headerHeight});\n inset-block-start: ${headerHeight};\n z-index: ${theme.base['z-index'].drawer - 1};\n\n ${previewActive &&\n css`\n @media (min-width: ${theme.base.breakpoints.xl}) {\n inset-inline-end: ${resizeDrawerDefaultWidth};\n ${utilitiesExpanded &&\n css`\n inset-inline-end: var(--resize-drawer-width);\n width: var(--utilities-drawer-min-width);\n `}\n }\n `}\n\n ${StyledGenAICoachContainer} {\n width: calc(var(--utilities-drawer-width) - 2rem);\n }\n `;\n});\n\nStyledCaseDrawer.defaultProps = defaultThemeProp;\n\nexport const StyledCaseDrawerContent = styled.div(\n ({\n theme: {\n base: {\n palette: { 'app-background': appBackground },\n spacing\n }\n }\n }) => {\n return css`\n background: ${appBackground};\n padding: calc(2 * ${spacing});\n height: 100%;\n overflow: auto;\n `;\n }\n);\n\nStyledCaseDrawerContent.defaultProps = defaultThemeProp;\n\nexport const StyledPersistentUtility = styled.div<{ persistentUtilityExpanded?: boolean }>(\n ({ theme, persistentUtilityExpanded }) => {\n return css`\n width: ${persistentUtilityExpanded ? '100%' : theme.base['content-width'].md};\n overflow: auto;\n position: sticky;\n z-index: 1;\n height: var(--case-view-height);\n inset-block-start: var(--top-offset);\n padding-block: calc(2 * ${theme.base.spacing});\n `;\n }\n);\n\nStyledPersistentUtility.defaultProps = defaultThemeProp;\n\nexport const StyledPersistentContainer = styled.div(({ theme }) => {\n return css`\n height: 100%;\n\n &&& ${StyledCardHeader} {\n padding-inline-start: ${theme.base.spacing};\n }\n `;\n});\n\nStyledPersistentContainer.defaultProps = defaultThemeProp;\n\nexport const StyledPersistentContent = styled.div(({ theme }) => {\n return css`\n height: calc(100% - calc(4 * ${theme.base.spacing}));\n `;\n});\n\nStyledPersistentContent.defaultProps = defaultThemeProp;\n\nexport const ScrollStick = styled.div`\n position: sticky;\n top: 0;\n`;\n\nexport const StyledCaseView = styled.div(\n ({\n theme: {\n base: {\n palette: { 'app-background': appBackground },\n spacing,\n 'border-radius': borderRadius\n },\n components: {\n 'case-view': {\n utilities: {\n detached: utilitiesDetached,\n background: utilitiesBackground,\n 'foreground-color': utilitiesForegroundColor\n },\n summary: { detached: summaryDetached }\n }\n }\n }\n }) => {\n const utilitiesForegroundComputed = calculateForegroundColor(\n utilitiesBackground,\n utilitiesForegroundColor\n );\n const { aboveSM, aboveMD, isPreview } = useCaseViewContext();\n\n return css`\n --top-offset: calc(var(--appshell-offset, 0rem) + var(--summary-height));\n --case-view-height: calc(100vh - var(--top-offset));\n position: relative;\n min-height: var(--case-view-height);\n background: ${appBackground};\n\n ${aboveMD &&\n css`\n ${StyledUtilities}:last-child {\n margin-inline-end: calc(2 * ${spacing});\n color: ${utilitiesForegroundComputed};\n\n ${!utilitiesDetached &&\n css`\n background: ${utilitiesBackground};\n margin-inline-end: 0;\n padding: calc(2 * ${spacing});\n padding-inline-end: 0;\n border-radius: ${borderRadius} 0 0 ${borderRadius};\n\n ${StyledCard},\n ${StyledGenAICoachContainer} {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n ${StyledGenAICoachContainer} {\n inset-inline-end: 0;\n }\n `}\n }\n `}\n\n ${aboveSM &&\n summaryDetached &&\n !isPreview &&\n css`\n &:not(:has(${StyledUtilities})) {\n ${StyledSummary} {\n padding-inline-end: calc(2 * ${spacing});\n }\n ${StyledCaseHeader} {\n border-end-end-radius: ${borderRadius};\n }\n }\n `}\n\n ${!aboveMD &&\n css`\n ${StyledGenAICoachContainer} {\n height: 42.5rem;\n ${StyledInitialMessageContainer} {\n justify-content: center;\n }\n }\n `}\n `;\n }\n);\n\nStyledCaseView.defaultProps = defaultThemeProp;\n\nexport const StyledUtilitiesHeader = styled(Text)`\n align-self: center;\n\n &:not(:focus) {\n ${hideVisually}\n }\n`;\n\nStyledUtilitiesHeader.defaultProps = defaultThemeProp;\n\nexport const StyledCoachButton = styled(AIButton)(({\n theme: {\n base: { spacing, breakpoints }\n }\n}) => {\n const { previewActive } = useContext(AppShellContext);\n\n return css`\n position: fixed;\n width: 2.75rem;\n height: 2.75rem;\n inset-block-end: calc(2 * ${spacing});\n inset-inline-end: calc(2 * ${spacing});\n ${previewActive &&\n css`\n @media (min-width: ${breakpoints.xl}) {\n margin-inline-end: min(var(--resize-drawer-width), ${resizeDrawerMaxWidth});\n }\n `}\n `;\n});\n\nStyledCoachButton.defaultProps = defaultThemeProp;\n\nexport const StyledUtilitiesWrapper = styled.div<{\n genAIHeight: number | undefined;\n}>(({ genAIHeight }) => {\n return genAIHeight !== undefined\n ? css`\n padding-block-end: calc(${genAIHeight}px + 1rem);\n `\n : null;\n});\n"]}
@@ -1,5 +1,6 @@
1
1
  import type { Dispatch, Ref, SetStateAction } from 'react';
2
2
  import type { BaseProps, MenuProps, OmitStrict, ProgressProps, RequireAtLeastOne, TestIdProp, WithAttributes, ActionsProps, FileItemProps, FileDisplayProps, LightboxProps } from '@pega/cosmos-react-core';
3
+ import type { MDMap } from '@pega/cosmos-react-rte';
3
4
  export type State = 'minimized' | 'maximized';
4
5
  export type Reaction = 'liked' | 'disliked';
5
6
  export type Variant = {
@@ -39,6 +40,7 @@ export type CoachMessageProps = RequireAtLeastOne<Partial<Pick<GenAICoachProps,
39
40
  allChunksReceived?: boolean;
40
41
  error?: string;
41
42
  message?: MessageProps['message'];
43
+ markdownMap?: MDMap;
42
44
  onStreamingUpdate?: (isStreamingDone: boolean) => void;
43
45
  feedback?: {
44
46
  reaction: Reaction | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"GenAICoach.types.d.ts","sourceRoot":"","sources":["../../../src/components/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CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC/B,mCAAmC;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,kCAAkC;IAClC,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,6DAA6D;IAC7D,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,sCAAsC;IACtC,mBAAmB,CAAC,EAAE,wBAAwB,CAAC;IAC/C,4DAA4D;IAC5D,cAAc,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,+CAA+C;IAC/C,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IAC1C,uBAAuB;IACvB,WAAW,CAAC,EAAE,aAAa,EAAE,CAAC;IAC9B,2BAA2B;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mGAAmG;IACnG,oBAAoB,CAAC,EAAE,aAAa,CAAC;IACrC,yBAAyB;IACzB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CACF,CAAC;AAEF,MAAM,WAAW,wBAAyB,SAAQ,UAAU,CAAC,eAAe,EAAE,SAAS,CAAC;IACtF,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"GenAICoach.types.js","sourceRoot":"","sources":["../../../src/components/GenAICoach/GenAICoach.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Dispatch, Ref, SetStateAction } from 'react';\n\nimport type {\n BaseProps,\n MenuProps,\n OmitStrict,\n ProgressProps,\n RequireAtLeastOne,\n TestIdProp,\n WithAttributes,\n ActionsProps,\n FileItemProps,\n FileDisplayProps,\n LightboxProps\n} from '@pega/cosmos-react-core';\n\nexport type State = 'minimized' | 'maximized';\nexport type Reaction = 'liked' | 'disliked';\n\nexport type Variant =\n | {\n placement: 'utilities';\n state: State;\n onStateChange: (state: State) => void;\n setGenAIHeight?: Dispatch<SetStateAction<number | undefined>>;\n }\n | { placement: 'fullpage' }\n | { placement: 'dialog'; onClose: () => void };\n\nexport interface MessageProps {\n id: string;\n message: string;\n announceInteraction?: boolean;\n attachments?: FileDisplayProps[];\n /**\n * Whether the message is a suggestion from the composer\n * @default false\n */\n fromComposer?: boolean;\n /** Ref forwarded to the wrapping element. */\n ref?: Ref<HTMLLIElement>;\n}\n\nexport type InitialSuggestedMessageProps = Pick<GenAICoachProps, 'onSend'> &\n BaseProps &\n TestIdProp &\n MessageProps;\n\nexport interface UserMessageProps extends BaseProps, TestIdProp, MessageProps {\n from: 'user';\n}\n\nexport type CoachMessageProps = RequireAtLeastOne<\n Partial<Pick<GenAICoachProps, 'onSend'>> &\n BaseProps &\n TestIdProp &\n Pick<MessageProps, 'id' | 'announceInteraction' | 'ref'> & {\n from: 'coach';\n coachName: string;\n suggestions?: MessageProps[];\n loading?: boolean;\n enableStreaming?: boolean;\n allChunksReceived?: boolean;\n error?: string;\n message?: MessageProps['message'];\n onStreamingUpdate?: (isStreamingDone: boolean) => void;\n feedback?: {\n reaction: Reaction | undefined;\n onReaction: (id: MessageProps['id'], reaction: Reaction) => void;\n onFeedbackComplete: (id: MessageProps['id'], comment?: string) => void;\n };\n onAnimationCursorUpdate?: (animatedTillCursor: number) => void;\n animationInitialCursorPos?: number;\n },\n 'loading' | 'message' | 'error'\n>;\n\nexport type GenAIMessageProps = UserMessageProps | CoachMessageProps;\n\nexport interface ConversationHistoryProps extends TestIdProp {\n /** List of History items. */\n data: {\n id: string;\n section: string;\n conversations: {\n id: string;\n title: string;\n }[];\n }[];\n /** Click event for items within the list. */\n onItemClick?: (conversationId: string) => void;\n /** List loading state. */\n loading?: boolean;\n /** Called at scroll trigger to load more items. */\n loadMore?: () => void;\n /** True if History view is rendered in Full page view. */\n inFullPage?: boolean;\n /** Callback triggered when closing the history view. */\n onDismiss: () => void;\n /** Id of the selected item. */\n selectedItemId?: string;\n /** Set if there is an error in retreiving the data. */\n error?: string;\n /** Ref forwarded to the wrapping element. */\n ref?: Ref<HTMLUListElement>;\n}\n\nexport type SendMessageProps = OmitStrict<MessageProps, 'attachments'> & {\n attachmentIds?: string[];\n};\n\nexport type GenAICoachProps = WithAttributes<\n 'div',\n TestIdProp & {\n /** Chat loading indicator */\n loading?: boolean | ProgressProps['message'];\n /** Set if there is an error in retreiving the data */\n error?: string;\n /** Coaches available in the chat header */\n coachOptions: MenuProps['items'];\n /** Handle the coach selections */\n onCoachChange: (id: MenuProps['id']) => void;\n /** Suggested messages to start the conversation */\n initialSuggestedMessages?: MessageProps[];\n /** Additional suggestions presented at the bottom of the chat window */\n suggestions?: MenuProps['items'];\n /** Send prompts */\n onSend: (message: SendMessageProps) => void;\n /** Messages to be shown in the chatting window. */\n messages?: GenAIMessageProps[];\n /** Placement of the component */\n variant: Variant;\n /** From landing page utilities */\n isInLandingPageUtilities?: boolean;\n /** callback when component is mounted */\n onOpen?: () => void;\n /**\n * User would be guided with selective prompts to enable interaction with coach.\n * @default false\n */\n guidedMode?: boolean;\n /** Pass an array of Action objects to show Action button. */\n actions?: ActionsProps;\n /** Pass data to show history view. */\n conversationHistory?: ConversationHistoryProps;\n /** Callback triggered when the layout component changes. */\n onLayoutChange?: (inFullPage: boolean) => void;\n /** Callback when attachment icon is clicked */\n onAddAttachment?: (files: File[]) => void;\n /** Attachments list */\n attachments?: FileItemProps[];\n /** Error in attachments */\n attachmentsError?: string;\n /** Configuration for the Lightbox component that handles preview of media attachments and files */\n lightboxPreviewProps?: LightboxProps;\n /** Enable full screen */\n allowFullScreen?: boolean;\n }\n>;\n\nexport interface UtilitiesGenAICoachProps extends OmitStrict<GenAICoachProps, 'variant'> {\n onClose?: () => void;\n}\n"]}
1
+ {"version":3,"file":"GenAICoach.types.js","sourceRoot":"","sources":["../../../src/components/GenAICoach/GenAICoach.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Dispatch, Ref, SetStateAction } from 'react';\n\nimport type {\n BaseProps,\n MenuProps,\n OmitStrict,\n ProgressProps,\n RequireAtLeastOne,\n TestIdProp,\n WithAttributes,\n ActionsProps,\n FileItemProps,\n FileDisplayProps,\n LightboxProps\n} from '@pega/cosmos-react-core';\nimport type { MDMap } from '@pega/cosmos-react-rte';\n\nexport type State = 'minimized' | 'maximized';\nexport type Reaction = 'liked' | 'disliked';\n\nexport type Variant =\n | {\n placement: 'utilities';\n state: State;\n onStateChange: (state: State) => void;\n setGenAIHeight?: Dispatch<SetStateAction<number | undefined>>;\n }\n | { placement: 'fullpage' }\n | { placement: 'dialog'; onClose: () => void };\n\nexport interface MessageProps {\n id: string;\n message: string;\n announceInteraction?: boolean;\n attachments?: FileDisplayProps[];\n /**\n * Whether the message is a suggestion from the composer\n * @default false\n */\n fromComposer?: boolean;\n /** Ref forwarded to the wrapping element. */\n ref?: Ref<HTMLLIElement>;\n}\n\nexport type InitialSuggestedMessageProps = Pick<GenAICoachProps, 'onSend'> &\n BaseProps &\n TestIdProp &\n MessageProps;\n\nexport interface UserMessageProps extends BaseProps, TestIdProp, MessageProps {\n from: 'user';\n}\n\nexport type CoachMessageProps = RequireAtLeastOne<\n Partial<Pick<GenAICoachProps, 'onSend'>> &\n BaseProps &\n TestIdProp &\n Pick<MessageProps, 'id' | 'announceInteraction' | 'ref'> & {\n from: 'coach';\n coachName: string;\n suggestions?: MessageProps[];\n loading?: boolean;\n enableStreaming?: boolean;\n allChunksReceived?: boolean;\n error?: string;\n message?: MessageProps['message'];\n markdownMap?: MDMap;\n onStreamingUpdate?: (isStreamingDone: boolean) => void;\n feedback?: {\n reaction: Reaction | undefined;\n onReaction: (id: MessageProps['id'], reaction: Reaction) => void;\n onFeedbackComplete: (id: MessageProps['id'], comment?: string) => void;\n };\n onAnimationCursorUpdate?: (animatedTillCursor: number) => void;\n animationInitialCursorPos?: number;\n },\n 'loading' | 'message' | 'error'\n>;\n\nexport type GenAIMessageProps = UserMessageProps | CoachMessageProps;\n\nexport interface ConversationHistoryProps extends TestIdProp {\n /** List of History items. */\n data: {\n id: string;\n section: string;\n conversations: {\n id: string;\n title: string;\n }[];\n }[];\n /** Click event for items within the list. */\n onItemClick?: (conversationId: string) => void;\n /** List loading state. */\n loading?: boolean;\n /** Called at scroll trigger to load more items. */\n loadMore?: () => void;\n /** True if History view is rendered in Full page view. */\n inFullPage?: boolean;\n /** Callback triggered when closing the history view. */\n onDismiss: () => void;\n /** Id of the selected item. */\n selectedItemId?: string;\n /** Set if there is an error in retreiving the data. */\n error?: string;\n /** Ref forwarded to the wrapping element. */\n ref?: Ref<HTMLUListElement>;\n}\n\nexport type SendMessageProps = OmitStrict<MessageProps, 'attachments'> & {\n attachmentIds?: string[];\n};\n\nexport type GenAICoachProps = WithAttributes<\n 'div',\n TestIdProp & {\n /** Chat loading indicator */\n loading?: boolean | ProgressProps['message'];\n /** Set if there is an error in retreiving the data */\n error?: string;\n /** Coaches available in the chat header */\n coachOptions: MenuProps['items'];\n /** Handle the coach selections */\n onCoachChange: (id: MenuProps['id']) => void;\n /** Suggested messages to start the conversation */\n initialSuggestedMessages?: MessageProps[];\n /** Additional suggestions presented at the bottom of the chat window */\n suggestions?: MenuProps['items'];\n /** Send prompts */\n onSend: (message: SendMessageProps) => void;\n /** Messages to be shown in the chatting window. */\n messages?: GenAIMessageProps[];\n /** Placement of the component */\n variant: Variant;\n /** From landing page utilities */\n isInLandingPageUtilities?: boolean;\n /** callback when component is mounted */\n onOpen?: () => void;\n /**\n * User would be guided with selective prompts to enable interaction with coach.\n * @default false\n */\n guidedMode?: boolean;\n /** Pass an array of Action objects to show Action button. */\n actions?: ActionsProps;\n /** Pass data to show history view. */\n conversationHistory?: ConversationHistoryProps;\n /** Callback triggered when the layout component changes. */\n onLayoutChange?: (inFullPage: boolean) => void;\n /** Callback when attachment icon is clicked */\n onAddAttachment?: (files: File[]) => void;\n /** Attachments list */\n attachments?: FileItemProps[];\n /** Error in attachments */\n attachmentsError?: string;\n /** Configuration for the Lightbox component that handles preview of media attachments and files */\n lightboxPreviewProps?: LightboxProps;\n /** Enable full screen */\n allowFullScreen?: boolean;\n }\n>;\n\nexport interface UtilitiesGenAICoachProps extends OmitStrict<GenAICoachProps, 'variant'> {\n onClose?: () => void;\n}\n"]}
@@ -1,5 +1,11 @@
1
1
  import { type ForwardRefForwardPropsComponent } from '@pega/cosmos-react-core';
2
2
  import type { GenAIMessageProps } from './GenAICoach.types';
3
+ type StreamingContextProps = {
4
+ isStreamingMessage?: boolean;
5
+ isStreamingInProgress?: boolean;
6
+ };
7
+ /** Metadata Context */
8
+ export declare const StreamingContext: import("react").Context<StreamingContextProps | undefined>;
3
9
  declare const GenAIMessage: ForwardRefForwardPropsComponent<GenAIMessageProps>;
4
10
  export default GenAIMessage;
5
11
  //# sourceMappingURL=GenAIMessage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GenAIMessage.d.ts","sourceRoot":"","sources":["../../../src/components/GenAICoach/GenAIMessage.tsx"],"names":[],"mappings":"AAGA,OAAO,EAgBL,KAAK,+BAA+B,EACrC,MAAM,yBAAyB,CAAC;AASjC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAqB5D,QAAA,MAAM,YAAY,EAAE,+BAA+B,CAAC,iBAAiB,CAoQpE,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"GenAIMessage.d.ts","sourceRoot":"","sources":["../../../src/components/GenAICoach/GenAIMessage.tsx"],"names":[],"mappings":"AAGA,OAAO,EAgBL,KAAK,+BAA+B,EACrC,MAAM,yBAAyB,CAAC;AASjC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAqB5D,KAAK,qBAAqB,GAAG;IAC3B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC,CAAC;AAEF,uBAAuB;AACvB,eAAO,MAAM,gBAAgB,4DAE3B,CAAC;AAEH,QAAA,MAAM,YAAY,EAAE,+BAA+B,CAAC,iBAAiB,CAqRpE,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef, useEffect, useRef, useState } from 'react';
2
+ import { createContext, forwardRef, useEffect, useMemo, useRef, useState } from 'react';
3
3
  import { Button, Flex, Icon, Progress, registerIcon, useI18n, useTheme, useTestIds, ErrorState, useElement, Tooltip, TextArea, FormDialog, useElementFocus, markdownToPlainText } from '@pega/cosmos-react-core';
4
4
  import * as polarisSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/polaris-solid.icon';
5
5
  import * as thumbsUpSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/thumbs-up-solid.icon';
@@ -13,6 +13,10 @@ import { getGenAICoachTestIds } from './GenAICoach.test-ids';
13
13
  import { isCoachMessage, isUserMessage } from './GenAICoach.utils';
14
14
  import GenAIMessageProgress from './GenAIMessageProgress';
15
15
  registerIcon(polarisSolidIcon, thumbsUpSolidIcon, thumbsUpIcon, thumbsDownSolidIcon, thumbsDownIcon);
16
+ /** Metadata Context */
17
+ export const StreamingContext = createContext({
18
+ isStreamingMessage: false
19
+ });
16
20
  const GenAIMessage = forwardRef(function GenAIMessage(props, ref) {
17
21
  const testIds = useTestIds(props.testId, getGenAICoachTestIds);
18
22
  const theme = useTheme();
@@ -52,8 +56,11 @@ const GenAIMessage = forwardRef(function GenAIMessage(props, ref) {
52
56
  focusOnInteractionRef.current = false;
53
57
  }
54
58
  }, [showDialog]);
59
+ const streamingContext = useMemo(() => {
60
+ return { isStreamingMessage, isStreamingInProgress: isCoachMessage(props) && props.loading };
61
+ }, [isStreamingMessage, props]);
55
62
  if (isCoachMessage(props)) {
56
- const { id: messageId, coachName, suggestions, onSend, loading, error, feedback } = props;
63
+ const { id: messageId, coachName, suggestions, onSend, loading, error, feedback, markdownMap } = props;
57
64
  const { reaction, onReaction, onFeedbackComplete } = feedback ?? {};
58
65
  let selectedFeedbackResponse;
59
66
  let feedbackAriaLabel = t('sender_replied_message', [coachName, plainTextMessage ?? '']);
@@ -70,8 +77,8 @@ const GenAIMessage = forwardRef(function GenAIMessage(props, ref) {
70
77
  if (announceInteraction) {
71
78
  ariaLabel = `${ariaLabel} ${t('interaction_message')}`;
72
79
  }
73
- const streamingContent = isStreamingMessage && (_jsx(_Fragment, { children: message ? (_jsxs(_Fragment, { children: [_jsx(RichTextViewer, { content: isStreamingMessage ? streamingMessage : message, type: 'markdown' }), loading && _jsx(Progress, { variant: 'ellipsis', placement: 'inline' })] })) : (loading && _jsx(GenAIMessageProgress, {})) }));
74
- return (_jsxs(Flex, { as: 'li', "data-testid": testIds.coachMessage, ...restProps, container: { direction: 'row', pad: [1, 0], gap: 0.5 }, type: 'message', "aria-label": ariaLabel, ref: ref, children: [_jsx(StyledGenAIAvatar, { name: coachName, icon: 'polaris-solid', color: theme.base.palette.ai, shape: 'circle', size: 'm' }), _jsxs(StyledMessage, { children: [streamingContent, loading || error ? (_jsxs(_Fragment, { children: [loading && !isStreamingMessage && _jsx(GenAIMessageProgress, {}), error && _jsx(ErrorState, { message: error })] })) : (_jsxs(_Fragment, { children: [!isStreamingMessage && message && (_jsx(RichTextViewer, { content: message, type: 'markdown' })), feedback && (_jsx(Flex, { container: { pad: [0.5, undefined] }, children: reaction ? (_jsxs(_Fragment, { children: [_jsx(Flex, { container: { pad: 0.5 }, "aria-label": selectedFeedbackResponse, ref: setWrapperEl, tabIndex: -1, children: _jsx(Icon, { name: reaction === 'liked' ? 'thumbs-up-solid' : 'thumbs-down-solid' }) }), showDialog ? (onFeedbackComplete &&
80
+ const streamingContent = isStreamingMessage && (_jsx(_Fragment, { children: message ? (_jsxs(_Fragment, { children: [_jsx(StreamingContext.Provider, { value: streamingContext, children: _jsx(RichTextViewer, { content: isStreamingMessage ? streamingMessage : message, type: 'markdown', markdownMap: markdownMap }) }), loading && _jsx(Progress, { variant: 'ellipsis', placement: 'inline' })] })) : (loading && _jsx(GenAIMessageProgress, {})) }));
81
+ return (_jsxs(Flex, { as: 'li', "data-testid": testIds.coachMessage, ...restProps, container: { direction: 'row', pad: [1, 0], gap: 0.5 }, type: 'message', "aria-label": ariaLabel, ref: ref, children: [_jsx(StyledGenAIAvatar, { name: coachName, icon: 'polaris-solid', color: theme.base.palette.ai, shape: 'circle', size: 'm' }), _jsxs(StyledMessage, { children: [streamingContent, loading || error ? (_jsxs(_Fragment, { children: [loading && !isStreamingMessage && _jsx(GenAIMessageProgress, {}), error && _jsx(ErrorState, { message: error })] })) : (_jsxs(_Fragment, { children: [!isStreamingMessage && message && (_jsx(RichTextViewer, { content: message, type: 'markdown', markdownMap: markdownMap })), feedback && (_jsx(Flex, { container: { pad: [0.5, undefined] }, children: reaction ? (_jsxs(_Fragment, { children: [_jsx(Flex, { container: { pad: 0.5 }, "aria-label": selectedFeedbackResponse, ref: setWrapperEl, tabIndex: -1, children: _jsx(Icon, { name: reaction === 'liked' ? 'thumbs-up-solid' : 'thumbs-down-solid' }) }), showDialog ? (onFeedbackComplete &&
75
82
  wrapperEl && (_jsx(FormDialog, { target: wrapperEl, heading: t('share_feedback'), onCancel: () => {
76
83
  focusOnInteractionRef.current = true;
77
84
  setShowDialog(false);
@@ -1 +1 @@
1
- {"version":3,"file":"GenAIMessage.js","sourceRoot":"","sources":["../../../src/components/GenAICoach/GenAIMessage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGhE,OAAO,EACL,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,UAAU,EACV,UAAU,EACV,UAAU,EACV,OAAO,EACP,QAAQ,EACR,UAAU,EACV,eAAe,EACf,mBAAmB,EAEpB,MAAM,yBAAyB,CAAC;AAC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,UAAU,GAAG,IAC9C,CACrB,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CACF,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import { forwardRef, useEffect, useRef, useState } from 'react';\nimport type { KeyboardEvent, PropsWithoutRef } from 'react';\n\nimport {\n Button,\n Flex,\n Icon,\n Progress,\n registerIcon,\n useI18n,\n useTheme,\n useTestIds,\n ErrorState,\n useElement,\n Tooltip,\n TextArea,\n FormDialog,\n useElementFocus,\n markdownToPlainText,\n type ForwardRefForwardPropsComponent\n} from '@pega/cosmos-react-core';\nimport * as polarisSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/polaris-solid.icon';\nimport * as thumbsUpSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/thumbs-up-solid.icon';\nimport * as thumbsUpIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/thumbs-up.icon';\nimport * as thumbsDownSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/thumbs-down-solid.icon';\nimport * as thumbsDownIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/thumbs-down.icon';\nimport { RichTextViewer } from '@pega/cosmos-react-rte';\nimport { useAnimatedText } from '@pega/cosmos-react-core';\n\nimport type { GenAIMessageProps } from './GenAICoach.types';\nimport {\n StyledAttachmentsList,\n StyledGenAIAvatar,\n StyledMessage,\n StyledSuggestion,\n StyledSuggestionsContainer,\n StyledUserMessage\n} from './GenAICoach.styles';\nimport { getGenAICoachTestIds } from './GenAICoach.test-ids';\nimport { isCoachMessage, isUserMessage } from './GenAICoach.utils';\nimport GenAIMessageProgress from './GenAIMessageProgress';\n\nregisterIcon(\n polarisSolidIcon,\n thumbsUpSolidIcon,\n thumbsUpIcon,\n thumbsDownSolidIcon,\n thumbsDownIcon\n);\n\nconst GenAIMessage: ForwardRefForwardPropsComponent<GenAIMessageProps> = forwardRef(\n function GenAIMessage(props: PropsWithoutRef<GenAIMessageProps>, ref: GenAIMessageProps['ref']) {\n const testIds = useTestIds(props.testId, getGenAICoachTestIds);\n const theme = useTheme();\n const t = useI18n();\n const [wrapperEl, setWrapperEl] = useElement<HTMLDivElement>(null);\n const [feedbackVal, setFeedbackVal] = useState('');\n const [showDialog, setShowDialog] = useState(false);\n const focusOnInteractionRef = useRef(false);\n\n const { message, announceInteraction, ...restProps } = props;\n const plainTextMessage = markdownToPlainText(message ?? '');\n let ariaLabel = plainTextMessage;\n\n const isStreamingMessage = isCoachMessage(props) && props.enableStreaming;\n const allChunksReceived = isCoachMessage(props) && props.allChunksReceived;\n const enableStreaming = !!isStreamingMessage && !allChunksReceived;\n\n const {\n text: streamingMessage,\n isAnimationDone: isStreamingDone,\n animatedTillCursor\n } = useAnimatedText({\n text: message ?? '',\n allContentReceived: allChunksReceived === undefined ? true : allChunksReceived,\n enabled: enableStreaming,\n tokenizeMarkdown: true,\n cursorStartIndex:\n isCoachMessage(props) && props.animationInitialCursorPos\n ? props.animationInitialCursorPos\n : undefined\n });\n\n useEffect(() => {\n if (isCoachMessage(props) && props.onAnimationCursorUpdate) {\n props.onAnimationCursorUpdate(animatedTillCursor);\n }\n }, [animatedTillCursor]);\n\n useEffect(() => {\n if (isStreamingMessage && props.onStreamingUpdate) {\n props.onStreamingUpdate(!!allChunksReceived && isStreamingDone);\n }\n }, [enableStreaming, isStreamingDone, allChunksReceived]);\n\n useElementFocus(wrapperEl, { shouldFocus: !showDialog && focusOnInteractionRef.current });\n\n useEffect(() => {\n if (!showDialog && focusOnInteractionRef.current) {\n focusOnInteractionRef.current = false;\n }\n }, [showDialog]);\n\n if (isCoachMessage(props)) {\n const { id: messageId, coachName, suggestions, onSend, loading, error, feedback } = props;\n\n const { reaction, onReaction, onFeedbackComplete } = feedback ?? {};\n\n let selectedFeedbackResponse;\n\n let feedbackAriaLabel = t('sender_replied_message', [coachName, plainTextMessage ?? '']);\n\n if (feedback && reaction) {\n selectedFeedbackResponse = t('selected_noun', [\n reaction === 'liked' ? t('good_response') : t('bad_response')\n ]);\n\n feedbackAriaLabel = `${feedbackAriaLabel} ${selectedFeedbackResponse}`;\n }\n\n ariaLabel =\n suggestions && suggestions.length > 0\n ? `${feedbackAriaLabel} ${t('suggestions_in_message', [suggestions.length])}`\n : feedbackAriaLabel;\n\n if (announceInteraction) {\n ariaLabel = `${ariaLabel} ${t('interaction_message')}`;\n }\n\n const streamingContent = isStreamingMessage && (\n <>\n {message ? (\n <>\n <RichTextViewer\n content={isStreamingMessage ? streamingMessage : message}\n type='markdown'\n />\n {loading && <Progress variant='ellipsis' placement='inline' />}\n </>\n ) : (\n loading && <GenAIMessageProgress />\n )}\n </>\n );\n\n return (\n <Flex\n as='li'\n data-testid={testIds.coachMessage}\n {...restProps}\n container={{ direction: 'row', pad: [1, 0], gap: 0.5 }}\n type='message'\n aria-label={ariaLabel}\n ref={ref}\n >\n <StyledGenAIAvatar\n name={coachName}\n icon='polaris-solid'\n color={theme.base.palette.ai}\n shape='circle'\n size='m'\n />\n <StyledMessage>\n {/* Streaming loader and content */}\n {streamingContent}\n {loading || error ? (\n <>\n {loading && !isStreamingMessage && <GenAIMessageProgress />}\n {error && <ErrorState message={error} />}\n </>\n ) : (\n <>\n {/* Non streaming content */}\n {!isStreamingMessage && message && (\n <RichTextViewer content={message} type='markdown' />\n )}\n {feedback && (\n <Flex container={{ pad: [0.5, undefined] }}>\n {reaction ? (\n <>\n <Flex\n container={{ pad: 0.5 }}\n aria-label={selectedFeedbackResponse}\n ref={setWrapperEl}\n tabIndex={-1}\n >\n <Icon\n name={reaction === 'liked' ? 'thumbs-up-solid' : 'thumbs-down-solid'}\n />\n </Flex>\n {showDialog ? (\n onFeedbackComplete &&\n wrapperEl && (\n <FormDialog\n target={wrapperEl}\n heading={t('share_feedback')}\n onCancel={() => {\n focusOnInteractionRef.current = true;\n setShowDialog(false);\n onFeedbackComplete(messageId);\n }}\n onSubmit={() => {\n focusOnInteractionRef.current = true;\n setShowDialog(false);\n onFeedbackComplete(messageId, feedbackVal);\n }}\n onKeyDown={e => e.stopPropagation()}\n >\n <TextArea\n value={feedbackVal}\n onChange={e => setFeedbackVal(e.target.value)}\n onKeyDown={(e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault();\n focusOnInteractionRef.current = true;\n setShowDialog(false);\n onFeedbackComplete(messageId, feedbackVal);\n }\n }}\n autoResize={false}\n />\n </FormDialog>\n )\n ) : (\n <Tooltip target={wrapperEl} describeTarget={false}>\n {reaction === 'liked' ? t('good_response') : t('bad_response')}\n </Tooltip>\n )}\n </>\n ) : (\n <>\n <Button\n label={t('good_response')}\n variant='simple'\n icon\n compact\n onClick={() => {\n onReaction?.(messageId, 'liked');\n focusOnInteractionRef.current = true;\n }}\n >\n <Icon name='thumbs-up' />\n </Button>\n\n <Button\n label={t('bad_response')}\n variant='simple'\n icon\n compact\n onClick={() => {\n setShowDialog(true);\n onReaction?.(messageId, 'disliked');\n }}\n >\n <Icon name='thumbs-down' />\n </Button>\n </>\n )}\n </Flex>\n )}\n {suggestions && (\n <Flex as={StyledSuggestionsContainer} container={{ direction: 'column', gap: 1 }}>\n {suggestions.map(({ id, message: prompt }) => {\n return (\n <Button\n as={StyledSuggestion}\n onClick={onSend ? () => onSend({ id, message: prompt }) : undefined}\n key={id}\n >\n {prompt}\n </Button>\n );\n })}\n </Flex>\n )}\n </>\n )}\n </StyledMessage>\n </Flex>\n );\n }\n\n if (isUserMessage(props)) {\n if (plainTextMessage) {\n ariaLabel = t('you_asked', [plainTextMessage]);\n }\n\n if (announceInteraction) {\n ariaLabel = `${ariaLabel} ${t('interaction_message')}`;\n }\n\n return (\n <StyledUserMessage\n as={StyledUserMessage}\n data-testid={testIds.userMessage}\n {...restProps}\n type='message'\n aria-label={ariaLabel}\n ref={ref}\n >\n {props.attachments && props.attachments.length > 0 && (\n <StyledAttachmentsList type='display' items={props.attachments} />\n )}\n {message && <RichTextViewer content={message} type='markdown' />}\n </StyledUserMessage>\n );\n }\n\n return null;\n }\n);\n\nexport default GenAIMessage;\n"]}
1
+ {"version":3,"file":"GenAIMessage.js","sourceRoot":"","sources":["../../../src/components/GenAICoach/GenAIMessage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGxF,OAAO,EACL,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,UAAU,EACV,UAAU,EACV,UAAU,EACV,OAAO,EACP,QAAQ,EACR,UAAU,EACV,eAAe,EACf,mBAAmB,EAEpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,gBAAgB,MAAM,sEAAsE,CAAC;AACzG,OAAO,KAAK,iBAAiB,MAAM,wEAAwE,CAAC;AAC5G,OAAO,KAAK,YAAY,MAAM,kEAAkE,CAAC;AACjG,OAAO,KAAK,mBAAmB,MAAM,0EAA0E,CAAC;AAChH,OAAO,KAAK,cAAc,MAAM,oEAAoE,CAAC;AACrG,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG1D,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,0BAA0B,EAC1B,iBAAiB,EAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAE1D,YAAY,CACV,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,mBAAmB,EACnB,cAAc,CACf,CAAC;AAOF,uBAAuB;AACvB,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAoC;IAC/E,kBAAkB,EA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AAC,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,YAGlE,MAAM,IAFF,EAAE,CAGA,CACV,CAAC;oCACJ,CAAC,CAAC,GACG,CACR,IACA,CACJ,IACa,IACX,CACR,CAAC;IACJ,CAAC;IAED,IAAI,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,IAAI,gBAAgB,EAAE,CAAC;YACrB,SAAS,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC;QACjD,CAAC;QAED,IAAI,mBAAmB,EAAE,CAAC;YACxB,SAAS,GAAG,GAAG,SAAS,IAAI,CAAC,CAAC,qBAAqB,CAAC,EAAE,CAAC;QACzD,CAAC;QAED,OAAO,CACL,MAAC,iBAAiB,IAChB,EAAE,EAAE,iBAAiB,iBACR,OAAO,CAAC,WAAW,KAC5B,SAAS,EACb,IAAI,EAAC,SAAS,gBACF,SAAS,EACrB,GAAG,EAAE,GAAG,aAEP,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,IAAI,CACpD,KAAC,qBAAqB,IAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAE,KAAK,CAAC,WAAW,GAAI,CACnE,EACA,OAAO,IAAI,KAAC,cAAc,IAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,UAAU,GAAG,IAC9C,CACrB,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CACF,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import { createContext, forwardRef, useEffect, useMemo, useRef, useState } from 'react';\nimport type { KeyboardEvent, PropsWithoutRef } from 'react';\n\nimport {\n Button,\n Flex,\n Icon,\n Progress,\n registerIcon,\n useI18n,\n useTheme,\n useTestIds,\n ErrorState,\n useElement,\n Tooltip,\n TextArea,\n FormDialog,\n useElementFocus,\n markdownToPlainText,\n type ForwardRefForwardPropsComponent\n} from '@pega/cosmos-react-core';\nimport * as polarisSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/polaris-solid.icon';\nimport * as thumbsUpSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/thumbs-up-solid.icon';\nimport * as thumbsUpIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/thumbs-up.icon';\nimport * as thumbsDownSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/thumbs-down-solid.icon';\nimport * as thumbsDownIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/thumbs-down.icon';\nimport { RichTextViewer } from '@pega/cosmos-react-rte';\nimport { useAnimatedText } from '@pega/cosmos-react-core';\n\nimport type { GenAIMessageProps } from './GenAICoach.types';\nimport {\n StyledAttachmentsList,\n StyledGenAIAvatar,\n StyledMessage,\n StyledSuggestion,\n StyledSuggestionsContainer,\n StyledUserMessage\n} from './GenAICoach.styles';\nimport { getGenAICoachTestIds } from './GenAICoach.test-ids';\nimport { isCoachMessage, isUserMessage } from './GenAICoach.utils';\nimport GenAIMessageProgress from './GenAIMessageProgress';\n\nregisterIcon(\n polarisSolidIcon,\n thumbsUpSolidIcon,\n thumbsUpIcon,\n thumbsDownSolidIcon,\n thumbsDownIcon\n);\n\ntype StreamingContextProps = {\n isStreamingMessage?: boolean;\n isStreamingInProgress?: boolean;\n};\n\n/** Metadata Context */\nexport const StreamingContext = createContext<StreamingContextProps | undefined>({\n isStreamingMessage: false\n});\n\nconst GenAIMessage: ForwardRefForwardPropsComponent<GenAIMessageProps> = forwardRef(\n function GenAIMessage(props: PropsWithoutRef<GenAIMessageProps>, ref: GenAIMessageProps['ref']) {\n const testIds = useTestIds(props.testId, getGenAICoachTestIds);\n const theme = useTheme();\n const t = useI18n();\n const [wrapperEl, setWrapperEl] = useElement<HTMLDivElement>(null);\n const [feedbackVal, setFeedbackVal] = useState('');\n const [showDialog, setShowDialog] = useState(false);\n const focusOnInteractionRef = useRef(false);\n\n const { message, announceInteraction, ...restProps } = props;\n const plainTextMessage = markdownToPlainText(message ?? '');\n let ariaLabel = plainTextMessage;\n\n const isStreamingMessage = isCoachMessage(props) && props.enableStreaming;\n const allChunksReceived = isCoachMessage(props) && props.allChunksReceived;\n const enableStreaming = !!isStreamingMessage && !allChunksReceived;\n\n const {\n text: streamingMessage,\n isAnimationDone: isStreamingDone,\n animatedTillCursor\n } = useAnimatedText({\n text: message ?? '',\n allContentReceived: allChunksReceived === undefined ? true : allChunksReceived,\n enabled: enableStreaming,\n tokenizeMarkdown: true,\n cursorStartIndex:\n isCoachMessage(props) && props.animationInitialCursorPos\n ? props.animationInitialCursorPos\n : undefined\n });\n\n useEffect(() => {\n if (isCoachMessage(props) && props.onAnimationCursorUpdate) {\n props.onAnimationCursorUpdate(animatedTillCursor);\n }\n }, [animatedTillCursor]);\n\n useEffect(() => {\n if (isStreamingMessage && props.onStreamingUpdate) {\n props.onStreamingUpdate(!!allChunksReceived && isStreamingDone);\n }\n }, [enableStreaming, isStreamingDone, allChunksReceived]);\n\n useElementFocus(wrapperEl, { shouldFocus: !showDialog && focusOnInteractionRef.current });\n\n useEffect(() => {\n if (!showDialog && focusOnInteractionRef.current) {\n focusOnInteractionRef.current = false;\n }\n }, [showDialog]);\n\n const streamingContext: StreamingContextProps = useMemo(() => {\n return { isStreamingMessage, isStreamingInProgress: isCoachMessage(props) && props.loading };\n }, [isStreamingMessage, props]);\n\n if (isCoachMessage(props)) {\n const {\n id: messageId,\n coachName,\n suggestions,\n onSend,\n loading,\n error,\n feedback,\n markdownMap\n } = props;\n\n const { reaction, onReaction, onFeedbackComplete } = feedback ?? {};\n\n let selectedFeedbackResponse;\n\n let feedbackAriaLabel = t('sender_replied_message', [coachName, plainTextMessage ?? '']);\n\n if (feedback && reaction) {\n selectedFeedbackResponse = t('selected_noun', [\n reaction === 'liked' ? t('good_response') : t('bad_response')\n ]);\n\n feedbackAriaLabel = `${feedbackAriaLabel} ${selectedFeedbackResponse}`;\n }\n\n ariaLabel =\n suggestions && suggestions.length > 0\n ? `${feedbackAriaLabel} ${t('suggestions_in_message', [suggestions.length])}`\n : feedbackAriaLabel;\n\n if (announceInteraction) {\n ariaLabel = `${ariaLabel} ${t('interaction_message')}`;\n }\n\n const streamingContent = isStreamingMessage && (\n <>\n {message ? (\n <>\n <StreamingContext.Provider value={streamingContext}>\n <RichTextViewer\n content={isStreamingMessage ? streamingMessage : message}\n type='markdown'\n markdownMap={markdownMap}\n />\n </StreamingContext.Provider>\n\n {loading && <Progress variant='ellipsis' placement='inline' />}\n </>\n ) : (\n loading && <GenAIMessageProgress />\n )}\n </>\n );\n\n return (\n <Flex\n as='li'\n data-testid={testIds.coachMessage}\n {...restProps}\n container={{ direction: 'row', pad: [1, 0], gap: 0.5 }}\n type='message'\n aria-label={ariaLabel}\n ref={ref}\n >\n <StyledGenAIAvatar\n name={coachName}\n icon='polaris-solid'\n color={theme.base.palette.ai}\n shape='circle'\n size='m'\n />\n <StyledMessage>\n {/* Streaming loader and content */}\n {streamingContent}\n {loading || error ? (\n <>\n {loading && !isStreamingMessage && <GenAIMessageProgress />}\n {error && <ErrorState message={error} />}\n </>\n ) : (\n <>\n {/* Non streaming content */}\n {!isStreamingMessage && message && (\n <RichTextViewer content={message} type='markdown' markdownMap={markdownMap} />\n )}\n {feedback && (\n <Flex container={{ pad: [0.5, undefined] }}>\n {reaction ? (\n <>\n <Flex\n container={{ pad: 0.5 }}\n aria-label={selectedFeedbackResponse}\n ref={setWrapperEl}\n tabIndex={-1}\n >\n <Icon\n name={reaction === 'liked' ? 'thumbs-up-solid' : 'thumbs-down-solid'}\n />\n </Flex>\n {showDialog ? (\n onFeedbackComplete &&\n wrapperEl && (\n <FormDialog\n target={wrapperEl}\n heading={t('share_feedback')}\n onCancel={() => {\n focusOnInteractionRef.current = true;\n setShowDialog(false);\n onFeedbackComplete(messageId);\n }}\n onSubmit={() => {\n focusOnInteractionRef.current = true;\n setShowDialog(false);\n onFeedbackComplete(messageId, feedbackVal);\n }}\n onKeyDown={e => e.stopPropagation()}\n >\n <TextArea\n value={feedbackVal}\n onChange={e => setFeedbackVal(e.target.value)}\n onKeyDown={(e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault();\n focusOnInteractionRef.current = true;\n setShowDialog(false);\n onFeedbackComplete(messageId, feedbackVal);\n }\n }}\n autoResize={false}\n />\n </FormDialog>\n )\n ) : (\n <Tooltip target={wrapperEl} describeTarget={false}>\n {reaction === 'liked' ? t('good_response') : t('bad_response')}\n </Tooltip>\n )}\n </>\n ) : (\n <>\n <Button\n label={t('good_response')}\n variant='simple'\n icon\n compact\n onClick={() => {\n onReaction?.(messageId, 'liked');\n focusOnInteractionRef.current = true;\n }}\n >\n <Icon name='thumbs-up' />\n </Button>\n\n <Button\n label={t('bad_response')}\n variant='simple'\n icon\n compact\n onClick={() => {\n setShowDialog(true);\n onReaction?.(messageId, 'disliked');\n }}\n >\n <Icon name='thumbs-down' />\n </Button>\n </>\n )}\n </Flex>\n )}\n {suggestions && (\n <Flex as={StyledSuggestionsContainer} container={{ direction: 'column', gap: 1 }}>\n {suggestions.map(({ id, message: prompt }) => {\n return (\n <Button\n as={StyledSuggestion}\n onClick={onSend ? () => onSend({ id, message: prompt }) : undefined}\n key={id}\n >\n {prompt}\n </Button>\n );\n })}\n </Flex>\n )}\n </>\n )}\n </StyledMessage>\n </Flex>\n );\n }\n\n if (isUserMessage(props)) {\n if (plainTextMessage) {\n ariaLabel = t('you_asked', [plainTextMessage]);\n }\n\n if (announceInteraction) {\n ariaLabel = `${ariaLabel} ${t('interaction_message')}`;\n }\n\n return (\n <StyledUserMessage\n as={StyledUserMessage}\n data-testid={testIds.userMessage}\n {...restProps}\n type='message'\n aria-label={ariaLabel}\n ref={ref}\n >\n {props.attachments && props.attachments.length > 0 && (\n <StyledAttachmentsList type='display' items={props.attachments} />\n )}\n {message && <RichTextViewer content={message} type='markdown' />}\n </StyledUserMessage>\n );\n }\n\n return null;\n }\n);\n\nexport default GenAIMessage;\n"]}
@@ -1,6 +1,6 @@
1
1
  export { default } from './GenAICoach';
2
2
  export type { GenAICoachProps, GenAIMessageProps, UserMessageProps, CoachMessageProps, MessageProps, UtilitiesGenAICoachProps, SendMessageProps, State } from './GenAICoach.types';
3
- export { default as GenAIMessage } from './GenAIMessage';
3
+ export { default as GenAIMessage, StreamingContext } from './GenAIMessage';
4
4
  export { default as InitialSuggestedMessage } from './InitialSuggestedMessage';
5
5
  export { isUserMessage, isCoachMessage } from './GenAICoach.utils';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/GenAICoach/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,YAAY,EACV,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,wBAAwB,EACxB,gBAAgB,EAChB,KAAK,EACN,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/GenAICoach/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,YAAY,EACV,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,wBAAwB,EACxB,gBAAgB,EAChB,KAAK,EACN,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  export { default } from './GenAICoach';
2
- export { default as GenAIMessage } from './GenAIMessage';
2
+ export { default as GenAIMessage, StreamingContext } from './GenAIMessage';
3
3
  export { default as InitialSuggestedMessage } from './InitialSuggestedMessage';
4
4
  export { isUserMessage, isCoachMessage } from './GenAICoach.utils';
5
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/GenAICoach/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAWvC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC","sourcesContent":["export { default } from './GenAICoach';\nexport type {\n GenAICoachProps,\n GenAIMessageProps,\n UserMessageProps,\n CoachMessageProps,\n MessageProps,\n UtilitiesGenAICoachProps,\n SendMessageProps,\n State\n} from './GenAICoach.types';\nexport { default as GenAIMessage } from './GenAIMessage';\nexport { default as InitialSuggestedMessage } from './InitialSuggestedMessage';\nexport { isUserMessage, isCoachMessage } from './GenAICoach.utils';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/GenAICoach/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAWvC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC","sourcesContent":["export { default } from './GenAICoach';\nexport type {\n GenAICoachProps,\n GenAIMessageProps,\n UserMessageProps,\n CoachMessageProps,\n MessageProps,\n UtilitiesGenAICoachProps,\n SendMessageProps,\n State\n} from './GenAICoach.types';\nexport { default as GenAIMessage, StreamingContext } from './GenAIMessage';\nexport { default as InitialSuggestedMessage } from './InitialSuggestedMessage';\nexport { isUserMessage, isCoachMessage } from './GenAICoach.utils';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Stages.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Stages/Stages.styles.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,YAAY,wGAYvB,CAAC;AAIH,eAAO,MAAM,gBAAgB;eAA4B,OAAO;SAW9D,CAAC;AAEH,eAAO,MAAM,WAAW;YAA2B,WAAW,GAAG,SAAS,GAAG,SAAS;SAoJrF,CAAC;AAIF,eAAO,MAAM,uBAAuB,0LAQlC,CAAC;AAEH,eAAO,MAAM,eAAe;gBAA8B,OAAO;SAIhE,CAAC;AAMF,eAAO,MAAM,oBAAoB,wGAuDhC,CAAC;AAIF,eAAO,MAAM,oBAAoB,wGAS/B,CAAC;AAIH,eAAO,MAAM,UAAU;eAA0B,OAAO;SAyBtD,CAAC;AAIH,eAAO,MAAM,qBAAqB,6NAMhC,CAAC;AAIH,eAAO,MAAM,kBAAkB,yGAI7B,CAAC;AAIH,eAAO,MAAM,uBAAuB,uGAEnC,CAAC"}
1
+ {"version":3,"file":"Stages.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Stages/Stages.styles.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,YAAY,wGAYvB,CAAC;AAIH,eAAO,MAAM,gBAAgB;eAA4B,OAAO;SAW9D,CAAC;AAEH,eAAO,MAAM,WAAW;YAA2B,WAAW,GAAG,SAAS,GAAG,SAAS;SAkJrF,CAAC;AAIF,eAAO,MAAM,uBAAuB,0LAiBlC,CAAC;AAGH,eAAO,MAAM,eAAe;gBAA8B,OAAO;SAIhE,CAAC;AAIF,eAAO,MAAM,oBAAoB,wGAuDhC,CAAC;AAIF,eAAO,MAAM,oBAAoB,wGAS/B,CAAC;AAIH,eAAO,MAAM,UAAU;eAA0B,OAAO;SAoBtD,CAAC;AAIH,eAAO,MAAM,qBAAqB,6NAMhC,CAAC;AAIH,eAAO,MAAM,kBAAkB,yGAI7B,CAAC;AAIH,eAAO,MAAM,uBAAuB,uGAEnC,CAAC"}
@@ -149,8 +149,6 @@ export const StyledStage = styled.button(({ theme: { base: { spacing, palette, '
149
149
  }
150
150
 
151
151
  ${StyledIcon} {
152
- color: ${stages.status[status]['foreground-color']};
153
-
154
152
  & ~ ${StyledInnerStage} {
155
153
  margin-inline-start: 0.25rem;
156
154
  }
@@ -162,16 +160,17 @@ export const StyledStage = styled.button(({ theme: { base: { spacing, palette, '
162
160
  `;
163
161
  });
164
162
  StyledStage.defaultProps = defaultThemeProp;
165
- export const StyledStageCompleteIcon = styled(Icon)(({ theme: { base: { palette } } }) => {
163
+ export const StyledStageCompleteIcon = styled(Icon)(({ theme: { components: { 'case-view': { stages: { status: { completed: { 'foreground-color': foregroundColor, background } } } } } } }) => {
164
+ const stageForeground = calculateForegroundColor(background, foregroundColor);
166
165
  return css `
167
- color: ${palette.success};
166
+ color: ${stageForeground};
168
167
  `;
169
168
  });
169
+ StyledStageCompleteIcon.defaultProps = defaultThemeProp;
170
170
  export const StyledStageText = styled(Text)(({ theme, isCurrent }) => css `
171
171
  font-weight: ${isCurrent ? theme.base['font-weight'].bold : theme.base['font-weight'].normal};
172
172
  `);
173
173
  StyledStageText.defaultProps = defaultThemeProp;
174
- StyledStageCompleteIcon.defaultProps = defaultThemeProp;
175
174
  export const StyledStageContainer = styled.li(({ theme: { base: { spacing }, components: { card: { 'border-radius': borderRadius } } } }) => {
176
175
  const thinBorderWidth = '0.0625rem';
177
176
  const thickBorderWidth = '0.125rem';
@@ -243,11 +242,6 @@ export const StyledStep = styled.li(({ completed, theme }) => {
243
242
 
244
243
  & > ${StyledIcon} {
245
244
  text-align: center;
246
-
247
- ${completed &&
248
- css `
249
- color: ${theme.base.palette.success};
250
- `}
251
245
  }
252
246
 
253
247
  div {
@@ -1 +1 @@
1
- {"version":3,"file":"Stages.styles.js","sourceRoot":"","sources":["../../../src/components/Stages/Stages.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,IAAI,EACJ,IAAI,EACJ,UAAU,EACV,YAAY,EACZ,wBAAwB,EACzB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAClD,OAAO,GAAG,CAAA;wBACY,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC;qBAC3C,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC;;;;;;oBAMvC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC;;GAEjD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,YAAY,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE7C,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAyB,KAAK,CAAC,EAAE;IAC1E,OAAO,GAAG,CAAA;;;;MAIN,KAAK,CAAC,QAAQ;QAChB,GAAG,CAAA;;;KAGF;GACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CACtC,CAAC,EACC,KAAK,EAAE,EACL,IAAI,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,EACxF,UAAU,EAAE,EACV,WAAW,EAA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,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO;OACpC;;;;iBAIU,WAAW;;GAEzB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,UAAU,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE3C,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACzE,MAAM,QAAQ,GAAG,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IACtF,OAAO,GAAG,CAAA;iBACK,QAAQ,CAAC,EAAE;eACb,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC;GACpD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,qBAAqB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEtD,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACzD,OAAO,GAAG,CAAA;iBACK,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,EAAE;GAC5C,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,kBAAkB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEnD,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,CAAC,CAAA;;CAE9C,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport {\n calculateFontSize,\n DateTimeDisplay,\n defaultThemeProp,\n Icon,\n Text,\n StyledIcon,\n useDirection,\n calculateForegroundColor\n} from '@pega/cosmos-react-core';\n\nexport const StyledStages = styled.ol(({ theme }) => {\n return css`\n background-color: ${theme.base.palette['primary-background']};\n border-radius: ${theme.components.card['border-radius']};\n width: 100%;\n overflow: hidden;\n list-style: none;\n\n &:has(:focus-visible) {\n box-shadow: ${theme.base.shadow['focus-group']};\n }\n `;\n});\n\nStyledStages.defaultProps = defaultThemeProp;\n\nexport const StyledInnerStage = styled.span<{ ellipsis?: boolean }>(props => {\n return css`\n display: inline-block;\n text-align: center;\n white-space: nowrap;\n ${props.ellipsis &&\n css`\n overflow: hidden;\n text-overflow: ellipsis;\n `}\n `;\n});\n\nexport const StyledStage = styled.button<{ status: 'completed' | 'current' | 'pending' }>(\n ({\n theme: {\n base: { spacing, palette, 'hit-area': hitArea, transparency, 'font-weight': fontWeight },\n components: {\n 'case-view': { stages }\n }\n },\n status\n }) => {\n const thinBorderWidth = '0.0625rem';\n const thickBorderWidth = '0.125rem';\n const { rtl } = useDirection();\n const stageForeground = calculateForegroundColor(\n stages.status[status].background,\n stages.status[status]['foreground-color']\n );\n\n return css`\n background: ${stages.status[status].background};\n color: ${stageForeground};\n outline: none;\n border-color: transparent;\n border-width: ${thinBorderWidth} 0;\n border-style: solid;\n position: relative;\n height: calc(4 * ${spacing});\n padding-inline-start: calc(2 * ${spacing});\n padding-inline-end: ${spacing};\n width: 100%;\n\n ::before,\n ::after {\n content: '';\n position: absolute;\n display: block;\n width: calc(2.25 * ${spacing});\n height: calc(2.25 * ${spacing});\n border-style: solid;\n border-color: ${palette['border-line']};\n border-inline-end-width: ${thinBorderWidth};\n border-inline-start-width: 0;\n border-top-width: ${rtl ? 0 : thinBorderWidth};\n border-bottom-width: ${rtl ? thinBorderWidth : 0};\n transform: rotateZ(45deg) skew(15deg, 15deg);\n\n @media (pointer: coarse) {\n width: calc(2.875 * ${spacing});\n height: calc(2.875 * ${spacing});\n transform: rotateZ(45deg) skew(20deg, 20deg);\n }\n }\n\n ::before {\n inset-inline-start: calc(-1.125 * ${spacing});\n\n @media (pointer: coarse) {\n inset-inline-start: calc(-1.375 * ${spacing});\n }\n }\n\n ::after {\n inset-inline-end: calc(-1.125 * ${spacing});\n z-index: 1;\n background-color: ${stages.status[status].background};\n\n @media (pointer: coarse) {\n inset-inline-end: calc(-1.375 * ${spacing});\n }\n }\n\n &:hover,\n &:hover::before,\n &:hover::after {\n border-color: ${palette['border-line']};\n }\n\n &:focus,\n &:active,\n &:focus::before,\n &:active::before,\n &:focus::after,\n &:active::after {\n border-color: ${palette.interactive};\n }\n\n &:focus {\n border-width: ${thickBorderWidth} 0;\n }\n\n &:focus::before,\n &:focus::after {\n z-index: 1;\n border-inline-end-width: ${thickBorderWidth};\n border-top-width: ${rtl ? 0 : thickBorderWidth};\n border-bottom-width: ${rtl ? thickBorderWidth : 0};\n }\n\n &:focus::before {\n pointer-events: none;\n }\n\n &:active {\n border-width: ${thinBorderWidth} 0;\n\n ${StyledInnerStage} {\n opacity: ${transparency['transparent-3']};\n }\n }\n\n &:active::before,\n &:active::after {\n border-inline-end-width: ${thinBorderWidth};\n border-top-width: ${rtl ? 0 : thinBorderWidth};\n border-bottom-width: ${rtl ? thinBorderWidth : 0};\n }\n\n &[aria-current] {\n ${StyledInnerStage} {\n font-weight: ${fontWeight.bold};\n opacity: 1;\n }\n\n :hover {\n ${StyledInnerStage} {\n opacity: ${transparency['transparent-2']};\n }\n }\n }\n\n @media (pointer: coarse) {\n height: ${hitArea['finger-min']};\n padding-inline-start: calc(2.25 * ${spacing});\n }\n\n ${StyledIcon} {\n color: ${stages.status[status]['foreground-color']};\n\n & ~ ${StyledInnerStage} {\n margin-inline-start: 0.25rem;\n }\n }\n\n ${StyledInnerStage} {\n opacity: ${transparency['transparent-2']};\n }\n `;\n }\n);\n\nStyledStage.defaultProps = defaultThemeProp;\n\nexport const StyledStageCompleteIcon = styled(Icon)(({\n theme: {\n base: { palette }\n }\n}) => {\n return css`\n color: ${palette.success};\n `;\n});\n\nexport const StyledStageText = styled(Text)<{ isCurrent?: boolean }>(\n ({ theme, isCurrent }) => css`\n font-weight: ${isCurrent ? theme.base['font-weight'].bold : theme.base['font-weight'].normal};\n `\n);\n\nStyledStageText.defaultProps = defaultThemeProp;\n\nStyledStageCompleteIcon.defaultProps = defaultThemeProp;\n\nexport const StyledStageContainer = styled.li(\n ({\n theme: {\n base: { spacing },\n components: {\n card: { 'border-radius': borderRadius }\n }\n }\n }) => {\n const thinBorderWidth = '0.0625rem';\n const thickBorderWidth = '0.125rem';\n\n return css`\n &:first-of-type > ${StyledStage} {\n border-start-start-radius: ${borderRadius};\n border-end-start-radius: ${borderRadius};\n border-inline-start-width: ${thinBorderWidth};\n padding-inline-start: ${spacing};\n\n &:active {\n padding-inline-start: ${spacing};\n }\n\n &:focus {\n border-inline-start-width: ${thickBorderWidth};\n padding-inline-start: calc(${spacing} - ${thickBorderWidth} + ${thinBorderWidth});\n }\n\n ::before {\n display: none;\n }\n }\n\n &:last-of-type > ${StyledStage} {\n border-start-end-radius: ${borderRadius};\n border-end-end-radius: ${borderRadius};\n border-inline-end-width: ${thinBorderWidth};\n padding-inline-end: ${spacing};\n\n &:active {\n border-inline-end-width: ${thinBorderWidth};\n padding-inline-end: ${spacing};\n }\n\n &:focus {\n border-inline-end-width: ${thickBorderWidth};\n padding-inline-end: calc(${spacing} - ${thinBorderWidth});\n }\n\n ::after {\n display: none;\n }\n }\n `;\n }\n);\n\nStyledStageContainer.defaultProps = defaultThemeProp;\n\nexport const StyledStepsContainer = styled.ol(({ theme }) => {\n return css`\n list-style-type: none;\n margin: calc(2 * ${theme.base.spacing}) 0 calc(3 * ${theme.base.spacing});\n\n &:empty {\n margin-block-end: 0;\n }\n `;\n});\n\nStyledStepsContainer.defaultProps = defaultThemeProp;\n\nexport const StyledStep = styled.li<{ completed: boolean }>(({ completed, theme }) => {\n const textOpacity = completed ? theme.base.transparency['transparent-2'] : 1;\n\n return css`\n border-radius: 0;\n margin-block-end: calc(${theme.base.spacing});\n color: ${theme.base.palette['foreground-color']};\n\n &:last-child {\n margin-block-end: 0;\n }\n\n & > ${StyledIcon} {\n text-align: center;\n\n ${completed &&\n css`\n color: ${theme.base.palette.success};\n `}\n }\n\n div {\n opacity: ${textOpacity};\n }\n `;\n});\n\nStyledStep.defaultProps = defaultThemeProp;\n\nexport const StyledDateTimeDisplay = styled(DateTimeDisplay)(({ theme }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n return css`\n font-size: ${fontSize.xs};\n opacity: ${theme.base.transparency['transparent-2']};\n `;\n});\n\nStyledDateTimeDisplay.defaultProps = defaultThemeProp;\n\nexport const StyledStageGlimpse = styled.div(({ theme }) => {\n return css`\n max-width: ${theme.base['content-width'].sm};\n `;\n});\n\nStyledStageGlimpse.defaultProps = defaultThemeProp;\n\nexport const StyledStagesDescription = styled.p`\n display: none;\n`;\n"]}
1
+ {"version":3,"file":"Stages.styles.js","sourceRoot":"","sources":["../../../src/components/Stages/Stages.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,IAAI,EACJ,IAAI,EACJ,UAAU,EACV,YAAY,EACZ,wBAAwB,EACzB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAClD,OAAO,GAAG,CAAA;wBACY,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC;qBAC3C,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC;;;;;;oBAMvC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC;;GAEjD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,YAAY,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE7C,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAyB,KAAK,CAAC,EAAE;IAC1E,OAAO,GAAG,CAAA;;;;MAIN,KAAK,CAAC,QAAQ;QAChB,GAAG,CAAA;;;KAGF;GACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,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AAG,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAE7E,OAAO,GAAG,CAAA;;6BAEiB,KAAK,CAAC,IAAI,CAAC,OAAO;aAClC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC;;;;;;UAMzC,UAAU;;;;;iBAKH,WAAW;;GAEzB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,UAAU,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE3C,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACzE,MAAM,QAAQ,GAAG,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IACtF,OAAO,GAAG,CAAA;iBACK,QAAQ,CAAC,EAAE;eACb,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC;GACpD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,qBAAqB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEtD,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACzD,OAAO,GAAG,CAAA;iBACK,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,EAAE;GAC5C,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,kBAAkB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEnD,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,CAAC,CAAA;;CAE9C,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport {\n calculateFontSize,\n DateTimeDisplay,\n defaultThemeProp,\n Icon,\n Text,\n StyledIcon,\n useDirection,\n calculateForegroundColor\n} from '@pega/cosmos-react-core';\n\nexport const StyledStages = styled.ol(({ theme }) => {\n return css`\n background-color: ${theme.base.palette['primary-background']};\n border-radius: ${theme.components.card['border-radius']};\n width: 100%;\n overflow: hidden;\n list-style: none;\n\n &:has(:focus-visible) {\n box-shadow: ${theme.base.shadow['focus-group']};\n }\n `;\n});\n\nStyledStages.defaultProps = defaultThemeProp;\n\nexport const StyledInnerStage = styled.span<{ ellipsis?: boolean }>(props => {\n return css`\n display: inline-block;\n text-align: center;\n white-space: nowrap;\n ${props.ellipsis &&\n css`\n overflow: hidden;\n text-overflow: ellipsis;\n `}\n `;\n});\n\nexport const StyledStage = styled.button<{ status: 'completed' | 'current' | 'pending' }>(\n ({\n theme: {\n base: { spacing, palette, 'hit-area': hitArea, transparency, 'font-weight': fontWeight },\n components: {\n 'case-view': { stages }\n }\n },\n status\n }) => {\n const thinBorderWidth = '0.0625rem';\n const thickBorderWidth = '0.125rem';\n const { rtl } = useDirection();\n const stageForeground = calculateForegroundColor(\n stages.status[status].background,\n stages.status[status]['foreground-color']\n );\n\n return css`\n background: ${stages.status[status].background};\n color: ${stageForeground};\n outline: none;\n border-color: transparent;\n border-width: ${thinBorderWidth} 0;\n border-style: solid;\n position: relative;\n height: calc(4 * ${spacing});\n padding-inline-start: calc(2 * ${spacing});\n padding-inline-end: ${spacing};\n width: 100%;\n\n ::before,\n ::after {\n content: '';\n position: absolute;\n display: block;\n width: calc(2.25 * ${spacing});\n height: calc(2.25 * ${spacing});\n border-style: solid;\n border-color: ${palette['border-line']};\n border-inline-end-width: ${thinBorderWidth};\n border-inline-start-width: 0;\n border-top-width: ${rtl ? 0 : thinBorderWidth};\n border-bottom-width: ${rtl ? thinBorderWidth : 0};\n transform: rotateZ(45deg) skew(15deg, 15deg);\n\n @media (pointer: coarse) {\n width: calc(2.875 * ${spacing});\n height: calc(2.875 * ${spacing});\n transform: rotateZ(45deg) skew(20deg, 20deg);\n }\n }\n\n ::before {\n inset-inline-start: calc(-1.125 * ${spacing});\n\n @media (pointer: coarse) {\n inset-inline-start: calc(-1.375 * ${spacing});\n }\n }\n\n ::after {\n inset-inline-end: calc(-1.125 * ${spacing});\n z-index: 1;\n background-color: ${stages.status[status].background};\n\n @media (pointer: coarse) {\n inset-inline-end: calc(-1.375 * ${spacing});\n }\n }\n\n &:hover,\n &:hover::before,\n &:hover::after {\n border-color: ${palette['border-line']};\n }\n\n &:focus,\n &:active,\n &:focus::before,\n &:active::before,\n &:focus::after,\n &:active::after {\n border-color: ${palette.interactive};\n }\n\n &:focus {\n border-width: ${thickBorderWidth} 0;\n }\n\n &:focus::before,\n &:focus::after {\n z-index: 1;\n border-inline-end-width: ${thickBorderWidth};\n border-top-width: ${rtl ? 0 : thickBorderWidth};\n border-bottom-width: ${rtl ? thickBorderWidth : 0};\n }\n\n &:focus::before {\n pointer-events: none;\n }\n\n &:active {\n border-width: ${thinBorderWidth} 0;\n\n ${StyledInnerStage} {\n opacity: ${transparency['transparent-3']};\n }\n }\n\n &:active::before,\n &:active::after {\n border-inline-end-width: ${thinBorderWidth};\n border-top-width: ${rtl ? 0 : thinBorderWidth};\n border-bottom-width: ${rtl ? thinBorderWidth : 0};\n }\n\n &[aria-current] {\n ${StyledInnerStage} {\n font-weight: ${fontWeight.bold};\n opacity: 1;\n }\n\n :hover {\n ${StyledInnerStage} {\n opacity: ${transparency['transparent-2']};\n }\n }\n }\n\n @media (pointer: coarse) {\n height: ${hitArea['finger-min']};\n padding-inline-start: calc(2.25 * ${spacing});\n }\n\n ${StyledIcon} {\n & ~ ${StyledInnerStage} {\n margin-inline-start: 0.25rem;\n }\n }\n\n ${StyledInnerStage} {\n opacity: ${transparency['transparent-2']};\n }\n `;\n }\n);\n\nStyledStage.defaultProps = defaultThemeProp;\n\nexport const StyledStageCompleteIcon = styled(Icon)(({\n theme: {\n components: {\n 'case-view': {\n stages: {\n status: {\n completed: { 'foreground-color': foregroundColor, background }\n }\n }\n }\n }\n }\n}) => {\n const stageForeground = calculateForegroundColor(background, foregroundColor);\n return css`\n color: ${stageForeground};\n `;\n});\nStyledStageCompleteIcon.defaultProps = defaultThemeProp;\n\nexport const StyledStageText = styled(Text)<{ isCurrent?: boolean }>(\n ({ theme, isCurrent }) => css`\n font-weight: ${isCurrent ? theme.base['font-weight'].bold : theme.base['font-weight'].normal};\n `\n);\n\nStyledStageText.defaultProps = defaultThemeProp;\n\nexport const StyledStageContainer = styled.li(\n ({\n theme: {\n base: { spacing },\n components: {\n card: { 'border-radius': borderRadius }\n }\n }\n }) => {\n const thinBorderWidth = '0.0625rem';\n const thickBorderWidth = '0.125rem';\n\n return css`\n &:first-of-type > ${StyledStage} {\n border-start-start-radius: ${borderRadius};\n border-end-start-radius: ${borderRadius};\n border-inline-start-width: ${thinBorderWidth};\n padding-inline-start: ${spacing};\n\n &:active {\n padding-inline-start: ${spacing};\n }\n\n &:focus {\n border-inline-start-width: ${thickBorderWidth};\n padding-inline-start: calc(${spacing} - ${thickBorderWidth} + ${thinBorderWidth});\n }\n\n ::before {\n display: none;\n }\n }\n\n &:last-of-type > ${StyledStage} {\n border-start-end-radius: ${borderRadius};\n border-end-end-radius: ${borderRadius};\n border-inline-end-width: ${thinBorderWidth};\n padding-inline-end: ${spacing};\n\n &:active {\n border-inline-end-width: ${thinBorderWidth};\n padding-inline-end: ${spacing};\n }\n\n &:focus {\n border-inline-end-width: ${thickBorderWidth};\n padding-inline-end: calc(${spacing} - ${thinBorderWidth});\n }\n\n ::after {\n display: none;\n }\n }\n `;\n }\n);\n\nStyledStageContainer.defaultProps = defaultThemeProp;\n\nexport const StyledStepsContainer = styled.ol(({ theme }) => {\n return css`\n list-style-type: none;\n margin: calc(2 * ${theme.base.spacing}) 0 calc(3 * ${theme.base.spacing});\n\n &:empty {\n margin-block-end: 0;\n }\n `;\n});\n\nStyledStepsContainer.defaultProps = defaultThemeProp;\n\nexport const StyledStep = styled.li<{ completed: boolean }>(({ completed, theme }) => {\n const textOpacity = completed ? theme.base.transparency['transparent-2'] : 1;\n\n return css`\n border-radius: 0;\n margin-block-end: calc(${theme.base.spacing});\n color: ${theme.base.palette['foreground-color']};\n\n &:last-child {\n margin-block-end: 0;\n }\n\n & > ${StyledIcon} {\n text-align: center;\n }\n\n div {\n opacity: ${textOpacity};\n }\n `;\n});\n\nStyledStep.defaultProps = defaultThemeProp;\n\nexport const StyledDateTimeDisplay = styled(DateTimeDisplay)(({ theme }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n return css`\n font-size: ${fontSize.xs};\n opacity: ${theme.base.transparency['transparent-2']};\n `;\n});\n\nStyledDateTimeDisplay.defaultProps = defaultThemeProp;\n\nexport const StyledStageGlimpse = styled.div(({ theme }) => {\n return css`\n max-width: ${theme.base['content-width'].sm};\n `;\n});\n\nStyledStageGlimpse.defaultProps = defaultThemeProp;\n\nexport const StyledStagesDescription = styled.p`\n display: none;\n`;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/cosmos-react-work",
3
- "version": "9.0.0-build.10.3",
3
+ "version": "9.0.0-build.11.0",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "author": "Pegasystems",
6
6
  "sideEffects": false,
@@ -14,8 +14,8 @@
14
14
  "build": "tsc -b tsconfig.build.json"
15
15
  },
16
16
  "dependencies": {
17
- "@pega/cosmos-react-core": "9.0.0-build.10.3",
18
- "@pega/cosmos-react-rte": "9.0.0-build.10.3",
17
+ "@pega/cosmos-react-core": "9.0.0-build.11.0",
18
+ "@pega/cosmos-react-rte": "9.0.0-build.11.0",
19
19
  "@types/react": "^17.0.62 || ^18.3.3",
20
20
  "@types/react-dom": "^17.0.20 || ^18.3.0",
21
21
  "@types/styled-components": "^5.1.26",