@pega/cosmos-react-core 3.0.0-dev.16.1 → 3.0.0-dev.17.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 (150) hide show
  1. package/lib/components/AppShell/AppHeader.d.ts.map +1 -1
  2. package/lib/components/AppShell/AppHeader.js +4 -6
  3. package/lib/components/AppShell/AppHeader.js.map +1 -1
  4. package/lib/components/AppShell/AppHeader.styles.d.ts +16 -0
  5. package/lib/components/AppShell/AppHeader.styles.d.ts.map +1 -0
  6. package/lib/components/AppShell/AppHeader.styles.js +155 -0
  7. package/lib/components/AppShell/AppHeader.styles.js.map +1 -0
  8. package/lib/components/AppShell/AppShell.d.ts.map +1 -1
  9. package/lib/components/AppShell/AppShell.js +44 -157
  10. package/lib/components/AppShell/AppShell.js.map +1 -1
  11. package/lib/components/AppShell/AppShell.styles.d.ts +7 -51
  12. package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
  13. package/lib/components/AppShell/AppShell.styles.js +44 -535
  14. package/lib/components/AppShell/AppShell.styles.js.map +1 -1
  15. package/lib/components/AppShell/AppShell.types.d.ts +16 -5
  16. package/lib/components/AppShell/AppShell.types.d.ts.map +1 -1
  17. package/lib/components/AppShell/AppShell.types.js.map +1 -1
  18. package/lib/components/AppShell/AppShellContext.d.ts +2 -0
  19. package/lib/components/AppShell/AppShellContext.d.ts.map +1 -1
  20. package/lib/components/AppShell/AppShellContext.js +2 -0
  21. package/lib/components/AppShell/AppShellContext.js.map +1 -1
  22. package/lib/components/AppShell/AppShellList.js +3 -1
  23. package/lib/components/AppShell/AppShellList.js.map +1 -1
  24. package/lib/components/AppShell/AppShellList.styles.d.ts +19 -0
  25. package/lib/components/AppShell/AppShellList.styles.d.ts.map +1 -0
  26. package/lib/components/AppShell/AppShellList.styles.js +141 -0
  27. package/lib/components/AppShell/AppShellList.styles.js.map +1 -0
  28. package/lib/components/AppShell/AppShellSearch.d.ts +10 -0
  29. package/lib/components/AppShell/AppShellSearch.d.ts.map +1 -0
  30. package/lib/components/AppShell/AppShellSearch.js +32 -0
  31. package/lib/components/AppShell/AppShellSearch.js.map +1 -0
  32. package/lib/components/AppShell/AppShellSearch.styles.d.ts +8 -0
  33. package/lib/components/AppShell/AppShellSearch.styles.d.ts.map +1 -0
  34. package/lib/components/AppShell/AppShellSearch.styles.js +190 -0
  35. package/lib/components/AppShell/AppShellSearch.styles.js.map +1 -0
  36. package/lib/components/AppShell/Drawer.js +2 -2
  37. package/lib/components/AppShell/Drawer.js.map +1 -1
  38. package/lib/components/AppShell/Drawer.styles.d.ts +15 -0
  39. package/lib/components/AppShell/Drawer.styles.d.ts.map +1 -0
  40. package/lib/components/AppShell/Drawer.styles.js +153 -0
  41. package/lib/components/AppShell/Drawer.styles.js.map +1 -0
  42. package/lib/components/AppShell/NavigationList.d.ts +5 -0
  43. package/lib/components/AppShell/NavigationList.d.ts.map +1 -0
  44. package/lib/components/AppShell/NavigationList.js +123 -0
  45. package/lib/components/AppShell/NavigationList.js.map +1 -0
  46. package/lib/components/AppShell/NavigationListItemWrapper.d.ts +5 -0
  47. package/lib/components/AppShell/NavigationListItemWrapper.d.ts.map +1 -0
  48. package/lib/components/AppShell/NavigationListItemWrapper.js +109 -0
  49. package/lib/components/AppShell/NavigationListItemWrapper.js.map +1 -0
  50. package/lib/components/AppShell/Operator.js +4 -4
  51. package/lib/components/AppShell/Operator.js.map +1 -1
  52. package/lib/components/ComboBox/ComboBox.d.ts.map +1 -1
  53. package/lib/components/ComboBox/ComboBox.js +11 -2
  54. package/lib/components/ComboBox/ComboBox.js.map +1 -1
  55. package/lib/components/ComboBox/ComboBox.styles.d.ts +3 -1
  56. package/lib/components/ComboBox/ComboBox.styles.d.ts.map +1 -1
  57. package/lib/components/ComboBox/ComboBox.types.d.ts +2 -0
  58. package/lib/components/ComboBox/ComboBox.types.d.ts.map +1 -1
  59. package/lib/components/ComboBox/ComboBox.types.js.map +1 -1
  60. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.d.ts.map +1 -1
  61. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js +2 -2
  62. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js.map +1 -1
  63. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types.d.ts +2 -0
  64. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types.d.ts.map +1 -1
  65. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types.js.map +1 -1
  66. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.d.ts.map +1 -1
  67. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.js +2 -2
  68. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.js.map +1 -1
  69. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.types.d.ts +2 -0
  70. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.types.d.ts.map +1 -1
  71. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.types.js.map +1 -1
  72. package/lib/components/Currency/CurrencyInput.d.ts.map +1 -1
  73. package/lib/components/Currency/CurrencyInput.js +12 -3
  74. package/lib/components/Currency/CurrencyInput.js.map +1 -1
  75. package/lib/components/DateTime/DateTime.types.d.ts +2 -0
  76. package/lib/components/DateTime/DateTime.types.d.ts.map +1 -1
  77. package/lib/components/DateTime/DateTime.types.js.map +1 -1
  78. package/lib/components/DateTime/Input/DateInput.d.ts.map +1 -1
  79. package/lib/components/DateTime/Input/DateInput.js +12 -3
  80. package/lib/components/DateTime/Input/DateInput.js.map +1 -1
  81. package/lib/components/DateTime/Input/DateTimeInput.d.ts.map +1 -1
  82. package/lib/components/DateTime/Input/DateTimeInput.js +12 -3
  83. package/lib/components/DateTime/Input/DateTimeInput.js.map +1 -1
  84. package/lib/components/DateTime/Picker/Calendar.d.ts.map +1 -1
  85. package/lib/components/DateTime/Picker/Calendar.js +2 -2
  86. package/lib/components/DateTime/Picker/Calendar.js.map +1 -1
  87. package/lib/components/DateTime/Picker/TimePicker.d.ts.map +1 -1
  88. package/lib/components/DateTime/Picker/TimePicker.js +10 -5
  89. package/lib/components/DateTime/Picker/TimePicker.js.map +1 -1
  90. package/lib/components/ExpandCollapse/ExpandCollapse.d.ts.map +1 -1
  91. package/lib/components/ExpandCollapse/ExpandCollapse.js +1 -1
  92. package/lib/components/ExpandCollapse/ExpandCollapse.js.map +1 -1
  93. package/lib/components/FieldGroup/FieldGroup.d.ts.map +1 -1
  94. package/lib/components/FieldGroup/FieldGroup.js +27 -24
  95. package/lib/components/FieldGroup/FieldGroup.js.map +1 -1
  96. package/lib/components/FormControl/FormControl.d.ts +6 -2
  97. package/lib/components/FormControl/FormControl.d.ts.map +1 -1
  98. package/lib/components/FormControl/FormControl.js +60 -35
  99. package/lib/components/FormControl/FormControl.js.map +1 -1
  100. package/lib/components/FormField/FormField.d.ts.map +1 -1
  101. package/lib/components/FormField/FormField.js +65 -5
  102. package/lib/components/FormField/FormField.js.map +1 -1
  103. package/lib/components/Input/Input.d.ts.map +1 -1
  104. package/lib/components/Input/Input.js +13 -2
  105. package/lib/components/Input/Input.js.map +1 -1
  106. package/lib/components/Number/NumberInput.d.ts.map +1 -1
  107. package/lib/components/Number/NumberInput.js +13 -4
  108. package/lib/components/Number/NumberInput.js.map +1 -1
  109. package/lib/components/Number/NumberInput.styles.d.ts +6 -2
  110. package/lib/components/Number/NumberInput.styles.d.ts.map +1 -1
  111. package/lib/components/Number/NumberInput.styles.js +4 -2
  112. package/lib/components/Number/NumberInput.styles.js.map +1 -1
  113. package/lib/components/Number/NumberInput.types.d.ts +2 -0
  114. package/lib/components/Number/NumberInput.types.d.ts.map +1 -1
  115. package/lib/components/Number/NumberInput.types.js.map +1 -1
  116. package/lib/components/Phone/PhoneInput.d.ts.map +1 -1
  117. package/lib/components/Phone/PhoneInput.js +12 -3
  118. package/lib/components/Phone/PhoneInput.js.map +1 -1
  119. package/lib/components/SearchInput/SearchInput.d.ts +5 -0
  120. package/lib/components/SearchInput/SearchInput.d.ts.map +1 -1
  121. package/lib/components/SearchInput/SearchInput.js +14 -4
  122. package/lib/components/SearchInput/SearchInput.js.map +1 -1
  123. package/lib/components/SearchInput/SearchInput.styles.d.ts +3 -0
  124. package/lib/components/SearchInput/SearchInput.styles.d.ts.map +1 -1
  125. package/lib/components/SearchInput/SearchInput.styles.js +6 -0
  126. package/lib/components/SearchInput/SearchInput.styles.js.map +1 -1
  127. package/lib/components/Select/Select.d.ts +2 -0
  128. package/lib/components/Select/Select.d.ts.map +1 -1
  129. package/lib/components/Select/Select.js +4 -3
  130. package/lib/components/Select/Select.js.map +1 -1
  131. package/lib/components/TextArea/TextArea.d.ts.map +1 -1
  132. package/lib/components/TextArea/TextArea.js +4 -2
  133. package/lib/components/TextArea/TextArea.js.map +1 -1
  134. package/lib/components/Tooltip/Tooltip.d.ts +5 -0
  135. package/lib/components/Tooltip/Tooltip.d.ts.map +1 -1
  136. package/lib/components/Tooltip/Tooltip.js +22 -5
  137. package/lib/components/Tooltip/Tooltip.js.map +1 -1
  138. package/lib/hooks/useI18n.d.ts +7 -0
  139. package/lib/hooks/useI18n.d.ts.map +1 -1
  140. package/lib/i18n/default.d.ts +7 -0
  141. package/lib/i18n/default.d.ts.map +1 -1
  142. package/lib/i18n/default.js +8 -0
  143. package/lib/i18n/default.js.map +1 -1
  144. package/lib/i18n/i18n.d.ts +14 -0
  145. package/lib/i18n/i18n.d.ts.map +1 -1
  146. package/lib/theme/theme.d.ts +12 -0
  147. package/lib/theme/theme.d.ts.map +1 -1
  148. package/lib/theme/themeDefinition.json +7 -1
  149. package/lib/theme/themeOverrides.schema.json +9 -0
  150. package/package.json +1 -1
