@pega/cosmos-react-wss 9.37.1 → 9.38.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DefaultTheme } from 'styled-components';
|
|
2
2
|
export declare const StyledCaseView: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
3
|
export declare const StyledSubheading: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
4
|
-
export declare const resolveCaseTypeColor: (theme: DefaultTheme, color: string) => string;
|
|
4
|
+
export declare const resolveCaseTypeColor: (theme: DefaultTheme, color: string) => string | undefined;
|
|
5
5
|
export declare const StyledCaseHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {
|
|
6
6
|
computeButtonFgColor: boolean;
|
|
7
7
|
$color?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseView.styles.d.ts","sourceRoot":"","sources":["../../../src/components/CaseView/CaseView.styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAkBtD,eAAO,MAAM,cAAc,6NAAe,CAAC;AAE3C,eAAO,MAAM,gBAAgB,6NAW5B,CAAC;AAIF,eAAO,MAAM,oBAAoB,GAAI,OAAO,YAAY,EAAE,OAAO,MAAM,KAAG,
|
|
1
|
+
{"version":3,"file":"CaseView.styles.d.ts","sourceRoot":"","sources":["../../../src/components/CaseView/CaseView.styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAkBtD,eAAO,MAAM,cAAc,6NAAe,CAAC;AAE3C,eAAO,MAAM,gBAAgB,6NAW5B,CAAC;AAIF,eAAO,MAAM,oBAAoB,GAAI,OAAO,YAAY,EAAE,OAAO,MAAM,KAAG,MAAM,GAAG,SAIlF,CAAC;AAEF,eAAO,MAAM,gBAAgB;0BAAyC,OAAO;aAAW,MAAM;YA0C7F,CAAC;AAIF,eAAO,MAAM,kBAAkB;qBACZ,MAAM;0JAsCvB,CAAC;AAIH,eAAO,MAAM,WAAW,6NAKtB,CAAC;AAIH,eAAO,MAAM,sBAAsB,6NAwBjC,CAAC;AAIH,eAAO,MAAM,aAAa,6NAaxB,CAAC"}
|
|
@@ -20,16 +20,18 @@ export const StyledSubheading = styled.div `
|
|
|
20
20
|
`;
|
|
21
21
|
StyledSubheading.defaultProps = defaultThemeProp;
|
|
22
22
|
export const resolveCaseTypeColor = (theme, color) => {
|
|
23
|
+
if (color === 'Default')
|
|
24
|
+
return undefined;
|
|
23
25
|
const supplementalColor = resolveSupplementalColor(theme, color);
|
|
24
26
|
return supplementalColor ?? color;
|
|
25
27
|
};
|
|
26
28
|
export const StyledCaseHeader = styled.header(({ theme, computeButtonFgColor, $color }) => {
|
|
27
29
|
const { components: { 'case-view': { header: { background, 'foreground-color': foregroundColor } } } } = theme;
|
|
28
30
|
const resolvedCaseTypeColor = $color ? resolveCaseTypeColor(theme, $color) : undefined;
|
|
29
|
-
const caseTypeBackground =
|
|
31
|
+
const caseTypeBackground = resolvedCaseTypeColor &&
|
|
30
32
|
theme.base['case-type-colors'] === 'header-and-icon' &&
|
|
31
33
|
isSolidColor(theme.components.card.background)
|
|
32
|
-
? mix(0.85, theme.components.card.background,
|
|
34
|
+
? mix(0.85, theme.components.card.background, resolvedCaseTypeColor)
|
|
33
35
|
: undefined;
|
|
34
36
|
const headerBackground = caseTypeBackground ?? background;
|
|
35
37
|
const fgColor = resolvedCaseTypeColor && theme.base['case-type-colors'] === 'header-and-icon'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseView.styles.js","sourceRoot":"","sources":["../../../src/components/CaseView/CaseView.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B,OAAO,EACL,gBAAgB,EAChB,IAAI,EACJ,YAAY,EACZ,wBAAwB,EACxB,YAAY,EACZ,aAAa,EACb,wBAAwB,EACxB,UAAU,EACX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wDAAwD,CAAC;AAC1F,OAAO,EAAE,UAAU,EAAE,MAAM,yDAAyD,CAAC;AACrF,OAAO,EAAE,wBAAwB,EAAE,MAAM,iEAAiE,CAAC;AAC3G,OAAO,EAAE,mBAAmB,EAAE,MAAM,6DAA6D,CAAC;AAElG,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAA,EAAE,CAAC;AAE3C,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;CAWzC,CAAC;AAEF,gBAAgB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEjD,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAmB,EAAE,KAAa,
|
|
1
|
+
{"version":3,"file":"CaseView.styles.js","sourceRoot":"","sources":["../../../src/components/CaseView/CaseView.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B,OAAO,EACL,gBAAgB,EAChB,IAAI,EACJ,YAAY,EACZ,wBAAwB,EACxB,YAAY,EACZ,aAAa,EACb,wBAAwB,EACxB,UAAU,EACX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wDAAwD,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CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACpD,OAAO,GAAG,CAAA;MACN,wBAAwB;;6BAED,KAAK,CAAC,IAAI,CAAC,OAAO;;MAEzC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ;QAChC,GAAG,CAAA;WACI,UAAU,MAAM,gBAAgB;;;KAGtC;GACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,aAAa,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport type { DefaultTheme } from 'styled-components';\nimport { mix } from 'polished';\n\nimport {\n defaultThemeProp,\n Icon,\n StyledButton,\n calculateForegroundColor,\n isSolidColor,\n readableColor,\n resolveSupplementalColor,\n StyledCard\n} from '@pega/cosmos-react-core';\nimport { StyledCardHeader } from '@pega/cosmos-react-core/lib/components/Card/CardHeader';\nimport { StyledTabs } from '@pega/cosmos-react-core/lib/components/Tabs/Tabs.styles';\nimport { StyledSummaryPrimaryList } from '@pega/cosmos-react-work/lib/components/CaseView/CaseView.styles';\nimport { StyledStagesWrapper } from '@pega/cosmos-react-work/lib/components/Stages/Stages.styles';\n\nexport const StyledCaseView = styled.div``;\n\nexport const StyledSubheading = styled.div`\n color: inherit;\n font-size: inherit;\n font-weight: inherit;\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\nStyledSubheading.defaultProps = defaultThemeProp;\n\nexport const resolveCaseTypeColor = (theme: DefaultTheme, color: string): string | undefined => {\n if (color === 'Default') return undefined;\n const supplementalColor = resolveSupplementalColor(theme, color);\n return supplementalColor ?? color;\n};\n\nexport const StyledCaseHeader = styled.header<{ computeButtonFgColor: boolean; $color?: string }>(\n ({ theme, computeButtonFgColor, $color }) => {\n const {\n components: {\n 'case-view': {\n header: { background, 'foreground-color': foregroundColor }\n }\n }\n } = theme;\n\n const resolvedCaseTypeColor = $color ? resolveCaseTypeColor(theme, $color) : undefined;\n\n const caseTypeBackground =\n resolvedCaseTypeColor &&\n theme.base['case-type-colors'] === 'header-and-icon' &&\n isSolidColor(theme.components.card.background)\n ? mix(0.85, theme.components.card.background, resolvedCaseTypeColor)\n : undefined;\n\n const headerBackground = caseTypeBackground ?? background;\n const fgColor =\n resolvedCaseTypeColor && theme.base['case-type-colors'] === 'header-and-icon'\n ? readableColor(headerBackground)\n : calculateForegroundColor(headerBackground, foregroundColor);\n\n return css`\n position: relative;\n background: ${headerBackground};\n color: ${fgColor};\n\n h1 {\n color: ${fgColor};\n }\n\n ${computeButtonFgColor &&\n css`\n button {\n color: ${fgColor};\n }\n `}\n `;\n }\n);\n\nStyledCaseHeader.defaultProps = defaultThemeProp;\n\nexport const StyledCaseViewIcon = styled(Icon)<{\n $caseTypeColor?: string;\n}>(({ theme, $caseTypeColor }) => {\n const caseTypeColorsEnabled =\n theme.base['case-type-colors'] === 'icon-only' ||\n theme.base['case-type-colors'] === 'header-and-icon';\n const resolvedCaseTypeColor =\n caseTypeColorsEnabled && $caseTypeColor !== undefined\n ? resolveCaseTypeColor(theme, $caseTypeColor)\n : undefined;\n\n return css`\n --icon-color: ${resolvedCaseTypeColor ?? theme.base.palette['brand-accent']};\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\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 caseTypeColorsEnabled &&\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\nStyledCaseViewIcon.defaultProps = defaultThemeProp;\n\nexport const StyledAside = styled.div(({ theme }) => {\n return css`\n min-width: ${theme.base['content-width'].sm};\n max-width: 40%;\n `;\n});\n\nStyledAside.defaultProps = defaultThemeProp;\n\nexport const StyledContentContainer = styled.div(({ theme }) => {\n return css`\n width: 100%;\n max-width: 75rem;\n margin-inline: auto;\n\n h1 {\n min-width: ${theme.base['content-width'].xs};\n }\n\n & > div {\n width: 100%;\n }\n\n ${StyledButton} {\n margin-inline-start: 0;\n }\n\n &:has(${StyledTabs}) {\n ${StyledStagesWrapper} {\n --stages-wrapper-bottom-radius: 0;\n }\n }\n `;\n});\n\nStyledContentContainer.defaultProps = defaultThemeProp;\n\nexport const StyledContent = styled.div(({ theme }) => {\n return css`\n ${StyledSummaryPrimaryList} {\n grid-template-columns: auto 1fr;\n column-gap: calc(2 * ${theme.base.spacing});\n }\n ${theme.components.tabs.detached &&\n css`\n && ${StyledCard} > ${StyledCardHeader} {\n padding-inline: 0;\n }\n `}\n `;\n});\n\nStyledContent.defaultProps = defaultThemeProp;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/cosmos-react-wss",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.38.1",
|
|
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-work": "9.
|
|
17
|
+
"@pega/cosmos-react-core": "9.38.1",
|
|
18
|
+
"@pega/cosmos-react-work": "9.38.1",
|
|
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",
|