@pega/cosmos-react-core 10.0.0-build.5.2 → 10.0.0-build.5.21

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 (131) hide show
  1. package/lib/components/AIRewrite/AIRewrite.styles.d.ts +19 -3
  2. package/lib/components/AIRewrite/AIRewrite.styles.d.ts.map +1 -1
  3. package/lib/components/AppShell/AppHeader.styles.d.ts.map +1 -1
  4. package/lib/components/AppShell/AppHeader.styles.js +8 -3
  5. package/lib/components/AppShell/AppHeader.styles.js.map +1 -1
  6. package/lib/components/AppShell/AppShell.d.ts.map +1 -1
  7. package/lib/components/AppShell/AppShell.js +16 -6
  8. package/lib/components/AppShell/AppShell.js.map +1 -1
  9. package/lib/components/AppShell/AppShell.styles.d.ts +3 -0
  10. package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
  11. package/lib/components/AppShell/AppShell.styles.js +33 -17
  12. package/lib/components/AppShell/AppShell.styles.js.map +1 -1
  13. package/lib/components/AppShell/AppShell.types.d.ts +33 -0
  14. package/lib/components/AppShell/AppShell.types.d.ts.map +1 -1
  15. package/lib/components/AppShell/AppShell.types.js.map +1 -1
  16. package/lib/components/AppShell/DocumentTabs.d.ts +6 -0
  17. package/lib/components/AppShell/DocumentTabs.d.ts.map +1 -0
  18. package/lib/components/AppShell/DocumentTabs.js +409 -0
  19. package/lib/components/AppShell/DocumentTabs.js.map +1 -0
  20. package/lib/components/AppShell/DocumentTabs.styles.d.ts +231 -0
  21. package/lib/components/AppShell/DocumentTabs.styles.d.ts.map +1 -0
  22. package/lib/components/AppShell/DocumentTabs.styles.js +562 -0
  23. package/lib/components/AppShell/DocumentTabs.styles.js.map +1 -0
  24. package/lib/components/AppShell/NavigationListItemWrapper.d.ts.map +1 -1
  25. package/lib/components/AppShell/NavigationListItemWrapper.js +6 -5
  26. package/lib/components/AppShell/NavigationListItemWrapper.js.map +1 -1
  27. package/lib/components/AppShell/Operator.d.ts.map +1 -1
  28. package/lib/components/AppShell/Operator.js +8 -5
  29. package/lib/components/AppShell/Operator.js.map +1 -1
  30. package/lib/components/AppShell/ThemeSwitcher.d.ts.map +1 -1
  31. package/lib/components/AppShell/ThemeSwitcher.js +1 -0
  32. package/lib/components/AppShell/ThemeSwitcher.js.map +1 -1
  33. package/lib/components/AppShell/index.d.ts +1 -1
  34. package/lib/components/AppShell/index.d.ts.map +1 -1
  35. package/lib/components/AppShell/index.js.map +1 -1
  36. package/lib/components/Backdrop/Backdrop.js +2 -2
  37. package/lib/components/Backdrop/Backdrop.js.map +1 -1
  38. package/lib/components/DateTime/Input/DateInput.d.ts.map +1 -1
  39. package/lib/components/DateTime/Input/DateInput.js +15 -9
  40. package/lib/components/DateTime/Input/DateInput.js.map +1 -1
  41. package/lib/components/DateTime/Input/DateTime.styles.d.ts +3 -0
  42. package/lib/components/DateTime/Input/DateTime.styles.d.ts.map +1 -1
  43. package/lib/components/DateTime/Input/DateTime.styles.js +25 -0
  44. package/lib/components/DateTime/Input/DateTime.styles.js.map +1 -1
  45. package/lib/components/DateTime/Input/DateTimeInput.d.ts.map +1 -1
  46. package/lib/components/DateTime/Input/DateTimeInput.js +27 -18
  47. package/lib/components/DateTime/Input/DateTimeInput.js.map +1 -1
  48. package/lib/components/DateTime/Input/TimeInput.d.ts +6 -3
  49. package/lib/components/DateTime/Input/TimeInput.d.ts.map +1 -1
  50. package/lib/components/DateTime/Input/TimeInput.js +54 -24
  51. package/lib/components/DateTime/Input/TimeInput.js.map +1 -1
  52. package/lib/components/DateTime/Input/WeekInput.d.ts +6 -3
  53. package/lib/components/DateTime/Input/WeekInput.d.ts.map +1 -1
  54. package/lib/components/DateTime/Input/WeekInput.js +29 -16
  55. package/lib/components/DateTime/Input/WeekInput.js.map +1 -1
  56. package/lib/components/DateTime/Picker/Calendar.styles.d.ts.map +1 -1
  57. package/lib/components/DateTime/Picker/Calendar.styles.js +5 -0
  58. package/lib/components/DateTime/Picker/Calendar.styles.js.map +1 -1
  59. package/lib/components/DateTime/Picker/DatePicker.styles.d.ts.map +1 -1
  60. package/lib/components/DateTime/Picker/DatePicker.styles.js +32 -7
  61. package/lib/components/DateTime/Picker/DatePicker.styles.js.map +1 -1
  62. package/lib/components/DateTime/Picker/TimePicker.d.ts.map +1 -1
  63. package/lib/components/DateTime/Picker/TimePicker.js +10 -2
  64. package/lib/components/DateTime/Picker/TimePicker.js.map +1 -1
  65. package/lib/components/Dialog/Dialog.types.d.ts +23 -13
  66. package/lib/components/Dialog/Dialog.types.d.ts.map +1 -1
  67. package/lib/components/Dialog/Dialog.types.js.map +1 -1
  68. package/lib/components/Dialog/FormDialog.d.ts.map +1 -1
  69. package/lib/components/Dialog/FormDialog.js +50 -18
  70. package/lib/components/Dialog/FormDialog.js.map +1 -1
  71. package/lib/components/Dialog/InfoDialog.d.ts.map +1 -1
  72. package/lib/components/Dialog/InfoDialog.js +6 -4
  73. package/lib/components/Dialog/InfoDialog.js.map +1 -1
  74. package/lib/components/Dialog/TouchDialog.js +1 -1
  75. package/lib/components/Dialog/TouchDialog.js.map +1 -1
  76. package/lib/components/Dialog/TouchDialog.styles.d.ts.map +1 -1
  77. package/lib/components/Dialog/TouchDialog.styles.js +2 -1
  78. package/lib/components/Dialog/TouchDialog.styles.js.map +1 -1
  79. package/lib/components/InlineEdit/InlineEdit.d.ts +6 -0
  80. package/lib/components/InlineEdit/InlineEdit.d.ts.map +1 -1
  81. package/lib/components/InlineEdit/InlineEdit.js +45 -4
  82. package/lib/components/InlineEdit/InlineEdit.js.map +1 -1
  83. package/lib/components/InlineEdit/InlineEdit.styles.d.ts +19 -3
  84. package/lib/components/InlineEdit/InlineEdit.styles.d.ts.map +1 -1
  85. package/lib/components/InlineEdit/InlineEdit.styles.js +38 -20
  86. package/lib/components/InlineEdit/InlineEdit.styles.js.map +1 -1
  87. package/lib/components/Link/Link.d.ts +7 -2
  88. package/lib/components/Link/Link.d.ts.map +1 -1
  89. package/lib/components/Link/Link.js +45 -20
  90. package/lib/components/Link/Link.js.map +1 -1
  91. package/lib/components/Link/Link.test-ids.d.ts +1 -1
  92. package/lib/components/Link/Link.test-ids.d.ts.map +1 -1
  93. package/lib/components/Link/Link.test-ids.js +2 -1
  94. package/lib/components/Link/Link.test-ids.js.map +1 -1
  95. package/lib/components/ListToolbar/ListToolbar.styles.d.ts +19 -3
  96. package/lib/components/ListToolbar/ListToolbar.styles.d.ts.map +1 -1
  97. package/lib/components/Menu/FlyoutMenuList.d.ts.map +1 -1
  98. package/lib/components/Menu/FlyoutMenuList.js +1 -1
  99. package/lib/components/Menu/FlyoutMenuList.js.map +1 -1
  100. package/lib/components/Menu/Menu.js +2 -1
  101. package/lib/components/Menu/Menu.js.map +1 -1
  102. package/lib/components/MenuButton/MenuButton.d.ts.map +1 -1
  103. package/lib/components/MenuButton/MenuButton.js +5 -1
  104. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  105. package/lib/components/Popover/getResolvedTarget.d.ts +11 -0
  106. package/lib/components/Popover/getResolvedTarget.d.ts.map +1 -0
  107. package/lib/components/Popover/getResolvedTarget.js +13 -0
  108. package/lib/components/Popover/getResolvedTarget.js.map +1 -0
  109. package/lib/components/Popover/index.d.ts +1 -0
  110. package/lib/components/Popover/index.d.ts.map +1 -1
  111. package/lib/components/Popover/index.js +1 -0
  112. package/lib/components/Popover/index.js.map +1 -1
  113. package/lib/components/QRCode/QRCode.d.ts.map +1 -1
  114. package/lib/components/QRCode/QRCode.js +2 -0
  115. package/lib/components/QRCode/QRCode.js.map +1 -1
  116. package/lib/components/Tooltip/Tooltip.d.ts.map +1 -1
  117. package/lib/components/Tooltip/Tooltip.js +8 -2
  118. package/lib/components/Tooltip/Tooltip.js.map +1 -1
  119. package/lib/hooks/useI18n.d.ts +18 -0
  120. package/lib/hooks/useI18n.d.ts.map +1 -1
  121. package/lib/i18n/default.d.ts +18 -0
  122. package/lib/i18n/default.d.ts.map +1 -1
  123. package/lib/i18n/default.js +23 -3
  124. package/lib/i18n/default.js.map +1 -1
  125. package/lib/i18n/i18n.d.ts +18 -0
  126. package/lib/i18n/i18n.d.ts.map +1 -1
  127. package/lib/theme/theme.d.ts +25 -0
  128. package/lib/theme/theme.d.ts.map +1 -1
  129. package/lib/theme/themeDefinition.json +18 -3
  130. package/lib/theme/themeOverrides.schema.json +16 -0
  131. package/package.json +1 -1
@@ -2,21 +2,37 @@ export declare const StyledAIRewriteDialog: import("styled-components/dist/types
2
2
  onDismiss?: () => void;
3
3
  onCancel: import("../Dialog/Dialog.types").FormAction;
4
4
  onSubmit: import("../Dialog/Dialog.types").FormAction;
5
+ } & {
6
+ compact: true;
7
+ } & {
8
+ 'aria-label': string;
9
+ heading?: never;
10
+ additionalInfo?: never;
11
+ } & Omit<import("../..").Attributes<"div">, "compact" | "aria-label" | "onSubmit" | "onCancel" | "heading" | "onDismiss" | keyof import("../Dialog/Dialog.types").BaseDialogProps | "additionalInfo">, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
12
+ ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
13
+ }) | (Omit<Omit<import("../Dialog/Dialog.types").BaseDialogProps & {
14
+ onDismiss?: () => void;
15
+ onCancel: import("../Dialog/Dialog.types").FormAction;
16
+ onSubmit: import("../Dialog/Dialog.types").FormAction;
17
+ } & {
18
+ compact?: false | undefined;
5
19
  } & {
6
20
  heading: string;
7
21
  additionalInfo?: import("../AdditionalInfo").AdditionalInfoProps;
8
22
  'aria-label'?: never;
9
- } & Omit<import("../..").Attributes<"div">, "aria-label" | "onSubmit" | "onCancel" | "heading" | "onDismiss" | keyof import("../Dialog/Dialog.types").BaseDialogProps | "additionalInfo">, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
23
+ } & Omit<import("../..").Attributes<"div">, "compact" | "aria-label" | "onSubmit" | "onCancel" | "heading" | "onDismiss" | keyof import("../Dialog/Dialog.types").BaseDialogProps | "additionalInfo">, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
10
24
  ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
11
25
  }) | (Omit<Omit<import("../Dialog/Dialog.types").BaseDialogProps & {
12
26
  onDismiss?: () => void;
13
27
  onCancel: import("../Dialog/Dialog.types").FormAction;
14
28
  onSubmit: import("../Dialog/Dialog.types").FormAction;
15
29
  } & {
16
- heading?: never;
30
+ compact?: false | undefined;
31
+ } & {
17
32
  'aria-label': string;
33
+ heading?: never;
18
34
  additionalInfo?: never;
19
- } & Omit<import("../..").Attributes<"div">, "aria-label" | "onSubmit" | "onCancel" | "heading" | "onDismiss" | keyof import("../Dialog/Dialog.types").BaseDialogProps | "additionalInfo">, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
35
+ } & Omit<import("../..").Attributes<"div">, "compact" | "aria-label" | "onSubmit" | "onCancel" | "heading" | "onDismiss" | keyof import("../Dialog/Dialog.types").BaseDialogProps | "additionalInfo">, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
20
36
  ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
21
37
  }), import("styled-components/dist/types").BaseObject>> & string & Omit<import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<import("../Dialog").FormDialogProps> & import("react").RefAttributes<HTMLDivElement>>, keyof import("react").Component<any, {}, any>>;
