@pega/cosmos-react-wss 10.0.0-build.16.6 → 10.0.0-build.16.8

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.
@@ -2,6 +2,7 @@ import type { DefaultTheme } from 'styled-components';
2
2
  export declare const StyledModernCaseView: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
3
3
  $isCreateStage?: boolean;
4
4
  }>> & string;
5
+ export declare const StyledModernContentContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
5
6
  export declare const StyledModernCaseHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {
6
7
  $color?: string;
7
8
  $isSmallOrAbove?: boolean;
@@ -20,7 +21,6 @@ export declare const StyledModernCaseHeaderPromotedAction: import("styled-compon
20
21
  }, {
21
22
  $color?: string;
22
23
  }>> & string & Omit<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").ButtonProps>, keyof import("react").Component<any, {}, any>>;
23
- export declare const StyledModernContentContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
24
24
  export declare const StyledModernContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
25
25
  export declare const StyledModernSummary: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
26
26
  export declare const StyledModernSummaryFieldsDivider: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHRElement>, HTMLHRElement>, never>> & string;
@@ -1 +1 @@
1
- {"version":3,"file":"ModernCaseView.styles.d.ts","sourceRoot":"","sources":["../../../src/components/ModernCaseView/ModernCaseView.styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AA+FtD,eAAO,MAAM,oBAAoB;qBAAiC,OAAO;YASxE,CAAC;AAIF,eAAO,MAAM,sBAAsB;aACxB,MAAM;sBACG,OAAO;YAczB,CAAC;AAIH,eAAO,MAAM,0BAA0B;aAAyB,MAAM;YAiBpE,CAAC;AAIH,eAAO,MAAM,0BAA0B,6NAEtC,CAAC;AAIF,mFAAmF;AACnF,eAAO,MAAM,8BAA8B,GACzC,OAAO,YAAY,EACnB,OAAO,MAAM,GAAG,SAAS,KACxB,MAUF,CAAC;AAEF,eAAO,MAAM,wBAAwB;aAA2B,MAAM;0JAoCpE,CAAC;AAIH,eAAO,MAAM,oCAAoC;;;aAA6B,MAAM;oLAyBlF,CAAC;AAIH,eAAO,MAAM,4BAA4B,6NAuBvC,CAAC;AAIH,eAAO,MAAM,mBAAmB,6NAO9B,CAAC;AAIH,eAAO,MAAM,mBAAmB,6NAO9B,CAAC;AAIH,eAAO,MAAM,gCAAgC,2NAO3C,CAAC;AAIH,eAAO,MAAM,8BAA8B;;;sBACvB,OAAO;YASzB,CAAC;AAIH,eAAO,MAAM,gCAAgC;sBACzB,OAAO;YAYzB,CAAC;AAIH,eAAO,MAAM,uBAAuB;;yLAclC,CAAC;AAIH,eAAO,MAAM,2BAA2B,6NAKvC,CAAC"}
1
+ {"version":3,"file":"ModernCaseView.styles.d.ts","sourceRoot":"","sources":["../../../src/components/ModernCaseView/ModernCaseView.styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AA+FtD,eAAO,MAAM,oBAAoB;qBAAiC,OAAO;YASxE,CAAC;AAIF,eAAO,MAAM,4BAA4B,6NAuBvC,CAAC;AAIH,eAAO,MAAM,sBAAsB;aACxB,MAAM;sBACG,OAAO;YAgCzB,CAAC;AAIH,eAAO,MAAM,0BAA0B;aAAyB,MAAM;YAiBpE,CAAC;AAIH,eAAO,MAAM,0BAA0B,6NAEtC,CAAC;AAIF,mFAAmF;AACnF,eAAO,MAAM,8BAA8B,GACzC,OAAO,YAAY,EACnB,OAAO,MAAM,GAAG,SAAS,KACxB,MAUF,CAAC;AAEF,eAAO,MAAM,wBAAwB;aAA2B,MAAM;0JAoCpE,CAAC;AAIH,eAAO,MAAM,oCAAoC;;;aAA6B,MAAM;oLAyBlF,CAAC;AAIH,eAAO,MAAM,mBAAmB,6NAO9B,CAAC;AAIH,eAAO,MAAM,mBAAmB,6NAO9B,CAAC;AAIH,eAAO,MAAM,gCAAgC,2NAO3C,CAAC;AAIH,eAAO,MAAM,8BAA8B;;;sBACvB,OAAO;YASzB,CAAC;AAIH,eAAO,MAAM,gCAAgC;sBACzB,OAAO;YAYzB,CAAC;AAIH,eAAO,MAAM,uBAAuB;;yLAclC,CAAC;AAIH,eAAO,MAAM,2BAA2B,6NAKvC,CAAC"}
@@ -47,12 +47,54 @@ export const StyledModernCaseView = styled.div(({ $isCreateStage }) => css `
47
47
  }
48
48
  `);
49
49
  StyledModernCaseView.defaultProps = defaultThemeProp;
50
+ export const StyledModernContentContainer = styled.div(({ theme }) => {
51
+ const { breakpoints } = theme.base;
52
+ return css `
53
+ width: 100%;
54
+ margin-inline: auto;
55
+
56
+ @media screen and (min-width: ${breakpoints.md}) {
57
+ width: 85%;
58
+ }
59
+
60
+ @media screen and (min-width: ${breakpoints.lg}) {
61
+ max-width: ${theme.base['content-width'].xl};
62
+ }
63
+
64
+ & > div {
65
+ width: 100%;
66
+ }
67
+
68
+ ${StyledButton} {
69
+ margin-inline-start: 0;
70
+ }
71
+ `;
72
+ });
73
+ StyledModernContentContainer.defaultProps = defaultThemeProp;
50
74
  export const StyledModernCaseHeader = styled.header(({ theme, $color, $isSmallOrAbove }) => {
51
- const { foregroundColor } = getModernCaseViewColors(theme, $color);
75
+ const { breakpoints, spacing } = theme.base;
76
+ const { headerBackground, foregroundColor } = getModernCaseViewColors(theme, $color);
52
77
  return css `
53
78
  position: relative;
54
- background: transparent;
79
+ width: calc(100% - 4 * ${spacing});
80
+ margin-inline: auto;
81
+ background: ${headerBackground};
55
82
  color: ${foregroundColor};
83
+ border-end-start-radius: ${theme.components.card['border-radius']};
84
+ border-end-end-radius: ${theme.components.card['border-radius']};
85
+
86
+ > ${StyledModernContentContainer} {
87
+ width: 100%;
88
+ max-width: 100%;
89
+ }
90
+
91
+ @media screen and (min-width: ${breakpoints.md}) {
92
+ width: calc(85% - 4 * ${spacing});
93
+ }
94
+
95
+ @media screen and (min-width: ${breakpoints.lg}) {
96
+ max-width: calc(${theme.base['content-width'].xl} - 4 * ${spacing});
97
+ }
56
98
 
57
99
  h1 {
58
100
  color: ${foregroundColor};
@@ -149,30 +191,6 @@ export const StyledModernCaseHeaderPromotedAction = styled(Button)(({ theme, $co
149
191
  `;
150
192
  });
151
193
  StyledModernCaseHeaderPromotedAction.defaultProps = defaultThemeProp;
152
- export const StyledModernContentContainer = styled.div(({ theme }) => {
153
- const { breakpoints } = theme.base;
154
- return css `
155
- width: 100%;
156
- margin-inline: auto;
157
-
158
- @media screen and (min-width: ${breakpoints.md}) {
159
- width: 85%;
160
- }
161
-
162
- @media screen and (min-width: ${breakpoints.lg}) {
163
- max-width: ${theme.base['content-width'].xl};
164
- }
165
-
166
- & > div {
167
- width: 100%;
168
- }
169
-
170
- ${StyledButton} {
171
- margin-inline-start: 0;
172
- }
173
- `;
174
- });
175
- StyledModernContentContainer.defaultProps = defaultThemeProp;
176
194
  export const StyledModernContent = styled.div(({ theme }) => {
177
195
  return css `
178
196
  ${StyledSummaryPrimaryList} {
@@ -1 +1 @@
1
- {"version":3,"file":"ModernCaseView.styles.js","sourceRoot":"","sources":["../../../src/components/ModernCaseView/ModernCaseView.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAElD,OAAO,EACL,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,YAAY,EACZ,UAAU,EACV,uBAAuB,EACvB,iBAAiB,EACjB,wBAAwB,EACxB,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,WAAW,EACX,QAAQ,EACT,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,yDAAyD,CAAC;AAC5F,OAAO,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AACtF,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,oBAAoB,EACrB,MAAM,iEAAiE,CAAC;AACzE,OAAO,EACL,YAAY,EACZ,gBAAgB,EACjB,MAAM,6DAA6D,CAAC;AAUrE,MAAM,uBAAuB,GAAG,CAC9B,KAAmB,EACnB,KAAyB,EAC8B,EAAE;IACzD,MAAM,qBAAqB,GAAG,oBAAoB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACjE,MAAM,gBAAgB,GACpB,qBAAqB;QACrB,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,KAAK,iBAAiB;QACpD,YAAY,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC;QAC5C,CAAC,CAAC,QAAQ,CACN,GAAG,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,qBAAqB,CAAC,EACxE,GAAG,EAAE,CAAC,KAAK,CAA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,UAAU,CAAC,IAAI,CAAC,OAAO;;;GAG7D,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,uBAAuB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAExD,MAAM,CAAC,MAAM,2BAA2B,GAAG,MAAM,CAAC,GAAG,CAAA;IACjD,gBAAgB;IAChB,YAAY;;;CAGf,CAAC;AAEF,2BAA2B,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport type { DefaultTheme } from 'styled-components';\nimport { getContrast, mix, rgba } from 'polished';\n\nimport {\n Button,\n Card,\n Icon,\n StyledButton,\n StyledCard,\n StyledStackedFieldValue,\n calculateFontSize,\n calculateForegroundColor,\n defaultThemeProp,\n isSolidColor,\n readableColor,\n readableHue,\n tryCatch\n} from '@pega/cosmos-react-core';\nimport { wcagContrast } from '@pega/cosmos-react-core/lib/styles/constants';\nimport { StyledCardContent } from '@pega/cosmos-react-core/lib/components/Card/CardContent';\nimport { StyledTabPanel } from '@pega/cosmos-react-core/lib/components/Tabs/TabPanel';\nimport {\n StyledSummaryPrimaryList,\n StyledSummarySecondaryList,\n resolveCaseTypeColor\n} from '@pega/cosmos-react-work/lib/components/CaseView/CaseView.styles';\nimport {\n StyledStages,\n StyledStagesRoot\n} from '@pega/cosmos-react-work/lib/components/Stages/Stages.styles';\n\ninterface ModernCaseViewColors {\n headerBackground: string;\n foregroundColor: string;\n elementBackground: string;\n interactiveColor: string;\n hoverBackground: string;\n}\n\nconst getCaseTypeHeaderColors = (\n theme: DefaultTheme,\n color: string | undefined\n): { headerBackground: string; foregroundColor: string } => {\n const resolvedCaseTypeColor = resolveCaseTypeColor(theme, color);\n const headerBackground =\n resolvedCaseTypeColor &&\n theme.base['case-type-colors'] === 'header-and-icon' &&\n isSolidColor(theme.components.card.background)\n ? tryCatch(\n () => mix(0.85, theme.components.card.background, resolvedCaseTypeColor),\n () => theme.components.card.background\n )\n : theme.components['case-view'].header.background;\n\n const foregroundColor = calculateForegroundColor(\n headerBackground,\n resolvedCaseTypeColor && theme.base['case-type-colors'] === 'header-and-icon'\n ? 'auto'\n : theme.components['case-view'].header['foreground-color'],\n theme\n );\n\n return { headerBackground, foregroundColor };\n};\n\nconst getModernCaseViewColors = (\n theme: DefaultTheme,\n color: string | undefined\n): ModernCaseViewColors => {\n const { interactive } = theme.base.palette;\n const { headerBackground, foregroundColor } = getCaseTypeHeaderColors(theme, color);\n\n const isGradientBackground = !isSolidColor(headerBackground);\n const elementBackground = isGradientBackground\n ? readableColor(foregroundColor)\n : headerBackground;\n\n const interactiveUsable = getContrast(elementBackground, interactive) >= wcagContrast.AA;\n const interactiveColor =\n !isGradientBackground && interactiveUsable ? interactive : foregroundColor;\n\n const hoverBackground =\n !isGradientBackground && interactiveUsable\n ? readableHue(interactive, interactiveColor)\n : rgba(readableColor(interactiveColor), 0.15);\n\n return {\n headerBackground,\n foregroundColor,\n elementBackground,\n interactiveColor,\n hoverBackground\n };\n};\n\nexport const StyledModernCaseView = styled.div<{ $isCreateStage?: boolean }>(\n ({ $isCreateStage }) => css`\n min-height: ${$isCreateStage ? 'calc(100vh - var(--appshell-total-offset, 3rem))' : 'inherit'};\n\n ${StyledTabPanel}${StyledTabPanel}${StyledTabPanel} ${StyledCard} {\n border: none;\n padding: 0;\n }\n `\n);\n\nStyledModernCaseView.defaultProps = defaultThemeProp;\n\nexport const StyledModernCaseHeader = styled.header<{\n $color?: string;\n $isSmallOrAbove?: boolean;\n}>(({ theme, $color, $isSmallOrAbove }) => {\n const { foregroundColor } = getModernCaseViewColors(theme, $color);\n\n return css`\n position: relative;\n background: transparent;\n color: ${foregroundColor};\n\n h1 {\n color: ${foregroundColor};\n min-width: ${$isSmallOrAbove ? theme.base['content-width'].xs : 'auto'};\n }\n `;\n});\n\nStyledModernCaseHeader.defaultProps = defaultThemeProp;\n\nexport const StyledModernCaseSubheading = styled.div<{ $color?: string }>(({ theme, $color }) => {\n const { foregroundColor } = getModernCaseViewColors(theme, $color);\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n color: ${foregroundColor};\n font-size: ${fontSize.xs};\n font-weight: normal;\n margin: 0;\n\n /* MetaList renders items as Text elements with explicit styles. */\n && li {\n color: inherit;\n font-size: inherit;\n font-weight: inherit;\n }\n `;\n});\n\nStyledModernCaseSubheading.defaultProps = defaultThemeProp;\n\nexport const StyledModernCaseHeaderText = styled.div`\n word-break: break-word;\n`;\n\nStyledModernCaseHeaderText.defaultProps = defaultThemeProp;\n\n/** Resolves `auto` accents to a solid palette color for the case icon gradient. */\nexport const resolveModernCaseViewIconColor = (\n theme: DefaultTheme,\n color: string | undefined\n): string => {\n const caseTypeColorsEnabled =\n theme.base['case-type-colors'] === 'icon-only' ||\n theme.base['case-type-colors'] === 'header-and-icon';\n const resolvedCaseTypeColor = caseTypeColorsEnabled\n ? resolveCaseTypeColor(theme, color)\n : undefined;\n const accent = theme.base.palette['brand-accent'];\n\n return resolvedCaseTypeColor ?? (accent === 'auto' ? theme.base.palette.dark : accent);\n};\n\nexport const StyledModernCaseViewIcon = styled(Icon)<{ $color?: string }>(({ theme, $color }) => {\n const caseTypeColorsEnabled =\n theme.base['case-type-colors'] === 'icon-only' ||\n theme.base['case-type-colors'] === 'header-and-icon';\n const resolvedCaseTypeColor = caseTypeColorsEnabled\n ? resolveCaseTypeColor(theme, $color)\n : undefined;\n\n return css`\n --icon-color: ${resolveModernCaseViewIconColor(theme, $color)};\n --gradient-start: oklch(from var(--icon-color) calc(l - 0.3) calc(c * 1.5) h);\n --gradient-mid: oklch(from var(--icon-color) l c h);\n --gradient-end: oklch(from var(--icon-color) calc(l + 0.5) calc(c * 1.5) h);\n flex-shrink: 0;\n\n ${theme.components['case-view'].icon.color !== 'auto' &&\n css`\n color: ${theme.components['case-view'].icon.color};\n `}\n\n ${theme.components['case-view'].icon.background !== 'auto' &&\n css`\n background: ${theme.components['case-view'].icon.background};\n `}\n\n ${theme.components['case-view'].icon.background === 'auto' &&\n resolvedCaseTypeColor &&\n css`\n background: ${resolvedCaseTypeColor};\n `}\n\n ${theme.components['case-view'].icon['box-shadow'] !== 'auto' &&\n css`\n box-shadow: ${theme.components['case-view'].icon['box-shadow']};\n `}\n `;\n});\n\nStyledModernCaseViewIcon.defaultProps = defaultThemeProp;\n\nexport const StyledModernCaseHeaderPromotedAction = styled(Button)<{ $color?: string }>(({\n theme,\n $color\n}) => {\n const { elementBackground, interactiveColor, hoverBackground } = getModernCaseViewColors(\n theme,\n $color\n );\n\n return css`\n --button-background-color: ${elementBackground};\n color: ${interactiveColor};\n background-color: transparent;\n border-color: ${interactiveColor};\n\n @media (hover: hover) {\n &:hover,\n &:active {\n --button-background-color: ${hoverBackground};\n color: ${interactiveColor};\n background-color: ${hoverBackground};\n border-color: ${interactiveColor};\n }\n }\n `;\n});\n\nStyledModernCaseHeaderPromotedAction.defaultProps = defaultThemeProp;\n\nexport const StyledModernContentContainer = styled.div(({ theme }) => {\n const { breakpoints } = theme.base;\n\n return css`\n width: 100%;\n margin-inline: auto;\n\n @media screen and (min-width: ${breakpoints.md}) {\n width: 85%;\n }\n\n @media screen and (min-width: ${breakpoints.lg}) {\n max-width: ${theme.base['content-width'].xl};\n }\n\n & > div {\n width: 100%;\n }\n\n ${StyledButton} {\n margin-inline-start: 0;\n }\n `;\n});\n\nStyledModernContentContainer.defaultProps = defaultThemeProp;\n\nexport const StyledModernContent = styled.div(({ theme }) => {\n return css`\n ${StyledSummaryPrimaryList} {\n grid-template-columns: auto 1fr;\n column-gap: calc(2 * ${theme.base.spacing});\n }\n `;\n});\n\nStyledModernContent.defaultProps = defaultThemeProp;\n\nexport const StyledModernSummary = styled.div(({ theme }) => {\n return css`\n background: ${theme.components.card.background};\n border-radius: ${theme.base['border-radius']};\n padding: calc(${theme.base.spacing} * 1.5);\n align-self: start;\n `;\n});\n\nStyledModernSummary.defaultProps = defaultThemeProp;\n\nexport const StyledModernSummaryFieldsDivider = styled.hr(({ theme }) => {\n return css`\n margin: 0 calc(2 * ${theme.base.spacing});\n border: none;\n border-block-start: ${theme.components.button['border-width']} solid\n ${theme.base.palette['border-line']};\n `;\n});\n\nStyledModernSummaryFieldsDivider.defaultProps = defaultThemeProp;\n\nexport const StyledModernSummaryPrimaryList = styled(StyledSummaryPrimaryList)<{\n $isSmallOrAbove?: boolean;\n}>(({ theme, $isSmallOrAbove }) => {\n return css`\n &&& {\n grid-template-columns: ${$isSmallOrAbove ? 'repeat(2, 1fr)' : '1fr'};\n column-gap: calc(2 * ${theme.base.spacing});\n row-gap: calc(2 * ${theme.base.spacing});\n }\n `;\n});\n\nStyledModernSummaryPrimaryList.defaultProps = defaultThemeProp;\n\nexport const StyledModernSummarySecondaryList = styled(StyledSummarySecondaryList)<{\n $isSmallOrAbove?: boolean;\n}>(({ theme, $isSmallOrAbove }) => {\n return css`\n &&& {\n grid-template-columns: ${$isSmallOrAbove ? 'repeat(2, 1fr)' : '1fr'};\n row-gap: calc(2 * ${theme.base.spacing});\n }\n\n ${StyledStackedFieldValue} {\n grid-column: auto;\n }\n `;\n});\n\nStyledModernSummarySecondaryList.defaultProps = defaultThemeProp;\n\nexport const StyledModernSummaryCard = styled(Card)(({ theme }) => {\n const {\n base: { breakpoints, spacing }\n } = theme;\n\n return css`\n &&&& ${StyledCardContent} {\n padding: calc(1.5 * ${spacing}) calc(${theme.components.card.padding} * 2);\n\n @media (width < ${breakpoints.sm}) {\n padding: ${spacing} calc(${theme.components.card.padding} * 1.5);\n }\n }\n `;\n});\n\nStyledModernSummaryCard.defaultProps = defaultThemeProp;\n\nexport const StyledModernStagesContainer = styled.div`\n ${StyledStagesRoot},\n ${StyledStages} {\n background: transparent;\n }\n`;\n\nStyledModernStagesContainer.defaultProps = defaultThemeProp;\n"]}
1
+ {"version":3,"file":"ModernCaseView.styles.js","sourceRoot":"","sources":["../../../src/components/ModernCaseView/ModernCaseView.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,C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AW,EAAE,OAAO,EAAE,EAC/B,GAAG,KAAK,CAAC;IAEV,OAAO,GAAG,CAAA;WACD,iBAAiB;4BACA,OAAO,UAAU,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO;;wBAElD,WAAW,CAAC,EAAE;mBACnB,OAAO,SAAS,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO;;;GAG7D,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,uBAAuB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAExD,MAAM,CAAC,MAAM,2BAA2B,GAAG,MAAM,CAAC,GAAG,CAAA;IACjD,gBAAgB;IAChB,YAAY;;;CAGf,CAAC;AAEF,2BAA2B,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport type { DefaultTheme } from 'styled-components';\nimport { getContrast, mix, rgba } from 'polished';\n\nimport {\n Button,\n Card,\n Icon,\n StyledButton,\n StyledCard,\n StyledStackedFieldValue,\n calculateFontSize,\n calculateForegroundColor,\n defaultThemeProp,\n isSolidColor,\n readableColor,\n readableHue,\n tryCatch\n} from '@pega/cosmos-react-core';\nimport { wcagContrast } from '@pega/cosmos-react-core/lib/styles/constants';\nimport { StyledCardContent } from '@pega/cosmos-react-core/lib/components/Card/CardContent';\nimport { StyledTabPanel } from '@pega/cosmos-react-core/lib/components/Tabs/TabPanel';\nimport {\n StyledSummaryPrimaryList,\n StyledSummarySecondaryList,\n resolveCaseTypeColor\n} from '@pega/cosmos-react-work/lib/components/CaseView/CaseView.styles';\nimport {\n StyledStages,\n StyledStagesRoot\n} from '@pega/cosmos-react-work/lib/components/Stages/Stages.styles';\n\ninterface ModernCaseViewColors {\n headerBackground: string;\n foregroundColor: string;\n elementBackground: string;\n interactiveColor: string;\n hoverBackground: string;\n}\n\nconst getCaseTypeHeaderColors = (\n theme: DefaultTheme,\n color: string | undefined\n): { headerBackground: string; foregroundColor: string } => {\n const resolvedCaseTypeColor = resolveCaseTypeColor(theme, color);\n const headerBackground =\n resolvedCaseTypeColor &&\n theme.base['case-type-colors'] === 'header-and-icon' &&\n isSolidColor(theme.components.card.background)\n ? tryCatch(\n () => mix(0.85, theme.components.card.background, resolvedCaseTypeColor),\n () => theme.components.card.background\n )\n : theme.components['case-view'].header.background;\n\n const foregroundColor = calculateForegroundColor(\n headerBackground,\n resolvedCaseTypeColor && theme.base['case-type-colors'] === 'header-and-icon'\n ? 'auto'\n : theme.components['case-view'].header['foreground-color'],\n theme\n );\n\n return { headerBackground, foregroundColor };\n};\n\nconst getModernCaseViewColors = (\n theme: DefaultTheme,\n color: string | undefined\n): ModernCaseViewColors => {\n const { interactive } = theme.base.palette;\n const { headerBackground, foregroundColor } = getCaseTypeHeaderColors(theme, color);\n\n const isGradientBackground = !isSolidColor(headerBackground);\n const elementBackground = isGradientBackground\n ? readableColor(foregroundColor)\n : headerBackground;\n\n const interactiveUsable = getContrast(elementBackground, interactive) >= wcagContrast.AA;\n const interactiveColor =\n !isGradientBackground && interactiveUsable ? interactive : foregroundColor;\n\n const hoverBackground =\n !isGradientBackground && interactiveUsable\n ? readableHue(interactive, interactiveColor)\n : rgba(readableColor(interactiveColor), 0.15);\n\n return {\n headerBackground,\n foregroundColor,\n elementBackground,\n interactiveColor,\n hoverBackground\n };\n};\n\nexport const StyledModernCaseView = styled.div<{ $isCreateStage?: boolean }>(\n ({ $isCreateStage }) => css`\n min-height: ${$isCreateStage ? 'calc(100vh - var(--appshell-total-offset, 3rem))' : 'inherit'};\n\n ${StyledTabPanel}${StyledTabPanel}${StyledTabPanel} ${StyledCard} {\n border: none;\n padding: 0;\n }\n `\n);\n\nStyledModernCaseView.defaultProps = defaultThemeProp;\n\nexport const StyledModernContentContainer = styled.div(({ theme }) => {\n const { breakpoints } = theme.base;\n\n return css`\n width: 100%;\n margin-inline: auto;\n\n @media screen and (min-width: ${breakpoints.md}) {\n width: 85%;\n }\n\n @media screen and (min-width: ${breakpoints.lg}) {\n max-width: ${theme.base['content-width'].xl};\n }\n\n & > div {\n width: 100%;\n }\n\n ${StyledButton} {\n margin-inline-start: 0;\n }\n `;\n});\n\nStyledModernContentContainer.defaultProps = defaultThemeProp;\n\nexport const StyledModernCaseHeader = styled.header<{\n $color?: string;\n $isSmallOrAbove?: boolean;\n}>(({ theme, $color, $isSmallOrAbove }) => {\n const { breakpoints, spacing } = theme.base;\n const { headerBackground, foregroundColor } = getModernCaseViewColors(theme, $color);\n\n return css`\n position: relative;\n width: calc(100% - 4 * ${spacing});\n margin-inline: auto;\n background: ${headerBackground};\n color: ${foregroundColor};\n border-end-start-radius: ${theme.components.card['border-radius']};\n border-end-end-radius: ${theme.components.card['border-radius']};\n\n > ${StyledModernContentContainer} {\n width: 100%;\n max-width: 100%;\n }\n\n @media screen and (min-width: ${breakpoints.md}) {\n width: calc(85% - 4 * ${spacing});\n }\n\n @media screen and (min-width: ${breakpoints.lg}) {\n max-width: calc(${theme.base['content-width'].xl} - 4 * ${spacing});\n }\n\n h1 {\n color: ${foregroundColor};\n min-width: ${$isSmallOrAbove ? theme.base['content-width'].xs : 'auto'};\n }\n `;\n});\n\nStyledModernCaseHeader.defaultProps = defaultThemeProp;\n\nexport const StyledModernCaseSubheading = styled.div<{ $color?: string }>(({ theme, $color }) => {\n const { foregroundColor } = getModernCaseViewColors(theme, $color);\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n color: ${foregroundColor};\n font-size: ${fontSize.xs};\n font-weight: normal;\n margin: 0;\n\n /* MetaList renders items as Text elements with explicit styles. */\n && li {\n color: inherit;\n font-size: inherit;\n font-weight: inherit;\n }\n `;\n});\n\nStyledModernCaseSubheading.defaultProps = defaultThemeProp;\n\nexport const StyledModernCaseHeaderText = styled.div`\n word-break: break-word;\n`;\n\nStyledModernCaseHeaderText.defaultProps = defaultThemeProp;\n\n/** Resolves `auto` accents to a solid palette color for the case icon gradient. */\nexport const resolveModernCaseViewIconColor = (\n theme: DefaultTheme,\n color: string | undefined\n): string => {\n const caseTypeColorsEnabled =\n theme.base['case-type-colors'] === 'icon-only' ||\n theme.base['case-type-colors'] === 'header-and-icon';\n const resolvedCaseTypeColor = caseTypeColorsEnabled\n ? resolveCaseTypeColor(theme, color)\n : undefined;\n const accent = theme.base.palette['brand-accent'];\n\n return resolvedCaseTypeColor ?? (accent === 'auto' ? theme.base.palette.dark : accent);\n};\n\nexport const StyledModernCaseViewIcon = styled(Icon)<{ $color?: string }>(({ theme, $color }) => {\n const caseTypeColorsEnabled =\n theme.base['case-type-colors'] === 'icon-only' ||\n theme.base['case-type-colors'] === 'header-and-icon';\n const resolvedCaseTypeColor = caseTypeColorsEnabled\n ? resolveCaseTypeColor(theme, $color)\n : undefined;\n\n return css`\n --icon-color: ${resolveModernCaseViewIconColor(theme, $color)};\n --gradient-start: oklch(from var(--icon-color) calc(l - 0.3) calc(c * 1.5) h);\n --gradient-mid: oklch(from var(--icon-color) l c h);\n --gradient-end: oklch(from var(--icon-color) calc(l + 0.5) calc(c * 1.5) h);\n flex-shrink: 0;\n\n ${theme.components['case-view'].icon.color !== 'auto' &&\n css`\n color: ${theme.components['case-view'].icon.color};\n `}\n\n ${theme.components['case-view'].icon.background !== 'auto' &&\n css`\n background: ${theme.components['case-view'].icon.background};\n `}\n\n ${theme.components['case-view'].icon.background === 'auto' &&\n resolvedCaseTypeColor &&\n css`\n background: ${resolvedCaseTypeColor};\n `}\n\n ${theme.components['case-view'].icon['box-shadow'] !== 'auto' &&\n css`\n box-shadow: ${theme.components['case-view'].icon['box-shadow']};\n `}\n `;\n});\n\nStyledModernCaseViewIcon.defaultProps = defaultThemeProp;\n\nexport const StyledModernCaseHeaderPromotedAction = styled(Button)<{ $color?: string }>(({\n theme,\n $color\n}) => {\n const { elementBackground, interactiveColor, hoverBackground } = getModernCaseViewColors(\n theme,\n $color\n );\n\n return css`\n --button-background-color: ${elementBackground};\n color: ${interactiveColor};\n background-color: transparent;\n border-color: ${interactiveColor};\n\n @media (hover: hover) {\n &:hover,\n &:active {\n --button-background-color: ${hoverBackground};\n color: ${interactiveColor};\n background-color: ${hoverBackground};\n border-color: ${interactiveColor};\n }\n }\n `;\n});\n\nStyledModernCaseHeaderPromotedAction.defaultProps = defaultThemeProp;\n\nexport const StyledModernContent = styled.div(({ theme }) => {\n return css`\n ${StyledSummaryPrimaryList} {\n grid-template-columns: auto 1fr;\n column-gap: calc(2 * ${theme.base.spacing});\n }\n `;\n});\n\nStyledModernContent.defaultProps = defaultThemeProp;\n\nexport const StyledModernSummary = styled.div(({ theme }) => {\n return css`\n background: ${theme.components.card.background};\n border-radius: ${theme.base['border-radius']};\n padding: calc(${theme.base.spacing} * 1.5);\n align-self: start;\n `;\n});\n\nStyledModernSummary.defaultProps = defaultThemeProp;\n\nexport const StyledModernSummaryFieldsDivider = styled.hr(({ theme }) => {\n return css`\n margin: 0 calc(2 * ${theme.base.spacing});\n border: none;\n border-block-start: ${theme.components.button['border-width']} solid\n ${theme.base.palette['border-line']};\n `;\n});\n\nStyledModernSummaryFieldsDivider.defaultProps = defaultThemeProp;\n\nexport const StyledModernSummaryPrimaryList = styled(StyledSummaryPrimaryList)<{\n $isSmallOrAbove?: boolean;\n}>(({ theme, $isSmallOrAbove }) => {\n return css`\n &&& {\n grid-template-columns: ${$isSmallOrAbove ? 'repeat(2, 1fr)' : '1fr'};\n column-gap: calc(2 * ${theme.base.spacing});\n row-gap: calc(2 * ${theme.base.spacing});\n }\n `;\n});\n\nStyledModernSummaryPrimaryList.defaultProps = defaultThemeProp;\n\nexport const StyledModernSummarySecondaryList = styled(StyledSummarySecondaryList)<{\n $isSmallOrAbove?: boolean;\n}>(({ theme, $isSmallOrAbove }) => {\n return css`\n &&& {\n grid-template-columns: ${$isSmallOrAbove ? 'repeat(2, 1fr)' : '1fr'};\n row-gap: calc(2 * ${theme.base.spacing});\n }\n\n ${StyledStackedFieldValue} {\n grid-column: auto;\n }\n `;\n});\n\nStyledModernSummarySecondaryList.defaultProps = defaultThemeProp;\n\nexport const StyledModernSummaryCard = styled(Card)(({ theme }) => {\n const {\n base: { breakpoints, spacing }\n } = theme;\n\n return css`\n &&&& ${StyledCardContent} {\n padding: calc(1.5 * ${spacing}) calc(${theme.components.card.padding} * 2);\n\n @media (width < ${breakpoints.sm}) {\n padding: ${spacing} calc(${theme.components.card.padding} * 1.5);\n }\n }\n `;\n});\n\nStyledModernSummaryCard.defaultProps = defaultThemeProp;\n\nexport const StyledModernStagesContainer = styled.div`\n ${StyledStagesRoot},\n ${StyledStages} {\n background: transparent;\n }\n`;\n\nStyledModernStagesContainer.defaultProps = defaultThemeProp;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/cosmos-react-wss",
3
- "version": "10.0.0-build.16.6",
3
+ "version": "10.0.0-build.16.8",
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": "10.0.0-build.16.6",
18
- "@pega/cosmos-react-work": "10.0.0-build.16.6",
17
+ "@pega/cosmos-react-core": "10.0.0-build.16.8",
18
+ "@pega/cosmos-react-work": "10.0.0-build.16.8",
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",