@@ -1,26 +1,22 @@
1
1
  import styled, { css } from 'styled-components';
2
- import { lighten, mix, readableColor, rgba } from 'polished';
2
+ import { lighten, readableColor, rgba } from 'polished';
3
3
  import { useContext } from 'react';
4
4
  import { StyledAvatar } from '../Avatar';
5
5
  import { StyledIcon } from '../Icon';
6
6
  import { StyledImage } from '../Image/Image';
7
- import { StyledSearchInput, StyledSearchButton, StyledSearchTextInput, StyledCancelButton } from '../SearchInput/SearchInput.styles';
8
7
  import { defaultThemeProp } from '../../theme';
9
8
  import { tryCatch } from '../../utils/utils';
10
9
  import Flex from '../Flex';
11
- import { StyledSummaryItem } from '../SummaryItem';
12
- import { readableHue, calculateFontSize, getHoverColors } from '../../styles';
13
- import { StyledPopover } from '../Popover';
14
- import { StyledEmptyState } from '../EmptyState';
15
- import { StyledMenuListContainer } from '../Menu/Menu.styles';
16
- import Text, { StyledText } from '../Text';
10
+ import { readableHue, calculateFontSize } from '../../styles';
11
+ import { StyledMenuItem } from '../Menu/Menu.styles';
17
12
  import { useDirection } from '../../hooks';