22
38
  export declare const StyledFormSection: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
@@ -1 +1 @@
1
- {"version":3,"file":"AIRewrite.styles.d.ts","sourceRoot":"","sources":["../../../src/components/AIRewrite/AIRewrite.styles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;uRAIhC,CAAC;AAIH,eAAO,MAAM,iBAAiB,6NAM5B,CAAC;AAIH,eAAO,MAAM,yBAAyB,6NAIrC,CAAC"}
1
+ {"version":3,"file":"AIRewrite.styles.d.ts","sourceRoot":"","sources":["../../../src/components/AIRewrite/AIRewrite.styles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uRAIhC,CAAC;AAIH,eAAO,MAAM,iBAAiB,6NAM5B,CAAC;AAIH,eAAO,MAAM,yBAAyB,6NAIrC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AppHeader.styles.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppHeader.styles.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAIzC,eAAO,MAAM,qBAAqB,6NAIhC,CAAC;AAIH,eAAO,MAAM,mBAAmB;gBAA4B,OAAO;YA2BjE,CAAC;AAIH,eAAO,MAAM,yBAAyB;oBACpB,MAAM,GAAG,MAAM,GAAG,WAAW;YAkF7C,CAAC;AAIH,eAAO,MAAM,qBAAqB,6NAEjC,CAAC;AAEF,eAAO,MAAM,mBAAmB,6NAI9B,CAAC;AAIH,eAAO,MAAM,mBAAmB;cAA0B,OAAO;YAQhE,CAAC;AAGF,eAAO,MAAM,mBAAmB;;;aACrB,SAAS,CAAC,SAAS,CAAC;cACnB,OAAO;8HAwCjB,CAAC;AAIH,eAAO,MAAM,uBAAuB,yOAQnC,CAAC;AAIF,eAAO,MAAM,eAAe;aAA4B,OAAO;gBAAc,OAAO;YAmEnF,CAAC"}
1
+ {"version":3,"file":"AppHeader.styles.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppHeader.styles.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAIzC,eAAO,MAAM,qBAAqB,6NAIhC,CAAC;AAIH,eAAO,MAAM,mBAAmB;gBAA4B,OAAO;YA2BjE,CAAC;AAIH,eAAO,MAAM,yBAAyB;oBACpB,MAAM,GAAG,MAAM,GAAG,WAAW;YAkF7C,CAAC;AAIH,eAAO,MAAM,qBAAqB,6NAEjC,CAAC;AAEF,eAAO,MAAM,mBAAmB,6NAI9B,CAAC;AAIH,eAAO,MAAM,mBAAmB;cAA0B,OAAO;YAQhE,CAAC;AAGF,eAAO,MAAM,mBAAmB;;;aACrB,SAAS,CAAC,SAAS,CAAC;cACnB,OAAO;8HA+CjB,CAAC;AAIH,eAAO,MAAM,uBAAuB,yOAQnC,CAAC;AAIF,eAAO,MAAM,eAAe;aAA4B,OAAO;gBAAc,OAAO;YAmEnF,CAAC"}
@@ -136,7 +136,9 @@ export const StyledAppHeaderText = styled(Text)(({ theme, variant, stacked }) =>
136
136
  const foregroundColor = theme.components['app-shell'].header['app-name-color'] === 'auto'
137
137
  ? calculateForegroundColor(headerBg, headerFgColor, theme)
138
138
  : theme.components['app-shell'].header['app-name-color'];
139
- const secondaryColor = tryCatch(() => rgba(foregroundColor ?? theme.base.palette['foreground-color'], theme.base.transparency['transparent-2']));
139
+ const secondaryColor = theme.components['app-shell'].header['portal-name-color'] === 'auto'
140
+ ? tryCatch(() => rgba(foregroundColor ?? theme.base.palette['foreground-color'], theme.base.transparency['transparent-2']))
141
+ : theme.components['app-shell'].header['portal-name-color'];
140
142
  const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);
141
143
  return css `
142
144
  display: inline-block;
@@ -156,8 +158,11 @@ export const StyledAppHeaderText = styled(Text)(({ theme, variant, stacked }) =>
156
158
 
157
159
  ${variant === 'secondary' &&
158
160
  css `
159
- font-size: ${fontSize};
160
- align-self: ${stacked ? 'flex-start' : 'flex-end'};
161
+ font-size: ${fontSize[theme.components.text.secondary['font-size']]};
162
+ ${stacked &&
163
+ css `
164
+ align-self: flex-start;
165
+ `}
161
166
  `}
162
167
  `;
163
168
  });
