@pega/cosmos-react-work 3.0.0-dev.3.0 → 3.0.0-dev.30.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.
Files changed (177) hide show
  1. package/lib/components/AppAnnouncement/AppAnnouncement.d.ts +4 -0
  2. package/lib/components/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
  3. package/lib/components/AppAnnouncement/AppAnnouncement.js +4 -3
  4. package/lib/components/AppAnnouncement/AppAnnouncement.js.map +1 -1
  5. package/lib/components/CasePreview/CasePreview.d.ts +2 -2
  6. package/lib/components/CasePreview/CasePreview.d.ts.map +1 -1
  7. package/lib/components/CasePreview/CasePreview.js +7 -2
  8. package/lib/components/CasePreview/CasePreview.js.map +1 -1
  9. package/lib/components/CaseView/CaseHeader.d.ts +4 -0
  10. package/lib/components/CaseView/CaseHeader.d.ts.map +1 -0
  11. package/lib/components/CaseView/CaseHeader.js +49 -0
  12. package/lib/components/CaseView/CaseHeader.js.map +1 -0
  13. package/lib/components/CaseView/CaseSummary.d.ts +4 -0
  14. package/lib/components/CaseView/CaseSummary.d.ts.map +1 -0
  15. package/lib/components/CaseView/CaseSummary.js +13 -0
  16. package/lib/components/CaseView/CaseSummary.js.map +1 -0
  17. package/lib/components/CaseView/CaseSummaryFields.d.ts +6 -0
  18. package/lib/components/CaseView/CaseSummaryFields.d.ts.map +1 -0
  19. package/lib/components/CaseView/CaseSummaryFields.js +8 -0
  20. package/lib/components/CaseView/CaseSummaryFields.js.map +1 -0
  21. package/lib/components/CaseView/CaseView.context.d.ts +5 -0
  22. package/lib/components/CaseView/CaseView.context.d.ts.map +1 -0
  23. package/lib/components/CaseView/CaseView.context.js +5 -0
  24. package/lib/components/CaseView/CaseView.context.js.map +1 -0
  25. package/lib/components/CaseView/CaseView.d.ts +2 -27
  26. package/lib/components/CaseView/CaseView.d.ts.map +1 -1
  27. package/lib/components/CaseView/CaseView.js +219 -192
  28. package/lib/components/CaseView/CaseView.js.map +1 -1
  29. package/lib/components/CaseView/CaseView.styles.d.ts +14 -18
  30. package/lib/components/CaseView/CaseView.styles.d.ts.map +1 -1
  31. package/lib/components/CaseView/CaseView.styles.js +235 -44
  32. package/lib/components/CaseView/CaseView.styles.js.map +1 -1
  33. package/lib/components/CaseView/CaseView.types.d.ts +97 -0
  34. package/lib/components/CaseView/CaseView.types.d.ts.map +1 -0
  35. package/lib/components/CaseView/CaseView.types.js +2 -0
  36. package/lib/components/CaseView/CaseView.types.js.map +1 -0
  37. package/lib/components/CaseView/MobileCaseView.js +1 -1
  38. package/lib/components/CaseView/MobileCaseView.js.map +1 -1
  39. package/lib/components/CaseView/UtilitiesSummary.d.ts +4 -6
  40. package/lib/components/CaseView/UtilitiesSummary.d.ts.map +1 -1
  41. package/lib/components/CaseView/UtilitiesSummary.js +8 -4
  42. package/lib/components/CaseView/UtilitiesSummary.js.map +1 -1
  43. package/lib/components/CaseView/index.d.ts +5 -2
  44. package/lib/components/CaseView/index.d.ts.map +1 -1
  45. package/lib/components/CaseView/index.js +4 -1
  46. package/lib/components/CaseView/index.js.map +1 -1
  47. package/lib/components/ConfigurableLayout/ConfigurableLayout.js +1 -1
  48. package/lib/components/ConfigurableLayout/ConfigurableLayout.js.map +1 -1
  49. package/lib/components/ConfigurableLayout/LayoutCell.js +1 -1
  50. package/lib/components/ConfigurableLayout/LayoutCell.js.map +1 -1
  51. package/lib/components/ConfigurableLayout/useTrackWrappedRegions.d.ts +1 -1
  52. package/lib/components/ConfigurableLayout/useTrackWrappedRegions.d.ts.map +1 -1
  53. package/lib/components/Confirmation/Confirmation.d.ts +2 -2
  54. package/lib/components/Confirmation/Confirmation.d.ts.map +1 -1
  55. package/lib/components/Confirmation/Confirmation.js +1 -1
  56. package/lib/components/Confirmation/Confirmation.js.map +1 -1
  57. package/lib/components/Details/Details.d.ts +31 -10
  58. package/lib/components/Details/Details.d.ts.map +1 -1
  59. package/lib/components/Details/Details.js +77 -35
  60. package/lib/components/Details/Details.js.map +1 -1
  61. package/lib/components/Details/Details.styles.d.ts +47 -0
  62. package/lib/components/Details/Details.styles.d.ts.map +1 -0
  63. package/lib/components/Details/Details.styles.js +243 -0
  64. package/lib/components/Details/Details.styles.js.map +1 -0
  65. package/lib/components/Details/DetailsContext.d.ts +9 -0
  66. package/lib/components/Details/DetailsContext.d.ts.map +1 -0
  67. package/lib/components/Details/DetailsContext.js +9 -0
  68. package/lib/components/Details/DetailsContext.js.map +1 -0
  69. package/lib/components/Details/index.d.ts +2 -2
  70. package/lib/components/Details/index.d.ts.map +1 -1
  71. package/lib/components/Details/index.js +2 -1
  72. package/lib/components/Details/index.js.map +1 -1
  73. package/lib/components/Glimpse/Glimpse.js +1 -1
  74. package/lib/components/Glimpse/Glimpse.js.map +1 -1
  75. package/lib/components/SearchResults/Filter.js +2 -2
  76. package/lib/components/SearchResults/Filter.js.map +1 -1
  77. package/lib/components/SearchResults/SearchResult.d.ts +1 -1
  78. package/lib/components/SearchResults/SearchResult.d.ts.map +1 -1
  79. package/lib/components/SearchResults/SearchResult.js +9 -3
  80. package/lib/components/SearchResults/SearchResult.js.map +1 -1
  81. package/lib/components/SearchResults/SearchResults.d.ts.map +1 -1
  82. package/lib/components/SearchResults/SearchResults.js +59 -40
  83. package/lib/components/SearchResults/SearchResults.js.map +1 -1
  84. package/lib/components/SearchResults/SearchResults.styles.d.ts +3 -0
  85. package/lib/components/SearchResults/SearchResults.styles.d.ts.map +1 -1
  86. package/lib/components/SearchResults/SearchResults.styles.js +38 -17
  87. package/lib/components/SearchResults/SearchResults.styles.js.map +1 -1
  88. package/lib/components/SearchResults/SearchResults.types.d.ts +4 -0
  89. package/lib/components/SearchResults/SearchResults.types.d.ts.map +1 -1
  90. package/lib/components/SearchResults/SearchResults.types.js.map +1 -1
  91. package/lib/components/Stages/StageGlimpse.d.ts +10 -0
  92. package/lib/components/Stages/StageGlimpse.d.ts.map +1 -0
  93. package/lib/components/Stages/StageGlimpse.js +11 -0
  94. package/lib/components/Stages/StageGlimpse.js.map +1 -0
  95. package/lib/components/Stages/Stages.d.ts +1 -1
  96. package/lib/components/Stages/Stages.d.ts.map +1 -1
  97. package/lib/components/Stages/Stages.js +105 -112
  98. package/lib/components/Stages/Stages.js.map +1 -1
  99. package/lib/components/Stages/Stages.styles.d.ts +5 -7
  100. package/lib/components/Stages/Stages.styles.d.ts.map +1 -1
  101. package/lib/components/Stages/Stages.styles.js +180 -189
  102. package/lib/components/Stages/Stages.styles.js.map +1 -1
  103. package/lib/components/Stages/Stages.types.d.ts +19 -4
  104. package/lib/components/Stages/Stages.types.d.ts.map +1 -1
  105. package/lib/components/Stages/Stages.types.js.map +1 -1
  106. package/lib/components/Stakeholders/StakeholderForm.js +4 -4
  107. package/lib/components/Stakeholders/StakeholderForm.js.map +1 -1
  108. package/lib/components/Stakeholders/Stakeholders.d.ts.map +1 -1
  109. package/lib/components/Stakeholders/Stakeholders.js +16 -10
  110. package/lib/components/Stakeholders/Stakeholders.js.map +1 -1
  111. package/lib/components/Tags/Tags.d.ts.map +1 -1
  112. package/lib/components/Tags/Tags.js +16 -17
  113. package/lib/components/Tags/Tags.js.map +1 -1
  114. package/lib/components/Tasks/TaskList.d.ts +8 -5
  115. package/lib/components/Tasks/TaskList.d.ts.map +1 -1
  116. package/lib/components/Tasks/TaskList.js +14 -6
  117. package/lib/components/Tasks/TaskList.js.map +1 -1
  118. package/lib/components/Tasks/Tasks.d.ts.map +1 -1
  119. package/lib/components/Tasks/Tasks.js +5 -4
  120. package/lib/components/Tasks/Tasks.js.map +1 -1
  121. package/lib/components/Timeline/Timeline.js +2 -2
  122. package/lib/components/Timeline/Timeline.js.map +1 -1
  123. package/lib/components/Timeline/Timeline.styles.d.ts +1 -1
  124. package/lib/components/Timeline/Timeline.styles.d.ts.map +1 -1
  125. package/lib/components/Timeline/Timeline.styles.js +1 -0
  126. package/lib/components/Timeline/Timeline.styles.js.map +1 -1
  127. package/lib/components/Timeline/Timeline.types.d.ts +24 -3
  128. package/lib/components/Timeline/Timeline.types.d.ts.map +1 -1
  129. package/lib/components/Timeline/Timeline.types.js.map +1 -1
  130. package/lib/components/Timeline/TimelineItem.d.ts.map +1 -1
  131. package/lib/components/Timeline/TimelineItem.js +4 -4
  132. package/lib/components/Timeline/TimelineItem.js.map +1 -1
  133. package/lib/components/Timeline/TimelineToolbar.d.ts +6 -0
  134. package/lib/components/Timeline/TimelineToolbar.d.ts.map +1 -0
  135. package/lib/components/Timeline/TimelineToolbar.js +68 -0
  136. package/lib/components/Timeline/TimelineToolbar.js.map +1 -0
  137. package/lib/components/Timeline/index.d.ts +1 -0
  138. package/lib/components/Timeline/index.d.ts.map +1 -1
  139. package/lib/components/Timeline/index.js +1 -0
  140. package/lib/components/Timeline/index.js.map +1 -1
  141. package/lib/index.d.ts +0 -6
  142. package/lib/index.d.ts.map +1 -1
  143. package/lib/index.js +0 -6
  144. package/lib/index.js.map +1 -1
  145. package/package.json +17 -11
  146. package/lib/components/CaseHeader/CaseHeader.d.ts +0 -30
  147. package/lib/components/CaseHeader/CaseHeader.d.ts.map +0 -1
  148. package/lib/components/CaseHeader/CaseHeader.js +0 -119
  149. package/lib/components/CaseHeader/CaseHeader.js.map +0 -1
  150. package/lib/components/CaseHeader/index.d.ts +0 -4
  151. package/lib/components/CaseHeader/index.d.ts.map +0 -1
  152. package/lib/components/CaseHeader/index.js +0 -3
  153. package/lib/components/CaseHeader/index.js.map +0 -1
  154. package/lib/components/CaseSummary/CaseSummary.d.ts +0 -36
  155. package/lib/components/CaseSummary/CaseSummary.d.ts.map +0 -1
  156. package/lib/components/CaseSummary/CaseSummary.js +0 -130
  157. package/lib/components/CaseSummary/CaseSummary.js.map +0 -1
  158. package/lib/components/CaseSummary/index.d.ts +0 -4
  159. package/lib/components/CaseSummary/index.d.ts.map +0 -1
  160. package/lib/components/CaseSummary/index.js +0 -3
  161. package/lib/components/CaseSummary/index.js.map +0 -1
  162. package/lib/components/CaseSummaryFields/CaseSummaryFields.d.ts +0 -22
  163. package/lib/components/CaseSummaryFields/CaseSummaryFields.d.ts.map +0 -1
  164. package/lib/components/CaseSummaryFields/CaseSummaryFields.js +0 -25
  165. package/lib/components/CaseSummaryFields/CaseSummaryFields.js.map +0 -1
  166. package/lib/components/CaseSummaryFields/index.d.ts +0 -4
  167. package/lib/components/CaseSummaryFields/index.d.ts.map +0 -1
  168. package/lib/components/CaseSummaryFields/index.js +0 -3
  169. package/lib/components/CaseSummaryFields/index.js.map +0 -1
  170. package/lib/components/Stages/Steps.d.ts +0 -8
  171. package/lib/components/Stages/Steps.d.ts.map +0 -1
  172. package/lib/components/Stages/Steps.js +0 -12
  173. package/lib/components/Stages/Steps.js.map +0 -1
  174. package/lib/components/Stages/StepsContainer.d.ts +0 -8
  175. package/lib/components/Stages/StepsContainer.d.ts.map +0 -1
  176. package/lib/components/Stages/StepsContainer.js +0 -11
  177. package/lib/components/Stages/StepsContainer.js.map +0 -1
