@pega/cosmos-react-build 4.0.0-dev.1.2 → 4.0.0-dev.10.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 (143) hide show
  1. package/lib/components/AppShell/AppShell.d.ts +3 -2
  2. package/lib/components/AppShell/AppShell.d.ts.map +1 -1
  3. package/lib/components/AppShell/AppShell.js +42 -80
  4. package/lib/components/AppShell/AppShell.js.map +1 -1
  5. package/lib/components/AppShell/AppShell.styles.d.ts +11 -15
  6. package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
  7. package/lib/components/AppShell/AppShell.styles.js +209 -282
  8. package/lib/components/AppShell/AppShell.styles.js.map +1 -1
  9. package/lib/components/AppShell/AppShell.types.d.ts +63 -31
  10. package/lib/components/AppShell/AppShell.types.d.ts.map +1 -1
  11. package/lib/components/AppShell/AppShell.types.js.map +1 -1
  12. package/lib/components/AppShell/AppShellContext.d.ts.map +1 -1
  13. package/lib/components/AppShell/AppShellContext.js +3 -5
  14. package/lib/components/AppShell/AppShellContext.js.map +1 -1
  15. package/lib/components/{AppHeader → AppShell/Header}/AppHeader.d.ts +0 -0
  16. package/lib/components/AppShell/Header/AppHeader.d.ts.map +1 -0
  17. package/lib/components/AppShell/Header/AppHeader.js +72 -0
  18. package/lib/components/AppShell/Header/AppHeader.js.map +1 -0
  19. package/lib/components/{AppHeader → AppShell/Header}/AppHeader.styles.d.ts +7 -6
  20. package/lib/components/AppShell/Header/AppHeader.styles.d.ts.map +1 -0
  21. package/lib/components/AppShell/Header/AppHeader.styles.js +173 -0
  22. package/lib/components/AppShell/Header/AppHeader.styles.js.map +1 -0
  23. package/lib/components/{AppHeader → AppShell/Header}/AppHeader.types.d.ts +3 -5
  24. package/lib/components/AppShell/Header/AppHeader.types.d.ts.map +1 -0
  25. package/lib/components/{AppHeader → AppShell/Header}/AppHeader.types.js +0 -0
  26. package/lib/components/AppShell/Header/AppHeader.types.js.map +1 -0
  27. package/lib/components/{AppHeader → AppShell/Header}/BranchButton.d.ts +0 -0
  28. package/lib/components/AppShell/Header/BranchButton.d.ts.map +1 -0
  29. package/lib/components/{AppHeader → AppShell/Header}/BranchButton.js +5 -5
  30. package/lib/components/AppShell/Header/BranchButton.js.map +1 -0
  31. package/lib/components/AppShell/NavigationList.d.ts +6 -0
  32. package/lib/components/AppShell/NavigationList.d.ts.map +1 -0
  33. package/lib/components/AppShell/NavigationList.js +92 -0
  34. package/lib/components/AppShell/NavigationList.js.map +1 -0
  35. package/lib/components/AppShell/index.d.ts +3 -1
  36. package/lib/components/AppShell/index.d.ts.map +1 -1
  37. package/lib/components/AppShell/index.js.map +1 -1
  38. package/lib/components/DynamicContentEditor/DynamicContentEditor.d.ts.map +1 -1
  39. package/lib/components/DynamicContentEditor/DynamicContentEditor.js +2 -2
  40. package/lib/components/DynamicContentEditor/DynamicContentEditor.js.map +1 -1
  41. package/lib/components/DynamicContentEditor/DynamicContentEditor.types.d.ts +1 -1
  42. package/lib/components/DynamicContentEditor/DynamicContentEditor.types.d.ts.map +1 -1
  43. package/lib/components/DynamicContentEditor/PegaCustomElement.d.ts +7 -0
  44. package/lib/components/DynamicContentEditor/PegaCustomElement.d.ts.map +1 -1
  45. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.d.ts.map +1 -1
  46. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.js +9 -24
  47. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.js.map +1 -1
  48. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.types.d.ts +4 -3
  49. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.types.d.ts.map +1 -1
  50. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.types.js.map +1 -1
  51. package/lib/components/ExpressionBuilder/index.d.ts +1 -1
  52. package/lib/components/ExpressionBuilder/index.d.ts.map +1 -1
  53. package/lib/components/ExpressionBuilder/index.js.map +1 -1
  54. package/lib/components/FlowModeller/Connector.d.ts +1 -1
  55. package/lib/components/FlowModeller/Connector.d.ts.map +1 -1
  56. package/lib/components/FlowModeller/Node/NodeTemplate.styles.d.ts +5 -1
  57. package/lib/components/FlowModeller/Node/NodeTemplate.styles.d.ts.map +1 -1
  58. package/lib/components/FlowModeller/Node/NodeTemplate.styles.js +10 -3
  59. package/lib/components/FlowModeller/Node/NodeTemplate.styles.js.map +1 -1
  60. package/lib/components/FlowModeller/Node/NodeTemplates.d.ts.map +1 -1
  61. package/lib/components/FlowModeller/Node/NodeTemplates.js +10 -28
  62. package/lib/components/FlowModeller/Node/NodeTemplates.js.map +1 -1
  63. package/lib/components/LifeCycle/LifeCycle.types.d.ts +1 -1
  64. package/lib/components/LifeCycle/LifeCycle.types.d.ts.map +1 -1
  65. package/lib/components/LifeCycle/Stage.d.ts.map +1 -1
  66. package/lib/components/LifeCycle/Stage.js +3 -9
  67. package/lib/components/LifeCycle/Stage.js.map +1 -1
  68. package/lib/components/LifeCycle/Step.d.ts +3 -2
  69. package/lib/components/LifeCycle/Step.d.ts.map +1 -1
  70. package/lib/components/LifeCycle/Step.js +27 -22
  71. package/lib/components/LifeCycle/Step.js.map +1 -1
  72. package/lib/components/LifeCycle/Task.d.ts.map +1 -1
  73. package/lib/components/LifeCycle/Task.js +5 -11
  74. package/lib/components/LifeCycle/Task.js.map +1 -1
  75. package/lib/components/MobileBuildSummary/MobileBuildSummary.d.ts +0 -1
  76. package/lib/components/MobileBuildSummary/MobileBuildSummary.d.ts.map +1 -1
  77. package/lib/components/MobileBuildSummary/MobileBuildSummary.js +5 -16
  78. package/lib/components/MobileBuildSummary/MobileBuildSummary.js.map +1 -1
  79. package/lib/components/MobileBuildSummary/MobileBuildSummary.types.d.ts +3 -2
  80. package/lib/components/MobileBuildSummary/MobileBuildSummary.types.d.ts.map +1 -1
  81. package/lib/components/MobileBuildSummary/MobileBuildSummary.types.js.map +1 -1
  82. package/lib/components/ObjectSelect/ObjectSummary.d.ts +10 -3
  83. package/lib/components/ObjectSelect/ObjectSummary.d.ts.map +1 -1
  84. package/lib/components/ObjectSelect/ObjectSummary.js +41 -7
  85. package/lib/components/ObjectSelect/ObjectSummary.js.map +1 -1
  86. package/lib/components/ObjectSelect/useCreateModal.d.ts +5 -0
  87. package/lib/components/ObjectSelect/useCreateModal.d.ts.map +1 -1
  88. package/lib/components/ObjectSelect/useCreateModal.js +5 -6
  89. package/lib/components/ObjectSelect/useCreateModal.js.map +1 -1
  90. package/lib/components/PageBanner/PageBanner.d.ts +22 -0
  91. package/lib/components/PageBanner/PageBanner.d.ts.map +1 -0
  92. package/lib/components/PageBanner/PageBanner.js +59 -0
  93. package/lib/components/PageBanner/PageBanner.js.map +1 -0
  94. package/lib/components/PageBanner/index.d.ts +3 -0
  95. package/lib/components/PageBanner/index.d.ts.map +1 -0
  96. package/lib/components/PageBanner/index.js +2 -0
  97. package/lib/components/PageBanner/index.js.map +1 -0
  98. package/lib/components/PageTemplates/GalleryPage.d.ts +10 -10
  99. package/lib/components/PageTemplates/GalleryPage.d.ts.map +1 -1
  100. package/lib/components/PageTemplates/GalleryPage.js +35 -11
  101. package/lib/components/PageTemplates/GalleryPage.js.map +1 -1
  102. package/lib/components/PageTemplates/PageTemplates.d.ts +1 -1
  103. package/lib/components/PageTemplates/PageTemplates.d.ts.map +1 -1
  104. package/lib/components/PageTemplates/PageTemplates.js +16 -49
  105. package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
  106. package/lib/components/PageTemplates/ShowcasePage.d.ts +16 -0
  107. package/lib/components/PageTemplates/ShowcasePage.d.ts.map +1 -0
  108. package/lib/components/PageTemplates/ShowcasePage.js +29 -0
  109. package/lib/components/PageTemplates/ShowcasePage.js.map +1 -0
  110. package/lib/components/PageTemplates/index.d.ts +3 -1
  111. package/lib/components/PageTemplates/index.d.ts.map +1 -1
  112. package/lib/components/PageTemplates/index.js +2 -1
  113. package/lib/components/PageTemplates/index.js.map +1 -1
  114. package/lib/components/SummaryCard/SummaryCard.d.ts.map +1 -1
  115. package/lib/components/SummaryCard/SummaryCard.js +4 -3
  116. package/lib/components/SummaryCard/SummaryCard.js.map +1 -1
  117. package/lib/components/Workbench/Workbench.types.d.ts +2 -2
  118. package/lib/components/Workbench/Workbench.types.d.ts.map +1 -1
  119. package/lib/index.d.ts +3 -2
  120. package/lib/index.d.ts.map +1 -1
  121. package/lib/index.js +3 -2
  122. package/lib/index.js.map +1 -1
  123. package/lib/utils/utils.d.ts +1 -1
  124. package/lib/utils/utils.d.ts.map +1 -1
  125. package/package.json +11 -5
  126. package/lib/components/AppHeader/AppHeader.d.ts.map +0 -1
  127. package/lib/components/AppHeader/AppHeader.js +0 -40
  128. package/lib/components/AppHeader/AppHeader.js.map +0 -1
  129. package/lib/components/AppHeader/AppHeader.styles.d.ts.map +0 -1
  130. package/lib/components/AppHeader/AppHeader.styles.js +0 -118
  131. package/lib/components/AppHeader/AppHeader.styles.js.map +0 -1
  132. package/lib/components/AppHeader/AppHeader.types.d.ts.map +0 -1
  133. package/lib/components/AppHeader/AppHeader.types.js.map +0 -1
  134. package/lib/components/AppHeader/BranchButton.d.ts.map +0 -1
  135. package/lib/components/AppHeader/BranchButton.js.map +0 -1
  136. package/lib/components/AppHeader/index.d.ts +0 -4
  137. package/lib/components/AppHeader/index.d.ts.map +0 -1
  138. package/lib/components/AppHeader/index.js +0 -3
  139. package/lib/components/AppHeader/index.js.map +0 -1
  140. package/lib/components/PageTemplates/GalleryPage.styles.d.ts +0 -9
  141. package/lib/components/PageTemplates/GalleryPage.styles.d.ts.map +0 -1
  142. package/lib/components/PageTemplates/GalleryPage.styles.js +0 -70
  143. package/lib/components/PageTemplates/GalleryPage.styles.js.map +0 -1