@@ -1 +1 @@
1
- {"version":3,"file":"AppHeader.styles.js","sourceRoot":"","sources":["../../../src/components/AppShell/AppHeader.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,wBAAwB,EAEzB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,IAAI,MAAM,SAAS,CAAC;AAG3B,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE3D,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC5D,OAAO,GAAG,CAAA;kBACM,QAAQ,UAAU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AAC,IAAI,CAAC,cAAc,CAAC,CAC3B,CAAC;IAEF,OAAO,GAAG,CAAA;;sBAEQ,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,QAAQ;QAC5C,UAAU;QACZ,GAAG,CAAA;wBACe,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,QAAQ;OAC/C;;aAEM,KAAK,CAAC,IAAI,CAAC,OAAO;;gBAEf,YAAY;oBACR,QAAQ;eACb,eAAe;uCACS,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC;;QAEnF,mBAAmB;;;;UAIjB,OAAO;QACT,GAAG,CAAA;;SAEF;;;QAGD,yBAAyB;iBAChB,eAAe;;;UAGtB,uBAAuB;;;YAGrB,aAAa;;YAEb,uBAAuB;0BACT,QAAQ;;;YAGtB,uBAAuB;qBACd,eAAe;;;;;uBAKb,WAAW,CAAC,UAAU;kCACX,WAAW,CAAC,UAAU;;;;;KAKnD,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import { mix, rgba, transparentize } from 'polished';\nimport styled, { css } from 'styled-components';\n\nimport {\n calculateFontSize,\n getHoverColors,\n calculateForegroundColor,\n type FontSize\n} from '../../styles';\nimport { defaultThemeProp } from '../../theme';\nimport { tryCatch } from '../../utils';\nimport { StyledImage } from '../Image';\nimport { StyledMenuListContainer } from '../Menu/Menu.styles';\nimport { StyledPopover } from '../Popover';\nimport { StyledSearchInput } from '../SearchInput';\nimport {\n StyledSearchButton,\n StyledSearchFiltersButton,\n StyledSearchTextInput\n} from '../SearchInput/SearchInput.styles';\nimport Text from '../Text';\nimport type { TextProps } from '../Text';\n\nimport { headerHeight, navWidth } from './AppShell.styles';\n\nexport const StyledContextSwitcher = styled.div(({ theme }) => {\n return css`\n width: calc(${navWidth} - 2 * ${theme.base.spacing});\n `;\n});\n\nStyledContextSwitcher.defaultProps = defaultThemeProp;\n\nexport const StyledAppHeaderInfo = styled.div<{ centerLogo: boolean }>(({ centerLogo, theme }) => {\n return css`\n & > :first-child {\n vertical-align: top;\n }\n\n & > :is(a, button) {\n cursor: pointer;\n text-decoration: none;\n user-select: none;\n -webkit-user-select: none;\n }\n\n & > :is(a, button):focus-visible {\n box-shadow: ${theme.base.shadow.focus};\n outline: none;\n }\n\n ${StyledImage} {\n height: 1.0725rem;\n\n ${centerLogo &&\n css`\n padding-inline-start: ${theme.base.spacing};\n `}\n }\n `;\n});\n\nStyledAppHeaderInfo.defaultProps = defaultThemeProp;\n\nexport const StyledAppHeaderSearchForm = styled.form<{\n searchDisplay?: 'icon' | 'grow' | 'fullWidth';\n}>(({ searchDisplay, theme }) => {\n const {\n base: { animation },\n components: {\n 'app-shell': { header },\n input\n }\n } = theme;\n\n const {\n background: headerBg,\n 'search-input': {\n 'background-color': searchInputBg,\n 'foreground-color': searchInputFg,\n 'border-color': searchInputBorder\n }\n } = header;\n\n const searchBg = searchInputBg;\n const searchFg = calculateForegroundColor(headerBg, searchInputFg, theme);\n const searchBorder = calculateForegroundColor(headerBg, searchInputBorder, theme);\n\n return css`\n max-width: 33vw;\n min-width: 10rem;\n width: 100%;\n justify-self: center;\n margin-inline-start: 0;\n margin-inline-end: auto;\n transition: max-width ${animation.speed} ${animation.timing.ease};\n\n ${StyledSearchInput} input::placeholder {\n color: ${transparentize(0.4, searchFg)};\n }\n\n ${searchDisplay === 'icon' &&\n css`\n max-width: ${input.height};\n min-width: ${input.height};\n width: auto;\n margin-inline-start: auto;\n margin-inline-end: 0;\n `}\n\n ${searchDisplay === 'grow' &&\n css`\n flex-grow: 1;\n max-width: 100%;\n margin-inline-end: 0;\n `}\n\n ${searchDisplay === 'fullWidth' &&\n css`\n max-width: 100%;\n margin-inline-end: 0;\n `}\n\n &:not([focused]) {\n ${StyledSearchInput} {\n background: ${searchBg};\n border-color: ${searchBorder};\n ${StyledSearchButton} {\n background: ${searchBg};\n color: ${searchFg};\n border-color: ${searchBorder};\n }\n\n ${StyledSearchTextInput} {\n background: ${searchBg};\n color: ${searchFg};\n border-color: ${searchBorder};\n }\n\n ${StyledSearchFiltersButton} {\n background: ${searchBg};\n color: ${searchFg};\n border-color: ${searchBorder};\n }\n }\n }\n `;\n});\n\nStyledAppHeaderSearchForm.defaultProps = defaultThemeProp;\n\nexport const StyledAppHeaderSpacer = styled.div`\n margin: auto;\n`;\n\nexport const StyledAppHeaderLogo = styled.div(({ theme }) => {\n return css`\n max-width: min(${theme.base['content-width'].sm}, 25vw);\n `;\n});\nStyledAppHeaderLogo.defaultProps = defaultThemeProp;\n\n// Shrinks the app/portal name for ellipsis truncation; stacks vertically below `md` where there's no room for both names side by side.\nexport const StyledAppHeaderName = styled.div<{ stacked?: boolean }>(\n ({ theme, stacked }) => css`\n display: flex;\n flex-direction: ${stacked ? 'column' : 'row'};\n align-items: ${stacked ? 'stretch' : 'baseline'};\n gap: ${stacked ? 0 : theme.base.spacing};\n min-width: 0;\n `\n);\nStyledAppHeaderName.defaultProps = defaultThemeProp;\n\nexport const StyledAppHeaderText = styled(Text)<{\n variant: TextProps['variant'];\n stacked?: boolean;\n}>(({ theme, variant, stacked }) => {\n const headerBg = theme.components['app-shell'].header.background;\n const headerFgColor = theme.components['app-shell'].header['foreground-color'];\n\n const foregroundColor =\n theme.components['app-shell'].header['app-name-color'] === 'auto'\n ? calculateForegroundColor(headerBg, headerFgColor, theme)\n : theme.components['app-shell'].header['app-name-color'];\n\n const secondaryColor = tryCatch(() =>\n rgba(\n foregroundColor ?? theme.base.palette['foreground-color'],\n theme.base.transparency['transparent-2']\n )\n );\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n display: inline-block;\n max-width: 100%;\n min-width: 0;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n color: ${variant === 'secondary' ? secondaryColor : foregroundColor};\n font-family: ${theme.components.text['brand-primary']['font-family']};\n\n ${variant === 'primary' &&\n css`\n font-size: ${fontSize[theme.components.text['brand-primary']['font-size'] as FontSize]};\n font-weight: ${theme.components.text['brand-primary']['font-weight']};\n `}\n\n ${variant === 'secondary' &&\n css`\n font-size: ${fontSize};\n align-self: ${stacked ? 'flex-start' : 'flex-end'};\n `}\n `;\n});\n\nStyledAppHeaderText.defaultProps = defaultThemeProp;\n\nexport const StyledAppHeaderOperator = styled.button(\n ({ theme }) => css`\n border-radius: 50%;\n\n :focus-visible {\n box-shadow: ${theme.base.shadow.focus};\n }\n `\n);\n\nStyledAppHeaderOperator.defaultProps = defaultThemeProp;\n\nexport const StyledAppHeader = styled.header<{ stacked: boolean; drawerOpen: boolean }>(\n ({ stacked, drawerOpen, theme }) => {\n const headerBg = theme.components['app-shell'].header.background;\n const headerFgColor = theme.components['app-shell'].header['foreground-color'];\n\n const foregroundColor = calculateForegroundColor(headerBg, headerFgColor, theme);\n\n const hoverColors = getHoverColors(\n tryCatch(\n () => mix(0.01, theme.base.palette.interactive, headerBg),\n () => theme.base.palette.interactive\n ),\n theme.base['min-contrast']\n );\n\n return css`\n position: sticky;\n z-index: calc(${theme.base['z-index'].backdrop} - 1);\n ${drawerOpen &&\n css`\n z-index: calc(${theme.base['z-index'].backdrop} - 2);\n `}\n top: var(--appshell-hard-top-offset, 0);\n gap: ${theme.base.spacing};\n max-width: 100%;\n height: ${headerHeight};\n background: ${headerBg};\n color: ${foregroundColor};\n border-bottom: solid 0.0625rem ${theme.components['app-shell'].header['border-color']};\n\n ${StyledAppHeaderInfo} {\n justify-self: flex-start;\n min-width: 33vw;\n\n ${stacked &&\n css`\n min-width: 0;\n `}\n }\n\n ${StyledSearchFiltersButton} {\n color: ${foregroundColor};\n }\n\n > ${StyledAppHeaderOperator} {\n justify-self: flex-end;\n\n + ${StyledPopover} {\n &,\n ${StyledMenuListContainer} {\n background: ${headerBg};\n }\n\n ${StyledMenuListContainer} li {\n color: ${foregroundColor};\n background-color: transparent;\n\n &:hover,\n &[data-current='true'] {\n color: ${hoverColors.foreground};\n background-color: ${hoverColors.background};\n }\n }\n }\n }\n `;\n }\n);\n\nStyledAppHeader.defaultProps = defaultThemeProp;\n"]}
1
+ {"version":3,"file":"AppHeader.styles.js","sourceRoot":"","sources":["../../../src/components/AppShell/AppHeader.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,wBAAwB,EAEzB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,IAAI,MAAM,SAAS,CAAC;AAG3B,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE3D,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC5D,OAAO,GAAG,CAAA;kBACM,QAAQ,UAAU,KAAK,CAAC,IAAI,CAAC,OAAO;GACnD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,qBAAqB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEtD,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAA0B,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,EAA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rC,EACD,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAC3B,CAAC;IAEF,OAAO,GAAG,CAAA;;sBAEQ,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,QAAQ;QAC5C,UAAU;QACZ,GAAG,CAAA;wBACe,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,QAAQ;OAC/C;;aAEM,KAAK,CAAC,IAAI,CAAC,OAAO;;gBAEf,YAAY;oBACR,QAAQ;eACb,eAAe;uCACS,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC;;QAEnF,mBAAmB;;;;UAIjB,OAAO;QACT,GAAG,CAAA;;SAEF;;;QAGD,yBAAyB;iBAChB,eAAe;;;UAGtB,uBAAuB;;;YAGrB,aAAa;;YAEb,uBAAuB;0BACT,QAAQ;;;YAGtB,uBAAuB;qBACd,eAAe;;;;;uBAKb,WAAW,CAAC,UAAU;kCACX,WAAW,CAAC,UAAU;;;;;KAKnD,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import { mix, rgba, transparentize } from 'polished';\nimport styled, { css } from 'styled-components';\n\nimport {\n calculateFontSize,\n getHoverColors,\n calculateForegroundColor,\n type FontSize\n} from '../../styles';\nimport { defaultThemeProp } from '../../theme';\nimport { tryCatch } from '../../utils';\nimport { StyledImage } from '../Image';\nimport { StyledMenuListContainer } from '../Menu/Menu.styles';\nimport { StyledPopover } from '../Popover';\nimport { StyledSearchInput } from '../SearchInput';\nimport {\n StyledSearchButton,\n StyledSearchFiltersButton,\n StyledSearchTextInput\n} from '../SearchInput/SearchInput.styles';\nimport Text from '../Text';\nimport type { TextProps } from '../Text';\n\nimport { headerHeight, navWidth } from './AppShell.styles';\n\nexport const StyledContextSwitcher = styled.div(({ theme }) => {\n return css`\n width: calc(${navWidth} - 2 * ${theme.base.spacing});\n `;\n});\n\nStyledContextSwitcher.defaultProps = defaultThemeProp;\n\nexport const StyledAppHeaderInfo = styled.div<{ centerLogo: boolean }>(({ centerLogo, theme }) => {\n return css`\n & > :first-child {\n vertical-align: top;\n }\n\n & > :is(a, button) {\n cursor: pointer;\n text-decoration: none;\n user-select: none;\n -webkit-user-select: none;\n }\n\n & > :is(a, button):focus-visible {\n box-shadow: ${theme.base.shadow.focus};\n outline: none;\n }\n\n ${StyledImage} {\n height: 1.0725rem;\n\n ${centerLogo &&\n css`\n padding-inline-start: ${theme.base.spacing};\n `}\n }\n `;\n});\n\nStyledAppHeaderInfo.defaultProps = defaultThemeProp;\n\nexport const StyledAppHeaderSearchForm = styled.form<{\n searchDisplay?: 'icon' | 'grow' | 'fullWidth';\n}>(({ searchDisplay, theme }) => {\n const {\n base: { animation },\n components: {\n 'app-shell': { header },\n input\n }\n } = theme;\n\n const {\n background: headerBg,\n 'search-input': {\n 'background-color': searchInputBg,\n 'foreground-color': searchInputFg,\n 'border-color': searchInputBorder\n }\n } = header;\n\n const searchBg = searchInputBg;\n const searchFg = calculateForegroundColor(headerBg, searchInputFg, theme);\n const searchBorder = calculateForegroundColor(headerBg, searchInputBorder, theme);\n\n return css`\n max-width: 33vw;\n min-width: 10rem;\n width: 100%;\n justify-self: center;\n margin-inline-start: 0;\n margin-inline-end: auto;\n transition: max-width ${animation.speed} ${animation.timing.ease};\n\n ${StyledSearchInput} input::placeholder {\n color: ${transparentize(0.4, searchFg)};\n }\n\n ${searchDisplay === 'icon' &&\n css`\n max-width: ${input.height};\n min-width: ${input.height};\n width: auto;\n margin-inline-start: auto;\n margin-inline-end: 0;\n `}\n\n ${searchDisplay === 'grow' &&\n css`\n flex-grow: 1;\n max-width: 100%;\n margin-inline-end: 0;\n `}\n\n ${searchDisplay === 'fullWidth' &&\n css`\n max-width: 100%;\n margin-inline-end: 0;\n `}\n\n &:not([focused]) {\n ${StyledSearchInput} {\n background: ${searchBg};\n border-color: ${searchBorder};\n ${StyledSearchButton} {\n background: ${searchBg};\n color: ${searchFg};\n border-color: ${searchBorder};\n }\n\n ${StyledSearchTextInput} {\n background: ${searchBg};\n color: ${searchFg};\n border-color: ${searchBorder};\n }\n\n ${StyledSearchFiltersButton} {\n background: ${searchBg};\n color: ${searchFg};\n border-color: ${searchBorder};\n }\n }\n }\n `;\n});\n\nStyledAppHeaderSearchForm.defaultProps = defaultThemeProp;\n\nexport const StyledAppHeaderSpacer = styled.div`\n margin: auto;\n`;\n\nexport const StyledAppHeaderLogo = styled.div(({ theme }) => {\n return css`\n max-width: min(${theme.base['content-width'].sm}, 25vw);\n `;\n});\nStyledAppHeaderLogo.defaultProps = defaultThemeProp;\n\n// Shrinks the app/portal name for ellipsis truncation; stacks vertically below `md` where there's no room for both names side by side.\nexport const StyledAppHeaderName = styled.div<{ stacked?: boolean }>(\n ({ theme, stacked }) => css`\n display: flex;\n flex-direction: ${stacked ? 'column' : 'row'};\n align-items: ${stacked ? 'stretch' : 'baseline'};\n gap: ${stacked ? 0 : theme.base.spacing};\n min-width: 0;\n `\n);\nStyledAppHeaderName.defaultProps = defaultThemeProp;\n\nexport const StyledAppHeaderText = styled(Text)<{\n variant: TextProps['variant'];\n stacked?: boolean;\n}>(({ theme, variant, stacked }) => {\n const headerBg = theme.components['app-shell'].header.background;\n const headerFgColor = theme.components['app-shell'].header['foreground-color'];\n\n const foregroundColor =\n theme.components['app-shell'].header['app-name-color'] === 'auto'\n ? calculateForegroundColor(headerBg, headerFgColor, theme)\n : theme.components['app-shell'].header['app-name-color'];\n\n const secondaryColor =\n theme.components['app-shell'].header['portal-name-color'] === 'auto'\n ? tryCatch(() =>\n rgba(\n foregroundColor ?? theme.base.palette['foreground-color'],\n theme.base.transparency['transparent-2']\n )\n )\n : theme.components['app-shell'].header['portal-name-color'];\n\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n display: inline-block;\n max-width: 100%;\n min-width: 0;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n color: ${variant === 'secondary' ? secondaryColor : foregroundColor};\n font-family: ${theme.components.text['brand-primary']['font-family']};\n\n ${variant === 'primary' &&\n css`\n font-size: ${fontSize[theme.components.text['brand-primary']['font-size'] as FontSize]};\n font-weight: ${theme.components.text['brand-primary']['font-weight']};\n `}\n\n ${variant === 'secondary' &&\n css`\n font-size: ${fontSize[theme.components.text.secondary['font-size'] as FontSize]};\n ${stacked &&\n css`\n align-self: flex-start;\n `}\n `}\n `;\n});\n\nStyledAppHeaderText.defaultProps = defaultThemeProp;\n\nexport const StyledAppHeaderOperator = styled.button(\n ({ theme }) => css`\n border-radius: 50%;\n\n :focus-visible {\n box-shadow: ${theme.base.shadow.focus};\n }\n `\n);\n\nStyledAppHeaderOperator.defaultProps = defaultThemeProp;\n\nexport const StyledAppHeader = styled.header<{ stacked: boolean; drawerOpen: boolean }>(\n ({ stacked, drawerOpen, theme }) => {\n const headerBg = theme.components['app-shell'].header.background;\n const headerFgColor = theme.components['app-shell'].header['foreground-color'];\n\n const foregroundColor = calculateForegroundColor(headerBg, headerFgColor, theme);\n\n const hoverColors = getHoverColors(\n tryCatch(\n () => mix(0.01, theme.base.palette.interactive, headerBg),\n () => theme.base.palette.interactive\n ),\n theme.base['min-contrast']\n );\n\n return css`\n position: sticky;\n z-index: calc(${theme.base['z-index'].backdrop} - 1);\n ${drawerOpen &&\n css`\n z-index: calc(${theme.base['z-index'].backdrop} - 2);\n `}\n top: var(--appshell-hard-top-offset, 0);\n gap: ${theme.base.spacing};\n max-width: 100%;\n height: ${headerHeight};\n background: ${headerBg};\n color: ${foregroundColor};\n border-bottom: solid 0.0625rem ${theme.components['app-shell'].header['border-color']};\n\n ${StyledAppHeaderInfo} {\n justify-self: flex-start;\n min-width: 33vw;\n\n ${stacked &&\n css`\n min-width: 0;\n `}\n }\n\n ${StyledSearchFiltersButton} {\n color: ${foregroundColor};\n }\n\n > ${StyledAppHeaderOperator} {\n justify-self: flex-end;\n\n + ${StyledPopover} {\n &,\n ${StyledMenuListContainer} {\n background: ${headerBg};\n }\n\n ${StyledMenuListContainer} li {\n color: ${foregroundColor};\n background-color: transparent;\n\n &:hover,\n &[data-current='true'] {\n color: ${hoverColors.foreground};\n background-color: ${hoverColors.background};\n }\n }\n }\n }\n `;\n }\n);\n\nStyledAppHeader.defaultProps = defaultThemeProp;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.tsx"],"names":[],"mappings":"AAkEA,OAAO,KAAK,EAAE,aAAa,EAAiB,MAAM,kBAAkB,CAAC;AA8ErE,QAAA,MAAM,QAAQ,0GAojBZ,CAAC;AAEH,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.tsx"],"names":[],"mappings":"AAkEA,OAAO,KAAK,EAAE,aAAa,EAAiB,MAAM,kBAAkB,CAAC;AAgFrE,QAAA,MAAM,QAAQ,0GAglBZ,CAAC;AAEH,eAAe,QAAQ,CAAC"}
@@ -32,6 +32,8 @@ import { StyledAppMain, StyledBannerRegion, StyledMobileNav, StyledMobileMoreMen
32
32
  import { followingNodes, focusRegion } from './utils';
33
33
  import AppNavigationPanel, { CaseTypes, Links } from './AppNavigationPanel';
34
34
  import NavigationList from './NavigationList';
35
+ import DocumentTabs, { getTabElementId, getTabPanelId } from './DocumentTabs';
36
+ import { StyledDocumentTabPanel } from './DocumentTabs.styles';
35
37
  registerIcon(timesIcon, plusIcon, caseSolidIcon, barsIcon, caretRightIcon, caretLeftIcon, sunIcon, moonIcon, circleMixedLeftIcon, shareIcon);
36
38
  registerAction({ id: 'NextRegion', defaultKeyBinding: 'F9' }, { id: 'PrevRegion', defaultKeyBinding: 'Shift+F9' }, { id: 'KeyboardCommands', defaultKeyBinding: 'CommandOrControl+/' });
37
39
  function TopNavDrawerProvider({ children }) {
@@ -67,7 +69,7 @@ function TopNavDrawerProvider({ children }) {
67
69
  }
68
70
  const AppShell = forwardRef(function AppShell(props, ref) {
69
71
  const t = useI18n();
70
- const { appInfo, contextSwitcher, searchInput, appHeader, searchPage, searchLabel = t('sitewide'), caseTypes, links, agent, banners, progress, main, operator, utils, headerUtils, helpMenu, cases, defaultExpanded = false, collapsedHoverMenus = false, shareApp, navOrientation = 'side-rail', ...restProps } = props;
72
+ const { appInfo, contextSwitcher, searchInput, appHeader, searchPage, searchLabel = t('sitewide'), caseTypes, links, agent, banners, progress, main, operator, utils, headerUtils, helpMenu, cases, defaultExpanded = false, collapsedHoverMenus = false, shareApp, navOrientation = 'side-rail', documentTabs, ...restProps } = props;
71
73
  const { disableScroll, enableScroll } = useScrollToggle();
72
74
  const navRef = useConsolidatedRef(ref);
73
75
  const mobileButtonRef = useRef(null);
@@ -81,9 +83,9 @@ const AppShell = forwardRef(function AppShell(props, ref) {
81
83
  const [headerEl, setHeaderEl] = useElement();
82
84
  const [mobileHeaderEl, setMobileHeaderEl] = useElement();
83
85
  const isSmallOrAbove = useBreakpoint('sm');
84
- // Touch devices at narrow widths get the bottom nav; non-touch narrow desktops fall back to top-bar.
86
+ // Narrow touch devices get the bottom nav; tablets and narrow non-touch desktops use the top bar.
85
87
  const showMobileNav = !isSmallOrAbove && isTouchDevice;
86
- const isTopBar = !showMobileNav && (navOrientation === 'top-bar' || !isSmallOrAbove);
88
+ const isTopBar = !showMobileNav && (isTouchDevice || navOrientation === 'top-bar' || !isSmallOrAbove);
87
89
  const showAppHeader = isTopBar || (!!appHeader && isSmallOrAbove);
88
90
  const showMainContent = showAppHeader ? !!(headerEl || mobileHeaderEl) : true;
89
91
  const openNavTimeoutId = useRef();
@@ -346,15 +348,23 @@ const AppShell = forwardRef(function AppShell(props, ref) {
346
348
  }
347
349
  }, agent: agent }), _jsxs(Flex, { container: { justify: 'center' }, children: [_jsx(StyledAppShellToggleButton, { icon: true, ref: setExpandCollapseEl, compact: true, variant: 'simple', onClick: () => {
348
350
  setSidebarNavState(sidebarNavState === 'closed' ? 'open' : 'closed');
349
- }, "aria-label": sidebarNavState === 'closed' ? t('expand_navigation') : t('collapse_navigation'), "aria-expanded": sidebarNavState === 'open' || sidebarNavState === 'opening', "aria-controls": navId, children: ['closed', 'closing'].includes(sidebarNavState) ? (_jsx(Icon, { name: `arrow-micro-${end}` })) : (_jsx(Icon, { name: `arrow-micro-${start}` })) }), ['open', 'closed'].includes(sidebarNavState) && (_jsx(Tooltip, { target: expandCollapseEl, placement: 'right', as: StyledAppShellTooltip, showDelay: 'none', hideDelay: 'none', children: sidebarNavState === 'closed' ? t('expand_navigation') : t('collapse_navigation') }))] })] })), showMobileNav && (_jsxs(_Fragment, { children: [_jsxs(Flex, { as: StyledMobileNav, container: { alignItems: 'center', gap: 0.25 }, ref: setMobileHeaderEl, "data-app-region": true, onFocus: () => {
351
+ }, "aria-label": sidebarNavState === 'closed' ? t('expand_navigation') : t('collapse_navigation'), "aria-expanded": sidebarNavState === 'open' || sidebarNavState === 'opening', "aria-controls": navId, children: ['closed', 'closing'].includes(sidebarNavState) ? (_jsx(Icon, { name: `arrow-micro-${end}` })) : (_jsx(Icon, { name: `arrow-micro-${start}` })) }), ['open', 'closed'].includes(sidebarNavState) && (_jsx(Tooltip, { target: expandCollapseEl, placement: 'right', as: StyledAppShellTooltip, showDelay: 'none', hideDelay: 'none', children: sidebarNavState === 'closed' ? t('expand_navigation') : t('collapse_navigation') }))] })] })), showMobileNav && (_jsxs(_Fragment, { children: [_jsxs(Flex, { as: StyledMobileNav, container: { alignItems: 'center', gap: 0.25 }, ref: setMobileHeaderEl, "data-app-region": true, onClick: () => {
350
352
  setMobileNavOpen(false);
351
- }, children: [caseTypes && caseTypes.length > 0 && _jsx(CaseTypes, { caseTypes: caseTypes, mobileNavBar: true }), links && _jsx(Links, { links: links.slice(0, mobileNavLinksCount), mobileNavBar: true }), _jsxs(StyledMobileMoreMenuButton, { ref: mobileButtonRef, variant: 'simple', onClick: () => setMobileNavOpen(prev => !prev), label: t('app_shell_more'), icon: true, "aria-expanded": mobileNavOpen, "aria-controls": navId, children: [_jsx(Icon, { name: 'bars' }), !mobileNavOpen &&
353
+ }, children: [caseTypes && caseTypes.length > 0 && _jsx(CaseTypes, { caseTypes: caseTypes, mobileNavBar: true }), links && _jsx(Links, { links: links.slice(0, mobileNavLinksCount), mobileNavBar: true }), _jsxs(StyledMobileMoreMenuButton, { ref: mobileButtonRef, variant: 'simple', onClick: (e) => {
354
+ setMobileNavOpen(prev => !prev);
355
+ e.stopPropagation();
356
+ }, label: t('app_shell_more'), icon: true, "aria-expanded": mobileNavOpen, "aria-controls": navId, children: [_jsx(Icon, { name: 'bars' }), !mobileNavOpen &&
352
357
  utils?.some(item => (isValidElement(item) ? false : !!item.count)) && (_jsx(Alert, { variant: 'urgent' })), _jsx("span", { children: t('app_shell_more') })] })] }), _jsx(Drawer, { open: mobileNavOpen, ref: mobileNavRef, onAfterClose: () => {
353
358
  setMobileNavOpen(false);
354
359
  }, position: 'fixed', placement: 'bottom', size: '100dvh', nullWhenClosed: true, children: _jsx(Flex, { ...restProps, container: {
355
360
  direction: 'column',
356
361
  justify: 'between'
357
- }, id: navId, as: StyledMobileMoreMenu, ref: ref, "aria-label": t('app_shell_main_navigation_label'), children: _jsx(AppNavigationPanel, { appInfo: appInfo, navState: 'open', searchInput: searchInput, searchLabel: searchLabel, links: links?.slice(mobileNavLinksCount), cases: cases, utils: utilsList, agent: agent }) }) })] })), showMainContent && (_jsxs(StyledAppMain, { previewActive: previewActive, isTopBar: isTopBar, "aria-busy": !!progress, "data-app-region": true, children: [_jsx(Progress, { visible: !!progress, placement: 'local', message: typeof progress === 'string' ? progress : t('loading') }), banners && _jsx(StyledBannerRegion, { children: banners }), main] })), _jsx(AppShellGlobalStyle, { isTopBar: isTopBar, showAppHeader: showAppHeader, isMobile: showMobileNav })] }));
362
+ }, id: navId, as: StyledMobileMoreMenu, ref: ref, "aria-label": t('app_shell_main_navigation_label'), children: _jsx(AppNavigationPanel, { appInfo: appInfo, navState: 'open', searchInput: searchInput, searchLabel: searchLabel, links: links?.slice(mobileNavLinksCount), cases: cases, utils: utilsList, agent: agent }) }) })] })), showMainContent && (_jsxs(_Fragment, { children: [documentTabs && _jsx(DocumentTabs, { ...documentTabs }), (() => {
363
+ const mainRegion = (_jsxs(StyledAppMain, { previewActive: previewActive, isTopBar: isTopBar, "aria-busy": !!progress, "data-app-region": true, children: [_jsx(Progress, { visible: !!progress, placement: 'local', message: typeof progress === 'string' ? progress : t('loading') }), banners && _jsx(StyledBannerRegion, { children: banners }), main] }));
364
+ if (!documentTabs)
365
+ return mainRegion;
366
+ return (_jsx(StyledDocumentTabPanel, { role: 'tabpanel', id: documentTabs.currentTabId ? getTabPanelId(documentTabs.currentTabId) : undefined, "aria-labelledby": documentTabs.currentTabId ? getTabElementId(documentTabs.currentTabId) : undefined, tabIndex: 0, children: mainRegion }));
367
+ })()] })), _jsx(AppShellGlobalStyle, { isTopBar: isTopBar, showAppHeader: showAppHeader, isMobile: showMobileNav, hasDocumentTabs: !!documentTabs, navOpen: sidebarNavState === 'open' || sidebarNavState === 'opening' || mobileNavOpen })] }));
358
368
  });
