@pega/cosmos-react-work 9.21.0 → 9.22.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.
- package/lib/components/GenAICoach/GenAICoach.styles.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.styles.js +2 -6
- package/lib/components/GenAICoach/GenAICoach.styles.js.map +1 -1
- package/lib/components/GenAICoach/PortalAgentSplitView.d.ts.map +1 -1
- package/lib/components/GenAICoach/PortalAgentSplitView.js +8 -2
- package/lib/components/GenAICoach/PortalAgentSplitView.js.map +1 -1
- package/lib/components/GenAICoach/Questionnaire.d.ts.map +1 -1
- package/lib/components/GenAICoach/Questionnaire.js +8 -1
- package/lib/components/GenAICoach/Questionnaire.js.map +1 -1
- package/lib/components/Stages/Stages.d.ts.map +1 -1
- package/lib/components/Stages/Stages.js +2 -1
- package/lib/components/Stages/Stages.js.map +1 -1
- package/lib/components/Stages/Stages.styles.d.ts +1 -1
- package/lib/components/Stages/Stages.styles.d.ts.map +1 -1
- package/lib/components/Stages/Stages.styles.js +1 -2
- package/lib/components/Stages/Stages.styles.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenAICoach.styles.d.ts","sourceRoot":"","sources":["../../../src/components/GenAICoach/GenAICoach.styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GenAICoach.styles.d.ts","sourceRoot":"","sources":["../../../src/components/GenAICoach/GenAICoach.styles.ts"],"names":[],"mappings":"AAiEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAG1D,eAAO,MAAM,qBAAqB,6NAAe,CAAC;AAElD,eAAO,MAAM,sBAAsB;cAAmC,OAAO;0MAmB3E,CAAC;AAIH,eAAO,MAAM,qBAAqB;cAA0B,OAAO;uBAAqB,OAAO;YA8B9F,CAAC;AAIF,eAAO,MAAM,uBAAuB;0BAAsC,OAAO;YAoBhF,CAAC;A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ins';
|
|
16
16
|
import { RichTextViewer } from '@pega/cosmos-react-rte';
|
|
17
17
|
import { StepMarker, StyledStepText } from '@pega/cosmos-react-core/lib/components/MultiStepForm/FormProgress.styles';
|
|
18
|
-
import { StyledResizeHandle } from '@pega/cosmos-react-core/lib/components/Drawer/ResizeHandle';
|
|
19
18
|
import { StyledFileList } from '@pega/cosmos-react-core/lib/components/File/FileList';
|
|
20
19
|
import { StyledTouchDialog } from '@pega/cosmos-react-core/lib/components/Dialog/TouchDialog.styles';
|
|
21
20
|
import { StyledStages } from '../Stages/Stages.styles';
|
|
@@ -352,7 +351,6 @@ export const StyledMessage = styled.p(({ theme, simplified }) => {
|
|
|
352
351
|
margin-block-start: calc(0.5 * ${theme.base.spacing});
|
|
353
352
|
width: 100%;
|
|
354
353
|
min-width: 0;
|
|
355
|
-
overflow: hidden;
|
|
356
354
|
overflow-wrap: break-word;
|
|
357
355
|
|
|
358
356
|
${simplified &&
|
|
@@ -808,6 +806,7 @@ StyledPortalAgentRegion.defaultProps = defaultThemeProp;
|
|
|
808
806
|
export const StyledPortalMainRegion = styled.div `
|
|
809
807
|
flex: 1 1 0%;
|
|
810
808
|
min-width: 0;
|
|
809
|
+
min-height: calc(100dvh - var(--appshell-total-offset, 0rem));
|
|
811
810
|
|
|
812
811
|
&[inert] {
|
|
813
812
|
display: none;
|
|
@@ -820,10 +819,7 @@ export const StyledPortalSeparator = styled.div `
|
|
|
820
819
|
align-self: flex-start;
|
|
821
820
|
flex-shrink: 0;
|
|
822
821
|
height: calc(100dvh - var(--appshell-total-offset, 0rem));
|
|
823
|
-
|
|
824
|
-
${StyledResizeHandle} {
|
|
825
|
-
z-index: 1;
|
|
826
|
-
}
|
|
822
|
+
z-index: 1;
|
|
827
823
|
`;
|
|
828
824
|
StyledPortalSeparator.defaultProps = defaultThemeProp;
|
|
829
825
|
export const StyledSuggestionCardsView = styled.div(({ theme: { base: { spacing, 'font-size': fontSize, 'font-scale': fontScale, 'font-weight': fontWeight, transparency, 'content-width': contentWidth }, components: { 'form-control': { 'border-color': formControlBorderColor } } } }) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenAICoach.styles.js","sourceRoot":"","sources":["../../../src/components/GenAICoach/GenAICoach.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,iBAAiB,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEhF,OAAO,EACL,eAAe,EACf,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,IAAI,EACJ,KAAK,EACL,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,WAAW,EACX,IAAI,EACJ,QAAQ,EACR,iBAAiB,EACjB,wBAAwB,EACxB,gBAAgB,EAChB,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,UAAU,EACV,UAAU,EACV,KAAK,EACL,eAAe,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,kDAAkD,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,wDAAwD,CAAC;AAC1F,OAAO,EAAE,gBAAgB,EAAE,MAAM,wDAAwD,CAAC;AAC1F,OAAO,EAAE,iBAAiB,EAAE,MAAM,yDAAyD,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAAE,MAAM,oEAAoE,CAAC;AAC5G,OAAO,EAAE,eAAe,EAAE,MAAM,4DAA4D,CAAC;AAC7F,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,2EAA2E,CAAC;AACnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,4EAA4E,CAAC;AACnH,OAAO,EACL,c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,KAAK,EAAE,EAAE,EAAE;IACpE,OAAO,GAAG,CAAA;mBACO,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM;;GAEhD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,4BAA4B,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { createGlobalStyle, css, keyframes } from 'styled-components';\nimport { useContext } from 'react';\nimport { mix, darken, meetsContrastGuidelines, transparentize } from 'polished';\n\nimport {\n AppShellContext,\n Button,\n FileList,\n Flex,\n FormControl,\n Icon,\n Image,\n MenuButton,\n InfoDialog,\n StyledEmptyState,\n StyledErrorState,\n StyledIcon,\n StyledText,\n SummaryItem,\n Text,\n TextArea,\n calculateFontSize,\n calculateForegroundColor,\n defaultThemeProp,\n isSolidColor,\n tryCatch,\n Avatar,\n Fullscreen,\n animations,\n Modal,\n StyledIconShape\n} from '@pega/cosmos-react-core';\nimport { StyledCard } from '@pega/cosmos-react-core/lib/components/Card/Card';\nimport { StyledCardHeader } from '@pega/cosmos-react-core/lib/components/Card/CardHeader';\nimport { StyledCardFooter } from '@pega/cosmos-react-core/lib/components/Card/CardFooter';\nimport { StyledCardContent } from '@pega/cosmos-react-core/lib/components/Card/CardContent';\nimport { StyledFullscreenButton } from '@pega/cosmos-react-core/lib/components/Fullscreen/FullscreenButton';\nimport { StyledFormField } from '@pega/cosmos-react-core/lib/components/FormField/FormField';\nimport {\n StyledHeader,\n StyledSelectionCard,\n StyledSingleField,\n StyledTileContent\n} from '@pega/cosmos-react-core/lib/components/SelectionCard/SelectionCard.styles';\nimport { StyledEditorContainer } from '@pega/cosmos-react-rte/lib/components/RichTextEditor/RichTextEditor.styles';\nimport {\n StyledProgress,\n StyledProgressRing\n} from '@pega/cosmos-react-core/lib/components/Progress/Progress.styles';\nimport {\n resizeDrawerMaxWidth,\n portalAgentMinWidth,\n portalAgentDefaultWidth\n} from '@pega/cosmos-react-core/lib/styles/constants';\nimport { lineClamp } from '@pega/cosmos-react-core/lib/styles/mixins';\nimport { RichTextViewer } from '@pega/cosmos-react-rte';\nimport {\n StepMarker,\n StyledStepText\n} from '@pega/cosmos-react-core/lib/components/MultiStepForm/FormProgress.styles';\nimport { StyledResizeHandle } from '@pega/cosmos-react-core/lib/components/Drawer/ResizeHandle';\nimport { StyledFileList } from '@pega/cosmos-react-core/lib/components/File/FileList';\nimport { StyledTouchDialog } from '@pega/cosmos-react-core/lib/components/Dialog/TouchDialog.styles';\n\nimport { StyledStages } from '../Stages/Stages.styles';\n\nimport type { GenAICoachProps } from './GenAICoach.types';\nimport { isInUtilities } from './GenAICoach.utils';\n\nexport const StyledComposerSection = styled.div``;\n\nexport const StyledGenAIFormControl = styled(FormControl)<{ focused?: boolean }>(({\n theme,\n focused\n}) => {\n return css`\n overflow: hidden;\n\n ${focused &&\n css`\n &:not([disabled]) {\n border-color: ${theme.components['form-control'][':focus']['border-color']};\n box-shadow: ${theme.components['form-control'][':focus']['box-shadow']};\n }\n\n &:hover:not([readonly]):not([disabled]):not(:focus, :focus-within) {\n border-color: transparent;\n }\n `}\n `;\n});\n\nStyledGenAIFormControl.defaultProps = defaultThemeProp;\n\nexport const StyledComposerWrapper = styled.div<{ focused?: boolean; hasQuestionnaire?: boolean }>(\n ({ theme, focused, hasQuestionnaire }) => {\n const { 'border-radius': formControlBorderRadius, 'border-width': formControlBorderWidth } =\n theme.components['form-control'];\n const { 'border-radius': baseBorderRadius, palette } = theme.base;\n const borderRadius = `calc(${formControlBorderRadius} * ${baseBorderRadius})`;\n const borderWidth = formControlBorderWidth ?? '0.0625rem';\n\n return css`\n ${hasQuestionnaire &&\n css`\n border: ${borderWidth} solid ${palette['border-line']};\n border-radius: ${borderRadius};\n overflow: hidden;\n\n ${focused &&\n css`\n border-color: ${theme.components['form-control'][':focus']['border-color']};\n box-shadow: ${theme.components['form-control'][':focus']['box-shadow']};\n `}\n\n ${StyledGenAIFormControl} {\n border: none;\n border-radius: 0;\n box-shadow: none;\n overflow: visible;\n }\n `}\n `;\n }\n);\n\nStyledComposerWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledMessagesContainer = styled.div<{ withSuggestionCards?: boolean }>(\n ({\n theme: {\n base: { spacing }\n },\n withSuggestionCards\n }) => {\n return css`\n margin-block-end: calc(0.5 * ${spacing});\n min-height: 0;\n overflow-y: auto;\n ${withSuggestionCards &&\n css`\n overflow-y: visible;\n margin-block-end: 0;\n padding-block-start: 0;\n flex-shrink: 0;\n `}\n `;\n }\n);\n\nStyledMessagesContainer.defaultProps = defaultThemeProp;\n\nexport const StyledFullscreenWrapper = styled(Fullscreen)`\n height: 100%;\n`;\n\nexport const StyledHeaderContainer = styled(Flex)(({ theme }) => {\n return css`\n border-block-end: 0.0625rem solid\n ${transparentize(0.88, theme.components.agent['foreground-color'])};\n `;\n});\n\nStyledHeaderContainer.defaultProps = defaultThemeProp;\n\nexport const StyledGenAICoachContainer = styled.div<{\n variant: GenAICoachProps['variant'];\n fullScreen: GenAICoachProps['allowFullScreen'];\n isCompact: boolean;\n isPortalAgent: boolean;\n simplifiedAgent?: boolean;\n}>(\n ({\n theme: {\n base: {\n palette,\n 'z-index': zIndex,\n spacing,\n breakpoints,\n animation,\n 'border-radius': baseBorderRadius\n },\n components: {\n card: { 'border-radius': cardBorderRadius },\n agent: { background: agentBackground, 'foreground-color': agentForegroundColor },\n 'form-control': { 'border-radius': formControlBorderRadius }\n }\n },\n variant,\n fullScreen,\n isCompact,\n isPortalAgent,\n simplifiedAgent\n }) => {\n const { previewActive } = useContext(AppShellContext);\n const foregroundColorForAgent = calculateForegroundColor(agentBackground, agentForegroundColor);\n\n return css`\n background: ${agentBackground};\n color: ${foregroundColorForAgent};\n min-width: var(--utilities-drawer-min-width);\n border-radius: ${cardBorderRadius};\n transition: height ${animation.speed} ${animation.timing.ease};\n ${simplifiedAgent\n ? css`\n --message-container-width: 40rem;\n --messages-list-margin-start: 0;\n `\n : css`\n --message-container-width: 62.5rem;\n `}\n\n ${variant.placement === 'dialog' &&\n css`\n border-radius: calc(${formControlBorderRadius} * ${baseBorderRadius});\n `}\n\n ${isInUtilities(variant) &&\n !fullScreen &&\n css`\n min-height: 3rem;\n max-width: 31.25rem;\n box-shadow: 0 -1rem 1rem ${palette['app-background']};\n border-radius: ${cardBorderRadius} ${cardBorderRadius} 0 0;\n position: fixed;\n inset-block-end: var(--appshell-bottom-offset, 0);\n inset-inline-end: calc(2 * ${spacing});\n z-index: calc(${zIndex.drawer} + 1);\n width: 25rem;\n\n ${previewActive &&\n css`\n @media (min-width: ${breakpoints.md}) {\n margin-inline-end: min(var(--resize-drawer-width), ${resizeDrawerMaxWidth});\n }\n `}\n\n ${variant.state === 'minimized' &&\n css`\n height: 3rem;\n `}\n `}\n\n /*\n ~85% of Utilities height and fixed height if screen size less than md and devices with coarse pointer\n FIXME: This is a stopgap to address issue in Android web views via React Native where VH units do not work\n */\n ${((isInUtilities(variant) && variant.state === 'maximized') || !isInUtilities(variant)) &&\n !fullScreen &&\n css`\n height: calc(0.85 * var(--case-view-height, 95vh));\n @media (pointer: coarse) and (max-width: ${breakpoints.md}) {\n height: 40rem;\n }\n `}\n\n ${variant.placement === 'fullpage' &&\n css`\n ${simplifiedAgent\n ? css`\n transition: height 0.6s cubic-bezier(0.4, 0, 0.6, 1);\n height: var(--content-height-in-agent, var(--content-height-in-view, 100vh));\n `\n : css`\n height: var(--content-height-in-view, 100vh);\n `}\n `}\n\n ${isCompact &&\n css`\n height: ${simplifiedAgent ? 'var(--compact-height, auto)' : '100%'};\n max-height: ${simplifiedAgent\n ? 'var(--content-height-in-agent, var(--content-height-in-view, 100vh))'\n : 'var(--content-height-in-view, 100vh)'};\n\n ${StyledMessagesContainer} {\n margin-block-end: 0;\n }\n `}\n\n ${fullScreen &&\n css`\n height: 100vh;\n border-radius: 0;\n `}\n\n ${isPortalAgent &&\n css`\n height: 100%;\n min-height: 0;\n border-radius: 0;\n `}\n\n ${StyledErrorState} {\n ${StyledText} {\n color: ${agentForegroundColor};\n }\n }\n\n ${StyledFileList} {\n color: ${palette['foreground-color']};\n }\n `;\n }\n);\n\nStyledGenAICoachContainer.defaultProps = defaultThemeProp;\n\nexport const StyledGenAIOptionsMenu = styled(MenuButton)(({\n theme: {\n base: { 'font-size': fontSize, 'font-scale': fontScale, 'font-weight': fontWeight },\n components: {\n agent: { ai }\n }\n }\n}) => {\n const { l } = calculateFontSize(fontSize, fontScale);\n return css`\n color: inherit;\n ${StyledIcon}:first-child {\n color: ${ai};\n }\n ${StyledText} {\n font-weight: ${fontWeight['semi-bold']};\n font-size: ${l};\n }\n `;\n});\n\nStyledGenAIOptionsMenu.defaultProps = defaultThemeProp;\n\nexport const StyledMenuSuggestions = styled(MenuButton)(({\n theme: {\n base: { 'border-radius': baseBorderRadius, spacing },\n components: {\n button: { 'border-radius': borderRadius }\n }\n }\n}) => {\n return css`\n padding: calc(0.75 * ${spacing});\n border-radius: calc(${baseBorderRadius} * ${borderRadius});\n `;\n});\n\nStyledMenuSuggestions.defaultProps = defaultThemeProp;\n\nexport const StyledDisclaimerText = styled(Text)<{ inFullPage: boolean }>(({\n inFullPage,\n theme: {\n base: { 'font-size': fontSize, 'font-scale': fontScale, spacing, animation }\n }\n}) => {\n const systemFontSize = calculateFontSize(fontSize, fontScale).xs;\n return css`\n @keyframes disclaimer-fade-in {\n from {\n opacity: 0;\n }\n to {\n opacity: 0.7;\n }\n }\n font-size: ${systemFontSize};\n margin-block-start: ${spacing};\n ${inFullPage &&\n css`\n padding-block-end: calc(2 * ${spacing});\n `}\n opacity: 0.7;\n animation: disclaimer-fade-in ${animation.speed} ${animation.timing.ease} both;\n @media (prefers-reduced-motion: reduce) {\n animation-duration: 1ms;\n }\n `;\n});\n\nStyledDisclaimerText.defaultProps = defaultThemeProp;\n\nexport const StyledFlexWrapper = styled.div<{ isExpanded?: boolean }>(\n ({ isExpanded }) => css`\n height: ${isExpanded ? 'auto' : '100%'};\n overflow-y: auto;\n position: relative;\n\n ${isExpanded &&\n css`\n flex: 1 1 0;\n min-height: 0;\n `}\n `\n);\n\nStyledFlexWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledGridContainer = styled.div<{ conversationHistory: boolean }>(\n ({ theme: { base }, conversationHistory }) => {\n return css`\n height: 100%;\n min-height: 0;\n ${conversationHistory &&\n css`\n margin: calc(2 * ${base.spacing});\n border-radius: ${base['border-radius']};\n `}\n `;\n }\n);\n\nStyledGridContainer.defaultProps = defaultThemeProp;\n\nexport const StyledInitialMessageContainer = styled.div(() => {\n return css`\n ${StyledFormField} {\n width: 100%;\n max-width: var(--message-container-width);\n }\n `;\n});\n\nStyledInitialMessageContainer.defaultProps = defaultThemeProp;\n\nexport const StyledBannerSalutationBlock = styled.div<{ isExpanded?: boolean }>(\n ({ isExpanded }) => css`\n transition:\n opacity 0.45s ease,\n transform 0.45s ease;\n ${isExpanded &&\n css`\n opacity: 0;\n transform: translateY(-1.5rem);\n pointer-events: none;\n `}\n `\n);\nStyledBannerSalutationBlock.defaultProps = defaultThemeProp;\n\nexport const StyledInputContainer = styled(Flex)(({\n theme: {\n base: { spacing }\n }\n}) => {\n return css`\n margin-block-end: ${spacing};\n margin-inline: calc(2 * ${spacing});\n align-items: center;\n\n ${StyledFormField}, ${StyledComposerSection} {\n width: 100%;\n max-width: var(--message-container-width);\n }\n `;\n});\n\nStyledInputContainer.defaultProps = defaultThemeProp;\n\nexport const StyledStickyComposer = styled.div(\n ({\n theme: {\n base: { spacing },\n components: {\n agent: { background: agentBackground }\n }\n }\n }) => {\n return css`\n position: sticky;\n top: 0;\n z-index: 2;\n flex-shrink: 0;\n background: ${agentBackground};\n padding-block: calc(2 * ${spacing});\n\n ${StyledInputContainer} {\n margin-block-end: 0;\n }\n `;\n }\n);\n\nStyledStickyComposer.defaultProps = defaultThemeProp;\n\nexport const StyledSuggestion = styled(Button)(({\n theme: {\n base: { 'border-radius': borderRadius, spacing }\n }\n}) => {\n return css`\n width: fit-content;\n max-width: 100%;\n padding: ${spacing};\n white-space: normal;\n word-break: break-word;\n text-align: start;\n border-start-start-radius: calc(1.25 * ${borderRadius});\n border-start-end-radius: calc(0.5 * ${borderRadius});\n border-end-start-radius: calc(1.25 * ${borderRadius});\n border-end-end-radius: calc(1.25 * ${borderRadius});\n\n & + & {\n margin-inline-start: 0;\n }\n `;\n});\n\nStyledSuggestion.defaultProps = defaultThemeProp;\n\nexport const StyledSuggestionsContainer = styled.div(\n ({\n theme: {\n base: { spacing }\n }\n }) => {\n return css`\n margin-block-start: calc(1.5 * ${spacing});\n `;\n }\n);\n\nStyledSuggestionsContainer.defaultProps = defaultThemeProp;\n\nexport const StyledMessage = styled.p<{ simplified?: boolean }>(({ theme, simplified }) => {\n return css`\n margin-block-start: calc(0.5 * ${theme.base.spacing});\n width: 100%;\n min-width: 0;\n overflow: hidden;\n overflow-wrap: break-word;\n\n ${simplified &&\n css`\n padding-inline-start: calc(2.5rem + ${theme.base.spacing});\n `}\n\n ${StyledEditorContainer} {\n padding: 0;\n\n table {\n display: block;\n max-width: 100%;\n overflow-x: auto;\n }\n\n span {\n animation: ${animations.reveal} 1s forwards;\n }\n }\n `;\n});\n\nStyledMessage.defaultProps = defaultThemeProp;\n\nexport const StyledMessageSender = styled(Text)(({\n theme: {\n base: { 'font-size': fontSize, 'font-scale': fontScale, 'font-weight': fontWeight }\n }\n}) => {\n return css`\n font-size: ${calculateFontSize(fontSize, fontScale).xl};\n font-weight: ${fontWeight['semi-bold']};\n opacity: 0.7;\n `;\n});\n\nStyledMessageSender.defaultProps = defaultThemeProp;\n\nexport const StyledUserMessage = styled.li(\n ({\n theme: {\n base: { 'border-radius': borderRadius, spacing },\n components: {\n agent: {\n 'user-message': {\n background: userMessageBackground,\n 'foreground-color': userMessageForegroundColor\n }\n }\n }\n }\n }) => {\n const foregroundColorForUserMessage = calculateForegroundColor(\n userMessageBackground,\n userMessageForegroundColor\n );\n\n return css`\n overflow-wrap: break-word;\n background: ${userMessageBackground};\n color: ${foregroundColorForUserMessage};\n margin-inline-start: calc(4 * ${spacing});\n margin-block-end: calc(0.5 * ${spacing});\n padding: calc(0.5 * ${spacing});\n border-start-start-radius: calc(1.25 * ${borderRadius});\n border-start-end-radius: calc(0.5 * ${borderRadius});\n border-end-start-radius: calc(1.25 * ${borderRadius});\n border-end-end-radius: calc(1.25 * ${borderRadius});\n `;\n }\n);\n\nStyledUserMessage.defaultProps = defaultThemeProp;\n\nexport const StyledSystemMessage = styled.li<{ stopped?: boolean }>(\n ({\n stopped,\n theme: {\n base: { spacing, 'font-size': fontSize, 'font-scale': fontScale, 'font-weight': fontWeight },\n components: {\n agent: { 'foreground-color': agentForegroundColor, background: agentBackground }\n }\n }\n }) => {\n const systemFontSize = calculateFontSize(fontSize, fontScale).xs;\n const foregroundColorForSystemMessage = calculateForegroundColor(\n agentBackground,\n agentForegroundColor\n );\n\n return css`\n display: flex;\n align-items: center;\n gap: ${spacing};\n overflow-wrap: break-word;\n font-size: ${systemFontSize};\n color: ${foregroundColorForSystemMessage};\n opacity: 0.7;\n margin-block: calc(2 * ${spacing});\n ${stopped &&\n css`\n font-weight: ${fontWeight.normal};\n `}\n\n &::before,\n &::after {\n content: '';\n flex: 1;\n border-block-start: 0.0625rem solid ${foregroundColorForSystemMessage};\n opacity: 0.7;\n }\n `;\n }\n);\n\nStyledSystemMessage.defaultProps = defaultThemeProp;\n\nexport const StyledMessagesList = styled.ul<{ simplified?: boolean }>(\n ({\n theme: {\n base: { shadow, spacing }\n },\n simplified\n }) => {\n return css`\n padding-block-start: ${simplified ? `calc(4 * ${spacing})` : spacing};\n list-style-type: none;\n align-self: center;\n max-width: var(--message-container-width);\n width: 100%;\n margin-block-start: var(--messages-list-margin-start, auto);\n min-height: var(--stream-buffer, auto);\n\n & > li {\n max-width: calc(100% - calc(4.5 * ${spacing}));\n }\n\n & > li[from='user'] {\n margin-inline-start: auto;\n margin-block-end: ${spacing};\n }\n\n & > li[type='message'] {\n &:focus-visible {\n outline: none;\n box-shadow: ${shadow.focus};\n }\n margin-block-end: ${spacing};\n }\n\n & > ${StyledSystemMessage} {\n max-width: 100%;\n }\n\n & > li:has(${StyledSuggestionsContainer}) {\n max-width: 100%;\n }\n `;\n }\n);\n\nStyledMessagesList.defaultProps = defaultThemeProp;\n\nexport const StyledHistoryContainer = styled(Flex)<{ inFullPage: boolean }>(({\n theme,\n inFullPage\n}) => {\n const { background, 'foreground-color': foregroundColor } = theme.components.agent.history;\n const foreground = calculateForegroundColor(background, foregroundColor);\n return css`\n height: 100%;\n min-height: 0;\n background: ${background};\n color: ${foreground};\n border-radius: ${theme.components.card['border-radius']};\n box-shadow: ${theme.base.shadow.low};\n\n ${!inFullPage &&\n css`\n margin-inline: calc(1.5 * ${theme.base.spacing});\n `}\n\n ${StyledEmptyState}, ${StyledErrorState} {\n justify-content: flex-start;\n padding-inline: calc(2 * ${theme.base.spacing});\n }\n `;\n});\n\nStyledHistoryContainer.defaultProps = defaultThemeProp;\n\nexport const StyledList = styled(Flex)(\n ({ theme }) => css`\n height: 100%;\n overflow-y: auto;\n margin-block-end: calc(2 * ${theme.base.spacing});\n `\n);\n\nStyledList.defaultProps = defaultThemeProp;\n\nexport const StyledInnerList = styled.ul(\n ({ theme }) => css`\n padding-inline: calc(2 * ${theme.base.spacing});\n\n ${StyledText} {\n font-weight: ${theme.base['font-weight'].normal};\n }\n `\n);\n\nStyledInnerList.defaultProps = defaultThemeProp;\n\nexport const StyledHistorySummaryListItem = styled(SummaryItem)(({ theme }) => {\n const hoverColor = tryCatch(() =>\n mix(0.95, theme.components.agent.history.background, theme.base.palette.interactive)\n );\n return css`\n padding-inline: calc(2 * ${theme.base.spacing});\n padding-block: ${theme.base.spacing};\n\n &:hover {\n background-color: ${hoverColor};\n border-radius: calc(3 * ${theme.base.spacing});\n cursor: pointer;\n }\n &[aria-selected='true'] {\n background-color: ${theme.components.agent.history.item['selected-background']};\n border-radius: calc(3 * ${theme.base.spacing});\n }\n &:focus-visible {\n border: 0.0625rem solid ${theme.base.palette.interactive};\n }\n `;\n});\n\nStyledHistorySummaryListItem.defaultProps = defaultThemeProp;\n\nexport const StyledLoadingItem = styled.li`\n ${StyledProgress} {\n margin: 0;\n }\n`;\n\nexport const StyledGroupHeader = styled.div(({ theme }) => {\n return css`\n padding-inline: calc(2 * ${theme.base.spacing});\n padding-block-start: calc(2 * ${theme.base.spacing});\n padding-block-end: calc(0.5 * ${theme.base.spacing});\n font-weight: ${theme.base['font-weight']['semi-bold']};\n `;\n});\n\nStyledGroupHeader.defaultProps = defaultThemeProp;\n\nexport const StyledErrorContainer = styled.div(({ theme }) => {\n return css`\n color: ${theme.base.palette.urgent};\n `;\n});\n\nStyledErrorContainer.defaultProps = defaultThemeProp;\n\nexport const StyledInput = styled.input(() => {\n return css`\n display: none;\n `;\n});\n\nexport const StyledAttachmentsList = styled(FileList)(({ theme }) => {\n return css`\n padding: ${theme.base.spacing};\n `;\n});\n\nStyledAttachmentsList.defaultProps = defaultThemeProp;\n\nexport const StyledGuidedSuggestions = styled(MenuButton)`\n width: 100%;\n max-width: var(--message-container-width);\n > span {\n justify-content: center;\n }\n`;\n\nexport const StyledAgentIcon = styled.svg`\n width: 3rem;\n height: 3rem;\n`;\n\nStyledAgentIcon.defaultProps = defaultThemeProp;\n\nexport const StyledGenAITextArea = styled(TextArea)<{ simplified?: boolean }>(({\n theme: { components, base },\n simplified\n}) => {\n return css`\n border: none;\n box-shadow: none;\n min-height: calc(1.75 * ${components.input.height});\n max-height: 6rem;\n overflow-y: auto;\n padding-block-end: 0;\n ${simplified &&\n css`\n padding: calc(2 * ${base.spacing});\n `}\n &:focus:not([disabled]) {\n border: none;\n box-shadow: none;\n background-color: transparent;\n }\n `;\n});\n\nStyledGenAITextArea.defaultProps = defaultThemeProp;\n\nexport const StyledSendButton = styled(Button)<{ simplified?: boolean }>(({\n theme: {\n base: { 'border-radius': baseBorderRadius },\n components: {\n 'form-control': { 'border-radius': formControlBorderRadius }\n }\n },\n simplified\n}) => {\n const radiusMultiplier = simplified ? 0.5 : 1;\n return css`\n border-radius: calc(${baseBorderRadius} * ${formControlBorderRadius} * ${radiusMultiplier});\n margin-inline-start: auto;\n `;\n});\n\nStyledSendButton.defaultProps = defaultThemeProp;\n\nexport const StyledStopGeneratingButton = styled(Button)<{ simplified?: boolean }>(({\n theme: {\n base: { 'border-radius': baseBorderRadius },\n components: {\n 'form-control': { 'border-radius': formControlBorderRadius }\n }\n },\n simplified\n}) => {\n const radiusMultiplier = simplified ? 0.5 : 1;\n return css`\n border-radius: calc(${baseBorderRadius} * ${formControlBorderRadius} * ${radiusMultiplier});\n margin-inline-start: auto;\n `;\n});\n\nStyledStopGeneratingButton.defaultProps = defaultThemeProp;\n\nexport const StyledInitialMessageGrid = styled.div`\n max-width: var(--message-container-width);\n width: 100%;\n`;\n\nexport const StyledInitialMessageButton = styled(Button)(({\n theme: {\n base: { spacing }\n }\n}) => {\n return css`\n white-space: normal;\n text-align: left;\n min-width: unset;\n padding-block: ${spacing};\n padding-inline: calc(2 * ${spacing});\n align-items: start;\n\n & + & {\n margin-inline-start: 0;\n }\n `;\n});\n\nStyledInitialMessageButton.defaultProps = defaultThemeProp;\n\nexport const StyledInitialMessageText = styled.span`\n ${lineClamp(3)};\n`;\n\nexport const StyledGenAIAvatar = styled(Avatar)(({\n theme: {\n components: {\n agent: {\n 'coach-message': {\n avatar: { background: avatarBackground, 'foreground-color': avatarForegroundColor }\n }\n }\n }\n }\n}) => {\n return css`\n background: ${avatarBackground};\n color: ${avatarForegroundColor};\n `;\n});\n\nStyledGenAIAvatar.defaultProps = defaultThemeProp;\n\nexport const StyledGenAIFooter = styled.div`\n width: 100%;\n max-width: var(--message-container-width);\n`;\n\nexport const StyledToolMessage = styled.p(\n ({\n theme: {\n base: {\n spacing,\n palette: { 'border-line': borderLine }\n }\n }\n }) => {\n return css`\n border-block-end: 0.125rem solid ${borderLine};\n padding: calc(2 * ${spacing});\n `;\n }\n);\n\nStyledToolMessage.defaultProps = defaultThemeProp;\n\nexport const StyledToolMessageContainer = styled.div(\n ({\n theme: {\n base: {\n spacing,\n 'border-radius': borderRadius,\n palette: { 'border-line': borderLine }\n }\n }\n }) => {\n return css`\n border: 0.125rem solid ${borderLine};\n border-radius: min(calc(2 * ${borderRadius}), 1rem);\n margin-block: ${spacing};\n `;\n }\n);\n\nStyledToolMessageContainer.defaultProps = defaultThemeProp;\n\nexport const StyledConfirmationMsg = styled(RichTextViewer)(\n ({\n theme: {\n base,\n components: {\n 'form-control': {\n ':read-only': { 'background-color': readOnlyBackgroundColor }\n }\n }\n }\n }) => `\n padding: 0;\n background-color: ${readOnlyBackgroundColor};\n border-radius: calc(0.5 * ${base['border-radius']});\n`\n);\n\nStyledConfirmationMsg.defaultProps = defaultThemeProp;\n\nexport const StyledActionsContainer = styled.div(\n () => css`\n margin-inline-start: auto;\n\n && button {\n margin-inline-start: 0;\n }\n `\n);\n\nStyledActionsContainer.defaultProps = defaultThemeProp;\n\nexport const StyledScrollButton = styled(Button)(({ theme }) => {\n return css`\n position: absolute;\n bottom: calc(var(--composer-height, 0rem) + calc(5 * ${theme.base.spacing}));\n width: fit-content;\n align-self: center;\n z-index: 1;\n box-shadow: ${theme.base.shadow.high};\n `;\n});\n\nStyledScrollButton.defaultProps = defaultThemeProp;\n\nexport const ProgressAngleStyle = createGlobalStyle`\n @property --progress-border-angle {\n syntax: \"<angle>\";\n inherits: false;\n initial-value: 0deg;\n }\n`;\n\nconst progressBorderSpin = keyframes`\n to { --progress-border-angle: 360deg; }\n`;\n\nexport const StyledProgressContainer = styled.div(({ theme }) => {\n const aiColor = isSolidColor(theme.components.agent.ai)\n ? theme.components.agent.ai\n : theme.base.colors.purple.dark;\n const aiTransparent = transparentize(0.85, aiColor);\n const borderWidth = '0.0625rem';\n\n return css`\n position: relative;\n border-radius: calc(2 * ${theme.base.spacing});\n border-start-start-radius: calc(0.5 * ${theme.base.spacing});\n width: fit-content;\n\n &::before {\n content: '';\n position: absolute;\n inset: -${borderWidth};\n border-radius: calc(1.875 * ${theme.base.spacing} + ${borderWidth});\n border-start-start-radius: calc(0.375 * ${theme.base.spacing} + ${borderWidth});\n padding: ${borderWidth};\n background: conic-gradient(\n from var(--progress-border-angle, 0deg) in oklab,\n ${aiTransparent} 0%,\n ${aiTransparent} 10%,\n ${aiColor} 50%,\n ${aiTransparent} 90%,\n ${aiTransparent} 100%\n );\n -webkit-mask:\n linear-gradient(#000000 0 0) content-box,\n linear-gradient(#000000 0 0);\n -webkit-mask-composite: xor;\n mask:\n linear-gradient(#000000 0 0) content-box,\n linear-gradient(#000000 0 0);\n mask-composite: exclude;\n pointer-events: none;\n animation: ${progressBorderSpin} 1.25s linear infinite;\n }\n `;\n});\n\nStyledProgressContainer.defaultProps = defaultThemeProp;\n\nexport const StyledProgressContent = styled.div(({ theme }) => {\n return css`\n background: ${theme.components.agent.background};\n border-radius: calc(2 * ${theme.base.spacing});\n border-start-start-radius: calc(0.5 * ${theme.base.spacing});\n padding: calc(2 * ${theme.base.spacing});\n\n ${StyledProgressRing} {\n width: ${theme.components.icon.size.s};\n }\n `;\n});\n\nStyledProgressContent.defaultProps = defaultThemeProp;\n\nexport const StyledProgressText = styled(Text)(({ theme }) => {\n return css`\n color: ${theme.components.agent.ai};\n `;\n});\n\nStyledProgressText.defaultProps = defaultThemeProp;\n\nexport const StyledActionContainer = styled(Flex)`\n && {\n display: flex;\n }\n\n && > button:first-child:not(:last-child) {\n margin-inline-end: 0;\n }\n margin-inline-end: auto;\n`;\n\nexport const StyledToolCandidatesModal = styled(Modal)(({ theme }) => {\n return css`\n max-width: ${theme.base['content-width'].xl};\n `;\n});\n\nStyledToolCandidatesModal.defaultProps = defaultThemeProp;\n\nexport const StyledPortalSplitContainer = styled.div`\n container-type: inline-size;\n container-name: portal-split;\n display: flex;\n width: 100%;\n min-height: calc(100dvh - var(--appshell-total-offset, 0rem));\n`;\n\nStyledPortalSplitContainer.defaultProps = defaultThemeProp;\n\nconst portalAgentRegionBasis = (agentVisible: boolean, mainVisible: boolean): string => {\n if (!agentVisible) return '0%';\n if (!mainVisible) return '100%';\n return `clamp(${portalAgentMinWidth}, var(--region-a-width, ${portalAgentDefaultWidth}), calc(100% - ${portalAgentMinWidth}))`;\n};\n\nexport const StyledPortalAgentRegion = styled.aside<{\n agentVisible: boolean;\n mainVisible: boolean;\n}>(\n ({ agentVisible, mainVisible, theme }) => css`\n flex: 0 0 ${portalAgentRegionBasis(agentVisible, mainVisible)};\n min-width: 0;\n transition: flex-basis calc(${theme.base.animation.speed} / 2)\n ${theme.base.animation.timing.ease};\n will-change: flex-basis;\n border-inline-end: 0.0625rem solid ${theme.base.palette['border-line']};\n position: sticky;\n top: var(--appshell-top-offset, 0);\n height: calc(100dvh - var(--appshell-total-offset, 0rem));\n align-self: flex-start;\n\n @container portal-split (min-width: ${theme.base.breakpoints.xl}) {\n ${agentVisible &&\n mainVisible &&\n css`\n flex-basis: clamp(\n ${portalAgentMinWidth},\n var(--region-a-width, 25%),\n calc(100% - ${portalAgentMinWidth})\n );\n `}\n }\n\n ${!agentVisible &&\n css`\n overflow: hidden;\n `}\n `\n);\n\nStyledPortalAgentRegion.defaultProps = defaultThemeProp;\n\nexport const StyledPortalMainRegion = styled.div`\n flex: 1 1 0%;\n min-width: 0;\n\n &[inert] {\n display: none;\n }\n`;\n\nStyledPortalMainRegion.defaultProps = defaultThemeProp;\n\nexport const StyledPortalSeparator = styled.div`\n position: sticky;\n top: var(--appshell-top-offset, 0);\n align-self: flex-start;\n flex-shrink: 0;\n height: calc(100dvh - var(--appshell-total-offset, 0rem));\n\n ${StyledResizeHandle} {\n z-index: 1;\n }\n`;\n\nStyledPortalSeparator.defaultProps = defaultThemeProp;\n\nexport const StyledSuggestionCardsView = styled.div(\n ({\n theme: {\n base: {\n spacing,\n 'font-size': fontSize,\n 'font-scale': fontScale,\n 'font-weight': fontWeight,\n transparency,\n 'content-width': contentWidth\n },\n components: {\n 'form-control': { 'border-color': formControlBorderColor }\n }\n }\n }) => {\n const cardFontSize = calculateFontSize(fontSize, fontScale).xxs;\n const columnTrack = `clamp(2.5rem, var(--tile-col-track, 2.5rem), 5rem) minmax(20ch, ${contentWidth.sm}) 1fr`;\n const singleCardSize = `calc(${contentWidth.sm} + 8.875rem)`;\n\n return css`\n max-width: 95rem;\n width: 100%;\n margin-inline: auto;\n\n [data-testid='gallery'] {\n min-height: 0;\n max-height: none;\n }\n\n .bContainer {\n height: auto !important;\n }\n\n && .grid-container {\n position: static;\n gap: calc(2 * ${spacing});\n grid-auto-rows: minmax(2.75rem, 1fr);\n\n @container (min-width: calc(1.25 * ${singleCardSize})) {\n grid-template-columns: repeat(2, ${columnTrack});\n }\n\n @container (min-width: calc(2 * ${singleCardSize})) {\n grid-template-columns: repeat(3, ${columnTrack});\n }\n\n @container (min-width: calc(3 * ${singleCardSize})) {\n grid-template-columns: repeat(4, ${columnTrack});\n }\n }\n\n && ${StyledCard} {\n background: transparent;\n }\n\n ${StyledFullscreenButton} {\n display: none;\n }\n\n ${StyledHeader} {\n ${StyledText} {\n font-size: ${cardFontSize};\n }\n }\n\n ${StyledSingleField} {\n font-size: ${cardFontSize};\n opacity: ${transparency['transparent-2']};\n }\n\n ${StyledSelectionCard} {\n border-color: ${formControlBorderColor};\n\n &:focus,\n &:not([data-main-focus]):focus-within {\n border-color: transparent;\n }\n\n ${StyledTileContent} {\n font-size: ${cardFontSize};\n font-weight: ${fontWeight['semi-bold']};\n }\n }\n `;\n }\n);\n\nStyledSuggestionCardsView.defaultProps = defaultThemeProp;\n\nexport const StyledAISuggestedBadge = styled(Flex)(({\n theme: {\n base: { 'font-size': fontSize, 'font-scale': fontScale, transparency }\n }\n}) => {\n const systemFontSize = calculateFontSize(fontSize, fontScale).xxs;\n return css`\n ${StyledText} {\n font-size: ${systemFontSize};\n }\n opacity: ${transparency['transparent-2']};\n `;\n});\n\nStyledAISuggestedBadge.defaultProps = defaultThemeProp;\n\nexport const StyledSuggestionCardsBottomHalf = styled(Flex)(({\n theme: {\n base: { spacing }\n }\n}) => {\n return css`\n min-height: 50%;\n flex-shrink: 0;\n margin-block-start: calc(2.5 * ${spacing});\n `;\n});\n\nStyledSuggestionCardsBottomHalf.defaultProps = defaultThemeProp;\n\nexport const StyledCaseWorkflowBanner = styled(Flex)(({ theme }) => {\n const background = theme.components['case-view'].header.background;\n const foreground = calculateForegroundColor(\n background,\n theme.components['case-view'].header['foreground-color']\n );\n\n return css`\n @keyframes case-header-fade-in {\n from {\n opacity: 0;\n transform: translateY(calc(${theme.base.spacing} * -1.5)) scale(0.98);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n }\n margin-inline: calc(2 * ${theme.base.spacing});\n margin-block: ${theme.base.spacing} 0;\n padding: calc(${theme.base.spacing} * 0.75) ${theme.base.spacing};\n background: ${background};\n color: ${foreground};\n border-radius: ${theme.base['border-radius']};\n box-shadow: ${theme.base.shadow.low};\n animation: case-header-fade-in ${theme.base.animation.speed} ${theme.base.animation.timing.ease}\n both;\n `;\n});\n\nStyledCaseWorkflowBanner.defaultProps = defaultThemeProp;\n\nexport const StyledCaseLaunchButton = styled(Button)(({ theme }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: ${theme.base.spacing};\n min-width: 0;\n flex: 1 1 0;\n padding: 0 calc(${theme.base.spacing} * 0.5);\n font-size: ${fontSize.s};\n font-weight: ${theme.base['font-weight']['semi-bold']};\n text-align: start;\n `;\n});\n\nStyledCaseLaunchButton.defaultProps = defaultThemeProp;\n\nexport const StyledCaseIconWrapper = styled.span`\n flex-shrink: 0;\n display: flex;\n align-items: center;\n\n ${StyledIconShape} {\n width: 1.5rem;\n height: 1.5rem;\n }\n`;\n\nStyledCaseIconWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledCaseTitleText = styled.span`\n display: block;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 0;\n flex: 1 1 0;\n`;\n\nStyledCaseTitleText.defaultProps = defaultThemeProp;\n\nexport const StyledProgressLabel = styled.span(({ theme }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n flex: 0 1 auto;\n max-width: 40%;\n margin-inline-start: auto;\n font-size: ${fontSize.xxs};\n font-weight: ${theme.base['font-weight'].normal};\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 0;\n `;\n});\n\nStyledProgressLabel.defaultProps = defaultThemeProp;\n\nexport const StyledWorkflowInfoDialog = styled(InfoDialog)(({ theme }) => {\n return css`\n &:not(${StyledTouchDialog}) {\n width: ${theme.base['content-width'].sm};\n max-height: 80vh;\n }\n `;\n});\n\nStyledWorkflowInfoDialog.defaultProps = defaultThemeProp;\n\nexport const StyledStageList = styled.ol(({ theme }) => {\n return css`\n list-style: none;\n padding: calc(${theme.base.spacing} * 0.5);\n overflow-y: auto;\n min-height: 0;\n\n > li:not(:last-child) {\n margin-block-end: calc(${theme.base.spacing} * 0.5);\n }\n `;\n});\n\nStyledStageList.defaultProps = defaultThemeProp;\n\nexport const StyledStageButton = styled(Button)<{ expanded?: boolean }>(({ theme, expanded }) => {\n return css`\n width: 100%;\n justify-content: start;\n color: ${theme.base.palette['foreground-color']};\n gap: calc(${theme.base.spacing} * 0.5);\n\n ${StyledIcon} {\n transition: transform ${theme.base.animation.speed} ${theme.base.animation.timing.ease};\n flex-shrink: 0;\n transform: rotateZ(${expanded ? '0deg' : '-90deg'});\n }\n `;\n});\n\nStyledStageButton.defaultProps = defaultThemeProp;\n\nexport const StyledStepsContainer = styled.div<{\n stageStatus?: 'active' | 'completed' | 'not-started';\n}>(({ theme, stageStatus }) => {\n const isInactive = stageStatus === 'completed' || stageStatus === 'not-started';\n const { m: stepMarkerSize } = calculateFontSize(\n theme.base['font-size'],\n theme.base['font-scale']\n );\n\n return css`\n padding-inline-start: calc(${theme.base.spacing} * 2);\n padding-block: calc(${theme.base.spacing} * 0.5);\n\n ${isInactive &&\n css`\n ${StepMarker}[aria-current='step']::before {\n width: ${stepMarkerSize};\n height: ${stepMarkerSize};\n }\n\n ${StyledStepText} {\n font-weight: ${theme.base['font-weight'].normal};\n font-size: inherit;\n }\n `}\n\n ${stageStatus === 'not-started' &&\n css`\n ${StepMarker}[aria-current='step']::before {\n background: ${theme.base.palette['primary-background']};\n border: calc(2 * ${theme.components['form-control']['border-width']}) solid\n ${theme.components['form-control']['border-color']};\n }\n `}\n `;\n});\n\nStyledStepsContainer.defaultProps = defaultThemeProp;\n\nexport const StyledCaseViewIcon = styled(Icon)(({ theme, foreground, background }) => {\n const meetsContrast =\n foreground && background\n ? tryCatch(\n () => meetsContrastGuidelines(foreground, background).AA,\n () => false\n )\n : true;\n\n return css`\n --brand-accent: ${theme.base.palette['brand-accent']};\n --gradient-start: oklch(from var(--brand-accent) calc(l - 0.3) calc(c * 1.5) h);\n --gradient-mid: oklch(from var(--brand-accent) l c h);\n --gradient-end: oklch(from var(--brand-accent) calc(l + 0.5) calc(c * 1.5) h);\n\n ${!meetsContrast\n ? css`\n color: inherit;\n background: transparent;\n `\n : null}\n\n ${theme.components['case-view'].icon.color !== 'auto'\n ? css`\n color: ${theme.components['case-view'].icon.color};\n `\n : null}\n\n ${theme.components['case-view'].icon.background !== 'auto'\n ? css`\n background: ${theme.components['case-view'].icon.background};\n `\n : null}\n\n ${theme.components['case-view'].icon['box-shadow'] !== 'auto'\n ? css`\n box-shadow: ${theme.components['case-view'].icon['box-shadow']};\n `\n : null}\n `;\n});\n\nStyledCaseViewIcon.defaultProps = defaultThemeProp;\n\nexport const StyledCaseViewImage = styled(Image)`\n max-height: 100%;\n`;\n\nStyledCaseViewImage.defaultProps = defaultThemeProp;\n\nexport const StyledActiveCaseButton = styled.button(({ theme }) => {\n const background = theme.components['case-view'].header.background;\n const foreground = calculateForegroundColor(\n background,\n theme.components['case-view'].header['foreground-color']\n );\n const hoverBg = tryCatch(\n () => darken(0.05, background),\n () => background\n );\n\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n border: none;\n outline: none;\n cursor: pointer;\n font-size: ${fontSize.xs};\n font-weight: ${theme.base['font-weight']['semi-bold']};\n padding: calc(${theme.base.spacing} * 0.5) ${theme.base.spacing};\n border-radius: ${theme.base['border-radius']};\n background: ${background};\n color: ${foreground};\n box-shadow: ${theme.base.shadow.low};\n\n &:hover {\n background: ${hoverBg};\n }\n\n &:focus-visible {\n box-shadow: ${theme.base.shadow.focus};\n }\n `;\n});\n\nStyledActiveCaseButton.defaultProps = defaultThemeProp;\n\nexport const StyledActiveCasesList = styled(Flex)(({ theme }) => {\n return css`\n overflow-y: auto;\n padding: calc(${theme.base.spacing} * 0.5) calc(${theme.base.spacing} * 0.5);\n min-height: 0;\n `;\n});\n\nStyledActiveCasesList.defaultProps = defaultThemeProp;\n\nexport const StyledActiveCaseName = styled(Button)(({ theme }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n justify-content: start;\n font-size: ${fontSize.s};\n font-weight: ${theme.base['font-weight']['semi-bold']};\n padding: 0;\n width: 100%;\n text-align: start;\n `;\n});\n\nStyledActiveCaseName.defaultProps = defaultThemeProp;\n\nexport const StyledActiveCaseStages = styled.div(({ theme }) => {\n return css`\n ${StyledStages} {\n border: ${theme.components.button['border-width']} solid ${theme.base.palette['border-line']};\n }\n `;\n});\n\nStyledActiveCaseStages.defaultProps = defaultThemeProp;\n\nexport const StyledSalutation = styled(Text)<{ simplified?: boolean }>(({ theme, simplified }) => {\n return css`\n text-align: center;\n overflow-wrap: break-word;\n word-break: break-word;\n font-size: ${simplified\n ? 'clamp(2.5rem, 2rem + 1vw, 3.5rem)'\n : 'clamp(1.5rem, 1.333rem + 0.052vw, 2rem)'};\n font-weight: ${theme.base['font-weight'].bold};\n `;\n});\n\nStyledSalutation.defaultProps = defaultThemeProp;\n\nexport const StyledSubHeading = styled(Text)(({ theme }) => {\n const { xxl } = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n return css`\n text-align: center;\n overflow-wrap: break-word;\n word-break: break-word;\n font-size: ${xxl};\n `;\n});\n\nStyledSubHeading.defaultProps = defaultThemeProp;\n\nexport const StyledQuestionnaireCard = styled.article(\n ({\n theme: {\n base: {\n spacing,\n palette: { 'border-line': borderLine }\n },\n components: {\n agent: {\n questionnaire: { background, 'foreground-color': foregroundColor }\n }\n }\n }\n }) => {\n const foreground = calculateForegroundColor(background, foregroundColor);\n\n return css`\n width: 100%;\n border: none;\n border-block-end: 0.0625rem solid ${borderLine};\n border-radius: 0;\n background: ${background};\n color: ${foreground};\n\n &&& ${StyledCardHeader} {\n padding-block-start: ${spacing};\n padding-inline-end: ${spacing};\n }\n\n &&& ${StyledCardFooter} {\n padding-block-end: ${spacing};\n }\n\n &&& ${StyledCardContent} {\n padding-block-end: ${spacing};\n }\n `;\n }\n);\n\nStyledQuestionnaireCard.defaultProps = defaultThemeProp;\n\nexport const StyledQuestionBlock = styled.fieldset`\n border: none;\n padding: 0;\n margin: 0;\n\n /* Let radio/checkbox labels stretch so the ComboBox can fill available width */\n label {\n width: 100%;\n }\n`;\n\nStyledQuestionBlock.defaultProps = defaultThemeProp;\n\nexport const StyledComboBoxWrapper = styled.div`\n min-width: 12rem;\n flex: 1;\n`;\n\nStyledComboBoxWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledSelectionCardGrid = styled.div<{ flexibleImages?: boolean }>(\n ({ theme, flexibleImages }) => css`\n overflow-x: auto;\n padding-block: calc(0.5 * ${theme.base.spacing});\n\n > ${StyledSelectionCard} {\n flex: 0 0 auto;\n min-width: ${theme.base['content-width'].xs};\n max-width: ${theme.base['content-width'].sm};\n\n ${flexibleImages &&\n css`\n grid-template-rows: minmax(2.5rem, 8.25rem) auto;\n `}\n }\n `\n);\n\nStyledSelectionCardGrid.defaultProps = defaultThemeProp;\n\nexport const StyledImageChoiceNavBar = styled(Flex)(({ theme }) => {\n return css`\n padding-block-start: calc(0.5 * ${theme.base.spacing});\n `;\n});\n\nStyledImageChoiceNavBar.defaultProps = defaultThemeProp;\n\nexport const StyledSelectionCardImageNumber = styled.span(({ theme }) => {\n return css`\n font-weight: ${theme.base['font-weight'].bold};\n `;\n});\n\nStyledSelectionCardImageNumber.defaultProps = defaultThemeProp;\n\nexport const StyledSelectionCardImageName = styled.span(({ theme }) => {\n return css`\n font-weight: ${theme.base['font-weight'].normal};\n font-style: italic;\n `;\n});\n\nStyledSelectionCardImageName.defaultProps = defaultThemeProp;\n"]}
|
|
1
|
+
{"version":3,"file":"GenAICoach.styles.js","sourceRoot":"","sources":["../../../src/components/GenAICoach/GenAICoach.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,iBAAiB,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEhF,OAAO,EACL,eAAe,EACf,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,IAAI,EACJ,KAAK,EACL,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,WAAW,EACX,IAAI,EACJ,QAAQ,EACR,iBAAiB,EACjB,wBAAwB,EACxB,gBAAgB,EAChB,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,UAAU,EACV,UAAU,EACV,KAAK,EACL,eAAe,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,kDAAkD,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,wDAAwD,CAAC;AAC1F,OAAO,EAAE,gBAAgB,EAAE,MAAM,wDAAwD,CAAC;AAC1F,OAAO,EAAE,iBAAiB,EAAE,MAAM,yDAAyD,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAAE,MAAM,oEAAoE,CAAC;AAC5G,OAAO,EAAE,eAAe,EAAE,MAAM,4DAA4D,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YAAY,GAAG,gBAAgB,CAAC;AAE/D,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACpE,OAAO,GAAG,CAAA;mBACO,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM;;GAEhD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,4BAA4B,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { createGlobalStyle, css, keyframes } from 'styled-components';\nimport { useContext } from 'react';\nimport { mix, darken, meetsContrastGuidelines, transparentize } from 'polished';\n\nimport {\n AppShellContext,\n Button,\n FileList,\n Flex,\n FormControl,\n Icon,\n Image,\n MenuButton,\n InfoDialog,\n StyledEmptyState,\n StyledErrorState,\n StyledIcon,\n StyledText,\n SummaryItem,\n Text,\n TextArea,\n calculateFontSize,\n calculateForegroundColor,\n defaultThemeProp,\n isSolidColor,\n tryCatch,\n Avatar,\n Fullscreen,\n animations,\n Modal,\n StyledIconShape\n} from '@pega/cosmos-react-core';\nimport { StyledCard } from '@pega/cosmos-react-core/lib/components/Card/Card';\nimport { StyledCardHeader } from '@pega/cosmos-react-core/lib/components/Card/CardHeader';\nimport { StyledCardFooter } from '@pega/cosmos-react-core/lib/components/Card/CardFooter';\nimport { StyledCardContent } from '@pega/cosmos-react-core/lib/components/Card/CardContent';\nimport { StyledFullscreenButton } from '@pega/cosmos-react-core/lib/components/Fullscreen/FullscreenButton';\nimport { StyledFormField } from '@pega/cosmos-react-core/lib/components/FormField/FormField';\nimport {\n StyledHeader,\n StyledSelectionCard,\n StyledSingleField,\n StyledTileContent\n} from '@pega/cosmos-react-core/lib/components/SelectionCard/SelectionCard.styles';\nimport { StyledEditorContainer } from '@pega/cosmos-react-rte/lib/components/RichTextEditor/RichTextEditor.styles';\nimport {\n StyledProgress,\n StyledProgressRing\n} from '@pega/cosmos-react-core/lib/components/Progress/Progress.styles';\nimport {\n resizeDrawerMaxWidth,\n portalAgentMinWidth,\n portalAgentDefaultWidth\n} from '@pega/cosmos-react-core/lib/styles/constants';\nimport { lineClamp } from '@pega/cosmos-react-core/lib/styles/mixins';\nimport { RichTextViewer } from '@pega/cosmos-react-rte';\nimport {\n StepMarker,\n StyledStepText\n} from '@pega/cosmos-react-core/lib/components/MultiStepForm/FormProgress.styles';\nimport { StyledFileList } from '@pega/cosmos-react-core/lib/components/File/FileList';\nimport { StyledTouchDialog } from '@pega/cosmos-react-core/lib/components/Dialog/TouchDialog.styles';\n\nimport { StyledStages } from '../Stages/Stages.styles';\n\nimport type { GenAICoachProps } from './GenAICoach.types';\nimport { isInUtilities } from './GenAICoach.utils';\n\nexport const StyledComposerSection = styled.div``;\n\nexport const StyledGenAIFormControl = styled(FormControl)<{ focused?: boolean }>(({\n theme,\n focused\n}) => {\n return css`\n overflow: hidden;\n\n ${focused &&\n css`\n &:not([disabled]) {\n border-color: ${theme.components['form-control'][':focus']['border-color']};\n box-shadow: ${theme.components['form-control'][':focus']['box-shadow']};\n }\n\n &:hover:not([readonly]):not([disabled]):not(:focus, :focus-within) {\n border-color: transparent;\n }\n `}\n `;\n});\n\nStyledGenAIFormControl.defaultProps = defaultThemeProp;\n\nexport const StyledComposerWrapper = styled.div<{ focused?: boolean; hasQuestionnaire?: boolean }>(\n ({ theme, focused, hasQuestionnaire }) => {\n const { 'border-radius': formControlBorderRadius, 'border-width': formControlBorderWidth } =\n theme.components['form-control'];\n const { 'border-radius': baseBorderRadius, palette } = theme.base;\n const borderRadius = `calc(${formControlBorderRadius} * ${baseBorderRadius})`;\n const borderWidth = formControlBorderWidth ?? '0.0625rem';\n\n return css`\n ${hasQuestionnaire &&\n css`\n border: ${borderWidth} solid ${palette['border-line']};\n border-radius: ${borderRadius};\n overflow: hidden;\n\n ${focused &&\n css`\n border-color: ${theme.components['form-control'][':focus']['border-color']};\n box-shadow: ${theme.components['form-control'][':focus']['box-shadow']};\n `}\n\n ${StyledGenAIFormControl} {\n border: none;\n border-radius: 0;\n box-shadow: none;\n overflow: visible;\n }\n `}\n `;\n }\n);\n\nStyledComposerWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledMessagesContainer = styled.div<{ withSuggestionCards?: boolean }>(\n ({\n theme: {\n base: { spacing }\n },\n withSuggestionCards\n }) => {\n return css`\n margin-block-end: calc(0.5 * ${spacing});\n min-height: 0;\n overflow-y: auto;\n ${withSuggestionCards &&\n css`\n overflow-y: visible;\n margin-block-end: 0;\n padding-block-start: 0;\n flex-shrink: 0;\n `}\n `;\n }\n);\n\nStyledMessagesContainer.defaultProps = defaultThemeProp;\n\nexport const StyledFullscreenWrapper = styled(Fullscreen)`\n height: 100%;\n`;\n\nexport const StyledHeaderContainer = styled(Flex)(({ theme }) => {\n return css`\n border-block-end: 0.0625rem solid\n ${transparentize(0.88, theme.components.agent['foreground-color'])};\n `;\n});\n\nStyledHeaderContainer.defaultProps = defaultThemeProp;\n\nexport const StyledGenAICoachContainer = styled.div<{\n variant: GenAICoachProps['variant'];\n fullScreen: GenAICoachProps['allowFullScreen'];\n isCompact: boolean;\n isPortalAgent: boolean;\n simplifiedAgent?: boolean;\n}>(\n ({\n theme: {\n base: {\n palette,\n 'z-index': zIndex,\n spacing,\n breakpoints,\n animation,\n 'border-radius': baseBorderRadius\n },\n components: {\n card: { 'border-radius': cardBorderRadius },\n agent: { background: agentBackground, 'foreground-color': agentForegroundColor },\n 'form-control': { 'border-radius': formControlBorderRadius }\n }\n },\n variant,\n fullScreen,\n isCompact,\n isPortalAgent,\n simplifiedAgent\n }) => {\n const { previewActive } = useContext(AppShellContext);\n const foregroundColorForAgent = calculateForegroundColor(agentBackground, agentForegroundColor);\n\n return css`\n background: ${agentBackground};\n color: ${foregroundColorForAgent};\n min-width: var(--utilities-drawer-min-width);\n border-radius: ${cardBorderRadius};\n transition: height ${animation.speed} ${animation.timing.ease};\n ${simplifiedAgent\n ? css`\n --message-container-width: 40rem;\n --messages-list-margin-start: 0;\n `\n : css`\n --message-container-width: 62.5rem;\n `}\n\n ${variant.placement === 'dialog' &&\n css`\n border-radius: calc(${formControlBorderRadius} * ${baseBorderRadius});\n `}\n\n ${isInUtilities(variant) &&\n !fullScreen &&\n css`\n min-height: 3rem;\n max-width: 31.25rem;\n box-shadow: 0 -1rem 1rem ${palette['app-background']};\n border-radius: ${cardBorderRadius} ${cardBorderRadius} 0 0;\n position: fixed;\n inset-block-end: var(--appshell-bottom-offset, 0);\n inset-inline-end: calc(2 * ${spacing});\n z-index: calc(${zIndex.drawer} + 1);\n width: 25rem;\n\n ${previewActive &&\n css`\n @media (min-width: ${breakpoints.md}) {\n margin-inline-end: min(var(--resize-drawer-width), ${resizeDrawerMaxWidth});\n }\n `}\n\n ${variant.state === 'minimized' &&\n css`\n height: 3rem;\n `}\n `}\n\n /*\n ~85% of Utilities height and fixed height if screen size less than md and devices with coarse pointer\n FIXME: This is a stopgap to address issue in Android web views via React Native where VH units do not work\n */\n ${((isInUtilities(variant) && variant.state === 'maximized') || !isInUtilities(variant)) &&\n !fullScreen &&\n css`\n height: calc(0.85 * var(--case-view-height, 95vh));\n @media (pointer: coarse) and (max-width: ${breakpoints.md}) {\n height: 40rem;\n }\n `}\n\n ${variant.placement === 'fullpage' &&\n css`\n ${simplifiedAgent\n ? css`\n transition: height 0.6s cubic-bezier(0.4, 0, 0.6, 1);\n height: var(--content-height-in-agent, var(--content-height-in-view, 100vh));\n `\n : css`\n height: var(--content-height-in-view, 100vh);\n `}\n `}\n\n ${isCompact &&\n css`\n height: ${simplifiedAgent ? 'var(--compact-height, auto)' : '100%'};\n max-height: ${simplifiedAgent\n ? 'var(--content-height-in-agent, var(--content-height-in-view, 100vh))'\n : 'var(--content-height-in-view, 100vh)'};\n\n ${StyledMessagesContainer} {\n margin-block-end: 0;\n }\n `}\n\n ${fullScreen &&\n css`\n height: 100vh;\n border-radius: 0;\n `}\n\n ${isPortalAgent &&\n css`\n height: 100%;\n min-height: 0;\n border-radius: 0;\n `}\n\n ${StyledErrorState} {\n ${StyledText} {\n color: ${agentForegroundColor};\n }\n }\n\n ${StyledFileList} {\n color: ${palette['foreground-color']};\n }\n `;\n }\n);\n\nStyledGenAICoachContainer.defaultProps = defaultThemeProp;\n\nexport const StyledGenAIOptionsMenu = styled(MenuButton)(({\n theme: {\n base: { 'font-size': fontSize, 'font-scale': fontScale, 'font-weight': fontWeight },\n components: {\n agent: { ai }\n }\n }\n}) => {\n const { l } = calculateFontSize(fontSize, fontScale);\n return css`\n color: inherit;\n ${StyledIcon}:first-child {\n color: ${ai};\n }\n ${StyledText} {\n font-weight: ${fontWeight['semi-bold']};\n font-size: ${l};\n }\n `;\n});\n\nStyledGenAIOptionsMenu.defaultProps = defaultThemeProp;\n\nexport const StyledMenuSuggestions = styled(MenuButton)(({\n theme: {\n base: { 'border-radius': baseBorderRadius, spacing },\n components: {\n button: { 'border-radius': borderRadius }\n }\n }\n}) => {\n return css`\n padding: calc(0.75 * ${spacing});\n border-radius: calc(${baseBorderRadius} * ${borderRadius});\n `;\n});\n\nStyledMenuSuggestions.defaultProps = defaultThemeProp;\n\nexport const StyledDisclaimerText = styled(Text)<{ inFullPage: boolean }>(({\n inFullPage,\n theme: {\n base: { 'font-size': fontSize, 'font-scale': fontScale, spacing, animation }\n }\n}) => {\n const systemFontSize = calculateFontSize(fontSize, fontScale).xs;\n return css`\n @keyframes disclaimer-fade-in {\n from {\n opacity: 0;\n }\n to {\n opacity: 0.7;\n }\n }\n font-size: ${systemFontSize};\n margin-block-start: ${spacing};\n ${inFullPage &&\n css`\n padding-block-end: calc(2 * ${spacing});\n `}\n opacity: 0.7;\n animation: disclaimer-fade-in ${animation.speed} ${animation.timing.ease} both;\n @media (prefers-reduced-motion: reduce) {\n animation-duration: 1ms;\n }\n `;\n});\n\nStyledDisclaimerText.defaultProps = defaultThemeProp;\n\nexport const StyledFlexWrapper = styled.div<{ isExpanded?: boolean }>(\n ({ isExpanded }) => css`\n height: ${isExpanded ? 'auto' : '100%'};\n overflow-y: auto;\n position: relative;\n\n ${isExpanded &&\n css`\n flex: 1 1 0;\n min-height: 0;\n `}\n `\n);\n\nStyledFlexWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledGridContainer = styled.div<{ conversationHistory: boolean }>(\n ({ theme: { base }, conversationHistory }) => {\n return css`\n height: 100%;\n min-height: 0;\n ${conversationHistory &&\n css`\n margin: calc(2 * ${base.spacing});\n border-radius: ${base['border-radius']};\n `}\n `;\n }\n);\n\nStyledGridContainer.defaultProps = defaultThemeProp;\n\nexport const StyledInitialMessageContainer = styled.div(() => {\n return css`\n ${StyledFormField} {\n width: 100%;\n max-width: var(--message-container-width);\n }\n `;\n});\n\nStyledInitialMessageContainer.defaultProps = defaultThemeProp;\n\nexport const StyledBannerSalutationBlock = styled.div<{ isExpanded?: boolean }>(\n ({ isExpanded }) => css`\n transition:\n opacity 0.45s ease,\n transform 0.45s ease;\n ${isExpanded &&\n css`\n opacity: 0;\n transform: translateY(-1.5rem);\n pointer-events: none;\n `}\n `\n);\nStyledBannerSalutationBlock.defaultProps = defaultThemeProp;\n\nexport const StyledInputContainer = styled(Flex)(({\n theme: {\n base: { spacing }\n }\n}) => {\n return css`\n margin-block-end: ${spacing};\n margin-inline: calc(2 * ${spacing});\n align-items: center;\n\n ${StyledFormField}, ${StyledComposerSection} {\n width: 100%;\n max-width: var(--message-container-width);\n }\n `;\n});\n\nStyledInputContainer.defaultProps = defaultThemeProp;\n\nexport const StyledStickyComposer = styled.div(\n ({\n theme: {\n base: { spacing },\n components: {\n agent: { background: agentBackground }\n }\n }\n }) => {\n return css`\n position: sticky;\n top: 0;\n z-index: 2;\n flex-shrink: 0;\n background: ${agentBackground};\n padding-block: calc(2 * ${spacing});\n\n ${StyledInputContainer} {\n margin-block-end: 0;\n }\n `;\n }\n);\n\nStyledStickyComposer.defaultProps = defaultThemeProp;\n\nexport const StyledSuggestion = styled(Button)(({\n theme: {\n base: { 'border-radius': borderRadius, spacing }\n }\n}) => {\n return css`\n width: fit-content;\n max-width: 100%;\n padding: ${spacing};\n white-space: normal;\n word-break: break-word;\n text-align: start;\n border-start-start-radius: calc(1.25 * ${borderRadius});\n border-start-end-radius: calc(0.5 * ${borderRadius});\n border-end-start-radius: calc(1.25 * ${borderRadius});\n border-end-end-radius: calc(1.25 * ${borderRadius});\n\n & + & {\n margin-inline-start: 0;\n }\n `;\n});\n\nStyledSuggestion.defaultProps = defaultThemeProp;\n\nexport const StyledSuggestionsContainer = styled.div(\n ({\n theme: {\n base: { spacing }\n }\n }) => {\n return css`\n margin-block-start: calc(1.5 * ${spacing});\n `;\n }\n);\n\nStyledSuggestionsContainer.defaultProps = defaultThemeProp;\n\nexport const StyledMessage = styled.p<{ simplified?: boolean }>(({ theme, simplified }) => {\n return css`\n margin-block-start: calc(0.5 * ${theme.base.spacing});\n width: 100%;\n min-width: 0;\n overflow-wrap: break-word;\n\n ${simplified &&\n css`\n padding-inline-start: calc(2.5rem + ${theme.base.spacing});\n `}\n\n ${StyledEditorContainer} {\n padding: 0;\n\n table {\n display: block;\n max-width: 100%;\n overflow-x: auto;\n }\n\n span {\n animation: ${animations.reveal} 1s forwards;\n }\n }\n `;\n});\n\nStyledMessage.defaultProps = defaultThemeProp;\n\nexport const StyledMessageSender = styled(Text)(({\n theme: {\n base: { 'font-size': fontSize, 'font-scale': fontScale, 'font-weight': fontWeight }\n }\n}) => {\n return css`\n font-size: ${calculateFontSize(fontSize, fontScale).xl};\n font-weight: ${fontWeight['semi-bold']};\n opacity: 0.7;\n `;\n});\n\nStyledMessageSender.defaultProps = defaultThemeProp;\n\nexport const StyledUserMessage = styled.li(\n ({\n theme: {\n base: { 'border-radius': borderRadius, spacing },\n components: {\n agent: {\n 'user-message': {\n background: userMessageBackground,\n 'foreground-color': userMessageForegroundColor\n }\n }\n }\n }\n }) => {\n const foregroundColorForUserMessage = calculateForegroundColor(\n userMessageBackground,\n userMessageForegroundColor\n );\n\n return css`\n overflow-wrap: break-word;\n background: ${userMessageBackground};\n color: ${foregroundColorForUserMessage};\n margin-inline-start: calc(4 * ${spacing});\n margin-block-end: calc(0.5 * ${spacing});\n padding: calc(0.5 * ${spacing});\n border-start-start-radius: calc(1.25 * ${borderRadius});\n border-start-end-radius: calc(0.5 * ${borderRadius});\n border-end-start-radius: calc(1.25 * ${borderRadius});\n border-end-end-radius: calc(1.25 * ${borderRadius});\n `;\n }\n);\n\nStyledUserMessage.defaultProps = defaultThemeProp;\n\nexport const StyledSystemMessage = styled.li<{ stopped?: boolean }>(\n ({\n stopped,\n theme: {\n base: { spacing, 'font-size': fontSize, 'font-scale': fontScale, 'font-weight': fontWeight },\n components: {\n agent: { 'foreground-color': agentForegroundColor, background: agentBackground }\n }\n }\n }) => {\n const systemFontSize = calculateFontSize(fontSize, fontScale).xs;\n const foregroundColorForSystemMessage = calculateForegroundColor(\n agentBackground,\n agentForegroundColor\n );\n\n return css`\n display: flex;\n align-items: center;\n gap: ${spacing};\n overflow-wrap: break-word;\n font-size: ${systemFontSize};\n color: ${foregroundColorForSystemMessage};\n opacity: 0.7;\n margin-block: calc(2 * ${spacing});\n ${stopped &&\n css`\n font-weight: ${fontWeight.normal};\n `}\n\n &::before,\n &::after {\n content: '';\n flex: 1;\n border-block-start: 0.0625rem solid ${foregroundColorForSystemMessage};\n opacity: 0.7;\n }\n `;\n }\n);\n\nStyledSystemMessage.defaultProps = defaultThemeProp;\n\nexport const StyledMessagesList = styled.ul<{ simplified?: boolean }>(\n ({\n theme: {\n base: { shadow, spacing }\n },\n simplified\n }) => {\n return css`\n padding-block-start: ${simplified ? `calc(4 * ${spacing})` : spacing};\n list-style-type: none;\n align-self: center;\n max-width: var(--message-container-width);\n width: 100%;\n margin-block-start: var(--messages-list-margin-start, auto);\n min-height: var(--stream-buffer, auto);\n\n & > li {\n max-width: calc(100% - calc(4.5 * ${spacing}));\n }\n\n & > li[from='user'] {\n margin-inline-start: auto;\n margin-block-end: ${spacing};\n }\n\n & > li[type='message'] {\n &:focus-visible {\n outline: none;\n box-shadow: ${shadow.focus};\n }\n margin-block-end: ${spacing};\n }\n\n & > ${StyledSystemMessage} {\n max-width: 100%;\n }\n\n & > li:has(${StyledSuggestionsContainer}) {\n max-width: 100%;\n }\n `;\n }\n);\n\nStyledMessagesList.defaultProps = defaultThemeProp;\n\nexport const StyledHistoryContainer = styled(Flex)<{ inFullPage: boolean }>(({\n theme,\n inFullPage\n}) => {\n const { background, 'foreground-color': foregroundColor } = theme.components.agent.history;\n const foreground = calculateForegroundColor(background, foregroundColor);\n return css`\n height: 100%;\n min-height: 0;\n background: ${background};\n color: ${foreground};\n border-radius: ${theme.components.card['border-radius']};\n box-shadow: ${theme.base.shadow.low};\n\n ${!inFullPage &&\n css`\n margin-inline: calc(1.5 * ${theme.base.spacing});\n `}\n\n ${StyledEmptyState}, ${StyledErrorState} {\n justify-content: flex-start;\n padding-inline: calc(2 * ${theme.base.spacing});\n }\n `;\n});\n\nStyledHistoryContainer.defaultProps = defaultThemeProp;\n\nexport const StyledList = styled(Flex)(\n ({ theme }) => css`\n height: 100%;\n overflow-y: auto;\n margin-block-end: calc(2 * ${theme.base.spacing});\n `\n);\n\nStyledList.defaultProps = defaultThemeProp;\n\nexport const StyledInnerList = styled.ul(\n ({ theme }) => css`\n padding-inline: calc(2 * ${theme.base.spacing});\n\n ${StyledText} {\n font-weight: ${theme.base['font-weight'].normal};\n }\n `\n);\n\nStyledInnerList.defaultProps = defaultThemeProp;\n\nexport const StyledHistorySummaryListItem = styled(SummaryItem)(({ theme }) => {\n const hoverColor = tryCatch(() =>\n mix(0.95, theme.components.agent.history.background, theme.base.palette.interactive)\n );\n return css`\n padding-inline: calc(2 * ${theme.base.spacing});\n padding-block: ${theme.base.spacing};\n\n &:hover {\n background-color: ${hoverColor};\n border-radius: calc(3 * ${theme.base.spacing});\n cursor: pointer;\n }\n &[aria-selected='true'] {\n background-color: ${theme.components.agent.history.item['selected-background']};\n border-radius: calc(3 * ${theme.base.spacing});\n }\n &:focus-visible {\n border: 0.0625rem solid ${theme.base.palette.interactive};\n }\n `;\n});\n\nStyledHistorySummaryListItem.defaultProps = defaultThemeProp;\n\nexport const StyledLoadingItem = styled.li`\n ${StyledProgress} {\n margin: 0;\n }\n`;\n\nexport const StyledGroupHeader = styled.div(({ theme }) => {\n return css`\n padding-inline: calc(2 * ${theme.base.spacing});\n padding-block-start: calc(2 * ${theme.base.spacing});\n padding-block-end: calc(0.5 * ${theme.base.spacing});\n font-weight: ${theme.base['font-weight']['semi-bold']};\n `;\n});\n\nStyledGroupHeader.defaultProps = defaultThemeProp;\n\nexport const StyledErrorContainer = styled.div(({ theme }) => {\n return css`\n color: ${theme.base.palette.urgent};\n `;\n});\n\nStyledErrorContainer.defaultProps = defaultThemeProp;\n\nexport const StyledInput = styled.input(() => {\n return css`\n display: none;\n `;\n});\n\nexport const StyledAttachmentsList = styled(FileList)(({ theme }) => {\n return css`\n padding: ${theme.base.spacing};\n `;\n});\n\nStyledAttachmentsList.defaultProps = defaultThemeProp;\n\nexport const StyledGuidedSuggestions = styled(MenuButton)`\n width: 100%;\n max-width: var(--message-container-width);\n > span {\n justify-content: center;\n }\n`;\n\nexport const StyledAgentIcon = styled.svg`\n width: 3rem;\n height: 3rem;\n`;\n\nStyledAgentIcon.defaultProps = defaultThemeProp;\n\nexport const StyledGenAITextArea = styled(TextArea)<{ simplified?: boolean }>(({\n theme: { components, base },\n simplified\n}) => {\n return css`\n border: none;\n box-shadow: none;\n min-height: calc(1.75 * ${components.input.height});\n max-height: 6rem;\n overflow-y: auto;\n padding-block-end: 0;\n ${simplified &&\n css`\n padding: calc(2 * ${base.spacing});\n `}\n &:focus:not([disabled]) {\n border: none;\n box-shadow: none;\n background-color: transparent;\n }\n `;\n});\n\nStyledGenAITextArea.defaultProps = defaultThemeProp;\n\nexport const StyledSendButton = styled(Button)<{ simplified?: boolean }>(({\n theme: {\n base: { 'border-radius': baseBorderRadius },\n components: {\n 'form-control': { 'border-radius': formControlBorderRadius }\n }\n },\n simplified\n}) => {\n const radiusMultiplier = simplified ? 0.5 : 1;\n return css`\n border-radius: calc(${baseBorderRadius} * ${formControlBorderRadius} * ${radiusMultiplier});\n margin-inline-start: auto;\n `;\n});\n\nStyledSendButton.defaultProps = defaultThemeProp;\n\nexport const StyledStopGeneratingButton = styled(Button)<{ simplified?: boolean }>(({\n theme: {\n base: { 'border-radius': baseBorderRadius },\n components: {\n 'form-control': { 'border-radius': formControlBorderRadius }\n }\n },\n simplified\n}) => {\n const radiusMultiplier = simplified ? 0.5 : 1;\n return css`\n border-radius: calc(${baseBorderRadius} * ${formControlBorderRadius} * ${radiusMultiplier});\n margin-inline-start: auto;\n `;\n});\n\nStyledStopGeneratingButton.defaultProps = defaultThemeProp;\n\nexport const StyledInitialMessageGrid = styled.div`\n max-width: var(--message-container-width);\n width: 100%;\n`;\n\nexport const StyledInitialMessageButton = styled(Button)(({\n theme: {\n base: { spacing }\n }\n}) => {\n return css`\n white-space: normal;\n text-align: left;\n min-width: unset;\n padding-block: ${spacing};\n padding-inline: calc(2 * ${spacing});\n align-items: start;\n\n & + & {\n margin-inline-start: 0;\n }\n `;\n});\n\nStyledInitialMessageButton.defaultProps = defaultThemeProp;\n\nexport const StyledInitialMessageText = styled.span`\n ${lineClamp(3)};\n`;\n\nexport const StyledGenAIAvatar = styled(Avatar)(({\n theme: {\n components: {\n agent: {\n 'coach-message': {\n avatar: { background: avatarBackground, 'foreground-color': avatarForegroundColor }\n }\n }\n }\n }\n}) => {\n return css`\n background: ${avatarBackground};\n color: ${avatarForegroundColor};\n `;\n});\n\nStyledGenAIAvatar.defaultProps = defaultThemeProp;\n\nexport const StyledGenAIFooter = styled.div`\n width: 100%;\n max-width: var(--message-container-width);\n`;\n\nexport const StyledToolMessage = styled.p(\n ({\n theme: {\n base: {\n spacing,\n palette: { 'border-line': borderLine }\n }\n }\n }) => {\n return css`\n border-block-end: 0.125rem solid ${borderLine};\n padding: calc(2 * ${spacing});\n `;\n }\n);\n\nStyledToolMessage.defaultProps = defaultThemeProp;\n\nexport const StyledToolMessageContainer = styled.div(\n ({\n theme: {\n base: {\n spacing,\n 'border-radius': borderRadius,\n palette: { 'border-line': borderLine }\n }\n }\n }) => {\n return css`\n border: 0.125rem solid ${borderLine};\n border-radius: min(calc(2 * ${borderRadius}), 1rem);\n margin-block: ${spacing};\n `;\n }\n);\n\nStyledToolMessageContainer.defaultProps = defaultThemeProp;\n\nexport const StyledConfirmationMsg = styled(RichTextViewer)(\n ({\n theme: {\n base,\n components: {\n 'form-control': {\n ':read-only': { 'background-color': readOnlyBackgroundColor }\n }\n }\n }\n }) => `\n padding: 0;\n background-color: ${readOnlyBackgroundColor};\n border-radius: calc(0.5 * ${base['border-radius']});\n`\n);\n\nStyledConfirmationMsg.defaultProps = defaultThemeProp;\n\nexport const StyledActionsContainer = styled.div(\n () => css`\n margin-inline-start: auto;\n\n && button {\n margin-inline-start: 0;\n }\n `\n);\n\nStyledActionsContainer.defaultProps = defaultThemeProp;\n\nexport const StyledScrollButton = styled(Button)(({ theme }) => {\n return css`\n position: absolute;\n bottom: calc(var(--composer-height, 0rem) + calc(5 * ${theme.base.spacing}));\n width: fit-content;\n align-self: center;\n z-index: 1;\n box-shadow: ${theme.base.shadow.high};\n `;\n});\n\nStyledScrollButton.defaultProps = defaultThemeProp;\n\nexport const ProgressAngleStyle = createGlobalStyle`\n @property --progress-border-angle {\n syntax: \"<angle>\";\n inherits: false;\n initial-value: 0deg;\n }\n`;\n\nconst progressBorderSpin = keyframes`\n to { --progress-border-angle: 360deg; }\n`;\n\nexport const StyledProgressContainer = styled.div(({ theme }) => {\n const aiColor = isSolidColor(theme.components.agent.ai)\n ? theme.components.agent.ai\n : theme.base.colors.purple.dark;\n const aiTransparent = transparentize(0.85, aiColor);\n const borderWidth = '0.0625rem';\n\n return css`\n position: relative;\n border-radius: calc(2 * ${theme.base.spacing});\n border-start-start-radius: calc(0.5 * ${theme.base.spacing});\n width: fit-content;\n\n &::before {\n content: '';\n position: absolute;\n inset: -${borderWidth};\n border-radius: calc(1.875 * ${theme.base.spacing} + ${borderWidth});\n border-start-start-radius: calc(0.375 * ${theme.base.spacing} + ${borderWidth});\n padding: ${borderWidth};\n background: conic-gradient(\n from var(--progress-border-angle, 0deg) in oklab,\n ${aiTransparent} 0%,\n ${aiTransparent} 10%,\n ${aiColor} 50%,\n ${aiTransparent} 90%,\n ${aiTransparent} 100%\n );\n -webkit-mask:\n linear-gradient(#000000 0 0) content-box,\n linear-gradient(#000000 0 0);\n -webkit-mask-composite: xor;\n mask:\n linear-gradient(#000000 0 0) content-box,\n linear-gradient(#000000 0 0);\n mask-composite: exclude;\n pointer-events: none;\n animation: ${progressBorderSpin} 1.25s linear infinite;\n }\n `;\n});\n\nStyledProgressContainer.defaultProps = defaultThemeProp;\n\nexport const StyledProgressContent = styled.div(({ theme }) => {\n return css`\n background: ${theme.components.agent.background};\n border-radius: calc(2 * ${theme.base.spacing});\n border-start-start-radius: calc(0.5 * ${theme.base.spacing});\n padding: calc(2 * ${theme.base.spacing});\n\n ${StyledProgressRing} {\n width: ${theme.components.icon.size.s};\n }\n `;\n});\n\nStyledProgressContent.defaultProps = defaultThemeProp;\n\nexport const StyledProgressText = styled(Text)(({ theme }) => {\n return css`\n color: ${theme.components.agent.ai};\n `;\n});\n\nStyledProgressText.defaultProps = defaultThemeProp;\n\nexport const StyledActionContainer = styled(Flex)`\n && {\n display: flex;\n }\n\n && > button:first-child:not(:last-child) {\n margin-inline-end: 0;\n }\n margin-inline-end: auto;\n`;\n\nexport const StyledToolCandidatesModal = styled(Modal)(({ theme }) => {\n return css`\n max-width: ${theme.base['content-width'].xl};\n `;\n});\n\nStyledToolCandidatesModal.defaultProps = defaultThemeProp;\n\nexport const StyledPortalSplitContainer = styled.div`\n container-type: inline-size;\n container-name: portal-split;\n display: flex;\n width: 100%;\n min-height: calc(100dvh - var(--appshell-total-offset, 0rem));\n`;\n\nStyledPortalSplitContainer.defaultProps = defaultThemeProp;\n\nconst portalAgentRegionBasis = (agentVisible: boolean, mainVisible: boolean): string => {\n if (!agentVisible) return '0%';\n if (!mainVisible) return '100%';\n return `clamp(${portalAgentMinWidth}, var(--region-a-width, ${portalAgentDefaultWidth}), calc(100% - ${portalAgentMinWidth}))`;\n};\n\nexport const StyledPortalAgentRegion = styled.aside<{\n agentVisible: boolean;\n mainVisible: boolean;\n}>(\n ({ agentVisible, mainVisible, theme }) => css`\n flex: 0 0 ${portalAgentRegionBasis(agentVisible, mainVisible)};\n min-width: 0;\n transition: flex-basis calc(${theme.base.animation.speed} / 2)\n ${theme.base.animation.timing.ease};\n will-change: flex-basis;\n border-inline-end: 0.0625rem solid ${theme.base.palette['border-line']};\n position: sticky;\n top: var(--appshell-top-offset, 0);\n height: calc(100dvh - var(--appshell-total-offset, 0rem));\n align-self: flex-start;\n\n @container portal-split (min-width: ${theme.base.breakpoints.xl}) {\n ${agentVisible &&\n mainVisible &&\n css`\n flex-basis: clamp(\n ${portalAgentMinWidth},\n var(--region-a-width, 25%),\n calc(100% - ${portalAgentMinWidth})\n );\n `}\n }\n\n ${!agentVisible &&\n css`\n overflow: hidden;\n `}\n `\n);\n\nStyledPortalAgentRegion.defaultProps = defaultThemeProp;\n\nexport const StyledPortalMainRegion = styled.div`\n flex: 1 1 0%;\n min-width: 0;\n min-height: calc(100dvh - var(--appshell-total-offset, 0rem));\n\n &[inert] {\n display: none;\n }\n`;\n\nStyledPortalMainRegion.defaultProps = defaultThemeProp;\n\nexport const StyledPortalSeparator = styled.div`\n position: sticky;\n top: var(--appshell-top-offset, 0);\n align-self: flex-start;\n flex-shrink: 0;\n height: calc(100dvh - var(--appshell-total-offset, 0rem));\n z-index: 1;\n`;\n\nStyledPortalSeparator.defaultProps = defaultThemeProp;\n\nexport const StyledSuggestionCardsView = styled.div(\n ({\n theme: {\n base: {\n spacing,\n 'font-size': fontSize,\n 'font-scale': fontScale,\n 'font-weight': fontWeight,\n transparency,\n 'content-width': contentWidth\n },\n components: {\n 'form-control': { 'border-color': formControlBorderColor }\n }\n }\n }) => {\n const cardFontSize = calculateFontSize(fontSize, fontScale).xxs;\n const columnTrack = `clamp(2.5rem, var(--tile-col-track, 2.5rem), 5rem) minmax(20ch, ${contentWidth.sm}) 1fr`;\n const singleCardSize = `calc(${contentWidth.sm} + 8.875rem)`;\n\n return css`\n max-width: 95rem;\n width: 100%;\n margin-inline: auto;\n\n [data-testid='gallery'] {\n min-height: 0;\n max-height: none;\n }\n\n .bContainer {\n height: auto !important;\n }\n\n && .grid-container {\n position: static;\n gap: calc(2 * ${spacing});\n grid-auto-rows: minmax(2.75rem, 1fr);\n\n @container (min-width: calc(1.25 * ${singleCardSize})) {\n grid-template-columns: repeat(2, ${columnTrack});\n }\n\n @container (min-width: calc(2 * ${singleCardSize})) {\n grid-template-columns: repeat(3, ${columnTrack});\n }\n\n @container (min-width: calc(3 * ${singleCardSize})) {\n grid-template-columns: repeat(4, ${columnTrack});\n }\n }\n\n && ${StyledCard} {\n background: transparent;\n }\n\n ${StyledFullscreenButton} {\n display: none;\n }\n\n ${StyledHeader} {\n ${StyledText} {\n font-size: ${cardFontSize};\n }\n }\n\n ${StyledSingleField} {\n font-size: ${cardFontSize};\n opacity: ${transparency['transparent-2']};\n }\n\n ${StyledSelectionCard} {\n border-color: ${formControlBorderColor};\n\n &:focus,\n &:not([data-main-focus]):focus-within {\n border-color: transparent;\n }\n\n ${StyledTileContent} {\n font-size: ${cardFontSize};\n font-weight: ${fontWeight['semi-bold']};\n }\n }\n `;\n }\n);\n\nStyledSuggestionCardsView.defaultProps = defaultThemeProp;\n\nexport const StyledAISuggestedBadge = styled(Flex)(({\n theme: {\n base: { 'font-size': fontSize, 'font-scale': fontScale, transparency }\n }\n}) => {\n const systemFontSize = calculateFontSize(fontSize, fontScale).xxs;\n return css`\n ${StyledText} {\n font-size: ${systemFontSize};\n }\n opacity: ${transparency['transparent-2']};\n `;\n});\n\nStyledAISuggestedBadge.defaultProps = defaultThemeProp;\n\nexport const StyledSuggestionCardsBottomHalf = styled(Flex)(({\n theme: {\n base: { spacing }\n }\n}) => {\n return css`\n min-height: 50%;\n flex-shrink: 0;\n margin-block-start: calc(2.5 * ${spacing});\n `;\n});\n\nStyledSuggestionCardsBottomHalf.defaultProps = defaultThemeProp;\n\nexport const StyledCaseWorkflowBanner = styled(Flex)(({ theme }) => {\n const background = theme.components['case-view'].header.background;\n const foreground = calculateForegroundColor(\n background,\n theme.components['case-view'].header['foreground-color']\n );\n\n return css`\n @keyframes case-header-fade-in {\n from {\n opacity: 0;\n transform: translateY(calc(${theme.base.spacing} * -1.5)) scale(0.98);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n }\n margin-inline: calc(2 * ${theme.base.spacing});\n margin-block: ${theme.base.spacing} 0;\n padding: calc(${theme.base.spacing} * 0.75) ${theme.base.spacing};\n background: ${background};\n color: ${foreground};\n border-radius: ${theme.base['border-radius']};\n box-shadow: ${theme.base.shadow.low};\n animation: case-header-fade-in ${theme.base.animation.speed} ${theme.base.animation.timing.ease}\n both;\n `;\n});\n\nStyledCaseWorkflowBanner.defaultProps = defaultThemeProp;\n\nexport const StyledCaseLaunchButton = styled(Button)(({ theme }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: ${theme.base.spacing};\n min-width: 0;\n flex: 1 1 0;\n padding: 0 calc(${theme.base.spacing} * 0.5);\n font-size: ${fontSize.s};\n font-weight: ${theme.base['font-weight']['semi-bold']};\n text-align: start;\n `;\n});\n\nStyledCaseLaunchButton.defaultProps = defaultThemeProp;\n\nexport const StyledCaseIconWrapper = styled.span`\n flex-shrink: 0;\n display: flex;\n align-items: center;\n\n ${StyledIconShape} {\n width: 1.5rem;\n height: 1.5rem;\n }\n`;\n\nStyledCaseIconWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledCaseTitleText = styled.span`\n display: block;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 0;\n flex: 1 1 0;\n`;\n\nStyledCaseTitleText.defaultProps = defaultThemeProp;\n\nexport const StyledProgressLabel = styled.span(({ theme }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n flex: 0 1 auto;\n max-width: 40%;\n margin-inline-start: auto;\n font-size: ${fontSize.xxs};\n font-weight: ${theme.base['font-weight'].normal};\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 0;\n `;\n});\n\nStyledProgressLabel.defaultProps = defaultThemeProp;\n\nexport const StyledWorkflowInfoDialog = styled(InfoDialog)(({ theme }) => {\n return css`\n &:not(${StyledTouchDialog}) {\n width: ${theme.base['content-width'].sm};\n max-height: 80vh;\n }\n `;\n});\n\nStyledWorkflowInfoDialog.defaultProps = defaultThemeProp;\n\nexport const StyledStageList = styled.ol(({ theme }) => {\n return css`\n list-style: none;\n padding: calc(${theme.base.spacing} * 0.5);\n overflow-y: auto;\n min-height: 0;\n\n > li:not(:last-child) {\n margin-block-end: calc(${theme.base.spacing} * 0.5);\n }\n `;\n});\n\nStyledStageList.defaultProps = defaultThemeProp;\n\nexport const StyledStageButton = styled(Button)<{ expanded?: boolean }>(({ theme, expanded }) => {\n return css`\n width: 100%;\n justify-content: start;\n color: ${theme.base.palette['foreground-color']};\n gap: calc(${theme.base.spacing} * 0.5);\n\n ${StyledIcon} {\n transition: transform ${theme.base.animation.speed} ${theme.base.animation.timing.ease};\n flex-shrink: 0;\n transform: rotateZ(${expanded ? '0deg' : '-90deg'});\n }\n `;\n});\n\nStyledStageButton.defaultProps = defaultThemeProp;\n\nexport const StyledStepsContainer = styled.div<{\n stageStatus?: 'active' | 'completed' | 'not-started';\n}>(({ theme, stageStatus }) => {\n const isInactive = stageStatus === 'completed' || stageStatus === 'not-started';\n const { m: stepMarkerSize } = calculateFontSize(\n theme.base['font-size'],\n theme.base['font-scale']\n );\n\n return css`\n padding-inline-start: calc(${theme.base.spacing} * 2);\n padding-block: calc(${theme.base.spacing} * 0.5);\n\n ${isInactive &&\n css`\n ${StepMarker}[aria-current='step']::before {\n width: ${stepMarkerSize};\n height: ${stepMarkerSize};\n }\n\n ${StyledStepText} {\n font-weight: ${theme.base['font-weight'].normal};\n font-size: inherit;\n }\n `}\n\n ${stageStatus === 'not-started' &&\n css`\n ${StepMarker}[aria-current='step']::before {\n background: ${theme.base.palette['primary-background']};\n border: calc(2 * ${theme.components['form-control']['border-width']}) solid\n ${theme.components['form-control']['border-color']};\n }\n `}\n `;\n});\n\nStyledStepsContainer.defaultProps = defaultThemeProp;\n\nexport const StyledCaseViewIcon = styled(Icon)(({ theme, foreground, background }) => {\n const meetsContrast =\n foreground && background\n ? tryCatch(\n () => meetsContrastGuidelines(foreground, background).AA,\n () => false\n )\n : true;\n\n return css`\n --brand-accent: ${theme.base.palette['brand-accent']};\n --gradient-start: oklch(from var(--brand-accent) calc(l - 0.3) calc(c * 1.5) h);\n --gradient-mid: oklch(from var(--brand-accent) l c h);\n --gradient-end: oklch(from var(--brand-accent) calc(l + 0.5) calc(c * 1.5) h);\n\n ${!meetsContrast\n ? css`\n color: inherit;\n background: transparent;\n `\n : null}\n\n ${theme.components['case-view'].icon.color !== 'auto'\n ? css`\n color: ${theme.components['case-view'].icon.color};\n `\n : null}\n\n ${theme.components['case-view'].icon.background !== 'auto'\n ? css`\n background: ${theme.components['case-view'].icon.background};\n `\n : null}\n\n ${theme.components['case-view'].icon['box-shadow'] !== 'auto'\n ? css`\n box-shadow: ${theme.components['case-view'].icon['box-shadow']};\n `\n : null}\n `;\n});\n\nStyledCaseViewIcon.defaultProps = defaultThemeProp;\n\nexport const StyledCaseViewImage = styled(Image)`\n max-height: 100%;\n`;\n\nStyledCaseViewImage.defaultProps = defaultThemeProp;\n\nexport const StyledActiveCaseButton = styled.button(({ theme }) => {\n const background = theme.components['case-view'].header.background;\n const foreground = calculateForegroundColor(\n background,\n theme.components['case-view'].header['foreground-color']\n );\n const hoverBg = tryCatch(\n () => darken(0.05, background),\n () => background\n );\n\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n border: none;\n outline: none;\n cursor: pointer;\n font-size: ${fontSize.xs};\n font-weight: ${theme.base['font-weight']['semi-bold']};\n padding: calc(${theme.base.spacing} * 0.5) ${theme.base.spacing};\n border-radius: ${theme.base['border-radius']};\n background: ${background};\n color: ${foreground};\n box-shadow: ${theme.base.shadow.low};\n\n &:hover {\n background: ${hoverBg};\n }\n\n &:focus-visible {\n box-shadow: ${theme.base.shadow.focus};\n }\n `;\n});\n\nStyledActiveCaseButton.defaultProps = defaultThemeProp;\n\nexport const StyledActiveCasesList = styled(Flex)(({ theme }) => {\n return css`\n overflow-y: auto;\n padding: calc(${theme.base.spacing} * 0.5) calc(${theme.base.spacing} * 0.5);\n min-height: 0;\n `;\n});\n\nStyledActiveCasesList.defaultProps = defaultThemeProp;\n\nexport const StyledActiveCaseName = styled(Button)(({ theme }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n justify-content: start;\n font-size: ${fontSize.s};\n font-weight: ${theme.base['font-weight']['semi-bold']};\n padding: 0;\n width: 100%;\n text-align: start;\n `;\n});\n\nStyledActiveCaseName.defaultProps = defaultThemeProp;\n\nexport const StyledActiveCaseStages = styled.div(({ theme }) => {\n return css`\n ${StyledStages} {\n border: ${theme.components.button['border-width']} solid ${theme.base.palette['border-line']};\n }\n `;\n});\n\nStyledActiveCaseStages.defaultProps = defaultThemeProp;\n\nexport const StyledSalutation = styled(Text)<{ simplified?: boolean }>(({ theme, simplified }) => {\n return css`\n text-align: center;\n overflow-wrap: break-word;\n word-break: break-word;\n font-size: ${simplified\n ? 'clamp(2.5rem, 2rem + 1vw, 3.5rem)'\n : 'clamp(1.5rem, 1.333rem + 0.052vw, 2rem)'};\n font-weight: ${theme.base['font-weight'].bold};\n `;\n});\n\nStyledSalutation.defaultProps = defaultThemeProp;\n\nexport const StyledSubHeading = styled(Text)(({ theme }) => {\n const { xxl } = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n return css`\n text-align: center;\n overflow-wrap: break-word;\n word-break: break-word;\n font-size: ${xxl};\n `;\n});\n\nStyledSubHeading.defaultProps = defaultThemeProp;\n\nexport const StyledQuestionnaireCard = styled.article(\n ({\n theme: {\n base: {\n spacing,\n palette: { 'border-line': borderLine }\n },\n components: {\n agent: {\n questionnaire: { background, 'foreground-color': foregroundColor }\n }\n }\n }\n }) => {\n const foreground = calculateForegroundColor(background, foregroundColor);\n\n return css`\n width: 100%;\n border: none;\n border-block-end: 0.0625rem solid ${borderLine};\n border-radius: 0;\n background: ${background};\n color: ${foreground};\n\n &&& ${StyledCardHeader} {\n padding-block-start: ${spacing};\n padding-inline-end: ${spacing};\n }\n\n &&& ${StyledCardFooter} {\n padding-block-end: ${spacing};\n }\n\n &&& ${StyledCardContent} {\n padding-block-end: ${spacing};\n }\n `;\n }\n);\n\nStyledQuestionnaireCard.defaultProps = defaultThemeProp;\n\nexport const StyledQuestionBlock = styled.fieldset`\n border: none;\n padding: 0;\n margin: 0;\n\n /* Let radio/checkbox labels stretch so the ComboBox can fill available width */\n label {\n width: 100%;\n }\n`;\n\nStyledQuestionBlock.defaultProps = defaultThemeProp;\n\nexport const StyledComboBoxWrapper = styled.div`\n min-width: 12rem;\n flex: 1;\n`;\n\nStyledComboBoxWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledSelectionCardGrid = styled.div<{ flexibleImages?: boolean }>(\n ({ theme, flexibleImages }) => css`\n overflow-x: auto;\n padding-block: calc(0.5 * ${theme.base.spacing});\n\n > ${StyledSelectionCard} {\n flex: 0 0 auto;\n min-width: ${theme.base['content-width'].xs};\n max-width: ${theme.base['content-width'].sm};\n\n ${flexibleImages &&\n css`\n grid-template-rows: minmax(2.5rem, 8.25rem) auto;\n `}\n }\n `\n);\n\nStyledSelectionCardGrid.defaultProps = defaultThemeProp;\n\nexport const StyledImageChoiceNavBar = styled(Flex)(({ theme }) => {\n return css`\n padding-block-start: calc(0.5 * ${theme.base.spacing});\n `;\n});\n\nStyledImageChoiceNavBar.defaultProps = defaultThemeProp;\n\nexport const StyledSelectionCardImageNumber = styled.span(({ theme }) => {\n return css`\n font-weight: ${theme.base['font-weight'].bold};\n `;\n});\n\nStyledSelectionCardImageNumber.defaultProps = defaultThemeProp;\n\nexport const StyledSelectionCardImageName = styled.span(({ theme }) => {\n return css`\n font-weight: ${theme.base['font-weight'].normal};\n font-style: italic;\n `;\n});\n\nStyledSelectionCardImageName.defaultProps = defaultThemeProp;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PortalAgentSplitView.d.ts","sourceRoot":"","sources":["../../../src/components/GenAICoach/PortalAgentSplitView.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;sGASjE,yBAAyB;;;
|
|
1
|
+
{"version":3,"file":"PortalAgentSplitView.d.ts","sourceRoot":"","sources":["../../../src/components/GenAICoach/PortalAgentSplitView.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;sGASjE,yBAAyB;;;AAmJ5B,wBAAiF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback, useEffect, useRef } from 'react';
|
|
2
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
3
3
|
import { remToPx, stripUnit } from 'polished';
|
|
4
4
|
import { useDirection, useTestIds, ResizeHandle, withTestIds, useI18n } from '@pega/cosmos-react-core';
|
|
5
5
|
import { portalAgentMinWidth, resizeDrawerKeyboardStep } from '@pega/cosmos-react-core/lib/styles/constants';
|
|
@@ -12,6 +12,12 @@ const PortalAgentSplitView = ({ testId, children, pagePanel, showAgentPanel, ini
|
|
|
12
12
|
const regionMinWidthPx = Number(stripUnit(remToPx(portalAgentMinWidth)));
|
|
13
13
|
const splitContainerRef = useRef(null);
|
|
14
14
|
const agentPanelRef = useRef(null);
|
|
15
|
+
const [agentPanelShown, setAgentPanelShown] = useState(showAgentPanel);
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
if (showAgentPanel) {
|
|
18
|
+
setAgentPanelShown(true);
|
|
19
|
+
}
|
|
20
|
+
}, [showAgentPanel]);
|
|
15
21
|
useEffect(() => {
|
|
16
22
|
const container = splitContainerRef.current;
|
|
17
23
|
if (!container || !initialWidth)
|
|
@@ -69,7 +75,7 @@ const PortalAgentSplitView = ({ testId, children, pagePanel, showAgentPanel, ini
|
|
|
69
75
|
const nextWidth = `${((newWidth / containerWidth) * 100).toFixed(4)}%`;
|
|
70
76
|
container.style.setProperty('--region-a-width', nextWidth);
|
|
71
77
|
}, [ltr, onResizeEnd, regionMinWidthPx, resizeDrawerKeyboardStep]);
|
|
72
|
-
return (_jsxs(StyledPortalSplitContainer, { ref: splitContainerRef, "data-testid": testIds.splitContainer, children: [_jsx(StyledPortalAgentRegion, { ref: agentPanelRef, agentVisible: showAgentPanel, mainVisible: pagePanel.visible, "aria-hidden": !showAgentPanel, inert: !showAgentPanel ? '' : undefined, children: children }), showAgentPanel && pagePanel.visible && (_jsx(StyledPortalSeparator, { children: _jsx(ResizeHandle, { onMouseDown: handleRegionResize, onKeyDown: handleRegionKeyboardResize, contextualLabel: t('resize_noun', [t('panel')]) }) })), _jsx(StyledPortalMainRegion, { "data-testid": testIds.mainRegion, "aria-hidden": !pagePanel.visible, inert: !pagePanel.visible ? '' : undefined, children: pagePanel.content })] }));
|
|
78
|
+
return (_jsxs(StyledPortalSplitContainer, { ref: splitContainerRef, "data-testid": testIds.splitContainer, children: [_jsx(StyledPortalAgentRegion, { ref: agentPanelRef, agentVisible: showAgentPanel, mainVisible: pagePanel.visible, "aria-hidden": !showAgentPanel, inert: !showAgentPanel ? '' : undefined, children: agentPanelShown && children }), showAgentPanel && pagePanel.visible && (_jsx(StyledPortalSeparator, { children: _jsx(ResizeHandle, { onMouseDown: handleRegionResize, onKeyDown: handleRegionKeyboardResize, contextualLabel: t('resize_noun', [t('panel')]) }) })), _jsx(StyledPortalMainRegion, { "data-testid": testIds.mainRegion, "aria-hidden": !pagePanel.visible, inert: !pagePanel.visible ? '' : undefined, children: pagePanel.content })] }));
|
|
73
79
|
};
|
|
74
80
|
export default withTestIds(PortalAgentSplitView, getPortalAgentSplitViewTestIds);
|
|
75
81
|
//# sourceMappingURL=PortalAgentSplitView.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PortalAgentSplitView.js","sourceRoot":"","sources":["../../../src/components/GenAICoach/PortalAgentSplitView.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE9C,OAAO,EACL,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,WAAW,EACX,OAAO,EACR,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACzB,MAAM,8CAA8C,CAAC;AAEtD,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,qBAAqB,EACrB,0BAA0B,EAC3B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AAGvE,MAAM,oBAAoB,GAAG,CAAC,EAC5B,MAAM,EACN,QAAQ,EACR,SAAS,EACT,cAAc,EACd,YAAY,EACZ,WAAW,EACe,EAAE,EAAE;IAC9B,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IACpB,MAAM,EAAE,GAAG,EAAE,GAAG,YAAY,EAAE,CAAC;IAC/B,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,EAAE,8BAA8B,CAAC,CAAC;IAEnE,MAAM,gBAAgB,GAAG,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;IAEzE,MAAM,iBAAiB,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CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,YAEtC,QAAQ,GACe,EAEzB,cAAc,IAAI,SAAS,CAAC,OAAO,IAAI,CACtC,KAAC,qBAAqB,cACpB,KAAC,YAAY,IACX,WAAW,EAAE,kBAAkB,EAC/B,SAAS,EAAE,0BAA0B,EACrC,eAAe,EAAE,CAAC,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAC/C,GACoB,CACzB,EAED,KAAC,sBAAsB,mBACR,OAAO,CAAC,UAAU,iBAClB,CAAC,SAAS,CAAC,OAAO,EAC/B,KAAK,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,YAEzC,SAAS,CAAC,OAAO,GACK,IACE,CAC9B,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC,oBAAoB,EAAE,8BAA8B,CAAC,CAAC","sourcesContent":["import { useCallback, useEffect, useRef } from 'react';\nimport type { KeyboardEvent, MouseEvent } from 'react';\nimport { remToPx, stripUnit } from 'polished';\n\nimport {\n useDirection,\n useTestIds,\n ResizeHandle,\n withTestIds,\n useI18n\n} from '@pega/cosmos-react-core';\nimport {\n portalAgentMinWidth,\n resizeDrawerKeyboardStep\n} from '@pega/cosmos-react-core/lib/styles/constants';\n\nimport {\n StyledPortalAgentRegion,\n StyledPortalMainRegion,\n StyledPortalSeparator,\n StyledPortalSplitContainer\n} from './GenAICoach.styles';\nimport { getPortalAgentSplitViewTestIds } from './GenAICoach.test-ids';\nimport type { PortalAgentSplitViewProps } from './GenAICoach.types';\n\nconst PortalAgentSplitView = ({\n testId,\n children,\n pagePanel,\n showAgentPanel,\n initialWidth,\n onResizeEnd\n}: PortalAgentSplitViewProps) => {\n const t = useI18n();\n const { ltr } = useDirection();\n const testIds = useTestIds(testId, getPortalAgentSplitViewTestIds);\n\n const regionMinWidthPx = Number(stripUnit(remToPx(portalAgentMinWidth)));\n\n const splitContainerRef = useRef<HTMLDivElement>(null);\n const agentPanelRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const container = splitContainerRef.current;\n\n if (!container || !initialWidth) return;\n\n container.style.setProperty('--region-a-width', initialWidth);\n }, [initialWidth]);\n\n const handleRegionResize = useCallback(\n (e: MouseEvent) => {\n const container = splitContainerRef.current;\n const regionAEl = agentPanelRef.current;\n\n if (!container || !regionAEl) return;\n\n const ownerWindow = container.ownerDocument.defaultView;\n\n if (!ownerWindow) return;\n\n const startX = e.clientX;\n const startWidth = regionAEl.getBoundingClientRect().width;\n const ac = new AbortController();\n\n ownerWindow.addEventListener(\n 'mousemove',\n moveEvent => {\n const containerWidth = container.getBoundingClientRect().width;\n const maxPx = containerWidth - regionMinWidthPx;\n\n const delta = ltr ? moveEvent.clientX - startX : startX - moveEvent.clientX;\n const newWidth = Math.max(regionMinWidthPx, Math.min(maxPx, startWidth + delta));\n\n container.style.setProperty(\n '--region-a-width',\n `${((newWidth / containerWidth) * 100).toFixed(4)}%`\n );\n },\n { passive: true, signal: ac.signal }\n );\n\n ownerWindow.addEventListener(\n 'mouseup',\n () => {\n const finalWidth = container.style.getPropertyValue('--region-a-width');\n\n if (finalWidth) {\n onResizeEnd?.(finalWidth);\n }\n\n ac.abort();\n },\n { once: true }\n );\n },\n [ltr, onResizeEnd, regionMinWidthPx]\n );\n\n const handleRegionKeyboardResize = useCallback(\n (e: KeyboardEvent, grabbed: boolean) => {\n const container = splitContainerRef.current;\n if (!container) return;\n\n if (e.code === 'Space' && grabbed) {\n const finalWidth = container.style.getPropertyValue('--region-a-width');\n\n if (finalWidth) {\n onResizeEnd?.(finalWidth);\n }\n\n return;\n }\n\n if (!grabbed || !agentPanelRef.current) return;\n\n if (e.code !== 'ArrowLeft' && e.code !== 'ArrowRight') return;\n\n e.preventDefault();\n\n const containerWidth = container.getBoundingClientRect().width;\n const maxPx = containerWidth - regionMinWidthPx;\n\n const resizeStep = containerWidth * resizeDrawerKeyboardStep;\n const currentWidth = agentPanelRef.current.getBoundingClientRect().width;\n const direction = (e.code === 'ArrowRight' ? 1 : -1) * (ltr ? 1 : -1);\n\n const newWidth = Math.max(\n regionMinWidthPx,\n Math.min(maxPx, currentWidth + direction * resizeStep)\n );\n\n const nextWidth = `${((newWidth / containerWidth) * 100).toFixed(4)}%`;\n\n container.style.setProperty('--region-a-width', nextWidth);\n },\n [ltr, onResizeEnd, regionMinWidthPx, resizeDrawerKeyboardStep]\n );\n\n return (\n <StyledPortalSplitContainer ref={splitContainerRef} data-testid={testIds.splitContainer}>\n <StyledPortalAgentRegion\n ref={agentPanelRef}\n agentVisible={showAgentPanel}\n mainVisible={pagePanel.visible}\n aria-hidden={!showAgentPanel}\n inert={!showAgentPanel ? '' : undefined}\n >\n {children}\n </StyledPortalAgentRegion>\n\n {showAgentPanel && pagePanel.visible && (\n <StyledPortalSeparator>\n <ResizeHandle\n onMouseDown={handleRegionResize}\n onKeyDown={handleRegionKeyboardResize}\n contextualLabel={t('resize_noun', [t('panel')])}\n />\n </StyledPortalSeparator>\n )}\n\n <StyledPortalMainRegion\n data-testid={testIds.mainRegion}\n aria-hidden={!pagePanel.visible}\n inert={!pagePanel.visible ? '' : undefined}\n >\n {pagePanel.content}\n </StyledPortalMainRegion>\n </StyledPortalSplitContainer>\n );\n};\n\nexport default withTestIds(PortalAgentSplitView, getPortalAgentSplitViewTestIds);\n"]}
|
|
1
|
+
{"version":3,"file":"PortalAgentSplitView.js","sourceRoot":"","sources":["../../../src/components/GenAICoach/PortalAgentSplitView.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE9C,OAAO,EACL,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,WAAW,EACX,OAAO,EACR,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAC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AC,OAAO,EAC/B,KAAK,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,YAEzC,SAAS,CAAC,OAAO,GACK,IACE,CAC9B,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC,oBAAoB,EAAE,8BAA8B,CAAC,CAAC","sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react';\nimport type { KeyboardEvent, MouseEvent } from 'react';\nimport { remToPx, stripUnit } from 'polished';\n\nimport {\n useDirection,\n useTestIds,\n ResizeHandle,\n withTestIds,\n useI18n\n} from '@pega/cosmos-react-core';\nimport {\n portalAgentMinWidth,\n resizeDrawerKeyboardStep\n} from '@pega/cosmos-react-core/lib/styles/constants';\n\nimport {\n StyledPortalAgentRegion,\n StyledPortalMainRegion,\n StyledPortalSeparator,\n StyledPortalSplitContainer\n} from './GenAICoach.styles';\nimport { getPortalAgentSplitViewTestIds } from './GenAICoach.test-ids';\nimport type { PortalAgentSplitViewProps } from './GenAICoach.types';\n\nconst PortalAgentSplitView = ({\n testId,\n children,\n pagePanel,\n showAgentPanel,\n initialWidth,\n onResizeEnd\n}: PortalAgentSplitViewProps) => {\n const t = useI18n();\n const { ltr } = useDirection();\n const testIds = useTestIds(testId, getPortalAgentSplitViewTestIds);\n\n const regionMinWidthPx = Number(stripUnit(remToPx(portalAgentMinWidth)));\n\n const splitContainerRef = useRef<HTMLDivElement>(null);\n const agentPanelRef = useRef<HTMLDivElement>(null);\n const [agentPanelShown, setAgentPanelShown] = useState(showAgentPanel);\n\n useEffect(() => {\n if (showAgentPanel) {\n setAgentPanelShown(true);\n }\n }, [showAgentPanel]);\n\n useEffect(() => {\n const container = splitContainerRef.current;\n\n if (!container || !initialWidth) return;\n\n container.style.setProperty('--region-a-width', initialWidth);\n }, [initialWidth]);\n\n const handleRegionResize = useCallback(\n (e: MouseEvent) => {\n const container = splitContainerRef.current;\n const regionAEl = agentPanelRef.current;\n\n if (!container || !regionAEl) return;\n\n const ownerWindow = container.ownerDocument.defaultView;\n\n if (!ownerWindow) return;\n\n const startX = e.clientX;\n const startWidth = regionAEl.getBoundingClientRect().width;\n const ac = new AbortController();\n\n ownerWindow.addEventListener(\n 'mousemove',\n moveEvent => {\n const containerWidth = container.getBoundingClientRect().width;\n const maxPx = containerWidth - regionMinWidthPx;\n\n const delta = ltr ? moveEvent.clientX - startX : startX - moveEvent.clientX;\n const newWidth = Math.max(regionMinWidthPx, Math.min(maxPx, startWidth + delta));\n\n container.style.setProperty(\n '--region-a-width',\n `${((newWidth / containerWidth) * 100).toFixed(4)}%`\n );\n },\n { passive: true, signal: ac.signal }\n );\n\n ownerWindow.addEventListener(\n 'mouseup',\n () => {\n const finalWidth = container.style.getPropertyValue('--region-a-width');\n\n if (finalWidth) {\n onResizeEnd?.(finalWidth);\n }\n\n ac.abort();\n },\n { once: true }\n );\n },\n [ltr, onResizeEnd, regionMinWidthPx]\n );\n\n const handleRegionKeyboardResize = useCallback(\n (e: KeyboardEvent, grabbed: boolean) => {\n const container = splitContainerRef.current;\n if (!container) return;\n\n if (e.code === 'Space' && grabbed) {\n const finalWidth = container.style.getPropertyValue('--region-a-width');\n\n if (finalWidth) {\n onResizeEnd?.(finalWidth);\n }\n\n return;\n }\n\n if (!grabbed || !agentPanelRef.current) return;\n\n if (e.code !== 'ArrowLeft' && e.code !== 'ArrowRight') return;\n\n e.preventDefault();\n\n const containerWidth = container.getBoundingClientRect().width;\n const maxPx = containerWidth - regionMinWidthPx;\n\n const resizeStep = containerWidth * resizeDrawerKeyboardStep;\n const currentWidth = agentPanelRef.current.getBoundingClientRect().width;\n const direction = (e.code === 'ArrowRight' ? 1 : -1) * (ltr ? 1 : -1);\n\n const newWidth = Math.max(\n regionMinWidthPx,\n Math.min(maxPx, currentWidth + direction * resizeStep)\n );\n\n const nextWidth = `${((newWidth / containerWidth) * 100).toFixed(4)}%`;\n\n container.style.setProperty('--region-a-width', nextWidth);\n },\n [ltr, onResizeEnd, regionMinWidthPx, resizeDrawerKeyboardStep]\n );\n\n return (\n <StyledPortalSplitContainer ref={splitContainerRef} data-testid={testIds.splitContainer}>\n <StyledPortalAgentRegion\n ref={agentPanelRef}\n agentVisible={showAgentPanel}\n mainVisible={pagePanel.visible}\n aria-hidden={!showAgentPanel}\n inert={!showAgentPanel ? '' : undefined}\n >\n {agentPanelShown && children}\n </StyledPortalAgentRegion>\n\n {showAgentPanel && pagePanel.visible && (\n <StyledPortalSeparator>\n <ResizeHandle\n onMouseDown={handleRegionResize}\n onKeyDown={handleRegionKeyboardResize}\n contextualLabel={t('resize_noun', [t('panel')])}\n />\n </StyledPortalSeparator>\n )}\n\n <StyledPortalMainRegion\n data-testid={testIds.mainRegion}\n aria-hidden={!pagePanel.visible}\n inert={!pagePanel.visible ? '' : undefined}\n >\n {pagePanel.content}\n </StyledPortalMainRegion>\n </StyledPortalSplitContainer>\n );\n};\n\nexport default withTestIds(PortalAgentSplitView, getPortalAgentSplitViewTestIds);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Questionnaire.d.ts","sourceRoot":"","sources":["../../../src/components/GenAICoach/Questionnaire.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAKV,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAgN5B,QAAA,MAAM,aAAa,GAAI,8BAA8B,kBAAkB,
|
|
1
|
+
{"version":3,"file":"Questionnaire.d.ts","sourceRoot":"","sources":["../../../src/components/GenAICoach/Questionnaire.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAKV,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAgN5B,QAAA,MAAM,aAAa,GAAI,8BAA8B,kBAAkB,mDAuGtE,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback, useMemo, useState } from 'react';
|
|
2
|
+
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
3
3
|
import { Button, Card, CardContent, CardFooter, CardHeader, Checkbox, CheckboxGroup, ComboBox, Flex, Icon, RadioButton, RadioButtonGroup, Text, useI18n, registerIcon } from '@pega/cosmos-react-core';
|
|
4
4
|
import * as timesIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/times.icon';
|
|
5
5
|
import { StyledComboBoxWrapper, StyledQuestionBlock, StyledQuestionnaireCard } from './GenAICoach.styles';
|
|
@@ -121,6 +121,13 @@ const Questionnaire = ({ data, onChange, onCancel }) => {
|
|
|
121
121
|
const totalSteps = questions.length;
|
|
122
122
|
const [currentStep, setCurrentStep] = useState(0);
|
|
123
123
|
const [answers, setAnswers] = useState(() => buildInitialAnswers(questions));
|
|
124
|
+
// Resync local answers/step whenever a new questionnaire arrives. Relying only on the parent's
|
|
125
|
+
// `key` remount isn't enough here, since two different conversations can share the same field
|
|
126
|
+
// names, which would otherwise reuse this instance and carry over the previous chat's selections.
|
|
127
|
+
useEffect(() => {
|
|
128
|
+
setCurrentStep(0);
|
|
129
|
+
setAnswers(buildInitialAnswers(questions));
|
|
130
|
+
}, [questions]);
|
|
124
131
|
const handleChange = useCallback((field, key, selected) => {
|
|
125
132
|
setAnswers(prev => {
|
|
126
133
|
const question = questions.find(q => q.field === field);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Questionnaire.js","sourceRoot":"","sources":["../../../src/components/GenAICoach/Questionnaire.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EACL,MAAM,EACN,IAAI,EACJ,WAAW,EACX,UAAU,EACV,UAAU,EACV,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,gBAAgB,EAChB,IAAI,EACJ,OAAO,EACP,YAAY,EACb,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KA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,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAE,aACnE,KAAC,MAAM,IACL,OAAO,EAAC,QAAQ,EAChB,IAAI,QACJ,OAAO,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EACzC,QAAQ,EAAE,WAAW,KAAK,CAAC,gBACf,CAAC,CAAC,iBAAiB,CAAC,YAEhC,KAAC,IAAI,IAAC,IAAI,EAAC,YAAY,GAAG,GACnB,EAET,KAAC,IAAI,IAAC,OAAO,EAAC,WAAW,YAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,WAAW,GAAG,CAAC,EAAE,UAAU,CAAC,CAAC,GAAQ,EAE7E,KAAC,MAAM,IACL,OAAO,EAAC,QAAQ,EAChB,IAAI,QACJ,OAAO,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EACzC,QAAQ,EAAE,WAAW,KAAK,UAAU,GAAG,CAAC,gBAC5B,CAAC,CAAC,iBAAiB,CAAC,YAEhC,KAAC,IAAI,IAAC,IAAI,EAAC,aAAa,GAAG,GACpB,IACJ,GACI,CACd,IACI,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import type { ChangeEvent } from 'react';\nimport { useCallback, useMemo, useState } from 'react';\n\nimport {\n Button,\n Card,\n CardContent,\n CardFooter,\n CardHeader,\n Checkbox,\n CheckboxGroup,\n ComboBox,\n Flex,\n Icon,\n RadioButton,\n RadioButtonGroup,\n Text,\n useI18n,\n registerIcon\n} from '@pega/cosmos-react-core';\nimport type { MenuItemProps } from '@pega/cosmos-react-core';\nimport * as timesIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/times.icon';\n\nimport type {\n FormAnswer,\n OptionItem,\n Question,\n QuestionItemProps,\n QuestionnaireProps\n} from './GenAICoach.types';\nimport {\n StyledComboBoxWrapper,\n StyledQuestionBlock,\n StyledQuestionnaireCard\n} from './GenAICoach.styles';\nimport { getSelectedKeys } from './GenAICoach.utils';\n\nregisterIcon(timesIcon);\n\nconst getLabel = (option: OptionItem): string => option.displayLabel ?? option.label;\n\nconst createAnswer = (question: Question): FormAnswer => ({\n value: getSelectedKeys(question),\n questionText: question.questionText\n});\n\nconst buildInitialAnswers = (questions: Question[]): Record<string, FormAnswer> =>\n Object.fromEntries(questions.map(q => [q.field, createAnswer(q)]));\n\nconst splitOptions = (\n optionItems: OptionItem[],\n maxInlineOptions: number\n): { inlineOptions: OptionItem[]; overflowOptions: OptionItem[] } => {\n if (optionItems.length <= maxInlineOptions) {\n return { inlineOptions: optionItems, overflowOptions: [] };\n }\n\n return {\n inlineOptions: optionItems.slice(0, maxInlineOptions - 1),\n overflowOptions: optionItems.slice(maxInlineOptions - 1)\n };\n};\n\nconst QuestionItem = ({ question, answer, onChange }: QuestionItemProps) => {\n const t = useI18n();\n\n const isSingleSelect = question.type === 'single';\n const maxInlineOptions = 5;\n\n const { inlineOptions, overflowOptions } = splitOptions(question.optionItems, maxInlineOptions);\n const hasOverflow = overflowOptions.length > 0;\n\n const [searchTerm, setSearchTerm] = useState('');\n\n const overflowKeySet = useMemo(() => new Set(overflowOptions.map(o => o.key)), [overflowOptions]);\n const overflowOptionsByKey = useMemo(\n () => new Map(overflowOptions.map(o => [o.key, o])),\n [overflowOptions]\n );\n const activeOverflowKey = answer.value.find(v => overflowKeySet.has(v)) ?? '';\n const isOverflowSelected = activeOverflowKey.length > 0;\n\n const isSelected = (key: string) => answer.value.includes(key);\n\n const clearOverflowState = () => {\n setSearchTerm('');\n };\n\n const handleInlineSelect = (key: string) => {\n clearOverflowState();\n onChange(question.field, key, true);\n };\n\n const overflowMenuItems: MenuItemProps[] = useMemo(() => {\n const search = searchTerm.toLowerCase();\n\n return overflowOptions\n .map(opt => ({\n id: opt.key,\n primary: getLabel(opt),\n selected: isSelected(opt.key)\n }))\n .filter(item => !search || item.primary.toLowerCase().includes(search));\n }, [searchTerm, answer]);\n\n const overflowSelection = useMemo(() => {\n if (isSingleSelect) {\n if (!activeOverflowKey) return undefined;\n\n const option = overflowOptionsByKey.get(activeOverflowKey);\n const displayText = option ? getLabel(option) : activeOverflowKey;\n\n return { items: { id: activeOverflowKey, text: displayText } };\n }\n\n const selectedOverflowValues = answer.value.filter(v => overflowKeySet.has(v));\n\n if (selectedOverflowValues.length === 0) return undefined;\n\n return {\n items: selectedOverflowValues.map(key => {\n const option = overflowOptionsByKey.get(key);\n return { id: key, text: option ? getLabel(option) : key };\n }),\n onRemove: (id: MenuItemProps['id']) => onChange(question.field, id, false)\n };\n }, [\n isSingleSelect,\n activeOverflowKey,\n answer,\n overflowKeySet,\n overflowOptionsByKey,\n question.field,\n onChange\n ]);\n\n const handleOverflowSelect = useCallback(\n (id: MenuItemProps['id']) => {\n if (isSingleSelect) {\n const option = overflowOptionsByKey.get(id);\n\n if (option) {\n setSearchTerm('');\n onChange(question.field, option.key, true);\n }\n } else {\n onChange(question.field, id, !isSelected(id));\n }\n },\n [isSingleSelect, answer, question.field, onChange, overflowOptionsByKey]\n );\n\n const activateOverflow = () => {\n setSearchTerm('');\n };\n\n const deselectAllOverflow = () => {\n answer.value\n .filter(v => overflowKeySet.has(v))\n .forEach(key => onChange(question.field, key, false));\n };\n\n const otherLabel = t('other');\n\n const overflowComboBox = hasOverflow ? (\n <StyledComboBoxWrapper>\n <ComboBox\n labelHidden\n label={otherLabel}\n placeholder={otherLabel}\n value={searchTerm}\n selected={overflowSelection}\n onChange={(e: ChangeEvent<HTMLInputElement>) => setSearchTerm(e.target.value)}\n onBlur={() => setSearchTerm('')}\n mode={isSingleSelect ? undefined : 'multi-select'}\n menu={{ items: overflowMenuItems, onItemClick: handleOverflowSelect }}\n />\n </StyledComboBoxWrapper>\n ) : null;\n\n const inlineRadioButtons = inlineOptions.map(option => (\n <RadioButton\n key={option.key}\n label={getLabel(option)}\n name={question.field}\n checked={isSelected(option.key)}\n onChange={() => handleInlineSelect(option.key)}\n />\n ));\n\n const inlineCheckboxes = inlineOptions.map(option => (\n <Checkbox\n key={option.key}\n label={getLabel(option)}\n checked={isSelected(option.key)}\n onChange={e => onChange(question.field, option.key, e.target.checked)}\n />\n ));\n\n return (\n <StyledQuestionBlock>\n {isSingleSelect ? (\n <RadioButtonGroup name={question.field} label={question.questionText} labelHidden>\n {overflowComboBox\n ? [\n ...inlineRadioButtons,\n <RadioButton\n key='overflow'\n label={overflowComboBox}\n name={question.field}\n checked={isOverflowSelected}\n onChange={activateOverflow}\n />\n ]\n : inlineRadioButtons}\n </RadioButtonGroup>\n ) : (\n <CheckboxGroup label={question.questionText} labelHidden>\n {overflowComboBox\n ? [\n ...inlineCheckboxes,\n <Checkbox\n key='overflow'\n label={overflowComboBox}\n checked={answer.value.some(v => overflowKeySet.has(v))}\n onChange={e => {\n if (!e.target.checked) deselectAllOverflow();\n }}\n />\n ]\n : inlineCheckboxes}\n </CheckboxGroup>\n )}\n </StyledQuestionBlock>\n );\n};\n\nconst Questionnaire = ({ data, onChange, onCancel }: QuestionnaireProps) => {\n const t = useI18n();\n const questions = data.questions ?? [];\n const totalSteps = questions.length;\n\n const [currentStep, setCurrentStep] = useState(0);\n const [answers, setAnswers] = useState<Record<string, FormAnswer>>(() =>\n buildInitialAnswers(questions)\n );\n\n const handleChange = useCallback(\n (field: string, key: string, selected: boolean) => {\n setAnswers(prev => {\n const question = questions.find(q => q.field === field);\n const currentValues = prev[field]?.value ?? [];\n let updatedValues: string[];\n\n if (question?.type === 'single') {\n updatedValues = selected ? [key] : [];\n } else {\n updatedValues = selected ? [...currentValues, key] : currentValues.filter(v => v !== key);\n }\n\n const nextAnswers = {\n ...prev,\n [field]: {\n questionText: question?.questionText ?? prev[field]?.questionText ?? '',\n value: updatedValues\n }\n };\n\n onChange(nextAnswers);\n\n return nextAnswers;\n });\n },\n [onChange, questions]\n );\n\n if (totalSteps === 0) return null;\n\n const activeQuestion = questions[currentStep];\n const activeAnswer = answers[activeQuestion.field] ?? createAnswer(activeQuestion);\n const isMultiStep = totalSteps > 1;\n\n return (\n <Card as={StyledQuestionnaireCard}>\n <CardHeader\n actions={\n <Button variant='simple' icon onClick={onCancel} aria-label={t('dismiss')}>\n <Icon name='times' />\n </Button>\n }\n >\n <Text variant='h4'>{activeQuestion.questionText}</Text>\n </CardHeader>\n\n <CardContent>\n <QuestionItem\n key={activeQuestion.field}\n question={activeQuestion}\n answer={activeAnswer}\n onChange={handleChange}\n />\n </CardContent>\n\n {isMultiStep && (\n <CardFooter justify='center'>\n <Flex container={{ direction: 'row', alignItems: 'center', gap: 0.5 }}>\n <Button\n variant='simple'\n icon\n onClick={() => setCurrentStep(s => s - 1)}\n disabled={currentStep === 0}\n aria-label={t('pagination_prev')}\n >\n <Icon name='caret-left' />\n </Button>\n\n <Text variant='secondary'>{t('x_of_y', [currentStep + 1, totalSteps])}</Text>\n\n <Button\n variant='simple'\n icon\n onClick={() => setCurrentStep(s => s + 1)}\n disabled={currentStep === totalSteps - 1}\n aria-label={t('pagination_next')}\n >\n <Icon name='caret-right' />\n </Button>\n </Flex>\n </CardFooter>\n )}\n </Card>\n );\n};\n\nexport default Questionnaire;\n"]}
|
|
1
|
+
{"version":3,"file":"Questionnaire.js","sourceRoot":"","sources":["../../../src/components/GenAICoach/Questionnaire.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAElE,OAAO,EACL,MAAM,EACN,IAAI,EACJ,WAAW,EACX,UAAU,EACV,UAAU,EACV,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,gBAAgB,EAChB,IAAI,EACJ,OAAO,EACP,YAAY,EACb,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,SAAS,MAAM,8DAA8D,CAAC;AAS1F,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,u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,KAAK,CAIzB,GACU,EAEb,WAAW,IAAI,CACd,KAAC,UAAU,IAAC,OAAO,EAAC,QAAQ,YAC1B,MAAC,IAAI,IAAC,SAAS,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAE,aACnE,KAAC,MAAM,IACL,OAAO,EAAC,QAAQ,EAChB,IAAI,QACJ,OAAO,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EACzC,QAAQ,EAAE,WAAW,KAAK,CAAC,gBACf,CAAC,CAAC,iBAAiB,CAAC,YAEhC,KAAC,IAAI,IAAC,IAAI,EAAC,YAAY,GAAG,GACnB,EAET,KAAC,IAAI,IAAC,OAAO,EAAC,WAAW,YAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,WAAW,GAAG,CAAC,EAAE,UAAU,CAAC,CAAC,GAAQ,EAE7E,KAAC,MAAM,IACL,OAAO,EAAC,QAAQ,EAChB,IAAI,QACJ,OAAO,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EACzC,QAAQ,EAAE,WAAW,KAAK,UAAU,GAAG,CAAC,gBAC5B,CAAC,CAAC,iBAAiB,CAAC,YAEhC,KAAC,IAAI,IAAC,IAAI,EAAC,aAAa,GAAG,GACpB,IACJ,GACI,CACd,IACI,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import type { ChangeEvent } from 'react';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport {\n Button,\n Card,\n CardContent,\n CardFooter,\n CardHeader,\n Checkbox,\n CheckboxGroup,\n ComboBox,\n Flex,\n Icon,\n RadioButton,\n RadioButtonGroup,\n Text,\n useI18n,\n registerIcon\n} from '@pega/cosmos-react-core';\nimport type { MenuItemProps } from '@pega/cosmos-react-core';\nimport * as timesIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/times.icon';\n\nimport type {\n FormAnswer,\n OptionItem,\n Question,\n QuestionItemProps,\n QuestionnaireProps\n} from './GenAICoach.types';\nimport {\n StyledComboBoxWrapper,\n StyledQuestionBlock,\n StyledQuestionnaireCard\n} from './GenAICoach.styles';\nimport { getSelectedKeys } from './GenAICoach.utils';\n\nregisterIcon(timesIcon);\n\nconst getLabel = (option: OptionItem): string => option.displayLabel ?? option.label;\n\nconst createAnswer = (question: Question): FormAnswer => ({\n value: getSelectedKeys(question),\n questionText: question.questionText\n});\n\nconst buildInitialAnswers = (questions: Question[]): Record<string, FormAnswer> =>\n Object.fromEntries(questions.map(q => [q.field, createAnswer(q)]));\n\nconst splitOptions = (\n optionItems: OptionItem[],\n maxInlineOptions: number\n): { inlineOptions: OptionItem[]; overflowOptions: OptionItem[] } => {\n if (optionItems.length <= maxInlineOptions) {\n return { inlineOptions: optionItems, overflowOptions: [] };\n }\n\n return {\n inlineOptions: optionItems.slice(0, maxInlineOptions - 1),\n overflowOptions: optionItems.slice(maxInlineOptions - 1)\n };\n};\n\nconst QuestionItem = ({ question, answer, onChange }: QuestionItemProps) => {\n const t = useI18n();\n\n const isSingleSelect = question.type === 'single';\n const maxInlineOptions = 5;\n\n const { inlineOptions, overflowOptions } = splitOptions(question.optionItems, maxInlineOptions);\n const hasOverflow = overflowOptions.length > 0;\n\n const [searchTerm, setSearchTerm] = useState('');\n\n const overflowKeySet = useMemo(() => new Set(overflowOptions.map(o => o.key)), [overflowOptions]);\n const overflowOptionsByKey = useMemo(\n () => new Map(overflowOptions.map(o => [o.key, o])),\n [overflowOptions]\n );\n const activeOverflowKey = answer.value.find(v => overflowKeySet.has(v)) ?? '';\n const isOverflowSelected = activeOverflowKey.length > 0;\n\n const isSelected = (key: string) => answer.value.includes(key);\n\n const clearOverflowState = () => {\n setSearchTerm('');\n };\n\n const handleInlineSelect = (key: string) => {\n clearOverflowState();\n onChange(question.field, key, true);\n };\n\n const overflowMenuItems: MenuItemProps[] = useMemo(() => {\n const search = searchTerm.toLowerCase();\n\n return overflowOptions\n .map(opt => ({\n id: opt.key,\n primary: getLabel(opt),\n selected: isSelected(opt.key)\n }))\n .filter(item => !search || item.primary.toLowerCase().includes(search));\n }, [searchTerm, answer]);\n\n const overflowSelection = useMemo(() => {\n if (isSingleSelect) {\n if (!activeOverflowKey) return undefined;\n\n const option = overflowOptionsByKey.get(activeOverflowKey);\n const displayText = option ? getLabel(option) : activeOverflowKey;\n\n return { items: { id: activeOverflowKey, text: displayText } };\n }\n\n const selectedOverflowValues = answer.value.filter(v => overflowKeySet.has(v));\n\n if (selectedOverflowValues.length === 0) return undefined;\n\n return {\n items: selectedOverflowValues.map(key => {\n const option = overflowOptionsByKey.get(key);\n return { id: key, text: option ? getLabel(option) : key };\n }),\n onRemove: (id: MenuItemProps['id']) => onChange(question.field, id, false)\n };\n }, [\n isSingleSelect,\n activeOverflowKey,\n answer,\n overflowKeySet,\n overflowOptionsByKey,\n question.field,\n onChange\n ]);\n\n const handleOverflowSelect = useCallback(\n (id: MenuItemProps['id']) => {\n if (isSingleSelect) {\n const option = overflowOptionsByKey.get(id);\n\n if (option) {\n setSearchTerm('');\n onChange(question.field, option.key, true);\n }\n } else {\n onChange(question.field, id, !isSelected(id));\n }\n },\n [isSingleSelect, answer, question.field, onChange, overflowOptionsByKey]\n );\n\n const activateOverflow = () => {\n setSearchTerm('');\n };\n\n const deselectAllOverflow = () => {\n answer.value\n .filter(v => overflowKeySet.has(v))\n .forEach(key => onChange(question.field, key, false));\n };\n\n const otherLabel = t('other');\n\n const overflowComboBox = hasOverflow ? (\n <StyledComboBoxWrapper>\n <ComboBox\n labelHidden\n label={otherLabel}\n placeholder={otherLabel}\n value={searchTerm}\n selected={overflowSelection}\n onChange={(e: ChangeEvent<HTMLInputElement>) => setSearchTerm(e.target.value)}\n onBlur={() => setSearchTerm('')}\n mode={isSingleSelect ? undefined : 'multi-select'}\n menu={{ items: overflowMenuItems, onItemClick: handleOverflowSelect }}\n />\n </StyledComboBoxWrapper>\n ) : null;\n\n const inlineRadioButtons = inlineOptions.map(option => (\n <RadioButton\n key={option.key}\n label={getLabel(option)}\n name={question.field}\n checked={isSelected(option.key)}\n onChange={() => handleInlineSelect(option.key)}\n />\n ));\n\n const inlineCheckboxes = inlineOptions.map(option => (\n <Checkbox\n key={option.key}\n label={getLabel(option)}\n checked={isSelected(option.key)}\n onChange={e => onChange(question.field, option.key, e.target.checked)}\n />\n ));\n\n return (\n <StyledQuestionBlock>\n {isSingleSelect ? (\n <RadioButtonGroup name={question.field} label={question.questionText} labelHidden>\n {overflowComboBox\n ? [\n ...inlineRadioButtons,\n <RadioButton\n key='overflow'\n label={overflowComboBox}\n name={question.field}\n checked={isOverflowSelected}\n onChange={activateOverflow}\n />\n ]\n : inlineRadioButtons}\n </RadioButtonGroup>\n ) : (\n <CheckboxGroup label={question.questionText} labelHidden>\n {overflowComboBox\n ? [\n ...inlineCheckboxes,\n <Checkbox\n key='overflow'\n label={overflowComboBox}\n checked={answer.value.some(v => overflowKeySet.has(v))}\n onChange={e => {\n if (!e.target.checked) deselectAllOverflow();\n }}\n />\n ]\n : inlineCheckboxes}\n </CheckboxGroup>\n )}\n </StyledQuestionBlock>\n );\n};\n\nconst Questionnaire = ({ data, onChange, onCancel }: QuestionnaireProps) => {\n const t = useI18n();\n const questions = data.questions ?? [];\n const totalSteps = questions.length;\n\n const [currentStep, setCurrentStep] = useState(0);\n const [answers, setAnswers] = useState<Record<string, FormAnswer>>(() =>\n buildInitialAnswers(questions)\n );\n\n // Resync local answers/step whenever a new questionnaire arrives. Relying only on the parent's\n // `key` remount isn't enough here, since two different conversations can share the same field\n // names, which would otherwise reuse this instance and carry over the previous chat's selections.\n useEffect(() => {\n setCurrentStep(0);\n setAnswers(buildInitialAnswers(questions));\n }, [questions]);\n\n const handleChange = useCallback(\n (field: string, key: string, selected: boolean) => {\n setAnswers(prev => {\n const question = questions.find(q => q.field === field);\n const currentValues = prev[field]?.value ?? [];\n let updatedValues: string[];\n\n if (question?.type === 'single') {\n updatedValues = selected ? [key] : [];\n } else {\n updatedValues = selected ? [...currentValues, key] : currentValues.filter(v => v !== key);\n }\n\n const nextAnswers = {\n ...prev,\n [field]: {\n questionText: question?.questionText ?? prev[field]?.questionText ?? '',\n value: updatedValues\n }\n };\n\n onChange(nextAnswers);\n\n return nextAnswers;\n });\n },\n [onChange, questions]\n );\n\n if (totalSteps === 0) return null;\n\n const activeQuestion = questions[currentStep];\n const activeAnswer = answers[activeQuestion.field] ?? createAnswer(activeQuestion);\n const isMultiStep = totalSteps > 1;\n\n return (\n <Card as={StyledQuestionnaireCard}>\n <CardHeader\n actions={\n <Button variant='simple' icon onClick={onCancel} aria-label={t('dismiss')}>\n <Icon name='times' />\n </Button>\n }\n >\n <Text variant='h4'>{activeQuestion.questionText}</Text>\n </CardHeader>\n\n <CardContent>\n <QuestionItem\n key={activeQuestion.field}\n question={activeQuestion}\n answer={activeAnswer}\n onChange={handleChange}\n />\n </CardContent>\n\n {isMultiStep && (\n <CardFooter justify='center'>\n <Flex container={{ direction: 'row', alignItems: 'center', gap: 0.5 }}>\n <Button\n variant='simple'\n icon\n onClick={() => setCurrentStep(s => s - 1)}\n disabled={currentStep === 0}\n aria-label={t('pagination_prev')}\n >\n <Icon name='caret-left' />\n </Button>\n\n <Text variant='secondary'>{t('x_of_y', [currentStep + 1, totalSteps])}</Text>\n\n <Button\n variant='simple'\n icon\n onClick={() => setCurrentStep(s => s + 1)}\n disabled={currentStep === totalSteps - 1}\n aria-label={t('pagination_next')}\n >\n <Icon name='caret-right' />\n </Button>\n </Flex>\n </CardFooter>\n )}\n </Card>\n );\n};\n\nexport default Questionnaire;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stages.d.ts","sourceRoot":"","sources":["../../../src/components/Stages/Stages.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,+BAA+B,EAAgB,MAAM,yBAAyB,CAAC;AAG7F,OAAO,KAAK,EAAE,WAAW,EAAe,MAAM,gBAAgB,CAAC;;;;
|
|
1
|
+
{"version":3,"file":"Stages.d.ts","sourceRoot":"","sources":["../../../src/components/Stages/Stages.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,+BAA+B,EAAgB,MAAM,yBAAyB,CAAC;AAG7F,OAAO,KAAK,EAAE,WAAW,EAAe,MAAM,gBAAgB,CAAC;;;;AAyV/D,wBAAqD"}
|
|
@@ -164,7 +164,8 @@ const Stages = forwardRef(function Stages({ current, stages, caseTitle, onLoadSt
|
|
|
164
164
|
isCurrent,
|
|
165
165
|
hasToLoad
|
|
166
166
|
});
|
|
167
|
-
return (_jsxs(Fragment, { children: [isMilestoneVariant ? (_jsxs(StyledMilestoneStageContainer, { status: stageStatus,
|
|
167
|
+
return (_jsxs(Fragment, { children: [isMilestoneVariant ? (_jsxs(StyledMilestoneStageContainer, { status: stageStatus, connectorFilled: (stages[stageIndex + 1]?.completed ?? false) ||
|
|
168
|
+
stages[stageIndex + 1]?.id === current, readOnly: readOnly, children: [_jsx(StyledMilestoneButton, { status: stageStatus, readOnly: readOnly, ...stageButtonProps, children: stage.completed ? (_jsx(Icon, { name: 'check' })) : (_jsx("span", { "aria-hidden": 'true', children: stageIndex + 1 })) }), _jsx(StyledMilestoneLabel, { children: stage.name })] })) : (_jsx(Flex, { as: StyledStageContainer, item: { grow: 1, shrink: 0 }, readOnly: readOnly, variant: variant, children: _jsx(Flex, { container: { justify: 'center', alignItems: 'center' }, as: StyledStage, item: { grow: 1, shrink: 0 }, status: stageStatus, readOnly: readOnly, variant: variant, ...stageButtonProps, children: _jsxs(StyledInnerStage, { children: [stage.completed && _jsx(Icon, { name: 'check' }), stage.name] }) }) })), target && targetStageId === stage.id && isSmallOrAbove && !showModal && (_jsx(InfoDialog, { id: dialogId, heading: stage.name, target: target, progress: hasToLoad ? t('loading') : undefined, onDismiss: () => {
|
|
168
169
|
setTarget(null);
|
|
169
170
|
setTargetStageId(null);
|
|
170
171
|
}, placement: 'bottom', children: !hasToLoad && (_jsxs(StyledStageGlimpse, { children: [_jsx(StageGlimpse, { stage: stage }), _jsx(Button, { variant: 'secondary', onClick: openModal, children: t('stages_see_full_lifecycle') })] })) }))] }, stage.id));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stages.js","sourceRoot":"","sources":["../../../src/components/Stages/Stages.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG1E,OAAO,EACL,IAAI,EACJ,YAAY,EACZ,IAAI,EACJ,OAAO,EACP,MAAM,EACN,KAAK,EACL,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,MAAM,EACN,UAAU,EACV,SAAS,EACT,YAAY,EACZ,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,EACX,UAAU,EACV,UAAU,EACV,cAAc,EACd,UAAU,EACV,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,SAAS,MAAM,8DAA8D,CAAC;AAG1F,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,WAAW,EACX,oBAAoB,EACpB,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,EACnB,uBAAuB,EACvB,eAAe,EACf,cAAc,EACd,6BAA6B,EAC7B,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AAEzB,YAAY,CAAC,SAAS,CAAC,CAAC;AAExB,MAAM,MAAM,GAAiD,UAAU,CAAC,SAAS,MAAM,CACrF,EACE,OAAO,EACP,MAAM,EACN,SAAS,EACT,WAAW,EACX,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,SAAS,EACnB,MAAM,EACN,GAAG,SAAS,EACi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,GACa,EAEtB,KAAC,uBAAuB,IAAC,EAAE,EAAE,aAAa,YACvC,CAAC,CAAC,oBAAoB,CAAC,GACA,IACzB,CACJ,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC","sourcesContent":["import { useState, useRef, useEffect, forwardRef, Fragment } from 'react';\nimport type { MouseEvent, PropsWithoutRef } from 'react';\n\nimport {\n Icon,\n registerIcon,\n Flex,\n useI18n,\n Button,\n Modal,\n useBreakpoint,\n useModalManager,\n useConsolidatedRef,\n useUID,\n InfoDialog,\n useArrows,\n useDirection,\n useAfterInitialEffect,\n VisuallyHiddenText,\n withTestIds,\n useTestIds,\n useElement,\n useFocusWithin,\n isInstance,\n getActiveElement\n} from '@pega/cosmos-react-core';\nimport type { ForwardRefForwardPropsComponent, ModalMethods } from '@pega/cosmos-react-core';\nimport * as checkIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/check.icon';\n\nimport type { StagesProps, StageStatus } from './Stages.types';\nimport { getStagesTestIds } from './Stages.test-ids';\nimport StageGlimpse from './StageGlimpse';\nimport {\n StyledInnerStage,\n StyledStageCompleteIcon,\n StyledStage,\n StyledStageContainer,\n StyledStageGlimpse,\n StyledStages,\n StyledStagesWrapper,\n StyledStagesDescription,\n StyledStageText,\n StyledSentinel,\n StyledMilestoneStageContainer,\n StyledMilestoneButton,\n StyledMilestoneLabel\n} from './Stages.styles';\n\nregisterIcon(checkIcon);\n\nconst Stages: ForwardRefForwardPropsComponent<StagesProps> = forwardRef(function Stages(\n {\n current,\n stages,\n caseTitle,\n onLoadStage,\n readOnly = false,\n variant = 'chevron',\n testId,\n ...restProps\n }: PropsWithoutRef<StagesProps>,\n ref: StagesProps['ref']\n) {\n const t = useI18n();\n\n const testIds = useTestIds(testId, getStagesTestIds);\n\n const isMilestoneVariant = variant === 'milestone';\n\n const stagesRef = useConsolidatedRef(ref);\n const wrapperRef = useRef<HTMLDivElement>(null);\n const startSentinelRef = useRef<HTMLLIElement>(null);\n const endSentinelRef = useRef<HTMLLIElement>(null);\n const stagesRefs = useRef<Map<string, HTMLButtonElement>>(new Map());\n\n const [target, setTarget] = useElement<HTMLButtonElement>(null);\n const [targetStageId, setTargetStageId] = useState<string | null>(null);\n const [currentStageBtn, setCurrentStageBtn] = useState<HTMLButtonElement | null>(null);\n\n const { create: createModal } = useModalManager();\n const modalMethods = useRef<ModalMethods>();\n const [showModal, setShowModal] = useState(false);\n\n const isSmallOrAbove = useBreakpoint('sm');\n\n const { rtl } = useDirection();\n\n useArrows(\n stagesRef,\n {\n cycle: false,\n selector: ':scope > li > button:not([aria-expanded])',\n dir: 'left-right',\n initialFocusElement: currentStageBtn\n },\n [currentStageBtn]\n );\n\n const dialogId = useUID();\n const descriptionId = useUID();\n\n useEffect(() => {\n const el = stagesRef.current;\n const wrapper = wrapperRef.current;\n const startSentinel = startSentinelRef.current;\n const endSentinel = endSentinelRef.current;\n if (!el || !wrapper || !startSentinel || !endSentinel) return;\n\n const fadeValue = 'var(--stages-fade-width)';\n\n const observer = new IntersectionObserver(\n entries => {\n for (const entry of entries) {\n const visible = entry.isIntersecting;\n if (entry.target === startSentinel) {\n wrapper.style.setProperty('--stages-fade-start', visible ? '0rem' : fadeValue);\n } else if (entry.target === endSentinel) {\n wrapper.style.setProperty('--stages-fade-end', visible ? '0rem' : fadeValue);\n }\n }\n },\n { root: el, threshold: 0 }\n );\n\n observer.observe(startSentinel);\n observer.observe(endSentinel);\n\n return () => observer.disconnect();\n }, [stages.length]);\n\n useEffect(() => {\n const el = stagesRef.current;\n const currentBtn = el?.querySelector<HTMLButtonElement>('[aria-current=\"step\"]');\n currentBtn?.scrollIntoView({ inline: 'center', behavior: 'auto', block: 'nearest' });\n }, [current]); // re-center whenever the active stage changes\n\n useFocusWithin([stagesRef], focused => {\n const activeEl = getActiveElement();\n if (focused && isInstance(activeEl, HTMLButtonElement)) {\n activeEl.scrollIntoView({\n inline: 'center',\n behavior: 'smooth',\n block: 'nearest'\n });\n }\n });\n\n const stagesToLoad = onLoadStage\n ? stages.filter(stage => !Array.isArray(stage.steps)).map(stage => stage.id)\n : [];\n\n const renderModalStages = () =>\n stages.map(stage => (\n <Fragment key={stage.id}>\n <Flex container={{ alignItems: 'start', gap: 0.5 }}>\n {stage.completed && <StyledStageCompleteIcon name='check' />}\n <StyledStageText variant='h3' isCurrent={stage.id === current}>\n {stage.name}\n {stage.completed && <VisuallyHiddenText>{`- ${t('completed')}`}</VisuallyHiddenText>}\n </StyledStageText>\n </Flex>\n <StageGlimpse stage={stage} />\n </Fragment>\n ));\n\n const openModal = () => {\n setShowModal(true);\n if (stagesToLoad.length > 0) onLoadStage?.(stagesToLoad);\n modalMethods.current = createModal(Modal, {\n heading: caseTitle\n ? t('stages_case_lifecycle', [caseTitle])\n : t('stages_default_case_lifecycle'),\n progress: stagesToLoad.length > 0,\n children: renderModalStages(),\n onBeforeClose: () => {\n setShowModal(false);\n target?.focus();\n setTarget(null);\n setTargetStageId(null);\n modalMethods.current = undefined;\n }\n });\n };\n\n useAfterInitialEffect(() => {\n modalMethods.current?.update({\n progress: stagesToLoad.length > 0,\n children: renderModalStages()\n });\n }, [stagesToLoad.length]);\n\n const setStageButtonRef =\n (stageId: string, isCurrent: boolean) => (el: HTMLButtonElement | null) => {\n if (el) {\n stagesRefs.current.set(stageId, el);\n if (isCurrent) setCurrentStageBtn(prev => (prev !== el ? el : prev));\n } else {\n stagesRefs.current.delete(stageId);\n if (isCurrent) setCurrentStageBtn(null);\n }\n };\n\n const handleStageClick =\n (stageId: string, hasToLoad: boolean) => (e: MouseEvent<HTMLButtonElement>) => {\n if (isSmallOrAbove) {\n if (hasToLoad) onLoadStage?.([stageId]);\n\n const btn = e.currentTarget;\n btn.scrollIntoView({\n inline: 'center',\n behavior: 'smooth',\n block: 'nearest'\n });\n\n setTarget(btn);\n setTargetStageId(stageId);\n } else {\n openModal();\n }\n };\n\n const getStageButtonProps = ({\n stageId,\n stageName,\n stageStatusText,\n isCurrent,\n hasToLoad\n }: {\n stageId: string;\n stageName: string;\n stageStatusText: string;\n isCurrent: boolean;\n hasToLoad: boolean;\n }) => {\n const isExpanded = targetStageId === stageId && Boolean(target) && isSmallOrAbove;\n\n return {\n ref: setStageButtonRef(stageId, isCurrent),\n 'aria-current': isCurrent ? ('step' as const) : undefined,\n 'aria-label': t('stages_stage_label', [stageName, stageStatusText]),\n 'aria-expanded': isExpanded ? true : undefined,\n 'aria-controls': isExpanded ? dialogId : undefined,\n ...(!readOnly && {\n 'aria-haspopup': 'dialog' as const,\n onClick: handleStageClick(stageId, hasToLoad)\n })\n };\n };\n\n return (\n <>\n <StyledStagesWrapper ref={wrapperRef} data-testid={testIds.root}>\n <Flex\n {...restProps}\n container\n as={StyledStages}\n ref={stagesRef}\n variant={variant}\n dir={rtl ? 'rtl' : 'ltr'}\n aria-label={t('stages_label')}\n aria-describedby={descriptionId}\n >\n <StyledSentinel ref={startSentinelRef} aria-hidden='true' />\n\n {stages.map((stage, stageIndex) => {\n const isCurrent = stage.id === current;\n let stageStatusText = t(stage.completed ? 'completed' : 'not_started');\n if (isCurrent) stageStatusText = t('current');\n\n const hasToLoad = stagesToLoad.includes(stage.id);\n\n let stageStatus: StageStatus;\n\n if (stage.completed) {\n stageStatus = 'completed';\n } else if (isCurrent) {\n stageStatus = 'current';\n } else {\n stageStatus = 'pending';\n }\n\n const stageButtonProps = getStageButtonProps({\n stageId: stage.id,\n stageName: stage.name,\n stageStatusText,\n isCurrent,\n hasToLoad\n });\n\n return (\n <Fragment key={stage.id}>\n {isMilestoneVariant ? (\n <StyledMilestoneStageContainer\n status={stageStatus}\n nextCompleted={stages[stageIndex + 1]?.completed ?? false}\n readOnly={readOnly}\n >\n <StyledMilestoneButton\n status={stageStatus}\n readOnly={readOnly}\n {...stageButtonProps}\n >\n {stage.completed ? (\n <Icon name='check' />\n ) : (\n <span aria-hidden='true'>{stageIndex + 1}</span>\n )}\n </StyledMilestoneButton>\n <StyledMilestoneLabel>{stage.name}</StyledMilestoneLabel>\n </StyledMilestoneStageContainer>\n ) : (\n <Flex\n as={StyledStageContainer}\n item={{ grow: 1, shrink: 0 }}\n readOnly={readOnly}\n variant={variant}\n >\n <Flex\n container={{ justify: 'center', alignItems: 'center' }}\n as={StyledStage}\n item={{ grow: 1, shrink: 0 }}\n status={stageStatus}\n readOnly={readOnly}\n variant={variant}\n {...stageButtonProps}\n >\n <StyledInnerStage>\n {stage.completed && <Icon name='check' />}\n {stage.name}\n </StyledInnerStage>\n </Flex>\n </Flex>\n )}\n\n {target && targetStageId === stage.id && isSmallOrAbove && !showModal && (\n <InfoDialog\n id={dialogId}\n heading={stage.name}\n target={target}\n progress={hasToLoad ? t('loading') : undefined}\n onDismiss={() => {\n setTarget(null);\n setTargetStageId(null);\n }}\n placement='bottom'\n >\n {!hasToLoad && (\n <StyledStageGlimpse>\n <StageGlimpse stage={stage} />\n <Button variant='secondary' onClick={openModal}>\n {t('stages_see_full_lifecycle')}\n </Button>\n </StyledStageGlimpse>\n )}\n </InfoDialog>\n )}\n </Fragment>\n );\n })}\n\n <StyledSentinel ref={endSentinelRef} aria-hidden='true' />\n </Flex>\n </StyledStagesWrapper>\n\n <StyledStagesDescription id={descriptionId}>\n {t('stages_description')}\n </StyledStagesDescription>\n </>\n );\n});\n\nexport default withTestIds(Stages, getStagesTestIds);\n"]}
|
|
1
|
+
{"version":3,"file":"Stages.js","sourceRoot":"","sources":["../../../src/components/Stages/Stages.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG1E,OAAO,EACL,IAAI,EACJ,YAAY,EACZ,IAAI,EACJ,OAAO,EACP,MAAM,EACN,KAAK,EACL,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,MAAM,EACN,UAAU,EACV,SAAS,EACT,YAAY,EACZ,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,EAC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AAE,IAAI,cAAc,IAAI,CAAC,SAAS,IAAI,CACvE,KAAC,UAAU,IACT,EAAE,EAAE,QAAQ,EACZ,OAAO,EAAE,KAAK,CAAC,IAAI,EACnB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,EAC9C,SAAS,EAAE,GAAG,EAAE;4CACd,SAAS,CAAC,IAAI,CAAC,CAAC;4CAChB,gBAAgB,CAAC,IAAI,CAAC,CAAC;wCACzB,CAAC,EACD,SAAS,EAAC,QAAQ,YAEjB,CAAC,SAAS,IAAI,CACb,MAAC,kBAAkB,eACjB,KAAC,YAAY,IAAC,KAAK,EAAE,KAAK,GAAI,EAC9B,KAAC,MAAM,IAAC,OAAO,EAAC,WAAW,EAAC,OAAO,EAAE,SAAS,YAC3C,CAAC,CAAC,2BAA2B,CAAC,GACxB,IACU,CACtB,GACU,CACd,KApEY,KAAK,CAAC,EAAE,CAqEZ,CACZ,CAAC;wBACJ,CAAC,CAAC,EAEF,KAAC,cAAc,IAAC,GAAG,EAAE,cAAc,iBAAc,MAAM,GAAG,IACrD,GACa,EAEtB,KAAC,uBAAuB,IAAC,EAAE,EAAE,aAAa,YACvC,CAAC,CAAC,oBAAoB,CAAC,GACA,IACzB,CACJ,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC","sourcesContent":["import { useState, useRef, useEffect, forwardRef, Fragment } from 'react';\nimport type { MouseEvent, PropsWithoutRef } from 'react';\n\nimport {\n Icon,\n registerIcon,\n Flex,\n useI18n,\n Button,\n Modal,\n useBreakpoint,\n useModalManager,\n useConsolidatedRef,\n useUID,\n InfoDialog,\n useArrows,\n useDirection,\n useAfterInitialEffect,\n VisuallyHiddenText,\n withTestIds,\n useTestIds,\n useElement,\n useFocusWithin,\n isInstance,\n getActiveElement\n} from '@pega/cosmos-react-core';\nimport type { ForwardRefForwardPropsComponent, ModalMethods } from '@pega/cosmos-react-core';\nimport * as checkIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/check.icon';\n\nimport type { StagesProps, StageStatus } from './Stages.types';\nimport { getStagesTestIds } from './Stages.test-ids';\nimport StageGlimpse from './StageGlimpse';\nimport {\n StyledInnerStage,\n StyledStageCompleteIcon,\n StyledStage,\n StyledStageContainer,\n StyledStageGlimpse,\n StyledStages,\n StyledStagesWrapper,\n StyledStagesDescription,\n StyledStageText,\n StyledSentinel,\n StyledMilestoneStageContainer,\n StyledMilestoneButton,\n StyledMilestoneLabel\n} from './Stages.styles';\n\nregisterIcon(checkIcon);\n\nconst Stages: ForwardRefForwardPropsComponent<StagesProps> = forwardRef(function Stages(\n {\n current,\n stages,\n caseTitle,\n onLoadStage,\n readOnly = false,\n variant = 'chevron',\n testId,\n ...restProps\n }: PropsWithoutRef<StagesProps>,\n ref: StagesProps['ref']\n) {\n const t = useI18n();\n\n const testIds = useTestIds(testId, getStagesTestIds);\n\n const isMilestoneVariant = variant === 'milestone';\n\n const stagesRef = useConsolidatedRef(ref);\n const wrapperRef = useRef<HTMLDivElement>(null);\n const startSentinelRef = useRef<HTMLLIElement>(null);\n const endSentinelRef = useRef<HTMLLIElement>(null);\n const stagesRefs = useRef<Map<string, HTMLButtonElement>>(new Map());\n\n const [target, setTarget] = useElement<HTMLButtonElement>(null);\n const [targetStageId, setTargetStageId] = useState<string | null>(null);\n const [currentStageBtn, setCurrentStageBtn] = useState<HTMLButtonElement | null>(null);\n\n const { create: createModal } = useModalManager();\n const modalMethods = useRef<ModalMethods>();\n const [showModal, setShowModal] = useState(false);\n\n const isSmallOrAbove = useBreakpoint('sm');\n\n const { rtl } = useDirection();\n\n useArrows(\n stagesRef,\n {\n cycle: false,\n selector: ':scope > li > button:not([aria-expanded])',\n dir: 'left-right',\n initialFocusElement: currentStageBtn\n },\n [currentStageBtn]\n );\n\n const dialogId = useUID();\n const descriptionId = useUID();\n\n useEffect(() => {\n const el = stagesRef.current;\n const wrapper = wrapperRef.current;\n const startSentinel = startSentinelRef.current;\n const endSentinel = endSentinelRef.current;\n if (!el || !wrapper || !startSentinel || !endSentinel) return;\n\n const fadeValue = 'var(--stages-fade-width)';\n\n const observer = new IntersectionObserver(\n entries => {\n for (const entry of entries) {\n const visible = entry.isIntersecting;\n if (entry.target === startSentinel) {\n wrapper.style.setProperty('--stages-fade-start', visible ? '0rem' : fadeValue);\n } else if (entry.target === endSentinel) {\n wrapper.style.setProperty('--stages-fade-end', visible ? '0rem' : fadeValue);\n }\n }\n },\n { root: el, threshold: 0 }\n );\n\n observer.observe(startSentinel);\n observer.observe(endSentinel);\n\n return () => observer.disconnect();\n }, [stages.length]);\n\n useEffect(() => {\n const el = stagesRef.current;\n const currentBtn = el?.querySelector<HTMLButtonElement>('[aria-current=\"step\"]');\n currentBtn?.scrollIntoView({ inline: 'center', behavior: 'auto', block: 'nearest' });\n }, [current]); // re-center whenever the active stage changes\n\n useFocusWithin([stagesRef], focused => {\n const activeEl = getActiveElement();\n if (focused && isInstance(activeEl, HTMLButtonElement)) {\n activeEl.scrollIntoView({\n inline: 'center',\n behavior: 'smooth',\n block: 'nearest'\n });\n }\n });\n\n const stagesToLoad = onLoadStage\n ? stages.filter(stage => !Array.isArray(stage.steps)).map(stage => stage.id)\n : [];\n\n const renderModalStages = () =>\n stages.map(stage => (\n <Fragment key={stage.id}>\n <Flex container={{ alignItems: 'start', gap: 0.5 }}>\n {stage.completed && <StyledStageCompleteIcon name='check' />}\n <StyledStageText variant='h3' isCurrent={stage.id === current}>\n {stage.name}\n {stage.completed && <VisuallyHiddenText>{`- ${t('completed')}`}</VisuallyHiddenText>}\n </StyledStageText>\n </Flex>\n <StageGlimpse stage={stage} />\n </Fragment>\n ));\n\n const openModal = () => {\n setShowModal(true);\n if (stagesToLoad.length > 0) onLoadStage?.(stagesToLoad);\n modalMethods.current = createModal(Modal, {\n heading: caseTitle\n ? t('stages_case_lifecycle', [caseTitle])\n : t('stages_default_case_lifecycle'),\n progress: stagesToLoad.length > 0,\n children: renderModalStages(),\n onBeforeClose: () => {\n setShowModal(false);\n target?.focus();\n setTarget(null);\n setTargetStageId(null);\n modalMethods.current = undefined;\n }\n });\n };\n\n useAfterInitialEffect(() => {\n modalMethods.current?.update({\n progress: stagesToLoad.length > 0,\n children: renderModalStages()\n });\n }, [stagesToLoad.length]);\n\n const setStageButtonRef =\n (stageId: string, isCurrent: boolean) => (el: HTMLButtonElement | null) => {\n if (el) {\n stagesRefs.current.set(stageId, el);\n if (isCurrent) setCurrentStageBtn(prev => (prev !== el ? el : prev));\n } else {\n stagesRefs.current.delete(stageId);\n if (isCurrent) setCurrentStageBtn(null);\n }\n };\n\n const handleStageClick =\n (stageId: string, hasToLoad: boolean) => (e: MouseEvent<HTMLButtonElement>) => {\n if (isSmallOrAbove) {\n if (hasToLoad) onLoadStage?.([stageId]);\n\n const btn = e.currentTarget;\n btn.scrollIntoView({\n inline: 'center',\n behavior: 'smooth',\n block: 'nearest'\n });\n\n setTarget(btn);\n setTargetStageId(stageId);\n } else {\n openModal();\n }\n };\n\n const getStageButtonProps = ({\n stageId,\n stageName,\n stageStatusText,\n isCurrent,\n hasToLoad\n }: {\n stageId: string;\n stageName: string;\n stageStatusText: string;\n isCurrent: boolean;\n hasToLoad: boolean;\n }) => {\n const isExpanded = targetStageId === stageId && Boolean(target) && isSmallOrAbove;\n\n return {\n ref: setStageButtonRef(stageId, isCurrent),\n 'aria-current': isCurrent ? ('step' as const) : undefined,\n 'aria-label': t('stages_stage_label', [stageName, stageStatusText]),\n 'aria-expanded': isExpanded ? true : undefined,\n 'aria-controls': isExpanded ? dialogId : undefined,\n ...(!readOnly && {\n 'aria-haspopup': 'dialog' as const,\n onClick: handleStageClick(stageId, hasToLoad)\n })\n };\n };\n\n return (\n <>\n <StyledStagesWrapper ref={wrapperRef} data-testid={testIds.root}>\n <Flex\n {...restProps}\n container\n as={StyledStages}\n ref={stagesRef}\n variant={variant}\n dir={rtl ? 'rtl' : 'ltr'}\n aria-label={t('stages_label')}\n aria-describedby={descriptionId}\n >\n <StyledSentinel ref={startSentinelRef} aria-hidden='true' />\n\n {stages.map((stage, stageIndex) => {\n const isCurrent = stage.id === current;\n let stageStatusText = t(stage.completed ? 'completed' : 'not_started');\n if (isCurrent) stageStatusText = t('current');\n\n const hasToLoad = stagesToLoad.includes(stage.id);\n\n let stageStatus: StageStatus;\n\n if (stage.completed) {\n stageStatus = 'completed';\n } else if (isCurrent) {\n stageStatus = 'current';\n } else {\n stageStatus = 'pending';\n }\n\n const stageButtonProps = getStageButtonProps({\n stageId: stage.id,\n stageName: stage.name,\n stageStatusText,\n isCurrent,\n hasToLoad\n });\n\n return (\n <Fragment key={stage.id}>\n {isMilestoneVariant ? (\n <StyledMilestoneStageContainer\n status={stageStatus}\n connectorFilled={\n (stages[stageIndex + 1]?.completed ?? false) ||\n stages[stageIndex + 1]?.id === current\n }\n readOnly={readOnly}\n >\n <StyledMilestoneButton\n status={stageStatus}\n readOnly={readOnly}\n {...stageButtonProps}\n >\n {stage.completed ? (\n <Icon name='check' />\n ) : (\n <span aria-hidden='true'>{stageIndex + 1}</span>\n )}\n </StyledMilestoneButton>\n <StyledMilestoneLabel>{stage.name}</StyledMilestoneLabel>\n </StyledMilestoneStageContainer>\n ) : (\n <Flex\n as={StyledStageContainer}\n item={{ grow: 1, shrink: 0 }}\n readOnly={readOnly}\n variant={variant}\n >\n <Flex\n container={{ justify: 'center', alignItems: 'center' }}\n as={StyledStage}\n item={{ grow: 1, shrink: 0 }}\n status={stageStatus}\n readOnly={readOnly}\n variant={variant}\n {...stageButtonProps}\n >\n <StyledInnerStage>\n {stage.completed && <Icon name='check' />}\n {stage.name}\n </StyledInnerStage>\n </Flex>\n </Flex>\n )}\n\n {target && targetStageId === stage.id && isSmallOrAbove && !showModal && (\n <InfoDialog\n id={dialogId}\n heading={stage.name}\n target={target}\n progress={hasToLoad ? t('loading') : undefined}\n onDismiss={() => {\n setTarget(null);\n setTargetStageId(null);\n }}\n placement='bottom'\n >\n {!hasToLoad && (\n <StyledStageGlimpse>\n <StageGlimpse stage={stage} />\n <Button variant='secondary' onClick={openModal}>\n {t('stages_see_full_lifecycle')}\n </Button>\n </StyledStageGlimpse>\n )}\n </InfoDialog>\n )}\n </Fragment>\n );\n })}\n\n <StyledSentinel ref={endSentinelRef} aria-hidden='true' />\n </Flex>\n </StyledStagesWrapper>\n\n <StyledStagesDescription id={descriptionId}>\n {t('stages_description')}\n </StyledStagesDescription>\n </>\n );\n});\n\nexport default withTestIds(Stages, getStagesTestIds);\n"]}
|
|
@@ -91,7 +91,7 @@ export declare const StyledMilestoneLabel: import("styled-components/dist/types"
|
|
|
91
91
|
*/
|
|
92
92
|
export declare const StyledMilestoneStageContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, {
|
|
93
93
|
status: "completed" | "current" | "pending";
|
|
94
|
-
|
|
94
|
+
connectorFilled: boolean;
|
|
95
95
|
readOnly?: boolean;
|
|
96
96
|
}>> & string;
|
|
97
97
|
export declare const StyledMilestoneButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stages.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Stages/Stages.styles.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAiJnD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,6NAmF9B,CAAC;AAIH;;;;GAIG;AACH,eAAO,MAAM,YAAY;aAAwB,YAAY;YAoD3D,CAAC;AAIH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc,6NA6B1B,CAAC;AAIF;;;GAGG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EG;AACH,eAAO,MAAM,uBAAuB,kaAiBlC,CAAC;AAIH;;GAEG;AACH,eAAO,MAAM,eAAe;;;gBAA8B,OAAO;kLAIhE,CAAC;AAwZF;;;GAGG;AACH,eAAO,MAAM,oBAAoB;eACpB,OAAO;aACT,YAAY;YAyDtB,CAAC;AAIF;;GAEG;AACH,eAAO,MAAM,oBAAoB,mOAS/B,CAAC;AAIH;;GAEG;AACH,eAAO,MAAM,UAAU;eAA0B,OAAO;YAoBtD,CAAC;AAIH;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;oMAMhC,CAAC;AAIH;;GAEG;AACH,eAAO,MAAM,kBAAkB,6NAI7B,CAAC;AAaH,eAAO,MAAM,oBAAoB,+NAS/B,CAAC;AAIH;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B;YAChC,WAAW,GAAG,SAAS,GAAG,SAAS;qBAC1B,OAAO;eACb,OAAO;YA4ElB,CAAC;AAIH,eAAO,MAAM,qBAAqB;YACxB,WAAW,GAAG,SAAS,GAAG,SAAS;eAChC,OAAO;YAoHlB,CAAC;AAIH;;;GAGG;AACH,eAAO,MAAM,uBAAuB,yOAEnC,CAAC"}
|
|
@@ -986,10 +986,9 @@ StyledMilestoneLabel.defaultProps = defaultThemeProp;
|
|
|
986
986
|
* horizontal connector as a single line from this milestone's centre to the next
|
|
987
987
|
* milestone's centre (::after), sized so every connector has an identical length.
|
|
988
988
|
*/
|
|
989
|
-
export const StyledMilestoneStageContainer = styled.li(({ theme,
|
|
989
|
+
export const StyledMilestoneStageContainer = styled.li(({ theme, connectorFilled, status }) => {
|
|
990
990
|
const { base: { palette: { interactive, 'border-line': borderLine }, spacing } } = theme;
|
|
991
991
|
const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);
|
|
992
|
-
const connectorFilled = nextCompleted;
|
|
993
992
|
return css `
|
|
994
993
|
--connector-height: ${connectorFilled ? '0.25rem' : '0.125rem'};
|
|
995
994
|
--connector-display: block;
|
|
@@ -1 +1 @@
|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MAAM,KAAK,SAAS;QACtB,CAAC,QAAQ;QACT,GAAG,CAAA;;;;;;;qBAOc,cAAc;;;;;;KAM9B;;;;;;eAMU,OAAO,CAAC,WAAW,CAAC;gBACnB,OAAO,CAAC,WAAW,CAAC;iCACH,OAAO,CAAC,WAAW,CAAC;kCACnB,OAAO,CAAC,WAAW,CAAC;;;iBAGrC,OAAO,CAAC,YAAY,CAAC;kBACpB,OAAO,CAAC,YAAY,CAAC;mCACJ,OAAO,CAAC,YAAY,CAAC;oCACpB,OAAO,CAAC,YAAY,CAAC;;;;;;;GAOtD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,qBAAqB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEtD;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,CAAC,CAAA;;CAE9C,CAAC;AAEF,uBAAuB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css, keyframes } from 'styled-components';\nimport type { DefaultTheme } from 'styled-components';\nimport { transparentize, darken } from 'polished';\n\nimport {\n calculateFontSize,\n DateTimeDisplay,\n defaultThemeProp,\n Icon,\n Text,\n StyledIcon,\n calculateForegroundColor,\n tryCatch\n} from '@pega/cosmos-react-core';\n\nimport type { StageVariant } from './Stages.types';\n\nconst stageClipPath = (leftNotch: boolean, rightPoint: boolean, mirrored = false): string => {\n if (mirrored) {\n // RTL: mirror the LTR clip-path polygon\n const points = ['100% 0', '0 0'];\n if (leftNotch) {\n points.push('var(--stage-chevron-width) 0', '0 50%', 'var(--stage-chevron-width) 100%');\n } else {\n points.push('0 100%');\n }\n points.push('100% 100%');\n if (rightPoint) {\n points.push('calc(100% - var(--stage-chevron-width)) 50%');\n }\n return `clip-path: polygon(${points.join(', ')});`;\n }\n\n const points = ['0 0', '100% 0'];\n if (rightPoint) {\n points.push(\n 'calc(100% - var(--stage-chevron-width)) 0',\n '100% 50%',\n 'calc(100% - var(--stage-chevron-width)) 100%'\n );\n } else {\n points.push('100% 100%');\n }\n points.push('0 100%');\n if (leftNotch) {\n points.push('var(--stage-chevron-width) 50%');\n }\n return `clip-path: polygon(${points.join(', ')});`;\n};\n\nconst segmentedConfig = {\n width: 'calc(0.8 * var(--chevron-spacing))',\n coarseWidth: 'calc(1.0 * var(--chevron-spacing))'\n} as const;\n\nconst segmentedClipPath = (leftCut: boolean, rightCut: boolean, mirrored = false): string => {\n if (mirrored) {\n const topRight = rightCut ? 'calc(100% - var(--segmented-width)) 0%' : '100% 0%';\n const bottomLeft = leftCut ? 'var(--segmented-width) 100%' : '0% 100%';\n\n return `clip-path: polygon(0% 0%, ${topRight}, 100% 100%, ${bottomLeft});`;\n }\n\n const topLeft = leftCut ? 'var(--segmented-width) 0%' : '0% 0%';\n const bottomRight = rightCut ? 'calc(100% - var(--segmented-width)) 100%' : '100% 100%';\n\n return `clip-path: polygon(${topLeft}, 100% 0%, ${bottomRight}, 0% 100%);`;\n};\n\n// === Chevron Configuration ===\n// Centralizes spacing and border thickness via CSS custom properties set at StyledStages\nconst chevronConfig = {\n // Horizontal projection of the rotated border-square forming the chevron point (fine pointer).\n // Derived from the border-square size × cos(45° + skew). Tuned to visually align with the stage height.\n // All values scaled by 1.25× relative to the original 4× spacing design (now 5× spacing height).\n width: 'calc(1.445 * var(--chevron-spacing))',\n // Same horizontal projection for coarse/touch pointer (larger square, proportionally wider point).\n coarseWidth: 'calc(1.797 * var(--chevron-spacing))',\n // Side length of the rotated border-square forming the chevron (fine pointer: 3.75× base spacing).\n squareSize: 'calc(3.75 * var(--chevron-spacing))',\n // Side length of the rotated border-square for coarse/touch pointer (5× base spacing).\n coarseSquareSize: 'calc(5 * var(--chevron-spacing))',\n // Distance to inset the ::before notch from the left edge of the stage (fine pointer).\n // 0.86 ≈ width − half-border-overlap, keeps the notch flush with the preceding chevron point.\n offsetLeft: 'calc(0.86 * var(--chevron-spacing))',\n // Distance to inset the ::after point from the right edge of the stage (fine pointer).\n // Equal to `width` so the point extends exactly one chevron-width beyond the stage boundary.\n offsetRight: 'calc(1.445 * var(--chevron-spacing))',\n // Coarse-pointer equivalents of offsetLeft/offsetRight, scaled to match coarseWidth/coarseSquareSize.\n // coarseOffsetLeft must satisfy: coarseSquareSize = 2 × coarseWidth + coarseOffsetLeft\n // (5 = 2 × 1.797 + 1.406) so that ::before and ::after co-locate on coarse devices.\n coarseOffsetLeft: 'calc(1.406 * var(--chevron-spacing))',\n coarseOffsetRight: 'calc(1.797 * var(--chevron-spacing))',\n // Pre-computed flat positions for ::before notch and ::after point.\n notchInsetStart: 'calc(-2.305 * var(--chevron-spacing))',\n // 3.203 = exact alignment (coarseSquareSize - coarseWidth); slightly overdone default clears sub-pixel rounding on 3× displays.\n coarseNotchInsetStart:\n 'calc(-1 * var(--stages-coarse-notch-correction) * var(--chevron-spacing))',\n pointInsetEnd: '0'\n} as const;\n\n// === Chevron Helpers ===\n// After team discussion we decided to use logical properties throughout — `inset-block-start`\n// instead of `top`, and `border-block-start/end-width` instead of `border-top/bottom-width` —\n// for consistency with the rest of the file (which already uses logical inline-axis properties).\nconst createChevronPseudo = (borderWidth: string, borderColor: string, size: string): string => `\n content: '';\n position: absolute;\n display: block;\n inset-block-start: calc(50% - ${size} / 2);\n width: ${size};\n height: ${size};\n border-style: solid;\n border-color: ${borderColor};\n border-inline-end-width: ${borderWidth};\n border-inline-start-width: 0;\n border-block-start-width: ${borderWidth};\n border-block-end-width: 0;\n transform: rotateZ(45deg) skew(15deg, 15deg);\n pointer-events: none;\n`;\n\nconst createChevronBaseStyles = (config: typeof chevronConfig, borderThicknessVar: string) => css`\n &:not(:nth-of-type(-n + 2))::before,\n &:not(:nth-last-of-type(-n + 2))::after {\n border-inline-end-width: calc(1.5 * ${borderThicknessVar});\n border-block-start-width: calc(1.5 * ${borderThicknessVar});\n }\n\n &:not(:nth-of-type(-n + 2))::before {\n inset-inline-start: ${config.notchInsetStart};\n }\n\n &:not(:nth-last-of-type(-n + 2))::after {\n inset-inline-end: ${config.pointInsetEnd};\n }\n`;\n\nconst createChevronInteractiveStates = (\n config: typeof chevronConfig,\n borderThicknessVar: string,\n includeHover = true\n) => css`\n ${includeHover &&\n css`\n &:has(button:hover)::before,\n &:has(button:hover)::after {\n border-inline-end-width: calc(2 * ${borderThicknessVar});\n border-block-start-width: calc(2 * ${borderThicknessVar});\n }\n `}\n &:has(button:focus-visible)::before,\n &:has(button:focus-visible)::after,\n &:has(button:active)::before,\n &:has(button:active)::after {\n border-inline-end-width: calc(2 * ${borderThicknessVar});\n border-block-start-width: calc(2 * ${borderThicknessVar});\n }\n`;\n\n/**\n * Outer wrapper `<div>` for the stages bar. Applies layered scroll-fade masks and\n * reserves scrollbar space so the fade gradient does not overlap the scrollbar track.\n */\nexport const StyledStagesWrapper = styled.div(({ theme }) => {\n return css`\n --stages-fade-width: calc(${theme.base.spacing} * 2);\n --stages-fade-start: 0;\n --stages-fade-end: 0;\n --stages-scrollbar-reserve: calc(${theme.base.spacing} * 0.25);\n\n /* Places gradient stops one physical pixel outside the element boundary,\n * preventing browser anti-aliasing from creating a semi-transparent seam\n * at mask edges. 1px is the correct unit here: it must be exactly one CSS pixel\n * (independent of font-size), so the mask boundary doesn't introduce a seam at the\n * element edge due to anti-aliasing.\n * See also StyledSentinel, which uses 1px for the same reason.\n */\n /* stylelint-disable-next-line unit-allowed-list -- 1px is intentional; see comment above */\n --mask-edge-overhang: 1px;\n position: relative;\n width: 100%;\n overflow: hidden;\n border-radius: ${theme.components.card['border-radius']};\n border-end-start-radius: var(\n --stages-wrapper-bottom-radius,\n ${theme.components.card['border-radius']}\n );\n border-end-end-radius: var(\n --stages-wrapper-bottom-radius,\n ${theme.components.card['border-radius']}\n );\n mask-image: linear-gradient(black, black),\n linear-gradient(\n to right,\n transparent calc(-1 * var(--mask-edge-overhang)),\n black var(--stages-fade-start),\n black calc(100% - var(--stages-fade-end)),\n transparent calc(100% + var(--mask-edge-overhang))\n );\n mask-size:\n 100% var(--stages-scrollbar-reserve),\n 100% calc(100% - var(--stages-scrollbar-reserve));\n mask-position:\n 0 100%,\n 0 0;\n mask-repeat: no-repeat, no-repeat;\n\n [dir='rtl'] & {\n mask-image: linear-gradient(black, black),\n linear-gradient(\n to right,\n transparent calc(-1 * var(--mask-edge-overhang)),\n black var(--stages-fade-end),\n black calc(100% - var(--stages-fade-start)),\n transparent calc(100% + var(--mask-edge-overhang))\n );\n }\n\n &:has(:focus-visible) {\n box-shadow: ${theme.base.shadow['focus-group']};\n }\n\n @media (pointer: coarse) {\n --stages-fade-width: calc(${theme.base.spacing} * 3);\n mask-image: linear-gradient(\n to right,\n transparent calc(-1 * var(--mask-edge-overhang)),\n black var(--stages-fade-start),\n black calc(100% - var(--stages-fade-end)),\n transparent calc(100% + var(--mask-edge-overhang))\n );\n mask-size: 100% 100%;\n mask-position: 0 0;\n mask-repeat: no-repeat;\n\n [dir='rtl'] & {\n mask-image: linear-gradient(\n to right,\n transparent calc(-1 * var(--mask-edge-overhang)),\n black var(--stages-fade-end),\n black calc(100% - var(--stages-fade-start)),\n transparent calc(100% + var(--mask-edge-overhang))\n );\n }\n }\n `;\n});\n\nStyledStagesWrapper.defaultProps = defaultThemeProp;\n\n/**\n * Scrollable `<ol>` containing all stage chevron items. Sets the `--chevron-spacing`,\n * `--chevron-border-thickness`, and `--segmented-border-thickness` custom properties\n * consumed by child elements.\n */\nexport const StyledStages = styled.ol<{ variant: StageVariant }>(({ theme, variant }) => {\n const isMilestone = variant === 'milestone';\n\n return css`\n --chevron-spacing: ${theme.base.spacing};\n --chevron-border-thickness: ${theme.components.button['border-width']};\n --segmented-border-thickness: calc(2 * ${theme.components.button['border-width']});\n --segmented-width: ${segmentedConfig.width};\n border-radius: ${theme.components.card['border-radius']};\n display: flex;\n padding: 0;\n width: 100%;\n overflow-x: auto;\n overflow-y: hidden;\n list-style: none;\n scrollbar-width: thin;\n scrollbar-color: transparent transparent;\n\n ${isMilestone &&\n css`\n --milestone-size: calc(4 * ${theme.base.spacing});\n --milestone-pulse-min: calc(var(--milestone-size) * 0.1);\n --milestone-pulse-start: ${transparentize(0.5, theme.base.palette.interactive)};\n --milestone-pulse-spread: calc(var(--milestone-size) * 0.25);\n --milestone-pulse-end: ${transparentize(0.75, theme.base.palette.interactive)};\n padding-block: ${theme.base.spacing};\n padding-inline: calc(var(--milestone-size) * 0.25);\n `}\n\n &:hover,\n &:focus-within {\n scrollbar-color: var(\n --stages-scrollbar-thumb,\n ${transparentize(0.4, theme.base.palette['border-line'])}\n )\n var(--stages-scrollbar-track, transparent);\n }\n\n &::-webkit-scrollbar {\n height: 0.25rem;\n }\n\n @media (pointer: coarse) {\n /* 3.203 = exact alignment; slightly overdone default to clear sub-pixel rounding on 3× displays */\n --stages-coarse-notch-correction: 3.35;\n scrollbar-width: none;\n\n &::-webkit-scrollbar {\n display: none;\n }\n }\n `;\n});\n\nStyledStages.defaultProps = defaultThemeProp;\n\n/**\n * A sentinel is an invisible 1 px <li> placed at each end of the scrollable stage list.\n * It is observed by an IntersectionObserver; when it scrolls out of view, the component sets\n * --stages-fade-start or --stages-fade-end to show a gradient fade indicating more stages\n * are reachable by scrolling. When it comes back into view the property is reset to 0.\n *\n * Sentinel elements carry aria-hidden=\"true\" so they are valid list items semantically.\n * Because styled-components scopes all CSS to a generated class, the chevron and layout rules\n * in StyledStageContainer never apply to these elements — they carry a different class.\n * CSS type-based selectors (:nth-of-type, :nth-last-of-type) in StyledStageContainer are\n * offset by 1 at each end to skip the sentinels and target only real stage items.\n */\nexport const StyledSentinel = styled.li`\n flex-shrink: 0;\n\n /* NOTE: the sentinel must occupy\n * a single physical pixel so IntersectionObserver can detect it at threshold 0 while having\n * negligible layout impact. A rem value could collapse to zero at small font sizes.\n */\n /* stylelint-disable-next-line unit-allowed-list -- 1px is intentional */\n width: 1px;\n /* stylelint-disable-next-line unit-allowed-list -- 1px is intentional */\n height: 1px;\n padding: 0;\n margin: 0;\n pointer-events: none;\n\n /* Collapse the sentinel's layout footprint to zero on the side facing the stages.\n * Without this, each 1px sentinel creates a visible gap between the stage buttons\n * and the left/right edges of the wrapper. The sentinel remains in flow (required\n * for IntersectionObserver scroll detection) but no longer displaces stage content.\n */\n &:first-of-type {\n /* stylelint-disable-next-line unit-allowed-list -- 1px matches sentinel width */\n margin-inline-end: -1px;\n }\n\n &:last-of-type {\n /* stylelint-disable-next-line unit-allowed-list -- 1px matches sentinel width */\n margin-inline-start: -1px;\n }\n`;\n\nStyledSentinel.defaultProps = defaultThemeProp;\n\n/**\n * Inner `<span>` holding stage label content. Optionally applies `text-overflow: ellipsis`\n * for stages with long labels.\n */\nexport const StyledInnerStage = styled.span<{ ellipsis?: boolean }>(({ theme, ellipsis }) => {\n return css`\n display: inline-flex;\n align-items: center;\n gap: calc(0.25 * ${theme.base.spacing});\n text-align: center;\n white-space: nowrap;\n padding-inline-start: calc(0.875 * ${theme.base.spacing});\n padding-inline-end: calc(1.125 * ${theme.base.spacing});\n ${ellipsis &&\n css`\n overflow: hidden;\n text-overflow: ellipsis;\n `}\n `;\n});\n\nStyledInnerStage.defaultProps = defaultThemeProp;\n\nconst stageButtonChevronStyles = (theme: DefaultTheme) => css`\n padding-inline-start: calc(2 * var(--chevron-spacing));\n padding-inline-end: var(--chevron-spacing);\n width: calc(100% + ${chevronConfig.width});\n --stage-chevron-width: ${chevronConfig.width};\n\n ${StyledInnerStage} {\n transform: translateX(calc(-0.25 * var(--chevron-spacing)));\n opacity: ${theme.base.transparency['transparent-2']};\n }\n\n ${stageClipPath(true, true)}\n\n [dir='rtl'] & ${StyledInnerStage} {\n transform: translateX(calc(0.25 * var(--chevron-spacing)));\n }\n\n [dir='rtl'] & {\n ${stageClipPath(true, true, true)}\n }\n\n @media (pointer: coarse) {\n padding-inline-start: calc(2.25 * var(--chevron-spacing));\n width: calc(100% + ${chevronConfig.coarseWidth});\n --stage-chevron-width: ${chevronConfig.coarseWidth};\n }\n`;\n\nconst stageButtonSegmentedStyles = (theme: DefaultTheme) => css`\n width: 100%;\n padding-inline-start: calc(var(--segmented-width) + var(--chevron-spacing));\n padding-inline-end: calc(var(--segmented-width) + var(--chevron-spacing));\n\n ${StyledInnerStage} {\n opacity: ${theme.base.transparency['transparent-2']};\n }\n\n ${segmentedClipPath(true, true)}\n\n [dir='rtl'] & {\n ${segmentedClipPath(true, true, true)}\n }\n`;\n\nconst stageButtonVariants: Record<StageVariant, (theme: DefaultTheme) => ReturnType<typeof css>> = {\n chevron: stageButtonChevronStyles,\n segmented: stageButtonSegmentedStyles,\n milestone: () => css``\n};\n\n/**\n * Clickable `<button>` for a single stage. Renders the chevron clip-path shape and\n * applies status-based background and foreground colours.\n */\nexport const StyledStage = styled.button<{\n status: 'completed' | 'current' | 'pending';\n readOnly?: boolean;\n variant: StageVariant;\n}>(\n ({\n theme,\n theme: {\n base: { palette, 'hit-area': hitArea, transparency, 'font-weight': fontWeight },\n components: {\n 'case-view': { stages }\n }\n },\n status,\n readOnly,\n variant: shape\n }) => {\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: calc(2 * var(--chevron-border-thickness)) 0;\n border-style: solid;\n position: relative;\n\n /* Browsers do not reliably apply flex align-items: stretch to <button> elements.\n * Adding 0.0625rem (1px at default font size) to min-height compensates so the button fills its <li> container,\n * keeping the clipped chevron background flush with the top and bottom borders. */\n min-height: calc(5 * var(--chevron-spacing) + 0.0625rem);\n margin-inline-start: 0;\n margin-inline-end: 0;\n\n ${stageButtonVariants[shape](theme)}\n\n ${!readOnly &&\n css`\n &:hover {\n border-color: ${palette['border-line']};\n }\n `}\n\n &:focus-visible {\n border-color: ${palette.interactive};\n }\n\n &:active {\n border-color: ${palette.interactive};\n\n ${StyledInnerStage} {\n opacity: ${transparency['transparent-3']};\n }\n }\n\n &[aria-current] {\n ${StyledInnerStage} {\n font-weight: ${fontWeight.bold};\n opacity: 1;\n }\n\n ${!readOnly &&\n css`\n &:hover {\n ${StyledInnerStage} {\n opacity: ${transparency['transparent-2']};\n }\n }\n `}\n }\n\n @media (pointer: coarse) {\n min-height: ${hitArea['finger-min']};\n }\n `;\n }\n);\n\nStyledStage.defaultProps = defaultThemeProp;\n\n/**\n * Checkmark icon shown inside completed stages, tinted to match the stage foreground colour.\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});\n\nStyledStageCompleteIcon.defaultProps = defaultThemeProp;\n\n/**\n * Stage label text. Renders in bold weight when the stage is the current active stage.\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\nconst stageContainerChevronStyles = (theme: DefaultTheme, readOnly: boolean | undefined) => {\n const includeHover = !readOnly;\n return css`\n /* Chevron: negative-margin overlap so consecutive stages share a boundary */\n margin-inline-start: calc(-1 * ${chevronConfig.width});\n\n &:nth-of-type(2) {\n margin-inline-start: 0;\n }\n\n /* Chevron boundary indicators via ::before (left notch) and ::after (right point) pseudo-elements */\n &:not(:nth-of-type(-n + 2))::before {\n ${createChevronPseudo(\n 'calc(2 * var(--chevron-border-thickness))',\n theme.base.palette['border-line'],\n chevronConfig.squareSize\n )}\n /* Elevate ::before above the button so it renders via the same pathway as ::after.\n * Without z-index, ::before (first in DOM) is painted first and then covered by the\n * button, making it only partially visible through the clip-path notch window. This\n * causes thicker interactive-state borders (3×) to look thinner on the left boundary\n * than on the right (::after, which paints last and is always fully visible).\n * The ::before tip's rightmost extent is at --stage-chevron-width from the <li> start,\n * which is before the stage text (padding-inline-start: 2 × spacing), so no content overlap.\n */\n z-index: 1;\n }\n\n &:not(:nth-last-of-type(-n + 2))::after {\n ${createChevronPseudo(\n 'calc(2 * var(--chevron-border-thickness))',\n theme.base.palette['border-line'],\n chevronConfig.squareSize\n )}\n }\n\n [dir='rtl'] &::before,\n [dir='rtl'] &::after {\n transform: rotateZ(-45deg) skew(-15deg, -15deg);\n }\n\n /* Chevron positioning: 45° rotated squares create visual tips via offsets:\n * left ≈ 0.86 × spacing, right ≈ 1.445 × spacing (accounts for skew correction)\n */\n ${createChevronBaseStyles(chevronConfig, 'var(--chevron-border-thickness)')}\n ${createChevronInteractiveStates(\n chevronConfig,\n 'var(--chevron-border-thickness)',\n includeHover\n )}\n\n /* Thicken chevrons to visually match button top/bottom border on any colored state.\n * At 45° rotation, border appears 1/sin(45°) ≈ 0.707× thinner, so 2× border ≈ 1.4× horizontal border weight.\n */\n ${includeHover &&\n css`\n &:has(button:hover)::before,\n &:has(button:hover)::after {\n border-color: ${theme.base.palette['border-line']};\n }\n `}\n\n &:has(button:focus-visible)::before,\n &:has(button:focus-visible)::after {\n border-color: ${theme.base.palette.interactive};\n }\n\n &:has(button:active)::before,\n &:has(button:active)::after {\n border-color: ${theme.base.palette.interactive};\n }\n\n /* First stage: no left notch, extended width to cover the full left edge */\n &:nth-of-type(2):not(:nth-last-of-type(2)) > ${StyledStage} {\n --stage-chevron-width: ${chevronConfig.width};\n width: calc(100% + (2 * var(--stage-chevron-width)));\n padding-inline-start: calc(var(--chevron-spacing));\n ${stageClipPath(false, true)}\n\n ${includeHover &&\n css`\n /* Inline-start interactive indicator via inset shadow — avoids border-color bleeding through gradient backgrounds */\n &:hover {\n box-shadow: inset calc(2 * var(--chevron-border-thickness)) 0 0\n ${theme.base.palette['border-line']};\n\n [dir='rtl'] & {\n box-shadow: inset calc(-2 * var(--chevron-border-thickness)) 0 0\n ${theme.base.palette['border-line']};\n }\n }\n `}\n\n &:focus-visible,\n &:active {\n box-shadow: inset calc(2 * var(--chevron-border-thickness)) 0 0\n ${theme.base.palette.interactive};\n\n [dir='rtl'] & {\n box-shadow: inset calc(-2 * var(--chevron-border-thickness)) 0 0\n ${theme.base.palette.interactive};\n }\n }\n\n @media (pointer: coarse) {\n --stage-chevron-width: ${chevronConfig.coarseWidth};\n width: calc(100% + (2 * var(--stage-chevron-width)));\n }\n }\n\n /* Last stage: no right point */\n &:nth-last-of-type(2):not(:nth-of-type(2)) > ${StyledStage} {\n --stage-chevron-width: ${chevronConfig.width};\n padding-inline-end: 0;\n width: 100%;\n ${stageClipPath(true, false)}\n\n ${includeHover &&\n css`\n /* Inline-end interactive indicator via inset shadow — avoids border-color bleeding through gradient backgrounds */\n &:hover {\n box-shadow: inset calc(-2 * var(--chevron-border-thickness)) 0 0\n ${theme.base.palette['border-line']};\n\n [dir='rtl'] & {\n box-shadow: inset calc(2 * var(--chevron-border-thickness)) 0 0\n ${theme.base.palette['border-line']};\n }\n }\n `}\n\n &:focus-visible,\n &:active {\n box-shadow: inset calc(-2 * var(--chevron-border-thickness)) 0 0\n ${theme.base.palette.interactive};\n\n [dir='rtl'] & {\n box-shadow: inset calc(2 * var(--chevron-border-thickness)) 0 0\n ${theme.base.palette.interactive};\n }\n }\n\n @media (pointer: coarse) {\n --stage-chevron-width: ${chevronConfig.coarseWidth};\n }\n }\n\n /* RTL: flip clip-paths for first and last stages */\n [dir='rtl'] &:nth-of-type(2):not(:nth-last-of-type(2)) > ${StyledStage} {\n ${stageClipPath(true, false, true)}\n }\n\n [dir='rtl'] &:nth-last-of-type(2):not(:nth-of-type(2)) > ${StyledStage} {\n ${stageClipPath(false, true, true)}\n }\n\n /* Single stage: plain rectangle — no clip-path notch, inset shadows on both sides */\n &:nth-of-type(2):nth-last-of-type(2) > ${StyledStage} {\n --stage-chevron-width: ${chevronConfig.width};\n clip-path: none;\n padding-inline-start: calc(var(--chevron-spacing));\n\n ${includeHover &&\n css`\n &:hover {\n box-shadow:\n inset calc(2 * var(--chevron-border-thickness)) 0 0 ${theme.base.palette['border-line']},\n inset calc(-2 * var(--chevron-border-thickness)) 0 0\n ${theme.base.palette['border-line']};\n }\n `}\n\n &:focus-visible,\n &:active {\n box-shadow:\n inset calc(2 * var(--chevron-border-thickness)) 0 0 ${theme.base.palette.interactive},\n inset calc(-2 * var(--chevron-border-thickness)) 0 0 ${theme.base.palette.interactive};\n }\n\n @media (pointer: coarse) {\n --stage-chevron-width: ${chevronConfig.coarseWidth};\n }\n }\n\n @media (pointer: coarse) {\n margin-inline-start: calc(-1 * ${chevronConfig.coarseWidth});\n\n &:not(:nth-of-type(-n + 2))::before,\n &:not(:nth-last-of-type(-n + 2))::after {\n inset-block-start: calc(50% - ${chevronConfig.coarseSquareSize} / 2);\n width: ${chevronConfig.coarseSquareSize};\n height: ${chevronConfig.coarseSquareSize};\n border-inline-end-width: calc(2 * var(--chevron-border-thickness));\n border-block-start-width: calc(2 * var(--chevron-border-thickness));\n }\n\n &:not(:nth-of-type(-n + 2))::before {\n inset-inline-start: ${chevronConfig.coarseNotchInsetStart};\n }\n\n &:not(:nth-last-of-type(-n + 2))::after {\n inset-inline-end: 0;\n }\n }\n `;\n};\n\nconst stageContainerSegmentedStyles = (theme: DefaultTheme, readOnly: boolean | undefined) => {\n const includeHover = !readOnly;\n\n return css`\n --segmented-edge-thickness: var(--chevron-border-thickness);\n\n /* Segmented: stages overlap by --segmented-width so parallelogram edges meet flush */\n margin-inline-start: calc(-1 * var(--segmented-width));\n\n &:nth-of-type(2) {\n margin-inline-start: 0;\n }\n\n /* Left segmented border strip: diagonal clip-path on each stage's inline-start edge (stages 2..N).\n * The strip goes from (segmented-width, 0%) at top to (0%, 100%) at bottom of the pseudo,\n * matching the parallelogram's inline-start clip edge exactly.\n */\n &:not(:nth-of-type(-n + 2))::before {\n content: '';\n position: absolute;\n inset-block: 0;\n inset-inline-start: 0;\n width: calc(var(--segmented-width) + var(--segmented-edge-thickness));\n clip-path: polygon(\n var(--segmented-width) 0%,\n calc(var(--segmented-width) + var(--segmented-edge-thickness)) 0%,\n var(--segmented-edge-thickness) 100%,\n 0% 100%\n );\n background: ${theme.base.palette['border-line']};\n pointer-events: none;\n z-index: 1;\n }\n\n /* Right segmented border strip: diagonal clip-path on each stage's inline-end edge (stages 1..N-1). */\n &:not(:nth-last-of-type(-n + 2))::after {\n content: '';\n position: absolute;\n inset-block: 0;\n inset-inline-end: 0;\n width: calc(var(--segmented-width) + var(--segmented-edge-thickness));\n clip-path: polygon(\n var(--segmented-width) 0%,\n calc(var(--segmented-width) + var(--segmented-edge-thickness)) 0%,\n var(--segmented-edge-thickness) 100%,\n 0% 100%\n );\n background: ${theme.base.palette['border-line']};\n pointer-events: none;\n z-index: 2;\n }\n\n /* Interactive states: update pseudo background to signal hover/focus/active */\n ${includeHover &&\n css`\n &:has(button:hover) {\n --segmented-edge-thickness: var(--segmented-border-thickness);\n }\n\n &:has(button:hover)::before,\n &:has(button:hover)::after {\n background: ${theme.base.palette['border-line']};\n }\n `}\n\n &:has(button:focus-visible),\n &:has(button:active) {\n --segmented-edge-thickness: var(--segmented-border-thickness);\n }\n\n &:has(button:focus-visible)::before,\n &:has(button:focus-visible)::after,\n &:has(button:active)::before,\n &:has(button:active)::after {\n background: ${theme.base.palette.interactive};\n }\n\n /* First stage (no inline-start cut): flat left edge + inset shadow edge indicator */\n &:nth-of-type(2):not(:nth-last-of-type(2)) > ${StyledStage} {\n ${segmentedClipPath(false, true)}\n\n ${includeHover &&\n css`\n &:hover {\n box-shadow: inset var(--segmented-border-thickness) 0 0\n ${theme.base.palette['border-line']};\n\n [dir='rtl'] & {\n box-shadow: inset calc(-1 * var(--segmented-border-thickness)) 0 0\n ${theme.base.palette['border-line']};\n }\n }\n `}\n\n &:focus-visible,\n &:active {\n box-shadow: inset var(--segmented-border-thickness) 0 0 ${theme.base.palette.interactive};\n\n [dir='rtl'] & {\n box-shadow: inset calc(-1 * var(--segmented-border-thickness)) 0 0\n ${theme.base.palette.interactive};\n }\n }\n }\n\n /* Last stage (no inline-end cut): flat right edge + inset shadow edge indicator */\n &:nth-last-of-type(2):not(:nth-of-type(2)) > ${StyledStage} {\n ${segmentedClipPath(true, false)}\n\n ${includeHover &&\n css`\n &:hover {\n box-shadow: inset calc(-1 * var(--segmented-border-thickness)) 0 0\n ${theme.base.palette['border-line']};\n\n [dir='rtl'] & {\n box-shadow: inset var(--segmented-border-thickness) 0 0\n ${theme.base.palette['border-line']};\n }\n }\n `}\n\n &:focus-visible,\n &:active {\n box-shadow: inset calc(-1 * var(--segmented-border-thickness)) 0 0\n ${theme.base.palette.interactive};\n\n [dir='rtl'] & {\n box-shadow: inset var(--segmented-border-thickness) 0 0 ${theme.base.palette.interactive};\n }\n }\n }\n\n /* RTL: flip clip-paths for first and last stage buttons */\n [dir='rtl'] &:nth-of-type(2):not(:nth-last-of-type(2)) > ${StyledStage} {\n ${segmentedClipPath(true, false, true)}\n }\n\n [dir='rtl'] &:nth-last-of-type(2):not(:nth-of-type(2)) > ${StyledStage} {\n ${segmentedClipPath(false, true, true)}\n }\n\n /* Single stage: plain rectangle — no diagonal cuts, inset shadows on both sides */\n &:nth-of-type(2):nth-last-of-type(2) > ${StyledStage} {\n clip-path: none;\n padding-inline-start: calc(var(--chevron-spacing));\n padding-inline-end: calc(var(--chevron-spacing));\n\n ${includeHover &&\n css`\n &:hover {\n box-shadow:\n inset var(--segmented-border-thickness) 0 0 ${theme.base.palette['border-line']},\n inset calc(-1 * var(--segmented-border-thickness)) 0 0\n ${theme.base.palette['border-line']};\n }\n `}\n\n &:focus-visible,\n &:active {\n box-shadow:\n inset var(--segmented-border-thickness) 0 0 ${theme.base.palette.interactive},\n inset calc(-1 * var(--segmented-border-thickness)) 0 0 ${theme.base.palette.interactive};\n }\n }\n\n /* RTL: mirror the pseudo clip-paths.\n * In LTR the strip goes top-right → bottom-left (polygon A 0%, A+B 0%, B 100%, 0% 100%).\n * In RTL the pseudo is positioned at the opposite physical edge via logical inset properties,\n * so the strip must go top-left → bottom-right to stay aligned with the flipped slant.\n */\n [dir='rtl'] &:not(:nth-of-type(-n + 2))::before,\n [dir='rtl'] &:not(:nth-last-of-type(-n + 2))::after {\n clip-path: polygon(\n 0% 0%,\n var(--segmented-edge-thickness) 0%,\n calc(var(--segmented-width) + var(--segmented-edge-thickness)) 100%,\n var(--segmented-width) 100%\n );\n }\n\n @media (pointer: coarse) {\n /* A single CSS custom property update propagates to all margin and clip-path consumers */\n --segmented-width: ${segmentedConfig.coarseWidth};\n }\n `;\n};\n\nconst stageContainerVariants: Record<\n StageVariant,\n (theme: DefaultTheme, readOnly: boolean | undefined) => ReturnType<typeof css>\n> = {\n chevron: stageContainerChevronStyles,\n segmented: stageContainerSegmentedStyles,\n milestone: () => css``\n};\n\n/**\n * `<li>` container for a single stage item. Manages negative-margin chevron overlap,\n * pseudo-element positioning, and z-index stacking for interactive states.\n */\nexport const StyledStageContainer = styled.li<{\n readOnly?: boolean;\n variant: StageVariant;\n}>(\n ({\n theme,\n theme: {\n components: {\n card: { 'border-radius': borderRadius }\n }\n },\n readOnly,\n variant: shape\n }) => {\n return css`\n display: flex;\n position: relative;\n\n /* Resting z-index: for same-z siblings, DOM order determines paint order.\n * All non-last <li>s have z-index:1 so the later (right) <li>'s ::before paints on top\n * at internal boundaries; the last <li> has no z-index so its left neighbor's ::after\n * wins at the final boundary. On hover/focus/active, the interacting <li> gains z:2/3\n * and its own pseudo-element surfaces for that boundary, regardless of which side.\n */\n &:not(:nth-last-of-type(-n + 2)) {\n z-index: 1;\n }\n\n &:has(button:focus-visible),\n &:has(button:active) {\n z-index: 2;\n }\n\n ${!readOnly &&\n css`\n &:has(button:hover) {\n z-index: 3;\n }\n `}\n\n /* Corner radii are shared across all shape variants */\n &:nth-of-type(2):not(:nth-last-of-type(2)) > ${StyledStage} {\n border-start-start-radius: ${borderRadius};\n border-end-start-radius: ${borderRadius};\n }\n\n &:nth-last-of-type(2):not(:nth-of-type(2)) > ${StyledStage} {\n border-start-end-radius: ${borderRadius};\n border-end-end-radius: ${borderRadius};\n }\n\n &:nth-of-type(2):nth-last-of-type(2) > ${StyledStage} {\n border-radius: ${borderRadius};\n width: 100%;\n }\n\n ${stageContainerVariants[shape](theme, readOnly)}\n `;\n }\n);\n\nStyledStageContainer.defaultProps = defaultThemeProp;\n\n/**\n * `<ol>` list of sub-step items displayed below the stages bar when a stage is expanded.\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\n/**\n * Individual step `<li>` within a stage. Dims text and icon at reduced opacity when completed.\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\n/**\n * Small datetime label rendered beneath a step. Displayed at the `xs` font size\n * and reduced opacity.\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\n/**\n * Container `<div>` for the stage glimpse preview panel, constrained to a small max-width.\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\nconst milestonePulse = keyframes`\n 0%, 100% {\n box-shadow: 0 0 0 var(--milestone-pulse-min) var(--milestone-pulse-start);\n }\n 60% {\n box-shadow: 0 0 0 var(--milestone-pulse-spread) var(--milestone-pulse-end);\n }\n`;\n\nexport const StyledMilestoneLabel = styled.span(({ theme }) => {\n return css`\n color: ${theme.base.palette['foreground-color']};\n line-height: ${theme.base['line-height']};\n text-align: center;\n align-self: stretch;\n overflow-wrap: break-word;\n padding-inline: calc(0.25 * ${theme.base.spacing});\n `;\n});\n\nStyledMilestoneLabel.defaultProps = defaultThemeProp;\n\n/**\n * `<li>` container for a single stage item in the 'milestone' shape variant.\n * Renders column-flex layout (milestone above, label below) and draws the\n * horizontal connector as a single line from this milestone's centre to the next\n * milestone's centre (::after), sized so every connector has an identical length.\n */\nexport const StyledMilestoneStageContainer = styled.li<{\n status: 'completed' | 'current' | 'pending';\n nextCompleted: boolean;\n readOnly?: boolean;\n}>(({ theme, nextCompleted, status }) => {\n const {\n base: {\n palette: { interactive, 'border-line': borderLine },\n spacing\n }\n } = theme;\n\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n const connectorFilled = nextCompleted;\n\n return css`\n --connector-height: ${connectorFilled ? '0.25rem' : '0.125rem'};\n --connector-display: block;\n --connector-start: 50%;\n --connector-width: 100%;\n --connector-bg: ${connectorFilled ? interactive : borderLine};\n --connector-forced-bg: ${connectorFilled ? 'Highlight' : 'CanvasText'};\n display: flex;\n flex-direction: column;\n align-items: center;\n flex: 1 0 0;\n font-size: ${fontSize.xs};\n font-weight: ${status === 'current'\n ? theme.base['font-weight']['semi-bold']\n : theme.base['font-weight'].normal};\n min-width: 15ch;\n position: relative;\n gap: ${spacing};\n z-index: 1;\n\n &:nth-of-type(2):not(:nth-last-of-type(2)) {\n --connector-start: calc(var(--milestone-size) / 2);\n --connector-width: calc(200% - var(--milestone-size));\n align-items: flex-start;\n flex: 0.5 0 calc(var(--milestone-size) / 2);\n min-width: calc(7.5ch + var(--milestone-size) / 2);\n\n ${StyledMilestoneLabel} {\n text-align: start;\n }\n }\n\n &:nth-last-of-type(2):not(:nth-of-type(2)) {\n --connector-display: none;\n align-items: flex-end;\n flex: 0.5 0 calc(var(--milestone-size) / 2);\n min-width: calc(7.5ch + var(--milestone-size) / 2);\n\n ${StyledMilestoneLabel} {\n text-align: end;\n }\n }\n\n &:nth-of-type(2):nth-last-of-type(2) {\n --connector-display: none;\n align-items: center;\n flex: 1 0 0;\n }\n\n &::after {\n content: '';\n display: var(--connector-display);\n position: absolute;\n inset-block-start: calc(var(--milestone-size) / 2 - var(--connector-height) / 2);\n inset-inline-start: var(--connector-start);\n width: var(--connector-width);\n height: var(--connector-height);\n background: var(--connector-bg);\n pointer-events: none;\n\n @media (forced-colors: active) {\n background: var(--connector-forced-bg);\n }\n }\n `;\n});\n\nStyledMilestoneStageContainer.defaultProps = defaultThemeProp;\n\nexport const StyledMilestoneButton = styled.button<{\n status: 'completed' | 'current' | 'pending';\n readOnly?: boolean;\n}>(({ theme, status, readOnly }) => {\n const {\n base: {\n 'hit-area': hitArea,\n animation: {\n speed: animationSpeed,\n timing: { ease: animationTiming }\n },\n shadow: { focus: focusShadow }\n },\n components: {\n button: { 'border-width': borderWidth },\n 'case-view': { stages }\n }\n } = theme;\n\n const stageForeground = calculateForegroundColor(\n stages.status[status].background,\n stages.status[status]['foreground-color']\n );\n\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n const completedBorderColor =\n status === 'completed'\n ? tryCatch(\n () => darken(0.12, stages.status.completed.background),\n () => 'transparent'\n )\n : '';\n\n return css`\n position: relative;\n z-index: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n border-radius: 50%;\n width: var(--milestone-size);\n height: var(--milestone-size);\n background: ${stages.status[status].background};\n color: ${stageForeground};\n font-size: ${fontSize.s};\n font-weight: ${status === 'current'\n ? theme.base['font-weight']['semi-bold']\n : theme.base['font-weight'].normal};\n outline: none;\n border: none;\n cursor: ${readOnly ? 'default' : 'pointer'};\n transition: box-shadow calc(2 * ${animationSpeed}) ${animationTiming};\n\n ${status === 'completed' &&\n css`\n box-shadow: inset 0 0 0 calc(2 * ${borderWidth}) ${completedBorderColor};\n `}\n\n &:focus-visible {\n box-shadow: ${focusShadow};\n\n @media (forced-colors: active) {\n outline: 0.125rem solid Highlight;\n outline-offset: 0.125rem;\n }\n }\n\n ${!readOnly &&\n css`\n &:hover {\n filter: brightness(0.85);\n }\n\n &:active {\n filter: brightness(0.85);\n }\n `}\n\n ${status === 'current' &&\n !readOnly &&\n css`\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: 50%;\n pointer-events: none;\n animation: ${milestonePulse} 2s ease-out infinite;\n\n @media (prefers-reduced-motion: reduce) {\n animation: none;\n }\n }\n `}\n\n /* Expanded hit area */\n &::after {\n content: '';\n position: absolute;\n width: ${hitArea['mouse-min']};\n height: ${hitArea['mouse-min']};\n inset-block-start: calc((${hitArea['mouse-min']} - var(--milestone-size)) / -2);\n inset-inline-start: calc((${hitArea['mouse-min']} - var(--milestone-size)) / -2);\n\n @media (pointer: coarse) {\n width: ${hitArea['finger-min']};\n height: ${hitArea['finger-min']};\n inset-block-start: calc((${hitArea['finger-min']} - var(--milestone-size)) / -2);\n inset-inline-start: calc((${hitArea['finger-min']} - var(--milestone-size)) / -2);\n }\n }\n\n @media (forced-colors: active) {\n border: 0.125rem solid ButtonText;\n }\n `;\n});\n\nStyledMilestoneButton.defaultProps = defaultThemeProp;\n\n/**\n * Visually hidden `<p>` providing an accessible description for the stages list,\n * announced by screen readers but not displayed on screen.\n */\nexport const StyledStagesDescription = styled.p`\n display: none;\n`;\n\nStyledStagesDescription.defaultProps = defaultThemeProp;\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,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElD,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,IAAI,EACJ,IAAI,EACJ,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;;;;;;GAOtD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,qBAAqB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEtD;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,CAAC,CAAA;;CAE9C,CAAC;AAEF,uBAAuB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css, keyframes } from 'styled-components';\nimport type { DefaultTheme } from 'styled-components';\nimport { transparentize, darken } from 'polished';\n\nimport {\n calculateFontSize,\n DateTimeDisplay,\n defaultThemeProp,\n Icon,\n Text,\n StyledIcon,\n calculateForegroundColor,\n tryCatch\n} from '@pega/cosmos-react-core';\n\nimport type { StageVariant } from './Stages.types';\n\nconst stageClipPath = (leftNotch: boolean, rightPoint: boolean, mirrored = false): string => {\n if (mirrored) {\n // RTL: mirror the LTR clip-path polygon\n const points = ['100% 0', '0 0'];\n if (leftNotch) {\n points.push('var(--stage-chevron-width) 0', '0 50%', 'var(--stage-chevron-width) 100%');\n } else {\n points.push('0 100%');\n }\n points.push('100% 100%');\n if (rightPoint) {\n points.push('calc(100% - var(--stage-chevron-width)) 50%');\n }\n return `clip-path: polygon(${points.join(', ')});`;\n }\n\n const points = ['0 0', '100% 0'];\n if (rightPoint) {\n points.push(\n 'calc(100% - var(--stage-chevron-width)) 0',\n '100% 50%',\n 'calc(100% - var(--stage-chevron-width)) 100%'\n );\n } else {\n points.push('100% 100%');\n }\n points.push('0 100%');\n if (leftNotch) {\n points.push('var(--stage-chevron-width) 50%');\n }\n return `clip-path: polygon(${points.join(', ')});`;\n};\n\nconst segmentedConfig = {\n width: 'calc(0.8 * var(--chevron-spacing))',\n coarseWidth: 'calc(1.0 * var(--chevron-spacing))'\n} as const;\n\nconst segmentedClipPath = (leftCut: boolean, rightCut: boolean, mirrored = false): string => {\n if (mirrored) {\n const topRight = rightCut ? 'calc(100% - var(--segmented-width)) 0%' : '100% 0%';\n const bottomLeft = leftCut ? 'var(--segmented-width) 100%' : '0% 100%';\n\n return `clip-path: polygon(0% 0%, ${topRight}, 100% 100%, ${bottomLeft});`;\n }\n\n const topLeft = leftCut ? 'var(--segmented-width) 0%' : '0% 0%';\n const bottomRight = rightCut ? 'calc(100% - var(--segmented-width)) 100%' : '100% 100%';\n\n return `clip-path: polygon(${topLeft}, 100% 0%, ${bottomRight}, 0% 100%);`;\n};\n\n// === Chevron Configuration ===\n// Centralizes spacing and border thickness via CSS custom properties set at StyledStages\nconst chevronConfig = {\n // Horizontal projection of the rotated border-square forming the chevron point (fine pointer).\n // Derived from the border-square size × cos(45° + skew). Tuned to visually align with the stage height.\n // All values scaled by 1.25× relative to the original 4× spacing design (now 5× spacing height).\n width: 'calc(1.445 * var(--chevron-spacing))',\n // Same horizontal projection for coarse/touch pointer (larger square, proportionally wider point).\n coarseWidth: 'calc(1.797 * var(--chevron-spacing))',\n // Side length of the rotated border-square forming the chevron (fine pointer: 3.75× base spacing).\n squareSize: 'calc(3.75 * var(--chevron-spacing))',\n // Side length of the rotated border-square for coarse/touch pointer (5× base spacing).\n coarseSquareSize: 'calc(5 * var(--chevron-spacing))',\n // Distance to inset the ::before notch from the left edge of the stage (fine pointer).\n // 0.86 ≈ width − half-border-overlap, keeps the notch flush with the preceding chevron point.\n offsetLeft: 'calc(0.86 * var(--chevron-spacing))',\n // Distance to inset the ::after point from the right edge of the stage (fine pointer).\n // Equal to `width` so the point extends exactly one chevron-width beyond the stage boundary.\n offsetRight: 'calc(1.445 * var(--chevron-spacing))',\n // Coarse-pointer equivalents of offsetLeft/offsetRight, scaled to match coarseWidth/coarseSquareSize.\n // coarseOffsetLeft must satisfy: coarseSquareSize = 2 × coarseWidth + coarseOffsetLeft\n // (5 = 2 × 1.797 + 1.406) so that ::before and ::after co-locate on coarse devices.\n coarseOffsetLeft: 'calc(1.406 * var(--chevron-spacing))',\n coarseOffsetRight: 'calc(1.797 * var(--chevron-spacing))',\n // Pre-computed flat positions for ::before notch and ::after point.\n notchInsetStart: 'calc(-2.305 * var(--chevron-spacing))',\n // 3.203 = exact alignment (coarseSquareSize - coarseWidth); slightly overdone default clears sub-pixel rounding on 3× displays.\n coarseNotchInsetStart:\n 'calc(-1 * var(--stages-coarse-notch-correction) * var(--chevron-spacing))',\n pointInsetEnd: '0'\n} as const;\n\n// === Chevron Helpers ===\n// After team discussion we decided to use logical properties throughout — `inset-block-start`\n// instead of `top`, and `border-block-start/end-width` instead of `border-top/bottom-width` —\n// for consistency with the rest of the file (which already uses logical inline-axis properties).\nconst createChevronPseudo = (borderWidth: string, borderColor: string, size: string): string => `\n content: '';\n position: absolute;\n display: block;\n inset-block-start: calc(50% - ${size} / 2);\n width: ${size};\n height: ${size};\n border-style: solid;\n border-color: ${borderColor};\n border-inline-end-width: ${borderWidth};\n border-inline-start-width: 0;\n border-block-start-width: ${borderWidth};\n border-block-end-width: 0;\n transform: rotateZ(45deg) skew(15deg, 15deg);\n pointer-events: none;\n`;\n\nconst createChevronBaseStyles = (config: typeof chevronConfig, borderThicknessVar: string) => css`\n &:not(:nth-of-type(-n + 2))::before,\n &:not(:nth-last-of-type(-n + 2))::after {\n border-inline-end-width: calc(1.5 * ${borderThicknessVar});\n border-block-start-width: calc(1.5 * ${borderThicknessVar});\n }\n\n &:not(:nth-of-type(-n + 2))::before {\n inset-inline-start: ${config.notchInsetStart};\n }\n\n &:not(:nth-last-of-type(-n + 2))::after {\n inset-inline-end: ${config.pointInsetEnd};\n }\n`;\n\nconst createChevronInteractiveStates = (\n config: typeof chevronConfig,\n borderThicknessVar: string,\n includeHover = true\n) => css`\n ${includeHover &&\n css`\n &:has(button:hover)::before,\n &:has(button:hover)::after {\n border-inline-end-width: calc(2 * ${borderThicknessVar});\n border-block-start-width: calc(2 * ${borderThicknessVar});\n }\n `}\n &:has(button:focus-visible)::before,\n &:has(button:focus-visible)::after,\n &:has(button:active)::before,\n &:has(button:active)::after {\n border-inline-end-width: calc(2 * ${borderThicknessVar});\n border-block-start-width: calc(2 * ${borderThicknessVar});\n }\n`;\n\n/**\n * Outer wrapper `<div>` for the stages bar. Applies layered scroll-fade masks and\n * reserves scrollbar space so the fade gradient does not overlap the scrollbar track.\n */\nexport const StyledStagesWrapper = styled.div(({ theme }) => {\n return css`\n --stages-fade-width: calc(${theme.base.spacing} * 2);\n --stages-fade-start: 0;\n --stages-fade-end: 0;\n --stages-scrollbar-reserve: calc(${theme.base.spacing} * 0.25);\n\n /* Places gradient stops one physical pixel outside the element boundary,\n * preventing browser anti-aliasing from creating a semi-transparent seam\n * at mask edges. 1px is the correct unit here: it must be exactly one CSS pixel\n * (independent of font-size), so the mask boundary doesn't introduce a seam at the\n * element edge due to anti-aliasing.\n * See also StyledSentinel, which uses 1px for the same reason.\n */\n /* stylelint-disable-next-line unit-allowed-list -- 1px is intentional; see comment above */\n --mask-edge-overhang: 1px;\n position: relative;\n width: 100%;\n overflow: hidden;\n border-radius: ${theme.components.card['border-radius']};\n border-end-start-radius: var(\n --stages-wrapper-bottom-radius,\n ${theme.components.card['border-radius']}\n );\n border-end-end-radius: var(\n --stages-wrapper-bottom-radius,\n ${theme.components.card['border-radius']}\n );\n mask-image: linear-gradient(black, black),\n linear-gradient(\n to right,\n transparent calc(-1 * var(--mask-edge-overhang)),\n black var(--stages-fade-start),\n black calc(100% - var(--stages-fade-end)),\n transparent calc(100% + var(--mask-edge-overhang))\n );\n mask-size:\n 100% var(--stages-scrollbar-reserve),\n 100% calc(100% - var(--stages-scrollbar-reserve));\n mask-position:\n 0 100%,\n 0 0;\n mask-repeat: no-repeat, no-repeat;\n\n [dir='rtl'] & {\n mask-image: linear-gradient(black, black),\n linear-gradient(\n to right,\n transparent calc(-1 * var(--mask-edge-overhang)),\n black var(--stages-fade-end),\n black calc(100% - var(--stages-fade-start)),\n transparent calc(100% + var(--mask-edge-overhang))\n );\n }\n\n &:has(:focus-visible) {\n box-shadow: ${theme.base.shadow['focus-group']};\n }\n\n @media (pointer: coarse) {\n --stages-fade-width: calc(${theme.base.spacing} * 3);\n mask-image: linear-gradient(\n to right,\n transparent calc(-1 * var(--mask-edge-overhang)),\n black var(--stages-fade-start),\n black calc(100% - var(--stages-fade-end)),\n transparent calc(100% + var(--mask-edge-overhang))\n );\n mask-size: 100% 100%;\n mask-position: 0 0;\n mask-repeat: no-repeat;\n\n [dir='rtl'] & {\n mask-image: linear-gradient(\n to right,\n transparent calc(-1 * var(--mask-edge-overhang)),\n black var(--stages-fade-end),\n black calc(100% - var(--stages-fade-start)),\n transparent calc(100% + var(--mask-edge-overhang))\n );\n }\n }\n `;\n});\n\nStyledStagesWrapper.defaultProps = defaultThemeProp;\n\n/**\n * Scrollable `<ol>` containing all stage chevron items. Sets the `--chevron-spacing`,\n * `--chevron-border-thickness`, and `--segmented-border-thickness` custom properties\n * consumed by child elements.\n */\nexport const StyledStages = styled.ol<{ variant: StageVariant }>(({ theme, variant }) => {\n const isMilestone = variant === 'milestone';\n\n return css`\n --chevron-spacing: ${theme.base.spacing};\n --chevron-border-thickness: ${theme.components.button['border-width']};\n --segmented-border-thickness: calc(2 * ${theme.components.button['border-width']});\n --segmented-width: ${segmentedConfig.width};\n border-radius: ${theme.components.card['border-radius']};\n display: flex;\n padding: 0;\n width: 100%;\n overflow-x: auto;\n overflow-y: hidden;\n list-style: none;\n scrollbar-width: thin;\n scrollbar-color: transparent transparent;\n\n ${isMilestone &&\n css`\n --milestone-size: calc(4 * ${theme.base.spacing});\n --milestone-pulse-min: calc(var(--milestone-size) * 0.1);\n --milestone-pulse-start: ${transparentize(0.5, theme.base.palette.interactive)};\n --milestone-pulse-spread: calc(var(--milestone-size) * 0.25);\n --milestone-pulse-end: ${transparentize(0.75, theme.base.palette.interactive)};\n padding-block: ${theme.base.spacing};\n padding-inline: calc(var(--milestone-size) * 0.25);\n `}\n\n &:hover,\n &:focus-within {\n scrollbar-color: var(\n --stages-scrollbar-thumb,\n ${transparentize(0.4, theme.base.palette['border-line'])}\n )\n var(--stages-scrollbar-track, transparent);\n }\n\n &::-webkit-scrollbar {\n height: 0.25rem;\n }\n\n @media (pointer: coarse) {\n /* 3.203 = exact alignment; slightly overdone default to clear sub-pixel rounding on 3× displays */\n --stages-coarse-notch-correction: 3.35;\n scrollbar-width: none;\n\n &::-webkit-scrollbar {\n display: none;\n }\n }\n `;\n});\n\nStyledStages.defaultProps = defaultThemeProp;\n\n/**\n * A sentinel is an invisible 1 px <li> placed at each end of the scrollable stage list.\n * It is observed by an IntersectionObserver; when it scrolls out of view, the component sets\n * --stages-fade-start or --stages-fade-end to show a gradient fade indicating more stages\n * are reachable by scrolling. When it comes back into view the property is reset to 0.\n *\n * Sentinel elements carry aria-hidden=\"true\" so they are valid list items semantically.\n * Because styled-components scopes all CSS to a generated class, the chevron and layout rules\n * in StyledStageContainer never apply to these elements — they carry a different class.\n * CSS type-based selectors (:nth-of-type, :nth-last-of-type) in StyledStageContainer are\n * offset by 1 at each end to skip the sentinels and target only real stage items.\n */\nexport const StyledSentinel = styled.li`\n flex-shrink: 0;\n\n /* NOTE: the sentinel must occupy\n * a single physical pixel so IntersectionObserver can detect it at threshold 0 while having\n * negligible layout impact. A rem value could collapse to zero at small font sizes.\n */\n /* stylelint-disable-next-line unit-allowed-list -- 1px is intentional */\n width: 1px;\n /* stylelint-disable-next-line unit-allowed-list -- 1px is intentional */\n height: 1px;\n padding: 0;\n margin: 0;\n pointer-events: none;\n\n /* Collapse the sentinel's layout footprint to zero on the side facing the stages.\n * Without this, each 1px sentinel creates a visible gap between the stage buttons\n * and the left/right edges of the wrapper. The sentinel remains in flow (required\n * for IntersectionObserver scroll detection) but no longer displaces stage content.\n */\n &:first-of-type {\n /* stylelint-disable-next-line unit-allowed-list -- 1px matches sentinel width */\n margin-inline-end: -1px;\n }\n\n &:last-of-type {\n /* stylelint-disable-next-line unit-allowed-list -- 1px matches sentinel width */\n margin-inline-start: -1px;\n }\n`;\n\nStyledSentinel.defaultProps = defaultThemeProp;\n\n/**\n * Inner `<span>` holding stage label content. Optionally applies `text-overflow: ellipsis`\n * for stages with long labels.\n */\nexport const StyledInnerStage = styled.span<{ ellipsis?: boolean }>(({ theme, ellipsis }) => {\n return css`\n display: inline-flex;\n align-items: center;\n gap: calc(0.25 * ${theme.base.spacing});\n text-align: center;\n white-space: nowrap;\n padding-inline-start: calc(0.875 * ${theme.base.spacing});\n padding-inline-end: calc(1.125 * ${theme.base.spacing});\n ${ellipsis &&\n css`\n overflow: hidden;\n text-overflow: ellipsis;\n `}\n `;\n});\n\nStyledInnerStage.defaultProps = defaultThemeProp;\n\nconst stageButtonChevronStyles = (theme: DefaultTheme) => css`\n padding-inline-start: calc(2 * var(--chevron-spacing));\n padding-inline-end: var(--chevron-spacing);\n width: calc(100% + ${chevronConfig.width});\n --stage-chevron-width: ${chevronConfig.width};\n\n ${StyledInnerStage} {\n transform: translateX(calc(-0.25 * var(--chevron-spacing)));\n opacity: ${theme.base.transparency['transparent-2']};\n }\n\n ${stageClipPath(true, true)}\n\n [dir='rtl'] & ${StyledInnerStage} {\n transform: translateX(calc(0.25 * var(--chevron-spacing)));\n }\n\n [dir='rtl'] & {\n ${stageClipPath(true, true, true)}\n }\n\n @media (pointer: coarse) {\n padding-inline-start: calc(2.25 * var(--chevron-spacing));\n width: calc(100% + ${chevronConfig.coarseWidth});\n --stage-chevron-width: ${chevronConfig.coarseWidth};\n }\n`;\n\nconst stageButtonSegmentedStyles = (theme: DefaultTheme) => css`\n width: 100%;\n padding-inline-start: calc(var(--segmented-width) + var(--chevron-spacing));\n padding-inline-end: calc(var(--segmented-width) + var(--chevron-spacing));\n\n ${StyledInnerStage} {\n opacity: ${theme.base.transparency['transparent-2']};\n }\n\n ${segmentedClipPath(true, true)}\n\n [dir='rtl'] & {\n ${segmentedClipPath(true, true, true)}\n }\n`;\n\nconst stageButtonVariants: Record<StageVariant, (theme: DefaultTheme) => ReturnType<typeof css>> = {\n chevron: stageButtonChevronStyles,\n segmented: stageButtonSegmentedStyles,\n milestone: () => css``\n};\n\n/**\n * Clickable `<button>` for a single stage. Renders the chevron clip-path shape and\n * applies status-based background and foreground colours.\n */\nexport const StyledStage = styled.button<{\n status: 'completed' | 'current' | 'pending';\n readOnly?: boolean;\n variant: StageVariant;\n}>(\n ({\n theme,\n theme: {\n base: { palette, 'hit-area': hitArea, transparency, 'font-weight': fontWeight },\n components: {\n 'case-view': { stages }\n }\n },\n status,\n readOnly,\n variant: shape\n }) => {\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: calc(2 * var(--chevron-border-thickness)) 0;\n border-style: solid;\n position: relative;\n\n /* Browsers do not reliably apply flex align-items: stretch to <button> elements.\n * Adding 0.0625rem (1px at default font size) to min-height compensates so the button fills its <li> container,\n * keeping the clipped chevron background flush with the top and bottom borders. */\n min-height: calc(5 * var(--chevron-spacing) + 0.0625rem);\n margin-inline-start: 0;\n margin-inline-end: 0;\n\n ${stageButtonVariants[shape](theme)}\n\n ${!readOnly &&\n css`\n &:hover {\n border-color: ${palette['border-line']};\n }\n `}\n\n &:focus-visible {\n border-color: ${palette.interactive};\n }\n\n &:active {\n border-color: ${palette.interactive};\n\n ${StyledInnerStage} {\n opacity: ${transparency['transparent-3']};\n }\n }\n\n &[aria-current] {\n ${StyledInnerStage} {\n font-weight: ${fontWeight.bold};\n opacity: 1;\n }\n\n ${!readOnly &&\n css`\n &:hover {\n ${StyledInnerStage} {\n opacity: ${transparency['transparent-2']};\n }\n }\n `}\n }\n\n @media (pointer: coarse) {\n min-height: ${hitArea['finger-min']};\n }\n `;\n }\n);\n\nStyledStage.defaultProps = defaultThemeProp;\n\n/**\n * Checkmark icon shown inside completed stages, tinted to match the stage foreground colour.\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});\n\nStyledStageCompleteIcon.defaultProps = defaultThemeProp;\n\n/**\n * Stage label text. Renders in bold weight when the stage is the current active stage.\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\nconst stageContainerChevronStyles = (theme: DefaultTheme, readOnly: boolean | undefined) => {\n const includeHover = !readOnly;\n return css`\n /* Chevron: negative-margin overlap so consecutive stages share a boundary */\n margin-inline-start: calc(-1 * ${chevronConfig.width});\n\n &:nth-of-type(2) {\n margin-inline-start: 0;\n }\n\n /* Chevron boundary indicators via ::before (left notch) and ::after (right point) pseudo-elements */\n &:not(:nth-of-type(-n + 2))::before {\n ${createChevronPseudo(\n 'calc(2 * var(--chevron-border-thickness))',\n theme.base.palette['border-line'],\n chevronConfig.squareSize\n )}\n /* Elevate ::before above the button so it renders via the same pathway as ::after.\n * Without z-index, ::before (first in DOM) is painted first and then covered by the\n * button, making it only partially visible through the clip-path notch window. This\n * causes thicker interactive-state borders (3×) to look thinner on the left boundary\n * than on the right (::after, which paints last and is always fully visible).\n * The ::before tip's rightmost extent is at --stage-chevron-width from the <li> start,\n * which is before the stage text (padding-inline-start: 2 × spacing), so no content overlap.\n */\n z-index: 1;\n }\n\n &:not(:nth-last-of-type(-n + 2))::after {\n ${createChevronPseudo(\n 'calc(2 * var(--chevron-border-thickness))',\n theme.base.palette['border-line'],\n chevronConfig.squareSize\n )}\n }\n\n [dir='rtl'] &::before,\n [dir='rtl'] &::after {\n transform: rotateZ(-45deg) skew(-15deg, -15deg);\n }\n\n /* Chevron positioning: 45° rotated squares create visual tips via offsets:\n * left ≈ 0.86 × spacing, right ≈ 1.445 × spacing (accounts for skew correction)\n */\n ${createChevronBaseStyles(chevronConfig, 'var(--chevron-border-thickness)')}\n ${createChevronInteractiveStates(\n chevronConfig,\n 'var(--chevron-border-thickness)',\n includeHover\n )}\n\n /* Thicken chevrons to visually match button top/bottom border on any colored state.\n * At 45° rotation, border appears 1/sin(45°) ≈ 0.707× thinner, so 2× border ≈ 1.4× horizontal border weight.\n */\n ${includeHover &&\n css`\n &:has(button:hover)::before,\n &:has(button:hover)::after {\n border-color: ${theme.base.palette['border-line']};\n }\n `}\n\n &:has(button:focus-visible)::before,\n &:has(button:focus-visible)::after {\n border-color: ${theme.base.palette.interactive};\n }\n\n &:has(button:active)::before,\n &:has(button:active)::after {\n border-color: ${theme.base.palette.interactive};\n }\n\n /* First stage: no left notch, extended width to cover the full left edge */\n &:nth-of-type(2):not(:nth-last-of-type(2)) > ${StyledStage} {\n --stage-chevron-width: ${chevronConfig.width};\n width: calc(100% + (2 * var(--stage-chevron-width)));\n padding-inline-start: calc(var(--chevron-spacing));\n ${stageClipPath(false, true)}\n\n ${includeHover &&\n css`\n /* Inline-start interactive indicator via inset shadow — avoids border-color bleeding through gradient backgrounds */\n &:hover {\n box-shadow: inset calc(2 * var(--chevron-border-thickness)) 0 0\n ${theme.base.palette['border-line']};\n\n [dir='rtl'] & {\n box-shadow: inset calc(-2 * var(--chevron-border-thickness)) 0 0\n ${theme.base.palette['border-line']};\n }\n }\n `}\n\n &:focus-visible,\n &:active {\n box-shadow: inset calc(2 * var(--chevron-border-thickness)) 0 0\n ${theme.base.palette.interactive};\n\n [dir='rtl'] & {\n box-shadow: inset calc(-2 * var(--chevron-border-thickness)) 0 0\n ${theme.base.palette.interactive};\n }\n }\n\n @media (pointer: coarse) {\n --stage-chevron-width: ${chevronConfig.coarseWidth};\n width: calc(100% + (2 * var(--stage-chevron-width)));\n }\n }\n\n /* Last stage: no right point */\n &:nth-last-of-type(2):not(:nth-of-type(2)) > ${StyledStage} {\n --stage-chevron-width: ${chevronConfig.width};\n padding-inline-end: 0;\n width: 100%;\n ${stageClipPath(true, false)}\n\n ${includeHover &&\n css`\n /* Inline-end interactive indicator via inset shadow — avoids border-color bleeding through gradient backgrounds */\n &:hover {\n box-shadow: inset calc(-2 * var(--chevron-border-thickness)) 0 0\n ${theme.base.palette['border-line']};\n\n [dir='rtl'] & {\n box-shadow: inset calc(2 * var(--chevron-border-thickness)) 0 0\n ${theme.base.palette['border-line']};\n }\n }\n `}\n\n &:focus-visible,\n &:active {\n box-shadow: inset calc(-2 * var(--chevron-border-thickness)) 0 0\n ${theme.base.palette.interactive};\n\n [dir='rtl'] & {\n box-shadow: inset calc(2 * var(--chevron-border-thickness)) 0 0\n ${theme.base.palette.interactive};\n }\n }\n\n @media (pointer: coarse) {\n --stage-chevron-width: ${chevronConfig.coarseWidth};\n }\n }\n\n /* RTL: flip clip-paths for first and last stages */\n [dir='rtl'] &:nth-of-type(2):not(:nth-last-of-type(2)) > ${StyledStage} {\n ${stageClipPath(true, false, true)}\n }\n\n [dir='rtl'] &:nth-last-of-type(2):not(:nth-of-type(2)) > ${StyledStage} {\n ${stageClipPath(false, true, true)}\n }\n\n /* Single stage: plain rectangle — no clip-path notch, inset shadows on both sides */\n &:nth-of-type(2):nth-last-of-type(2) > ${StyledStage} {\n --stage-chevron-width: ${chevronConfig.width};\n clip-path: none;\n padding-inline-start: calc(var(--chevron-spacing));\n\n ${includeHover &&\n css`\n &:hover {\n box-shadow:\n inset calc(2 * var(--chevron-border-thickness)) 0 0 ${theme.base.palette['border-line']},\n inset calc(-2 * var(--chevron-border-thickness)) 0 0\n ${theme.base.palette['border-line']};\n }\n `}\n\n &:focus-visible,\n &:active {\n box-shadow:\n inset calc(2 * var(--chevron-border-thickness)) 0 0 ${theme.base.palette.interactive},\n inset calc(-2 * var(--chevron-border-thickness)) 0 0 ${theme.base.palette.interactive};\n }\n\n @media (pointer: coarse) {\n --stage-chevron-width: ${chevronConfig.coarseWidth};\n }\n }\n\n @media (pointer: coarse) {\n margin-inline-start: calc(-1 * ${chevronConfig.coarseWidth});\n\n &:not(:nth-of-type(-n + 2))::before,\n &:not(:nth-last-of-type(-n + 2))::after {\n inset-block-start: calc(50% - ${chevronConfig.coarseSquareSize} / 2);\n width: ${chevronConfig.coarseSquareSize};\n height: ${chevronConfig.coarseSquareSize};\n border-inline-end-width: calc(2 * var(--chevron-border-thickness));\n border-block-start-width: calc(2 * var(--chevron-border-thickness));\n }\n\n &:not(:nth-of-type(-n + 2))::before {\n inset-inline-start: ${chevronConfig.coarseNotchInsetStart};\n }\n\n &:not(:nth-last-of-type(-n + 2))::after {\n inset-inline-end: 0;\n }\n }\n `;\n};\n\nconst stageContainerSegmentedStyles = (theme: DefaultTheme, readOnly: boolean | undefined) => {\n const includeHover = !readOnly;\n\n return css`\n --segmented-edge-thickness: var(--chevron-border-thickness);\n\n /* Segmented: stages overlap by --segmented-width so parallelogram edges meet flush */\n margin-inline-start: calc(-1 * var(--segmented-width));\n\n &:nth-of-type(2) {\n margin-inline-start: 0;\n }\n\n /* Left segmented border strip: diagonal clip-path on each stage's inline-start edge (stages 2..N).\n * The strip goes from (segmented-width, 0%) at top to (0%, 100%) at bottom of the pseudo,\n * matching the parallelogram's inline-start clip edge exactly.\n */\n &:not(:nth-of-type(-n + 2))::before {\n content: '';\n position: absolute;\n inset-block: 0;\n inset-inline-start: 0;\n width: calc(var(--segmented-width) + var(--segmented-edge-thickness));\n clip-path: polygon(\n var(--segmented-width) 0%,\n calc(var(--segmented-width) + var(--segmented-edge-thickness)) 0%,\n var(--segmented-edge-thickness) 100%,\n 0% 100%\n );\n background: ${theme.base.palette['border-line']};\n pointer-events: none;\n z-index: 1;\n }\n\n /* Right segmented border strip: diagonal clip-path on each stage's inline-end edge (stages 1..N-1). */\n &:not(:nth-last-of-type(-n + 2))::after {\n content: '';\n position: absolute;\n inset-block: 0;\n inset-inline-end: 0;\n width: calc(var(--segmented-width) + var(--segmented-edge-thickness));\n clip-path: polygon(\n var(--segmented-width) 0%,\n calc(var(--segmented-width) + var(--segmented-edge-thickness)) 0%,\n var(--segmented-edge-thickness) 100%,\n 0% 100%\n );\n background: ${theme.base.palette['border-line']};\n pointer-events: none;\n z-index: 2;\n }\n\n /* Interactive states: update pseudo background to signal hover/focus/active */\n ${includeHover &&\n css`\n &:has(button:hover) {\n --segmented-edge-thickness: var(--segmented-border-thickness);\n }\n\n &:has(button:hover)::before,\n &:has(button:hover)::after {\n background: ${theme.base.palette['border-line']};\n }\n `}\n\n &:has(button:focus-visible),\n &:has(button:active) {\n --segmented-edge-thickness: var(--segmented-border-thickness);\n }\n\n &:has(button:focus-visible)::before,\n &:has(button:focus-visible)::after,\n &:has(button:active)::before,\n &:has(button:active)::after {\n background: ${theme.base.palette.interactive};\n }\n\n /* First stage (no inline-start cut): flat left edge + inset shadow edge indicator */\n &:nth-of-type(2):not(:nth-last-of-type(2)) > ${StyledStage} {\n ${segmentedClipPath(false, true)}\n\n ${includeHover &&\n css`\n &:hover {\n box-shadow: inset var(--segmented-border-thickness) 0 0\n ${theme.base.palette['border-line']};\n\n [dir='rtl'] & {\n box-shadow: inset calc(-1 * var(--segmented-border-thickness)) 0 0\n ${theme.base.palette['border-line']};\n }\n }\n `}\n\n &:focus-visible,\n &:active {\n box-shadow: inset var(--segmented-border-thickness) 0 0 ${theme.base.palette.interactive};\n\n [dir='rtl'] & {\n box-shadow: inset calc(-1 * var(--segmented-border-thickness)) 0 0\n ${theme.base.palette.interactive};\n }\n }\n }\n\n /* Last stage (no inline-end cut): flat right edge + inset shadow edge indicator */\n &:nth-last-of-type(2):not(:nth-of-type(2)) > ${StyledStage} {\n ${segmentedClipPath(true, false)}\n\n ${includeHover &&\n css`\n &:hover {\n box-shadow: inset calc(-1 * var(--segmented-border-thickness)) 0 0\n ${theme.base.palette['border-line']};\n\n [dir='rtl'] & {\n box-shadow: inset var(--segmented-border-thickness) 0 0\n ${theme.base.palette['border-line']};\n }\n }\n `}\n\n &:focus-visible,\n &:active {\n box-shadow: inset calc(-1 * var(--segmented-border-thickness)) 0 0\n ${theme.base.palette.interactive};\n\n [dir='rtl'] & {\n box-shadow: inset var(--segmented-border-thickness) 0 0 ${theme.base.palette.interactive};\n }\n }\n }\n\n /* RTL: flip clip-paths for first and last stage buttons */\n [dir='rtl'] &:nth-of-type(2):not(:nth-last-of-type(2)) > ${StyledStage} {\n ${segmentedClipPath(true, false, true)}\n }\n\n [dir='rtl'] &:nth-last-of-type(2):not(:nth-of-type(2)) > ${StyledStage} {\n ${segmentedClipPath(false, true, true)}\n }\n\n /* Single stage: plain rectangle — no diagonal cuts, inset shadows on both sides */\n &:nth-of-type(2):nth-last-of-type(2) > ${StyledStage} {\n clip-path: none;\n padding-inline-start: calc(var(--chevron-spacing));\n padding-inline-end: calc(var(--chevron-spacing));\n\n ${includeHover &&\n css`\n &:hover {\n box-shadow:\n inset var(--segmented-border-thickness) 0 0 ${theme.base.palette['border-line']},\n inset calc(-1 * var(--segmented-border-thickness)) 0 0\n ${theme.base.palette['border-line']};\n }\n `}\n\n &:focus-visible,\n &:active {\n box-shadow:\n inset var(--segmented-border-thickness) 0 0 ${theme.base.palette.interactive},\n inset calc(-1 * var(--segmented-border-thickness)) 0 0 ${theme.base.palette.interactive};\n }\n }\n\n /* RTL: mirror the pseudo clip-paths.\n * In LTR the strip goes top-right → bottom-left (polygon A 0%, A+B 0%, B 100%, 0% 100%).\n * In RTL the pseudo is positioned at the opposite physical edge via logical inset properties,\n * so the strip must go top-left → bottom-right to stay aligned with the flipped slant.\n */\n [dir='rtl'] &:not(:nth-of-type(-n + 2))::before,\n [dir='rtl'] &:not(:nth-last-of-type(-n + 2))::after {\n clip-path: polygon(\n 0% 0%,\n var(--segmented-edge-thickness) 0%,\n calc(var(--segmented-width) + var(--segmented-edge-thickness)) 100%,\n var(--segmented-width) 100%\n );\n }\n\n @media (pointer: coarse) {\n /* A single CSS custom property update propagates to all margin and clip-path consumers */\n --segmented-width: ${segmentedConfig.coarseWidth};\n }\n `;\n};\n\nconst stageContainerVariants: Record<\n StageVariant,\n (theme: DefaultTheme, readOnly: boolean | undefined) => ReturnType<typeof css>\n> = {\n chevron: stageContainerChevronStyles,\n segmented: stageContainerSegmentedStyles,\n milestone: () => css``\n};\n\n/**\n * `<li>` container for a single stage item. Manages negative-margin chevron overlap,\n * pseudo-element positioning, and z-index stacking for interactive states.\n */\nexport const StyledStageContainer = styled.li<{\n readOnly?: boolean;\n variant: StageVariant;\n}>(\n ({\n theme,\n theme: {\n components: {\n card: { 'border-radius': borderRadius }\n }\n },\n readOnly,\n variant: shape\n }) => {\n return css`\n display: flex;\n position: relative;\n\n /* Resting z-index: for same-z siblings, DOM order determines paint order.\n * All non-last <li>s have z-index:1 so the later (right) <li>'s ::before paints on top\n * at internal boundaries; the last <li> has no z-index so its left neighbor's ::after\n * wins at the final boundary. On hover/focus/active, the interacting <li> gains z:2/3\n * and its own pseudo-element surfaces for that boundary, regardless of which side.\n */\n &:not(:nth-last-of-type(-n + 2)) {\n z-index: 1;\n }\n\n &:has(button:focus-visible),\n &:has(button:active) {\n z-index: 2;\n }\n\n ${!readOnly &&\n css`\n &:has(button:hover) {\n z-index: 3;\n }\n `}\n\n /* Corner radii are shared across all shape variants */\n &:nth-of-type(2):not(:nth-last-of-type(2)) > ${StyledStage} {\n border-start-start-radius: ${borderRadius};\n border-end-start-radius: ${borderRadius};\n }\n\n &:nth-last-of-type(2):not(:nth-of-type(2)) > ${StyledStage} {\n border-start-end-radius: ${borderRadius};\n border-end-end-radius: ${borderRadius};\n }\n\n &:nth-of-type(2):nth-last-of-type(2) > ${StyledStage} {\n border-radius: ${borderRadius};\n width: 100%;\n }\n\n ${stageContainerVariants[shape](theme, readOnly)}\n `;\n }\n);\n\nStyledStageContainer.defaultProps = defaultThemeProp;\n\n/**\n * `<ol>` list of sub-step items displayed below the stages bar when a stage is expanded.\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\n/**\n * Individual step `<li>` within a stage. Dims text and icon at reduced opacity when completed.\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\n/**\n * Small datetime label rendered beneath a step. Displayed at the `xs` font size\n * and reduced opacity.\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\n/**\n * Container `<div>` for the stage glimpse preview panel, constrained to a small max-width.\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\nconst milestonePulse = keyframes`\n 0%, 100% {\n box-shadow: 0 0 0 var(--milestone-pulse-min) var(--milestone-pulse-start);\n }\n 60% {\n box-shadow: 0 0 0 var(--milestone-pulse-spread) var(--milestone-pulse-end);\n }\n`;\n\nexport const StyledMilestoneLabel = styled.span(({ theme }) => {\n return css`\n color: ${theme.base.palette['foreground-color']};\n line-height: ${theme.base['line-height']};\n text-align: center;\n align-self: stretch;\n overflow-wrap: break-word;\n padding-inline: calc(0.25 * ${theme.base.spacing});\n `;\n});\n\nStyledMilestoneLabel.defaultProps = defaultThemeProp;\n\n/**\n * `<li>` container for a single stage item in the 'milestone' shape variant.\n * Renders column-flex layout (milestone above, label below) and draws the\n * horizontal connector as a single line from this milestone's centre to the next\n * milestone's centre (::after), sized so every connector has an identical length.\n */\nexport const StyledMilestoneStageContainer = styled.li<{\n status: 'completed' | 'current' | 'pending';\n connectorFilled: boolean;\n readOnly?: boolean;\n}>(({ theme, connectorFilled, status }) => {\n const {\n base: {\n palette: { interactive, 'border-line': borderLine },\n spacing\n }\n } = theme;\n\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n --connector-height: ${connectorFilled ? '0.25rem' : '0.125rem'};\n --connector-display: block;\n --connector-start: 50%;\n --connector-width: 100%;\n --connector-bg: ${connectorFilled ? interactive : borderLine};\n --connector-forced-bg: ${connectorFilled ? 'Highlight' : 'CanvasText'};\n display: flex;\n flex-direction: column;\n align-items: center;\n flex: 1 0 0;\n font-size: ${fontSize.xs};\n font-weight: ${status === 'current'\n ? theme.base['font-weight']['semi-bold']\n : theme.base['font-weight'].normal};\n min-width: 15ch;\n position: relative;\n gap: ${spacing};\n z-index: 1;\n\n &:nth-of-type(2):not(:nth-last-of-type(2)) {\n --connector-start: calc(var(--milestone-size) / 2);\n --connector-width: calc(200% - var(--milestone-size));\n align-items: flex-start;\n flex: 0.5 0 calc(var(--milestone-size) / 2);\n min-width: calc(7.5ch + var(--milestone-size) / 2);\n\n ${StyledMilestoneLabel} {\n text-align: start;\n }\n }\n\n &:nth-last-of-type(2):not(:nth-of-type(2)) {\n --connector-display: none;\n align-items: flex-end;\n flex: 0.5 0 calc(var(--milestone-size) / 2);\n min-width: calc(7.5ch + var(--milestone-size) / 2);\n\n ${StyledMilestoneLabel} {\n text-align: end;\n }\n }\n\n &:nth-of-type(2):nth-last-of-type(2) {\n --connector-display: none;\n align-items: center;\n flex: 1 0 0;\n }\n\n &::after {\n content: '';\n display: var(--connector-display);\n position: absolute;\n inset-block-start: calc(var(--milestone-size) / 2 - var(--connector-height) / 2);\n inset-inline-start: var(--connector-start);\n width: var(--connector-width);\n height: var(--connector-height);\n background: var(--connector-bg);\n pointer-events: none;\n\n @media (forced-colors: active) {\n background: var(--connector-forced-bg);\n }\n }\n `;\n});\n\nStyledMilestoneStageContainer.defaultProps = defaultThemeProp;\n\nexport const StyledMilestoneButton = styled.button<{\n status: 'completed' | 'current' | 'pending';\n readOnly?: boolean;\n}>(({ theme, status, readOnly }) => {\n const {\n base: {\n 'hit-area': hitArea,\n animation: {\n speed: animationSpeed,\n timing: { ease: animationTiming }\n },\n shadow: { focus: focusShadow }\n },\n components: {\n button: { 'border-width': borderWidth },\n 'case-view': { stages }\n }\n } = theme;\n\n const stageForeground = calculateForegroundColor(\n stages.status[status].background,\n stages.status[status]['foreground-color']\n );\n\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n const completedBorderColor =\n status === 'completed'\n ? tryCatch(\n () => darken(0.12, stages.status.completed.background),\n () => 'transparent'\n )\n : '';\n\n return css`\n position: relative;\n z-index: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n border-radius: 50%;\n width: var(--milestone-size);\n height: var(--milestone-size);\n background: ${stages.status[status].background};\n color: ${stageForeground};\n font-size: ${fontSize.s};\n font-weight: ${status === 'current'\n ? theme.base['font-weight']['semi-bold']\n : theme.base['font-weight'].normal};\n outline: none;\n border: none;\n cursor: ${readOnly ? 'default' : 'pointer'};\n transition: box-shadow calc(2 * ${animationSpeed}) ${animationTiming};\n\n ${status === 'completed' &&\n css`\n box-shadow: inset 0 0 0 calc(2 * ${borderWidth}) ${completedBorderColor};\n `}\n\n &:focus-visible {\n box-shadow: ${focusShadow};\n\n @media (forced-colors: active) {\n outline: 0.125rem solid Highlight;\n outline-offset: 0.125rem;\n }\n }\n\n ${!readOnly &&\n css`\n &:hover {\n filter: brightness(0.85);\n }\n\n &:active {\n filter: brightness(0.85);\n }\n `}\n\n ${status === 'current' &&\n !readOnly &&\n css`\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: 50%;\n pointer-events: none;\n animation: ${milestonePulse} 2s ease-out infinite;\n\n @media (prefers-reduced-motion: reduce) {\n animation: none;\n }\n }\n `}\n\n /* Expanded hit area */\n &::after {\n content: '';\n position: absolute;\n width: ${hitArea['mouse-min']};\n height: ${hitArea['mouse-min']};\n inset-block-start: calc((${hitArea['mouse-min']} - var(--milestone-size)) / -2);\n inset-inline-start: calc((${hitArea['mouse-min']} - var(--milestone-size)) / -2);\n\n @media (pointer: coarse) {\n width: ${hitArea['finger-min']};\n height: ${hitArea['finger-min']};\n inset-block-start: calc((${hitArea['finger-min']} - var(--milestone-size)) / -2);\n inset-inline-start: calc((${hitArea['finger-min']} - var(--milestone-size)) / -2);\n }\n }\n\n @media (forced-colors: active) {\n border: 0.125rem solid ButtonText;\n }\n `;\n});\n\nStyledMilestoneButton.defaultProps = defaultThemeProp;\n\n/**\n * Visually hidden `<p>` providing an accessible description for the stages list,\n * announced by screen readers but not displayed on screen.\n */\nexport const StyledStagesDescription = styled.p`\n display: none;\n`;\n\nStyledStagesDescription.defaultProps = defaultThemeProp;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/cosmos-react-work",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.22.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.
|
|
18
|
-
"@pega/cosmos-react-rte": "9.
|
|
17
|
+
"@pega/cosmos-react-core": "9.22.0",
|
|
18
|
+
"@pega/cosmos-react-rte": "9.22.0",
|
|
19
19
|
"@types/react": "^17.0.62 || ^18.3.3",
|
|
20
20
|
"@types/react-dom": "^17.0.20 || ^18.3.0",
|
|
21
21
|
"polished": "^4.1.0",
|