@@ -1,344 +1,271 @@
1
1
  import styled, { css } from 'styled-components';
2
- import { lighten, hideVisually } from 'polished';
2
+ import { lighten, rgba } from 'polished';
3
3
  import { useContext } from 'react';
4
- import { Icon, Text, tryCatch, defaultThemeProp, Button, useDirection, StyledIcon, StyledAvatar } from '@pega/cosmos-react-core';
5
- import { StyledSwitch, SwitchLabel } from '@pega/cosmos-react-core/lib/components/Switch/Switch';
6
- import { StyledBareButton } from '@pega/cosmos-react-core/lib/components/Button/BareButton';
7
- import { StyledNodeIcon, StyledNodeText, StyledNodeInteraction, StyledStandardTree } from '@pega/cosmos-react-core/lib/components/Tree/StandardTree.styles';
4
+ import { tryCatch, defaultThemeProp, Button, StyledIcon, useDirection, calculateFontSize } from '@pega/cosmos-react-core';
5
+ import { StyledToggleIcon, StyledNodeText, StyledNodeInteraction, StyledStandardTree } from '@pega/cosmos-react-core/lib/components/Tree/StandardTree.styles';
8
6
  import AppShellContext from './AppShellContext';
9
- const hoverBg = 'rgba(0, 0, 0, 0.4)';
10
- export const StyledNavToggle = styled(Button)(({ theme }) => {
11
- const { ltr } = useDirection();
12
- return css `
13
- position: absolute;
14
- z-index: 1;
15
- inset-block-start: calc(2 * ${theme.base.spacing});
16
- inset-inline-end: 0;
17
- min-width: 1.5rem;
18
- min-height: 1.5rem;
19
- border: none;
20
- color: ${theme.base.palette['foreground-color']};
21
- box-shadow: ${theme.base.shadow.low};
22
- border-radius: 50%;
23
- transition-property: background-color;
24
- transform: translateX(${ltr ? '50%' : '-50%'});
25
-
26
- ${StyledIcon} {
27
- width: 1.5rem;
28
- height: 1.5rem;
29
- }
30
-
31
- &[aria-expanded='${ltr ? 'true' : 'false'}'] {
32
- ${StyledIcon} {
33
- transform: rotateY(180deg);
34
- }
35
- }
36
- `;
37
- });
38
- StyledNavToggle.defaultProps = defaultThemeProp;
39
- export const StyledHeader = styled.div(({ theme }) => {
40
- const borderColor = tryCatch(() => lighten(0.1, theme.components['app-shell'].nav['background-color']));
41
- return css `
42
- width: 100%;
43
- height: auto;
44
- border-bottom: 0.0625rem solid ${borderColor};
45
- transition: height ${theme.base.animation.speed} ${theme.base.animation.timing['ease-out']};
46
- padding: calc(1.2 * ${theme.base.spacing}) calc(2 * ${theme.base.spacing});
47
-
48
- div {
49
- min-width: 0;
50
- }
51
-
52
- li {
53
- color: ${theme.base.palette.info};
54
- }
55
-
56
- ${StyledAvatar} {
57
- flex-shrink: 0;
58
- }
59
- `;
60
- });
61
- StyledHeader.defaultProps = defaultThemeProp;
62
- export const StyledDrawerHeader = styled(StyledHeader)(({ theme }) => {
63
- return css `
64
- padding: calc(2 * ${theme.base.spacing});
65
- padding-inline-start: ${theme.base.spacing};
66
- `;
67
- });
68
- StyledDrawerHeader.defaultProps = defaultThemeProp;
69
- export const StyledNavHeaderIcon = styled(Icon)(({ theme }) => {
70
- return css `
71
- color: ${theme.base.colors.white};
72
- `;
73
- });
74
- StyledNavHeaderIcon.defaultProps = defaultThemeProp;
75
- export const StyledNavTitle = styled(Text)(({ theme }) => {
76
- return css `
77
- color: ${theme.base.colors.white};
78
- word-break: break-word;
79
- `;
80
- });
81
- StyledNavTitle.defaultProps = defaultThemeProp;
82
- export const StyledUtils = styled.div(({ theme, showDevMode }) => {
7
+ const navWidth = '3rem';
8
+ const navOpenWidth = '14rem';
9
+ export const StyledUtils = styled.div(({ theme }) => {
83
10
  const borderColor = tryCatch(() => lighten(0.1, theme.components['app-shell'].nav['background-color']));
84
11
  return css `
85
- padding-bottom: calc(${showDevMode ? 2 : 0} * ${theme.base.spacing});
86
- border-top: 0.0625rem solid ${borderColor};
87
- ${StyledSwitch} {
88
- &:hover {
89
- background-color: ${hoverBg};
90
- }
91
-
92
- ${SwitchLabel} {
93
- height: calc(2rem + 4 * ${theme.base.spacing});
94
- padding: calc(2 * ${theme.base.spacing});
95
- text-transform: capitalize;
96
- color: ${theme.base.colors.gray.light};
97
- font-weight: ${theme.base['font-weight'].bold};
98
-
99
- &::before,
100
- &::after {
101
- margin-inline-end: calc(2 * ${theme.base.spacing});
102
- }
103
- }
104
- }
105
- & > ul {
106
- list-style: none;
107
- }
12
+ padding-block: ${theme.base.spacing};
13
+ border-block-start: 0.0625rem solid ${borderColor};
108
14
  `;
109
15
  });
110
16
  StyledUtils.defaultProps = defaultThemeProp;
111
- export const StyledUtilItem = styled.li(({ theme }) => {
17
+ export const StyledAppShellToggleButton = styled(Button)(({ theme, open }) => {
112
18
  return css `
113
- &[aria-current='true'] {
114
- background-color: rgba(0, 0, 0, 0.4);
115
-
116
- & > ${StyledBareButton} {
117
- color: ${theme.base.colors.blue.light};
118
- }
119
- }
19
+ background-color: ${theme.base.palette.dark};
20
+ color: ${theme.base.palette.light};
21
+ border: none;
120
22
 
121
- ${StyledBareButton} {
122
- font-weight: ${theme.base['font-weight']['semi-bold']};
123
- color: ${theme.base.colors.white};
124
- width: 100%;
125
- height: 100%;
126
- text-align: start;
127
- padding: ${theme.base.spacing} calc(2 * ${theme.base.spacing});
23
+ ${open &&
24
+ css `
25
+ padding-inline: 1rem;
26
+ `}
128
27
 
129
- &:hover {
130
- background-color: rgba(0, 0, 0, 0.4);
131
- }
28
+ ${StyledIcon} {
29
+ width: 1.25rem;
30
+ height: 1.25rem;
31
+ font-weight: bold;
32
+ }
132
33
 
133
- &:focus {
134
- box-shadow: inset ${theme.base.shadow['focus-inverted']};
135
- }
34
+ &:enabled:focus,
35
+ :not([disabled]):focus {
36
+ box-shadow: ${theme.base.shadow.focus};
136
37
  }
137
38
  `;
138
39
  });
139
- StyledUtilItem.defaultProps = defaultThemeProp;
40
+ StyledAppShellToggleButton.defaultProps = defaultThemeProp;
140
41
  export const StyledScrollWrap = styled.div(() => {
141
- const { drawerOpen } = useContext(AppShellContext);
142
42
  return css `
143
- height: ${drawerOpen ? 'calc(100% - 4rem)' : '100%'};
43
+ height: 100%;
144
44
  overflow-y: auto;
145
45
  `;
146
46
  });
147
47
  StyledScrollWrap.defaultProps = defaultThemeProp;
148
- export const StyledNavContent = styled.div(({ theme }) => {
149
- const { navState } = useContext(AppShellContext);
48
+ export const StyledMain = styled.main(({ navOpen, hideNav, theme: { base: { animation, breakpoints, palette } } }) => {
150
49
  return css `
151
- width: 14rem;
152
- height: 100%;
153
- opacity: 0;
154
- transition: opacity ${theme.base.animation.speed} ${theme.base.animation.timing.ease};
50
+ position: relative;
51
+ min-height: calc(100vh - 6rem);
52
+ background-color: ${palette['app-background']};
53
+ margin-inline-start: ${navWidth};
54
+ transition: margin-inline-start ${`${animation.speed} ${animation.timing.ease}`};
55
+
56
+ @media (pointer: coarse) {
57
+ min-height: calc(100vh - 8rem);
58
+ }
155
59
 
156
- ${navState === 'collapsed' &&
157
- css `
158
- display: none;
159
- `}
60
+ @media (min-width: ${breakpoints.md}) {
61
+ min-height: calc(100vh - 3rem);
62
+ }
160
63
 
161
- ${(navState === 'expanding' || navState === 'expanded') &&
64
+ ${navOpen &&
162
65
  css `
163
- opacity: 1;
164
- `}
165
- `;
166
- });
167
- StyledNavContent.defaultProps = defaultThemeProp;
168
- export const StyledMain = styled.main(({ theme }) => {
169
- return css `
170
- position: relative;
171
- min-height: calc(100vh - 3rem);
172
- background-color: ${theme.base.palette['app-background']};
173
- transition: margin ${theme.base.animation.speed} ${theme.base.animation.timing.ease};
174
- `;
175
- });
176
- StyledMain.defaultProps = defaultThemeProp;
177
- export const StyledDrawerWrapper = styled.div(() => {
178
- const { drawerOpen } = useContext(AppShellContext);
179
- return css `
180
- position: relative;
181
- z-index: 1;
182
- height: ${drawerOpen ? '100%' : 'auto'};
183
- `;
184
- });
185
- StyledDrawerWrapper.defaultProps = defaultThemeProp;
186
- export const StyledNavHeaderVisual = styled.div(({ theme, bgColor }) => {
187
- return css `
188
- min-width: 2rem;
189
- min-height: 2rem;
190
- border-radius: 0.4rem;
191
- background-color: ${bgColor};
192
- margin-inline-end: ${theme.base.spacing};
193
- color: ${theme.base.colors.white};
194
- & svg {
195
- color: ${theme.base.colors.white};
196
- }
197
- `;
198
- });
199
- StyledNavHeaderVisual.defaultProps = defaultThemeProp;
200
- export const StyledDrawerCloseButton = styled(Button)(({ theme }) => {
201
- return css `
202
- margin-inline-end: ${theme.base.spacing};
203
- min-width: 1.5rem;
204
- min-height: 1.5rem;
205
- color: ${theme.base.colors.white};
66
+ margin-inline-start: ${navOpenWidth};
67
+ `}
206
68
 
207
- ${StyledIcon} {
208
- width: 1em;
209
- height: 1em;
210
- }
211
- `;
212
- });
213
- StyledDrawerCloseButton.defaultProps = defaultThemeProp;
214
- export const StyledInnerNav = styled.div(() => {
215
- const { navState } = useContext(AppShellContext);
216
- return css `
217
- height: 100%;
218
- ${(navState === 'collapsing' || navState === 'expanding') &&
69
+ ${hideNav &&
219
70
  css `
220
- overflow: hidden;
221
- `}
222
- `;
71
+ transition-duration: 0s;
72
+ margin-inline-start: 0;
73
+ `}
74
+ `;
223
75
  });
224
- StyledInnerNav.defaultProps = defaultThemeProp;
225
- export const StyledNav = styled.nav(({ theme }) => {
76
+ StyledMain.defaultProps = defaultThemeProp;
77
+ export const StyledNav = styled.nav(({ theme: { base: { breakpoints, colors, palette, animation, spacing, shadow, 'custom-scrollbar': customScrollbar, 'border-radius': borderRadius, 'font-size': fontSize, 'font-scale': fontScale }, components: { 'app-shell': appShell } } }) => {
226
78
  const { navState } = useContext(AppShellContext);
79
+ const fontSizes = calculateFontSize(fontSize, fontScale);
227
80
  return css `
228
- position: fixed;
229
- z-index: 1;
230
- height: calc(100vh - 3rem);
231
- background: ${theme.components['app-shell'].nav['background-color']};
232
-
233
- &,
234
- ${StyledInnerNav} {
235
- width: ${navState === 'expanding' || navState === 'expanded' ? '14' : '1.5'}rem;
236
- transition: width ${theme.base.animation.speed} ${theme.base.animation.timing.ease};
237
- }
81
+ position: fixed;
82
+ z-index: 1;
83
+ height: calc(100vh - 6rem);
84
+ background: ${appShell.nav['background-color']};
85
+ width: ${navState === 'opening' || navState === 'open' ? navOpenWidth : navWidth};
86
+ transition: width ${animation.speed} ${animation.timing.ease};
87
+ display: flex;
88
+
89
+ ${StyledStandardTree} {
90
+ background-color: ${palette.dark};
91
+
92
+ ${StyledNodeText}, ${StyledToggleIcon} {
93
+ color: rgba(255, 255, 255, 0.7);
94
+ font-size: ${fontSizes.s};
95
+ }
238
96
 
239
- ${theme.base['custom-scrollbar'] &&
240
- css `
241
- * {
242
- scrollbar-color: rgba(255, 255, 255, 0.6) rgba(0, 0, 0, 0.2);
243
- scrollbar-width: thin;
244
- }
97
+ ${StyledNodeInteraction} {
98
+ padding-block-start: calc(0.5 * ${spacing});
99
+ padding-block-end: calc(0.5 * ${spacing});
245
100
 
246
- @supports not ((scrollbar-width: thin) or (scrollbar-color: black white)) {
247
- /* stylelint-disable unit-allowed-list */
101
+ &:hover {
102
+ background: rgba(255, 255, 255, 0.1);
248
103
 
249
- *::-webkit-scrollbar {
250
- width: 12px;
251
- height: 12px;
252
- }
104
+ ${StyledNodeText} {
105
+ color: ${palette.light};
106
+ }
107
+ }
253
108
 
254
- *::-webkit-scrollbar-track {
255
- background-color: rgba(0, 0, 0, 0.2);
256
- }
109
+ &:focus {
110
+ box-shadow: ${shadow['focus-inset']};
111
+ }
257
112
 
258
- *::-webkit-scrollbar-corner {
259
- background-color: rgba(0, 0, 0, 0.2);
260
- border-bottom-right-radius: inherit;
261
- }
113
+ &[aria-current='page'],
114
+ &[aria-current='true'] {
115
+ background: rgba(255, 255, 255, 0.05);
262
116
 
263
- *::-webkit-scrollbar-thumb {
264
- background-color: transparent;
265
- border: 3px solid transparent;
266
- border-radius: calc(1.125 * ${theme.base['border-radius']});
267
- box-shadow: inset 0 0 2px 4px rgba(255, 255, 255, 0.6);
117
+ ${StyledNodeText} {
118
+ color: ${colors.blue.light};
119
+ }
120
+ }
268
121
  }
269
122
 
270
- *::-webkit-scrollbar-thumb:hover {
271
- box-shadow: inset 0 0 2px 4px rgba(255, 255, 255, 0.7);
123
+ &:has(:focus-visible) {
124
+ box-shadow: inset 0 0 0 0.125rem #71c1ff99;
272
125
  }
126
+ }
273
127
 
274
- *::-webkit-scrollbar-track:horizontal {
275
- border-bottom-left-radius: inherit;
128
+ ${customScrollbar &&
129
+ css `
130
+ * {
131
+ scrollbar-color: rgba(255, 255, 255, 0.6) rgba(0, 0, 0, 0.2);
132
+ scrollbar-width: thin;
276
133
  }
277
134
 
278
- *::-webkit-scrollbar-track:vertical {
279
- border-top-right-radius: inherit;
280
- }
135
+ @supports not ((scrollbar-width: thin) or (scrollbar-color: black white)) {
136
+ /* stylelint-disable unit-allowed-list */
137
+
138
+ *::-webkit-scrollbar {
139
+ width: 12px;
140
+ height: 12px;
141
+ }
142
+
143
+ *::-webkit-scrollbar-track {
144
+ background-color: rgba(0, 0, 0, 0.2);
145
+ }
146
+
147
+ *::-webkit-scrollbar-corner {
148
+ background-color: rgba(0, 0, 0, 0.2);
149
+ border-bottom-right-radius: inherit;
150
+ }
281
151
 
282
- /* stylelint-disable-next-line selector-pseudo-class-no-unknown */
283
- *::-webkit-scrollbar-track:not(:corner-present) {
284
- border-bottom-right-radius: inherit;
152
+ *::-webkit-scrollbar-thumb {
153
+ background-color: transparent;
154
+ border: 3px solid transparent;
155
+ border-radius: calc(1.125 * ${borderRadius});
156
+ box-shadow: inset 0 0 2px 4px rgba(255, 255, 255, 0.6);
157
+ }
158
+
159
+ *::-webkit-scrollbar-thumb:hover {
160
+ box-shadow: inset 0 0 2px 4px rgba(255, 255, 255, 0.7);
161
+ }
162
+
163
+ *::-webkit-scrollbar-track:horizontal {
164
+ border-bottom-left-radius: inherit;
165
+ }
166
+
167
+ *::-webkit-scrollbar-track:vertical {
168
+ border-top-right-radius: inherit;
169
+ }
170
+
171
+ /* stylelint-disable-next-line selector-pseudo-class-no-unknown */
172
+ *::-webkit-scrollbar-track:not(:corner-present) {
173
+ border-bottom-right-radius: inherit;
174
+ }
175
+
176
+ /* stylelint-enable unit-allowed-list */
285
177
  }
178
+ `}
286
179
 
287
- /* stylelint-enable unit-allowed-list */
180
+ @media (pointer: coarse) {
181
+ height: calc(100vh - 8rem);
288
182
  }
289
- `}
290
183
 
291
- &:not(:hover) {
292
- ${StyledNavToggle}[aria-expanded='true']:not(:focus) {
293
- ${hideVisually}
184
+ @media (min-width: ${breakpoints.md}) {
185
+ height: calc(100vh - 3rem);
294
186
  }
295
- }
187
+ `;
188
+ });
189
+ StyledNav.defaultProps = defaultThemeProp;
190
+ export const StyledAppShellCaretIcon = styled.svg(({ nestedListCollapsed, theme }) => {
191
+ const { rtl } = useDirection();
192
+ return css `
193
+ transition-property: transform;
194
+ transition-duration: ${theme.base.animation.speed};
195
+ transition-timing-function: ${theme.base.animation.timing.ease};
296
196
 
297
- /*
298
- * A hoverable area just outside the nav for easier mouse interaction with the collapse button.
299
- * As the collpase button straddles the nav boundary, so maybe too should the hoverable area.
300
- */
301
- &::after {
302
- content: '';
303
- display: block;
304
- position: absolute;
305
- inset-block-start: 0;
306
- inset-inline-start: 100%;
307
- width: calc(2 * ${theme.base.spacing});
308
- height: 100%;
197
+ ${nestedListCollapsed === false &&
198
+ css `
199
+ transform: rotateZ(${rtl ? '-90deg' : '90deg'});
200
+ `}
201
+ `;
202
+ });
203
+ StyledAppShellCaretIcon.defaultProps = defaultThemeProp;
204
+ export const StyledNavListItem = styled.li(({ theme }) => {
205
+ const { navOpen } = useContext(AppShellContext);
206
+ const activeBackground = tryCatch(() => rgba('#000000', theme.base.transparency['transparent-4']));
207
+ return css `
208
+ display: block;
209
+ position: relative;
210
+ ${StyledIcon} {
211
+ font-size: 1.25rem;
309
212
  }
310
213
 
311
- ${StyledStandardTree} {
312
- color: ${theme.base.colors.white};
214
+ > :first-child {
215
+ position: relative;
216
+ display: flex;
217
+ align-items: center;
218
+ width: 100%;
219
+ padding: calc(1.25 * ${theme.base.spacing}) 0;
220
+ white-space: nowrap;
221
+ color: rgba(255, 255, 255, 0.7);
222
+ cursor: pointer;
223
+ font-weight: ${theme.base['font-weight']['semi-bold']};
224
+ text-decoration: none;
313
225
 
314
- ${StyledNodeText} {
315
- font-weight: ${theme.base['font-weight']['semi-bold']};
226
+ span {
227
+ overflow: hidden;
228
+ color: inherit;
316
229
  }
317
230
 
318
- ${StyledNodeInteraction} {
319
- padding-block-start: calc(0.5 * ${theme.base.spacing});
320
- padding-block-end: calc(0.5 * ${theme.base.spacing});
321
- &:hover,
322
- &[aria-current='true'] {
323
- background-color: ${hoverBg};
324
- }
231
+ &:hover,
232
+ &:focus {
233
+ color: ${theme.base.palette.light};
234
+ background: rgba(255, 255, 255, 0.05);
235
+ }
325
236
 
326
- &[aria-current='true'] {
327
- ${StyledNodeIcon},
328
- ${StyledNodeText} {
329
- color: ${theme.base.colors.blue.light};
330
- }
331
- }
237
+ &:focus {
238
+ outline: none;
239
+ box-shadow: ${theme.base.shadow['focus-inset']};
240
+ }
241
+
242
+ ${StyledAppShellCaretIcon}:last-child {
243
+ position: absolute;
244
+ left: ${navOpen ? 'auto' : '100%'};
245
+ ${navOpen &&
246
+ css `
247
+ inset-inline-end: 1rem;
248
+ `}
249
+ margin: 0;
250
+ opacity: ${navOpen ? '1' : '0'};
251
+ transition-property: opacity;
252
+ }
253
+
254
+ ${StyledIcon}:first-child {
255
+ flex-shrink: 0;
256
+ margin: 0 calc((${navWidth} - 1.125rem) / 2);
332
257
  }
333
258
  }
334
259
 
335
- /* Style for main is here since nav(the "&") may be conditionally rendered. */
336
- & + ${StyledMain} {
337
- margin-inline-start: ${navState === 'expanding' || navState === 'expanded'
338
- ? '14rem'
339
- : '1.5rem'};
260
+ &[aria-current='page'] > :first-child,
261
+ &[aria-current='true'] > :first-child,
262
+ &:has([aria-current='page']) > :first-child,
263
+ &:has([aria-current='true']) > :first-child {
264
+ color: ${theme.base.colors.blue.light};
265
+ background-color: ${activeBackground};
340
266
  }
341
267
  `;
342
268
  });
343
- StyledNav.defaultProps = defaultThemeProp;
269
+ StyledNavListItem.defaultProps = defaultThemeProp;
270
+ export const StyledNavList = styled.ul ``;
344
271
  //# sourceMappingURL=AppShell.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AppShell.styles.js","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAA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,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK;;;;;;;UAOvC,UAAU;6BACS,QAAQ,KAAK,WAAW,IAAI,QAAQ,KAAK,UAAU;QACxE,CAAC,CAAC,OAAO;QACT,CAAC,CAAC,QAAQ;;GAEf,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,SAAS,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport { lighten, hideVisually } from 'polished';\nimport { useContext } from 'react';\n\nimport {\n Icon,\n Text,\n tryCatch,\n defaultThemeProp,\n Button,\n useDirection,\n StyledIcon,\n StyledAvatar\n} from '@pega/cosmos-react-core';\nimport { StyledSwitch, SwitchLabel } from '@pega/cosmos-react-core/lib/components/Switch/Switch';\nimport { StyledBareButton } from '@pega/cosmos-react-core/lib/components/Button/BareButton';\nimport {\n StyledNodeIcon,\n StyledNodeText,\n StyledNodeInteraction,\n StyledStandardTree\n} from '@pega/cosmos-react-core/lib/components/Tree/StandardTree.styles';\n\nimport AppShellContext from './AppShellContext';\n\nconst hoverBg = 'rgba(0, 0, 0, 0.4)';\n\nexport const StyledNavToggle = styled(Button)(({ theme }) => {\n const { ltr } = useDirection();\n\n return css`\n position: absolute;\n z-index: 1;\n inset-block-start: calc(2 * ${theme.base.spacing});\n inset-inline-end: 0;\n min-width: 1.5rem;\n min-height: 1.5rem;\n border: none;\n color: ${theme.base.palette['foreground-color']};\n box-shadow: ${theme.base.shadow.low};\n border-radius: 50%;\n transition-property: background-color;\n transform: translateX(${ltr ? '50%' : '-50%'});\n\n ${StyledIcon} {\n width: 1.5rem;\n height: 1.5rem;\n }\n\n &[aria-expanded='${ltr ? 'true' : 'false'}'] {\n ${StyledIcon} {\n transform: rotateY(180deg);\n }\n }\n `;\n});\n\nStyledNavToggle.defaultProps = defaultThemeProp;\n\nexport const StyledHeader = styled.div(({ theme }) => {\n const borderColor = tryCatch(() =>\n lighten(0.1, theme.components['app-shell'].nav['background-color'])\n );\n\n return css`\n width: 100%;\n height: auto;\n border-bottom: 0.0625rem solid ${borderColor};\n transition: height ${theme.base.animation.speed} ${theme.base.animation.timing['ease-out']};\n padding: calc(1.2 * ${theme.base.spacing}) calc(2 * ${theme.base.spacing});\n\n div {\n min-width: 0;\n }\n\n li {\n color: ${theme.base.palette.info};\n }\n\n ${StyledAvatar} {\n flex-shrink: 0;\n }\n `;\n});\n\nStyledHeader.defaultProps = defaultThemeProp;\n\nexport const StyledDrawerHeader = styled(StyledHeader)(({ theme }) => {\n return css`\n padding: calc(2 * ${theme.base.spacing});\n padding-inline-start: ${theme.base.spacing};\n `;\n});\n\nStyledDrawerHeader.defaultProps = defaultThemeProp;\n\nexport const StyledNavHeaderIcon = styled(Icon)(({ theme }) => {\n return css`\n color: ${theme.base.colors.white};\n `;\n});\n\nStyledNavHeaderIcon.defaultProps = defaultThemeProp;\n\nexport const StyledNavTitle = styled(Text)(({ theme }) => {\n return css`\n color: ${theme.base.colors.white};\n word-break: break-word;\n `;\n});\n\nStyledNavTitle.defaultProps = defaultThemeProp;\n\nexport const StyledUtils = styled.div<{ showDevMode: boolean }>(({ theme, showDevMode }) => {\n const borderColor = tryCatch(() =>\n lighten(0.1, theme.components['app-shell'].nav['background-color'])\n );\n\n return css`\n padding-bottom: calc(${showDevMode ? 2 : 0} * ${theme.base.spacing});\n border-top: 0.0625rem solid ${borderColor};\n ${StyledSwitch} {\n &:hover {\n background-color: ${hoverBg};\n }\n\n ${SwitchLabel} {\n height: calc(2rem + 4 * ${theme.base.spacing});\n padding: calc(2 * ${theme.base.spacing});\n text-transform: capitalize;\n color: ${theme.base.colors.gray.light};\n font-weight: ${theme.base['font-weight'].bold};\n\n &::before,\n &::after {\n margin-inline-end: calc(2 * ${theme.base.spacing});\n }\n }\n }\n & > ul {\n list-style: none;\n }\n `;\n});\n\nStyledUtils.defaultProps = defaultThemeProp;\n\nexport const StyledUtilItem = styled.li(({ theme }) => {\n return css`\n &[aria-current='true'] {\n background-color: rgba(0, 0, 0, 0.4);\n\n & > ${StyledBareButton} {\n color: ${theme.base.colors.blue.light};\n }\n }\n\n ${StyledBareButton} {\n font-weight: ${theme.base['font-weight']['semi-bold']};\n color: ${theme.base.colors.white};\n width: 100%;\n height: 100%;\n text-align: start;\n padding: ${theme.base.spacing} calc(2 * ${theme.base.spacing});\n\n &:hover {\n background-color: rgba(0, 0, 0, 0.4);\n }\n\n &:focus {\n box-shadow: inset ${theme.base.shadow['focus-inverted']};\n }\n }\n `;\n});\n\nStyledUtilItem.defaultProps = defaultThemeProp;\n\nexport const StyledScrollWrap = styled.div(() => {\n const { drawerOpen } = useContext(AppShellContext);\n\n return css`\n height: ${drawerOpen ? 'calc(100% - 4rem)' : '100%'};\n overflow-y: auto;\n `;\n});\n\nStyledScrollWrap.defaultProps = defaultThemeProp;\n\nexport const StyledNavContent = styled.div(({ theme }) => {\n const { navState } = useContext(AppShellContext);\n\n return css`\n width: 14rem;\n height: 100%;\n opacity: 0;\n transition: opacity ${theme.base.animation.speed} ${theme.base.animation.timing.ease};\n\n ${navState === 'collapsed' &&\n css`\n display: none;\n `}\n\n ${(navState === 'expanding' || navState === 'expanded') &&\n css`\n opacity: 1;\n `}\n `;\n});\n\nStyledNavContent.defaultProps = defaultThemeProp;\n\nexport const StyledMain = styled.main(({ theme }) => {\n return css`\n position: relative;\n min-height: calc(100vh - 3rem);\n background-color: ${theme.base.palette['app-background']};\n transition: margin ${theme.base.animation.speed} ${theme.base.animation.timing.ease};\n `;\n});\n\nStyledMain.defaultProps = defaultThemeProp;\n\nexport const StyledDrawerWrapper = styled.div(() => {\n const { drawerOpen } = useContext(AppShellContext);\n\n return css`\n position: relative;\n z-index: 1;\n height: ${drawerOpen ? '100%' : 'auto'};\n `;\n});\n\nStyledDrawerWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledNavHeaderVisual = styled.div<{ bgColor: string }>(({ theme, bgColor }) => {\n return css`\n min-width: 2rem;\n min-height: 2rem;\n border-radius: 0.4rem;\n background-color: ${bgColor};\n margin-inline-end: ${theme.base.spacing};\n color: ${theme.base.colors.white};\n & svg {\n color: ${theme.base.colors.white};\n }\n `;\n});\n\nStyledNavHeaderVisual.defaultProps = defaultThemeProp;\n\nexport const StyledDrawerCloseButton = styled(Button)(({ theme }) => {\n return css`\n margin-inline-end: ${theme.base.spacing};\n min-width: 1.5rem;\n min-height: 1.5rem;\n color: ${theme.base.colors.white};\n\n ${StyledIcon} {\n width: 1em;\n height: 1em;\n }\n `;\n});\n\nStyledDrawerCloseButton.defaultProps = defaultThemeProp;\n\nexport const StyledInnerNav = styled.div(() => {\n const { navState } = useContext(AppShellContext);\n\n return css`\n height: 100%;\n ${(navState === 'collapsing' || navState === 'expanding') &&\n css`\n overflow: hidden;\n `}\n `;\n});\n\nStyledInnerNav.defaultProps = defaultThemeProp;\n\nexport const StyledNav = styled.nav(({ theme }) => {\n const { navState } = useContext(AppShellContext);\n\n return css`\n position: fixed;\n z-index: 1;\n height: calc(100vh - 3rem);\n background: ${theme.components['app-shell'].nav['background-color']};\n\n &,\n ${StyledInnerNav} {\n width: ${navState === 'expanding' || navState === 'expanded' ? '14' : '1.5'}rem;\n transition: width ${theme.base.animation.speed} ${theme.base.animation.timing.ease};\n }\n\n ${theme.base['custom-scrollbar'] &&\n css`\n * {\n scrollbar-color: rgba(255, 255, 255, 0.6) rgba(0, 0, 0, 0.2);\n scrollbar-width: thin;\n }\n\n @supports not ((scrollbar-width: thin) or (scrollbar-color: black white)) {\n /* stylelint-disable unit-allowed-list */\n\n *::-webkit-scrollbar {\n width: 12px;\n height: 12px;\n }\n\n *::-webkit-scrollbar-track {\n background-color: rgba(0, 0, 0, 0.2);\n }\n\n *::-webkit-scrollbar-corner {\n background-color: rgba(0, 0, 0, 0.2);\n border-bottom-right-radius: inherit;\n }\n\n *::-webkit-scrollbar-thumb {\n background-color: transparent;\n border: 3px solid transparent;\n border-radius: calc(1.125 * ${theme.base['border-radius']});\n box-shadow: inset 0 0 2px 4px rgba(255, 255, 255, 0.6);\n }\n\n *::-webkit-scrollbar-thumb:hover {\n box-shadow: inset 0 0 2px 4px rgba(255, 255, 255, 0.7);\n }\n\n *::-webkit-scrollbar-track:horizontal {\n border-bottom-left-radius: inherit;\n }\n\n *::-webkit-scrollbar-track:vertical {\n border-top-right-radius: inherit;\n }\n\n /* stylelint-disable-next-line selector-pseudo-class-no-unknown */\n *::-webkit-scrollbar-track:not(:corner-present) {\n border-bottom-right-radius: inherit;\n }\n\n /* stylelint-enable unit-allowed-list */\n }\n `}\n\n &:not(:hover) {\n ${StyledNavToggle}[aria-expanded='true']:not(:focus) {\n ${hideVisually}\n }\n }\n\n /*\n * A hoverable area just outside the nav for easier mouse interaction with the collapse button.\n * As the collpase button straddles the nav boundary, so maybe too should the hoverable area.\n */\n &::after {\n content: '';\n display: block;\n position: absolute;\n inset-block-start: 0;\n inset-inline-start: 100%;\n width: calc(2 * ${theme.base.spacing});\n height: 100%;\n }\n\n ${StyledStandardTree} {\n color: ${theme.base.colors.white};\n\n ${StyledNodeText} {\n font-weight: ${theme.base['font-weight']['semi-bold']};\n }\n\n ${StyledNodeInteraction} {\n padding-block-start: calc(0.5 * ${theme.base.spacing});\n padding-block-end: calc(0.5 * ${theme.base.spacing});\n &:hover,\n &[aria-current='true'] {\n background-color: ${hoverBg};\n }\n\n &[aria-current='true'] {\n ${StyledNodeIcon},\n ${StyledNodeText} {\n color: ${theme.base.colors.blue.light};\n }\n }\n }\n }\n\n /* Style for main is here since nav(the \"&\") may be conditionally rendered. */\n & + ${StyledMain} {\n margin-inline-start: ${navState === 'expanding' || navState === 'expanded'\n ? '14rem'\n : '1.5rem'};\n }\n `;\n});\n\nStyledNav.defaultProps = defaultThemeProp;\n"]}
1
+ {"version":3,"file":"AppShell.styles.js","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE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gBAAgB,CAAC;AAExD,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACvD,MAAM,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC;IAChD,MAAM,gBAAgB,GAAG,QAAQ,CAAC,GAAG,EAAE,CACrC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC,CAC1D,CAAC;IAEF,OAAO,GAAG,CAAA;;;MAGN,UAAU;;;;;;;;;6BASa,KAAK,CAAC,IAAI,CAAC,OAAO;;;;qBAI1B,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;iBAU1C,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK;;;;;;sBAMnB,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC;;;QAG9C,uBAAuB;;gBAEf,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;UAC/B,OAAO;QACT,GAAG,CAAA;;SAEF;;mBAEU,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG;;;;QAI9B,UAAU;;0BAEQ,QAAQ;;;;;;;;eAQnB,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK;0BACjB,gBAAgB;;GAEvC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,iBAAiB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAElD,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,EAAE,CAAA,EAAE,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport { lighten, rgba } from 'polished';\nimport { useContext } from 'react';\n\nimport {\n tryCatch,\n defaultThemeProp,\n Button,\n StyledIcon,\n useDirection,\n calculateFontSize\n} from '@pega/cosmos-react-core';\nimport {\n StyledToggleIcon,\n StyledNodeText,\n StyledNodeInteraction,\n StyledStandardTree\n} from '@pega/cosmos-react-core/lib/components/Tree/StandardTree.styles';\n\nimport AppShellContext from './AppShellContext';\n\nconst navWidth = '3rem';\nconst navOpenWidth = '14rem';\n\nexport const StyledUtils = styled.div(({ theme }) => {\n const borderColor = tryCatch(() =>\n lighten(0.1, theme.components['app-shell'].nav['background-color'])\n );\n\n return css`\n padding-block: ${theme.base.spacing};\n border-block-start: 0.0625rem solid ${borderColor};\n `;\n});\n\nStyledUtils.defaultProps = defaultThemeProp;\n\nexport const StyledAppShellToggleButton = styled(Button)<{ open: boolean }>(({ theme, open }) => {\n return css`\n background-color: ${theme.base.palette.dark};\n color: ${theme.base.palette.light};\n border: none;\n\n ${open &&\n css`\n padding-inline: 1rem;\n `}\n\n ${StyledIcon} {\n width: 1.25rem;\n height: 1.25rem;\n font-weight: bold;\n }\n\n &:enabled:focus,\n :not([disabled]):focus {\n box-shadow: ${theme.base.shadow.focus};\n }\n `;\n});\n\nStyledAppShellToggleButton.defaultProps = defaultThemeProp;\n\nexport const StyledScrollWrap = styled.div(() => {\n return css`\n height: 100%;\n overflow-y: auto;\n `;\n});\n\nStyledScrollWrap.defaultProps = defaultThemeProp;\n\nexport const StyledMain = styled.main<{\n navOpen: boolean;\n hideNav: boolean;\n}>(\n ({\n navOpen,\n hideNav,\n theme: {\n base: { animation, breakpoints, palette }\n }\n }) => {\n return css`\n position: relative;\n min-height: calc(100vh - 6rem);\n background-color: ${palette['app-background']};\n margin-inline-start: ${navWidth};\n transition: margin-inline-start ${`${animation.speed} ${animation.timing.ease}`};\n\n @media (pointer: coarse) {\n min-height: calc(100vh - 8rem);\n }\n\n @media (min-width: ${breakpoints.md}) {\n min-height: calc(100vh - 3rem);\n }\n\n ${navOpen &&\n css`\n margin-inline-start: ${navOpenWidth};\n `}\n\n ${hideNav &&\n css`\n transition-duration: 0s;\n margin-inline-start: 0;\n `}\n `;\n }\n);\n\nStyledMain.defaultProps = defaultThemeProp;\n\nexport const StyledNav = styled.nav(\n ({\n theme: {\n base: {\n breakpoints,\n colors,\n palette,\n animation,\n spacing,\n shadow,\n 'custom-scrollbar': customScrollbar,\n 'border-radius': borderRadius,\n 'font-size': fontSize,\n 'font-scale': fontScale\n },\n components: { 'app-shell': appShell }\n }\n }) => {\n const { navState } = useContext(AppShellContext);\n const fontSizes = calculateFontSize(fontSize, fontScale);\n\n return css`\n position: fixed;\n z-index: 1;\n height: calc(100vh - 6rem);\n background: ${appShell.nav['background-color']};\n width: ${navState === 'opening' || navState === 'open' ? navOpenWidth : navWidth};\n transition: width ${animation.speed} ${animation.timing.ease};\n display: flex;\n\n ${StyledStandardTree} {\n background-color: ${palette.dark};\n\n ${StyledNodeText}, ${StyledToggleIcon} {\n color: rgba(255, 255, 255, 0.7);\n font-size: ${fontSizes.s};\n }\n\n ${StyledNodeInteraction} {\n padding-block-start: calc(0.5 * ${spacing});\n padding-block-end: calc(0.5 * ${spacing});\n\n &:hover {\n background: rgba(255, 255, 255, 0.1);\n\n ${StyledNodeText} {\n color: ${palette.light};\n }\n }\n\n &:focus {\n box-shadow: ${shadow['focus-inset']};\n }\n\n &[aria-current='page'],\n &[aria-current='true'] {\n background: rgba(255, 255, 255, 0.05);\n\n ${StyledNodeText} {\n color: ${colors.blue.light};\n }\n }\n }\n\n &:has(:focus-visible) {\n box-shadow: inset 0 0 0 0.125rem #71c1ff99;\n }\n }\n\n ${customScrollbar &&\n css`\n * {\n scrollbar-color: rgba(255, 255, 255, 0.6) rgba(0, 0, 0, 0.2);\n scrollbar-width: thin;\n }\n\n @supports not ((scrollbar-width: thin) or (scrollbar-color: black white)) {\n /* stylelint-disable unit-allowed-list */\n\n *::-webkit-scrollbar {\n width: 12px;\n height: 12px;\n }\n\n *::-webkit-scrollbar-track {\n background-color: rgba(0, 0, 0, 0.2);\n }\n\n *::-webkit-scrollbar-corner {\n background-color: rgba(0, 0, 0, 0.2);\n border-bottom-right-radius: inherit;\n }\n\n *::-webkit-scrollbar-thumb {\n background-color: transparent;\n border: 3px solid transparent;\n border-radius: calc(1.125 * ${borderRadius});\n box-shadow: inset 0 0 2px 4px rgba(255, 255, 255, 0.6);\n }\n\n *::-webkit-scrollbar-thumb:hover {\n box-shadow: inset 0 0 2px 4px rgba(255, 255, 255, 0.7);\n }\n\n *::-webkit-scrollbar-track:horizontal {\n border-bottom-left-radius: inherit;\n }\n\n *::-webkit-scrollbar-track:vertical {\n border-top-right-radius: inherit;\n }\n\n /* stylelint-disable-next-line selector-pseudo-class-no-unknown */\n *::-webkit-scrollbar-track:not(:corner-present) {\n border-bottom-right-radius: inherit;\n }\n\n /* stylelint-enable unit-allowed-list */\n }\n `}\n\n @media (pointer: coarse) {\n height: calc(100vh - 8rem);\n }\n\n @media (min-width: ${breakpoints.md}) {\n height: calc(100vh - 3rem);\n }\n `;\n }\n);\n\nStyledNav.defaultProps = defaultThemeProp;\n\nexport const StyledAppShellCaretIcon = styled.svg<{ nestedListCollapsed?: boolean }>(\n ({ nestedListCollapsed, theme }) => {\n const { rtl } = useDirection();\n\n return css`\n transition-property: transform;\n transition-duration: ${theme.base.animation.speed};\n transition-timing-function: ${theme.base.animation.timing.ease};\n\n ${nestedListCollapsed === false &&\n css`\n transform: rotateZ(${rtl ? '-90deg' : '90deg'});\n `}\n `;\n }\n);\n\nStyledAppShellCaretIcon.defaultProps = defaultThemeProp;\n\nexport const StyledNavListItem = styled.li(({ theme }) => {\n const { navOpen } = useContext(AppShellContext);\n const activeBackground = tryCatch(() =>\n rgba('#000000', theme.base.transparency['transparent-4'])\n );\n\n return css`\n display: block;\n position: relative;\n ${StyledIcon} {\n font-size: 1.25rem;\n }\n\n > :first-child {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n padding: calc(1.25 * ${theme.base.spacing}) 0;\n white-space: nowrap;\n color: rgba(255, 255, 255, 0.7);\n cursor: pointer;\n font-weight: ${theme.base['font-weight']['semi-bold']};\n text-decoration: none;\n\n span {\n overflow: hidden;\n color: inherit;\n }\n\n &:hover,\n &:focus {\n color: ${theme.base.palette.light};\n background: rgba(255, 255, 255, 0.05);\n }\n\n &:focus {\n outline: none;\n box-shadow: ${theme.base.shadow['focus-inset']};\n }\n\n ${StyledAppShellCaretIcon}:last-child {\n position: absolute;\n left: ${navOpen ? 'auto' : '100%'};\n ${navOpen &&\n css`\n inset-inline-end: 1rem;\n `}\n margin: 0;\n opacity: ${navOpen ? '1' : '0'};\n transition-property: opacity;\n }\n\n ${StyledIcon}:first-child {\n flex-shrink: 0;\n margin: 0 calc((${navWidth} - 1.125rem) / 2);\n }\n }\n\n &[aria-current='page'] > :first-child,\n &[aria-current='true'] > :first-child,\n &:has([aria-current='page']) > :first-child,\n &:has([aria-current='true']) > :first-child {\n color: ${theme.base.colors.blue.light};\n background-color: ${activeBackground};\n }\n `;\n});\n\nStyledNavListItem.defaultProps = defaultThemeProp;\n\nexport const StyledNavList = styled.ul``;\n"]}