359
369
  export default AppShell;
360
370
  //# sourceMappingURL=AppShell.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AppShell.js","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,OAAO,EACP,MAAM,EACN,eAAe,EAChB,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,IAAI,EAAE,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,SAAS,MAAM,0BAA0B,CAAC;AACtD,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,aAAa,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,QAAQ,M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AAkB,cAAE,OAAO,GAAsB,EAC7D,IAAI,IACS,CACjB,EACD,KAAC,mBAAmB,IAClB,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,aAAa,EAC5B,QAAQ,EAAE,aAAa,GACvB,IACuB,CAC5B,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import {\n forwardRef,\n useState,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useLayoutEffect\n} from 'react';\nimport type { PropsWithoutRef, ReactNode, Ref } from 'react';\n\nimport { Alert } from '../Badges';\nimport Flex from '../Flex';\nimport Icon, { registerIcon } from '../Icon';\nimport * as timesIcon from '../Icon/icons/times.icon';\nimport * as plusIcon from '../Icon/icons/plus.icon';\nimport * as caseSolidIcon from '../Icon/icons/case-solid.icon';\nimport * as barsIcon from '../Icon/icons/bars.icon';\nimport * as caretLeftIcon from '../Icon/icons/caret-left.icon';\nimport * as caretRightIcon from '../Icon/icons/caret-right.icon';\nimport * as sunIcon from '../Icon/icons/sun.icon';\nimport * as moonIcon from '../Icon/icons/moon.icon';\nimport * as circleMixedLeftIcon from '../Icon/icons/circle-mixed-left.icon';\nimport * as shareIcon from '../Icon/icons/share.icon';\nimport {\n useI18n,\n useBreakpoint,\n useConsolidatedRef,\n useElement,\n useTransitionState,\n useEvent,\n useScrollToggle,\n useTheme,\n useUID,\n usePreviewManager,\n useDirection\n} from '../../hooks';\nimport { openCloseStates } from '../../hooks/useTransitionState';\nimport SkipLinks from '../SkipLinks';\nimport type { SkipLinksProps } from '../SkipLinks';\nimport Progress from '../Progress';\nimport { registerAction } from '../ShortcutManager';\nimport useShortcut from '../../hooks/useShortcut';\nimport { debounce, isTouchDevice, isValidElement } from '../../utils';\nimport useKeyboardCommands from '../KeyboardCommands';\nimport Tooltip from '../Tooltip';\nimport Drawer from '../Drawer';\nimport useThemeMode from '../../hooks/useThemeMode';\n\nimport AppShellContext, { AppShellDrawerContext } from './AppShellContext';\nimport AppHeader from './AppHeader';\nimport AppShellDrawer from './Drawer';\nimport AppTopNav from './AppTopNav';\nimport {\n StyledAppMain,\n StyledBannerRegion,\n StyledMobileNav,\n StyledMobileMoreMenuButton,\n menuButtonWidth,\n StyledMobileMoreMenu,\n StyledAppShellToggleButton,\n StyledAppShellTooltip,\n StyledSidebarNav,\n StyledShareIcon,\n AppShellGlobalStyle\n} from './AppShell.styles';\nimport type { AppShellProps, UtilItemProps } from './AppShell.types';\nimport { followingNodes, focusRegion } from './utils';\nimport AppNavigationPanel, { CaseTypes, Links } from './AppNavigationPanel';\nimport NavigationList from './NavigationList';\n\nregisterIcon(\n timesIcon,\n plusIcon,\n caseSolidIcon,\n barsIcon,\n caretRightIcon,\n caretLeftIcon,\n sunIcon,\n moonIcon,\n circleMixedLeftIcon,\n shareIcon\n);\nregisterAction(\n { id: 'NextRegion', defaultKeyBinding: 'F9' },\n { id: 'PrevRegion', defaultKeyBinding: 'Shift+F9' },\n { id: 'KeyboardCommands', defaultKeyBinding: 'CommandOrControl+/' }\n);\n\ninterface TopNavDrawerProviderProps {\n children: ReactNode;\n}\n\nfunction TopNavDrawerProvider({ children }: TopNavDrawerProviderProps) {\n const [item, setItem] = useState<UtilItemProps | undefined>(undefined);\n const [drawerOpen, setDrawerOpen] = useState(false);\n\n // Delay opening the drawer by one render pass after item is set.\n // The cosmos-core Drawer only fires onAfterOpen on a false→true open transition.\n // Batching setItem + setDrawerOpen(true) in the same event handler causes the\n // Drawer to mount with open=true from the start (no transition), so onAfterOpen\n // never fires and item.onDrawerOpen() (data fetching) is never called.\n // Setting drawerOpen in a separate useEffect gives the Drawer a proper transition.\n useEffect(() => {\n if (item) setDrawerOpen(true);\n }, [item]);\n\n const ctxValue = useMemo(\n () => ({\n drawerOpen,\n openItemName: item?.name,\n closeDrawer: () => setDrawerOpen(false),\n openDrawer: (next: UtilItemProps) => {\n // Spread to create a new object reference each time so useEffect([item])\n // always fires — even when the same item is re-opened after the drawer closes.\n setItem({ ...next });\n },\n refreshDrawer: (next: UtilItemProps) => {\n setItem({ ...next });\n }\n }),\n [drawerOpen, item?.name]\n );\n\n return (\n <AppShellDrawerContext.Provider value={ctxValue}>\n {children}\n {item && (\n <AppShellDrawer\n drawerOpen={drawerOpen}\n setDrawerOpen={setDrawerOpen}\n content={item.drawerView}\n header={item.drawerHeader || item.name}\n onDrawerClose={() => {\n setItem(undefined);\n item.onDrawerClose?.();\n }}\n onDrawerOpen={item.onDrawerOpen}\n />\n )}\n </AppShellDrawerContext.Provider>\n );\n}\n\nconst AppShell = forwardRef(function AppShell(\n props: PropsWithoutRef<AppShellProps>,\n ref: Ref<HTMLDivElement>\n) {\n const t = useI18n();\n\n const {\n appInfo,\n contextSwitcher,\n searchInput,\n appHeader,\n searchPage,\n searchLabel = t('sitewide'),\n caseTypes,\n links,\n agent,\n banners,\n progress,\n main,\n operator,\n utils,\n headerUtils,\n helpMenu,\n cases,\n defaultExpanded = false,\n collapsedHoverMenus = false,\n shareApp,\n navOrientation = 'side-rail',\n ...restProps\n } = props;\n\n const { disableScroll, enableScroll } = useScrollToggle();\n const navRef = useConsolidatedRef(ref);\n const mobileButtonRef = useRef<HTMLButtonElement>(null);\n const navId = useUID();\n const [expandCollapseEl, setExpandCollapseEl] = useElement<HTMLButtonElement>();\n\n const [mobileNavOpen, setMobileNavOpen] = useState(false);\n const [drawerOpen, setDrawerOpen] = useState(false);\n const [mobileNavLinksCount, setMobileNavLinksCount] = useState(0);\n\n const { previewActive, setPreviewActive } = usePreviewManager();\n\n const focusedImperatively = useRef(false);\n const [headerEl, setHeaderEl] = useElement<HTMLDivElement>();\n const [mobileHeaderEl, setMobileHeaderEl] = useElement<HTMLDivElement>();\n\n const isSmallOrAbove = useBreakpoint('sm');\n // Touch devices at narrow widths get the bottom nav; non-touch narrow desktops fall back to top-bar.\n const showMobileNav = !isSmallOrAbove && isTouchDevice;\n const isTopBar = !showMobileNav && (navOrientation === 'top-bar' || !isSmallOrAbove);\n\n const showAppHeader = isTopBar || (!!appHeader && isSmallOrAbove);\n const showMainContent = showAppHeader ? !!(headerEl || mobileHeaderEl) : true;\n\n const openNavTimeoutId = useRef<ReturnType<typeof setTimeout>>();\n const closeNavTimeoutId = useRef<ReturnType<typeof setTimeout>>();\n\n const [searchContainerEl, setSearchContainerEl] = useState<HTMLElement | null>(null);\n\n const openKeyboardCommands = useKeyboardCommands();\n\n const theme = useTheme();\n\n const { state: sidebarNavState, set: setSidebarNavState } = useTransitionState({\n ref: navRef,\n property: 'width',\n states: openCloseStates,\n defaultState: defaultExpanded ? 'open' : 'closed'\n });\n\n const skipLinks: SkipLinksProps['items'] = useMemo(\n () => [\n {\n label: t('go_to_main_content'),\n target: { ariaLabel: t('main_content'), selector: 'main' }\n }\n ],\n [t]\n );\n\n const openNav = useCallback((delay: number = 0) => {\n if (closeNavTimeoutId.current) clearTimeout(closeNavTimeoutId.current);\n openNavTimeoutId.current = setTimeout(() => {\n setSidebarNavState('open');\n }, delay);\n }, []);\n\n const closeNav = useCallback((delay: number = 0) => {\n if (openNavTimeoutId.current) clearTimeout(openNavTimeoutId.current);\n closeNavTimeoutId.current = setTimeout(() => {\n setSidebarNavState('closed');\n }, delay);\n }, []);\n\n const onFocus = useCallback(() => {\n focusedImperatively.current = false;\n }, []);\n\n const mobileNavRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const ac = new AbortController();\n window.navigation.addEventListener(\n 'navigate',\n () => {\n if (mobileNavOpen) {\n setMobileNavOpen(false);\n }\n },\n {\n signal: ac.signal\n }\n );\n\n return () => {\n ac.abort();\n };\n }, [mobileNavOpen]);\n\n useEffect(() => {\n if (mobileNavOpen) {\n disableScroll();\n } else {\n enableScroll();\n }\n }, [mobileNavOpen]);\n\n useEffect(() => {\n if (mobileNavOpen) {\n const onKeyDown = ({ key }: KeyboardEvent) => {\n if (key === 'Escape') setMobileNavOpen(false);\n };\n\n document.addEventListener('keydown', onKeyDown);\n return () => {\n document.removeEventListener('keydown', onKeyDown);\n };\n }\n }, [mobileNavOpen]);\n\n useEffect(() => {\n if (isSmallOrAbove && mobileNavOpen) setMobileNavOpen(false);\n }, [isSmallOrAbove, mobileNavOpen]);\n\n useLayoutEffect(() => {\n if (!mobileHeaderEl) return;\n\n const resizeObserver = new ResizeObserver(\n debounce(() => {\n const screenWidth = document.documentElement.clientWidth;\n const regionsPaddingInlinePixels =\n 2 *\n Number.parseInt(\n window.getComputedStyle(mobileHeaderEl).getPropertyValue('padding-inline-start'),\n 10\n );\n const availableWidth = screenWidth * 0.9 - regionsPaddingInlinePixels;\n setMobileNavLinksCount(\n Math.max(\n Math.floor(availableWidth / menuButtonWidth(theme)) - (caseTypes?.length ? 2 : 1),\n 0\n )\n );\n }, 0)\n );\n\n resizeObserver.observe(document.documentElement);\n\n return () => {\n resizeObserver.disconnect();\n };\n }, [mobileHeaderEl, caseTypes?.length]);\n\n const activatedEl = useRef<Element>(document.body);\n useEvent('click', e => {\n activatedEl.current = document.elementFromPoint(e.clientX, e.clientY) ?? document.body;\n });\n\n useShortcut('NextRegion', () => {\n const activeElement =\n document.activeElement && document.activeElement !== document.body\n ? document.activeElement\n : activatedEl.current;\n const regionEls = followingNodes<HTMLElement>(\n document.createNodeIterator(document.body, NodeFilter.SHOW_ELEMENT, node =>\n // safe to treat as Element, as we requested to give us only elements\n (node as Element).hasAttribute('data-app-region') || node === activeElement\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_SKIP\n ),\n activeElement\n );\n // try to focus first visibleregion\n const focusedNode = regionEls.find(node => focusRegion(node));\n if (!focusedNode) (activeElement as HTMLElement).focus();\n });\n\n useShortcut('PrevRegion', () => {\n const activeElement =\n document.activeElement && document.activeElement !== document.body\n ? document.activeElement\n : activatedEl.current;\n const regionEls = followingNodes<HTMLElement>(\n document.createNodeIterator(document.body, NodeFilter.SHOW_ELEMENT, node =>\n // safe to treat as Element, as we requested to give us only elements\n (node as Element).hasAttribute('data-app-region') || node === activeElement\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_SKIP\n ),\n activeElement\n );\n regionEls.reverse();\n\n // removing active element parent from the list to avoid focusing back to the same region\n // but only if element is not region himself - in that case we want to keep its parent on the list\n // as it is different focusable region\n if (regionEls[0].contains(activeElement) && !activeElement.hasAttribute('data-app-region'))\n regionEls.splice(0, 1);\n const focusedNode = regionEls.find(node => focusRegion(node));\n if (!focusedNode) (activeElement as HTMLElement).focus();\n });\n\n useShortcut('KeyboardCommands', () => {\n openKeyboardCommands();\n });\n\n const contextSwitcherUtilItem: UtilItemProps | undefined = useMemo(() => {\n const {\n contexts,\n onContextClick,\n label: contextSwitcherLabel = t('switch_to')\n } = contextSwitcher ?? {};\n if (!showAppHeader && contexts && contexts?.length > 1 && !!onContextClick) {\n return {\n name: contextSwitcherLabel,\n primary: contextSwitcherLabel,\n visual: <Icon name='dot-9-solid' />,\n drawerView: (\n <NavigationList\n items={contexts!.map(context => ({\n ...context,\n primary: context.primary,\n 'aria-current': !!context.selected,\n visual: context.visual,\n onClick: e => {\n onContextClick(context.id, e);\n }\n }))}\n singleSelect\n />\n )\n };\n }\n }, [\n showAppHeader,\n contextSwitcher?.contexts,\n contextSwitcher?.label,\n contextSwitcher?.onContextClick\n ]);\n\n const shareLabel = shareApp?.label ?? t('app_shell_share');\n\n const shareApplicationUtilItem: UtilItemProps | undefined = useMemo(() => {\n if (!showAppHeader && shareApp) {\n return {\n name: shareLabel,\n primary: shareLabel,\n visual: <StyledShareIcon name='share' />,\n onClick: shareApp.onClick\n };\n }\n }, [showAppHeader, shareApp, shareLabel]);\n\n const operatorInfoUtilItem: UtilItemProps | undefined = useMemo(() => {\n if (!showAppHeader && operator) {\n return {\n name: operator.name,\n primary: t('app_shell_user_account'),\n visual: operator.avatar,\n items: operator.actions\n };\n }\n }, [showAppHeader, operator]);\n\n const { themeMode, onThemeModeChange } = useThemeMode();\n\n const themeSwitcherUtilItem: UtilItemProps | undefined = useMemo(() => {\n if (!showAppHeader && onThemeModeChange) {\n let currentThemeIcon = 'circle-mixed-left'; // default for system\n if (themeMode === 'dark') {\n currentThemeIcon = 'moon';\n } else if (themeMode === 'light') {\n currentThemeIcon = 'sun';\n }\n\n return {\n name: t('theme_mode'),\n primary: t('theme_mode'),\n visual: <Icon name={currentThemeIcon} />,\n items: [\n {\n id: 'light',\n primary: t('theme_light'),\n visual: <Icon name='sun' />,\n onClick: () => onThemeModeChange('light')\n },\n {\n id: 'dark',\n primary: t('theme_dark'),\n visual: <Icon name='moon' />,\n onClick: () => onThemeModeChange('dark')\n },\n {\n id: 'system',\n primary: t('theme_system'),\n visual: <Icon name='circle-mixed-left' />,\n onClick: () => onThemeModeChange('system')\n }\n ]\n };\n }\n }, [showAppHeader, onThemeModeChange, themeMode]);\n\n const { start, end } = useDirection();\n\n const utilsList = useMemo(\n () => [\n ...(utils ?? []),\n ...(contextSwitcherUtilItem ? [contextSwitcherUtilItem] : []),\n ...(shareApplicationUtilItem ? [shareApplicationUtilItem] : []),\n ...(operatorInfoUtilItem ? [operatorInfoUtilItem] : []),\n ...(themeSwitcherUtilItem ? [themeSwitcherUtilItem] : [])\n ],\n [\n utils,\n contextSwitcherUtilItem,\n shareApplicationUtilItem,\n operatorInfoUtilItem,\n themeSwitcherUtilItem\n ]\n );\n\n return (\n <AppShellContext.Provider\n value={useMemo(\n () => ({\n navOpen: sidebarNavState === 'open' || sidebarNavState === 'opening' || mobileNavOpen,\n drawerOpen,\n setDrawerOpen,\n collapsedHoverMenus,\n navState: sidebarNavState,\n focusedImperatively,\n headerEl: headerEl || mobileHeaderEl,\n appHeaderEl: headerEl ?? null,\n searchContainerEl,\n setSearchContainerEl,\n isMobileNav: showMobileNav,\n isTopBar,\n previewActive,\n setPreviewActive\n }),\n [\n sidebarNavState,\n drawerOpen,\n mobileNavOpen,\n showMobileNav,\n isTopBar,\n headerEl,\n mobileHeaderEl,\n searchContainerEl,\n previewActive\n ]\n )}\n >\n <SkipLinks items={skipLinks} />\n {showAppHeader && (\n <AppHeader\n {...appInfo}\n contextSwitcher={contextSwitcher}\n searchInput={searchInput}\n searchLabel={searchLabel}\n operator={operator}\n headerUtils={headerUtils}\n helpMenu={helpMenu}\n searchPage={searchPage}\n shareApp={shareApp}\n ref={setHeaderEl}\n />\n )}\n {isTopBar && (\n <TopNavDrawerProvider>\n <AppTopNav\n appInfo={appInfo}\n links={links}\n caseTypes={caseTypes}\n cases={cases}\n agent={agent}\n utils={utils}\n searchInput={searchInput}\n searchPage={searchPage}\n searchLabel={searchLabel}\n />\n </TopNavDrawerProvider>\n )}\n {!isTopBar && isSmallOrAbove && (\n <Flex\n {...restProps}\n container={{\n direction: 'column',\n justify: 'between'\n }}\n id={navId}\n as={StyledSidebarNav}\n portalAgent={!!agent}\n ref={navRef}\n data-app-region\n onFocus={onFocus}\n aria-label={t('app_shell_main_navigation_label')}\n >\n <AppNavigationPanel\n navState={sidebarNavState}\n appInfo={!showAppHeader ? appInfo : undefined}\n searchInput={!showAppHeader ? searchInput : undefined}\n searchLabel={searchLabel}\n caseTypes={caseTypes}\n links={links}\n cases={cases}\n utils={utilsList}\n onClick={() => {\n if (['closing', 'closed'].includes(sidebarNavState)) {\n openNav(0);\n } else {\n closeNav(0);\n }\n }}\n agent={agent}\n />\n <Flex container={{ justify: 'center' }}>\n <StyledAppShellToggleButton\n icon\n ref={setExpandCollapseEl}\n compact\n variant='simple'\n onClick={() => {\n setSidebarNavState(sidebarNavState === 'closed' ? 'open' : 'closed');\n }}\n aria-label={\n sidebarNavState === 'closed' ? t('expand_navigation') : t('collapse_navigation')\n }\n aria-expanded={sidebarNavState === 'open' || sidebarNavState === 'opening'}\n aria-controls={navId}\n >\n {['closed', 'closing'].includes(sidebarNavState) ? (\n <Icon name={`arrow-micro-${end}`} />\n ) : (\n <Icon name={`arrow-micro-${start}`} />\n )}\n </StyledAppShellToggleButton>\n\n {['open', 'closed'].includes(sidebarNavState) && (\n <Tooltip\n target={expandCollapseEl}\n placement='right'\n as={StyledAppShellTooltip}\n showDelay='none'\n hideDelay='none'\n >\n {sidebarNavState === 'closed' ? t('expand_navigation') : t('collapse_navigation')}\n </Tooltip>\n )}\n </Flex>\n </Flex>\n )}\n {showMobileNav && (\n <>\n <Flex\n as={StyledMobileNav}\n container={{ alignItems: 'center', gap: 0.25 }}\n ref={setMobileHeaderEl}\n data-app-region\n onFocus={() => {\n setMobileNavOpen(false);\n }}\n >\n {caseTypes && caseTypes.length > 0 && <CaseTypes caseTypes={caseTypes} mobileNavBar />}\n {links && <Links links={links.slice(0, mobileNavLinksCount)} mobileNavBar />}\n <StyledMobileMoreMenuButton\n ref={mobileButtonRef}\n variant='simple'\n onClick={() => setMobileNavOpen(prev => !prev)}\n label={t('app_shell_more')}\n icon\n aria-expanded={mobileNavOpen}\n aria-controls={navId}\n >\n <Icon name='bars' />\n {!mobileNavOpen &&\n utils?.some(item => (isValidElement(item) ? false : !!item.count)) && (\n <Alert variant='urgent' />\n )}\n <span>{t('app_shell_more')}</span>\n </StyledMobileMoreMenuButton>\n </Flex>\n <Drawer\n open={mobileNavOpen}\n ref={mobileNavRef}\n onAfterClose={() => {\n setMobileNavOpen(false);\n }}\n position='fixed'\n placement='bottom'\n size='100dvh'\n nullWhenClosed\n >\n <Flex\n {...restProps}\n container={{\n direction: 'column',\n justify: 'between'\n }}\n id={navId}\n as={StyledMobileMoreMenu}\n ref={ref}\n aria-label={t('app_shell_main_navigation_label')}\n >\n <AppNavigationPanel\n appInfo={appInfo}\n navState='open'\n searchInput={searchInput}\n searchLabel={searchLabel}\n links={links?.slice(mobileNavLinksCount)}\n cases={cases}\n utils={utilsList}\n agent={agent}\n />\n </Flex>\n </Drawer>\n </>\n )}\n {showMainContent && (\n <StyledAppMain\n previewActive={previewActive}\n isTopBar={isTopBar}\n aria-busy={!!progress}\n data-app-region\n >\n <Progress\n visible={!!progress}\n placement='local'\n message={typeof progress === 'string' ? progress : t('loading')}\n />\n\n {banners && <StyledBannerRegion>{banners}</StyledBannerRegion>}\n {main}\n </StyledAppMain>\n )}\n <AppShellGlobalStyle\n isTopBar={isTopBar}\n showAppHeader={showAppHeader}\n isMobile={showMobileNav}\n />\n </AppShellContext.Provider>\n );\n});\n\nexport default AppShell;\n"]}