@@ -1,24 +1,20 @@
1
- export declare const StyledCaseViewContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
2
- forceMobile?: boolean | undefined;
3
- isMediumOrAbove?: boolean | undefined;
4
- persistentUtility?: boolean | undefined;
5
- }, never>;
1
+ export declare const StyledCaseSummaryFields: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
2
+ export declare const StyledCaseHeader: import("styled-components").StyledComponent<"header", import("styled-components").DefaultTheme, {}, never>;
3
+ export declare const StyledCaseIconWrap: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
4
+ export declare const StyledFollowIconWrap: import("styled-components").StyledComponent<"label", import("styled-components").DefaultTheme, {}, never>;
5
+ export declare const StyledCaseId: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
6
+ export declare const StyledCaseHeaderText: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
7
+ export declare const StyledPromotedActions: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
8
+ export declare const StyledCaseSummaryInfo: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
9
+ export declare const StyledExpandCollapseButton: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").ButtonProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
10
+ export declare const StyledCaseSummary: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
11
+ export declare const StyledWorkArea: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
6
12
  export declare const StyledUtilToggle: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
7
- export declare const StyledCaseViewUtilities: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
8
- utilitiesShown: boolean;
9
- }, never>;
10
- export declare const StyledCaseView: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
11
- forceMobile?: boolean | undefined;
12
- isMediumOrAbove?: boolean | undefined;
13
- stickyOffset: number;
14
- }, never>;
15
- export declare const StyledSummaryRegion: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
16
- forceMobile?: boolean | undefined;
17
- desktop?: boolean | undefined;
18
- }, never>;
13
+ export declare const StyledUtilities: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
14
+ export declare const StyledSummary: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
19
15
  export declare const StyledCaseDrawer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
20
16
  export declare const StyledCaseDrawerContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
21
17
  export declare const StyledPersistentUtility: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
22
18
  export declare const ScrollStick: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
23
- export declare const StyledTabContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
19
+ export declare const StyledCaseView: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
24
20
  //# sourceMappingURL=CaseView.styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CaseView.styles.d.ts","sourceRoot":"","sources":["../../../src/components/CaseView/CaseView.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,qBAAqB;;;;SAqBhC,CAAC;AAEH,eAAO,MAAM,gBAAgB,4GAM3B,CAAC;AAIH,eAAO,MAAM,uBAAuB;oBAAgC,OAAO;SAQ1E,CAAC;AAIF,eAAO,MAAM,cAAc;;;kBAGX,MAAM;SAiBpB,CAAC;AAIH,eAAO,MAAM,mBAAmB;;;SAiB9B,CAAC;AAIH,eAAO,MAAM,gBAAgB,yGAU3B,CAAC;AAIH,eAAO,MAAM,uBAAuB,yGAOlC,CAAC;AAIH,eAAO,MAAM,uBAAuB,yGAQlC,CAAC;AAIH,eAAO,MAAM,WAAW,yGAGvB,CAAC;AAEF,eAAO,MAAM,gBAAgB,yGAE5B,CAAC"}