18
13
  import { StyledBareButton } from '../Button/BareButton';
19
- import { StyledAlert } from '../Badges/Alert';
14
+ import Button from '../Button';
15
+ import { StyledTooltip } from '../Tooltip';
20
16
  import AppShellContext from './AppShellContext';
21
- const navWidth = '4rem';
22
- const navOpenWidth = '18.75rem';
23
- const headerHeight = '3rem';
17
+ export const navWidth = '4rem';
18
+ export const navOpenWidth = '18.75rem';
19
+ export const headerHeight = '3rem';
24
20
  /* AppShell styles */
25
21
  export const StyledAppEnvironment = styled(Flex)(({ color, theme: { base: { spacing, 'font-weight': { bold } }, components: { 'app-shell': { nav: { 'background-color': navColor } } } } }) => {
26
22
  const foreground = tryCatch(() => readableHue(color, color), () => readableHue(navColor, navColor));
@@ -103,12 +99,10 @@ export const StyledUtilIconCount = styled.span `
103
99
  flex-shrink: 0;
104
100
  `;
105
101
  export const StyledAppNav = styled.nav(({ appHeader, showEnv, theme }) => {
106
- const { navOpen, navState } = useContext(AppShellContext);
102
+ const { navOpen } = useContext(AppShellContext);
107
103
  return css `
108
104
  position: fixed;
109
- z-index: ${navState !== 'closed'
110
- ? css `calc(${theme.base['z-index'].backdrop} - 1) `
111
- : 'auto'};
105
+ z-index: calc(${theme.base['z-index'].backdrop} - 1);
112
106
  background: ${theme.components['app-shell'].nav['background-color']};
113
107
  max-width: calc(100vw - ${theme.base['hit-area']['mouse-min']});
114
108
  width: ${navOpen ? navOpenWidth : navWidth};
@@ -123,13 +117,6 @@ export const StyledAppNav = styled.nav(({ appHeader, showEnv, theme }) => {
123
117
  padding-block-start: ${theme.base.spacing};
124
118
  `}
125
119
 
126
- @media (min-width: ${theme.base.breakpoints.xl}) {
127
- z-index: auto;
128
-
129
- /* Setting width here keeps the nav width transition in sync with main's margin transition on resize which is also in a media query. */
130
- width: ${navOpenWidth};
131
- }
132
-
133
120
  @media (pointer: coarse) {
134
121
  max-width: calc(100vw - ${theme.base['hit-area']['finger-min']});
135
122
  }
@@ -188,110 +175,6 @@ export const StyledAppNav = styled.nav(({ appHeader, showEnv, theme }) => {
188
175
  `;
189
176
  });
190
177
  StyledAppNav.defaultProps = defaultThemeProp;
191
- export const StyledSearchForm = styled.form(({ theme, collapsed, isMediumOrAbove }) => {
192
- const borderColor = tryCatch(() => lighten(0.1, theme.components['app-shell'].nav['background-color']));
193
- const maxCollapsedSize = theme.components.input.height;
194
- return css `
195
- flex-shrink: 0;
196
- padding: ${theme.base.spacing} 0;
197
-
198
- ${StyledSearchInput} {
199
- margin: 0 calc((${navWidth} - ${theme.base['hit-area']['mouse-min']}) / 2);
200
- border: none;
201
- ${collapsed &&
202
- isMediumOrAbove &&
203
- css `
204
- overflow: hidden;
205
- `}
206
- background: ${borderColor};
207
-
208
- &:focus-within {
209
- box-shadow: ${theme.base.shadow['focus-inverted']};
210
-
211
- ${StyledSearchButton} {
212
- color: rgba(255, 255, 255, 0.9);
213
- }
214
- }
215
-
216
- ${collapsed &&
217
- isMediumOrAbove &&
218
- css `
219
- ${StyledSearchButton} {
220
- border-radius: calc(
221
- ${theme.base['border-radius']} * ${theme.components['search-input']['border-radius']}
222
- );
223
- height: ${maxCollapsedSize};
224
- width: ${maxCollapsedSize};
225
- padding: 0;
226
-
227
- > :not(:first-child) {
228
- display: none;
229
- }
230
- }
231
-
232
- input {
233
- padding: 0;
234
- max-width: 0;
235
- overflow: hidden;
236
- }
237
-
238
- ${StyledCancelButton} {
239
- display: none;
240
- }
241
- `}
242
-
243
- ${StyledSearchButton} {
244
- transition: borderRadius 0.5s;
245
- border: none;
246
- }
247
-
248
- ${StyledCancelButton} {
249
- color: rgba(255, 255, 255, 0.9);
250
- }
251
-
252
- input {
253
- border-color: ${borderColor};
254
-
255
- &::placeholder {
256
- color: rgba(255, 255, 255, 0.4);
257
- }
258
-
259
- &:focus:not([disabled]) {
260
- border-color: ${borderColor};
261
- }
262
- }
263
-
264
- input,
265
- ${StyledSearchButton} {
266
- background: ${borderColor};
267
- color: rgba(255, 255, 255, 0.7);
268
- }
269
- }
270
- `;
271
- });
272
- StyledSearchForm.defaultProps = defaultThemeProp;
273
- export const StyledNavListMenuButton = styled.button(({ theme }) => {
274
- return css `
275
- & + ${StyledPopover} {
276
- &,
277
- ${StyledMenuListContainer} {
278
- background-color: ${theme.components['app-shell'].nav['background-color']};
279
- }
280
-
281
- ${StyledMenuListContainer} li {
282
- color: rgba(255, 255, 255, 0.7);
283
- background-color: transparent;
284
-
285
- &:hover,
286
- &[data-current='true'] {
287
- color: #ffffff;
288
- background-color: rgba(255, 255, 255, 0.05);
289
- }
290
- }
291
- }
292
- `;
293
- });
294
- StyledNavListMenuButton.defaultProps = defaultThemeProp;
295
178
  export const StyledCaseClose = styled.button ``;
296
179
  export const StyledNavListItem = styled.li(({ theme, nestedListCollapsed }) => {
297
180
  const { navOpen } = useContext(AppShellContext);
@@ -459,148 +342,6 @@ export const StyledUtils = styled.div(({ theme }) => {
459
342
  `;
460
343
  });
461
344
  StyledUtils.defaultProps = defaultThemeProp;
462
- /* AppHeader styles */
463
- export const StyledAppHeaderInfo = styled.div(({ centerLogo, theme }) => {
464
- return css `
465
- & > :first-child {
466
- vertical-align: top;
467
- }
468
-
469
- & > a,
470
- & > button {
471
- cursor: pointer;
472
- text-decoration: none;
473
- user-select: none;
474
- -webkit-user-select: none;
475
- }
476
-
477
- ${StyledImage} {
478
- height: 1.625rem;
479
-
480
- ${centerLogo &&
481
- css `
482
- padding-inline-start: ${theme.base.spacing};
483
- `}
484
- }
485
- `;
486
- });
487
- StyledAppHeaderInfo.defaultProps = defaultThemeProp;
488
- export const StyledAppHeaderSearchForm = styled.form(({ isMediumOrAbove, theme }) => {
489
- const headerColor = theme.components['app-shell'].header['background-color'];
490
- const contrastColor = tryCatch(() => readableColor(headerColor));
491
- return css `
492
- max-width: 33vw;
493
- min-width: 10rem;
494
- width: 100%;
495
- justify-self: center;
496
- margin-inline-start: 0;
497
- margin-inline-end: auto;
498
- transition: max-width ${theme.base.animation.speed} ${theme.base.animation.timing.ease};
499
-
500
- ${!isMediumOrAbove &&
501
- css `
502
- max-width: 50%;
503
- min-width: 2rem;
504
- margin-inline-end: 0;
505
-
506
- &:not([focused]) {
507
- ${StyledSearchInput} {
508
- ${StyledSearchButton} {
509
- background: ${headerColor};
510
- color: ${contrastColor};
511
- }
512
-
513
- ${StyledSearchTextInput} {
514
- background: ${headerColor};
515
- }
516
- }
517
- }
518
-
519
- &:focus-within {
520
- max-width: 100%;
521
- min-width: 10rem;
522
- }
523
- `}
524
- `;
525
- });
526
- StyledAppHeaderSearchForm.defaultProps = defaultThemeProp;
527
- export const StyledAppHeaderSpacer = styled.div `
528
- margin: auto;
529
- `;
530
- export const StyledAppHeaderText = styled(Text)(({ theme, variant }) => {
531
- const contrastColor = tryCatch(() => readableColor(theme.components['app-shell'].header['background-color']));
532
- const secondaryColor = tryCatch(() => rgba(contrastColor ?? theme.base.palette['foreground-color'], theme.base.transparency['transparent-2']));
533
- const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);
534
- return css `
535
- text-overflow: ellipsis;
536
- overflow: hidden;
537
- white-space: nowrap;
538
- color: ${variant === 'secondary' ? secondaryColor : contrastColor};
539
- font-size: ${fontSize.s};
540
-
541
- ${variant !== 'secondary' &&
542
- css `
543
- font-weight: ${theme.base['font-weight']['semi-bold']};
544
- `}
545
- `;
546
- });
547
- StyledAppHeaderText.defaultProps = defaultThemeProp;
548
- export const StyledAppHeaderOperator = styled.button(({ theme }) => css `
549
- border-radius: 50%;
550
-
551
- :focus {
552
- box-shadow: ${theme.base.shadow.focus};
553
- }
554
- `);
555
- StyledAppHeaderOperator.defaultProps = defaultThemeProp;
556
- export const StyledAppHeader = styled.header(({ hideTitle, theme }) => {
557
- const headerColor = theme.components['app-shell'].header['background-color'];
558
- const contrastColor = tryCatch(() => readableColor(headerColor));
559
- const hoverColors = getHoverColors(mix(0.01, theme.base.palette.interactive, headerColor));
560
- return css `
561
- position: sticky;
562
- z-index: ${theme.base['z-index'].drawer};
563
- top: 0;
564
- gap: ${theme.base.spacing};
565
- max-width: 100%;
566
- height: ${headerHeight};
567
- background-color: ${headerColor};
568
- border-bottom: solid 0.0625rem ${theme.base.palette['border-line']};
569
-
570
- > :first-child {
571
- justify-self: flex-start;
572
- min-width: 33vw;
573
-
574
- ${hideTitle &&
575
- css `
576
- min-width: fit-content;
577
- `}
578
- }
579
-
580
- > ${StyledAppHeaderOperator} {
581
- justify-self: flex-end;
582
-
583
- + ${StyledPopover} {
584
- &,
585
- ${StyledMenuListContainer} {
586
- background-color: ${headerColor};
587
- }
588
-
589
- ${StyledMenuListContainer} li {
590
- color: ${contrastColor};
591
- background-color: transparent;
592
-
593
- &:hover,
594
- &[data-current='true'] {
595
- color: ${hoverColors.foreground};
596
- background-color: ${hoverColors.background};
597
- }
598
- }
599
- }
600
- }
601
- `;
602
- });
603
- StyledAppHeader.defaultProps = defaultThemeProp;
604
345
  /* Mobile AppShell styles */
605
346
  export const StyledMobileNav = styled.header(({ theme }) => {
606
347
  const mobileNavColor = theme.base.palette['brand-primary'];
@@ -621,156 +362,11 @@ export const StyledMobileNav = styled.header(({ theme }) => {
621
362
  `;
622
363
  });
623
364
  StyledMobileNav.defaultProps = defaultThemeProp;
624
- /* AppShell Drawer styles */
625
- export const StyledDrawerWrapper = styled.div(({ theme, open }) => {
626
- return css `
627
- background: ${theme.components['app-shell'].nav['background-color']};
628
- width: 100%;
629
- height: 100%;
630
- color: rgba(255, 255, 255, 0.7);
631
- opacity: ${open ? 1 : 0};
632
- `;
633
- });
634
- StyledDrawerWrapper.defaultProps = defaultThemeProp;
635
- export const StyledDrawerHeading = styled.header(({ theme }) => {
636
- const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);
637
- return css `
638
- padding: ${theme.base.spacing} calc(2 * ${theme.base.spacing});
639
- line-height: 1;
640
-
641
- span {
642
- font-size: ${fontSize.s};
643
- font-weight: ${theme.base['font-weight']['semi-bold']};
644
- margin: 0 auto;
645
- position: relative;
646
- left: -0.7rem;
647
- }
648
-
649
- svg {
650
- font-size: ${fontSize.xxl};
651
- cursor: pointer;
652
- color: rgba(255, 255, 255, 0.7);
653
- }
654
- `;
655
- });
656
- StyledDrawerHeading.defaultProps = defaultThemeProp;
657
- export const StyledDrawerBackButton = styled.button(({ theme }) => {
658
- return css `
659
- height: ${theme.base['hit-area']['mouse-min']};
660
- width: ${theme.base['hit-area']['mouse-min']};
661
- border-radius: calc(
662
- ${`${theme.base['border-radius']} * ${theme.components.button['border-radius']}`}
663
- );
664
-
665
- &:hover,
666
- &:focus {
667
- color: ${theme.base.colors.white};
668
- background-color: rgba(255, 255, 255, 0.05);
669
- }
670
-
671
- &:focus {
672
- outline: none;
673
- box-shadow: inset ${theme.base.shadow['focus-inverted']};
674
- }
675
- `;
676
- });
677
- StyledDrawerBackButton.defaultProps = defaultThemeProp;
678
- export const StyledDrawerList = styled.ul(() => {
679
- return css ``;
680
- });
681
- StyledDrawerList.defaultProps = defaultThemeProp;
682
- export const StyledDrawerMetaList = styled.ul `
683
- li {
684
- color: inherit;
685
- }
686
- `;
687
- export const StyledDrawerPinButton = styled.button(({ theme }) => {
688
- const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);
689
- const { ltr } = useDirection();
690
- return css `
691
- color: inherit;
692
- padding: calc(2 * ${theme.base.spacing});
693
- cursor: pointer;
694
- font-size: ${fontSize.xxl};
695
-
696
- ${StyledIcon} {
697
- display: block;
698
- ${ltr &&
699
- css `
700
- transform: scaleX(-1);
701
- `}
702
- }
703
-
704
- &:hover,
705
- &:focus {
706
- color: ${theme.base.colors.white};
707
- background-color: rgba(255, 255, 255, 0.05);
708
- }
709
-
710
- &:focus {
711
- outline: none;
712
- box-shadow: inset ${theme.base.shadow['focus-inverted']};
713
- }
714
- `;
715
- });
716
- StyledDrawerPinButton.defaultProps = defaultThemeProp;
717
- export const EmptyDrawerVisual = styled.div(({ theme }) => {
718
- return css `
719
- width: calc(4 * ${theme.base.spacing});
720
- height: calc(4 * ${theme.base.spacing});
721
- `;
722
- });
723
- EmptyDrawerVisual.defaultProps = defaultThemeProp;
724
- export const StyledDrawerListHeading = styled.h3(({ theme }) => {
725
- return css `
726
- position: sticky;
727
- top: 0;
728
- padding: ${theme.base.spacing} calc(2 * ${theme.base.spacing});
729
- background-color: hsl(207 14% 13% / 1);
730
- z-index: 1;
731
- `;
732
- });
733
- StyledDrawerListHeading.defaultProps = defaultThemeProp;
734
- export const StyledDrawerViewAll = styled.a(({ theme }) => {
735
- return css `
736
- position: sticky;
737
- bottom: 0;
738
- padding: ${theme.base.spacing} 0;
739
- color: inherit;
740
- background-color: ${theme.components['app-shell'].nav['background-color']};
741
- text-align: center;
742
- margin-top: 0.0625rem;
743
-
744
- &:hover,
745
- &:focus {
746
- color: ${theme.base.colors.white};
747
- box-shadow: unset;
748
- }
749
- `;
750
- });
751
- StyledDrawerViewAll.defaultProps = defaultThemeProp;
752
- export const StyledDrawerListSection = styled.div(({ theme }) => {
753
- const borderColor = tryCatch(() => lighten(0.1, theme.components['app-shell'].nav['background-color']));
754
- return css `
755
- border-top: 0.0625rem solid ${borderColor};
756
- min-height: max(20%, 8rem);
757
- overflow-y: auto;
758
- `;
759
- });
760
- StyledDrawerListSection.defaultProps = defaultThemeProp;
761
- export const StyledDrawerListContainer = styled.div(({ theme }) => {
762
- const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);
763
- return css `
764
- height: calc(100% - 4 * ${theme.base.spacing} - ${fontSize.xxl});
765
- overflow: auto;
766
- `;
767
- });
768
- StyledDrawerListContainer.defaultProps = defaultThemeProp;
769
365
  export const StyledLoading = styled.div `
770
366
  font-size: 2rem;
771
367
  `;
772
368
  /* Main content region styles */
773
- export const StyledAppMain = styled.main(({ appHeader, mobileNav, headerOffset = 0, theme }) => {
369
+ export const StyledAppMain = styled.main(({ appHeader, mobileNav, navOpen, headerOffset = 0, theme }) => {
774
370
  const heightOffset = appHeader || mobileNav ? headerHeight : '0rem';
775
371
  return css `
776
372
  --appshell-offset: ${headerOffset}px;
@@ -783,9 +379,10 @@ export const StyledAppMain = styled.main(({ appHeader, mobileNav, headerOffset =
783
379
  outline: none;
784
380
  }
785
381
 
786
- @media (min-width: ${theme.base.breakpoints.xl}) {
382
+ ${navOpen &&
383
+ css `
787
384
  margin-inline-start: ${navOpenWidth};
788
- }
385
+ `}
789
386
 
790
387
  ${!mobileNav &&
791
388
  css `
@@ -801,136 +398,48 @@ export const StyledBannerRegion = styled.div(({ theme }) => {
801
398
  `;
802
399
  });
803
400
  StyledBannerRegion.defaultProps = defaultThemeProp;
804
- /* AppShellList styles */
805
- export const StyledAppShellListWrapper = styled.div(({ theme }) => {
806
- return css `
807
- max-height: 100%;
808
- white-space: nowrap;
809
-
810
- ${StyledSummaryItem} {
811
- position: relative;
812
- &::after {
813
- content: '';
814
- position: absolute;
815
- top: calc(100% - 0.03125rem);
816
- inset-inline-end: 1rem;
817
- inset-inline-start: 1rem;
818
- height: 0.0625rem;
819
- background-color: ${theme.base.colors.gray['extra-dark']};
820
- }
821
- }
822
- `;
823
- });
824
- StyledAppShellListWrapper.defaultProps = defaultThemeProp;
825
- export const StyledAppShellList = styled.ul ``;
826
- StyledAppShellList.defaultProps = defaultThemeProp;
827
- export const StyledAppShellSummaryItem = styled.div(({ theme }) => {
401
+ export const StyledAppshellTooltip = styled(StyledTooltip)(({ theme }) => {
828
402
  return css `
829
- padding: ${theme.base.spacing} calc(2 * ${theme.base.spacing});
830
- color: inherit;
831
- background-color: transparent;
832
- border: none;
833
- text-decoration: none;
834
- cursor: pointer;
835
- text-align: start;
836
- white-space: normal;
837
-
838
- &:hover,
839
- &:focus {
840
- color: ${theme.base.colors.white};
841
- background-color: rgba(255, 255, 255, 0.05);
403
+ background-color: ${theme.components.tooltip['background-color']};
404
+ padding: 0;
405
+ header {
406
+ border-bottom: none;
842
407
  }
408
+ ${StyledMenuItem} {
409
+ background-color: ${theme.components.tooltip['background-color']};
410
+ color: ${theme.base.palette.light};
843
411
 
844
- &:focus {
845
- outline: none;
846
- box-shadow: inset ${theme.base.shadow['focus-inverted']};
412
+ &:hover,
413
+ &:focus {
414
+ background-color: ${theme.components.tooltip['background-color']};
415
+ box-shadow: ${theme.base.shadow['focus-inverted']};
416
+ }
847
417
  }
848
418
  `;
849
419
  });
850
- StyledAppShellSummaryItem.defaultProps = defaultThemeProp;
851
- export const StyledAppShellMetaList = styled.ul `
852
- li {
853
- color: inherit;
854
- }
855
- `;
856
- export const StyledAppShellPinButton = styled.button(({ theme }) => {
420
+ StyledAppshellTooltip.defaultProps = defaultThemeProp;
421
+ export const StyledAppshellToggleButton = styled(Button)(({ theme, open }) => {
857
422
  return css `
858
- color: inherit;
423
+ background-color: ${theme.base.palette.dark};
424
+ color: ${theme.base.palette.light};
859
425
  border: none;
860
- background-color: transparent;
426
+ margin-top: calc(1 * ${theme.base.spacing});
427
+ ${open &&
428
+ css `
429
+ padding-inline: 1rem;
430
+ `}
861
431
 
862
- &:hover,
863
- &:focus {
864
- color: ${theme.base.colors.white};
865
- background-color: rgba(255, 255, 255, 0.05);
432
+ ${StyledIcon} {
433
+ width: 1.25rem;
434
+ height: 1.25rem;
435
+ font-weight: bold;
866
436
  }
867
437
 
868
- &:focus {
869
- outline: none;
870
- box-shadow: inset ${theme.base.shadow['focus-inverted']};
871
- }
872
- `;
873
- });
874
- StyledAppShellPinButton.defaultProps = defaultThemeProp;
875
- export const StyledNotificationVisual = styled.span(({ theme, unread, visualIncluded }) => {
876
- return css `
877
- position: relative;
878
- ${StyledAlert} {
879
- display: ${unread ? 'auto' : 'none'};
880
- position: absolute;
881
- inset-inline-start: -0.65625rem;
882
- top: ${visualIncluded ? 'calc(50% - 0.15625rem)' : '0.5rem'};
883
- background-color: ${theme.base.palette.light};
884
- height: 0.3125rem;
885
- width: 0.3125rem;
886
- } ;
887
- `;
888
- });
889
- StyledNotificationVisual.defaultProps = defaultThemeProp;
890
- export const StyledNotificationPrimary = styled.span(({ theme, unread }) => {
891
- return css `
892
- font-weight: ${unread
893
- ? theme.base['font-weight'].bold
894
- : theme.base['font-weight']['semi-bold']};
895
- color: ${unread ? theme.base.palette.light : 'inherit'};
896
- `;
897
- });
898
- StyledNotificationPrimary.defaultProps = defaultThemeProp;
899
- export const StyledNotificationSecondary = styled.span(({ theme, unread }) => {
900
- return css `
901
- ${StyledText} {
902
- opacity: ${unread
903
- ? theme.base.transparency['transparent-1']
904
- : theme.base.transparency['transparent-3']};
905
- }
906
- `;
907
- });
908
- StyledNotificationSecondary.defaultProps = defaultThemeProp;
909
- export const EmptyStateColorContrast = styled.div `
910
- ${StyledEmptyState} {
911
- span,
912
- svg {
913
- color: rgba(255, 255, 255, 0.7);
438
+ &:enabled:focus,
439
+ :not([disabled]):focus {
440
+ box-shadow: ${theme.base.shadow['focus-inverted']};
914
441
  }
915
- }
916
- `;
917
- export const StyledAppShellListSection = styled.div(({ theme }) => {
918
- const borderColor = tryCatch(() => lighten(0.1, theme.components['app-shell'].nav['background-color']));
919
- return css `
920
- border-top: 0.0625rem solid ${borderColor};
921
- min-height: max(20%, 8rem);
922
- overflow-y: auto;
923
- `;
924
- });
925
- StyledAppShellListSection.defaultProps = defaultThemeProp;
926
- export const StyledAppShellListHeading = styled.h3(({ theme }) => {
927
- return css `
928
- position: sticky;
929
- top: 0;
930
- padding: ${theme.base.spacing} calc(2 * ${theme.base.spacing});
931
- background-color: hsl(207 14% 13% / 1);
932
- z-index: 1;
933
442
  `;
934
443
  });
935
- StyledAppShellListHeading.defaultProps = defaultThemeProp;
444
+ StyledAppshellToggleButton.defaultProps = defaultThemeProp;
936
445
  //# sourceMappingURL=AppShell.styles.js.map