1
+ {"version":3,"file":"AppShell.js","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,OAAO,EACP,MAAM,EACN,eAAe,EAChB,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,IAAI,EAAE,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,SAAS,MAAM,0BAA0B,CAAC;AACtD,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,aAAa,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,aAAa,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,cAAc,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAC;AAClD,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,mBAAmB,MAAM,sCAAsC,CAAC;AAC5E,OAAO,KAAK,SAAS,MAAM,0BAA0B,CAAC;AACtD,OAAO,EACL,OAAO,EACP,aAAa,EACb,kBAAkB,EAClB,UAAU,EACV,kBAAkB,EAClB,QAAQ,EACR,eAAe,EACf,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,YAAY,EACb,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CA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C,CAAC,CAAC,eAAe,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,SAAS,EAEpF,QAAQ,EAAE,CAAC,YAEV,UAAU,GACY,CAC1B,CAAC;oBACJ,CAAC,CAAC,EAAE,IACH,CACJ,EACD,KAAC,mBAAmB,IAClB,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,aAAa,EAC5B,QAAQ,EAAE,aAAa,EACvB,eAAe,EAAE,CAAC,CAAC,YAAY,EAC/B,OAAO,EAAE,eAAe,KAAK,MAAM,IAAI,eAAe,KAAK,SAAS,IAAI,aAAa,GACrF,IACuB,CAC5B,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import {\n forwardRef,\n useState,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useLayoutEffect\n} from 'react';\nimport type { PropsWithoutRef, ReactNode, Ref, MouseEvent } from 'react';\n\nimport { Alert } from '../Badges';\nimport Flex from '../Flex';\nimport Icon, { registerIcon } from '../Icon';\nimport * as timesIcon from '../Icon/icons/times.icon';\nimport * as plusIcon from '../Icon/icons/plus.icon';\nimport * as caseSolidIcon from '../Icon/icons/case-solid.icon';\nimport * as barsIcon from '../Icon/icons/bars.icon';\nimport * as caretLeftIcon from '../Icon/icons/caret-left.icon';\nimport * as caretRightIcon from '../Icon/icons/caret-right.icon';\nimport * as sunIcon from '../Icon/icons/sun.icon';\nimport * as moonIcon from '../Icon/icons/moon.icon';\nimport * as circleMixedLeftIcon from '../Icon/icons/circle-mixed-left.icon';\nimport * as shareIcon from '../Icon/icons/share.icon';\nimport {\n useI18n,\n useBreakpoint,\n useConsolidatedRef,\n useElement,\n useTransitionState,\n useEvent,\n useScrollToggle,\n useTheme,\n useUID,\n usePreviewManager,\n useDirection\n} from '../../hooks';\nimport { openCloseStates } from '../../hooks/useTransitionState';\nimport SkipLinks from '../SkipLinks';\nimport type { SkipLinksProps } from '../SkipLinks';\nimport Progress from '../Progress';\nimport { registerAction } from '../ShortcutManager';\nimport useShortcut from '../../hooks/useShortcut';\nimport { debounce, isTouchDevice, isValidElement } from '../../utils';\nimport useKeyboardCommands from '../KeyboardCommands';\nimport Tooltip from '../Tooltip';\nimport Drawer from '../Drawer';\nimport useThemeMode from '../../hooks/useThemeMode';\n\nimport AppShellContext, { AppShellDrawerContext } from './AppShellContext';\nimport AppHeader from './AppHeader';\nimport AppShellDrawer from './Drawer';\nimport AppTopNav from './AppTopNav';\nimport {\n StyledAppMain,\n StyledBannerRegion,\n StyledMobileNav,\n StyledMobileMoreMenuButton,\n menuButtonWidth,\n StyledMobileMoreMenu,\n StyledAppShellToggleButton,\n StyledAppShellTooltip,\n StyledSidebarNav,\n StyledShareIcon,\n AppShellGlobalStyle\n} from './AppShell.styles';\nimport type { AppShellProps, UtilItemProps } from './AppShell.types';\nimport { followingNodes, focusRegion } from './utils';\nimport AppNavigationPanel, { CaseTypes, Links } from './AppNavigationPanel';\nimport NavigationList from './NavigationList';\nimport DocumentTabs, { getTabElementId, getTabPanelId } from './DocumentTabs';\nimport { StyledDocumentTabPanel } from './DocumentTabs.styles';\n\nregisterIcon(\n timesIcon,\n plusIcon,\n caseSolidIcon,\n barsIcon,\n caretRightIcon,\n caretLeftIcon,\n sunIcon,\n moonIcon,\n circleMixedLeftIcon,\n shareIcon\n);\nregisterAction(\n { id: 'NextRegion', defaultKeyBinding: 'F9' },\n { id: 'PrevRegion', defaultKeyBinding: 'Shift+F9' },\n { id: 'KeyboardCommands', defaultKeyBinding: 'CommandOrControl+/' }\n);\n\ninterface TopNavDrawerProviderProps {\n children: ReactNode;\n}\n\nfunction TopNavDrawerProvider({ children }: TopNavDrawerProviderProps) {\n const [item, setItem] = useState<UtilItemProps | undefined>(undefined);\n const [drawerOpen, setDrawerOpen] = useState(false);\n\n // Delay opening the drawer by one render pass after item is set.\n // The cosmos-core Drawer only fires onAfterOpen on a false→true open transition.\n // Batching setItem + setDrawerOpen(true) in the same event handler causes the\n // Drawer to mount with open=true from the start (no transition), so onAfterOpen\n // never fires and item.onDrawerOpen() (data fetching) is never called.\n // Setting drawerOpen in a separate useEffect gives the Drawer a proper transition.\n useEffect(() => {\n if (item) setDrawerOpen(true);\n }, [item]);\n\n const ctxValue = useMemo(\n () => ({\n drawerOpen,\n openItemName: item?.name,\n closeDrawer: () => setDrawerOpen(false),\n openDrawer: (next: UtilItemProps) => {\n // Spread to create a new object reference each time so useEffect([item])\n // always fires — even when the same item is re-opened after the drawer closes.\n setItem({ ...next });\n },\n refreshDrawer: (next: UtilItemProps) => {\n setItem({ ...next });\n }\n }),\n [drawerOpen, item?.name]\n );\n\n return (\n <AppShellDrawerContext.Provider value={ctxValue}>\n {children}\n {item && (\n <AppShellDrawer\n drawerOpen={drawerOpen}\n setDrawerOpen={setDrawerOpen}\n content={item.drawerView}\n header={item.drawerHeader || item.name}\n onDrawerClose={() => {\n setItem(undefined);\n item.onDrawerClose?.();\n }}\n onDrawerOpen={item.onDrawerOpen}\n />\n )}\n </AppShellDrawerContext.Provider>\n );\n}\n\nconst AppShell = forwardRef(function AppShell(\n props: PropsWithoutRef<AppShellProps>,\n ref: Ref<HTMLDivElement>\n) {\n const t = useI18n();\n\n const {\n appInfo,\n contextSwitcher,\n searchInput,\n appHeader,\n searchPage,\n searchLabel = t('sitewide'),\n caseTypes,\n links,\n agent,\n banners,\n progress,\n main,\n operator,\n utils,\n headerUtils,\n helpMenu,\n cases,\n defaultExpanded = false,\n collapsedHoverMenus = false,\n shareApp,\n navOrientation = 'side-rail',\n documentTabs,\n ...restProps\n } = props;\n\n const { disableScroll, enableScroll } = useScrollToggle();\n const navRef = useConsolidatedRef(ref);\n const mobileButtonRef = useRef<HTMLButtonElement>(null);\n const navId = useUID();\n const [expandCollapseEl, setExpandCollapseEl] = useElement<HTMLButtonElement>();\n\n const [mobileNavOpen, setMobileNavOpen] = useState(false);\n const [drawerOpen, setDrawerOpen] = useState(false);\n const [mobileNavLinksCount, setMobileNavLinksCount] = useState(0);\n\n const { previewActive, setPreviewActive } = usePreviewManager();\n\n const focusedImperatively = useRef(false);\n const [headerEl, setHeaderEl] = useElement<HTMLDivElement>();\n const [mobileHeaderEl, setMobileHeaderEl] = useElement<HTMLDivElement>();\n\n const isSmallOrAbove = useBreakpoint('sm');\n // Narrow touch devices get the bottom nav; tablets and narrow non-touch desktops use the top bar.\n const showMobileNav = !isSmallOrAbove && isTouchDevice;\n const isTopBar =\n !showMobileNav && (isTouchDevice || navOrientation === 'top-bar' || !isSmallOrAbove);\n\n const showAppHeader = isTopBar || (!!appHeader && isSmallOrAbove);\n const showMainContent = showAppHeader ? !!(headerEl || mobileHeaderEl) : true;\n\n const openNavTimeoutId = useRef<ReturnType<typeof setTimeout>>();\n const closeNavTimeoutId = useRef<ReturnType<typeof setTimeout>>();\n\n const [searchContainerEl, setSearchContainerEl] = useState<HTMLElement | null>(null);\n\n const openKeyboardCommands = useKeyboardCommands();\n\n const theme = useTheme();\n\n const { state: sidebarNavState, set: setSidebarNavState } = useTransitionState({\n ref: navRef,\n property: 'width',\n states: openCloseStates,\n defaultState: defaultExpanded ? 'open' : 'closed'\n });\n\n const skipLinks: SkipLinksProps['items'] = useMemo(\n () => [\n {\n label: t('go_to_main_content'),\n target: { ariaLabel: t('main_content'), selector: 'main' }\n }\n ],\n [t]\n );\n\n const openNav = useCallback((delay: number = 0) => {\n if (closeNavTimeoutId.current) clearTimeout(closeNavTimeoutId.current);\n openNavTimeoutId.current = setTimeout(() => {\n setSidebarNavState('open');\n }, delay);\n }, []);\n\n const closeNav = useCallback((delay: number = 0) => {\n if (openNavTimeoutId.current) clearTimeout(openNavTimeoutId.current);\n closeNavTimeoutId.current = setTimeout(() => {\n setSidebarNavState('closed');\n }, delay);\n }, []);\n\n const onFocus = useCallback(() => {\n focusedImperatively.current = false;\n }, []);\n\n const mobileNavRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const ac = new AbortController();\n window.navigation.addEventListener(\n 'navigate',\n () => {\n if (mobileNavOpen) {\n setMobileNavOpen(false);\n }\n },\n {\n signal: ac.signal\n }\n );\n\n return () => {\n ac.abort();\n };\n }, [mobileNavOpen]);\n\n useEffect(() => {\n if (mobileNavOpen) {\n disableScroll();\n } else {\n enableScroll();\n }\n }, [mobileNavOpen]);\n\n useEffect(() => {\n if (mobileNavOpen) {\n const onKeyDown = ({ key }: KeyboardEvent) => {\n if (key === 'Escape') setMobileNavOpen(false);\n };\n\n document.addEventListener('keydown', onKeyDown);\n return () => {\n document.removeEventListener('keydown', onKeyDown);\n };\n }\n }, [mobileNavOpen]);\n\n useEffect(() => {\n if (isSmallOrAbove && mobileNavOpen) setMobileNavOpen(false);\n }, [isSmallOrAbove, mobileNavOpen]);\n\n useLayoutEffect(() => {\n if (!mobileHeaderEl) return;\n\n const resizeObserver = new ResizeObserver(\n debounce(() => {\n const screenWidth = document.documentElement.clientWidth;\n const regionsPaddingInlinePixels =\n 2 *\n Number.parseInt(\n window.getComputedStyle(mobileHeaderEl).getPropertyValue('padding-inline-start'),\n 10\n );\n const availableWidth = screenWidth * 0.9 - regionsPaddingInlinePixels;\n setMobileNavLinksCount(\n Math.max(\n Math.floor(availableWidth / menuButtonWidth(theme)) - (caseTypes?.length ? 2 : 1),\n 0\n )\n );\n }, 0)\n );\n\n resizeObserver.observe(document.documentElement);\n\n return () => {\n resizeObserver.disconnect();\n };\n }, [mobileHeaderEl, caseTypes?.length]);\n\n const activatedEl = useRef<Element>(document.body);\n useEvent('click', e => {\n activatedEl.current = document.elementFromPoint(e.clientX, e.clientY) ?? document.body;\n });\n\n useShortcut('NextRegion', () => {\n const activeElement =\n document.activeElement && document.activeElement !== document.body\n ? document.activeElement\n : activatedEl.current;\n const regionEls = followingNodes<HTMLElement>(\n document.createNodeIterator(document.body, NodeFilter.SHOW_ELEMENT, node =>\n // safe to treat as Element, as we requested to give us only elements\n (node as Element).hasAttribute('data-app-region') || node === activeElement\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_SKIP\n ),\n activeElement\n );\n // try to focus first visibleregion\n const focusedNode = regionEls.find(node => focusRegion(node));\n if (!focusedNode) (activeElement as HTMLElement).focus();\n });\n\n useShortcut('PrevRegion', () => {\n const activeElement =\n document.activeElement && document.activeElement !== document.body\n ? document.activeElement\n : activatedEl.current;\n const regionEls = followingNodes<HTMLElement>(\n document.createNodeIterator(document.body, NodeFilter.SHOW_ELEMENT, node =>\n // safe to treat as Element, as we requested to give us only elements\n (node as Element).hasAttribute('data-app-region') || node === activeElement\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_SKIP\n ),\n activeElement\n );\n regionEls.reverse();\n\n // removing active element parent from the list to avoid focusing back to the same region\n // but only if element is not region himself - in that case we want to keep its parent on the list\n // as it is different focusable region\n if (regionEls[0].contains(activeElement) && !activeElement.hasAttribute('data-app-region'))\n regionEls.splice(0, 1);\n const focusedNode = regionEls.find(node => focusRegion(node));\n if (!focusedNode) (activeElement as HTMLElement).focus();\n });\n\n useShortcut('KeyboardCommands', () => {\n openKeyboardCommands();\n });\n\n const contextSwitcherUtilItem: UtilItemProps | undefined = useMemo(() => {\n const {\n contexts,\n onContextClick,\n label: contextSwitcherLabel = t('switch_to')\n } = contextSwitcher ?? {};\n if (!showAppHeader && contexts && contexts?.length > 1 && !!onContextClick) {\n return {\n name: contextSwitcherLabel,\n primary: contextSwitcherLabel,\n visual: <Icon name='dot-9-solid' />,\n drawerView: (\n <NavigationList\n items={contexts!.map(context => ({\n ...context,\n primary: context.primary,\n 'aria-current': !!context.selected,\n visual: context.visual,\n onClick: e => {\n onContextClick(context.id, e);\n }\n }))}\n singleSelect\n />\n )\n };\n }\n }, [\n showAppHeader,\n contextSwitcher?.contexts,\n contextSwitcher?.label,\n contextSwitcher?.onContextClick\n ]);\n\n const shareLabel = shareApp?.label ?? t('app_shell_share');\n\n const shareApplicationUtilItem: UtilItemProps | undefined = useMemo(() => {\n if (!showAppHeader && shareApp) {\n return {\n name: shareLabel,\n primary: shareLabel,\n visual: <StyledShareIcon name='share' />,\n onClick: shareApp.onClick\n };\n }\n }, [showAppHeader, shareApp, shareLabel]);\n\n const operatorInfoUtilItem: UtilItemProps | undefined = useMemo(() => {\n if (!showAppHeader && operator) {\n return {\n name: operator.name,\n primary: t('app_shell_user_account'),\n visual: operator.avatar,\n items: operator.actions\n };\n }\n }, [showAppHeader, operator]);\n\n const { themeMode, onThemeModeChange } = useThemeMode();\n\n const themeSwitcherUtilItem: UtilItemProps | undefined = useMemo(() => {\n if (!showAppHeader && onThemeModeChange) {\n let currentThemeIcon = 'circle-mixed-left'; // default for system\n if (themeMode === 'dark') {\n currentThemeIcon = 'moon';\n } else if (themeMode === 'light') {\n currentThemeIcon = 'sun';\n }\n\n return {\n name: t('theme_mode'),\n primary: t('theme_mode'),\n visual: <Icon name={currentThemeIcon} />,\n items: [\n {\n id: 'light',\n primary: t('theme_light'),\n visual: <Icon name='sun' />,\n onClick: () => onThemeModeChange('light')\n },\n {\n id: 'dark',\n primary: t('theme_dark'),\n visual: <Icon name='moon' />,\n onClick: () => onThemeModeChange('dark')\n },\n {\n id: 'system',\n primary: t('theme_system'),\n visual: <Icon name='circle-mixed-left' />,\n onClick: () => onThemeModeChange('system')\n }\n ]\n };\n }\n }, [showAppHeader, onThemeModeChange, themeMode]);\n\n const { start, end } = useDirection();\n\n const utilsList = useMemo(\n () => [\n ...(utils ?? []),\n ...(contextSwitcherUtilItem ? [contextSwitcherUtilItem] : []),\n ...(shareApplicationUtilItem ? [shareApplicationUtilItem] : []),\n ...(operatorInfoUtilItem ? [operatorInfoUtilItem] : []),\n ...(themeSwitcherUtilItem ? [themeSwitcherUtilItem] : [])\n ],\n [\n utils,\n contextSwitcherUtilItem,\n shareApplicationUtilItem,\n operatorInfoUtilItem,\n themeSwitcherUtilItem\n ]\n );\n\n return (\n <AppShellContext.Provider\n value={useMemo(\n () => ({\n navOpen: sidebarNavState === 'open' || sidebarNavState === 'opening' || mobileNavOpen,\n drawerOpen,\n setDrawerOpen,\n collapsedHoverMenus,\n navState: sidebarNavState,\n focusedImperatively,\n headerEl: headerEl || mobileHeaderEl,\n appHeaderEl: headerEl ?? null,\n searchContainerEl,\n setSearchContainerEl,\n isMobileNav: showMobileNav,\n isTopBar,\n previewActive,\n setPreviewActive\n }),\n [\n sidebarNavState,\n drawerOpen,\n mobileNavOpen,\n showMobileNav,\n isTopBar,\n headerEl,\n mobileHeaderEl,\n searchContainerEl,\n previewActive\n ]\n )}\n >\n <SkipLinks items={skipLinks} />\n {showAppHeader && (\n <AppHeader\n {...appInfo}\n contextSwitcher={contextSwitcher}\n searchInput={searchInput}\n searchLabel={searchLabel}\n operator={operator}\n headerUtils={headerUtils}\n helpMenu={helpMenu}\n searchPage={searchPage}\n shareApp={shareApp}\n ref={setHeaderEl}\n />\n )}\n {isTopBar && (\n <TopNavDrawerProvider>\n <AppTopNav\n appInfo={appInfo}\n links={links}\n caseTypes={caseTypes}\n cases={cases}\n agent={agent}\n utils={utils}\n searchInput={searchInput}\n searchPage={searchPage}\n searchLabel={searchLabel}\n />\n </TopNavDrawerProvider>\n )}\n {!isTopBar && isSmallOrAbove && (\n <Flex\n {...restProps}\n container={{\n direction: 'column',\n justify: 'between'\n }}\n id={navId}\n as={StyledSidebarNav}\n portalAgent={!!agent}\n ref={navRef}\n data-app-region\n onFocus={onFocus}\n aria-label={t('app_shell_main_navigation_label')}\n >\n <AppNavigationPanel\n navState={sidebarNavState}\n appInfo={!showAppHeader ? appInfo : undefined}\n searchInput={!showAppHeader ? searchInput : undefined}\n searchLabel={searchLabel}\n caseTypes={caseTypes}\n links={links}\n cases={cases}\n utils={utilsList}\n onClick={() => {\n if (['closing', 'closed'].includes(sidebarNavState)) {\n openNav(0);\n } else {\n closeNav(0);\n }\n }}\n agent={agent}\n />\n <Flex container={{ justify: 'center' }}>\n <StyledAppShellToggleButton\n icon\n ref={setExpandCollapseEl}\n compact\n variant='simple'\n onClick={() => {\n setSidebarNavState(sidebarNavState === 'closed' ? 'open' : 'closed');\n }}\n aria-label={\n sidebarNavState === 'closed' ? t('expand_navigation') : t('collapse_navigation')\n }\n aria-expanded={sidebarNavState === 'open' || sidebarNavState === 'opening'}\n aria-controls={navId}\n >\n {['closed', 'closing'].includes(sidebarNavState) ? (\n <Icon name={`arrow-micro-${end}`} />\n ) : (\n <Icon name={`arrow-micro-${start}`} />\n )}\n </StyledAppShellToggleButton>\n\n {['open', 'closed'].includes(sidebarNavState) && (\n <Tooltip\n target={expandCollapseEl}\n placement='right'\n as={StyledAppShellTooltip}\n showDelay='none'\n hideDelay='none'\n >\n {sidebarNavState === 'closed' ? t('expand_navigation') : t('collapse_navigation')}\n </Tooltip>\n )}\n </Flex>\n </Flex>\n )}\n {showMobileNav && (\n <>\n <Flex\n as={StyledMobileNav}\n container={{ alignItems: 'center', gap: 0.25 }}\n ref={setMobileHeaderEl}\n data-app-region\n onClick={() => {\n setMobileNavOpen(false);\n }}\n >\n {caseTypes && caseTypes.length > 0 && <CaseTypes caseTypes={caseTypes} mobileNavBar />}\n {links && <Links links={links.slice(0, mobileNavLinksCount)} mobileNavBar />}\n <StyledMobileMoreMenuButton\n ref={mobileButtonRef}\n variant='simple'\n onClick={(e: MouseEvent<HTMLButtonElement>) => {\n setMobileNavOpen(prev => !prev);\n e.stopPropagation();\n }}\n label={t('app_shell_more')}\n icon\n aria-expanded={mobileNavOpen}\n aria-controls={navId}\n >\n <Icon name='bars' />\n {!mobileNavOpen &&\n utils?.some(item => (isValidElement(item) ? false : !!item.count)) && (\n <Alert variant='urgent' />\n )}\n <span>{t('app_shell_more')}</span>\n </StyledMobileMoreMenuButton>\n </Flex>\n <Drawer\n open={mobileNavOpen}\n ref={mobileNavRef}\n onAfterClose={() => {\n setMobileNavOpen(false);\n }}\n position='fixed'\n placement='bottom'\n size='100dvh'\n nullWhenClosed\n >\n <Flex\n {...restProps}\n container={{\n direction: 'column',\n justify: 'between'\n }}\n id={navId}\n as={StyledMobileMoreMenu}\n ref={ref}\n aria-label={t('app_shell_main_navigation_label')}\n >\n <AppNavigationPanel\n appInfo={appInfo}\n navState='open'\n searchInput={searchInput}\n searchLabel={searchLabel}\n links={links?.slice(mobileNavLinksCount)}\n cases={cases}\n utils={utilsList}\n agent={agent}\n />\n </Flex>\n </Drawer>\n </>\n )}\n {showMainContent && (\n <>\n {documentTabs && <DocumentTabs {...documentTabs} />}\n {(() => {\n const mainRegion = (\n <StyledAppMain\n previewActive={previewActive}\n isTopBar={isTopBar}\n aria-busy={!!progress}\n data-app-region\n >\n <Progress\n visible={!!progress}\n placement='local'\n message={typeof progress === 'string' ? progress : t('loading')}\n />\n {banners && <StyledBannerRegion>{banners}</StyledBannerRegion>}\n {main}\n </StyledAppMain>\n );\n if (!documentTabs) return mainRegion;\n return (\n <StyledDocumentTabPanel\n role='tabpanel'\n id={\n documentTabs.currentTabId ? getTabPanelId(documentTabs.currentTabId) : undefined\n }\n aria-labelledby={\n documentTabs.currentTabId ? getTabElementId(documentTabs.currentTabId) : undefined\n }\n tabIndex={0}\n >\n {mainRegion}\n </StyledDocumentTabPanel>\n );\n })()}\n </>\n )}\n <AppShellGlobalStyle\n isTopBar={isTopBar}\n showAppHeader={showAppHeader}\n isMobile={showMobileNav}\n hasDocumentTabs={!!documentTabs}\n navOpen={sidebarNavState === 'open' || sidebarNavState === 'opening' || mobileNavOpen}\n />\n </AppShellContext.Provider>\n );\n});\n\nexport default AppShell;\n"]}
@@ -8,6 +8,9 @@ export declare const AppShellGlobalStyle: import("react").NamedExoticComponent<i
8
8
  isTopBar?: boolean;