1
+ {"version":3,"file":"CaseView.styles.d.ts","sourceRoot":"","sources":["../../../src/components/CaseView/CaseView.styles.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,uBAAuB,yGAelC,CAAC;AAIH,eAAO,MAAM,gBAAgB,4GAc3B,CAAC;AAIH,eAAO,MAAM,kBAAkB,yGAkB7B,CAAC;AAIH,eAAO,MAAM,oBAAoB,2GAShC,CAAC;AAIF,eAAO,MAAM,YAAY,0GAAgB,CAAC;AAI1C,eAAO,MAAM,oBAAoB,yGA0C/B,CAAC;AAIH,eAAO,MAAM,qBAAqB,yGAIhC,CAAC;AAIH,eAAO,MAAM,qBAAqB,yGAKhC,CAAC;AAIH,eAAO,MAAM,0BAA0B,qOA0BrC,CAAC;AAIH,eAAO,MAAM,iBAAiB,yGAqC5B,CAAC;AAIH,eAAO,MAAM,cAAc,yGAiBzB,CAAC;AAIH,eAAO,MAAM,gBAAgB,4GAM3B,CAAC;AAIH,eAAO,MAAM,eAAe,yGAY1B,CAAC;AAIH,eAAO,MAAM,aAAa,yGAgBxB,CAAC;AAIH,eAAO,MAAM,gBAAgB,yGAU3B,CAAC;AAIH,eAAO,MAAM,uBAAuB,yGAOlC,CAAC;AAIH,eAAO,MAAM,uBAAuB,yGAUlC,CAAC;AAIH,eAAO,MAAM,WAAW,yGAGvB,CAAC;AAEF,eAAO,MAAM,cAAc,yGAiBzB,CAAC"}
@@ -1,23 +1,209 @@
1
1
  import styled, { css } from 'styled-components';
2
- import { defaultThemeProp } from '@pega/cosmos-react-core';
3
- export const StyledCaseViewContent = styled.div(({ theme, forceMobile, isMediumOrAbove, persistentUtility }) => {
2
+ import { hideVisually, parseToHsl, readableColor, transparentize } from 'polished';
3
+ import { Button, calculateFontSize, defaultThemeProp, StyledBreadcrumbs, StyledButton, StyledFieldValue, StyledFieldValueList, StyledIcon, StyledPopover, StyledText, StyledTooltip, tryCatch } from '@pega/cosmos-react-core';
4
+ import { StyledMenu } from '@pega/cosmos-react-core/lib/components/Menu/Menu.styles';
5
+ import { useCaseViewContext } from './CaseView.context';
6
+ export const StyledCaseSummaryFields = styled.div(({ theme }) => {
7
+ const fontSizes = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);
4
8
  return css `
5
- grid-area: content;
6
9
  padding: calc(2 * ${theme.base.spacing});
7
10
 
8
- ${persistentUtility &&
9
- isMediumOrAbove &&
11
+ > ${StyledFieldValueList}:first-child {
12
+ grid-template-columns: 16ch auto;
13
+
14
+ ${StyledFieldValue} {
15
+ font-size: ${fontSizes[theme.components.text.h1['font-size']]};
16
+ font-weight: ${theme.components.text.h1['font-weight']};
17
+ }
18
+ }
19
+ `;
20
+ });
21
+ StyledCaseSummaryFields.defaultProps = defaultThemeProp;
22
+ export const StyledCaseHeader = styled.header(({ theme }) => {
23
+ const color = tryCatch(() => readableColor(theme.base.palette['brand-primary']));
24
+ return css `
25
+ background-color: ${theme.base.palette['brand-primary']};
26
+ color: ${color};
27
+ padding: calc(2 * ${theme.base.spacing});
28
+ position: relative;
29
+
30
+ ${StyledMenu} {
31
+ color: ${theme.base.palette['foreground-color']};
32
+ z-index: ${theme.base['z-index'].popover + 1};
33
+ }
34
+ `;
35
+ });
36
+ StyledCaseHeader.defaultProps = defaultThemeProp;
37
+ export const StyledCaseIconWrap = styled.div(({ theme }) => {
38
+ const spacing = theme.base.spacing;
39
+ const borderRadius = theme.base['border-radius'];
40
+ const backgroundColor = tryCatch(() => {
41
+ const { lightness } = parseToHsl(theme.base.palette['brand-primary']);
42
+ return lightness > 0.35 ? 'rgba(0, 0, 0, 0.2)' : 'rgba(255, 255, 255, 0.2)';
43
+ });
44
+ return css `
45
+ background: ${backgroundColor};
46
+ border-radius: calc(${borderRadius} / 2);
47
+ width: calc(5 * ${spacing});
48
+ height: calc(5 * ${spacing});
49
+ ${StyledIcon} {
50
+ font-size: calc(3 * ${spacing});
51
+ margin: auto;
52
+ }
53
+ `;
54
+ });
55
+ StyledCaseIconWrap.defaultProps = defaultThemeProp;
56
+ export const StyledFollowIconWrap = styled.label `
57
+ font-size: 1.25rem;
58
+ input {
59
+ ${hideVisually}
60
+ }
61
+
62
+ input:focus + svg {
63
+ box-shadow: ${({ theme }) => theme.base.shadow['focus-inverted']};
64
+ }
65
+ `;
66
+ StyledFollowIconWrap.defaultProps = defaultThemeProp;
67
+ export const StyledCaseId = styled.span ``;
68
+ StyledCaseId.defaultProps = defaultThemeProp;
69
+ export const StyledCaseHeaderText = styled.div(({ theme }) => {
70
+ const color = readableColor(theme.base.palette['brand-primary']);
71
+ const transparentColor = tryCatch(() => transparentize(0.1, color));
72
+ const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);
73
+ const idStyle = css `
74
+ color: ${transparentColor};
75
+ font-size: ${fontSize.s};
76
+ font-weight: normal;
77
+ `;
78
+ return css `
79
+ word-break: break-word;
80
+
81
+ ${StyledCaseId} {
82
+ ${idStyle}
83
+ }
84
+
85
+ ${StyledBreadcrumbs} {
86
+ > a,
87
+ > span,
88
+ > button,
89
+ > svg {
90
+ ${idStyle}
91
+ }
92
+
93
+ > a,
94
+ > button {
95
+ &:focus {
96
+ box-shadow: ${theme.base.shadow['focus-inverted']};
97
+ }
98
+ }
99
+
100
+ ${StyledPopover}:not(${StyledTooltip}) {
101
+ color: ${theme.base.palette['foreground-color']};
102
+ }
103
+ }
104
+
105
+ > ${StyledText} > ${StyledButton} {
106
+ color: ${color};
107
+ }
108
+ `;
109
+ });
110
+ StyledCaseHeaderText.defaultProps = defaultThemeProp;
111
+ export const StyledPromotedActions = styled.div(({ theme }) => {
112
+ return css `
113
+ border-bottom: 0.0625rem solid ${theme.base.palette['border-line']};
114
+ `;
115
+ });
116
+ StyledPromotedActions.defaultProps = defaultThemeProp;
117
+ export const StyledCaseSummaryInfo = styled.div(() => {
118
+ return css `
119
+ overflow: auto;
120
+ flex: 1;
121
+ `;
122
+ });
123
+ StyledCaseSummaryInfo.defaultProps = defaultThemeProp;
124
+ export const StyledExpandCollapseButton = styled(Button)(({ theme }) => {
125
+ const { summaryExpanded } = useCaseViewContext();
126
+ return css `
127
+ position: absolute;
128
+ z-index: 1;
129
+ bottom: 0;
130
+ inset-inline-start: ${summaryExpanded ? 'calc(100% - 0.75rem)' : '0'};
131
+ border-radius: ${summaryExpanded ? '1.5rem' : '0 1.5rem 1.5rem 0'};
132
+ box-shadow: ${theme.base.shadow.low};
133
+ border: none;
134
+ opacity: 0;
135
+
136
+ /* Disbales core Button transition causing button to slide on toggle. */
137
+ transition: none;
138
+
139
+ &:focus {
140
+ opacity: 1;
141
+ }
142
+
143
+ ${StyledIcon} {
144
+ width: 1.5rem;
145
+ height: 1.5rem;
146
+ transform: rotate(${summaryExpanded ? 0 : css `180deg`});
147
+ }
148
+ `;
149
+ });
150
+ StyledExpandCollapseButton.defaultProps = defaultThemeProp;
151
+ export const StyledCaseSummary = styled.div(() => {
152
+ const { summaryExpanded, aboveMD, aboveLG } = useCaseViewContext();
153
+ return css `
154
+ position: relative;
155
+ height: 100%;
156
+
157
+ ${aboveMD &&
10
158
  css `
11
- margin-inline-start: calc(2 * ${theme.base.spacing});
159
+ ${summaryExpanded
160
+ ? css `
161
+ width: ${aboveLG ? css `25rem` : css `22rem`};
162
+
163
+ &:focus-within,
164
+ &:hover {
165
+ &::after {
166
+ content: '';
167
+ position: absolute;
168
+ top: 0;
169
+ bottom: 0;
170
+ inset-inline-start: 100%;
171
+ width: 0.75rem;
172
+ }
173
+
174
+ ${StyledExpandCollapseButton} {
175
+ opacity: 1;
176
+ }
177
+ }
178
+ `
179
+ : css `
180
+ width: 100%;
181
+ ${StyledExpandCollapseButton} {
182
+ opacity: 1;
183
+ }
184
+ `}
12
185
  `}
186
+ `;
187
+ });
188
+ StyledCaseSummary.defaultProps = defaultThemeProp;
189
+ export const StyledWorkArea = styled.div(({ theme }) => {
190
+ const { summaryExpanded, aboveMD } = useCaseViewContext();
191
+ return css `
192
+ grid-area: work-area;
193
+ padding: calc(2 * ${theme.base.spacing});
13
194
 
14
- ${!forceMobile &&
15
- isMediumOrAbove &&
195
+ ${aboveMD &&
16
196
  css `
17
197
  padding: calc(2 * ${theme.base.spacing}) 0;
198
+
199
+ ${!summaryExpanded &&
200
+ css `
201
+ margin-inline-start: calc(2 * ${theme.base.spacing});
202
+ `}
18
203
  `}
19
204
  `;
20
205
  });
206
+ StyledWorkArea.defaultProps = defaultThemeProp;
21
207
  export const StyledUtilToggle = styled.button(({ theme }) => {
22
208
  return css `
23
209
  align-self: flex-end;
@@ -26,56 +212,44 @@ export const StyledUtilToggle = styled.button(({ theme }) => {
26
212
  `;
27
213
  });
28
214
  StyledUtilToggle.defaultProps = defaultThemeProp;
29
- export const StyledCaseViewUtilities = styled.div(({ utilitiesShown, theme }) => {
30
- return css `
31
- width: ${utilitiesShown ? '25rem' : 'auto'};
32
- height: max-content;
33
- padding: calc(2 * ${theme.base.spacing}) 0 calc(2 * ${theme.base.spacing});
34
- `;
35
- });
36
- StyledCaseViewUtilities.defaultProps = defaultThemeProp;
37
- export const StyledCaseView = styled.div(({ theme, forceMobile, isMediumOrAbove, stickyOffset }) => {
215
+ export const StyledUtilities = styled.div(() => {
216
+ const { utilitiesExpanded, aboveLG } = useCaseViewContext();
38
217
  return css `
39
- --case-view-header-offset: ${stickyOffset}px;
40
- --case-view-content-height: calc(100vh - var(--case-view-header-offset, 0rem));
41
- min-height: calc(100vh - var(--appshell-offset, 0rem));
42
- position: relative;
43
- background-color: ${theme.base.palette['app-background']};
218
+ height: max-content;
44
219
 
45
- > :last-child {
46
- ${!forceMobile &&
47
- isMediumOrAbove &&
220
+ ${aboveLG &&
221
+ utilitiesExpanded &&
48
222
  css `
49
- margin-inline-end: calc(2 * ${theme.base.spacing});
50
- `}
51
- }
223
+ width: 25rem;
224
+ `}
52
225
  `;
53
226
  });
54
- StyledCaseView.defaultProps = defaultThemeProp;
55
- export const StyledSummaryRegion = styled.div(({ theme, forceMobile, desktop }) => {
227
+ StyledUtilities.defaultProps = defaultThemeProp;
228
+ export const StyledSummary = styled.div(({ theme }) => {
229
+ const { summaryExpanded, aboveMD } = useCaseViewContext();
56
230
  return css `
57
231
  position: sticky;
58
- top: var(--appshell-offset, 0);
232
+ top: ${summaryExpanded ? 'var(--top-offset)' : 'var(--appshell-offset)'};
59
233
  width: 100%;
60
234
  background-color: ${theme.base.palette['primary-background']};
61
235
  z-index: ${theme.base['z-index'].popover};
62
236
 
63
- ${!forceMobile &&
64
- desktop &&
237
+ ${aboveMD &&
238
+ summaryExpanded &&
65
239
  css `
66
- height: var(--case-view-content-height);
240
+ height: var(--case-view-height);
67
241
  `}
68
242
  `;
69
243
  });
70
- StyledSummaryRegion.defaultProps = defaultThemeProp;
244
+ StyledSummary.defaultProps = defaultThemeProp;
71
245
  export const StyledCaseDrawer = styled.div(({ theme }) => {
72
246
  return css `
73
247
  min-width: 21.875rem;
74
248
  max-width: 31.25rem;
75
249
  width: calc((100vw - 31.25rem) / 10 + 21.875rem);
76
250
  background-color: ${theme.base.palette['primary-background']};
77
- height: var(--case-view-content-height);
78
- top: var(--case-view-header-offset);
251
+ height: var(--case-view-height);
252
+ top: var(--top-offset);
79
253
  z-index: ${theme.base['z-index'].drawer - 1};
80
254
  `;
81
255
  });
@@ -89,13 +263,15 @@ export const StyledCaseDrawerContent = styled.div(({ theme }) => {
89
263
  `;
90
264
  });
91
265
  StyledCaseDrawerContent.defaultProps = defaultThemeProp;
92
- export const StyledPersistentUtility = styled.div(() => {
266
+ export const StyledPersistentUtility = styled.div(({ theme }) => {
93
267
  return css `
94
- max-width: 60ch;
268
+ min-width: ${theme.base['content-width'].sm};
269
+ max-width: ${theme.base['content-width'].md};
95
270
  overflow: auto;
96
271
  position: sticky;
97
- height: var(--case-view-content-height);
98
- top: var(--case-view-header-offset);
272
+ z-index: 1;
273
+ height: var(--case-view-height);
274
+ top: var(--top-offset);
99
275
  `;
100
276
  });
101
277
  StyledPersistentUtility.defaultProps = defaultThemeProp;
@@ -103,7 +279,22 @@ export const ScrollStick = styled.div `
103
279
  position: sticky;
104
280
  top: 0;
105
281
  `;
106
- export const StyledTabContent = styled.div `
107
- flex-grow: 1;
108
- `;
282
+ export const StyledCaseView = styled.div(({ theme }) => {
283
+ const { aboveMD } = useCaseViewContext();
284
+ return css `
285
+ --top-offset: calc(var(--appshell-offset, 0) + var(--summary-height));
286
+ --case-view-height: calc(100vh - var(--top-offset));
287
+ position: relative;
288
+ min-height: var(--case-view-height);
289
+ background-color: ${theme.base.palette['app-background']};
290
+
291
+ ${aboveMD &&
292
+ css `
293
+ ${StyledUtilities}:last-child {
294
+ margin-inline-end: calc(2 * ${theme.base.spacing});
295
+ }
296
+ `}
297
+ `;
298
+ });
299
+ StyledCaseView.defaultProps = defaultThemeProp;
109
300
  //# sourceMappingURL=CaseView.styles.js.map
@@ -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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,KAAK,CAAC,IAAI,CAAC,OAAO;;;GAGvC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,uBAAuB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAExD,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE;IACrD,OAAO,GAAG,CAAA;;;;;;GAMT,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,uBAAuB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAExD,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAA;;;CAGpC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAAA;;CAEzC,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { defaultThemeProp } from '@pega/cosmos-react-core';\n\nexport const StyledCaseViewContent = styled.div<{\n forceMobile?: boolean;\n isMediumOrAbove?: boolean;\n persistentUtility?: boolean;\n}>(({ theme, forceMobile, isMediumOrAbove, persistentUtility }) => {\n return css`\n grid-area: content;\n padding: calc(2 * ${theme.base.spacing});\n\n ${persistentUtility &&\n isMediumOrAbove &&\n css`\n margin-inline-start: calc(2 * ${theme.base.spacing});\n `}\n\n ${!forceMobile &&\n isMediumOrAbove &&\n css`\n padding: calc(2 * ${theme.base.spacing}) 0;\n `}\n `;\n});\n\nexport const StyledUtilToggle = styled.button(({ theme }) => {\n return css`\n align-self: flex-end;\n color: ${theme.base.palette['foreground-color']};\n margin-inline-end: 0.375rem;\n `;\n});\n\nStyledUtilToggle.defaultProps = defaultThemeProp;\n\nexport const StyledCaseViewUtilities = styled.div<{ utilitiesShown: boolean }>(\n ({ utilitiesShown, theme }) => {\n return css`\n width: ${utilitiesShown ? '25rem' : 'auto'};\n height: max-content;\n padding: calc(2 * ${theme.base.spacing}) 0 calc(2 * ${theme.base.spacing});\n `;\n }\n);\n\nStyledCaseViewUtilities.defaultProps = defaultThemeProp;\n\nexport const StyledCaseView = styled.div<{\n forceMobile?: boolean;\n isMediumOrAbove?: boolean;\n stickyOffset: number;\n}>(({ theme, forceMobile, isMediumOrAbove, stickyOffset }) => {\n return css`\n --case-view-header-offset: ${stickyOffset}px;\n --case-view-content-height: calc(100vh - var(--case-view-header-offset, 0rem));\n min-height: calc(100vh - var(--appshell-offset, 0rem));\n position: relative;\n background-color: ${theme.base.palette['app-background']};\n\n > :last-child {\n ${!forceMobile &&\n isMediumOrAbove &&\n css`\n margin-inline-end: calc(2 * ${theme.base.spacing});\n `}\n }\n `;\n});\n\nStyledCaseView.defaultProps = defaultThemeProp;\n\nexport const StyledSummaryRegion = styled.div<{\n forceMobile?: boolean;\n desktop?: boolean;\n}>(({ theme, forceMobile, desktop }) => {\n return css`\n position: sticky;\n top: var(--appshell-offset, 0);\n width: 100%;\n background-color: ${theme.base.palette['primary-background']};\n z-index: ${theme.base['z-index'].popover};\n\n ${!forceMobile &&\n desktop &&\n css`\n height: var(--case-view-content-height);\n `}\n `;\n});\n\nStyledSummaryRegion.defaultProps = defaultThemeProp;\n\nexport const StyledCaseDrawer = styled.div(({ theme }) => {\n return css`\n min-width: 21.875rem;\n max-width: 31.25rem;\n width: calc((100vw - 31.25rem) / 10 + 21.875rem);\n background-color: ${theme.base.palette['primary-background']};\n height: var(--case-view-content-height);\n top: var(--case-view-header-offset);\n z-index: ${theme.base['z-index'].drawer - 1};\n `;\n});\n\nStyledCaseDrawer.defaultProps = defaultThemeProp;\n\nexport const StyledCaseDrawerContent = styled.div(({ theme }) => {\n return css`\n background-color: ${theme.base.palette['app-background']};\n padding: calc(2 * ${theme.base.spacing});\n height: 100%;\n overflow: auto;\n `;\n});\n\nStyledCaseDrawerContent.defaultProps = defaultThemeProp;\n\nexport const StyledPersistentUtility = styled.div(() => {\n return css`\n max-width: 60ch;\n overflow: auto;\n position: sticky;\n height: var(--case-view-content-height);\n top: var(--case-view-header-offset);\n `;\n});\n\nStyledPersistentUtility.defaultProps = defaultThemeProp;\n\nexport const ScrollStick = styled.div`\n position: sticky;\n top: 0;\n`;\n\nexport const StyledTabContent = styled.div`\n flex-grow: 1;\n`;\n"]}
1
+ {"version":3,"file":"CaseView.styles.js","sourceRoot":"","sources":["../../../src/components/CaseView/CaseView.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEnF,OAAO,EACL,MAAM,EACN,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,EACpB,UAAU,EACV,aAAa,EACb,UAAU,EACV,aAAa,EACb,QAAQ,EAET,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,yDAAyD,CAAC;AAErF,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC9D,MAAM,SAAS,GAAG,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IAEvF,OAAO,GAAG,CAAA;wBACY,KAAK,CAAC,IAAI,CAAC,OAAO;;QAElC,oBAAoB;;;QAGpB,gBAAgB;qBACH,SAAS,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,WAAW,CAAa,CAAC;uBAC1D,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC;;;GAG3D,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,uBAAuB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAExD,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAA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AExD,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC9D,OAAO,GAAG,CAAA;iBACK,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,EAAE;iBAC9B,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,EAAE;;;;;;GAM5C,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,uBAAuB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAExD,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAA;;;CAGpC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACrD,MAAM,EAAE,OAAO,EAAE,GAAG,kBAAkB,EAAE,CAAC;IAEzC,OAAO,GAAG,CAAA;;;;;wBAKY,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC;;MAEtD,OAAO;QACT,GAAG,CAAA;QACC,eAAe;sCACe,KAAK,CAAC,IAAI,CAAC,OAAO;;KAEnD;GACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,cAAc,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport { hideVisually, parseToHsl, readableColor, transparentize } from 'polished';\n\nimport {\n Button,\n calculateFontSize,\n defaultThemeProp,\n StyledBreadcrumbs,\n StyledButton,\n StyledFieldValue,\n StyledFieldValueList,\n StyledIcon,\n StyledPopover,\n StyledText,\n StyledTooltip,\n tryCatch,\n FontSize\n} from '@pega/cosmos-react-core';\nimport { StyledMenu } from '@pega/cosmos-react-core/lib/components/Menu/Menu.styles';\n\nimport { useCaseViewContext } from './CaseView.context';\n\nexport const StyledCaseSummaryFields = styled.div(({ theme }) => {\n const fontSizes = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n padding: calc(2 * ${theme.base.spacing});\n\n > ${StyledFieldValueList}:first-child {\n grid-template-columns: 16ch auto;\n\n ${StyledFieldValue} {\n font-size: ${fontSizes[theme.components.text.h1['font-size'] as FontSize]};\n font-weight: ${theme.components.text.h1['font-weight']};\n }\n }\n `;\n});\n\nStyledCaseSummaryFields.defaultProps = defaultThemeProp;\n\nexport const StyledCaseHeader = styled.header(({ theme }) => {\n const color = tryCatch(() => readableColor(theme.base.palette['brand-primary']));\n\n return css`\n background-color: ${theme.base.palette['brand-primary']};\n color: ${color};\n padding: calc(2 * ${theme.base.spacing});\n position: relative;\n\n ${StyledMenu} {\n color: ${theme.base.palette['foreground-color']};\n z-index: ${theme.base['z-index'].popover + 1};\n }\n `;\n});\n\nStyledCaseHeader.defaultProps = defaultThemeProp;\n\nexport const StyledCaseIconWrap = styled.div(({ theme }) => {\n const spacing = theme.base.spacing;\n const borderRadius = theme.base['border-radius'];\n const backgroundColor = tryCatch(() => {\n const { lightness } = parseToHsl(theme.base.palette['brand-primary']);\n return lightness > 0.35 ? 'rgba(0, 0, 0, 0.2)' : 'rgba(255, 255, 255, 0.2)';\n });\n\n return css`\n background: ${backgroundColor};\n border-radius: calc(${borderRadius} / 2);\n width: calc(5 * ${spacing});\n height: calc(5 * ${spacing});\n ${StyledIcon} {\n font-size: calc(3 * ${spacing});\n margin: auto;\n }\n `;\n});\n\nStyledCaseIconWrap.defaultProps = defaultThemeProp;\n\nexport const StyledFollowIconWrap = styled.label`\n font-size: 1.25rem;\n input {\n ${hideVisually}\n }\n\n input:focus + svg {\n box-shadow: ${({ theme }) => theme.base.shadow['focus-inverted']};\n }\n`;\n\nStyledFollowIconWrap.defaultProps = defaultThemeProp;\n\nexport const StyledCaseId = styled.span``;\n\nStyledCaseId.defaultProps = defaultThemeProp;\n\nexport const StyledCaseHeaderText = styled.div(({ theme }) => {\n const color = readableColor(theme.base.palette['brand-primary']);\n const transparentColor = tryCatch(() => transparentize(0.1, color));\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n const idStyle = css`\n color: ${transparentColor};\n font-size: ${fontSize.s};\n font-weight: normal;\n `;\n\n return css`\n word-break: break-word;\n\n ${StyledCaseId} {\n ${idStyle}\n }\n\n ${StyledBreadcrumbs} {\n > a,\n > span,\n > button,\n > svg {\n ${idStyle}\n }\n\n > a,\n > button {\n &:focus {\n box-shadow: ${theme.base.shadow['focus-inverted']};\n }\n }\n\n ${StyledPopover}:not(${StyledTooltip}) {\n color: ${theme.base.palette['foreground-color']};\n }\n }\n\n > ${StyledText} > ${StyledButton} {\n color: ${color};\n }\n `;\n});\n\nStyledCaseHeaderText.defaultProps = defaultThemeProp;\n\nexport const StyledPromotedActions = styled.div(({ theme }) => {\n return css`\n border-bottom: 0.0625rem solid ${theme.base.palette['border-line']};\n `;\n});\n\nStyledPromotedActions.defaultProps = defaultThemeProp;\n\nexport const StyledCaseSummaryInfo = styled.div(() => {\n return css`\n overflow: auto;\n flex: 1;\n `;\n});\n\nStyledCaseSummaryInfo.defaultProps = defaultThemeProp;\n\nexport const StyledExpandCollapseButton = styled(Button)(({ theme }) => {\n const { summaryExpanded } = useCaseViewContext();\n\n return css`\n position: absolute;\n z-index: 1;\n bottom: 0;\n inset-inline-start: ${summaryExpanded ? 'calc(100% - 0.75rem)' : '0'};\n border-radius: ${summaryExpanded ? '1.5rem' : '0 1.5rem 1.5rem 0'};\n box-shadow: ${theme.base.shadow.low};\n border: none;\n opacity: 0;\n\n /* Disbales core Button transition causing button to slide on toggle. */\n transition: none;\n\n &:focus {\n opacity: 1;\n }\n\n ${StyledIcon} {\n width: 1.5rem;\n height: 1.5rem;\n transform: rotate(${summaryExpanded ? 0 : css`180deg`});\n }\n `;\n});\n\nStyledExpandCollapseButton.defaultProps = defaultThemeProp;\n\nexport const StyledCaseSummary = styled.div(() => {\n const { summaryExpanded, aboveMD, aboveLG } = useCaseViewContext();\n\n return css`\n position: relative;\n height: 100%;\n\n ${aboveMD &&\n css`\n ${summaryExpanded\n ? css`\n width: ${aboveLG ? css`25rem` : css`22rem`};\n\n &:focus-within,\n &:hover {\n &::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n inset-inline-start: 100%;\n width: 0.75rem;\n }\n\n ${StyledExpandCollapseButton} {\n opacity: 1;\n }\n }\n `\n : css`\n width: 100%;\n ${StyledExpandCollapseButton} {\n opacity: 1;\n }\n `}\n `}\n `;\n});\n\nStyledCaseSummary.defaultProps = defaultThemeProp;\n\nexport const StyledWorkArea = styled.div(({ theme }) => {\n const { summaryExpanded, aboveMD } = useCaseViewContext();\n\n return css`\n grid-area: work-area;\n padding: calc(2 * ${theme.base.spacing});\n\n ${aboveMD &&\n css`\n padding: calc(2 * ${theme.base.spacing}) 0;\n\n ${!summaryExpanded &&\n css`\n margin-inline-start: calc(2 * ${theme.base.spacing});\n `}\n `}\n `;\n});\n\nStyledWorkArea.defaultProps = defaultThemeProp;\n\nexport const StyledUtilToggle = styled.button(({ theme }) => {\n return css`\n align-self: flex-end;\n color: ${theme.base.palette['foreground-color']};\n margin-inline-end: 0.375rem;\n `;\n});\n\nStyledUtilToggle.defaultProps = defaultThemeProp;\n\nexport const StyledUtilities = styled.div(() => {\n const { utilitiesExpanded, aboveLG } = useCaseViewContext();\n\n return css`\n height: max-content;\n\n ${aboveLG &&\n utilitiesExpanded &&\n css`\n width: 25rem;\n `}\n `;\n});\n\nStyledUtilities.defaultProps = defaultThemeProp;\n\nexport const StyledSummary = styled.div(({ theme }) => {\n const { summaryExpanded, aboveMD } = useCaseViewContext();\n\n return css`\n position: sticky;\n top: ${summaryExpanded ? 'var(--top-offset)' : 'var(--appshell-offset)'};\n width: 100%;\n background-color: ${theme.base.palette['primary-background']};\n z-index: ${theme.base['z-index'].popover};\n\n ${aboveMD &&\n summaryExpanded &&\n css`\n height: var(--case-view-height);\n `}\n `;\n});\n\nStyledSummary.defaultProps = defaultThemeProp;\n\nexport const StyledCaseDrawer = styled.div(({ theme }) => {\n return css`\n min-width: 21.875rem;\n max-width: 31.25rem;\n width: calc((100vw - 31.25rem) / 10 + 21.875rem);\n background-color: ${theme.base.palette['primary-background']};\n height: var(--case-view-height);\n top: var(--top-offset);\n z-index: ${theme.base['z-index'].drawer - 1};\n `;\n});\n\nStyledCaseDrawer.defaultProps = defaultThemeProp;\n\nexport const StyledCaseDrawerContent = styled.div(({ theme }) => {\n return css`\n background-color: ${theme.base.palette['app-background']};\n padding: calc(2 * ${theme.base.spacing});\n height: 100%;\n overflow: auto;\n `;\n});\n\nStyledCaseDrawerContent.defaultProps = defaultThemeProp;\n\nexport const StyledPersistentUtility = styled.div(({ theme }) => {\n return css`\n min-width: ${theme.base['content-width'].sm};\n max-width: ${theme.base['content-width'].md};\n overflow: auto;\n position: sticky;\n z-index: 1;\n height: var(--case-view-height);\n top: var(--top-offset);\n `;\n});\n\nStyledPersistentUtility.defaultProps = defaultThemeProp;\n\nexport const ScrollStick = styled.div`\n position: sticky;\n top: 0;\n`;\n\nexport const StyledCaseView = styled.div(({ theme }) => {\n const { aboveMD } = useCaseViewContext();\n\n return css`\n --top-offset: calc(var(--appshell-offset, 0) + var(--summary-height));\n --case-view-height: calc(100vh - var(--top-offset));\n position: relative;\n min-height: var(--case-view-height);\n background-color: ${theme.base.palette['app-background']};\n\n ${aboveMD &&\n css`\n ${StyledUtilities}:last-child {\n margin-inline-end: calc(2 * ${theme.base.spacing});\n }\n `}\n `;\n});\n\nStyledCaseView.defaultProps = defaultThemeProp;\n"]}
@@ -0,0 +1,97 @@
1
+ import { ReactElement, ReactNode, MouseEvent } from 'react';
2
+ import { Tab, NoChildrenProp, ForwardProps, MenuItemProps, Action, BaseProps } from '@pega/cosmos-react-core';
3
+ export interface CaseViewProps extends NoChildrenProp, BaseProps {
4
+ /** A Case ID to display in the heading. */
5
+ caseId: string;
6
+ /** A text region for the title of the CaseView. */
7
+ heading: string;
8
+ /** A set of props including an href that will be forwarded to the case heading and caseId. */
9
+ caseLink?: {
10
+ href: string;
11
+ } & ForwardProps;
12
+ /** A set of Link props representing the case parents, rendered as Breadcrumbs. */
13
+ parentCases?: MenuItemProps[];
14
+ /** An icon to serve as a visual for the CaseView. */
15
+ icon?: ReactElement;
16
+ /** Indicates if the current user is following the case. This should be updated based on onFollowedChange. */
17
+ followed?: boolean;
18
+ /** Called when user chooses to follow or unfollow the case. Use this to update followed. */
19
+ onFollowedChange?: (following: boolean) => void;
20
+ /** Case level actions available in an action menu. */
21
+ actions?: Action[];
22
+ /** Visually promoted case level actions available outside the menu. */
23
+ promotedActions?: Action[];
24
+ /** A callback for when the edit button is clicked */
25
+ onEdit?: () => void;
26
+ /** A region to display any summary information about the CaseView. */
27
+ summary: ReactNode;
28
+ /**
29
+ * Determines the layout state of the summary region.
30
+ * @default true
31
+ */
32
+ summaryExpanded?: boolean;
33
+ /**
34
+ * Callback to toggle the case summary's layout.
35
+ */
36
+ onToggleSummary?: () => void;
37
+ /** An object handling the rendering and functionality of the Tabs in CaseSummary. */
38
+ tabs: {
39
+ items: Tab[];
40
+ onClick: (id: string, event?: MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void;
41
+ currentTabId: string;
42
+ };
43
+ /** A region within the center column that is controlled by tabs in CaseSummary. */
44
+ tabContent?: {
45
+ content: ReactNode;
46
+ id: string;
47
+ }[];
48
+ /** A region to hold a Stages component. */
49
+ stages?: ReactNode;
50
+ /** A region to hold a Tasks component. */
51
+ tasks?: ReactNode;
52
+ /** A region above the center column to display banners. */
53
+ banners?: ReactNode;
54
+ /** A region to the right reserved for persistent utilities. */
55
+ persistentUtility?: {
56
+ content: ReactNode;
57
+ title: string;
58
+ };
59
+ /** A region for case widgets. */
60
+ utilities?: ReactNode;
61
+ /** An indicator of case widgets when the utilities are collapsed. */
62
+ utilitiesSummaryItems?: {
63
+ iconName: string;
64
+ count?: number;
65
+ }[];
66
+ /**
67
+ * Determines the layout state of the utilities.
68
+ * @default true
69
+ */
70
+ utilitiesExpanded?: boolean;
71
+ /**
72
+ * Callback to toggle the utilities.
73
+ */
74
+ onToggleUtilities?: () => void;
75
+ }
76
+ export interface CaseSummaryFieldsProps {
77
+ /** The primary summary fields to display above secondary fields. */
78
+ primaryFields: {
79
+ id?: string;
80
+ name: string;
81
+ value: ReactNode;
82
+ }[];
83
+ /** The secondary summary fields to display below primary fields. */
84
+ secondaryFields: {
85
+ id?: string;
86
+ name: string;
87
+ value: ReactNode;
88
+ }[];
89
+ }
90
+ export interface CaseViewContextValue extends Pick<CaseViewProps, 'caseId' | 'heading' | 'caseLink' | 'parentCases' | 'icon' | 'followed' | 'onFollowedChange' | 'actions' | 'promotedActions' | 'onEdit' | 'summary' | 'tabs' | 'summaryExpanded' | 'onToggleSummary' | 'utilitiesExpanded' | 'persistentUtility'> {
91
+ summaryId: string;
92
+ aboveMD: boolean;
93
+ aboveLG: boolean;
94
+ aboveXL: boolean;
95
+ isPreview: boolean;
96
+ }
97
+ //# sourceMappingURL=CaseView.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CaseView.types.d.ts","sourceRoot":"","sources":["../../../src/components/CaseView/CaseView.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE5D,OAAO,EACL,GAAG,EACH,cAAc,EACd,YAAY,EACZ,aAAa,EACb,MAAM,EACN,SAAS,EACV,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,aAAc,SAAQ,cAAc,EAAE,SAAS;IAC9D,2CAA2C;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAC;IAChB,8FAA8F;IAC9F,QAAQ,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,YAAY,CAAC;IAC3C,kFAAkF;IAClF,WAAW,CAAC,EAAE,aAAa,EAAE,CAAC;IAC9B,qDAAqD;IACrD,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,8GAA8G;IAC9G,QAAQ,CAAC,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OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAMhC;AAED,MAAM,WAAW,sBAAsB;IACrC,oEAAoE;IACpE,aAAa,EAAE;QACb,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,SAAS,CAAC;KAClB,EAAE,CAAC;IACJ,oEAAoE;IACpE,eAAe,EAAE;QACf,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,SAAS,CAAC;KAClB,EAAE,CAAC;CACL;AAED,MAAM,WAAW,oBACf,SAAQ,IAAI,CACV,aAAa,EACX,QAAQ,GACR,SAAS,GACT,UAAU,GACV,aAAa,GACb,MAAM,GACN,UAAU,GACV,kBAAkB,GAClB,SAAS,GACT,iBAAiB,GACjB,QAAQ,GACR,SAAS,GACT,MAAM,GACN,iBAAiB,GACjB,iBAAiB,GACjB,mBAAmB,GACnB,mBAAmB,CACtB;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;CACpB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=CaseView.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CaseView.types.js","sourceRoot":"","sources":["../../../src/components/CaseView/CaseView.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ReactElement, ReactNode, MouseEvent } from 'react';\n\nimport {\n Tab,\n NoChildrenProp,\n ForwardProps,\n MenuItemProps,\n Action,\n BaseProps\n} from '@pega/cosmos-react-core';\n\nexport interface CaseViewProps extends NoChildrenProp, BaseProps {\n /** A Case ID to display in the heading. */\n caseId: string;\n /** A text region for the title of the CaseView. */\n heading: string;\n /** A set of props including an href that will be forwarded to the case heading and caseId. */\n caseLink?: { href: string } & ForwardProps;\n /** A set of Link props representing the case parents, rendered as Breadcrumbs. */\n parentCases?: MenuItemProps[];\n /** An icon to serve as a visual for the CaseView. */\n icon?: ReactElement;\n /** Indicates if the current user is following the case. This should be updated based on onFollowedChange. */\n followed?: boolean;\n /** Called when user chooses to follow or unfollow the case. Use this to update followed. */\n onFollowedChange?: (following: boolean) => void;\n /** Case level actions available in an action menu. */\n actions?: Action[];\n /** Visually promoted case level actions available outside the menu. */\n promotedActions?: Action[];\n /** A callback for when the edit button is clicked */\n onEdit?: () => void;\n\n /** A region to display any summary information about the CaseView. */\n summary: ReactNode;\n /**\n * Determines the layout state of the summary region.\n * @default true\n */\n summaryExpanded?: boolean;\n /**\n * Callback to toggle the case summary's layout.\n */\n onToggleSummary?: () => void;\n\n /** An object handling the rendering and functionality of the Tabs in CaseSummary. */\n tabs: {\n items: Tab[];\n onClick: (id: string, event?: MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void;\n currentTabId: string;\n };\n /** A region within the center column that is controlled by tabs in CaseSummary. */\n tabContent?: { content: ReactNode; id: string }[];\n\n /** A region to hold a Stages component. */\n stages?: ReactNode;\n /** A region to hold a Tasks component. */\n tasks?: ReactNode;\n /** A region above the center column to display banners. */\n banners?: ReactNode;\n /** A region to the right reserved for persistent utilities. */\n persistentUtility?: { content: ReactNode; title: string };\n\n /** A region for case widgets. */\n utilities?: ReactNode;\n /** An indicator of case widgets when the utilities are collapsed. */\n utilitiesSummaryItems?: { iconName: string; count?: number }[];\n\n /**\n * Determines the layout state of the utilities.\n * @default true\n */\n utilitiesExpanded?: boolean;\n /**\n * Callback to toggle the utilities.\n */\n onToggleUtilities?: () => void;\n /**\n * Indicates CaseView is rendered within a CasePreview.\n * @internal\n */\n isPreview?: boolean;\n}\n\nexport interface CaseSummaryFieldsProps {\n /** The primary summary fields to display above secondary fields. */\n primaryFields: {\n id?: string;\n name: string;\n value: ReactNode;\n }[];\n /** The secondary summary fields to display below primary fields. */\n secondaryFields: {\n id?: string;\n name: string;\n value: ReactNode;\n }[];\n}\n\nexport interface CaseViewContextValue\n extends Pick<\n CaseViewProps,\n | 'caseId'\n | 'heading'\n | 'caseLink'\n | 'parentCases'\n | 'icon'\n | 'followed'\n | 'onFollowedChange'\n | 'actions'\n | 'promotedActions'\n | 'onEdit'\n | 'summary'\n | 'tabs'\n | 'summaryExpanded'\n | 'onToggleSummary'\n | 'utilitiesExpanded'\n | 'persistentUtility'\n > {\n summaryId: string;\n aboveMD: boolean;\n aboveLG: boolean;\n aboveXL: boolean;\n isPreview: boolean;\n}\n"]}
@@ -19,7 +19,7 @@ StyledMobileCaseViewHeader.defaultProps = defaultThemeProp;
19
19
  /** @deprecated */
20
20
  const MobileCaseView = (props) => {
21
21
  const { tabs, tabContent, title, ...restProps } = props;
22
- return (_jsxs(Flex, { container: { direction: 'column' }, as: StyledMobileCaseView, ...restProps, children: [_jsxs(Flex, { container: { direction: 'column' }, item: { shrink: 0 }, as: StyledMobileCaseViewHeader, children: [_jsx(Text, { as: 'h1', children: title }, void 0), _jsx(Tabs, { ...tabs, type: 'horizontal', inverted: true }, void 0)] }, void 0), tabContent] }, void 0));
22
+ return (_jsxs(Flex, { container: { direction: 'column' }, as: StyledMobileCaseView, ...restProps, children: [_jsxs(Flex, { container: { direction: 'column' }, item: { shrink: 0 }, as: StyledMobileCaseViewHeader, children: [_jsx(Text, { as: 'h1', children: title }), _jsx(Tabs, { ...tabs, type: 'horizontal', inverted: true })] }), tabContent] }));
23
23
  };
24
24
  export default MobileCaseView;
25
25
  //# sourceMappingURL=MobileCaseView.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MobileCaseView.js","sourceRoot":"","sources":["../../../src/components/CaseView/MobileCaseView.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EACL,IAAI,EACJ,IAAI,EAEJ,IAAI,EACJ,gBAAgB,EAEjB,MAAM,yBA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port styled from 'styled-components';\n\nimport {\n Flex,\n Tabs,\n TabsProps,\n Text,\n defaultThemeProp,\n ForwardProps\n} from '@pega/cosmos-react-core';\nimport { StyledText } from '@pega/cosmos-react-core/lib/components/Text/Text';\n\nexport interface MobileCaseViewProps {\n title: string;\n tabs: TabsProps;\n tabContent: ReactNode;\n}\n\nexport const StyledMobileCaseView = styled.div`\n min-height: 100vh;\n background-color: #e9eef3;\n`;\n\nexport const StyledMobileCaseViewHeader = styled.header`\n color: ${props => props.theme.base.palette.light};\n background-color: ${props => props.theme.base.palette.interactive};\n\n ${StyledText} {\n padding: ${props => props.theme.base.spacing};\n }\n`;\n\nStyledMobileCaseView.defaultProps = defaultThemeProp;\nStyledMobileCaseViewHeader.defaultProps = defaultThemeProp;\n\n/** @deprecated */\nconst MobileCaseView: FC<ForwardProps & MobileCaseViewProps> = (props: MobileCaseViewProps) => {\n const { tabs, tabContent, title, ...restProps } = props;\n\n return (\n <Flex container={{ direction: 'column' }} as={StyledMobileCaseView} {...restProps}>\n <Flex\n container={{ direction: 'column' }}\n item={{ shrink: 0 }}\n as={StyledMobileCaseViewHeader}\n >\n <Text as='h1'>{title}</Text>\n <Tabs {...tabs} type='horizontal' inverted />\n </Flex>\n {tabContent}\n </Flex>\n );\n};\n\nexport default MobileCaseView;\n"]}
1
+ {"version":3,"file":"MobileCaseView.js","sourceRoot":"","sources":["../../../src/components/CaseView/MobileCaseView.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EACL,IAAI,EACJ,IAAI,EAEJ,IAAI,EACJ,gBAAgB,EAEjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,kDAAkD,CAAC;AAQ9E,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAAA;;;CAG7C,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC,MAAM,CAAA;WAC5C,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK;sBAC5B,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW;;IAE/D,UAAU;eACC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO;;CAE/C,CAAC;AAEF,oBAAoB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AACrD,0BAA0B,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE3D,kBAAkB;AAClB,MAAM,cAAc,GAA2C,CAAC,KAA0B,EAAE,EAAE;IAC5F,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;IAExD,OAAO,CACL,MAAC,IAAI,IAAC,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,oBAAoB,KAAM,SAAS,aAC/E,MAAC,IAAI,IACH,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,EAClC,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,EACnB,EAAE,EAAE,0BAA0B,aAE9B,KAAC,IAAI,IAAC,EAAE,EAAC,IAAI,YAAE,KAAK,GAAQ,EAC5B,KAAC,IAAI,OAAK,IAAI,EAAE,IAAI,EAAC,YAAY,EAAC,QAAQ,SAAG,IACxC,EACN,UAAU,IACN,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import { FC, ReactNode } from 'react';\nimport styled from 'styled-components';\n\nimport {\n Flex,\n Tabs,\n TabsProps,\n Text,\n defaultThemeProp,\n ForwardProps\n} from '@pega/cosmos-react-core';\nimport { StyledText } from '@pega/cosmos-react-core/lib/components/Text/Text';\n\nexport interface MobileCaseViewProps {\n title: string;\n tabs: TabsProps;\n tabContent: ReactNode;\n}\n\nexport const StyledMobileCaseView = styled.div`\n min-height: 100vh;\n background-color: #e9eef3;\n`;\n\nexport const StyledMobileCaseViewHeader = styled.header`\n color: ${props => props.theme.base.palette.light};\n background-color: ${props => props.theme.base.palette.interactive};\n\n ${StyledText} {\n padding: ${props => props.theme.base.spacing};\n }\n`;\n\nStyledMobileCaseView.defaultProps = defaultThemeProp;\nStyledMobileCaseViewHeader.defaultProps = defaultThemeProp;\n\n/** @deprecated */\nconst MobileCaseView: FC<ForwardProps & MobileCaseViewProps> = (props: MobileCaseViewProps) => {\n const { tabs, tabContent, title, ...restProps } = props;\n\n return (\n <Flex container={{ direction: 'column' }} as={StyledMobileCaseView} {...restProps}>\n <Flex\n container={{ direction: 'column' }}\n item={{ shrink: 0 }}\n as={StyledMobileCaseViewHeader}\n >\n <Text as='h1'>{title}</Text>\n <Tabs {...tabs} type='horizontal' inverted />\n </Flex>\n {tabContent}\n </Flex>\n );\n};\n\nexport default MobileCaseView;\n"]}
@@ -1,12 +1,10 @@
1
1
  import { FunctionComponent } from 'react';
2
- import { ForwardProps } from '@pega/cosmos-react-core';
2
+ import { CaseViewProps } from './CaseView.types';
3
3
  export interface UtilitiesSummaryProps {
4
- items: {
5
- iconName: string;
6
- count?: number;
7
- }[];
4
+ items?: CaseViewProps['utilitiesSummaryItems'];
5
+ onClick?: () => void;
8
6
  }
9
7
  export declare const StyledUtilitiesSummary: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
10
- declare const UtilitiesSummary: FunctionComponent<UtilitiesSummaryProps & ForwardProps>;
8
+ declare const UtilitiesSummary: FunctionComponent<UtilitiesSummaryProps>;
11
9
  export default UtilitiesSummary;
12
10
  //# sourceMappingURL=UtilitiesSummary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UtilitiesSummary.d.ts","sourceRoot":"","sources":["../../../src/components/CaseView/UtilitiesSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,EAA2B,YAAY,EAAW,MAAM,yBAAyB,CAAC;AAEzF,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC/C;AAED,eAAO,MAAM,sBAAsB,yGAKjC,CAAC;AAEH,QAAA,MAAM,gBAAgB,EAAE,iBAAiB,CAAC,qBAAqB,GAAG,YAAY,CAiC7E,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"UtilitiesSummary.d.ts","sourceRoot":"","sources":["../../../src/components/CaseView/UtilitiesSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAiB,MAAM,OAAO,CAAC;AAKzD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,WAAW,qBAAqB;IACpC,KAAK,CAAC,EAAE,aAAa,CAAC,uBAAuB,CAAC,CAAC;IAC/C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,sBAAsB,yGAMjC,CAAC;AAEH,QAAA,MAAM,gBAAgB,EAAE,iBAAiB,CAAC,qBAAqB,CAiC9D,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -5,17 +5,21 @@ export const StyledUtilitiesSummary = styled.div(({ theme }) => {
5
5
  return css `
6
6
  width: 2.75rem;
7
7
  padding: ${theme.base.spacing} 0;
8
+ cursor: pointer;
8
9
  `;
9
10
  });
10
- const UtilitiesSummary = ({ items = [], ...restProps }) => {
11
+ const UtilitiesSummary = ({ items = [], onClick }) => {
11
12
  const t = useI18n();
12
- return items.length ? (_jsx(Card, { ...restProps, interactive: true, tabIndex: 0, role: 'button', container: { direction: 'column', alignItems: 'center', gap: 3 }, "aria-label": `${t('utilities_summary')}. ${t('expand_utilities_panel')}`, as: StyledUtilitiesSummary, children: items.map(item => {
13
+ return items.length ? (_jsx(Card, { interactive: true, tabIndex: 0, role: 'button', container: { direction: 'column', alignItems: 'center', gap: 3 }, "aria-label": `${t('utilities_summary')}. ${t('expand_utilities_panel')}`, as: StyledUtilitiesSummary, onClick: onClick, onKeyDown: (e) => {
14
+ if (e.key === ' ' || e.key === 'Enter')
15
+ onClick?.();
16
+ }, children: items.map(item => {
13
17
  return (_jsxs(Flex, { container: {
14
18
  direction: 'column',
15
19
  alignItems: 'center',
16
20
  gap: 0.5
17
- }, item: { grow: 1 }, children: [_jsx(Icon, { name: item.iconName }, void 0), item.count !== undefined && _jsx(Count, { variant: 'default', children: item.count }, void 0)] }, item.iconName));
18
- }) }, void 0)) : null;
21
+ }, item: { grow: 1 }, children: [_jsx(Icon, { name: item.iconName }), item.count !== undefined && _jsx(Count, { variant: 'default', children: item.count })] }, item.iconName));
22
+ }) })) : null;
19
23
  };
20
24
  export default UtilitiesSummary;
21
25
  //# sourceMappingURL=UtilitiesSummary.js.map