9
9
  showAppHeader?: boolean;
10
10
  isMobile?: boolean;
11
+ hasDocumentTabs?: boolean;
12
+ navOpen?: boolean;
13
+ theme?: DefaultTheme;
11
14
  }>;
12
15
  export declare const menuButtonWidth: (theme: DefaultTheme) => number;
13
16
  export declare const StyledAppInfo: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>> & string;
@@ -1 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Aa;mBACT,OAAO;eACX,OAAO;YA4DlB,CAAC;AAIH,eAAO,MAAM,kBAAkB,6NAI7B,CAAC;AAIH,eAAO,MAAM,qBAAqB;;mBA2BhC,CAAC;AAIH,eAAO,MAAM,0BAA0B;;2JAkCrC,CAAC;AAIH,eAAO,MAAM,kBAAkB,6NAU9B,CAAC;AAIF,eAAO,MAAM,iBAAiB,6NAyG5B,CAAC;AAIH,eAAO,MAAM,eAAe,kYAE3B,CAAC"}
@@ -24,6 +24,8 @@ import { tryCatch } from '../../utils';
24
24
  import { StyledDrawer } from '../Drawer';
25
25
  import AppShellContext from './AppShellContext';
26
26
  import { navContrastColors } from './style-utils';
27
+ import { documentTabsHeight } from './DocumentTabs.styles';
28
+ import { StyledDrawerWrapper } from './Drawer.styles';
27
29
  export const navWidth = '4rem';
28
30
  export const navOpenWidth = '18.75rem';
29
31
  export const headerHeight = '3rem';
@@ -37,11 +39,14 @@ export const AppShellGlobalStyle = createGlobalStyle `
37
39
  /* Height of the app header */
38
40
  --app-header-height: ${({ showAppHeader }) => (showAppHeader ? headerHeight : '0rem')};
39
41
 
42
+ /* Height of the document tab strip (0 when not present) */
43
+ --document-tabs-height: ${({ hasDocumentTabs }) => (hasDocumentTabs ? documentTabsHeight : '0rem')};
44
+
40
45
  /* Hard offset for content that should cover app header and top nav (Backdrop and Fullscreen) */
41
46
  --appshell-hard-top-offset: calc(var(--marking-height, 0rem) + var(--safe-area-inset-block-start, 0rem));
42
47
 
43
- /* Offset for content that should be below app header and top nav (Drawers and Previews) */
44
- --appshell-top-offset: calc(var(--appshell-hard-top-offset) + var(--app-header-height) + ${({ isTopBar }) => (isTopBar ? topNavHeight : '0rem')} );
48
+ /* Offset for content that should be below app header, top nav, and document tabs (Drawers and Previews) */
49
+ --appshell-top-offset: calc(var(--appshell-hard-top-offset) + var(--app-header-height) + ${({ isTopBar }) => (isTopBar ? topNavHeight : '0rem')} + var(--document-tabs-height) );
45
50
 
46
51
  /* Hard offset for content that should cover the bottom mobile nav (Backdrop and Fullscreen) */
47
52
  --appshell-hard-bottom-offset: calc(var(--marking-height, 0rem) + var(--safe-area-inset-block-end, 0rem));
@@ -51,6 +56,19 @@ export const AppShellGlobalStyle = createGlobalStyle `
51
56
 
52
57
  /* Total offset for app header, nav, and mobile nav used for calculating available height */
53
58
  --appshell-total-offset: calc(var(--appshell-top-offset) + var(--appshell-bottom-offset));
59
+
60
+ /* stylelint-disable-next-line length-zero-no-unit */
61
+ --appshell-horizontal-offset: 0rem;
62
+ }
63
+
64
+ @media (min-width: ${({ theme }) => theme?.base.breakpoints.sm ?? '31.25em'}) {
65
+ :root,
66
+ :host {
67
+ /* stylelint-disable-next-line length-zero-no-unit */
68
+ --appshell-horizontal-offset: ${({ navOpen, isMobile, isTopBar }) => isMobile || isTopBar
69
+ ? '0rem'
70
+ : `calc(${navOpen ? navOpenWidth : navWidth} + var(--safe-area-inset-inline-start, 0rem))`};
71
+ }
54
72
  }
55
73
  `;
56
74
  export const menuButtonWidth = (theme) => Number.parseInt(theme.base['hit-area']['finger-min'], 10) +
@@ -193,7 +211,7 @@ const StyledAppNav = styled.nav(({ theme }) => {
193
211
  const foregroundColor = calculateForegroundColor(navBg, navFgColor, theme);
194
212
  return css `
195
213
  --nav-padding: ${theme.components['app-shell'].nav.detached ? '0.75rem' : '0px'};
196
- inset-block-start: var(--appshell-top-offset, 0);
214
+ inset-block-start: calc(var(--appshell-top-offset, 0rem) - var(--document-tabs-height, 0rem));
197
215
  background: ${navBg};
198
216
  color: ${foregroundColor};
199
217
  overflow: hidden;
@@ -232,7 +250,7 @@ export const StyledSidebarNav = styled(StyledAppNav)(({ portalAgent, theme }) =>
232
250
  var(--safe-area-inset-inline-start, 0rem)
233
251
  );
234
252
  transition: width ${`${theme.base.animation.speed} ${theme.base.animation.timing.ease}`};
235
- height: calc(100dvh - var(--appshell-top-offset));
253
+ height: calc(100dvh - var(--appshell-top-offset) + var(--document-tabs-height, 0rem));
236
254
  padding-inline-start: var(--safe-area-inset-inline-start, 0);
237
255
  padding-block-end: calc(${theme.base.spacing} + var(--appshell-bottom-offset, 0));
238
256
 
@@ -249,6 +267,10 @@ export const StyledSidebarNav = styled(StyledAppNav)(({ portalAgent, theme }) =>
249
267
  border-inline-end: 0.0625rem solid ${transparentize(0.9, '#000')};
250
268
  border-color: ${theme.components['app-shell'].nav['border-color']};
251
269
  `}
270
+
271
+ ${StyledDrawerWrapper} {
272
+ inset-block-start: calc(var(--appshell-top-offset, 0rem) - var(--document-tabs-height, 0rem));
273
+ }
252
274
  `;
253
275
  });
254
276
  StyledSidebarNav.defaultProps = defaultThemeProp;
@@ -586,7 +608,12 @@ export const StyledUtils = styled.div(({ theme }) => {
586
608
  StyledUtils.defaultProps = defaultThemeProp;
587
609
  export const StyledMobileMoreMenu = styled(StyledAppNav) `
588
610
  width: 100%;
589
- height: calc(100dvh - var(--appshell-top-offset, 0));
611
+ height: 100%;
612
+
613
+ /* Reserve top space for the app header + top nav, but NOT the document
614
+ tabs strip — the mobile menu drawer covers content above the tab strip
615
+ too. */
616
+ padding-block-start: calc(var(--appshell-top-offset, 0rem) - var(--document-tabs-height, 0rem));
590
617
  padding-block-end: var(--appshell-bottom-offset, ${mobileHeaderHeight});
591
618
  `;
592
619
  StyledMobileMoreMenu.defaultProps = defaultThemeProp;
@@ -609,11 +636,8 @@ export const StyledMobileNav = styled.header(({ theme }) => {
609
636
  transform: translateX(-50%);
610
637
  box-shadow: ${theme.base.shadow.low};
611
638
 
612
- /* Limit the content height of Recents and Notifications */
613
639
  & + ${StyledDrawer} ${StyledDrawer} {
614
640
  width: 100%;
615
- padding-block-start: var(--appshell-top-offset, 0);
616
- padding-block-end: var(--appshell-bottom-offset, ${mobileHeaderHeight});
617
641
  }
618
642
 
619
643
  > div:has(> ${StyledNavList}),
@@ -707,8 +731,7 @@ export const StyledLoading = styled.div `
707
731
  export const StyledAppMain = styled.main(({ previewActive, isTopBar = false, theme }) => {
708
732
  const { navOpen, isMobileNav } = useContext(AppShellContext);
709
733
  return css `
710
- /* stylelint-disable-next-line length-zero-no-unit */
711
- --appshell-horizontal-offset: 0rem;
734
+ margin-inline-start: ${isMobileNav || isTopBar ? 0 : 'var(--appshell-horizontal-offset, 0)'};
712
735
  inset-block-start: var(--appshell-hard-top-offset);
713
736
  padding-block-end: var(--appshell-hard-bottom-offset);
714
737
  position: relative;
@@ -719,13 +742,6 @@ export const StyledAppMain = styled.main(({ previewActive, isTopBar = false, the
719
742
  outline: none;
720
743
  }
721
744
 
722
- @media (min-width: ${theme.base.breakpoints.sm}) {
723
- --appshell-horizontal-offset: calc(
724
- ${navOpen ? navOpenWidth : navWidth} + var(--safe-area-inset-inline-start, 0rem)
725
- );
726
- }
727
- margin-inline-start: ${isMobileNav || isTopBar ? 0 : 'var(--appshell-horizontal-offset, 0)'};
728
-
729
745
  ${isMobileNav
730
746
  ? css `
731
747
  &::after {